Files
web-Iot/public/js/cesium.js
2026-05-22 10:23:31 +08:00

17947 lines
5.6 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @license
* Cesium - https://github.com/CesiumGS/cesium
* Version 1.141.0
*
* Copyright 2011-2022 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
*/
"use strict";var Cesium=(()=>{var EWe=Object.create;var R1=Object.defineProperty;var GWe=Object.getOwnPropertyDescriptor;var LWe=Object.getOwnPropertyNames;var WWe=Object.getPrototypeOf,vWe=Object.prototype.hasOwnProperty;var FWe=(e,t,n)=>t in e?R1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var cU=(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 om=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),IWe=(e,t)=>{for(var n in t)R1(e,n,{get:t[n],enumerable:!0})},Qie=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of LWe(t))!vWe.call(e,o)&&o!==n&&R1(e,o,{get:()=>t[o],enumerable:!(i=GWe(t,o))||i.enumerable});return e};var x=(e,t,n)=>(n=e!=null?EWe(WWe(e)):{},Qie(t||!e||!e.__esModule?R1(n,"default",{value:e,enumerable:!0}):n,e)),PWe=e=>Qie(R1({},"__esModule",{value:!0}),e);var Qt=(e,t,n)=>FWe(e,typeof t!="symbol"?t+"":t,n);var T=om(()=>{"use strict";globalThis.CESIUM_WORKERS=atob("dmFyIENlc2l1bVdvcmtlcnM9KCgpPT57dmFyIE1TPU9iamVjdC5jcmVhdGU7dmFyIGZmPU9iamVjdC5kZWZpbmVQcm9wZXJ0eTt2YXIgTlM9T2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcjt2YXIgSVM9T2JqZWN0LmdldE93blByb3BlcnR5TmFtZXM7dmFyIFBTPU9iamVjdC5nZXRQcm90b3R5cGVPZixrUz1PYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5O3ZhciB2Uz0obixlLHQpPT5lIGluIG4/ZmYobixlLHtlbnVtZXJhYmxlOiEwLGNvbmZpZ3VyYWJsZTohMCx3cml0YWJsZTohMCx2YWx1ZTp0fSk6bltlXT10O3ZhciBsYT0obj0+dHlwZW9mIHJlcXVpcmU8InUiP3JlcXVpcmU6dHlwZW9mIFByb3h5PCJ1Ij9uZXcgUHJveHkobix7Z2V0OihlLHQpPT4odHlwZW9mIHJlcXVpcmU8InUiP3JlcXVpcmU6ZSlbdF19KTpuKShmdW5jdGlvbihuKXtpZih0eXBlb2YgcmVxdWlyZTwidSIpcmV0dXJuIHJlcXVpcmUuYXBwbHkodGhpcyxhcmd1bWVudHMpO3Rocm93IEVycm9yKCdEeW5hbWljIHJlcXVpcmUgb2YgIicrbisnIiBpcyBub3Qgc3VwcG9ydGVkJyl9KSxmMT1uPT5lPT57dmFyIHQ9bltlXTtpZih0KXJldHVybiB0KCk7dGhyb3cgbmV3IEVycm9yKCJNb2R1bGUgbm90IGZvdW5kIGluIGJ1bmRsZTogIitlKX07dmFyIFg9KG4sZSk9PigpPT4obiYmKGU9bihuPTApKSxlKTt2YXI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YS54PXIsYS55PWksYS56PWYsYS53PWQsYX1zdGF0aWMgbWFnbml0dWRlU3F1YXJlZChlKXtyZXR1cm4gZS54KmUueCtlLnkqZS55K2UueiplLnorZS53KmUud31zdGF0aWMgbWFnbml0dWRlKGUpe3JldHVybiBNYXRoLnNxcnQobi5tYWduaXR1ZGVTcXVhcmVkKGUpKX1zdGF0aWMgZGlzdGFuY2UoZSx0KXtyZXR1cm4gbi5zdWJ0cmFjdChlLHQsbmwpLG4ubWFnbml0dWRlKG5sKX1zdGF0aWMgZGlzdGFuY2VTcXVhcmVkKGUsdCl7cmV0dXJuIG4uc3VidHJhY3QoZSx0LG5sKSxuLm1hZ25pdHVkZVNxdWFyZWQobmwpfXN0YXRpYyBub3JtYWxpemUoZSx0KXtsZXQgbz1uLm1hZ25pdHVkZShlKTtyZXR1cm4gdC54PWUueC9vLHQueT1lLnkvbyx0Lno9ZS56L28sdC53PWUudy9vLHR9c3RhdGljIGRvdChlLHQpe3JldHVybiBlLngqdC54K2UueSp0LnkrZS56KnQueitlLncqdC53fXN0YXRpYyBtdWx0aXBseUNvbXBvbmVudHMoZSx0LG8pe3JldHVybiBvLng9ZS54KnQueCxvLnk9ZS55KnQueSxvLno9ZS56KnQueixvLnc9ZS53KnQudyxvfXN0YXRpYyBkaXZpZGVDb21wb25lbnRzKGUsdCxvKXtyZXR1cm4gby54PWUueC90Lngsby55PWUueS90Lnksby56PWUuei90Lnosby53PWUudy90Lncsb31zdGF0aWMgYWRkKGUsdCxvKXtyZXR1cm4gby54PWUueCt0Lngsby55PWUueSt0Lnksby56PWUueit0Lnosby53PWUudyt0Lncsb31zdGF0aWMgc3VidHJhY3QoZSx0LG8pe3JldHVybiBvLng9ZS54LXQueCxvLnk9ZS55LXQueSxvLno9ZS56LXQueixvLnc9ZS53LXQudyxvfXN0YXRpYyBtdWx0aXBseUJ5U2NhbGFyKGUsdCxvKXtyZXR1cm4gby54PWUueCp0LG8ueT1lLnkqdCxvLno9ZS56KnQsby53PWUud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ZXh0UG9zaXRpb24udmFsdWVzLnB1c2goUC54LFAueSxQLnopLHcubmV4dFBvc2l0aW9uLnZhbHVlcy5wdXNoKFAueCxQLnksUC56KSx3Lm5leHRQb3NpdGlvbi52YWx1ZXMucHVzaChQLngsUC55LFAueiksdy5uZXh0UG9zaXRpb24udmFsdWVzLnB1c2goUC54LFAueSxQLnopLHMubmVnYXRlKE4sTikscy5hZGQoSSxOLFApLFMucG9zaXRpb24udmFsdWVzLnB1c2goUC54LFAueSxQLnopLFMucG9zaXRpb24udmFsdWVzLnB1c2goUC54LFAueSxQLnopLFMucG9zaXRpb24udmFsdWVzLnB1c2goRS54LEUueSxFLnosRS54LEUueSxFLnopLFMucHJldlBvc2l0aW9uLnZhbHVlcy5wdXNoKFAueCxQLnksUC56KSxTLnByZXZQb3NpdGlvbi52YWx1ZXMucHVzaChQLngsUC55LFAueiksUy5wcmV2UG9zaXRpb24udmFsdWVzLnB1c2goUC54LFAueSxQLnopLFMucHJldlBvc2l0aW9uLnZhbHVlcy5wdXNoKFAueCxQLnksUC56KSxTLm5leHRQb3NpdGlvbi52YWx1ZXMucHVzaChFLngsRS55LEUueixFLngsRS55LEUueiksUy5uZXh0UG9zaXRpb24udmFsdWVzLnB1c2gocltUKjNdLHJbVCozKzFdLHJbVCozKzJdKSxTLm5leHRQb3NpdGlvbi52YWx1ZXMucHVzaChyW1QqMyszXSxyW1QqMys0XSxyW1QqMys1XSk7bGV0IHY9WS5mcm9tQXJyYXkoaSx5KjIsS3cpLEE9TWF0aC5hYnModi55KTt3LmV4cGFuZEFuZFdpZHRoLnZhbHVlcy5wdXNoKC0xLEEsMSxBKSx3LmV4cGFuZEFuZFdpZHRoLnZhbHVlcy5wdXNoKC0xLC1BLDEsLUEpLFMuZXhwYW5kQW5kV2lkdGgudmFsdWVzLnB1c2goLTEsQSwxLEEpLFMuZXhwYW5kQW5kV2lkdGgudmFsdWVzLnB1c2goLTEsLUEsMSwtQSk7bGV0IHg9cy5tYWduaXR1ZGV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gMDppLHQpOihyVC5vZmZzZXRBdHRyaWJ1dGU9aT09PS0xP3ZvaWQgMDppLG5ldyByYShyVCkpfTtyYS5jcmVhdGVHZW9tZXRyeT1mdW5jdGlvbihuKXtsZXQgZT1uLl9taW5pbXVtLHQ9bi5fbWF4aW11bSxvPW4uX3ZlcnRleEZvcm1hdDtpZihzLmVxdWFscyhlLHQpKXJldHVybjtsZXQgYT1uZXcgUWUscixpO2lmKG8ucG9zaXRpb24mJihvLnN0fHxvLm5vcm1hbHx8by50YW5nZW50fHxvLmJpdGFuZ2VudCkpe2lmKG8ucG9zaXRpb24mJihpPW5ldyBGbG9hdDY0QXJyYXkoNzIpLGlbMF09ZS54LGlbMV09ZS55LGlbMl09dC56LGlbM109dC54LGlbNF09ZS55LGlbNV09dC56LGlbNl09dC54LGlbN109dC55LGlbOF09dC56LGlbOV09ZS54LGlbMTBdPXQueSxpWzExXT10LnosaVsxMl09ZS54LGlbMTNdPWUueSxpWzE0XT1lLnosaVsxNV09dC54LGlbMTZdPWUueSxpWzE3XT1lLnosaVsxOF09dC54LGlbMTldPXQueSxpWzIwXT1lLnosaVsyMV09ZS54LGlbMjJdPXQueSxpWzIzXT1lLnosaVsyNF09dC54LGlbMjVdPWUueSxpWzI2XT1lLnosaVsyN109dC54LGlbMjhdPXQueSxpWzI5XT1lLnosaVszMF09dC54LGlbMzFdPXQueSxpWzMyXT10LnosaVszM109dC54LGlbMzRdPWUueSxpWzM1XT10LnosaVszNl09ZS54LGlbMzddPWUueSxpWzM4XT1lLnosaVszOV09ZS54LGlbNDBdPXQueSxpWzQxXT1lLnosaVs0Ml09ZS54LGlbNDNdPXQueSxpWzQ0XT10LnosaVs0NV09ZS54LGlbNDZdPWUueSxpWzQ3XT10LnosaVs0OF09ZS54LGlbNDldPXQueSxpWzUwXT1lLnosaVs1MV09dC54LGlbNTJdPXQueSxpWzUzXT1lLnosaVs1NF09dC54LGlbNTVdPXQueSxpWzU2XT10LnosaVs1N109ZS54LGlbNThdPXQ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9Zm9yKGI9MDtiPHI7YisrKWEubm9ybWFsJiYobFtJKytdPTAsbFtJKytdPTAsbFtJKytdPS0xKSxhLnRhbmdlbnQmJihoW04rK109MSxoW04rK109MCxoW04rK109MCksYS5iaXRhbmdlbnQmJihtW1ArK109MCxtW1ArK109LTEsbVtQKytdPTApO2ZvcihiPTA7YjxyO2IrKylhLm5vcm1hbCYmKGxbSSsrXT0wLGxbSSsrXT0wLGxbSSsrXT0xKSxhLnRhbmdlbnQmJihoW04rK109MSxoW04rK109MCxoW04rK109MCksYS5iaXRhbmdlbnQmJihtW1ArK109MCxtW1ArK109MSxtW1ArK109MCl9bGV0IHk9MTIqci0xMixUPUllLmNyZWF0ZVR5cGVkQXJyYXkoZCx5KSxfPTAsRT0wO2ZvcihiPTA7YjxyLTE7YisrKVRbXysrXT1FLFRbXysrXT1FKzIsVFtfKytdPUUrMyxUW18rK109RSxUW18rK109RSszLFRbXysrXT1FKzEsRSs9Mjtmb3IoVFtfKytdPWktMixUW18rK109MCxUW18rK109MSxUW18rK109aS0yLFRbXysrXT0xLFRbXysrXT1pLTEsYj0xO2I8ci0xO2IrKylUW18rK109aStiKzEsVFtfKytdPWkrYixUW18rK109aTtmb3IoYj0xO2I8ci0xO2IrKylUW18rK109ZixUW18rK109ZitiLFRbXysrXT1mK2IrMTtsZXQgdz0wO2lmKGEuc3Qpe2xldCBNPU1hdGgubWF4KHQsbyk7Zm9yKGI9MDtiPGQ7YisrKXtsZXQgST1zLmZyb21BcnJheShjLGIqMyxMdik7dVt3KytdPShJLngrTSkvKDIqTSksdVt3KytdPShJLnkrTSkvKDIqTSl9fWxldCBSPW5ldyBRZTthLnBvc2l0aW9uJiYoUi5wb3NpdGlvbj1uZXcgaWUoe2NvbXBvbmVudERhdGF0eXBlOm9lLkRPVUJMRSxjb21wb25lbnRzUGVyQXR0cmlidXRlOjMsdmFsdWVzOmN9KSksYS5ub3JtYWwmJihSLm5vcm1hbD1uZXcgaWUoe2NvbXBvbmVudERhdGF0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dPWIsdVtfKytdPW0sdVtfKytdPXAsdVtfKytdPXAsdVtfKytdPW0sdVtfKytdPXk7bT1yKjItMitsKnIqMixiPW0rMSxwPWIrVCx5PW0rVCx1W18rK109Yix1W18rK109bSx1W18rK109cCx1W18rK109cCx1W18rK109bSx1W18rK109eX1pZihvLnN0fHxvLnRhbmdlbnR8fG8uYml0YW5nZW50KXtsZXQgUj1uZXcgRmxvYXQzMkFycmF5KGkqMiksUz0xLyhmLTEpLE09MS90LmhlaWdodCxJPXQuaGVpZ2h0LzIsTixQLHY9MDtmb3IobD0wO2w8ZjtsKyspe2ZvcihOPWwqUyxQPU0qKGVbMF0ueStJKSxSW3YrK109TixSW3YrK109UCxoPTE7aDxyO2grKylQPU0qKGVbaF0ueStJKSxSW3YrK109TixSW3YrK109UCxSW3YrK109TixSW3YrK109UDtQPU0qKGVbMF0ueStJKSxSW3YrK109TixSW3YrK109UH1mb3IoaD0wO2g8cjtoKyspTj0wLFA9TSooZVtoXS55K0kpLFJbdisrXT1OLFJbdisrXT1QO2ZvcihoPTA7aDxyO2grKylOPShmLTEpKlMsUD1NKihlW2hdLnkrSSksUlt2KytdPU4sUlt2KytdPVA7YS5zdD1uZXcgaWUoe2NvbXBvbmVudERhdGF0eXBlOm9lLkZMT0FULGNvbXBvbmVudHNQZXJBdHRyaWJ1dGU6Mix2YWx1ZXM6bmV3IEZsb2F0MzJBcnJheShSKX0pfWxldCBFPWktcioyO2ZvcihsPTA7bDxkLmxlbmd0aDtsKz0zKXtsZXQgUj1kW2xdK0UsUz1kW2wrMV0rRSxNPWRbbCsyXStFO3VbXysrXT1SLHVbXysrXT1TLHVbXysrXT1NLHVbXysrXT1NK3IsdVtfKytdPVMrcix1W18rK109UityfWxldCB3PW5ldyBQZSh7YXR0cmlidXRlczphLGluZGljZXM6dSxib3VuZGluZ1NwaGVyZTpnZS5mcm9tVmVydGljZXMobikscHJpbWl0aXZlVHlwZTpGZS5UUklBTkdMRVN9KTtpZihvLm5vcm1hbCYm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KCgpPT5IZygpKX0sR3o9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5XZygpKX0sVno9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5uXygpKX0sSHo9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5yXygpKX0sS3o9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5zXygpKX0scXo9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT51XygpKX0sV3o9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5tXygpKX0sWHo9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5rbigpKX0sWXo9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5wXygpKX0sSno9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5fXygpKX0sWno9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT53XygpKX0sUXo9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5FXygpKX0sJHo9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5PXygpKX0sZUc9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5xXygpKX0sdEc9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5ZXygpKX0sbkc9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5RXygpKX0sb0c9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT50eSgpKX0sYUc9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5peSgpKX0sckc9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5meSgpKX0saUc9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5ieSgpKX0sY0c9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5QeSgpKX0sc0c9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5CeSgpKX0sZkc9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5HeSgpKX0sZEc9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5IeSgpKX0sdUc9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5xeSgpKX0sbEc9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5aeSgpKX0saEc9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5ReSgpKX0sbUc9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5lMSgpKX0sYkc9KCk9PntQcm9taXNlLnJlc29sdmUoKS50aGVuKCgpPT5uMSgpKX07cmV0dXJuIEZTKHBHKTt9KSgpOwo=")});var lU=om((bXt,qie)=>{var gXt=x(T()),R0=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)};R0.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}};R0.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};R0.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};R0.prototype.random_int31=function(){return this.random_int()>>>1};R0.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};R0.prototype.random=function(){return this.random_int()*(1/4294967296)};R0.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};R0.prototype.random_long=function(){var e=this.random_int()>>>5,t=this.random_int()>>>6;return(e*67108864+t)*(1/9007199254740992)};qie.exports=R0});var Roe=om((nZ,iZ)=>{var KYt=x(T());/*! https://mths.be/punycode v1.4.0 by @mathias */(function(e){var t=typeof nZ=="object"&&nZ&&!nZ.nodeType&&nZ,n=typeof iZ=="object"&&iZ&&!iZ.nodeType&&iZ,i=typeof global=="object"&&global;(i.global===i||i.window===i||i.self===i)&&(e=i);var o,r=2147483647,s=36,a=1,c=26,d=38,u=700,h=72,p=128,b="-",f=/^xn--/,y=/[^\x20-\x7E]/,_=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=s-a,Z=Math.floor,V=String.fromCharCode,E;function L(k){throw new RangeError(S[k])}function v(k,D){for(var w=k.length,z=[];w--;)z[w]=D(k[w]);return z}function I(k,D){var w=k.split("@"),z="";w.length>1&&(z=w[0]+"@",k=w[1]),k=k.replace(_,".");var J=k.split("."),ee=v(J,D).join(".");return z+ee}function X(k){for(var D=[],w=0,z=k.length,J,ee;w<z;)J=k.charCodeAt(w++),J>=55296&&J<=56319&&w<z?(ee=k.charCodeAt(w++),(ee&64512)==56320?D.push(((J&1023)<<10)+(ee&1023)+65536):(D.push(J),w--)):D.push(J);return D}function N(k){return v(k,function(D){var w="";return D>65535&&(D-=65536,w+=V(D>>>10&1023|55296),D=56320|D&1023),w+=V(D),w}).join("")}function g(k){return k-48<10?k-22:k-65<26?k-65:k-97<26?k-97:s}function C(k,D){return k+22+75*(k<26)-((D!=0)<<5)}function R(k,D,w){var z=0;for(k=w?Z(k/u):k>>1,k+=Z(k/D);k>A*c>>1;z+=s)k=Z(k/A);return Z(z+(A+1)*k/(k+d))}function G(k){var D=[],w=k.length,z,J=0,ee=p,H=h,te,$,be,ye,ce,Ze,xe,Ge,Ve;for(te=k.lastIndexOf(b),te<0&&(te=0),$=0;$<te;++$)k.charCodeAt($)>=128&&L("not-basic"),D.push(k.charCodeAt($));for(be=te>0?te+1:0;be<w;){for(ye=J,ce=1,Ze=s;be>=w&&L("invalid-input"),xe=g(k.charCodeAt(be++)),(xe>=s||xe>Z((r-J)/ce))&&L("overflow"),J+=xe*ce,Ge=Ze<=H?a:Ze>=H+c?c:Ze-H,!(xe<Ge);Ze+=s)Ve=s-Ge,ce>Z(r/Ve)&&L("overflow"),ce*=Ve;z=D.length+1,H=R(J-ye,z,ye==0),Z(J/z)>r-ee&&L("overflow"),ee+=Z(J/z),J%=z,D.splice(J++,0,ee)}return N(D)}function P(k){var D,w,z,J,ee,H,te,$,be,ye,ce,Ze=[],xe,Ge,Ve,Ye;for(k=X(k),xe=k.length,D=p,w=0,ee=h,H=0;H<xe;++H)ce=k[H],ce<128&&Ze.push(V(ce));for(z=J=Ze.length,J&&Ze.push(b);z<xe;){for(te=r,H=0;H<xe;++H)ce=k[H],ce>=D&&ce<te&&(te=ce);for(Ge=z+1,te-D>Z((r-w)/Ge)&&L("overflow"),w+=(te-D)*Ge,D=te,H=0;H<xe;++H)if(ce=k[H],ce<D&&++w>r&&L("overflow"),ce==D){for($=w,be=s;ye=be<=ee?a:be>=ee+c?c:be-ee,!($<ye);be+=s)Ye=$-ye,Ve=s-ye,Ze.push(V(C(ye+Ye%Ve,0))),$=Z(Ye/Ve);Ze.push(V(C($,0))),ee=R(w,Ge,z==J),w=0,++z}++w,++D}return Ze.join("")}function Y(k){return I(k,function(D){return f.test(D)?G(D.slice(4).toLowerCase()):D})}function O(k){return I(k,function(D){return y.test(D)?"xn--"+P(D):D})}if(o={version:"1.3.2",ucs2:{decode:X,encode:N},decode:G,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(iZ.exports==t)n.exports=o;else for(E in o)o.hasOwnProperty(E)&&(t[E]=o[E]);else e.punycode=o})(nZ)});var Goe=om((Eoe,RU)=>{var JYt=x(T());/*!
* URI.js - Mutating URLs
* IPv6 Support
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/(function(e,t){"use strict";typeof RU=="object"&&RU.exports?RU.exports=t():typeof define=="function"&&define.amd?define(t):e.IPv6=t(e)})(Eoe,function(e){"use strict";var t=e&&e.IPv6;function n(o){var r=o.toLowerCase(),s=r.split(":"),a=s.length,c=8;s[0]===""&&s[1]===""&&s[2]===""?(s.shift(),s.shift()):s[0]===""&&s[1]===""?s.shift():s[a-1]===""&&s[a-2]===""&&s.pop(),a=s.length,s[a-1].indexOf(".")!==-1&&(c=7);var d;for(d=0;d<a&&s[d]!=="";d++);if(d<c)for(s.splice(d,1,"0000");s.length<c;)s.splice(d,0,"0000");for(var u,h=0;h<c;h++){u=s[h].split("");for(var p=0;p<3&&(u[0]==="0"&&u.length>1);p++)u.splice(0,1);s[h]=u.join("")}var b=-1,f=0,y=0,_=-1,S=!1;for(h=0;h<c;h++)S?s[h]==="0"?y+=1:(S=!1,y>f&&(b=_,f=y)):s[h]==="0"&&(S=!0,_=h,y=1);y>f&&(b=_,f=y),f>1&&s.splice(b,f,""),a=s.length;var A="";for(s[0]===""&&(A=":"),h=0;h<a&&(A+=s[h],h!==a-1);h++)A+=":";return s[a-1]===""&&(A+=":"),A}function i(){return e.IPv6===this&&(e.IPv6=t),this}return{best:n,noConflict:i}})});var Woe=om((Loe,EU)=>{var jYt=x(T());/*!
* URI.js - Mutating URLs
* Second Level Domain (SLD) Support
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/(function(e,t){"use strict";typeof EU=="object"&&EU.exports?EU.exports=t():typeof define=="function"&&define.amd?define(t):e.SecondLevelDomains=t(e)})(Loe,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 tu=om((voe,GU)=>{var QYt=x(T());/*!
* URI.js - Mutating URLs
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/(function(e,t){"use strict";typeof GU=="object"&&GU.exports?GU.exports=t(Roe(),Goe(),Woe()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],t):e.URI=t(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(voe,function(e,t,n,i){"use strict";var o=i&&i.URI;function r(C,R){var G=arguments.length>=1,P=arguments.length>=2;if(!(this instanceof r))return G?P?new r(C,R):new r(C):new r;if(C===void 0){if(G)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?C=location.href+"":C=""}if(C===null&&G)throw new TypeError("null is not a valid argument for URI");return this.href(C),R!==void 0?this.absoluteTo(R):this}function s(C){return/^[0-9]+$/.test(C)}r.version="1.19.11";var a=r.prototype,c=Object.prototype.hasOwnProperty;function d(C){return C.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function u(C){return C===void 0?"Undefined":String(Object.prototype.toString.call(C)).slice(8,-1)}function h(C){return u(C)==="Array"}function p(C,R){var G={},P,Y;if(u(R)==="RegExp")G=null;else if(h(R))for(P=0,Y=R.length;P<Y;P++)G[R[P]]=!0;else G[R]=!0;for(P=0,Y=C.length;P<Y;P++){var O=G&&G[C[P]]!==void 0||!G&&R.test(C[P]);O&&(C.splice(P,1),Y--,P--)}return C}function b(C,R){var G,P;if(h(R)){for(G=0,P=R.length;G<P;G++)if(!b(C,R[G]))return!1;return!0}var Y=u(R);for(G=0,P=C.length;G<P;G++)if(Y==="RegExp"){if(typeof C[G]=="string"&&C[G].match(R))return!0}else if(C[G]===R)return!0;return!1}function f(C,R){if(!h(C)||!h(R)||C.length!==R.length)return!1;C.sort(),R.sort();for(var G=0,P=C.length;G<P;G++)if(C[G]!==R[G])return!1;return!0}function y(C){var R=/^\/+|\/+$/g;return C.replace(R,"")}r._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:r.preventInvalidHostname,duplicateQueryParameters:r.duplicateQueryParameters,escapeQuerySpace:r.escapeQuerySpace}},r.preventInvalidHostname=!1,r.duplicateQueryParameters=!1,r.escapeQuerySpace=!0,r.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,r.idn_expression=/[^a-z0-9\._-]/i,r.punycode_expression=/(xn--)/i,r.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,r.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((: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findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},r.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,r.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,r.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},r.hostProtocols=["http","https"],r.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,r.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},r.getDomAttribute=function(C){if(!(!C||!C.nodeName)){var R=C.nodeName.toLowerCase();if(!(R==="input"&&C.type!=="image"))return r.domAttributes[R]}};function _(C){return escape(C)}function S(C){return encodeURIComponent(C).replace(/[!'()*]/g,_).replace(/\*/g,"%2A")}r.encode=S,r.decode=decodeURIComponent,r.iso8859=function(){r.encode=escape,r.decode=unescape},r.unicode=function(){r.encode=S,r.decode=decodeURIComponent},r.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},r.encodeQuery=function(C,R){var G=r.encode(C+"");return R===void 0&&(R=r.escapeQuerySpace),R?G.replace(/%20/g,"+"):G},r.decodeQuery=function(C,R){C+="",R===void 0&&(R=r.escapeQuerySpace);try{return r.decode(R?C.replace(/\+/g,"%20"):C)}catch{return C}};var A={encode:"encode",decode:"decode"},Z,V=function(C,R){return function(G){try{return r[R](G+"").replace(r.characters[C][R].expression,function(P){return r.characters[C][R].map[P]})}catch{return G}}};for(Z in A)r[Z+"PathSegment"]=V("pathname",A[Z]),r[Z+"UrnPathSegment"]=V("urnpath",A[Z]);var E=function(C,R,G){return function(P){var Y;G?Y=function(w){return r[R](r[G](w))}:Y=r[R];for(var O=(P+"").split(C),k=0,D=O.length;k<D;k++)O[k]=Y(O[k]);return O.join(C)}};r.decodePath=E("/","decodePathSegment"),r.decodeUrnPath=E(":","decodeUrnPathSegment"),r.recodePath=E("/","encodePathSegment","decode"),r.recodeUrnPath=E(":","encodeUrnPathSegment","decode"),r.encodeReserved=V("reserved","encode"),r.parse=function(C,R){var G;return R||(R={preventInvalidHostname:r.preventInvalidHostname}),C=C.replace(r.leading_whitespace_expression,""),C=C.replace(r.ascii_tab_whitespace,""),G=C.indexOf("#"),G>-1&&(R.fragment=C.substring(G+1)||null,C=C.substring(0,G)),G=C.indexOf("?"),G>-1&&(R.query=C.substring(G+1)||null,C=C.substring(0,G)),C=C.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),C=C.replace(/^[/\\]{2,}/i,"//"),C.substring(0,2)==="//"?(R.protocol=null,C=C.substring(2),C=r.parseAuthority(C,R)):(G=C.indexOf(":"),G>-1&&(R.protocol=C.substring(0,G)||null,R.protocol&&!R.protocol.match(r.protocol_expression)?R.protocol=void 0:C.substring(G+1,G+3).replace(/\\/g,"/")==="//"?(C=C.substring(G+3),C=r.parseAuthority(C,R)):(C=C.substring(G+1),R.urn=!0))),R.path=C,R},r.parseHost=function(C,R){C||(C=""),C=C.replace(/\\/g,"/");var G=C.indexOf("/"),P,Y;if(G===-1&&(G=C.length),C.charAt(0)==="[")P=C.indexOf("]"),R.hostname=C.substring(1,P)||null,R.port=C.substring(P+2,G)||null,R.port==="/"&&(R.port=null);else{var O=C.indexOf(":"),k=C.indexOf("/"),D=C.indexOf(":",O+1);D!==-1&&(k===-1||D<k)?(R.hostname=C.substring(0,G)||null,R.port=null):(Y=C.substring(0,G).split(":"),R.hostname=Y[0]||null,R.port=Y[1]||null)}return R.hostname&&C.substring(G).charAt(0)!=="/"&&(G++,C="/"+C),R.preventInvalidHostname&&r.ensureValidHostname(R.hostname,R.protocol),R.port&&r.ensureValidPort(R.port),C.substring(G)||"/"},r.parseAuthority=function(C,R){return C=r.parseUserinfo(C,R),r.parseHost(C,R)},r.parseUserinfo=function(C,R){var G=C,P=C.indexOf("\\");P!==-1&&(C=C.replace(/\\/g,"/"));var Y=C.indexOf("/"),O=C.lastIndexOf("@",Y>-1?Y:C.length-1),k;return O>-1&&(Y===-1||O<Y)?(k=C.substring(0,O).split(":"),R.username=k[0]?r.decode(k[0]):null,k.shift(),R.password=k[0]?r.decode(k.join(":")):null,C=G.substring(O+1)):(R.username=null,R.password=null),C},r.parseQuery=function(C,R){if(!C)return{};if(C=C.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!C)return{};for(var G={},P=C.split("&"),Y=P.length,O,k,D,w=0;w<Y;w++)O=P[w].split("="),k=r.decodeQuery(O.shift(),R),D=O.length?r.decodeQuery(O.join("="),R):null,k!=="__proto__"&&(c.call(G,k)?((typeof G[k]=="string"||G[k]===null)&&(G[k]=[G[k]]),G[k].push(D)):G[k]=D);return G},r.build=function(C){var R="",G=!1;return C.protocol&&(R+=C.protocol+":"),!C.urn&&(R||C.hostname)&&(R+="//",G=!0),R+=r.buildAuthority(C)||"",typeof C.path=="string"&&(C.path.charAt(0)!=="/"&&G&&(R+="/"),R+=C.path),typeof C.query=="string"&&C.query&&(R+="?"+C.query),typeof C.fragment=="string"&&C.fragment&&(R+="#"+C.fragment),R},r.buildHost=function(C){var R="";if(C.hostname)r.ip6_expression.test(C.hostname)?R+="["+C.hostname+"]":R+=C.hostname;else return"";return C.port&&(R+=":"+C.port),R},r.buildAuthority=function(C){return r.buildUserinfo(C)+r.buildHost(C)},r.buildUserinfo=function(C){var R="";return C.username&&(R+=r.encode(C.username)),C.password&&(R+=":"+r.encode(C.password)),R&&(R+="@"),R},r.buildQuery=function(C,R,G){var P="",Y,O,k,D;for(O in C)if(O!=="__proto__"&&c.call(C,O))if(h(C[O]))for(Y={},k=0,D=C[O].length;k<D;k++)C[O][k]!==void 0&&Y[C[O][k]+""]===void 0&&(P+="&"+r.buildQueryParameter(O,C[O][k],G),R!==!0&&(Y[C[O][k]+""]=!0));else C[O]!==void 0&&(P+="&"+r.buildQueryParameter(O,C[O],G));return P.substring(1)},r.buildQueryParameter=function(C,R,G){return r.encodeQuery(C,G)+(R!==null?"="+r.encodeQuery(R,G):"")},r.addQuery=function(C,R,G){if(typeof R=="object")for(var P in R)c.call(R,P)&&r.addQuery(C,P,R[P]);else if(typeof R=="string"){if(C[R]===void 0){C[R]=G;return}else typeof C[R]=="string"&&(C[R]=[C[R]]);h(G)||(G=[G]),C[R]=(C[R]||[]).concat(G)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},r.setQuery=function(C,R,G){if(typeof R=="object")for(var P in R)c.call(R,P)&&r.setQuery(C,P,R[P]);else if(typeof R=="string")C[R]=G===void 0?null:G;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},r.removeQuery=function(C,R,G){var P,Y,O;if(h(R))for(P=0,Y=R.length;P<Y;P++)C[R[P]]=void 0;else if(u(R)==="RegExp")for(O in C)R.test(O)&&(C[O]=void 0);else if(typeof R=="object")for(O in R)c.call(R,O)&&r.removeQuery(C,O,R[O]);else if(typeof R=="string")G!==void 0?u(G)==="RegExp"?!h(C[R])&&G.test(C[R])?C[R]=void 0:C[R]=p(C[R],G):C[R]===String(G)&&(!h(G)||G.length===1)?C[R]=void 0:h(C[R])&&(C[R]=p(C[R],G)):C[R]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},r.hasQuery=function(C,R,G,P){switch(u(R)){case"String":break;case"RegExp":for(var Y in C)if(c.call(C,Y)&&R.test(Y)&&(G===void 0||r.hasQuery(C,Y,G)))return!0;return!1;case"Object":for(var O in R)if(c.call(R,O)&&!r.hasQuery(C,O,R[O]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(u(G)){case"Undefined":return R in C;case"Boolean":var k=!!(h(C[R])?C[R].length:C[R]);return G===k;case"Function":return!!G(C[R],R,C);case"Array":if(!h(C[R]))return!1;var D=P?b:f;return D(C[R],G);case"RegExp":return h(C[R])?P?b(C[R],G):!1:!!(C[R]&&C[R].match(G));case"Number":G=String(G);case"String":return h(C[R])?P?b(C[R],G):!1:C[R]===G;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},r.joinPaths=function(){for(var C=[],R=[],G=0,P=0;P<arguments.length;P++){var Y=new r(arguments[P]);C.push(Y);for(var O=Y.segment(),k=0;k<O.length;k++)typeof O[k]=="string"&&R.push(O[k]),O[k]&&G++}if(!R.length||!G)return new r("");var D=new r("").segment(R);return(C[0].path()===""||C[0].path().slice(0,1)==="/")&&D.path("/"+D.path()),D.normalize()},r.commonPath=function(C,R){var G=Math.min(C.length,R.length),P;for(P=0;P<G;P++)if(C.charAt(P)!==R.charAt(P)){P--;break}return P<1?C.charAt(0)===R.charAt(0)&&C.charAt(0)==="/"?"/":"":((C.charAt(P)!=="/"||R.charAt(P)!=="/")&&(P=C.substring(0,P).lastIndexOf("/")),C.substring(0,P+1))},r.withinString=function(C,R,G){G||(G={});var P=G.start||r.findUri.start,Y=G.end||r.findUri.end,O=G.trim||r.findUri.trim,k=G.parens||r.findUri.parens,D=/[a-z0-9-]=["']?$/i;for(P.lastIndex=0;;){var w=P.exec(C);if(!w)break;var z=w.index;if(G.ignoreHtml){var J=C.slice(Math.max(z-3,0),z);if(J&&D.test(J))continue}for(var ee=z+C.slice(z).search(Y),H=C.slice(z,ee),te=-1;;){var $=k.exec(H);if(!$)break;var be=$.index+$[0].length;te=Math.max(te,be)}if(te>-1?H=H.slice(0,te)+H.slice(te).replace(O,""):H=H.replace(O,""),!(H.length<=w[0].length)&&!(G.ignore&&G.ignore.test(H))){ee=z+H.length;var ye=R(H,z,ee,C);if(ye===void 0){P.lastIndex=ee;continue}ye=String(ye),C=C.slice(0,z)+ye+C.slice(ee),P.lastIndex=z+ye.length}}return P.lastIndex=0,C},r.ensureValidHostname=function(C,R){var G=!!C,P=!!R,Y=!1;if(P&&(Y=b(r.hostProtocols,R)),Y&&!G)throw new TypeError("Hostname cannot be empty, if protocol is "+R);if(C&&C.match(r.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(C).match(r.invalid_hostname_characters))throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-:_]')}},r.ensureValidPort=function(C){if(C){var R=Number(C);if(!(s(R)&&R>0&&R<65536))throw new TypeError('Port "'+C+'" is not a valid port')}},r.noConflict=function(C){if(C){var R={URI:this.noConflict()};return i.URITemplate&&typeof i.URITemplate.noConflict=="function"&&(R.URITemplate=i.URITemplate.noConflict()),i.IPv6&&typeof i.IPv6.noConflict=="function"&&(R.IPv6=i.IPv6.noConflict()),i.SecondLevelDomains&&typeof i.SecondLevelDomains.noConflict=="function"&&(R.SecondLevelDomains=i.SecondLevelDomains.noConflict()),R}else i.URI===this&&(i.URI=o);return this},a.build=function(C){return C===!0?this._deferred_build=!0:(C===void 0||this._deferred_build)&&(this._string=r.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new r(this)},a.valueOf=a.toString=function(){return this.build(!1)._string};function L(C){return function(R,G){return R===void 0?this._parts[C]||"":(this._parts[C]=R||null,this.build(!G),this)}}function v(C,R){return function(G,P){return G===void 0?this._parts[C]||"":(G!==null&&(G=G+"",G.charAt(0)===R&&(G=G.substring(1))),this._parts[C]=G,this.build(!P),this)}}a.protocol=L("protocol"),a.username=L("username"),a.password=L("password"),a.hostname=L("hostname"),a.port=L("port"),a.query=v("query","?"),a.fragment=v("fragment","#"),a.search=function(C,R){var G=this.query(C,R);return typeof G=="string"&&G.length?"?"+G:G},a.hash=function(C,R){var G=this.fragment(C,R);return typeof G=="string"&&G.length?"#"+G:G},a.pathname=function(C,R){if(C===void 0||C===!0){var G=this._parts.path||(this._parts.hostname?"/":"");return C?(this._parts.urn?r.decodeUrnPath:r.decodePath)(G):G}else return this._parts.urn?this._parts.path=C?r.recodeUrnPath(C):"":this._parts.path=C?r.recodePath(C):"/",this.build(!R),this},a.path=a.pathname,a.href=function(C,R){var G;if(C===void 0)return this.toString();this._string="",this._parts=r._parts();var P=C instanceof r,Y=typeof C=="object"&&(C.hostname||C.path||C.pathname);if(C.nodeName){var O=r.getDomAttribute(C);C=C[O]||"",Y=!1}if(!P&&Y&&C.pathname!==void 0&&(C=C.toString()),typeof C=="string"||C instanceof String)this._parts=r.parse(String(C),this._parts);else if(P||Y){var k=P?C._parts:C;for(G in k)G!=="query"&&c.call(this._parts,G)&&(this._parts[G]=k[G]);k.query&&this.query(k.query,!1)}else throw new TypeError("invalid input");return this.build(!R),this},a.is=function(C){var R=!1,G=!1,P=!1,Y=!1,O=!1,k=!1,D=!1,w=!this._parts.urn;switch(this._parts.hostname&&(w=!1,G=r.ip4_expression.test(this._parts.hostname),P=r.ip6_expression.test(this._parts.hostname),R=G||P,Y=!R,O=Y&&n&&n.has(this._parts.hostname),k=Y&&r.idn_expression.test(this._parts.hostname),D=Y&&r.punycode_expression.test(this._parts.hostname)),C.toLowerCase()){case"relative":return w;case"absolute":return!w;case"domain":case"name":return Y;case"sld":return O;case"ip":return R;case"ip4":case"ipv4":case"inet4":return G;case"ip6":case"ipv6":case"inet6":return P;case"idn":return k;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return D}return null};var I=a.protocol,X=a.port,N=a.hostname;a.protocol=function(C,R){if(C&&(C=C.replace(/:(\/\/)?$/,""),!C.match(r.protocol_expression)))throw new TypeError('Protocol "'+C+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return I.call(this,C,R)},a.scheme=a.protocol,a.port=function(C,R){return this._parts.urn?C===void 0?"":this:(C!==void 0&&(C===0&&(C=null),C&&(C+="",C.charAt(0)===":"&&(C=C.substring(1)),r.ensureValidPort(C))),X.call(this,C,R))},a.hostname=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(C!==void 0){var G={preventInvalidHostname:this._parts.preventInvalidHostname},P=r.parseHost(C,G);if(P!=="/")throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-]');C=G.hostname,this._parts.preventInvalidHostname&&r.ensureValidHostname(C,this._parts.protocol)}return N.call(this,C,R)},a.origin=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(C===void 0){var G=this.protocol(),P=this.authority();return P?(G?G+"://":"")+this.authority():""}else{var Y=r(C);return this.protocol(Y.protocol()).authority(Y.authority()).build(!R),this}},a.host=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(C===void 0)return this._parts.hostname?r.buildHost(this._parts):"";var G=r.parseHost(C,this._parts);if(G!=="/")throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-]');return this.build(!R),this},a.authority=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(C===void 0)return this._parts.hostname?r.buildAuthority(this._parts):"";var G=r.parseAuthority(C,this._parts);if(G!=="/")throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-]');return this.build(!R),this},a.userinfo=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(C===void 0){var G=r.buildUserinfo(this._parts);return G&&G.substring(0,G.length-1)}else return C[C.length-1]!=="@"&&(C+="@"),r.parseUserinfo(C,this._parts),this.build(!R),this},a.resource=function(C,R){var G;return C===void 0?this.path()+this.search()+this.hash():(G=r.parse(C),this._parts.path=G.path,this._parts.query=G.query,this._parts.fragment=G.fragment,this.build(!R),this)},a.subdomain=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(C===void 0){if(!this._parts.hostname||this.is("IP"))return"";var G=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,G)||""}else{var P=this._parts.hostname.length-this.domain().length,Y=this._parts.hostname.substring(0,P),O=new RegExp("^"+d(Y));if(C&&C.charAt(C.length-1)!=="."&&(C+="."),C.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return C&&r.ensureValidHostname(C,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(O,C),this.build(!R),this}},a.domain=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(typeof C=="boolean"&&(R=C,C=void 0),C===void 0){if(!this._parts.hostname||this.is("IP"))return"";var G=this._parts.hostname.match(/\./g);if(G&&G.length<2)return this._parts.hostname;var P=this._parts.hostname.length-this.tld(R).length-1;return P=this._parts.hostname.lastIndexOf(".",P-1)+1,this._parts.hostname.substring(P)||""}else{if(!C)throw new TypeError("cannot set domain empty");if(C.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(r.ensureValidHostname(C,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=C;else{var Y=new RegExp(d(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(Y,C)}return this.build(!R),this}},a.tld=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(typeof C=="boolean"&&(R=C,C=void 0),C===void 0){if(!this._parts.hostname||this.is("IP"))return"";var G=this._parts.hostname.lastIndexOf("."),P=this._parts.hostname.substring(G+1);return R!==!0&&n&&n.list[P.toLowerCase()]&&n.get(this._parts.hostname)||P}else{var Y;if(C)if(C.match(/[^a-zA-Z0-9-]/))if(n&&n.is(C))Y=new RegExp(d(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(Y,C);else throw new TypeError('TLD "'+C+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");Y=new RegExp(d(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(Y,C)}else throw new TypeError("cannot set TLD empty");return this.build(!R),this}},a.directory=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(C===void 0||C===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var G=this._parts.path.length-this.filename().length-1,P=this._parts.path.substring(0,G)||(this._parts.hostname?"/":"");return C?r.decodePath(P):P}else{var Y=this._parts.path.length-this.filename().length,O=this._parts.path.substring(0,Y),k=new RegExp("^"+d(O));return this.is("relative")||(C||(C="/"),C.charAt(0)!=="/"&&(C="/"+C)),C&&C.charAt(C.length-1)!=="/"&&(C+="/"),C=r.recodePath(C),this._parts.path=this._parts.path.replace(k,C),this.build(!R),this}},a.filename=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(typeof C!="string"){if(!this._parts.path||this._parts.path==="/")return"";var G=this._parts.path.lastIndexOf("/"),P=this._parts.path.substring(G+1);return C?r.decodePathSegment(P):P}else{var Y=!1;C.charAt(0)==="/"&&(C=C.substring(1)),C.match(/\.?\//)&&(Y=!0);var O=new RegExp(d(this.filename())+"$");return C=r.recodePath(C),this._parts.path=this._parts.path.replace(O,C),Y?this.normalizePath(R):this.build(!R),this}},a.suffix=function(C,R){if(this._parts.urn)return C===void 0?"":this;if(C===void 0||C===!0){if(!this._parts.path||this._parts.path==="/")return"";var G=this.filename(),P=G.lastIndexOf("."),Y,O;return P===-1?"":(Y=G.substring(P+1),O=/^[a-z0-9%]+$/i.test(Y)?Y:"",C?r.decodePathSegment(O):O)}else{C.charAt(0)==="."&&(C=C.substring(1));var k=this.suffix(),D;if(k)C?D=new RegExp(d(k)+"$"):D=new RegExp(d("."+k)+"$");else{if(!C)return this;this._parts.path+="."+r.recodePath(C)}return D&&(C=r.recodePath(C),this._parts.path=this._parts.path.replace(D,C)),this.build(!R),this}},a.segment=function(C,R,G){var P=this._parts.urn?":":"/",Y=this.path(),O=Y.substring(0,1)==="/",k=Y.split(P);if(C!==void 0&&typeof C!="number"&&(G=R,R=C,C=void 0),C!==void 0&&typeof C!="number")throw new Error('Bad segment "'+C+'", must be 0-based integer');if(O&&k.shift(),C<0&&(C=Math.max(k.length+C,0)),R===void 0)return C===void 0?k:k[C];if(C===null||k[C]===void 0)if(h(R)){k=[];for(var D=0,w=R.length;D<w;D++)!R[D].length&&(!k.length||!k[k.length-1].length)||(k.length&&!k[k.length-1].length&&k.pop(),k.push(y(R[D])))}else(R||typeof R=="string")&&(R=y(R),k[k.length-1]===""?k[k.length-1]=R:k.push(R));else R?k[C]=y(R):k.splice(C,1);return O&&k.unshift(""),this.path(k.join(P),G)},a.segmentCoded=function(C,R,G){var P,Y,O;if(typeof C!="number"&&(G=R,R=C,C=void 0),R===void 0){if(P=this.segment(C,R,G),!h(P))P=P!==void 0?r.decode(P):void 0;else for(Y=0,O=P.length;Y<O;Y++)P[Y]=r.decode(P[Y]);return P}if(!h(R))R=typeof R=="string"||R instanceof String?r.encode(R):R;else for(Y=0,O=R.length;Y<O;Y++)R[Y]=r.encode(R[Y]);return this.segment(C,R,G)};var g=a.query;return a.query=function(C,R){if(C===!0)return r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof C=="function"){var G=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace),P=C.call(this,G);return this._parts.query=r.buildQuery(P||G,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!R),this}else return C!==void 0&&typeof C!="string"?(this._parts.query=r.buildQuery(C,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!R),this):g.call(this,C,R)},a.setQuery=function(C,R,G){var P=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof C=="string"||C instanceof String)P[C]=R!==void 0?R:null;else if(typeof C=="object")for(var Y in C)c.call(C,Y)&&(P[Y]=C[Y]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=r.buildQuery(P,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof C!="string"&&(G=R),this.build(!G),this},a.addQuery=function(C,R,G){var P=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.addQuery(P,C,R===void 0?null:R),this._parts.query=r.buildQuery(P,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof C!="string"&&(G=R),this.build(!G),this},a.removeQuery=function(C,R,G){var P=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.removeQuery(P,C,R),this._parts.query=r.buildQuery(P,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof C!="string"&&(G=R),this.build(!G),this},a.hasQuery=function(C,R,G){var P=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.hasQuery(P,C,R,G)},a.setSearch=a.setQuery,a.addSearch=a.addQuery,a.removeSearch=a.removeQuery,a.hasSearch=a.hasQuery,a.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},a.normalizeProtocol=function(C){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!C)),this},a.normalizeHostname=function(C){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!C)),this},a.normalizePort=function(C){return typeof this._parts.protocol=="string"&&this._parts.port===r.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!C)),this},a.normalizePath=function(C){var R=this._parts.path;if(!R)return this;if(this._parts.urn)return this._parts.path=r.recodeUrnPath(this._parts.path),this.build(!C),this;if(this._parts.path==="/")return this;R=r.recodePath(R);var G,P="",Y,O;for(R.charAt(0)!=="/"&&(G=!0,R="/"+R),(R.slice(-3)==="/.."||R.slice(-2)==="/.")&&(R+="/"),R=R.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),G&&(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 G&&this.is("relative")&&(R=P+R.substring(1)),this._parts.path=R,this.build(!C),this},a.normalizePathname=a.normalizePath,a.normalizeQuery=function(C){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(r.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!C)),this},a.normalizeFragment=function(C){return this._parts.fragment||(this._parts.fragment=null,this.build(!C)),this},a.normalizeSearch=a.normalizeQuery,a.normalizeHash=a.normalizeFragment,a.iso8859=function(){var C=r.encode,R=r.decode;r.encode=escape,r.decode=decodeURIComponent;try{this.normalize()}finally{r.encode=C,r.decode=R}return this},a.unicode=function(){var C=r.encode,R=r.decode;r.encode=S,r.decode=unescape;try{this.normalize()}finally{r.encode=C,r.decode=R}return this},a.readable=function(){var C=this.clone();C.username("").password("").normalize();var R="";if(C._parts.protocol&&(R+=C._parts.protocol+"://"),C._parts.hostname&&(C.is("punycode")&&e?(R+=e.toUnicode(C._parts.hostname),C._parts.port&&(R+=":"+C._parts.port)):R+=C.host()),C._parts.hostname&&C._parts.path&&C._parts.path.charAt(0)!=="/"&&(R+="/"),R+=C.path(!0),C._parts.query){for(var G="",P=0,Y=C._parts.query.split("&"),O=Y.length;P<O;P++){var k=(Y[P]||"").split("=");G+="&"+r.decodeQuery(k[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),k[1]!==void 0&&(G+="="+r.decodeQuery(k[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}R+="?"+G.substring(1)}return R+=r.decodeQuery(C.hash(),!0),R},a.absoluteTo=function(C){var R=this.clone(),G=["protocol","username","password","hostname","port"],P,Y,O;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(C instanceof r||(C=new r(C)),R._parts.protocol||(R._parts.protocol=C._parts.protocol,this._parts.hostname))return R;for(Y=0;O=G[Y];Y++)R._parts[O]=C._parts[O];return R._parts.path?(R._parts.path.substring(-2)===".."&&(R._parts.path+="/"),R.path().charAt(0)!=="/"&&(P=C.directory(),P=P||(C.path().indexOf("/")===0?"/":""),R._parts.path=(P?P+"/":"")+R._parts.path,R.normalizePath())):(R._parts.path=C._parts.path,R._parts.query||(R._parts.query=C._parts.query)),R.build(),R},a.relativeTo=function(C){var R=this.clone().normalize(),G,P,Y,O,k;if(R._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(C=new r(C).normalize(),G=R._parts,P=C._parts,O=R.path(),k=C.path(),O.charAt(0)!=="/")throw new Error("URI is already relative");if(k.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(G.protocol===P.protocol&&(G.protocol=null),G.username!==P.username||G.password!==P.password||G.protocol!==null||G.username!==null||G.password!==null)return R.build();if(G.hostname===P.hostname&&G.port===P.port)G.hostname=null,G.port=null;else return R.build();if(O===k)return G.path="",R.build();if(Y=r.commonPath(O,k),!Y)return R.build();var D=P.path.substring(Y.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return G.path=D+G.path.substring(Y.length)||"./",R.build()},a.equals=function(C){var R=this.clone(),G=new r(C),P={},Y={},O={},k,D,w;if(R.normalize(),G.normalize(),R.toString()===G.toString())return!0;if(k=R.query(),D=G.query(),R.query(""),G.query(""),R.toString()!==G.toString()||k.length!==D.length)return!1;P=r.parseQuery(k,this._parts.escapeQuerySpace),Y=r.parseQuery(D,this._parts.escapeQuerySpace);for(w in P)if(c.call(P,w)){if(h(P[w])){if(!f(P[w],Y[w]))return!1}else if(P[w]!==Y[w])return!1;O[w]=!0}for(w in Y)if(c.call(Y,w)&&!O[w])return!1;return!0},a.preventInvalidHostname=function(C){return this._parts.preventInvalidHostname=!!C,this},a.duplicateQueryParameters=function(C){return this._parts.duplicateQueryParameters=!!C,this},a.escapeQuerySpace=function(C){return this._parts.escapeQuerySpace=!!C,this},r})});var b0e=om((Q7n,p0e)=>{"use strict";var q7n=x(T());p0e.exports=_et;var nP=1e20;function _et(e,t){t||(t={});var n=t.cutoff==null?.25:t.cutoff,i=t.radius==null?8:t.radius,o=t.channel||0,r,s,a,c,d,u,h,p,b,f,y;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");r=t.width,s=t.height,c=e,t.stride?u=t.stride:u=Math.floor(e.length/r/s)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(p=e,h=p.getContext("2d"),r=p.width,s=p.height,b=h.getImageData(0,0,r,s),c=b.data,u=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(p=e.canvas,h=e,r=p.width,s=p.height,b=h.getImageData(0,0,r,s),c=b.data,u=4):window.ImageData&&e instanceof window.ImageData&&(b=e,r=e.width,s=e.height,c=b.data,u=4);if(a=Math.max(r,s),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(d=c,c=Array(r*s),f=0,y=Math.floor(d.length/u);f<y;f++)c[f]=d[f*u+o]/255;else if(u!==1)throw Error("Raw data can have only 1 value per pixel");var _=Array(r*s),S=Array(r*s),A=Array(a),Z=Array(a),V=Array(a+1),E=Array(a);for(f=0,y=r*s;f<y;f++){var L=c[f];_[f]=L===1?0:L===0?nP:Math.pow(Math.max(0,.5-L),2),S[f]=L===1?nP:L===0?0:Math.pow(Math.max(0,L-.5),2)}h0e(_,r,s,A,Z,E,V),h0e(S,r,s,A,Z,E,V);var v=window.Float32Array?new Float32Array(r*s):new Array(r*s);for(f=0,y=r*s;f<y;f++)v[f]=Math.min(Math.max(1-((_[f]-S[f])/i+n),0),1);return v}function h0e(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(f0e(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(f0e(i,o,r,s,t),a=0;a<t;a++)e[c*t+a]=Math.sqrt(o[a])}}function f0e(e,t,n,i,o){n[0]=0,i[0]=-nP,i[1]=+nP;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]=+nP}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 S0e=om((g6n,RD)=>{var y6n=x(T());function vet(){var e=0,t=1,n=2,i=3,o=4,r=5,s=6,a=7,c=8,d=9,u=10,h=11,p=12,b=13,f=14,y=15,_=16,S=17,A=0,Z=1,V=2,E=3,L=4;function v(g,C){return 55296<=g.charCodeAt(C)&&g.charCodeAt(C)<=56319&&56320<=g.charCodeAt(C+1)&&g.charCodeAt(C+1)<=57343}function I(g,C){C===void 0&&(C=0);var R=g.charCodeAt(C);if(55296<=R&&R<=56319&&C<g.length-1){var G=R,P=g.charCodeAt(C+1);return 56320<=P&&P<=57343?(G-55296)*1024+(P-56320)+65536:G}if(56320<=R&&R<=57343&&C>=1){var G=g.charCodeAt(C-1),P=R;return 55296<=G&&G<=56319?(G-55296)*1024+(P-56320)+65536:P}return R}function X(g,C,R){var G=[g].concat(C).concat([R]),P=G[G.length-2],Y=R,O=G.lastIndexOf(f);if(O>1&&G.slice(1,O).every(function(w){return w==i})&&[i,b,S].indexOf(g)==-1)return V;var k=G.lastIndexOf(o);if(k>0&&G.slice(1,k).every(function(w){return w==o})&&[p,o].indexOf(P)==-1)return G.filter(function(w){return w==o}).length%2==1?E:L;if(P==e&&Y==t)return A;if(P==n||P==e||P==t)return Y==f&&C.every(function(w){return w==i})?V:Z;if(Y==n||Y==e||Y==t)return Z;if(P==s&&(Y==s||Y==a||Y==d||Y==u))return A;if((P==d||P==a)&&(Y==a||Y==c))return A;if((P==u||P==c)&&Y==c)return A;if(Y==i||Y==y)return A;if(Y==r)return A;if(P==p)return A;var D=G.indexOf(i)!=-1?G.lastIndexOf(i)-1:G.length-2;return[b,S].indexOf(G[D])!=-1&&G.slice(D+1,-1).every(function(w){return w==i})&&Y==f||P==y&&[_,S].indexOf(Y)!=-1?A:C.indexOf(o)!=-1?V:P==o&&Y==o?A:Z}this.nextBreak=function(g,C){if(C===void 0&&(C=0),C<0)return 0;if(C>=g.length-1)return g.length;for(var R=N(I(g,C)),G=[],P=C+1;P<g.length;P++)if(!v(g,P-1)){var Y=N(I(g,P));if(X(R,G,Y))return P;G.push(Y)}return g.length},this.splitGraphemes=function(g){for(var C=[],R=0,G;(G=this.nextBreak(g,R))<g.length;)C.push(g.slice(R,G)),R=G;return R<g.length&&C.push(g.slice(R)),C},this.iterateGraphemes=function(g){var C=0,R={next:(function(){var G,P;return(P=this.nextBreak(g,C))<g.length?(G=g.slice(C,P),C=P,{value:G,done:!1}):C<g.length?(G=g.slice(C),C=g.length,{value:G,done:!1}):{value:void 0,done:!0}}).bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(R[Symbol.iterator]=function(){return R}),R},this.countGraphemes=function(g){for(var C=0,R=0,G;(G=this.nextBreak(g,R))<g.length;)R=G,C++;return R<g.length&&C++,C};function N(g){return 1536<=g&&g<=1541||g==1757||g==1807||g==2274||g==3406||g==69821||70082<=g&&g<=70083||g==72250||72326<=g&&g<=72329||g==73030?p:g==13?e:g==10?t:0<=g&&g<=9||11<=g&&g<=12||14<=g&&g<=31||127<=g&&g<=159||g==173||g==1564||g==6158||g==8203||8206<=g&&g<=8207||g==8232||g==8233||8234<=g&&g<=8238||8288<=g&&g<=8292||g==8293||8294<=g&&g<=8303||55296<=g&&g<=57343||g==65279||65520<=g&&g<=65528||65529<=g&&g<=65531||113824<=g&&g<=113827||119155<=g&&g<=119162||g==917504||g==917505||917506<=g&&g<=917535||917632<=g&&g<=917759||918e3<=g&&g<=921599?n:768<=g&&g<=879||1155<=g&&g<=1159||1160<=g&&g<=1161||1425<=g&&g<=1469||g==1471||1473<=g&&g<=1474||1476<=g&&g<=1477||g==1479||1552<=g&&g<=1562||1611<=g&&g<=1631||g==1648||1750<=g&&g<=1756||1759<=g&&g<=1764||1767<=g&&g<=1768||1770<=g&&g<=1773||g==1809||1840<=g&&g<=1866||1958<=g&&g<=1968||2027<=g&&g<=2035||2070<=g&&g<=2073||2075<=g&&g<=2083||2085<=g&&g<=2087||2089<=g&&g<=2093||2137<=g&&g<=2139||2260<=g&&g<=2273||2275<=g&&g<=2306||g==2362||g==2364||2369<=g&&g<=2376||g==2381||2385<=g&&g<=2391||2402<=g&&g<=2403||g==2433||g==2492||g==2494||2497<=g&&g<=2500||g==2509||g==2519||2530<=g&&g<=2531||2561<=g&&g<=2562||g==2620||2625<=g&&g<=2626||2631<=g&&g<=2632||2635<=g&&g<=2637||g==2641||2672<=g&&g<=2673||g==2677||2689<=g&&g<=2690||g==2748||2753<=g&&g<=2757||2759<=g&&g<=2760||g==2765||2786<=g&&g<=2787||2810<=g&&g<=2815||g==2817||g==2876||g==2878||g==2879||2881<=g&&g<=2884||g==2893||g==2902||g==2903||2914<=g&&g<=2915||g==2946||g==3006||g==3008||g==3021||g==3031||g==3072||3134<=g&&g<=3136||3142<=g&&g<=3144||3146<=g&&g<=3149||3157<=g&&g<=3158||3170<=g&&g<=3171||g==3201||g==3260||g==3263||g==3266||g==3270||3276<=g&&g<=3277||3285<=g&&g<=3286||3298<=g&&g<=3299||3328<=g&&g<=3329||3387<=g&&g<=3388||g==3390||3393<=g&&g<=3396||g==3405||g==3415||3426<=g&&g<=3427||g==3530||g==3535||3538<=g&&g<=3540||g==3542||g==3551||g==3633||3636<=g&&g<=3642||3655<=g&&g<=3662||g==3761||3764<=g&&g<=3769||3771<=g&&g<=3772||3784<=g&&g<=3789||3864<=g&&g<=3865||g==3893||g==3895||g==3897||3953<=g&&g<=3966||3968<=g&&g<=3972||3974<=g&&g<=3975||3981<=g&&g<=3991||3993<=g&&g<=4028||g==4038||4141<=g&&g<=4144||4146<=g&&g<=4151||4153<=g&&g<=4154||4157<=g&&g<=4158||4184<=g&&g<=4185||4190<=g&&g<=4192||4209<=g&&g<=4212||g==4226||4229<=g&&g<=4230||g==4237||g==4253||4957<=g&&g<=4959||5906<=g&&g<=5908||5938<=g&&g<=5940||5970<=g&&g<=5971||6002<=g&&g<=6003||6068<=g&&g<=6069||6071<=g&&g<=6077||g==6086||6089<=g&&g<=6099||g==6109||6155<=g&&g<=6157||6277<=g&&g<=6278||g==6313||6432<=g&&g<=6434||6439<=g&&g<=6440||g==6450||6457<=g&&g<=6459||6679<=g&&g<=6680||g==6683||g==6742||6744<=g&&g<=6750||g==6752||g==6754||6757<=g&&g<=6764||6771<=g&&g<=6780||g==6783||6832<=g&&g<=6845||g==6846||6912<=g&&g<=6915||g==6964||6966<=g&&g<=6970||g==6972||g==6978||7019<=g&&g<=7027||7040<=g&&g<=7041||7074<=g&&g<=7077||7080<=g&&g<=7081||7083<=g&&g<=7085||g==7142||7144<=g&&g<=7145||g==7149||7151<=g&&g<=7153||7212<=g&&g<=7219||7222<=g&&g<=7223||7376<=g&&g<=7378||7380<=g&&g<=7392||7394<=g&&g<=7400||g==7405||g==7412||7416<=g&&g<=7417||7616<=g&&g<=7673||7675<=g&&g<=7679||g==8204||8400<=g&&g<=8412||8413<=g&&g<=8416||g==8417||8418<=g&&g<=8420||8421<=g&&g<=8432||11503<=g&&g<=11505||g==11647||11744<=g&&g<=11775||12330<=g&&g<=12333||12334<=g&&g<=12335||12441<=g&&g<=12442||g==42607||42608<=g&&g<=42610||42612<=g&&g<=42621||42654<=g&&g<=42655||42736<=g&&g<=42737||g==43010||g==43014||g==43019||43045<=g&&g<=43046||43204<=g&&g<=43205||43232<=g&&g<=43249||43302<=g&&g<=43309||43335<=g&&g<=43345||43392<=g&&g<=43394||g==43443||43446<=g&&g<=43449||g==43452||g==43493||43561<=g&&g<=43566||43569<=g&&g<=43570||43573<=g&&g<=43574||g==43587||g==43596||g==43644||g==43696||43698<=g&&g<=43700||43703<=g&&g<=43704||43710<=g&&g<=43711||g==43713||43756<=g&&g<=43757||g==43766||g==44005||g==44008||g==44013||g==64286||65024<=g&&g<=65039||65056<=g&&g<=65071||65438<=g&&g<=65439||g==66045||g==66272||66422<=g&&g<=66426||68097<=g&&g<=68099||68101<=g&&g<=68102||68108<=g&&g<=68111||68152<=g&&g<=68154||g==68159||68325<=g&&g<=68326||g==69633||69688<=g&&g<=69702||69759<=g&&g<=69761||69811<=g&&g<=69814||69817<=g&&g<=69818||69888<=g&&g<=69890||69927<=g&&g<=69931||69933<=g&&g<=69940||g==70003||70016<=g&&g<=70017||70070<=g&&g<=70078||70090<=g&&g<=70092||70191<=g&&g<=70193||g==70196||70198<=g&&g<=70199||g==70206||g==70367||70371<=g&&g<=70378||70400<=g&&g<=70401||g==70460||g==70462||g==70464||g==70487||70502<=g&&g<=70508||70512<=g&&g<=70516||70712<=g&&g<=70719||70722<=g&&g<=70724||g==70726||g==70832||70835<=g&&g<=70840||g==70842||g==70845||70847<=g&&g<=70848||70850<=g&&g<=70851||g==71087||71090<=g&&g<=71093||71100<=g&&g<=71101||71103<=g&&g<=71104||71132<=g&&g<=71133||71219<=g&&g<=71226||g==71229||71231<=g&&g<=71232||g==71339||g==71341||71344<=g&&g<=71349||g==71351||71453<=g&&g<=71455||71458<=g&&g<=71461||71463<=g&&g<=71467||72193<=g&&g<=72198||72201<=g&&g<=72202||72243<=g&&g<=72248||72251<=g&&g<=72254||g==72263||72273<=g&&g<=72278||72281<=g&&g<=72283||72330<=g&&g<=72342||72344<=g&&g<=72345||72752<=g&&g<=72758||72760<=g&&g<=72765||g==72767||72850<=g&&g<=72871||72874<=g&&g<=72880||72882<=g&&g<=72883||72885<=g&&g<=72886||73009<=g&&g<=73014||g==73018||73020<=g&&g<=73021||73023<=g&&g<=73029||g==73031||92912<=g&&g<=92916||92976<=g&&g<=92982||94095<=g&&g<=94098||113821<=g&&g<=113822||g==119141||119143<=g&&g<=119145||119150<=g&&g<=119154||119163<=g&&g<=119170||119173<=g&&g<=119179||119210<=g&&g<=119213||119362<=g&&g<=119364||121344<=g&&g<=121398||121403<=g&&g<=121452||g==121461||g==121476||121499<=g&&g<=121503||121505<=g&&g<=121519||122880<=g&&g<=122886||122888<=g&&g<=122904||122907<=g&&g<=122913||122915<=g&&g<=122916||122918<=g&&g<=122922||125136<=g&&g<=125142||125252<=g&&g<=125258||917536<=g&&g<=917631||917760<=g&&g<=917999?i:127462<=g&&g<=127487?o:g==2307||g==2363||2366<=g&&g<=2368||2377<=g&&g<=2380||2382<=g&&g<=2383||2434<=g&&g<=2435||2495<=g&&g<=2496||2503<=g&&g<=2504||2507<=g&&g<=2508||g==2563||2622<=g&&g<=2624||g==2691||2750<=g&&g<=2752||g==2761||2763<=g&&g<=2764||2818<=g&&g<=2819||g==2880||2887<=g&&g<=2888||2891<=g&&g<=2892||g==3007||3009<=g&&g<=3010||3014<=g&&g<=3016||3018<=g&&g<=3020||3073<=g&&g<=3075||3137<=g&&g<=3140||3202<=g&&g<=3203||g==3262||3264<=g&&g<=3265||3267<=g&&g<=3268||3271<=g&&g<=3272||3274<=g&&g<=3275||3330<=g&&g<=3331||3391<=g&&g<=3392||3398<=g&&g<=3400||3402<=g&&g<=3404||3458<=g&&g<=3459||3536<=g&&g<=3537||3544<=g&&g<=3550||3570<=g&&g<=3571||g==3635||g==3763||3902<=g&&g<=3903||g==3967||g==4145||4155<=g&&g<=4156||4182<=g&&g<=4183||g==4228||g==6070||6078<=g&&g<=6085||6087<=g&&g<=6088||6435<=g&&g<=6438||6441<=g&&g<=6443||6448<=g&&g<=6449||6451<=g&&g<=6456||6681<=g&&g<=6682||g==6741||g==6743||6765<=g&&g<=6770||g==6916||g==6965||g==6971||6973<=g&&g<=6977||6979<=g&&g<=6980||g==7042||g==7073||7078<=g&&g<=7079||g==7082||g==7143||7146<=g&&g<=7148||g==7150||7154<=g&&g<=7155||7204<=g&&g<=7211||7220<=g&&g<=7221||g==7393||7410<=g&&g<=7411||g==7415||43043<=g&&g<=43044||g==43047||43136<=g&&g<=43137||43188<=g&&g<=43203||43346<=g&&g<=43347||g==43395||43444<=g&&g<=43445||43450<=g&&g<=43451||43453<=g&&g<=43456||43567<=g&&g<=43568||43571<=g&&g<=43572||g==43597||g==43755||43758<=g&&g<=43759||g==43765||44003<=g&&g<=44004||44006<=g&&g<=44007||44009<=g&&g<=44010||g==44012||g==69632||g==69634||g==69762||69808<=g&&g<=69810||69815<=g&&g<=69816||g==69932||g==70018||70067<=g&&g<=70069||70079<=g&&g<=70080||70188<=g&&g<=70190||70194<=g&&g<=70195||g==70197||70368<=g&&g<=70370||70402<=g&&g<=70403||g==70463||70465<=g&&g<=70468||70471<=g&&g<=70472||70475<=g&&g<=70477||70498<=g&&g<=70499||70709<=g&&g<=70711||70720<=g&&g<=70721||g==70725||70833<=g&&g<=70834||g==70841||70843<=g&&g<=70844||g==70846||g==70849||71088<=g&&g<=71089||71096<=g&&g<=71099||g==71102||71216<=g&&g<=71218||71227<=g&&g<=71228||g==71230||g==71340||71342<=g&&g<=71343||g==71350||71456<=g&&g<=71457||g==71462||72199<=g&&g<=72200||g==72249||72279<=g&&g<=72280||g==72343||g==72751||g==72766||g==72873||g==72881||g==72884||94033<=g&&g<=94078||g==119142||g==119149?r:4352<=g&&g<=4447||43360<=g&&g<=43388?s:4448<=g&&g<=4519||55216<=g&&g<=55238?a:4520<=g&&g<=4607||55243<=g&&g<=55291?c:g==44032||g==44060||g==44088||g==44116||g==44144||g==44172||g==44200||g==44228||g==44256||g==44284||g==44312||g==44340||g==44368||g==44396||g==44424||g==44452||g==44480||g==44508||g==44536||g==44564||g==44592||g==44620||g==44648||g==44676||g==44704||g==44732||g==44760||g==44788||g==44816||g==44844||g==44872||g==44900||g==44928||g==44956||g==44984||g==45012||g==45040||g==45068||g==45096||g==45124||g==45152||g==45180||g==45208||g==45236||g==45264||g==45292||g==45320||g==45348||g==45376||g==45404||g==45432||g==45460||g==45488||g==45516||g==45544||g==45572||g==45600||g==45628||g==45656||g==45684||g==45712||g==45740||g==45768||g==45796||g==45824||g==45852||g==45880||g==45908||g==45936||g==45964||g==45992||g==46020||g==46048||g==46076||g==46104||g==46132||g==46160||g==46188||g==46216||g==46244||g==46272||g==46300||g==46328||g==46356||g==46384||g==46412||g==46440||g==46468||g==46496||g==46524||g==46552||g==46580||g==46608||g==46636||g==46664||g==46692||g==46720||g==46748||g==46776||g==46804||g==46832||g==46860||g==46888||g==46916||g==46944||g==46972||g==47e3||g==47028||g==47056||g==47084||g==47112||g==47140||g==47168||g==47196||g==47224||g==47252||g==47280||g==47308||g==47336||g==47364||g==47392||g==47420||g==47448||g==47476||g==47504||g==47532||g==47560||g==47588||g==47616||g==47644||g==47672||g==47700||g==47728||g==47756||g==47784||g==47812||g==47840||g==47868||g==47896||g==47924||g==47952||g==47980||g==48008||g==48036||g==48064||g==48092||g==48120||g==48148||g==48176||g==48204||g==48232||g==48260||g==48288||g==48316||g==48344||g==48372||g==48400||g==48428||g==48456||g==48484||g==48512||g==48540||g==48568||g==48596||g==48624||g==48652||g==48680||g==48708||g==48736||g==48764||g==48792||g==48820||g==48848||g==48876||g==48904||g==48932||g==48960||g==48988||g==49016||g==49044||g==49072||g==49100||g==49128||g==49156||g==49184||g==49212||g==49240||g==49268||g==49296||g==49324||g==49352||g==49380||g==49408||g==49436||g==49464||g==49492||g==49520||g==49548||g==49576||g==49604||g==49632||g==49660||g==49688||g==49716||g==49744||g==49772||g==49800||g==49828||g==49856||g==49884||g==49912||g==49940||g==49968||g==49996||g==50024||g==50052||g==50080||g==50108||g==50136||g==50164||g==50192||g==50220||g==50248||g==50276||g==50304||g==50332||g==50360||g==50388||g==50416||g==50444||g==50472||g==50500||g==50528||g==50556||g==50584||g==50612||g==50640||g==50668||g==50696||g==50724||g==50752||g==50780||g==50808||g==50836||g==50864||g==50892||g==50920||g==50948||g==50976||g==51004||g==51032||g==51060||g==51088||g==51116||g==51144||g==51172||g==51200||g==51228||g==51256||g==51284||g==51312||g==51340||g==51368||g==51396||g==51424||g==51452||g==51480||g==51508||g==51536||g==51564||g==51592||g==51620||g==51648||g==51676||g==51704||g==51732||g==51760||g==51788||g==51816||g==51844||g==51872||g==51900||g==51928||g==51956||g==51984||g==52012||g==52040||g==52068||g==52096||g==52124||g==52152||g==52180||g==52208||g==52236||g==52264||g==52292||g==52320||g==52348||g==52376||g==52404||g==52432||g==52460||g==52488||g==52516||g==52544||g==52572||g==52600||g==52628||g==52656||g==52684||g==52712||g==52740||g==52768||g==52796||g==52824||g==52852||g==52880||g==52908||g==52936||g==52964||g==52992||g==53020||g==53048||g==53076||g==53104||g==53132||g==53160||g==53188||g==53216||g==53244||g==53272||g==53300||g==53328||g==53356||g==53384||g==53412||g==53440||g==53468||g==53496||g==53524||g==53552||g==53580||g==53608||g==53636||g==53664||g==53692||g==53720||g==53748||g==53776||g==53804||g==53832||g==53860||g==53888||g==53916||g==53944||g==53972||g==54e3||g==54028||g==54056||g==54084||g==54112||g==54140||g==54168||g==54196||g==54224||g==54252||g==54280||g==54308||g==54336||g==54364||g==54392||g==54420||g==54448||g==54476||g==54504||g==54532||g==54560||g==54588||g==54616||g==54644||g==54672||g==54700||g==54728||g==54756||g==54784||g==54812||g==54840||g==54868||g==54896||g==54924||g==54952||g==54980||g==55008||g==55036||g==55064||g==55092||g==55120||g==55148||g==55176?d:44033<=g&&g<=44059||44061<=g&&g<=44087||44089<=g&&g<=44115||44117<=g&&g<=44143||44145<=g&&g<=44171||44173<=g&&g<=44199||44201<=g&&g<=44227||44229<=g&&g<=44255||44257<=g&&g<=44283||44285<=g&&g<=44311||44313<=g&&g<=44339||44341<=g&&g<=44367||44369<=g&&g<=44395||44397<=g&&g<=44423||44425<=g&&g<=44451||44453<=g&&g<=44479||44481<=g&&g<=44507||44509<=g&&g<=44535||44537<=g&&g<=44563||44565<=g&&g<=44591||44593<=g&&g<=44619||44621<=g&&g<=44647||44649<=g&&g<=44675||44677<=g&&g<=44703||44705<=g&&g<=44731||44733<=g&&g<=44759||44761<=g&&g<=44787||44789<=g&&g<=44815||44817<=g&&g<=44843||44845<=g&&g<=44871||44873<=g&&g<=44899||44901<=g&&g<=44927||44929<=g&&g<=44955||44957<=g&&g<=44983||44985<=g&&g<=45011||45013<=g&&g<=45039||45041<=g&&g<=45067||45069<=g&&g<=45095||45097<=g&&g<=45123||45125<=g&&g<=45151||45153<=g&&g<=45179||45181<=g&&g<=45207||45209<=g&&g<=45235||45237<=g&&g<=45263||45265<=g&&g<=45291||45293<=g&&g<=45319||45321<=g&&g<=45347||45349<=g&&g<=45375||45377<=g&&g<=45403||45405<=g&&g<=45431||45433<=g&&g<=45459||45461<=g&&g<=45487||45489<=g&&g<=45515||45517<=g&&g<=45543||45545<=g&&g<=45571||45573<=g&&g<=45599||45601<=g&&g<=45627||45629<=g&&g<=45655||45657<=g&&g<=45683||45685<=g&&g<=45711||45713<=g&&g<=45739||45741<=g&&g<=45767||45769<=g&&g<=45795||45797<=g&&g<=45823||45825<=g&&g<=45851||45853<=g&&g<=45879||45881<=g&&g<=45907||45909<=g&&g<=45935||45937<=g&&g<=45963||45965<=g&&g<=45991||45993<=g&&g<=46019||46021<=g&&g<=46047||46049<=g&&g<=46075||46077<=g&&g<=46103||46105<=g&&g<=46131||46133<=g&&g<=46159||46161<=g&&g<=46187||46189<=g&&g<=46215||46217<=g&&g<=46243||46245<=g&&g<=46271||46273<=g&&g<=46299||46301<=g&&g<=46327||46329<=g&&g<=46355||46357<=g&&g<=46383||46385<=g&&g<=46411||46413<=g&&g<=46439||46441<=g&&g<=46467||46469<=g&&g<=46495||46497<=g&&g<=46523||46525<=g&&g<=46551||46553<=g&&g<=46579||46581<=g&&g<=46607||46609<=g&&g<=46635||46637<=g&&g<=46663||46665<=g&&g<=46691||46693<=g&&g<=46719||46721<=g&&g<=46747||46749<=g&&g<=46775||46777<=g&&g<=46803||46805<=g&&g<=46831||46833<=g&&g<=46859||46861<=g&&g<=46887||46889<=g&&g<=46915||46917<=g&&g<=46943||46945<=g&&g<=46971||46973<=g&&g<=46999||47001<=g&&g<=47027||47029<=g&&g<=47055||47057<=g&&g<=47083||47085<=g&&g<=47111||47113<=g&&g<=47139||47141<=g&&g<=47167||47169<=g&&g<=47195||47197<=g&&g<=47223||47225<=g&&g<=47251||47253<=g&&g<=47279||47281<=g&&g<=47307||47309<=g&&g<=47335||47337<=g&&g<=47363||47365<=g&&g<=47391||47393<=g&&g<=47419||47421<=g&&g<=47447||47449<=g&&g<=47475||47477<=g&&g<=47503||47505<=g&&g<=47531||47533<=g&&g<=47559||47561<=g&&g<=47587||47589<=g&&g<=47615||47617<=g&&g<=47643||47645<=g&&g<=47671||47673<=g&&g<=47699||47701<=g&&g<=47727||47729<=g&&g<=47755||47757<=g&&g<=47783||47785<=g&&g<=47811||47813<=g&&g<=47839||47841<=g&&g<=47867||47869<=g&&g<=47895||47897<=g&&g<=47923||47925<=g&&g<=47951||47953<=g&&g<=47979||47981<=g&&g<=48007||48009<=g&&g<=48035||48037<=g&&g<=48063||48065<=g&&g<=48091||48093<=g&&g<=48119||48121<=g&&g<=48147||48149<=g&&g<=48175||48177<=g&&g<=48203||48205<=g&&g<=48231||48233<=g&&g<=48259||48261<=g&&g<=48287||48289<=g&&g<=48315||48317<=g&&g<=48343||48345<=g&&g<=48371||48373<=g&&g<=48399||48401<=g&&g<=48427||48429<=g&&g<=48455||48457<=g&&g<=48483||48485<=g&&g<=48511||48513<=g&&g<=48539||48541<=g&&g<=48567||48569<=g&&g<=48595||48597<=g&&g<=48623||48625<=g&&g<=48651||48653<=g&&g<=48679||48681<=g&&g<=48707||48709<=g&&g<=48735||48737<=g&&g<=48763||48765<=g&&g<=48791||48793<=g&&g<=48819||48821<=g&&g<=48847||48849<=g&&g<=48875||48877<=g&&g<=48903||48905<=g&&g<=48931||48933<=g&&g<=48959||48961<=g&&g<=48987||48989<=g&&g<=49015||49017<=g&&g<=49043||49045<=g&&g<=49071||49073<=g&&g<=49099||49101<=g&&g<=49127||49129<=g&&g<=49155||49157<=g&&g<=49183||49185<=g&&g<=49211||49213<=g&&g<=49239||49241<=g&&g<=49267||49269<=g&&g<=49295||49297<=g&&g<=49323||49325<=g&&g<=49351||49353<=g&&g<=49379||49381<=g&&g<=49407||49409<=g&&g<=49435||49437<=g&&g<=49463||49465<=g&&g<=49491||49493<=g&&g<=49519||49521<=g&&g<=49547||49549<=g&&g<=49575||49577<=g&&g<=49603||49605<=g&&g<=49631||49633<=g&&g<=49659||49661<=g&&g<=49687||49689<=g&&g<=49715||49717<=g&&g<=49743||49745<=g&&g<=49771||49773<=g&&g<=49799||49801<=g&&g<=49827||49829<=g&&g<=49855||49857<=g&&g<=49883||49885<=g&&g<=49911||49913<=g&&g<=49939||49941<=g&&g<=49967||49969<=g&&g<=49995||49997<=g&&g<=50023||50025<=g&&g<=50051||50053<=g&&g<=50079||50081<=g&&g<=50107||50109<=g&&g<=50135||50137<=g&&g<=50163||50165<=g&&g<=50191||50193<=g&&g<=50219||50221<=g&&g<=50247||50249<=g&&g<=50275||50277<=g&&g<=50303||50305<=g&&g<=50331||50333<=g&&g<=50359||50361<=g&&g<=50387||50389<=g&&g<=50415||50417<=g&&g<=50443||50445<=g&&g<=50471||50473<=g&&g<=50499||50501<=g&&g<=50527||50529<=g&&g<=50555||50557<=g&&g<=50583||50585<=g&&g<=50611||50613<=g&&g<=50639||50641<=g&&g<=50667||50669<=g&&g<=50695||50697<=g&&g<=50723||50725<=g&&g<=50751||50753<=g&&g<=50779||50781<=g&&g<=50807||50809<=g&&g<=50835||50837<=g&&g<=50863||50865<=g&&g<=50891||50893<=g&&g<=50919||50921<=g&&g<=50947||50949<=g&&g<=50975||50977<=g&&g<=51003||51005<=g&&g<=51031||51033<=g&&g<=51059||51061<=g&&g<=51087||51089<=g&&g<=51115||51117<=g&&g<=51143||51145<=g&&g<=51171||51173<=g&&g<=51199||51201<=g&&g<=51227||51229<=g&&g<=51255||51257<=g&&g<=51283||51285<=g&&g<=51311||51313<=g&&g<=51339||51341<=g&&g<=51367||51369<=g&&g<=51395||51397<=g&&g<=51423||51425<=g&&g<=51451||51453<=g&&g<=51479||51481<=g&&g<=51507||51509<=g&&g<=51535||51537<=g&&g<=51563||51565<=g&&g<=51591||51593<=g&&g<=51619||51621<=g&&g<=51647||51649<=g&&g<=51675||51677<=g&&g<=51703||51705<=g&&g<=51731||51733<=g&&g<=51759||51761<=g&&g<=51787||51789<=g&&g<=51815||51817<=g&&g<=51843||51845<=g&&g<=51871||51873<=g&&g<=51899||51901<=g&&g<=51927||51929<=g&&g<=51955||51957<=g&&g<=51983||51985<=g&&g<=52011||52013<=g&&g<=52039||52041<=g&&g<=52067||52069<=g&&g<=52095||52097<=g&&g<=52123||52125<=g&&g<=52151||52153<=g&&g<=52179||52181<=g&&g<=52207||52209<=g&&g<=52235||52237<=g&&g<=52263||52265<=g&&g<=52291||52293<=g&&g<=52319||52321<=g&&g<=52347||52349<=g&&g<=52375||52377<=g&&g<=52403||52405<=g&&g<=52431||52433<=g&&g<=52459||52461<=g&&g<=52487||52489<=g&&g<=52515||52517<=g&&g<=52543||52545<=g&&g<=52571||52573<=g&&g<=52599||52601<=g&&g<=52627||52629<=g&&g<=52655||52657<=g&&g<=52683||52685<=g&&g<=52711||52713<=g&&g<=52739||52741<=g&&g<=52767||52769<=g&&g<=52795||52797<=g&&g<=52823||52825<=g&&g<=52851||52853<=g&&g<=52879||52881<=g&&g<=52907||52909<=g&&g<=52935||52937<=g&&g<=52963||52965<=g&&g<=52991||52993<=g&&g<=53019||53021<=g&&g<=53047||53049<=g&&g<=53075||53077<=g&&g<=53103||53105<=g&&g<=53131||53133<=g&&g<=53159||53161<=g&&g<=53187||53189<=g&&g<=53215||53217<=g&&g<=53243||53245<=g&&g<=53271||53273<=g&&g<=53299||53301<=g&&g<=53327||53329<=g&&g<=53355||53357<=g&&g<=53383||53385<=g&&g<=53411||53413<=g&&g<=53439||53441<=g&&g<=53467||53469<=g&&g<=53495||53497<=g&&g<=53523||53525<=g&&g<=53551||53553<=g&&g<=53579||53581<=g&&g<=53607||53609<=g&&g<=53635||53637<=g&&g<=53663||53665<=g&&g<=53691||53693<=g&&g<=53719||53721<=g&&g<=53747||53749<=g&&g<=53775||53777<=g&&g<=53803||53805<=g&&g<=53831||53833<=g&&g<=53859||53861<=g&&g<=53887||53889<=g&&g<=53915||53917<=g&&g<=53943||53945<=g&&g<=53971||53973<=g&&g<=53999||54001<=g&&g<=54027||54029<=g&&g<=54055||54057<=g&&g<=54083||54085<=g&&g<=54111||54113<=g&&g<=54139||54141<=g&&g<=54167||54169<=g&&g<=54195||54197<=g&&g<=54223||54225<=g&&g<=54251||54253<=g&&g<=54279||54281<=g&&g<=54307||54309<=g&&g<=54335||54337<=g&&g<=54363||54365<=g&&g<=54391||54393<=g&&g<=54419||54421<=g&&g<=54447||54449<=g&&g<=54475||54477<=g&&g<=54503||54505<=g&&g<=54531||54533<=g&&g<=54559||54561<=g&&g<=54587||54589<=g&&g<=54615||54617<=g&&g<=54643||54645<=g&&g<=54671||54673<=g&&g<=54699||54701<=g&&g<=54727||54729<=g&&g<=54755||54757<=g&&g<=54783||54785<=g&&g<=54811||54813<=g&&g<=54839||54841<=g&&g<=54867||54869<=g&&g<=54895||54897<=g&&g<=54923||54925<=g&&g<=54951||54953<=g&&g<=54979||54981<=g&&g<=55007||55009<=g&&g<=55035||55037<=g&&g<=55063||55065<=g&&g<=55091||55093<=g&&g<=55119||55121<=g&&g<=55147||55149<=g&&g<=55175||55177<=g&&g<=55203?u:g==9757||g==9977||9994<=g&&g<=9997||g==127877||127938<=g&&g<=127940||g==127943||127946<=g&&g<=127948||128066<=g&&g<=128067||128070<=g&&g<=128080||g==128110||128112<=g&&g<=128120||g==128124||128129<=g&&g<=128131||128133<=g&&g<=128135||g==128170||128372<=g&&g<=128373||g==128378||g==128400||128405<=g&&g<=128406||128581<=g&&g<=128583||128587<=g&&g<=128591||g==128675||128692<=g&&g<=128694||g==128704||g==128716||129304<=g&&g<=129308||129310<=g&&g<=129311||g==129318||129328<=g&&g<=129337||129341<=g&&g<=129342||129489<=g&&g<=129501?b:127995<=g&&g<=127999?f:g==8205?y:g==9792||g==9794||9877<=g&&g<=9878||g==9992||g==10084||g==127752||g==127806||g==127859||g==127891||g==127908||g==127912||g==127979||g==127981||g==128139||128187<=g&&g<=128188||g==128295||g==128300||g==128488||g==128640||g==128658?_:128102<=g&&g<=128105?S:h}return this}typeof RD<"u"&&RD.exports&&(RD.exports=vet)});var Bte=om((pgo,E9)=>{var bgo=x(T());/*!
* protobuf.js v8.0.3 (c) 2016, daniel wirtz
* compiled mon, 27 apr 2026 23:36:39 utc
* licensed under the bsd-3-clause license
* see: https://github.com/dcodeio/protobuf.js for details
*/(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 E9=="object"&&E9&&E9.exports&&(E9.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}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")},h=function(){return o.Buffer?function(S){return(d.create=function(Z){return o.Buffer.isBuffer(Z)?new r(Z):u(Z)})(S)}:u};d.create=h(),d.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,d.prototype.uint32=(function(){var _=4294967295;return function(){if(_=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(_=(_|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(_=(_|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(_=(_|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(_=(_|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return _;if((this.pos+=5)>this.len)throw this.pos=this.len,c(this,10);return _}})(),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(){return this.uint32()!==0};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,_);if(this.pos+=_,Array.isArray(this.buf))return this.buf.slice(S,A);if(S===A){var Z=o.Buffer;return Z?Z.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,S,A)},d.prototype.string=function(){var _=this.bytes();return a.read(_,0,_.length)},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.prototype.skipType=function(y,_){if(_===e&&(_=0),_>d.recursionLimit)throw Error("maximum nesting depth exceeded");switch(y){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(y=this.uint32()&7)!==4;)this.skipType(y,_+1);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=h(),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.string=function(){var c=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+c,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+c,this.len))},s._configure()},{13:13,2:2}],4:[function(t,n,i){"use strict";n.exports={}},{}],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,h){if(!u)throw TypeError("request must be specified");var p=this;if(!h)return o.asPromise(s,p,a,c,d,u);if(!p.rpcImpl)return setTimeout(function(){h(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),h(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),h(_)}return p.emit("data",y,a),h(null,y)})}catch(b){return p.emit("error",b,a),setTimeout(function(){h(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(u){var h=u.length;if(!h)return 0;for(var p=0;--h%4>1&&u.charAt(h)==="=";)++p;return Math.ceil(u.length*3)/4-p};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++;o.encode=function(u,h,p){for(var b=null,f=[],y=0,_=0,S;h<p;){var A=u[h++];switch(_){case 0:f[y++]=r[A>>2],S=(A&3)<<4,_=1;break;case 1:f[y++]=r[S|A>>4],S=(A&15)<<2,_=2;break;case 2:f[y++]=r[S|A>>6],f[y++]=r[A&63],_=0;break}y>8191&&((b||(b=[])).push(String.fromCharCode.apply(String,f)),y=0)}return _&&(f[y++]=r[S],f[y++]=61,_===1&&(f[y++]=61)),b?(y&&b.push(String.fromCharCode.apply(String,f.slice(0,y))),b.join("")):String.fromCharCode.apply(String,f.slice(0,y))};var c="invalid encoding";o.decode=function(u,h,p){for(var b=p,f=0,y,_=0;_<u.length;){var S=u.charCodeAt(_++);if(S===61&&f>1)break;if((S=s[S])===e)throw Error(c);switch(f){case 0:y=S,f=1;break;case 1:h[p++]=y<<2|(S&48)>>4,y=S,f=2;break;case 2:h[p++]=(y&15)<<4|(S&60)>>2,y=S,f=3;break;case 3:h[p++]=(y&3)<<6|S,f=0;break}}if(f===1)throw Error(c);return p-b},o.test=function(u){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(u)}},{}],9:[function(t,n,i){"use strict";n.exports=o;function o(){this._listeners={}}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={};else if(a===e)this._listeners[s]=[];else for(var c=this._listeners[s],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]),h=new Uint8Array(u.buffer),p=h[3]===128;function b(S,A,Z){u[0]=S,A[Z]=h[0],A[Z+1]=h[1],A[Z+2]=h[2],A[Z+3]=h[3]}function f(S,A,Z){u[0]=S,A[Z]=h[3],A[Z+1]=h[2],A[Z+2]=h[1],A[Z+3]=h[0]}d.writeFloatLE=p?b:f,d.writeFloatBE=p?f:b;function y(S,A){return h[0]=S[A],h[1]=S[A+1],h[2]=S[A+2],h[3]=S[A+3],u[0]}function _(S,A){return h[3]=S[A],h[2]=S[A+1],h[1]=S[A+2],h[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 h(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=h.bind(null,a),d.readFloatBE=h.bind(null,c)})(),typeof Float64Array<"u"?(function(){var u=new Float64Array([-0]),h=new Uint8Array(u.buffer),p=h[7]===128;function b(S,A,Z){u[0]=S,A[Z]=h[0],A[Z+1]=h[1],A[Z+2]=h[2],A[Z+3]=h[3],A[Z+4]=h[4],A[Z+5]=h[5],A[Z+6]=h[6],A[Z+7]=h[7]}function f(S,A,Z){u[0]=S,A[Z]=h[7],A[Z+1]=h[6],A[Z+2]=h[5],A[Z+3]=h[4],A[Z+4]=h[3],A[Z+5]=h[2],A[Z+6]=h[1],A[Z+7]=h[0]}d.writeDoubleLE=p?b:f,d.writeDoubleBE=p?f:b;function y(S,A){return h[0]=S[A],h[1]=S[A+1],h[2]=S[A+2],h[3]=S[A+3],h[4]=S[A+4],h[5]=S[A+5],h[6]=S[A+6],h[7]=S[A+7],u[0]}function _(S,A){return h[7]=S[A],h[6]=S[A+1],h[5]=S[A+2],h[4]=S[A+3],h[3]=S[A+4],h[2]=S[A+5],h[1]=S[A+6],h[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 Z;if(y<22250738585072014e-324)Z=y/5e-324,p(Z>>>0,_,S+b),p((A<<31|Z/4294967296)>>>0,_,S+f);else{var V=Math.floor(Math.log(y)/Math.LN2);V===1024&&(V=1023),Z=y*Math.pow(2,-V),p(Z*4503599627370496>>>0,_,S+b),p((A<<31|V+1023<<20|Z*1048576&1048575)>>>0,_,S+f)}}}d.writeDoubleLE=u.bind(null,r,0,4),d.writeDoubleBE=u.bind(null,s,4,0);function h(p,b,f,y,_){var S=p(y,_+b),A=p(y,_+f),Z=(A>>31)*2+1,V=A>>>20&2047,E=4294967296*(A&1048575)+S;return V===2047?E?NaN:Z*(1/0):V===0?Z*5e-324*E:Z*Math.pow(2,V-1075)*(E+4503599627370496)}d.readDoubleLE=h.bind(null,a,0,4),d.readDoubleBE=h.bind(null,c,4,0)})(),d}function r(d,u,h){u[h]=d&255,u[h+1]=d>>>8&255,u[h+2]=d>>>16&255,u[h+3]=d>>>24}function s(d,u,h){u[h]=d>>>24,u[h+1]=d>>>16&255,u[h+2]=d>>>8&255,u[h+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 h=u<0;h&&(u=-u);var p=u>>>0,b=(u-p)/4294967296>>>0;return h&&(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 h=~this.lo+1>>>0,p=~this.hi>>>0;return h||(p=p+1>>>0),-(h+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,h=(this.lo>>>28|this.hi<<4)>>>0,p=this.hi>>>24;return p===0?h===0?u<16384?u<128?1:2:u<2097152?3:4:h<16384?h<128?5:6:h<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),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(c){return typeof c=="number"&&isFinite(c)&&Math.floor(c)===c},o.isString=function(c){return typeof c=="string"||c instanceof String},o.isObject=function(c){return c&&typeof c=="object"},o.isset=o.isSet=function(c,d){var u=c[d];return u!=null&&c.hasOwnProperty(d)?typeof u!="object"||(Array.isArray(u)?u.length:Object.keys(u).length)>0:!1},o.Buffer=(function(){try{var a=o.inquire("buffer").Buffer;return a.prototype.utf8Write?a:null}catch{return null}})(),o._Buffer_from=null,o._Buffer_allocUnsafe=null,o.newBuffer=function(c){return typeof c=="number"?o.Buffer?o._Buffer_allocUnsafe(c):new o.Array(c):o.Buffer?o._Buffer_from(c):typeof Uint8Array>"u"?c:new Uint8Array(c)},o.Array=typeof Uint8Array<"u"?Uint8Array:Array,o.Long=o.global.dcodeIO&&o.global.dcodeIO.Long||o.global.Long||o.inquire("long"),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(c){return c?o.LongBits.from(c).toHash():o.LongBits.zeroHash},o.longFromHash=function(c,d){var u=o.LongBits.fromHash(c);return o.Long?o.Long.fromBits(u.lo,u.hi,d):u.toNumber(!!d)};function r(a,c,d){for(var u=Object.keys(c),h=0;h<u.length;++h)(a[u[h]]===e||!d)&&u[h]!=="__proto__"&&(a[u[h]]=c[u[h]]);return a}o.merge=r,o.recursionLimit=100,o.makeProp=function(c,d){Object.defineProperty(c,d,{enumerable:!0,configurable:!0,writable:!0})},o.lcFirst=function(c){return c.charAt(0).toLowerCase()+c.substring(1)};function s(a){function c(d,u){if(!(this instanceof c))return new c(d,u);Object.defineProperty(this,"message",{get:function(){return d}}),Error.captureStackTrace?Error.captureStackTrace(this,c):Object.defineProperty(this,"stack",{value:new Error().stack||""}),u&&r(this,u)}return c.prototype=Object.create(Error.prototype,{constructor:{value:c,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return a},set:e,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),c}o.newError=s,o.ProtocolError=s("ProtocolError"),o.oneOfGetter=function(c){for(var d={},u=0;u<c.length;++u)d[c[u]]=1;return function(){for(var h=Object.keys(this),p=h.length-1;p>-1;--p)if(d[h[p]]===1&&this[h[p]]!==e&&this[h[p]]!==null)return h[p]}},o.oneOfSetter=function(c){return function(d){for(var u=0;u<c.length;++u)c[u]!==d&&delete this[c[u]]}},o.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},o._configure=function(){var a=o.Buffer;if(!a){o._Buffer_from=o._Buffer_allocUnsafe=null;return}o._Buffer_from=a.from!==Uint8Array.from&&a.from||function(d,u){return new a(d,u)},o._Buffer_allocUnsafe=a.allocUnsafe||function(d){return new a(d)}}},{10:10,11:11,12:12,14:14,15:15,7:7,8:8,9:9}],14:[function(t,n,i){"use strict";n.exports=o;function o(r,s,a){var c=a||8192,d=c>>>1,u=null,h=c;return function(b){if(b<1||b>d)return r(b);h+b>c&&(u=r(c),h=0);var f=s.call(u,h,h+=b);return h&7&&(h=(h|7)+1),f}}},{}],15:[function(t,n,i){"use strict";var o=i,r="\uFFFD";o.length=function(a){for(var c=0,d=0,u=0;u<a.length;++u)d=a.charCodeAt(u),d<128?c+=1:d<2048?c+=2:(d&64512)===55296&&(a.charCodeAt(u+1)&64512)===56320?(++u,c+=4):c+=3;return c},o.read=function(a,c,d){if(d-c<1)return"";for(var u="",h=c;h<d;){var p=a[h++];if(p<=127)u+=String.fromCharCode(p);else if(p>=192&&p<224){var b=(p&31)<<6|a[h++]&63;u+=b>=128?String.fromCharCode(b):r}else if(p>=224&&p<240){var f=(p&15)<<12|(a[h++]&63)<<6|a[h++]&63;u+=f>=2048?String.fromCharCode(f):r}else if(p>=240){var y=(p&7)<<18|(a[h++]&63)<<12|(a[h++]&63)<<6|a[h++]&63;y<65536||y>1114111?u+=r:(y-=65536,u+=String.fromCharCode(55296+(y>>10)),u+=String.fromCharCode(56320+(y&1023)))}}return u},o.write=function(a,c,d){for(var u=d,h,p,b=0;b<a.length;++b)h=a.charCodeAt(b),h<128?c[d++]=h:h<2048?(c[d++]=h>>6|192,c[d++]=h&63|128):(h&64512)===55296&&((p=a.charCodeAt(b+1))&64512)===56320?(h=65536+((h&1023)<<10)+(p&1023),++b,c[d++]=h>>18|240,c[d++]=h>>12&63|128,c[d++]=h>>6&63|128,c[d++]=h&63|128):(c[d++]=h>>12|224,c[d++]=h>>6&63|128,c[d++]=h&63|128);return d-u}},{}],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(V,E,L){this.fn=V,this.len=E,this.next=e,this.val=L}function u(){}function h(V){this.head=V.head,this.tail=V.tail,this.len=V.len,this.next=V.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(E){return new o.Array(E)},o.Array!==Array&&(p.alloc=o.pool(p.alloc,o.Array.prototype.subarray)),p.prototype._push=function(E,L,v){return this.tail=this.tail.next=new d(E,L,v),this.len+=L,this};function f(V,E,L){E[L]=V&255}function y(V,E,L){for(;V>127;)E[L++]=V&127|128,V>>>=7;E[L]=V}function _(V,E){this.len=V,this.next=e,this.val=E}_.prototype=Object.create(d.prototype),_.prototype.fn=y,p.prototype.uint32=function(E){return this.len+=(this.tail=this.tail.next=new _((E=E>>>0)<128?1:E<16384?2:E<2097152?3:E<268435456?4:5,E)).len,this},p.prototype.int32=function(E){return E<0?this._push(S,10,s.fromNumber(E)):this.uint32(E)},p.prototype.sint32=function(E){return this.uint32((E<<1^E>>31)>>>0)};function S(V,E,L){for(;V.hi;)E[L++]=V.lo&127|128,V.lo=(V.lo>>>7|V.hi<<25)>>>0,V.hi>>>=7;for(;V.lo>127;)E[L++]=V.lo&127|128,V.lo=V.lo>>>7;E[L++]=V.lo}p.prototype.uint64=function(E){var L=s.from(E);return this._push(S,L.length(),L)},p.prototype.int64=p.prototype.uint64,p.prototype.sint64=function(E){var L=s.from(E).zzEncode();return this._push(S,L.length(),L)},p.prototype.bool=function(E){return this._push(f,1,E?1:0)};function A(V,E,L){E[L]=V&255,E[L+1]=V>>>8&255,E[L+2]=V>>>16&255,E[L+3]=V>>>24}p.prototype.fixed32=function(E){return this._push(A,4,E>>>0)},p.prototype.sfixed32=p.prototype.fixed32,p.prototype.fixed64=function(E){var L=s.from(E);return this._push(A,4,L.lo)._push(A,4,L.hi)},p.prototype.sfixed64=p.prototype.fixed64,p.prototype.float=function(E){return this._push(o.float.writeFloatLE,4,E)},p.prototype.double=function(E){return this._push(o.float.writeDoubleLE,8,E)};var Z=o.Array.prototype.set?function(E,L,v){L.set(E,v)}:function(E,L,v){for(var I=0;I<E.length;++I)L[v+I]=E[I]};p.prototype.bytes=function(E){var L=E.length>>>0;if(!L)return this._push(f,1,0);if(o.isString(E)){var v=p.alloc(L=a.length(E));a.decode(E,v,0),E=v}return this.uint32(L)._push(Z,L,E)},p.prototype.string=function(E){var L=c.length(E);return L?this.uint32(L)._push(c.write,L,E):this._push(f,1,0)},p.prototype.fork=function(){return this.states=new h(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 E=this.head,L=this.tail,v=this.len;return this.reset().uint32(v),v&&(this.tail.next=E.next,this.tail=L,this.len+=v),this},p.prototype.finish=function(){for(var E=this.head.next,L=this.constructor.alloc(this.len),v=0;E;)E.fn(E.val,L,v),v+=E.len,E=E.next;return L},p._configure=function(V){r=V,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(d,u,h){u.set(d,h)}:function(d,u,h){if(d.copy)d.copy(u,h,0,d.length);else for(var p=0;p<d.length;)u[h++]=d[p++]}},s.prototype.bytes=function(d){r.isString(d)&&(d=r._Buffer_from(d,"base64"));var u=d.length>>>0;return this.uint32(u),u&&this._push(s.writeBytesBuffer,u,d),this};function a(c,d,u){c.length<40?r.utf8.write(c,d,u):d.utf8Write?d.utf8Write(c,u):d.write(c,u)}s.prototype.string=function(d){var u=r.Buffer.byteLength(d);return this.uint32(u),u&&this._push(a,u,d),this},s._configure()},{13:13,16:16}]},{},[1])})()});var ALe=om((XCo,Pz)=>{var NCo=x(T());/* Copyright 2015-2018 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */(function(){var e=(function(){var o={};o.defaultNoDataValue=-34027999387901484e22,o.decode=function(u,h){h=h||{};var p=h.encodedMaskData||h.encodedMaskData===null,b=c(u,h.inputOffset||0,p),f=h.noDataValue!==null?h.noDataValue:o.defaultNoDataValue,y=r(b,h.pixelType||Float32Array,h.encodedMaskData,f,h.returnMask),_={width:b.width,height:b.height,pixelData:y.resultPixels,minValue:y.minValue,maxValue:b.pixels.maxValue,noDataValue:f};return y.resultMask&&(_.maskData=y.resultMask),h.returnEncodedMask&&b.mask&&(_.encodedMaskData=b.mask.bitset?b.mask.bitset:null),h.returnFileInfo&&(_.fileInfo=s(b),h.computeUsedBitDepths&&(_.fileInfo.bitDepths=a(b))),_};var r=function(u,h,p,b,f){var y=0,_=u.pixels.numBlocksX,S=u.pixels.numBlocksY,A=Math.floor(u.width/_),Z=Math.floor(u.height/S),V=2*u.maxZError,E=Number.MAX_VALUE,L;p=p||(u.mask?u.mask.bitset:null);var v,I;v=new h(u.width*u.height),f&&p&&(I=new Uint8Array(u.width*u.height));for(var X=new Float32Array(A*Z),N,g,C=0;C<=S;C++){var R=C!==S?Z:u.height%S;if(R!==0)for(var G=0;G<=_;G++){var P=G!==_?A:u.width%_;if(P!==0){var Y=C*u.width*Z+G*A,O=u.width-P,k=u.pixels.blocks[y],D,w,z;k.encoding<2?(k.encoding===0?D=k.rawData:(d(k.stuffedData,k.bitsPerPixel,k.numValidPixels,k.offset,V,X,u.pixels.maxValue),D=X),w=0):k.encoding===2?z=0:z=k.offset;var J;if(p)for(g=0;g<R;g++){for(Y&7&&(J=p[Y>>3],J<<=Y&7),N=0;N<P;N++)Y&7||(J=p[Y>>3]),J&128?(I&&(I[Y]=1),L=k.encoding<2?D[w++]:z,E=E>L?L:E,v[Y++]=L):(I&&(I[Y]=0),v[Y++]=b),J<<=1;Y+=O}else if(k.encoding<2)for(g=0;g<R;g++){for(N=0;N<P;N++)L=D[w++],E=E>L?L:E,v[Y++]=L;Y+=O}else for(E=E>z?z:E,g=0;g<R;g++){for(N=0;N<P;N++)v[Y++]=z;Y+=O}if(k.encoding===1&&w!==k.numValidPixels)throw"Block and Mask do not match";y++}}}return{resultPixels:v,resultMask:I,minValue:E}},s=function(u){return{fileIdentifierString:u.fileIdentifierString,fileVersion:u.fileVersion,imageType:u.imageType,height:u.height,width:u.width,maxZError:u.maxZError,eofOffset:u.eofOffset,mask:u.mask?{numBlocksX:u.mask.numBlocksX,numBlocksY:u.mask.numBlocksY,numBytes:u.mask.numBytes,maxValue:u.mask.maxValue}:null,pixels:{numBlocksX:u.pixels.numBlocksX,numBlocksY:u.pixels.numBlocksY,numBytes:u.pixels.numBytes,maxValue:u.pixels.maxValue,noDataValue:u.noDataValue}}},a=function(u){for(var h=u.pixels.numBlocksX*u.pixels.numBlocksY,p={},b=0;b<h;b++){var f=u.pixels.blocks[b];f.encoding===0?p.float32=!0:f.encoding===1?p[f.bitsPerPixel]=!0:p[0]=!0}return Object.keys(p)},c=function(u,h,p){var b={},f=new Uint8Array(u,h,10);if(b.fileIdentifierString=String.fromCharCode.apply(null,f),b.fileIdentifierString.trim()!=="CntZImage")throw"Unexpected file identifier string: "+b.fileIdentifierString;h+=10;var y=new DataView(u,h,24);if(b.fileVersion=y.getInt32(0,!0),b.imageType=y.getInt32(4,!0),b.height=y.getUint32(8,!0),b.width=y.getUint32(12,!0),b.maxZError=y.getFloat64(16,!0),h+=24,!p)if(y=new DataView(u,h,16),b.mask={},b.mask.numBlocksY=y.getUint32(0,!0),b.mask.numBlocksX=y.getUint32(4,!0),b.mask.numBytes=y.getUint32(8,!0),b.mask.maxValue=y.getFloat32(12,!0),h+=16,b.mask.numBytes>0){var _=new Uint8Array(Math.ceil(b.width*b.height/8));y=new DataView(u,h,b.mask.numBytes);var S=y.getInt16(0,!0),A=2,Z=0;do{if(S>0)for(;S--;)_[Z++]=y.getUint8(A++);else{var V=y.getUint8(A++);for(S=-S;S--;)_[Z++]=V}S=y.getInt16(A,!0),A+=2}while(A<b.mask.numBytes);if(S!==-32768||Z<_.length)throw"Unexpected end of mask RLE encoding";b.mask.bitset=_,h+=b.mask.numBytes}else(b.mask.numBytes|b.mask.numBlocksY|b.mask.maxValue)===0&&(b.mask.bitset=new Uint8Array(Math.ceil(b.width*b.height/8)));y=new DataView(u,h,16),b.pixels={},b.pixels.numBlocksY=y.getUint32(0,!0),b.pixels.numBlocksX=y.getUint32(4,!0),b.pixels.numBytes=y.getUint32(8,!0),b.pixels.maxValue=y.getFloat32(12,!0),h+=16;var E=b.pixels.numBlocksX,L=b.pixels.numBlocksY,v=E+(b.width%E>0?1:0),I=L+(b.height%L>0?1:0);b.pixels.blocks=new Array(v*I);for(var X=0,N=0;N<I;N++)for(var g=0;g<v;g++){var C=0,R=u.byteLength-h;y=new DataView(u,h,Math.min(10,R));var G={};b.pixels.blocks[X++]=G;var P=y.getUint8(0);if(C++,G.encoding=P&63,G.encoding>3)throw"Invalid block encoding ("+G.encoding+")";if(G.encoding===2){h++;continue}if(P!==0&&P!==2){if(P>>=6,G.offsetType=P,P===2)G.offset=y.getInt8(1),C++;else if(P===1)G.offset=y.getInt16(1,!0),C+=2;else if(P===0)G.offset=y.getFloat32(1,!0),C+=4;else throw"Invalid block offset type";if(G.encoding===1)if(P=y.getUint8(C),C++,G.bitsPerPixel=P&63,P>>=6,G.numValidPixelsType=P,P===2)G.numValidPixels=y.getUint8(C),C++;else if(P===1)G.numValidPixels=y.getUint16(C,!0),C+=2;else if(P===0)G.numValidPixels=y.getUint32(C,!0),C+=4;else throw"Invalid valid pixel count type"}if(h+=C,G.encoding!==3){var Y,O;if(G.encoding===0){var k=(b.pixels.numBytes-1)/4;if(k!==Math.floor(k))throw"uncompressed block has invalid length";Y=new ArrayBuffer(k*4),O=new Uint8Array(Y),O.set(new Uint8Array(u,h,k*4));var D=new Float32Array(Y);G.rawData=D,h+=k*4}else if(G.encoding===1){var w=Math.ceil(G.numValidPixels*G.bitsPerPixel/8),z=Math.ceil(w/4);Y=new ArrayBuffer(z*4),O=new Uint8Array(Y),O.set(new Uint8Array(u,h,w)),G.stuffedData=new Uint32Array(Y),h+=w}}}return b.eofOffset=h,b},d=function(u,h,p,b,f,y,_){var S=(1<<h)-1,A=0,Z,V=0,E,L,v=Math.ceil((_-b)/f),I=u.length*4-Math.ceil(h*p/8);for(u[u.length-1]<<=8*I,Z=0;Z<p;Z++){if(V===0&&(L=u[A++],V=32),V>=h)E=L>>>V-h&S,V-=h;else{var X=h-V;E=(L&S)<<X&S,L=u[A++],V=32-X,E+=L>>>V}y[Z]=E<v?b+E*f:_}return y};return o})(),t=(function(){"use strict";var o={unstuff:function(c,d,u,h,p,b,f,y){var _=(1<<u)-1,S=0,A,Z=0,V,E,L,v,I=c.length*4-Math.ceil(u*h/8);if(c[c.length-1]<<=8*I,p)for(A=0;A<h;A++)Z===0&&(E=c[S++],Z=32),Z>=u?(V=E>>>Z-u&_,Z-=u):(L=u-Z,V=(E&_)<<L&_,E=c[S++],Z=32-L,V+=E>>>Z),d[A]=p[V];else for(v=Math.ceil((y-b)/f),A=0;A<h;A++)Z===0&&(E=c[S++],Z=32),Z>=u?(V=E>>>Z-u&_,Z-=u):(L=u-Z,V=(E&_)<<L&_,E=c[S++],Z=32-L,V+=E>>>Z),d[A]=V<v?b+V*f:y},unstuffLUT:function(c,d,u,h,p,b){var f=(1<<d)-1,y=0,_=0,S=0,A=0,Z=0,V,E=[],L=c.length*4-Math.ceil(d*u/8);c[c.length-1]<<=8*L;var v=Math.ceil((b-h)/p);for(_=0;_<u;_++)A===0&&(V=c[y++],A=32),A>=d?(Z=V>>>A-d&f,A-=d):(S=d-A,Z=(V&f)<<S&f,V=c[y++],A=32-S,Z+=V>>>A),E[_]=Z<v?h+Z*p:b;return E.unshift(h),E},unstuff2:function(c,d,u,h,p,b,f,y){var _=(1<<u)-1,S=0,A,Z=0,V=0,E,L,v;if(p)for(A=0;A<h;A++)Z===0&&(L=c[S++],Z=32,V=0),Z>=u?(E=L>>>V&_,Z-=u,V+=u):(v=u-Z,E=L>>>V&_,L=c[S++],Z=32-v,E|=(L&(1<<v)-1)<<u-v,V=v),d[A]=p[E];else{var I=Math.ceil((y-b)/f);for(A=0;A<h;A++)Z===0&&(L=c[S++],Z=32,V=0),Z>=u?(E=L>>>V&_,Z-=u,V+=u):(v=u-Z,E=L>>>V&_,L=c[S++],Z=32-v,E|=(L&(1<<v)-1)<<u-v,V=v),d[A]=E<I?b+E*f:y}return d},unstuffLUT2:function(c,d,u,h,p,b){var f=(1<<d)-1,y=0,_=0,S=0,A=0,Z=0,V=0,E,L=[],v=Math.ceil((b-h)/p);for(_=0;_<u;_++)A===0&&(E=c[y++],A=32,V=0),A>=d?(Z=E>>>V&f,A-=d,V+=d):(S=d-A,Z=E>>>V&f,E=c[y++],A=32-S,Z|=(E&(1<<S)-1)<<d-S,V=S),L[_]=Z<v?h+Z*p:b;return L.unshift(h),L},originalUnstuff:function(c,d,u,h){var p=(1<<u)-1,b=0,f,y=0,_,S,A,Z=c.length*4-Math.ceil(u*h/8);for(c[c.length-1]<<=8*Z,f=0;f<h;f++)y===0&&(S=c[b++],y=32),y>=u?(_=S>>>y-u&p,y-=u):(A=u-y,_=(S&p)<<A&p,S=c[b++],y=32-A,_+=S>>>y),d[f]=_;return d},originalUnstuff2:function(c,d,u,h){var p=(1<<u)-1,b=0,f,y=0,_=0,S,A,Z;for(f=0;f<h;f++)y===0&&(A=c[b++],y=32,_=0),y>=u?(S=A>>>_&p,y-=u,_+=u):(Z=u-y,S=A>>>_&p,A=c[b++],y=32-Z,S|=(A&(1<<Z)-1)<<u-Z,_=Z),d[f]=S;return d}},r={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(c){for(var d=65535,u=65535,h=c.length,p=Math.floor(h/2),b=0;p;){var f=p>=359?359:p;p-=f;do d+=c[b++]<<8,u+=d+=c[b++];while(--f);d=(d&65535)+(d>>>16),u=(u&65535)+(u>>>16)}return h&1&&(u+=d+=c[b]<<8),d=(d&65535)+(d>>>16),u=(u&65535)+(u>>>16),(u<<16|d)>>>0},readHeaderInfo:function(c,d){var u=d.ptr,h=new Uint8Array(c,u,6),p={};if(p.fileIdentifierString=String.fromCharCode.apply(null,h),p.fileIdentifierString.lastIndexOf("Lerc2",0)!==0)throw"Unexpected file identifier string (expect Lerc2 ): "+p.fileIdentifierString;u+=6;var b=new DataView(c,u,8),f=b.getInt32(0,!0);p.fileVersion=f,u+=4,f>=3&&(p.checksum=b.getUint32(4,!0),u+=4),b=new DataView(c,u,12),p.height=b.getUint32(0,!0),p.width=b.getUint32(4,!0),u+=8,f>=4?(p.numDims=b.getUint32(8,!0),u+=4):p.numDims=1,b=new DataView(c,u,40),p.numValidPixel=b.getUint32(0,!0),p.microBlockSize=b.getInt32(4,!0),p.blobSize=b.getInt32(8,!0),p.imageType=b.getInt32(12,!0),p.maxZError=b.getFloat64(16,!0),p.zMin=b.getFloat64(24,!0),p.zMax=b.getFloat64(32,!0),u+=40,d.headerInfo=p,d.ptr=u;var y,_;if(f>=3&&(_=f>=4?52:48,y=this.computeChecksumFletcher32(new Uint8Array(c,u-_,p.blobSize-14)),y!==p.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(c,d){var u=d.headerInfo,h=this.getDataTypeArray(u.imageType),p=u.numDims*this.getDataTypeSize(u.imageType),b=this.readSubArray(c,d.ptr,h,p),f=this.readSubArray(c,d.ptr+p,h,p);d.ptr+=2*p;var y,_=!0;for(y=0;y<u.numDims;y++)if(b[y]!==f[y]){_=!1;break}return u.minValues=b,u.maxValues=f,_},readSubArray:function(c,d,u,h){var p;if(u===Uint8Array)p=new Uint8Array(c,d,h);else{var b=new ArrayBuffer(h),f=new Uint8Array(b);f.set(new Uint8Array(c,d,h)),p=new u(b)}return p},readMask:function(c,d){var u=d.ptr,h=d.headerInfo,p=h.width*h.height,b=h.numValidPixel,f=new DataView(c,u,4),y={};if(y.numBytes=f.getUint32(0,!0),u+=4,(b===0||p===b)&&y.numBytes!==0)throw"invalid mask";var _,S;if(b===0)_=new Uint8Array(Math.ceil(p/8)),y.bitset=_,S=new Uint8Array(p),d.pixels.resultMask=S,u+=y.numBytes;else if(y.numBytes>0){_=new Uint8Array(Math.ceil(p/8)),f=new DataView(c,u,y.numBytes);var A=f.getInt16(0,!0),Z=2,V=0,E=0;do{if(A>0)for(;A--;)_[V++]=f.getUint8(Z++);else for(E=f.getUint8(Z++),A=-A;A--;)_[V++]=E;A=f.getInt16(Z,!0),Z+=2}while(Z<y.numBytes);if(A!==-32768||V<_.length)throw"Unexpected end of mask RLE encoding";S=new Uint8Array(p);var L=0,v=0;for(v=0;v<p;v++)v&7?(L=_[v>>3],L<<=v&7):L=_[v>>3],L&128&&(S[v]=1);d.pixels.resultMask=S,y.bitset=_,u+=y.numBytes}return d.ptr=u,d.mask=y,!0},readDataOneSweep:function(c,d,u){var h=d.ptr,p=d.headerInfo,b=p.numDims,f=p.width*p.height,y=p.imageType,_=p.numValidPixel*r.getDataTypeSize(y)*b,S,A=d.pixels.resultMask;if(u===Uint8Array)S=new Uint8Array(c,h,_);else{var Z=new ArrayBuffer(_),V=new Uint8Array(Z);V.set(new Uint8Array(c,h,_)),S=new u(Z)}if(S.length===f*b)d.pixels.resultPixels=S;else{d.pixels.resultPixels=new u(f*b);var E=0,L=0,v=0,I=0;if(b>1)for(v=0;v<b;v++)for(I=v*f,L=0;L<f;L++)A[L]&&(d.pixels.resultPixels[I+L]=S[E++]);else for(L=0;L<f;L++)A[L]&&(d.pixels.resultPixels[L]=S[E++])}return h+=_,d.ptr=h,!0},readHuffmanTree:function(c,d){var u=this.HUFFMAN_LUT_BITS_MAX,h=new DataView(c,d.ptr,16);d.ptr+=16;var p=h.getInt32(0,!0);if(p<2)throw"unsupported Huffman version";var b=h.getInt32(4,!0),f=h.getInt32(8,!0),y=h.getInt32(12,!0);if(f>=y)return!1;var _=new Uint32Array(y-f);r.decodeBits(c,d,_);var S=[],A,Z,V,E;for(A=f;A<y;A++)Z=A-(A<b?0:b),S[Z]={first:_[A-f],second:null};var L=c.byteLength-d.ptr,v=Math.ceil(L/4),I=new ArrayBuffer(v*4),X=new Uint8Array(I);X.set(new Uint8Array(c,d.ptr,L));var N=new Uint32Array(I),g=0,C,R=0;for(C=N[0],A=f;A<y;A++)Z=A-(A<b?0:b),E=S[Z].first,E>0&&(S[Z].second=C<<g>>>32-E,32-g>=E?(g+=E,g===32&&(g=0,R++,C=N[R])):(g+=E-32,R++,C=N[R],S[Z].second|=C>>>32-g));var G=0,P=0,Y=new s;for(A=0;A<S.length;A++)S[A]!==void 0&&(G=Math.max(G,S[A].first));G>=u?P=u:P=G,G>=30&&console.log("WARning, large NUM LUT BITS IS "+G);var O=[],k,D,w,z,J,ee;for(A=f;A<y;A++)if(Z=A-(A<b?0:b),E=S[Z].first,E>0)if(k=[E,Z],E<=P)for(D=S[Z].second<<P-E,w=1<<P-E,V=0;V<w;V++)O[D|V]=k;else for(D=S[Z].second,ee=Y,z=E-1;z>=0;z--)J=D>>>z&1,J?(ee.right||(ee.right=new s),ee=ee.right):(ee.left||(ee.left=new s),ee=ee.left),z===0&&!ee.val&&(ee.val=k[1]);return{decodeLut:O,numBitsLUTQick:P,numBitsLUT:G,tree:Y,stuffedData:N,srcPtr:R,bitPos:g}},readHuffman:function(c,d,u){var h=d.headerInfo,p=h.numDims,b=d.headerInfo.height,f=d.headerInfo.width,y=f*b,_=this.readHuffmanTree(c,d),S=_.decodeLut,A=_.tree,Z=_.stuffedData,V=_.srcPtr,E=_.bitPos,L=_.numBitsLUTQick,v=_.numBitsLUT,I=d.headerInfo.imageType===0?128:0,X,N,g,C=d.pixels.resultMask,R,G,P,Y,O,k,D,w=0;E>0&&(V++,E=0);var z=Z[V],J=d.encodeMode===1,ee=new u(y*p),H=ee,te;for(te=0;te<h.numDims;te++){if(p>1&&(H=new u(ee.buffer,y*te,y),w=0),d.headerInfo.numValidPixel===f*b)for(k=0,Y=0;Y<b;Y++)for(O=0;O<f;O++,k++){if(N=0,R=z<<E>>>32-L,G=R,32-E<L&&(R|=Z[V+1]>>>64-E-L,G=R),S[G])N=S[G][1],E+=S[G][0];else for(R=z<<E>>>32-v,G=R,32-E<v&&(R|=Z[V+1]>>>64-E-v,G=R),X=A,D=0;D<v;D++)if(P=R>>>v-D-1&1,X=P?X.right:X.left,!(X.left||X.right)){N=X.val,E=E+D+1;break}E>=32&&(E-=32,V++,z=Z[V]),g=N-I,J?(O>0?g+=w:Y>0?g+=H[k-f]:g+=w,g&=255,H[k]=g,w=g):H[k]=g}else for(k=0,Y=0;Y<b;Y++)for(O=0;O<f;O++,k++)if(C[k]){if(N=0,R=z<<E>>>32-L,G=R,32-E<L&&(R|=Z[V+1]>>>64-E-L,G=R),S[G])N=S[G][1],E+=S[G][0];else for(R=z<<E>>>32-v,G=R,32-E<v&&(R|=Z[V+1]>>>64-E-v,G=R),X=A,D=0;D<v;D++)if(P=R>>>v-D-1&1,X=P?X.right:X.left,!(X.left||X.right)){N=X.val,E=E+D+1;break}E>=32&&(E-=32,V++,z=Z[V]),g=N-I,J?(O>0&&C[k-1]?g+=w:Y>0&&C[k-f]?g+=H[k-f]:g+=w,g&=255,H[k]=g,w=g):H[k]=g}d.ptr=d.ptr+(V+1)*4+(E>0?4:0)}d.pixels.resultPixels=ee},decodeBits:function(c,d,u,h,p){{var b=d.headerInfo,f=b.fileVersion,y=0,_=new DataView(c,d.ptr,5),S=_.getUint8(0);y++;var A=S>>6,Z=A===0?4:3-A,V=(S&32)>0,E=S&31,L=0;if(Z===1)L=_.getUint8(y),y++;else if(Z===2)L=_.getUint16(y,!0),y+=2;else if(Z===4)L=_.getUint32(y,!0),y+=4;else throw"Invalid valid pixel count type";var v=2*b.maxZError,I,X,N,g,C,R,G,P,Y,O,k=b.numDims>1?b.maxValues[p]:b.zMax;if(V){for(d.counter.lut++,P=_.getUint8(y),Y=E,y++,g=Math.ceil((P-1)*E/8),C=Math.ceil(g/4),X=new ArrayBuffer(C*4),N=new Uint8Array(X),d.ptr+=y,N.set(new Uint8Array(c,d.ptr,g)),G=new Uint32Array(X),d.ptr+=g,O=0;P-1>>>O;)O++;g=Math.ceil(L*O/8),C=Math.ceil(g/4),X=new ArrayBuffer(C*4),N=new Uint8Array(X),N.set(new Uint8Array(c,d.ptr,g)),I=new Uint32Array(X),d.ptr+=g,f>=3?R=o.unstuffLUT2(G,E,P-1,h,v,k):R=o.unstuffLUT(G,E,P-1,h,v,k),f>=3?o.unstuff2(I,u,O,L,R):o.unstuff(I,u,O,L,R)}else d.counter.bitstuffer++,O=E,d.ptr+=y,O>0&&(g=Math.ceil(L*O/8),C=Math.ceil(g/4),X=new ArrayBuffer(C*4),N=new Uint8Array(X),N.set(new Uint8Array(c,d.ptr,g)),I=new Uint32Array(X),d.ptr+=g,f>=3?h==null?o.originalUnstuff2(I,u,O,L):o.unstuff2(I,u,O,L,!1,h,v,k):h==null?o.originalUnstuff(I,u,O,L):o.unstuff(I,u,O,L,!1,h,v,k))}},readTiles:function(c,d,u){var h=d.headerInfo,p=h.width,b=h.height,f=h.microBlockSize,y=h.imageType,_=r.getDataTypeSize(y),S=Math.ceil(p/f),A=Math.ceil(b/f);d.pixels.numBlocksY=A,d.pixels.numBlocksX=S,d.pixels.ptr=0;var Z=0,V=0,E=0,L=0,v=0,I=0,X=0,N=0,g=0,C=0,R=0,G=0,P=0,Y=0,O=0,k=0,D,w,z,J,ee,H,te=new u(f*f),$=b%f||f,be=p%f||f,ye,ce,Ze=h.numDims,xe,Ge=d.pixels.resultMask,Ve=d.pixels.resultPixels;for(E=0;E<A;E++)for(v=E!==A-1?f:$,L=0;L<S;L++)for(I=L!==S-1?f:be,R=E*p*f+L*f,G=p-I,xe=0;xe<Ze;xe++){if(Ze>1&&(Ve=new u(d.pixels.resultPixels.buffer,p*b*xe*_,p*b)),X=c.byteLength-d.ptr,D=new DataView(c,d.ptr,Math.min(10,X)),w={},k=0,N=D.getUint8(0),k++,g=N>>6&255,C=N>>2&15,C!==(L*f>>3&15))throw"integrity issue";if(H=N&3,H>3)throw d.ptr+=k,"Invalid block encoding ("+H+")";if(H===2){d.counter.constant++,d.ptr+=k;continue}else if(H===0){if(d.counter.uncompressed++,d.ptr+=k,P=v*I*_,Y=c.byteLength-d.ptr,P=P<Y?P:Y,z=new ArrayBuffer(P%_===0?P:P+_-P%_),J=new Uint8Array(z),J.set(new Uint8Array(c,d.ptr,P)),ee=new u(z),O=0,Ge)for(Z=0;Z<v;Z++){for(V=0;V<I;V++)Ge[R]&&(Ve[R]=ee[O++]),R++;R+=G}else for(Z=0;Z<v;Z++){for(V=0;V<I;V++)Ve[R++]=ee[O++];R+=G}d.ptr+=O*_}else if(ye=r.getDataTypeUsed(y,g),ce=r.getOnePixel(w,k,ye,D),k+=r.getDataTypeSize(ye),H===3)if(d.ptr+=k,d.counter.constantoffset++,Ge)for(Z=0;Z<v;Z++){for(V=0;V<I;V++)Ge[R]&&(Ve[R]=ce),R++;R+=G}else for(Z=0;Z<v;Z++){for(V=0;V<I;V++)Ve[R++]=ce;R+=G}else if(d.ptr+=k,r.decodeBits(c,d,te,ce,xe),k=0,Ge)for(Z=0;Z<v;Z++){for(V=0;V<I;V++)Ge[R]&&(Ve[R]=te[k++]),R++;R+=G}else for(Z=0;Z<v;Z++){for(V=0;V<I;V++)Ve[R++]=te[k++];R+=G}}},formatFileInfo:function(c){return{fileIdentifierString:c.headerInfo.fileIdentifierString,fileVersion:c.headerInfo.fileVersion,imageType:c.headerInfo.imageType,height:c.headerInfo.height,width:c.headerInfo.width,numValidPixel:c.headerInfo.numValidPixel,microBlockSize:c.headerInfo.microBlockSize,blobSize:c.headerInfo.blobSize,maxZError:c.headerInfo.maxZError,pixelType:r.getPixelType(c.headerInfo.imageType),eofOffset:c.eofOffset,mask:c.mask?{numBytes:c.mask.numBytes}:null,pixels:{numBlocksX:c.pixels.numBlocksX,numBlocksY:c.pixels.numBlocksY,maxValue:c.headerInfo.zMax,minValue:c.headerInfo.zMin,noDataValue:c.noDataValue}}},constructConstantSurface:function(c){var d=c.headerInfo.zMax,u=c.headerInfo.numDims,h=c.headerInfo.height*c.headerInfo.width,p=h*u,b=0,f=0,y=0,_=c.pixels.resultMask;if(_)if(u>1)for(b=0;b<u;b++)for(y=b*h,f=0;f<h;f++)_[f]&&(c.pixels.resultPixels[y+f]=d);else for(f=0;f<h;f++)_[f]&&(c.pixels.resultPixels[f]=d);else if(c.pixels.resultPixels.fill)c.pixels.resultPixels.fill(d);else for(f=0;f<p;f++)c.pixels.resultPixels[f]=d},getDataTypeArray:function(c){var d;switch(c){case 0:d=Int8Array;break;case 1:d=Uint8Array;break;case 2:d=Int16Array;break;case 3:d=Uint16Array;break;case 4:d=Int32Array;break;case 5:d=Uint32Array;break;case 6:d=Float32Array;break;case 7:d=Float64Array;break;default:d=Float32Array}return d},getPixelType:function(c){var d;switch(c){case 0:d="S8";break;case 1:d="U8";break;case 2:d="S16";break;case 3:d="U16";break;case 4:d="S32";break;case 5:d="U32";break;case 6:d="F32";break;case 7:d="F64";break;default:d="F32"}return d},isValidPixelValue:function(c,d){if(d==null)return!1;var u;switch(c){case 0:u=d>=-128&&d<=127;break;case 1:u=d>=0&&d<=255;break;case 2:u=d>=-32768&&d<=32767;break;case 3:u=d>=0&&d<=65536;break;case 4:u=d>=-2147483648&&d<=2147483647;break;case 5:u=d>=0&&d<=4294967296;break;case 6:u=d>=-34027999387901484e22&&d<=34027999387901484e22;break;case 7:u=d>=5e-324&&d<=17976931348623157e292;break;default:u=!1}return u},getDataTypeSize:function(c){var d=0;switch(c){case 0:case 1:d=1;break;case 2:case 3:d=2;break;case 4:case 5:case 6:d=4;break;case 7:d=8;break;default:d=c}return d},getDataTypeUsed:function(c,d){var u=c;switch(c){case 2:case 4:u=c-d;break;case 3:case 5:u=c-2*d;break;case 6:d===0?u=c:d===1?u=2:u=1;break;case 7:d===0?u=c:u=c-2*d+1;break;default:u=c;break}return u},getOnePixel:function(c,d,u,h){var p=0;switch(u){case 0:p=h.getInt8(d);break;case 1:p=h.getUint8(d);break;case 2:p=h.getInt16(d,!0);break;case 3:p=h.getUint16(d,!0);break;case 4:p=h.getInt32(d,!0);break;case 5:p=h.getUInt32(d,!0);break;case 6:p=h.getFloat32(d,!0);break;case 7:p=h.getFloat64(d,!0);break;default:throw"the decoder does not understand this pixel type"}return p}},s=function(c,d,u){this.val=c,this.left=d,this.right=u},a={decode:function(c,d){d=d||{};var u=d.noDataValue,h=0,p={};if(p.ptr=d.inputOffset||0,p.pixels={},!!r.readHeaderInfo(c,p)){var b=p.headerInfo,f=b.fileVersion,y=r.getDataTypeArray(b.imageType);r.readMask(c,p),b.numValidPixel!==b.width*b.height&&!p.pixels.resultMask&&(p.pixels.resultMask=d.maskData);var _=b.width*b.height;if(p.pixels.resultPixels=new y(_*b.numDims),p.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},b.numValidPixel!==0)if(b.zMax===b.zMin)r.constructConstantSurface(p);else if(f>=4&&r.checkMinMaxRanges(c,p))r.constructConstantSurface(p);else{var S=new DataView(c,p.ptr,2),A=S.getUint8(0);if(p.ptr++,A)r.readDataOneSweep(c,p,y);else if(f>1&&b.imageType<=1&&Math.abs(b.maxZError-.5)<1e-5){var Z=S.getUint8(1);if(p.ptr++,p.encodeMode=Z,Z>2||f<4&&Z>1)throw"Invalid Huffman flag "+Z;Z?r.readHuffman(c,p,y):r.readTiles(c,p,y)}else r.readTiles(c,p,y)}p.eofOffset=p.ptr;var V;d.inputOffset?(V=p.headerInfo.blobSize+d.inputOffset-p.ptr,Math.abs(V)>=1&&(p.eofOffset=d.inputOffset+p.headerInfo.blobSize)):(V=p.headerInfo.blobSize-p.ptr,Math.abs(V)>=1&&(p.eofOffset=p.headerInfo.blobSize));var E={width:b.width,height:b.height,pixelData:p.pixels.resultPixels,minValue:b.zMin,maxValue:b.zMax,validPixelCount:b.numValidPixel,dimCount:b.numDims,dimStats:{minValues:b.minValues,maxValues:b.maxValues},maskData:p.pixels.resultMask};if(p.pixels.resultMask&&r.isValidPixelValue(b.imageType,u)){var L=p.pixels.resultMask;for(h=0;h<_;h++)L[h]||(E.pixelData[h]=u);E.noDataValue=u}return p.noDataValue=u,d.returnFileInfo&&(E.fileInfo=r.formatFileInfo(p)),E}},getBandCount:function(c){var d=0,u=0,h={};for(h.ptr=0,h.pixels={};u<c.byteLength-58;)r.readHeaderInfo(c,h),u+=h.headerInfo.blobSize,d++,h.ptr=u;return d}};return a})(),n=(function(){var o=new ArrayBuffer(4),r=new Uint8Array(o),s=new Uint32Array(o);return s[0]=1,r[0]===1})(),i={decode:function(o,r){if(!n)throw"Big endian system is not supported.";r=r||{};var s=r.inputOffset||0,a=new Uint8Array(o,s,10),c=String.fromCharCode.apply(null,a),d,u;if(c.trim()==="CntZImage")d=e,u=1;else if(c.substring(0,5)==="Lerc2")d=t,u=2;else throw"Unexpected file identifier string: "+c;for(var h=0,p=o.byteLength-10,b,f=[],y,_,S={width:0,height:0,pixels:[],pixelType:r.pixelType,mask:null,statistics:[]};s<p;){var A=d.decode(o,{inputOffset:s,encodedMaskData:b,maskData:_,returnMask:h===0,returnEncodedMask:h===0,returnFileInfo:!0,pixelType:r.pixelType||null,noDataValue:r.noDataValue||null});s=A.fileInfo.eofOffset,h===0&&(b=A.encodedMaskData,_=A.maskData,S.width=A.width,S.height=A.height,S.dimCount=A.dimCount||1,S.pixelType=A.pixelType||A.fileInfo.pixelType,S.mask=A.maskData),u>1&&A.fileInfo.mask&&A.fileInfo.mask.numBytes>0&&f.push(A.maskData),h++,S.pixels.push(A.pixelData),S.statistics.push({minValue:A.minValue,maxValue:A.maxValue,noDataValue:A.noDataValue,dimStats:A.dimStats})}var Z,V,E;if(u>1&&f.length>1){for(E=S.width*S.height,S.bandMasks=f,_=new Uint8Array(E),_.set(f[0]),Z=1;Z<f.length;Z++)for(y=f[Z],V=0;V<E;V++)_[V]=_[V]&y[V];S.maskData=_}return S}};typeof define=="function"&&define.amd?define([],function(){return i}):typeof Pz<"u"&&Pz.exports?Pz.exports=i:this.Lerc=i})()});var bWe=om((q4o,pWe)=>{var $4o=x(T());pWe.exports={webm:"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAAoC7AAAAAAAAgLUBAAAAAAC4AQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABUAAABlbmNvZGVyPUxhdmM1NS41Mi4xMDIBBXZvcmJpcyVCQ1YBAEAAAC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IAiAIAcCiKZQHHsSzgOJYFJMmyAJYF0DyApgFEEQAIAAAocAAACLBBU2JxgEJDVgIAUQAABsWxLE0TRZKkaZoniiRJ0zxPFGma53meacLzPM80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi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ABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"}});var yWe=om((eQo,gWe)=>{var tQo=x(T()),{webm:FPt,mp4:IPt}=bWe(),Nie=()=>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,Yie=()=>"wakeLock"in navigator,wie=class{constructor(){if(this.enabled=!1,Yie()){this._wakeLock=null;let t=()=>{this._wakeLock!==null&&document.visibilityState==="visible"&&this.enable()};document.addEventListener("visibilitychange",t),document.addEventListener("fullscreenchange",t)}else Nie()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",FPt),this._addSourceToVideo(this.noSleepVideo,"mp4",IPt),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 Yie()?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}):Nie()?(this.disable(),console.warn(`
NoSleep enabled for older iOS devices. This can interrupt
active or long-running network requests from completing successfully.
See https://github.com/richtr/NoSleep.js/issues/15 for more details.
`),this.noSleepTimer=window.setInterval(()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))},15e3),this.enabled=!0,Promise.resolve()):this.noSleepVideo.play().then(n=>(this.enabled=!0,n)).catch(n=>{throw this.enabled=!1,n})}disable(){Yie()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):Nie()?this.noSleepTimer&&(console.warn(`
NoSleep now disabled for older iOS devices.
`),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}};gWe.exports=wie});var iXt={};IWe(iXt,{AlphaMode:()=>_p,AlphaPipelineStage:()=>b2,AnchorPointDirect:()=>TF,AnchorPointIndirect:()=>_F,Animation:()=>Tk,AnimationViewModel:()=>_k,Appearance:()=>yo,ApproximateTerrainHeights:()=>Ei,ArcGISTiledElevationTerrainProvider:()=>Ate,ArcGisBaseMapType:()=>tf,ArcGisMapServerImageryProvider:()=>Cb,ArcGisMapService:()=>hu,ArcType:()=>on,ArticulationStageType:()=>$c,AssociativeArray:()=>It,Atmosphere:()=>g_,AtmospherePipelineStage:()=>jF,AttributeCompression:()=>cn,AttributeType:()=>Nt,AutoExposure:()=>lM,AutomaticUniforms:()=>E0,Axis:()=>to,AxisAlignedBoundingBox:()=>au,Azure2DImageryProvider:()=>q2,B3dmLoader:()=>PF,B3dmParser:()=>vF,BaseLayerPicker:()=>Rk,BaseLayerPickerViewModel:()=>Vk,BatchTable:()=>WT,BatchTableHierarchy:()=>e_,BatchTexture:()=>wl,BatchTexturePipelineStage:()=>g2,Billboard:()=>Ao,BillboardCollection:()=>Tu,BillboardGraphics:()=>Oc,BillboardLoadState:()=>Ps,BillboardTexture:()=>Gb,BillboardVisualizer:()=>aW,BingMapsGeocoderService:()=>Cte,BingMapsImageryProvider:()=>U2,BingMapsStyle:()=>WC,BlendEquation:()=>_c,BlendFunction:()=>Do,BlendOption:()=>zo,BlendingState:()=>tn,BoundingRectangle:()=>Qe,BoundingSphere:()=>de,BoundingSphereState:()=>xt,BoundingVolumeSemantics:()=>Cy,BoxEmitter:()=>_ne,BoxGeometry:()=>xc,BoxGeometryUpdater:()=>Tv,BoxGraphics:()=>wT,BoxOutlineGeometry:()=>Ih,BrdfLutGenerator:()=>aw,Buffer:()=>qe,BufferLoader:()=>s_,BufferPoint:()=>Kl,BufferPointCollection:()=>Xm,BufferPointMaterial:()=>ff,BufferPolygon:()=>ha,BufferPolygonCollection:()=>Ym,BufferPolygonMaterial:()=>pf,BufferPolyline:()=>nl,BufferPolylineCollection:()=>Mm,BufferPolylineMaterial:()=>bf,BufferPrimitive:()=>Qr,BufferPrimitiveCollection:()=>Ks,BufferPrimitiveMaterial:()=>Jl,BufferUsage:()=>Fe,CPUStylingPipelineStage:()=>_2,CallbackPositionProperty:()=>_v,CallbackProperty:()=>Mh,Camera:()=>To,CameraEventAggregator:()=>bM,CameraEventType:()=>$i,CameraFlightPath:()=>lw,Cartesian2:()=>M,Cartesian3:()=>m,Cartesian4:()=>se,CartesianRectangle:()=>DC,Cartographic:()=>pe,CartographicGeocoderService:()=>Rte,CatmullRomSpline:()=>Ete,Cesium3DContentGroup:()=>$T,Cesium3DTile:()=>Hm,Cesium3DTileBatchTable:()=>Oh,Cesium3DTileColorBlendMode:()=>Cd,Cesium3DTileContent:()=>Sne,Cesium3DTileContentFactory:()=>Q_,Cesium3DTileContentState:()=>dr,Cesium3DTileContentType:()=>pa,Cesium3DTileFeature:()=>Bs,Cesium3DTileFeatureTable:()=>Qh,Cesium3DTileOptimizationHint:()=>Um,Cesium3DTileOptimizations:()=>oX,Cesium3DTilePass:()=>er,Cesium3DTilePassState:()=>uh,Cesium3DTilePointFeature:()=>Lb,Cesium3DTileRefine:()=>sr,Cesium3DTileStyle:()=>Xb,Cesium3DTileStyleEngine:()=>dX,Cesium3DTileVectorFeature:()=>K_,Cesium3DTilesInspector:()=>Ck,Cesium3DTilesInspectorViewModel:()=>Zk,Cesium3DTilesTerrainData:()=>R9,Cesium3DTilesTerrainGeometryProcessor:()=>s1,Cesium3DTilesTerrainProvider:()=>Ite,Cesium3DTilesVoxelProvider:()=>Ane,Cesium3DTileset:()=>Js,Cesium3DTilesetBaseTraversal:()=>bX,Cesium3DTilesetCache:()=>aX,Cesium3DTilesetGraphics:()=>zT,Cesium3DTilesetHeatmap:()=>cX,Cesium3DTilesetMetadata:()=>aS,Cesium3DTilesetMostDetailedTraversal:()=>hX,Cesium3DTilesetSkipTraversal:()=>xX,Cesium3DTilesetStatistics:()=>gf,Cesium3DTilesetTraversal:()=>Na,Cesium3DTilesetVisualizer:()=>TX,CesiumInspector:()=>vk,CesiumInspectorViewModel:()=>Wk,CesiumTerrainProvider:()=>IA,CesiumWidget:()=>A9,Check:()=>No,CheckerboardMaterialProperty:()=>hV,CircleEmitter:()=>B9,CircleGeometry:()=>Mte,CircleOutlineGeometry:()=>kte,ClassificationModelDrawCommand:()=>YI,ClassificationPipelineStage:()=>y2,ClassificationPrimitive:()=>RZ,ClassificationType:()=>Jn,ClearCommand:()=>si,ClippingPlane:()=>zs,ClippingPlaneCollection:()=>as,ClippingPolygon:()=>lC,ClippingPolygonCollection:()=>Kh,Clock:()=>Af,ClockRange:()=>ys,ClockStep:()=>Fo,ClockViewModel:()=>gk,CloudCollection:()=>Ene,CloudType:()=>h1,Color:()=>U,ColorBlendMode:()=>qc,ColorGeometryInstanceAttribute:()=>Ht,ColorMaterialProperty:()=>Bt,Command:()=>Aie,ComponentDatatype:()=>K,Composite3DTileContent:()=>Lv,CompositeEntityCollection:()=>O8,CompositeMaterialProperty:()=>pV,CompositePositionProperty:()=>oc,CompositeProperty:()=>sl,CompressedTextureBuffer:()=>J1,ComputeCommand:()=>xl,ComputeEngine:()=>K1,ConditionsExpression:()=>wP,ConeEmitter:()=>Lne,ConstantPositionProperty:()=>Wl,ConstantProperty:()=>ci,ConstantSpline:()=>wF,ContentMetadata:()=>JP,Context:()=>VT,ContextLimits:()=>Lt,CoplanarPolygonGeometry:()=>iN,CoplanarPolygonGeometryLibrary:()=>kb,CoplanarPolygonOutlineGeometry:()=>zm,CornerType:()=>Ji,CorrelationGroup:()=>SF,CorridorGeometry:()=>mS,CorridorGeometryLibrary:()=>oo,CorridorGeometryUpdater:()=>GX,CorridorGraphics:()=>kT,CorridorOutlineGeometry:()=>EX,Credit:()=>bt,CreditDisplay:()=>hw,CubeMap:()=>Br,CubeMapFace:()=>rE,CubeMapPanorama:()=>VA,CubicRealPolynomial:()=>yT,CullFace:()=>Pi,CullingVolume:()=>Os,CumulusCloud:()=>em,CustomDataSource:()=>IX,CustomHeightmapTerrainProvider:()=>Ute,CustomShader:()=>TA,CustomShaderMode:()=>Zb,CustomShaderPipelineStage:()=>E2,CustomShaderTranslucencyMode:()=>Ny,CylinderGeometry:()=>PX,CylinderGeometryLibrary:()=>hS,CylinderGeometryUpdater:()=>NX,CylinderGraphics:()=>UT,CylinderOutlineGeometry:()=>XX,CzmlDataSource:()=>HX,DataSource:()=>gs,DataSourceClock:()=>Zf,DataSourceCollection:()=>KX,DataSourceDisplay:()=>NN,DebugAppearance:()=>Wne,DebugCameraPrimitive:()=>l0,DebugInspector:()=>ZM,DebugModelMatrixPrimitive:()=>H9,DefaultProxy:()=>Dte,DepthFunction:()=>qa,DepthPlane:()=>_w,DequantizationPipelineStage:()=>L2,DerivedCommand:()=>d0,DeveloperError:()=>he,DeviceOrientationCameraController:()=>Sw,DirectionalLight:()=>vne,DiscardEmptyTileImagePolicy:()=>vC,DiscardMissingTileImagePolicy:()=>M2,DistanceDisplayCondition:()=>Yt,DistanceDisplayConditionGeometryInstanceAttribute:()=>Kn,DoubleEndedPriorityQueue:()=>Wg,DoublyLinkedList:()=>sX,DracoLoader:()=>ab,DrawCommand:()=>et,DynamicAtmosphereLightingType:()=>hb,DynamicEnvironmentMapManager:()=>fb,DynamicGeometryBatch:()=>TS,DynamicGeometryUpdater:()=>xi,EarthOrientationParameters:()=>M1,EarthOrientationParametersSample:()=>Og,EasingFunction:()=>Ts,EdgeDetectionPipelineStage:()=>v2,EdgeFramebuffer:()=>Gw,EdgeVisibilityPipelineStage:()=>P2,EllipseGeometry:()=>nd,EllipseGeometryLibrary:()=>Yd,EllipseGeometryUpdater:()=>jX,EllipseGraphics:()=>DT,EllipseOutlineGeometry:()=>vu,Ellipsoid:()=>ie,EllipsoidGeodesic:()=>z0,EllipsoidGeometry:()=>wa,EllipsoidGeometryUpdater:()=>qX,EllipsoidGraphics:()=>OT,EllipsoidOutlineGeometry:()=>Zu,EllipsoidPrimitive:()=>tw,EllipsoidRhumbLine:()=>Sc,EllipsoidSurfaceAppearance:()=>Fne,EllipsoidTangentPlane:()=>Rs,EllipsoidTerrainProvider:()=>s0,EllipsoidalOccluder:()=>_f,Empty3DTileContent:()=>eV,EncodedCartesian3:()=>Tn,Entity:()=>Oo,EntityCluster:()=>Vu,EntityCollection:()=>Ya,EntityView:()=>wN,EquirectangularPanorama:()=>Ine,Event:()=>_e,EventHelper:()=>vr,Expression:()=>_m,ExpressionNodeType:()=>Ct,ExtrapolationType:()=>Eu,FeatureDetection:()=>an,FeatureIdPipelineStage:()=>Xy,Fog:()=>Aw,ForEach:()=>Ne,FrameRateMonitor:()=>Q9,FrameState:()=>Zw,Framebuffer:()=>os,FramebufferManager:()=>yi,Frozen:()=>B,FrustumCommands:()=>Lw,FrustumGeometry:()=>qS,FrustumOutlineGeometry:()=>bw,Fullscreen:()=>Ur,FullscreenButton:()=>Ik,FullscreenButtonViewModel:()=>Fk,GaussianSplat3DTileContent:()=>jy,GaussianSplatPrimitive:()=>KP,GaussianSplatRenderResources:()=>DP,GaussianSplatSorter:()=>J_,GaussianSplatTextureGenerator:()=>UP,GeoJsonDataSource:()=>xx,GeoJsonLoader:()=>XF,GeocodeType:()=>Jx,Geocoder:()=>Xk,GeocoderService:()=>l1,GeocoderViewModel:()=>Pk,GeographicProjection:()=>Di,GeographicTilingScheme:()=>zi,Geometry:()=>ft,Geometry3DTileContent:()=>Fv,GeometryAttribute:()=>Ie,GeometryAttributes:()=>bn,GeometryFactory:()=>Ote,GeometryInstance:()=>Wt,GeometryInstanceAttribute:()=>Bc,GeometryOffsetAttribute:()=>dn,GeometryPipeline:()=>Un,GeometryPipelineStage:()=>w2,GeometryType:()=>cm,GeometryUpdater:()=>Ti,GeometryUpdaterSet:()=>WS,GeometryVisualizer:()=>ZN,GetFeatureInfoFormat:()=>nf,Globe:()=>QY,GlobeDepth:()=>Ww,GlobeSurfaceShaderSet:()=>MY,GlobeSurfaceTile:()=>lh,GlobeSurfaceTileProvider:()=>UY,GlobeTranslucency:()=>DY,GlobeTranslucencyFramebuffer:()=>vw,GlobeTranslucencyState:()=>Cw,GltfBufferViewLoader:()=>DZ,GltfDracoLoader:()=>OZ,GltfGpmLoader:()=>ZF,GltfGpmLocal:()=>hC,GltfImageLoader:()=>BZ,GltfIndexBufferLoader:()=>zZ,GltfJsonLoader:()=>KZ,GltfLoader:()=>mu,GltfLoaderUtil:()=>Ed,GltfMeshPrimitiveGpmLoader:()=>EF,GltfSpzLoader:()=>jv,GltfStructuralMetadataLoader:()=>yF,GltfTextureLoader:()=>qZ,GltfVertexBufferLoader:()=>$Z,Google2DImageryProvider:()=>Q2,GoogleEarthEnterpriseImageryProvider:()=>Xne,GoogleEarthEnterpriseMapsProvider:()=>B2,GoogleEarthEnterpriseMetadata:()=>Pg,GoogleEarthEnterpriseTerrainData:()=>d1,GoogleEarthEnterpriseTerrainProvider:()=>Qte,GoogleEarthEnterpriseTileInformation:()=>G9,GoogleGeocoderService:()=>$te,GoogleMaps:()=>ua,GoogleStreetViewCubeMapPanoramaProvider:()=>Nne,GpxDataSource:()=>BN,GregorianDate:()=>L0,GridImageryProvider:()=>Yne,GridMaterialProperty:()=>CV,GroundGeometryUpdater:()=>$n,GroundPolylineGeometry:()=>PT,GroundPolylinePrimitive:()=>Ph,GroundPrimitive:()=>El,GroupMetadata:()=>dV,HeadingPitchRange:()=>ih,HeadingPitchRoll:()=>yc,Heap:()=>X1,HeightReference:()=>tt,HeightmapEncoding:()=>ah,HeightmapTerrainData:()=>Wc,HeightmapTessellator:()=>ER,HermitePolynomialApproximation:()=>YX,HermiteSpline:()=>Iy,HilbertOrder:()=>wZ,HomeButton:()=>Yk,HomeButtonViewModel:()=>Nk,HorizontalOrigin:()=>Ii,I3SBuildingSceneLayerExplorer:()=>vie,I3SBuildingSceneLayerExplorerViewModel:()=>wk,I3SDataProvider:()=>$f,I3SDecoder:()=>q9,I3SFeature:()=>$9,I3SField:()=>ek,I3SGeometry:()=>f1,I3SLayer:()=>OA,I3SNode:()=>p1,I3SStatistics:()=>ik,I3SSublayer:()=>rk,I3SSymbology:()=>nk,I3dmLoader:()=>YF,I3dmParser:()=>NF,ITwinData:()=>Une,ITwinPlatform:()=>ea,Iau2000Orientation:()=>$Y,Iau2006XysData:()=>k1,Iau2006XysSample:()=>fT,IauOrientationAxes:()=>ew,IauOrientationParameters:()=>qY,ImageBasedLighting:()=>qT,ImageBasedLightingPipelineStage:()=>qF,ImageMaterialProperty:()=>ly,Imagery:()=>kC,ImageryConfiguration:()=>KI,ImageryCoverage:()=>OC,ImageryFlags:()=>tI,ImageryInput:()=>iI,ImageryLayer:()=>ms,ImageryLayerCollection:()=>lS,ImageryLayerFeatureInfo:()=>ef,ImageryPipelineStage:()=>oI,ImageryProvider:()=>fu,ImageryState:()=>Bn,Implicit3DTileContent:()=>iC,ImplicitAvailabilityBitstream:()=>kZ,ImplicitMetadataView:()=>UZ,ImplicitSubdivisionScheme:()=>Ws,ImplicitSubtree:()=>db,ImplicitSubtreeCache:()=>D9,ImplicitSubtreeMetadata:()=>Pv,ImplicitTileCoordinates:()=>Pp,ImplicitTileset:()=>Ip,IndexDatatype:()=>Me,InfoBox:()=>kk,InfoBoxViewModel:()=>Mk,InspectorShared:()=>qd,InstanceAttributeSemantic:()=>_r,InstancingPipelineStage:()=>m2,InterpolationAlgorithm:()=>ene,InterpolationType:()=>jh,Intersect:()=>zt,IntersectionTests:()=>ai,Intersections2D:()=>Kf,Interval:()=>Or,InvertClassification:()=>UR,Ion:()=>Uh,IonGeocodeProviderType:()=>Xg,IonGeocoderService:()=>XA,IonImageryProvider:()=>Bl,IonImageryProviderFactory:()=>wC,IonResource:()=>ss,IonWorldImageryStyle:()=>Rb,Iso8601:()=>Je,JobScheduler:()=>Vw,JobType:()=>Cc,JsonMetadataTable:()=>pb,JulianDate:()=>Q,KTX2Transcoder:()=>j1,KeyboardEventModifier:()=>Oa,KeyframeNode:()=>Po,KmlCamera:()=>zN,KmlDataSource:()=>DS,KmlLookAt:()=>VY,KmlTour:()=>RY,KmlTourFlyTo:()=>GY,KmlTourWait:()=>LY,Label:()=>Oy,LabelCollection:()=>Lp,LabelGraphics:()=>Nh,LabelStyle:()=>ar,LabelVisualizer:()=>CN,LagrangePolynomialApproximation:()=>wX,LeapSecond:()=>so,Light:()=>Dne,LightingModel:()=>Rp,LightingPipelineStage:()=>sI,LinearApproximation:()=>pS,LinearSpline:()=>Fy,ManagedArray:()=>Yl,MapMode2D:()=>sd,MapProjection:()=>one,MapboxImageryProvider:()=>z2,MapboxStyleImageryProvider:()=>One,MappedPositions:()=>nI,Material:()=>Bi,MaterialAppearance:()=>po,MaterialPipelineStage:()=>dI,MaterialProperty:()=>yr,Math:()=>W,Matrix2:()=>Oi,Matrix3:()=>q,Matrix4:()=>F,Megatexture:()=>jM,MeshPrimitiveGpmLocal:()=>RF,MetadataClass:()=>Hh,MetadataClassProperty:()=>yp,MetadataComponentType:()=>Pt,MetadataEntity:()=>On,MetadataEnum:()=>$v,MetadataEnumValue:()=>qv,MetadataPicking:()=>Rw,MetadataPickingPipelineStage:()=>gu,MetadataPipelineStage:()=>Em,MetadataSchema:()=>Ml,MetadataSchemaLoader:()=>Ay,MetadataSemantic:()=>Cm,MetadataTable:()=>Sm,MetadataTableProperty:()=>Nv,MetadataType:()=>gt,MipmapHint:()=>um,Model:()=>yu,Model3DTileContent:()=>xu,ModelAlphaOptions:()=>G_,ModelAnimation:()=>DF,ModelAnimationChannel:()=>UF,ModelAnimationCollection:()=>OF,ModelAnimationLoop:()=>Gd,ModelAnimationState:()=>qh,ModelArticulation:()=>e2,ModelArticulationStage:()=>$F,ModelClippingPlanesPipelineStage:()=>i2,ModelClippingPolygonsPipelineStage:()=>s2,ModelColorPipelineStage:()=>Py,ModelComponents:()=>yn,ModelDrawCommand:()=>MI,ModelDrawCommands:()=>DI,ModelFeature:()=>BF,ModelFeatureTable:()=>zF,ModelGraphics:()=>Q0,ModelImagery:()=>JI,ModelImageryMapping:()=>V_,ModelLightingOptions:()=>PI,ModelMatrixUpdateStage:()=>h2,ModelNode:()=>a2,ModelPrimitiveImagery:()=>R_,ModelReader:()=>la,ModelRenderResources:()=>EI,ModelRuntimeNode:()=>p2,ModelRuntimePrimitive:()=>VI,ModelSceneGraph:()=>OI,ModelSilhouettePipelineStage:()=>WI,ModelSkin:()=>RI,ModelSplitterPipelineStage:()=>FI,ModelStatistics:()=>BI,ModelType:()=>Lr,ModelUtility:()=>mt,ModelVisualizer:()=>VN,Moon:()=>iw,MorphTargetsPipelineStage:()=>mI,MorphWeightSpline:()=>rne,MortonOrder:()=>$y,Multiple3DTileContent:()=>qP,MultisampleFramebuffer:()=>QL,NavigationHelpButton:()=>Dk,NavigationHelpButtonViewModel:()=>Uk,NearFarScalar:()=>wt,NeverTileDiscardPolicy:()=>zne,NodeRenderResources:()=>II,NodeStatisticsPipelineStage:()=>f2,NodeTransformationProperty:()=>BT,OIT:()=>Iw,Occluder:()=>ow,OffsetGeometryInstanceAttribute:()=>fo,OpenCageGeocoderService:()=>ane,OpenStreetMapImageryProvider:()=>Yg,OrderedGroundPrimitiveCollection:()=>JX,OrientedBoundingBox:()=>$t,OrthographicFrustum:()=>mn,OrthographicOffCenterFrustum:()=>rs,Packable:()=>cne,PackableForInterpolation:()=>lne,Panorama:()=>Hne,PanoramaProvider:()=>Kne,Particle:()=>y1,ParticleBurst:()=>jne,ParticleEmitter:()=>Qne,ParticleSystem:()=>qne,Pass:()=>Le,PassState:()=>Dc,PathGraphics:()=>q0,PathVisualizer:()=>GN,PeliasGeocoderService:()=>W9,PerInstanceColorAppearance:()=>hn,PerformanceDisplay:()=>_g,PerformanceWatchdog:()=>Bk,PerformanceWatchdogViewModel:()=>Ok,PerspectiveFrustum:()=>Mi,PerspectiveOffCenterFrustum:()=>rd,PickDepth:()=>Ew,PickDepthFramebuffer:()=>Xw,PickFramebuffer:()=>Nw,PickId:()=>dE,PickedMetadataInfo:()=>n9,Picking:()=>Dw,PickingPipelineStage:()=>hI,PinBuilder:()=>mg,PixelDatatype:()=>Oe,PixelFormat:()=>Ke,Plane:()=>nn,PlaneGeometry:()=>$X,PlaneGeometryUpdater:()=>tN,PlaneGraphics:()=>hv,PlaneOutlineGeometry:()=>eN,PntsLoader:()=>HI,PntsParser:()=>v_,PointCloud:()=>_9,PointCloudEyeDomeLighting:()=>gb,PointCloudShading:()=>Ap,PointCloudStylingPipelineStage:()=>pI,PointGraphics:()=>HT,PointPrimitive:()=>xa,PointPrimitiveCollection:()=>TV,PointVisualizer:()=>WN,PolygonGeometry:()=>mb,PolygonGeometryLibrary:()=>Qn,PolygonGeometryUpdater:()=>rN,PolygonGraphics:()=>Yh,PolygonHierarchy:()=>Ac,PolygonOutlineGeometry:()=>oN,PolygonPipeline:()=>Si,Polyline:()=>Fm,PolylineArrowMaterialProperty:()=>RV,PolylineCollection:()=>lf,PolylineColorAppearance:()=>Es,PolylineDashMaterialProperty:()=>GV,PolylineGeometry:()=>ug,PolylineGeometryUpdater:()=>IN,PolylineGlowMaterialProperty:()=>WV,PolylineGraphics:()=>zc,PolylineMaterialAppearance:()=>$a,PolylineOutlineMaterialProperty:()=>ax,PolylinePipeline:()=>Ki,PolylineVisualizer:()=>XN,PolylineVolumeGeometry:()=>cN,PolylineVolumeGeometryLibrary:()=>yf,PolylineVolumeGeometryUpdater:()=>mN,PolylineVolumeGraphics:()=>KT,PolylineVolumeOutlineGeometry:()=>uN,PositionProperty:()=>Xh,PositionPropertyArray:()=>tg,PostProcessStage:()=>Vo,PostProcessStageCollection:()=>mM,PostProcessStageComposite:()=>Hd,PostProcessStageLibrary:()=>Bu,PostProcessStageSampleMode:()=>Ou,PostProcessStageTextureCache:()=>uA,PpeMetadata:()=>VF,PpeSource:()=>xie,PpeTexture:()=>CF,Primitive:()=>Ln,PrimitiveCollection:()=>td,PrimitiveLoadPlan:()=>__,PrimitiveOutlineGenerator:()=>T_,PrimitiveOutlinePipelineStage:()=>yI,PrimitivePipeline:()=>vT,PrimitiveRenderResources:()=>XI,PrimitiveState:()=>Hr,PrimitiveStatisticsPipelineStage:()=>xI,PrimitiveType:()=>ve,ProjectionPicker:()=>Hk,ProjectionPickerViewModel:()=>zk,Property:()=>j,PropertyArray:()=>FV,PropertyAttribute:()=>y_,PropertyAttributeProperty:()=>fF,PropertyBag:()=>Fl,PropertyTable:()=>Dl,PropertyTexture:()=>bb,PropertyTextureProperty:()=>hF,ProviderViewModel:()=>nr,Proxy:()=>dne,QuadraticRealPolynomial:()=>Sl,QuadtreeOccluders:()=>OY,QuadtreePrimitive:()=>jY,QuadtreeTile:()=>BY,QuadtreeTileLoadState:()=>Ua,QuadtreeTileProvider:()=>eie,QuantizedMeshTerrainData:()=>FA,QuarticRealPolynomial:()=>$1,Quaternion:()=>Pe,QuaternionSpline:()=>kF,Queue:()=>Ey,Ray:()=>gn,Rectangle:()=>ae,RectangleCollisionChecker:()=>FS,RectangleGeometry:()=>CS,RectangleGeometryLibrary:()=>ga,RectangleGeometryUpdater:()=>hN,RectangleGraphics:()=>wh,RectangleOutlineGeometry:()=>eS,ReferenceFrame:()=>Xi,ReferenceProperty:()=>ng,RenderState:()=>De,Renderbuffer:()=>ru,RenderbufferFormat:()=>Cl,Request:()=>fr,RequestErrorEvent:()=>ip,RequestScheduler:()=>Mc,RequestState:()=>ui,RequestType:()=>ks,Resource:()=>We,ResourceCache:()=>vi,ResourceCacheKey:()=>kl,ResourceCacheStatistics:()=>nF,ResourceLoader:()=>Hi,ResourceLoaderState:()=>ut,Rotation:()=>Qm,RuntimeError:()=>le,S2Cell:()=>ob,SDFSettings:()=>Pa,SampledPositionProperty:()=>sc,SampledProperty:()=>Lu,Sampler:()=>Ut,ScaledPositionProperty:()=>Dp,Scene:()=>o9,SceneFramebuffer:()=>oA,SceneMode:()=>re,SceneMode2DPipelineStage:()=>TI,SceneModePicker:()=>Jk,SceneModePickerViewModel:()=>Kk,SceneTransforms:()=>no,SceneTransitioner:()=>pM,ScreenSpaceCameraController:()=>xM,ScreenSpaceEventHandler:()=>Hu,ScreenSpaceEventType:()=>Vn,SelectedFeatureIdPipelineStage:()=>Yy,SelectionIndicator:()=>qk,SelectionIndicatorViewModel:()=>Qk,SensorVolumePortionToDisplay:()=>NV,ShaderBuilder:()=>M0,ShaderCache:()=>BL,ShaderDestination:()=>fe,ShaderFunction:()=>eW,ShaderProgram:()=>qt,ShaderSource:()=>Be,ShaderStruct:()=>$L,ShadowMap:()=>Zg,ShadowMapShader:()=>h0,ShadowMode:()=>Cn,ShadowVolumeAppearance:()=>cu,SharedContext:()=>tW,ShowGeometryInstanceAttribute:()=>Zn,Simon1994PlanetaryPositions:()=>ey,SimplePolylineGeometry:()=>une,SingleTileImageryProvider:()=>H2,SkinningPipelineStage:()=>SI,SkyAtmosphere:()=>a9,SkyBox:()=>m9,SpatialNode:()=>qM,Spdcf:()=>AF,SpecularEnvironmentCubeMap:()=>kh,SphereEmitter:()=>nie,SphereGeometry:()=>F9,SphereOutlineGeometry:()=>Db,Spherical:()=>MX,Spline:()=>xo,SplitDirection:()=>Er,Splitter:()=>$R,StaticGeometryColorBatch:()=>th,StaticGeometryPerMaterialBatch:()=>nh,StaticGroundGeometryColorBatch:()=>iR,StaticGroundGeometryPerMaterialBatch:()=>AN,StaticGroundPolylinePerMaterialBatch:()=>PN,StaticOutlineGeometryBatch:()=>sR,StencilConstants:()=>Ot,StencilFunction:()=>jn,StencilOperation:()=>Zt,SteppedSpline:()=>MF,Stereographic:()=>Qc,StorageType:()=>Ly,StripeMaterialProperty:()=>PV,StripeOrientation:()=>Cf,StructuralMetadata:()=>va,StyleCommandsNeeded:()=>$h,StyleExpression:()=>iie,Sun:()=>y9,SunLight:()=>w0,SunPostProcess:()=>SM,SupportedImageFormats:()=>xF,SvgPathBindingHandler:()=>pk,Sync:()=>nW,TaskProcessor:()=>Hn,Terrain:()=>lk,TerrainData:()=>Od,TerrainEncoding:()=>mr,TerrainFillMesh:()=>FR,TerrainMesh:()=>uc,TerrainOffsetProperty:()=>JT,TerrainPicker:()=>XY,TerrainProvider:()=>Mo,TerrainQuantization:()=>ka,TerrainState:()=>Co,Texture:()=>Et,Texture3D:()=>iW,TextureAtlas:()=>ET,TextureCache:()=>zL,TextureMagnificationFilter:()=>ni,TextureManager:()=>OM,TextureMinificationFilter:()=>kt,TexturePacker:()=>xZ,TextureUniform:()=>gie,TextureWrap:()=>un,TileAvailability:()=>Hf,TileBoundingRegion:()=>Au,TileBoundingS2Cell:()=>nX,TileBoundingSphere:()=>Ob,TileBoundingVolume:()=>oie,TileCoordinatesImageryProvider:()=>uk,TileDiscardPolicy:()=>sie,TileEdge:()=>Sn,TileImagery:()=>UC,TileMapServiceImageryProvider:()=>wy,TileMetadata:()=>jP,TileOrientedBoundingBox:()=>Pd,TileProviderError:()=>Bo,TileReplacementQueue:()=>zY,TileSelectionResult:()=>oi,TileState:()=>aie,Tileset3DTileContent:()=>qI,TilesetMetadata:()=>iX,TilesetPipelineStage:()=>HF,TilingScheme:()=>hne,TimeConstants:()=>ii,TimeDynamicImagery:()=>C_,TimeDynamicPointCloud:()=>t1,TimeInterval:()=>En,TimeIntervalCollection:()=>bs,TimeIntervalCollectionPositionProperty:()=>ig,TimeIntervalCollectionProperty:()=>og,TimeStandard:()=>ti,Timeline:()=>tU,TimelineHighlightRange:()=>$k,TimelineTrack:()=>eU,Tipsify:()=>eE,ToggleButtonViewModel:()=>$x,Tonemapper:()=>Vg,TrackingReferenceFrame:()=>B0,Transforms:()=>dt,TranslationRotationScale:()=>dy,TranslucentTileClassification:()=>ww,TridiagonalSystemSolver:()=>TC,TrustedServers:()=>sZ,TweenCollection:()=>pA,UniformState:()=>jL,UniformType:()=>KR,UrlTemplateImageryProvider:()=>us,VERSION:()=>nXt,VRButton:()=>iU,VRButtonViewModel:()=>nU,VRTheWorldTerrainProvider:()=>fne,VaryingType:()=>yie,Vector3DTileBatch:()=>bp,Vector3DTileClampedPolylines:()=>xP,Vector3DTileContent:()=>_P,Vector3DTileGeometry:()=>ib,Vector3DTilePoints:()=>mP,Vector3DTilePolygons:()=>hP,Vector3DTilePolylines:()=>w_,Vector3DTilePrimitive:()=>i_,VectorGltf3DTileContent:()=>$C,VelocityOrientationProperty:()=>UX,VelocityVectorProperty:()=>rg,VertexArray:()=>Mn,VertexArrayFacade:()=>k0,VertexAttributeSemantic:()=>nt,VertexFormat:()=>Xe,VerticalExaggeration:()=>ao,VerticalExaggerationPipelineStage:()=>ZI,VerticalOrigin:()=>Dn,VideoSynchronizer:()=>pne,View:()=>aA,Viewer:()=>kie,ViewportQuad:()=>cie,Visibility:()=>Nr,Visualizer:()=>c$,VoxelBoundsCollection:()=>Gg,VoxelBoxShape:()=>SA,VoxelCell:()=>CM,VoxelContent:()=>_A,VoxelCylinderShape:()=>AA,VoxelEllipsoidShape:()=>ZA,VoxelInspector:()=>rU,VoxelInspectorViewModel:()=>oU,VoxelMetadataOrder:()=>g0,VoxelPrimitive:()=>Ox,VoxelProvider:()=>die,VoxelRenderResources:()=>kM,VoxelShape:()=>uie,VoxelShapeType:()=>fc,VoxelTraversal:()=>$M,VulkanConstants:()=>bne,WallGeometry:()=>pN,WallGeometryLibrary:()=>VS,WallGeometryUpdater:()=>yN,WallGraphics:()=>$0,WallOutlineGeometry:()=>gN,WebGLConstants:()=>ne,WebMapServiceImageryProvider:()=>J2,WebMapTileServiceImageryProvider:()=>j2,WebMercatorProjection:()=>li,WebMercatorTilingScheme:()=>Fs,WindingOrder:()=>Us,WireframeIndexGenerator:()=>BC,WireframePipelineStage:()=>CI,_shadersAcesTonemappingStage:()=>Ow,_shadersAdditiveBlend:()=>TM,_shadersAdjustTranslucentFS:()=>DR,_shadersAllMaterialAppearanceFS:()=>dW,_shadersAllMaterialAppearanceVS:()=>uW,_shadersAmbientOcclusionGenerate:()=>Bw,_shadersAmbientOcclusionModulate:()=>zw,_shadersAspectRampMaterial:()=>bW,_shadersAtmosphereCommon:()=>Jh,_shadersAtmosphereStageFS:()=>KF,_shadersAtmosphereStageVS:()=>JF,_shadersBasicMaterialAppearanceFS:()=>mW,_shadersBasicMaterialAppearanceVS:()=>hW,_shadersBillboardCollectionFS:()=>$I,_shadersBillboardCollectionVS:()=>eP,_shadersBlackAndWhite:()=>Hw,_shadersBloomComposite:()=>Kw,_shadersBrdfLutGeneratorFS:()=>rw,_shadersBrightPass:()=>_M,_shadersBrightness:()=>Jw,_shadersBufferPointMaterialFS:()=>ZP,_shadersBufferPointMaterialVS:()=>AP,_shadersBufferPolygonMaterialFS:()=>WP,_shadersBufferPolygonMaterialVS:()=>LP,_shadersBufferPolylineMaterialFS:()=>PP,_shadersBufferPolylineMaterialVS:()=>IP,_shadersBumpMapMaterial:()=>gW,_shadersCPUStylingStageFS:()=>T2,_shadersCPUStylingStageVS:()=>x2,_shadersCheckerboardMaterial:()=>yW,_shadersCloudCollectionFS:()=>N9,_shadersCloudCollectionVS:()=>Y9,_shadersCloudNoiseFS:()=>w9,_shadersCloudNoiseVS:()=>M9,_shadersCompareAndPackTranslucentDepth:()=>Yw,_shadersCompositeOITFS:()=>Fw,_shadersCompositeTranslucentClassification:()=>sA,_shadersComputeIrradianceFS:()=>cF,_shadersComputeRadianceMapFS:()=>lF,_shadersConstantLodStageFS:()=>lI,_shadersConstantLodStageVS:()=>cI,_shadersContrastBias:()=>jw,_shadersConvolveSpecularMapFS:()=>dF,_shadersConvolveSpecularMapVS:()=>uF,_shadersCubeMapPanoramaVS:()=>d9,_shadersCustomShaderStageFS:()=>A2,_shadersCustomShaderStageVS:()=>S2,_shadersCzmBuiltins:()=>ZT,_shadersDepthOfField:()=>Qw,_shadersDepthPlaneFS:()=>gw,_shadersDepthPlaneVS:()=>yw,_shadersDepthView:()=>qw,_shadersDepthViewPacked:()=>bie,_shadersDotMaterial:()=>xW,_shadersEdgeDetection:()=>$w,_shadersEdgeDetectionStageFS:()=>W2,_shadersEdgeVisibilityStageFS:()=>F2,_shadersEdgeVisibilityStageVS:()=>I2,_shadersElevationBandMaterial:()=>TW,_shadersElevationContourMaterial:()=>_W,_shadersElevationRampMaterial:()=>SW,_shadersEllipsoidFS:()=>PR,_shadersEllipsoidSurfaceAppearanceFS:()=>K9,_shadersEllipsoidSurfaceAppearanceVS:()=>J9,_shadersEllipsoidVS:()=>XR,_shadersFXAA:()=>nM,_shadersFXAA3_11:()=>cM,_shadersFadeMaterial:()=>AW,_shadersFeatureIdStageFS:()=>Z2,_shadersFeatureIdStageVS:()=>C2,_shadersFilmicTonemapping:()=>eM,_shadersGaussianBlur1D:()=>kx,_shadersGeometryStageFS:()=>X2,_shadersGeometryStageVS:()=>N2,_shadersGlobeFS:()=>YY,_shadersGlobeVS:()=>wY,_shadersGridMaterial:()=>ZW,_shadersGroundAtmosphere:()=>LR,_shadersHSBToRGB:()=>rG,_shadersHSLToRGB:()=>sG,_shadersImageBasedLightingStageFS:()=>QF,_shadersInstancingStageCommon:()=>c2,_shadersInstancingStageVS:()=>l2,_shadersIntersectBox:()=>FM,_shadersIntersectCylinder:()=>IM,_shadersIntersectDepth:()=>WM,_shadersIntersectEllipsoid:()=>PM,_shadersIntersectLongitude:()=>HR,_shadersIntersectPlane:()=>vM,_shadersIntersection:()=>yA,_shadersIntersectionUtils:()=>LM,_shadersLegacyInstancingStageVS:()=>d2,_shadersLensFlare:()=>iM,_shadersLightingStageFS:()=>rI,_shadersMaterialStageFS:()=>aI,_shadersMegatexture:()=>MM,_shadersMetadataStageFS:()=>V2,_shadersMetadataStageVS:()=>R2,_shadersModelClippingPlanesStageFS:()=>n2,_shadersModelClippingPolygonsStageFS:()=>r2,_shadersModelClippingPolygonsStageVS:()=>o2,_shadersModelColorStageFS:()=>t2,_shadersModelFS:()=>UI,_shadersModelSilhouetteStageFS:()=>GI,_shadersModelSilhouetteStageVS:()=>LI,_shadersModelSplitterStageFS:()=>vI,_shadersModelVS:()=>kI,_shadersModifiedReinhardTonemapping:()=>oM,_shadersMorphTargetsStageVS:()=>uI,_shadersNightVision:()=>rM,_shadersNormalMapMaterial:()=>CW,_shadersOctree:()=>wM,_shadersPassThrough:()=>zd,_shadersPassThroughDepth:()=>Yx,_shadersPbrNeutralTonemapping:()=>tM,_shadersPerInstanceColorAppearanceFS:()=>XW,_shadersPerInstanceColorAppearanceVS:()=>NW,_shadersPerInstanceFlatColorAppearanceFS:()=>LT,_shadersPerInstanceFlatColorAppearanceVS:()=>YW,_shadersPointCloudEyeDomeLighting:()=>LF,_shadersPointCloudStylingStageVS:()=>fI,_shadersPointPrimitiveCollectionFS:()=>sx,_shadersPointPrimitiveCollectionVS:()=>LX,_shadersPolygonSignedDistanceFS:()=>aF,_shadersPolylineArrowMaterial:()=>VW,_shadersPolylineColorAppearanceVS:()=>ev,_shadersPolylineCommon:()=>Ll,_shadersPolylineDashMaterial:()=>RW,_shadersPolylineFS:()=>NT,_shadersPolylineGlowMaterial:()=>EW,_shadersPolylineMaterialAppearanceVS:()=>tv,_shadersPolylineOutlineMaterial:()=>GW,_shadersPolylineShadowVolumeFS:()=>jW,_shadersPolylineShadowVolumeMorphFS:()=>QW,_shadersPolylineShadowVolumeMorphVS:()=>qW,_shadersPolylineShadowVolumeVS:()=>$W,_shadersPolylineVS:()=>sP,_shadersPrimitiveGaussianSplatFS:()=>BP,_shadersPrimitiveGaussianSplatVS:()=>OP,_shadersPrimitiveOutlineStageFS:()=>gI,_shadersPrimitiveOutlineStageVS:()=>bI,_shadersRGBToHSB:()=>aG,_shadersRGBToHSL:()=>cG,_shadersRGBToXYZ:()=>lG,_shadersReinhardTonemapping:()=>sM,_shadersReprojectWebMercatorFS:()=>$2,_shadersReprojectWebMercatorVS:()=>eI,_shadersRimLightingMaterial:()=>LW,_shadersSelectedFeatureIdStageCommon:()=>EC,_shadersShadowVolumeAppearanceFS:()=>CZ,_shadersShadowVolumeAppearanceVS:()=>kW,_shadersShadowVolumeFS:()=>sy,_shadersSilhouette:()=>aM,_shadersSkinningStageVS:()=>_I,_shadersSkyAtmosphereCommon:()=>jR,_shadersSkyAtmosphereFS:()=>r9,_shadersSkyAtmosphereVS:()=>s9,_shadersSkyBoxFS:()=>c9,_shadersSkyBoxVS:()=>l9,_shadersSlopeRampMaterial:()=>WW,_shadersStripeMaterial:()=>vW,_shadersSunFS:()=>h9,_shadersSunTextureFS:()=>f9,_shadersSunVS:()=>p9,_shadersTexturedMaterialAppearanceFS:()=>fW,_shadersTexturedMaterialAppearanceVS:()=>pW,_shadersVector3DTileClampedPolylinesFS:()=>gP,_shadersVector3DTileClampedPolylinesVS:()=>bP,_shadersVector3DTilePolylinesVS:()=>fP,_shadersVectorTileVS:()=>YZ,_shadersVerticalExaggerationStageVS:()=>AI,_shadersViewportQuadFS:()=>k9,_shadersViewportQuadVS:()=>pT,_shadersVoxelFS:()=>EM,_shadersVoxelUtils:()=>RM,_shadersVoxelVS:()=>GM,_shadersWater:()=>IW,_shadersWaterMaskMaterial:()=>FW,_shadersXYZToRGB:()=>dG,_shadersacesTonemapping:()=>uG,_shadersalphaWeight:()=>mG,_shadersantialias:()=>hG,_shadersapplyHSBShift:()=>fG,_shadersapproximateSphericalCoordinates:()=>pG,_shadersapproximateTanh:()=>bG,_shadersbackFacing:()=>gG,_shadersbranchFreeTernary:()=>yG,_shaderscascadeColor:()=>xG,_shaderscascadeDistance:()=>TG,_shaderscascadeMatrix:()=>_G,_shaderscascadeWeights:()=>SG,_shadersclipPolygons:()=>AG,_shaderscolumbusViewMorph:()=>ZG,_shaderscomputeAtmosphereColor:()=>CG,_shaderscomputeGroundAtmosphereScattering:()=>VG,_shaderscomputePosition:()=>RG,_shaderscomputeScattering:()=>EG,_shaderscomputeTextureTransform:()=>GG,_shadersconvertLocalToBoxUv:()=>XM,_shadersconvertLocalToCylinderUv:()=>NM,_shadersconvertLocalToEllipsoidUv:()=>YM,_shaderscosineAndSine:()=>LG,_shadersdecodeRGB8:()=>WG,_shadersdecompressTextureCoordinates:()=>vG,_shadersdegreesPerRadian:()=>uE,_shadersdepthClamp:()=>FG,_shadersdepthRange:()=>mE,_shadersdepthRangeStruct:()=>QE,_shaderseastNorthUpToEyeCoordinates:()=>IG,_shadersellipsoidContainsPoint:()=>PG,_shadersellipsoidTextureCoordinates:()=>XG,_shadersepsilon1:()=>hE,_shadersepsilon2:()=>fE,_shadersepsilon3:()=>pE,_shadersepsilon4:()=>bE,_shadersepsilon5:()=>gE,_shadersepsilon6:()=>yE,_shadersepsilon7:()=>xE,_shadersequalsEpsilon:()=>NG,_shaderseyeOffset:()=>YG,_shaderseyeToWindowCoordinates:()=>wG,_shadersfastApproximateAtan:()=>MG,_shadersfog:()=>kG,_shadersgammaCorrect:()=>UG,_shadersgeodeticSurfaceNormal:()=>DG,_shadersgetDefaultMaterial:()=>OG,_shadersgetDynamicAtmosphereLightDirection:()=>BG,_shadersgetLambertDiffuse:()=>zG,_shadersgetSpecular:()=>HG,_shadersgetWaterNoise:()=>KG,_shadershue:()=>JG,_shadersinfinity:()=>TE,_shadersinverseGamma:()=>jG,_shadersisEmpty:()=>QG,_shadersisFull:()=>qG,_shaderslatitudeToWebMercatorFraction:()=>$G,_shaderslineDistance:()=>eL,_shaderslinearToSrgb:()=>tL,_shadersluminance:()=>nL,_shadersmaterial:()=>qE,_shadersmaterialInput:()=>$E,_shadersmaximumComponent:()=>iL,_shadersmetersPerPixel:()=>oL,_shadersmodelMaterial:()=>eG,_shadersmodelToWindowCoordinates:()=>rL,_shadersmodelVertexOutput:()=>tG,_shadersmultiplyWithColorBalance:()=>sL,_shadersnearFarScalar:()=>aL,_shadersoctDecode:()=>cL,_shadersoneOverPi:()=>_E,_shadersoneOverTwoPi:()=>SE,_shaderspackDepth:()=>lL,_shaderspassCesium3DTile:()=>AE,_shaderspassCesium3DTileClassification:()=>ZE,_shaderspassCesium3DTileClassificationIgnoreShow:()=>CE,_shaderspassCesium3DTileEdges:()=>VE,_shaderspassClassification:()=>RE,_shaderspassCompute:()=>EE,_shaderspassEnvironment:()=>GE,_shaderspassGaussianSplats:()=>LE,_shaderspassGlobe:()=>WE,_shaderspassOpaque:()=>vE,_shaderspassOverlay:()=>FE,_shaderspassTerrainClassification:()=>IE,_shaderspassTranslucent:()=>PE,_shaderspassVoxels:()=>XE,_shaderspbrLighting:()=>dL,_shaderspbrNeutralTonemapping:()=>uL,_shadersphong:()=>mL,_shaderspi:()=>NE,_shaderspiOverFour:()=>YE,_shaderspiOverSix:()=>wE,_shaderspiOverThree:()=>ME,_shaderspiOverTwo:()=>kE,_shadersplaneDistance:()=>hL,_shaderspointAlongRay:()=>fL,_shadersradiansPerDegree:()=>UE,_shadersray:()=>nG,_shadersrayEllipsoidIntersectionInterval:()=>pL,_shadersraySegment:()=>iG,_shadersraySphereIntersectionInterval:()=>bL,_shadersreadDepth:()=>gL,_shadersreadNonPerspective:()=>yL,_shadersreverseLogDepth:()=>xL,_shadersround:()=>TL,_shaderssaturation:()=>_L,_shaderssceneMode2D:()=>DE,_shaderssceneMode3D:()=>OE,_shaderssceneModeColumbusView:()=>BE,_shaderssceneModeMorphing:()=>zE,_shadersshadowDepthCompare:()=>SL,_shadersshadowParameters:()=>oG,_shadersshadowVisibility:()=>AL,_shaderssignNotZero:()=>ZL,_shaderssolarRadius:()=>HE,_shaderssphericalHarmonics:()=>CL,_shaderssrgbToLinear:()=>VL,_shaderstangentToEyeSpaceMatrix:()=>RL,_shaderstextureCube:()=>EL,_shadersthreePiOver2:()=>KE,_shaderstransformPlane:()=>GL,_shaderstranslateRelativeToEye:()=>LL,_shaderstranslucentPhong:()=>WL,_shaderstranspose:()=>vL,_shaderstwoPi:()=>JE,_shadersunpackClippingExtents:()=>FL,_shadersunpackDepth:()=>IL,_shadersunpackFloat:()=>PL,_shadersunpackTexture:()=>XL,_shadersunpackUint:()=>NL,_shadersvalueTransform:()=>YL,_shadersvertexLogDepth:()=>wL,_shaderswebMercatorMaxLatitude:()=>jE,_shaderswindowToEyeCoordinates:()=>ML,_shaderswriteDepthClamp:()=>kL,_shaderswriteLogDepth:()=>UL,_shaderswriteNonPerspective:()=>DL,addAllToArray:()=>qn,addBuffer:()=>zv,addDefaults:()=>wv,addExtensionsRequired:()=>Dv,addExtensionsUsed:()=>Am,addPipelineExtras:()=>xy,addToArray:()=>ca,appendForwardSlash:()=>v1,arrayRemoveDuplicates:()=>Yo,assert:()=>zK,barycentricCoordinates:()=>gT,binarySearch:()=>bo,buildModuleUrl:()=>Kt,buildVoxelDrawCommands:()=>UM,clone:()=>ze,combine:()=>Rt,computeFlyToLocationForRectangle:()=>KS,createBillboardPointCallback:()=>P_,createCommand:()=>Gn,createDefaultImageryProviderViewModels:()=>Ek,createDefaultTerrainProviderViewModels:()=>Gk,createElevationBandMaterial:()=>mie,createGooglePhotorealistic3DTileset:()=>hie,createGuid:()=>zn,createMaterialPropertyDescriptor:()=>Qo,createOsmBuildingsAsync:()=>fie,createPropertyDescriptor:()=>ge,createRawPropertyDescriptor:()=>vl,createTangentSpaceDebugPrimitive:()=>pie,createTaskProcessorWorker:()=>Tie,createUniform:()=>B1,createUniformArray:()=>z1,createVectorTileBuffersFromModelComponents:()=>MP,createWorldBathymetryAsync:()=>I9,createWorldImageryAsync:()=>Eb,createWorldTerrainAsync:()=>YA,decodeGoogleEarthEnterpriseData:()=>P9,decodeVectorPolylinePositions:()=>TP,defer:()=>pd,defined:()=>l,demodernizeShader:()=>OL,deprecationWarning:()=>La,destroyObject:()=>me,exportKml:()=>h$,findAccessorMinMax:()=>m_,findContentMetadata:()=>q_,findGroupMetadata:()=>$_,findTileMetadata:()=>QP,forEachTextureInMaterial:()=>HZ,formatError:()=>Cp,freezeRenderState:()=>oK,getAbsoluteUri:()=>tp,getAccessorByteStride:()=>Rd,getBaseUri:()=>F1,getBinaryAccessor:()=>Tm,getClipAndStyleCode:()=>x9,getClippingFunction:()=>JS,getComponentReader:()=>lb,getElement:()=>In,getExtensionFromUri:()=>W0,getFilenameFromUri:()=>$b,getImageFromTypedArray:()=>DM,getImagePixels:()=>Ah,getJsonFromTypedArray:()=>xr,getMagic:()=>Dh,getMeshPrimitives:()=>GF,getMetadataClassProperty:()=>t9,getMetadataProperty:()=>i9,getStringFromTypedArray:()=>Zd,getTimestamp:()=>Yi,hasExtension:()=>_i,heightReferenceOnEntityPropertyChanged:()=>eb,isBitSet:()=>pl,isBlobUri:()=>aT,isCrossOriginUrl:()=>zg,isDataUri:()=>Zh,isLeapYear:()=>Sh,knockout:()=>Ce,knockout_3_5_1:()=>BA,knockout_es5:()=>fk,loadAndExecuteScript:()=>cT,loadCubeMap:()=>rW,loadImageFromTypedArray:()=>cb,loadKTX2:()=>yd,mergeSort:()=>a0,moveTechniqueRenderStates:()=>Uv,moveTechniquesToExtension:()=>Ov,numberOfComponentsForType:()=>uu,objectToQuery:()=>lT,oneTimeWarning:()=>Tt,parseBatchTable:()=>Tb,parseFeatureMetadataLegacy:()=>gF,parseGlb:()=>u_,parseResponseHeaders:()=>I1,parseStructuralMetadata:()=>bF,pickModel:()=>zC,pointInsideTriangle:()=>yne,preprocess3DTileContent:()=>Mb,processVoxelProperties:()=>VM,queryToObject:()=>nu,readAccessorPacked:()=>Hv,removeExtension:()=>h_,removeExtensionsRequired:()=>Mv,removeExtensionsUsed:()=>d_,removePipelineExtras:()=>kv,removeUnusedElements:()=>Bv,renderBufferPointCollection:()=>GP,renderBufferPolygonCollection:()=>FP,renderBufferPolylineCollection:()=>YP,resizeImageToNextPowerOfTwo:()=>Sy,sampleTerrain:()=>IY,sampleTerrainMostDetailed:()=>HS,scaleToGeodeticSurface:()=>sT,srgbToLinear:()=>wA,subdivideArray:()=>UW,subscribeAndEvaluate:()=>pc,updateAccessorComponentTypes:()=>Kv,updateVersion:()=>Jv,usesExtension:()=>Gr,viewerCesium3DTilesInspectorMixin:()=>Uie,viewerCesiumInspectorMixin:()=>Die,viewerDragDropMixin:()=>Bie,viewerPerformanceWatchdogMixin:()=>zie,viewerVoxelInspectorMixin:()=>Kie,webGLConstantToGlslType:()=>xne,wrapFunction:()=>X9,writeTextToCanvas:()=>N_});var p7o=x(T(),1);var dEo=x(T(),1);var $Xt=x(T(),1);var AXt=x(T(),1);var pXt=x(T(),1);var cXt=x(T(),1);function XWe(e){return e!=null}var l=XWe;var uXt=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+=`
${this.stack.toString()}`),e};oT.throwInstantiationError=function(){throw new oT("This function defines an interface and should not be called directly.")};var he=oT;var oa={};oa.typeOf={};function NWe(e){return`${e} is required, actual value was undefined`}function jA(e,t,n){return`Expected ${n} to be typeof ${t}, actual typeof was ${e}`}oa.defined=function(e,t){if(!l(t))throw new he(NWe(e))};oa.typeOf.func=function(e,t){if(typeof t!="function")throw new he(jA(typeof t,"function",e))};oa.typeOf.string=function(e,t){if(typeof t!="string")throw new he(jA(typeof t,"string",e))};oa.typeOf.number=function(e,t){if(typeof t!="number")throw new he(jA(typeof t,"number",e))};oa.typeOf.number.lessThan=function(e,t,n){if(oa.typeOf.number(e,t),t>=n)throw new he(`Expected ${e} to be less than ${n}, actual value was ${t}`)};oa.typeOf.number.lessThanOrEquals=function(e,t,n){if(oa.typeOf.number(e,t),t>n)throw new he(`Expected ${e} to be less than or equal to ${n}, actual value was ${t}`)};oa.typeOf.number.greaterThan=function(e,t,n){if(oa.typeOf.number(e,t),t<=n)throw new he(`Expected ${e} to be greater than ${n}, actual value was ${t}`)};oa.typeOf.number.greaterThanOrEquals=function(e,t,n){if(oa.typeOf.number(e,t),t<n)throw new he(`Expected ${e} to be greater than or equal to ${n}, actual value was ${t}`)};oa.typeOf.object=function(e,t){if(typeof t!="object")throw new he(jA(typeof t,"object",e))};oa.typeOf.bool=function(e,t){if(typeof t!="boolean")throw new he(jA(typeof t,"boolean",e))};oa.typeOf.bigint=function(e,t){if(typeof t!="bigint")throw new he(jA(typeof t,"bigint",e))};oa.typeOf.number.equals=function(e,t,n,i){if(oa.typeOf.number(e,n),oa.typeOf.number(t,i),n!==i)throw new he(`${e} must be equal to ${t}, the actual values are ${n} and ${i}`)};var No=oa;var xXt=x(T(),1),hH=x(lU(),1);var lt={};lt.EPSILON1=.1;lt.EPSILON2=.01;lt.EPSILON3=.001;lt.EPSILON4=1e-4;lt.EPSILON5=1e-5;lt.EPSILON6=1e-6;lt.EPSILON7=1e-7;lt.EPSILON8=1e-8;lt.EPSILON9=1e-9;lt.EPSILON10=1e-10;lt.EPSILON11=1e-11;lt.EPSILON12=1e-12;lt.EPSILON13=1e-13;lt.EPSILON14=1e-14;lt.EPSILON15=1e-15;lt.EPSILON16=1e-16;lt.EPSILON17=1e-17;lt.EPSILON18=1e-18;lt.EPSILON19=1e-19;lt.EPSILON20=1e-20;lt.EPSILON21=1e-21;lt.GRAVITATIONALPARAMETER=3986004418e5;lt.SOLAR_RADIUS=6955e5;lt.LUNAR_RADIUS=1737400;lt.SIXTY_FOUR_KILOBYTES=64*1024;lt.FOUR_GIGABYTES=4*1024*1024*1024;lt.sign=Math.sign??function(t){return t=+t,t===0||t!==t?t:t>0?1:-1};lt.signNotZero=function(e){return e<0?-1:1};lt.toSNorm=function(e,t){return t=t??255,Math.round((lt.clamp(e,-1,1)*.5+.5)*t)};lt.fromSNorm=function(e,t){return t=t??255,lt.clamp(e,0,t)/t*2-1};lt.normalize=function(e,t,n){return n=Math.max(n-t,0),n===0?0:lt.clamp((e-t)/n,0,1)};lt.sinh=Math.sinh??function(t){return(Math.exp(t)-Math.exp(-t))/2};lt.cosh=Math.cosh??function(t){return(Math.exp(t)+Math.exp(-t))/2};lt.lerp=function(e,t,n){return(1-n)*e+n*t};lt.PI=Math.PI;lt.ONE_OVER_PI=1/Math.PI;lt.PI_OVER_TWO=Math.PI/2;lt.PI_OVER_THREE=Math.PI/3;lt.PI_OVER_FOUR=Math.PI/4;lt.PI_OVER_SIX=Math.PI/6;lt.THREE_PI_OVER_TWO=3*Math.PI/2;lt.TWO_PI=2*Math.PI;lt.ONE_OVER_TWO_PI=1/(2*Math.PI);lt.RADIANS_PER_DEGREE=Math.PI/180;lt.DEGREES_PER_RADIAN=180/Math.PI;lt.RADIANS_PER_ARCSECOND=lt.RADIANS_PER_DEGREE/3600;lt.toRadians=function(e){return e*lt.RADIANS_PER_DEGREE};lt.toDegrees=function(e){return e*lt.DEGREES_PER_RADIAN};lt.convertLongitudeRange=function(e){let t=lt.TWO_PI,n=e-Math.floor(e/t)*t;return n<-Math.PI?n+t:n>=Math.PI?n-t:n};lt.clampToLatitudeRange=function(e){return lt.clamp(e,-1*lt.PI_OVER_TWO,lt.PI_OVER_TWO)};lt.negativePiToPi=function(e){return e>=-lt.PI&&e<=lt.PI?e:lt.zeroToTwoPi(e+lt.PI)-lt.PI};lt.zeroToTwoPi=function(e){if(e>=0&&e<=lt.TWO_PI)return e;let t=lt.mod(e,lt.TWO_PI);return Math.abs(t)<lt.EPSILON14&&Math.abs(e)>lt.EPSILON14?lt.TWO_PI:t};lt.mod=function(e,t){return lt.sign(e)===lt.sign(t)&&Math.abs(e)<Math.abs(t)?e:(e%t+t)%t};lt.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))};lt.lessThan=function(e,t,n){return e-t<-n};lt.lessThanOrEquals=function(e,t,n){return e-t<n};lt.greaterThan=function(e,t,n){return e-t>n};lt.greaterThanOrEquals=function(e,t,n){return e-t>-n};var dU=[1];lt.factorial=function(e){let t=dU.length;if(e>=t){let n=dU[t-1];for(let i=t;i<=e;i++){let o=n*i;dU.push(o),n=o}}return dU[e]};lt.incrementWrap=function(e,t,n){return n=n??0,++e,e>t&&(e=n),e};lt.isPowerOfTwo=function(e){return e!==0&&(e&e-1)===0};lt.nextPowerOfTwo=function(e){return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e,e};lt.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};lt.clamp=function(e,t,n){return e<t?t:e>n?n:e};var $ie=new hH.default;lt.setRandomNumberSeed=function(e){$ie=new hH.default(e)};lt.nextRandomNumber=function(){return $ie.random()};lt.randomBetween=function(e,t){return lt.nextRandomNumber()*(t-e)+e};lt.acosClamped=function(e){return Math.acos(lt.clamp(e,-1,1))};lt.asinClamped=function(e){return Math.asin(lt.clamp(e,-1,1))};lt.chordLength=function(e,t){return 2*t*Math.sin(e*.5)};lt.logBase=function(e,t){return Math.log(e)/Math.log(t)};lt.cbrt=Math.cbrt??function(t){let n=Math.pow(Math.abs(t),.3333333333333333);return t<0?-n:n};lt.log2=Math.log2??function(t){return Math.log(t)*Math.LOG2E};lt.fog=function(e,t){let n=e*t;return 1-Math.exp(-(n*n))};lt.fastApproximateAtan=function(e){return e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)};lt.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=lt.fastApproximateAtan(r),i=Math.abs(t)>Math.abs(e)?lt.PI_OVER_TWO-i:i,i=e<0?lt.PI-i:i,i=t<0?-i:i,i};var W=lt;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,uU),e.magnitude(uU)}static distanceSquared(t,n){return e.subtract(t,n,uU),e.magnitudeSquared(uU)}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,eoe),o=e.multiplyByScalar(t,1-i,o),e.add(eoe,o,o)}static angleBetween(t,n){e.normalize(t,mU),e.normalize(n,fH);let i=e.dot(mU,fH),o=e.magnitude(e.cross(mU,fH,mU));return Math.atan2(o,i)}static mostOrthogonalAxis(t,n){let i=e.normalize(t,YWe);return e.abs(i,i),i.x<=i.y?i.x<=i.z?n=e.clone(e.UNIT_X,n):n=e.clone(e.UNIT_Z,n):i.y<=i.z?n=e.clone(e.UNIT_Y,n):n=e.clone(e.UNIT_Z,n),n}static projectVector(t,n,i){let o=e.dot(t,n)/e.dot(n,n);return e.multiplyByScalar(n,o,i)}static equals(t,n){return t===n||l(t)&&l(n)&&t.x===n.x&&t.y===n.y&&t.z===n.z}static equalsArray(t,n,i){return t.x===n[i]&&t.y===n[i+1]&&t.z===n[i+2]}static equalsEpsilon(t,n,i,o){return t===n||l(t)&&l(n)&&W.equalsEpsilon(t.x,n.x,i,o)&&W.equalsEpsilon(t.y,n.y,i,o)&&W.equalsEpsilon(t.z,n.z,i,o)}static cross(t,n,i){let o=t.x,r=t.y,s=t.z,a=n.x,c=n.y,d=n.z,u=r*d-s*c,h=s*a-o*d,p=o*c-r*a;return i.x=u,i.y=h,i.z=p,i}static midpoint(t,n,i){return i.x=(t.x+n.x)*.5,i.y=(t.y+n.y)*.5,i.z=(t.z+n.z)*.5,i}static fromDegrees(t,n,i,o,r){return t=W.toRadians(t),n=W.toRadians(n),e.fromRadians(t,n,i,o,r)}static fromRadians(t,n,i,o,r){i=i??0;let s=l(o)?o.radiiSquared:e._ellipsoidRadiiSquared,a=Math.cos(n);rm.x=a*Math.cos(t),rm.y=a*Math.sin(t),rm.z=Math.sin(n),rm=e.normalize(rm,rm),e.multiplyComponents(s,rm,QA);let c=Math.sqrt(e.dot(rm,QA));return QA=e.divideByScalar(QA,c,QA),rm=e.multiplyByScalar(rm,i,rm),l(r)||(r=new e),e.add(QA,rm,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 uU=new or,eoe=new or,mU=new or,fH=new or,YWe=new or,rm=new or,QA=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 m=or;var zXt=x(T(),1);var RXt=x(T(),1);var Ms=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,hU),e.magnitude(hU)}static distanceSquared(t,n){return e.subtract(t,n,hU),e.magnitudeSquared(hU)}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,toe),o=e.multiplyByScalar(t,1-i,o),e.add(toe,o,o)}static mostOrthogonalAxis(t,n){let i=e.normalize(t,wWe);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),pH[0]=t,noe?(n.x=Nc[0],n.y=Nc[1],n.z=Nc[2],n.w=Nc[3]):(n.x=Nc[3],n.y=Nc[2],n.z=Nc[1],n.w=Nc[0]),n}static unpackFloat(t){return noe?(Nc[0]=t.x,Nc[1]=t.y,Nc[2]=t.z,Nc[3]=t.w):(Nc[0]=t.w,Nc[1]=t.z,Nc[2]=t.y,Nc[3]=t.x),pH[0]}};Ms.packedLength=4;Ms.fromArray=Ms.unpack;var hU=new Ms,toe=new Ms,wWe=new Ms;Ms.ZERO=Object.freeze(new Ms(0,0,0,0));Ms.ONE=Object.freeze(new Ms(1,1,1,1));Ms.UNIT_X=Object.freeze(new Ms(1,0,0,0));Ms.UNIT_Y=Object.freeze(new Ms(0,1,0,0));Ms.UNIT_Z=Object.freeze(new Ms(0,0,1,0));Ms.UNIT_W=Object.freeze(new Ms(0,0,0,1));var pH=new Float32Array(1),Nc=new Uint8Array(pH.buffer),MWe=new Uint32Array([287454020]),kWe=new Uint8Array(MWe.buffer),noe=kWe[0]===68,se=Ms;var GXt=x(T(),1),bH={};bH.EMPTY_OBJECT=Object.freeze({});bH.EMPTY_ARRAY=Object.freeze([]);var B=bH;var IXt=x(T(),1);var mo=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,h=t.z*t.w,p=t.w*t.w,b=i-a-u+p,f=2*(o-h),y=2*(r+d),_=2*(o+h),S=-i+a-u+p,A=2*(c-s),Z=2*(r-d),V=2*(c+s),E=-i-a+u+p;return l(n)?(n[0]=b,n[1]=_,n[2]=Z,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,Z,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,h=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]=h,n[7]=f,n[8]=S,n):new e(d,u,h,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,UWe),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,DWe),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=m.magnitude(m.fromElements(t[0],t[1],t[2],gH)),n.y=m.magnitude(m.fromElements(t[3],t[4],t[5],gH)),n.z=m.magnitude(m.fromElements(t[6],t[7],t[8],gH)),n}static getMaximumScale(t){return e.getScale(t,ioe),m.maximumComponent(ioe)}static setRotation(t,n,i){let o=e.getScale(t,OWe);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,BWe);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],h=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]=h,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],h=t[8];return n[0]=i,n[1]=o,n[2]=r,n[3]=s,n[4]=a,n[5]=c,n[6]=d,n[7]=u,n[8]=h,n}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*HWe(c);for(;s<o&&KWe(c)>d;)JWe(c,fU),e.transpose(fU,ooe),e.multiply(c,fU,c),e.multiply(ooe,c,c),e.multiply(a,fU,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],h=t[8],p=e.determinant(t);n[0]=a*h-u*c,n[1]=u*r-o*h,n[2]=o*c-a*r,n[3]=d*c-s*h,n[4]=i*h-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,zWe),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]})
(${this[1]}, ${this[4]}, ${this[7]})
(${this[2]}, ${this[5]}, ${this[8]})`}};mo.packedLength=9;mo.fromArray=mo.unpack;mo.IDENTITY=Object.freeze(new mo(1,0,0,0,1,0,0,0,1));mo.ZERO=Object.freeze(new mo(0,0,0,0,0,0,0,0,0));mo.COLUMN0ROW0=0;mo.COLUMN0ROW1=1;mo.COLUMN0ROW2=2;mo.COLUMN1ROW0=3;mo.COLUMN1ROW1=4;mo.COLUMN1ROW2=5;mo.COLUMN2ROW0=6;mo.COLUMN2ROW1=7;mo.COLUMN2ROW2=8;var UWe=new m,DWe=new m,gH=new m,ioe=new m,OWe=new m,BWe=new m,fU=new mo,ooe=new mo,zWe=new mo;function HWe(e){let t=0;for(let n=0;n<9;++n){let i=e[n];t+=i*i}return Math.sqrt(t)}var yH=[1,0,0],xH=[2,2,1];function KWe(e){let t=0;for(let n=0;n<3;++n){let i=e[mo.getElementIndex(xH[n],yH[n])];t+=2*i*i}return Math.sqrt(t)}function JWe(e,t){let n=W.EPSILON15,i=0,o=1;for(let d=0;d<3;++d){let u=Math.abs(e[mo.getElementIndex(xH[d],yH[d])]);u>i&&(o=d,i=u)}let r=1,s=0,a=yH[o],c=xH[o];if(Math.abs(e[mo.getElementIndex(c,a)])>n){let d=e[mo.getElementIndex(c,c)],u=e[mo.getElementIndex(a,a)],h=e[mo.getElementIndex(c,a)],p=(d-u)/2/h,b;p<0?b=-1/(-p+Math.sqrt(1+p*p)):b=1/(p+Math.sqrt(1+p*p)),r=1/Math.sqrt(1+b*b),s=b*r}return t=mo.clone(mo.IDENTITY,t),t[mo.getElementIndex(a,a)]=t[mo.getElementIndex(c,c)]=r,t[mo.getElementIndex(c,a)]=s,t[mo.getElementIndex(a,c)]=-s,t}var q=mo;var NXt=x(T(),1);function E1(e){this.name="RuntimeError",this.message=e;let t;try{throw new Error}catch(n){t=n.stack}this.stack=t}l(Object.create)&&(E1.prototype=Object.create(Error.prototype),E1.prototype.constructor=E1);E1.prototype.toString=function(){let e=`${this.name}: ${this.message}`;return l(this.stack)&&(e+=`
${this.stack.toString()}`),e};var le=E1;var rr=class e{constructor(t,n,i,o,r,s,a,c,d,u,h,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]=h??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??m.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,h=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,Z=2*(d-_),V=2*(u+f),E=2*(d+_),L=-c+p-y+S,v=2*(b-h),I=2*(u-f),X=2*(b+h),N=-c-p+y+S;return o[0]=A*r,o[1]=E*r,o[2]=I*r,o[3]=0,o[4]=Z*s,o[5]=L*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(q.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;m.normalize(o,qA),m.normalize(m.cross(qA,r,$A),$A),m.normalize(m.cross($A,qA,G1),G1);let s=$A.x,a=$A.y,c=$A.z,d=qA.x,u=qA.y,h=qA.z,p=G1.x,b=G1.y,f=G1.z,y=i.x,_=i.y,S=i.z,A=s*-y+a*-_+c*-S,Z=p*-y+b*-_+f*-S,V=d*y+u*_+h*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]=-h,n[11]=0,n[12]=A,n[13]=Z,n[14]=V,n[15]=1,n):new e(s,a,c,A,p,b,f,Z,-d,-u,-h,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),h=-(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]=h,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),h=(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]=h,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),h=-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]=h,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,h=(i-n)*.5,p=d,b=u,f=h,y=r+d,_=s+u,S=n+h,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]=-m.dot(o,t),r[13]=-m.dot(i,t),r[14]=m.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,jWe),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,QWe),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=m.magnitude(m.fromElements(t[0],t[1],t[2],TH)),n.y=m.magnitude(m.fromElements(t[4],t[5],t[6],TH)),n.z=m.magnitude(m.fromElements(t[8],t[9],t[10],TH)),n}static getMaximumScale(t){return e.getScale(t,roe),m.maximumComponent(roe)}static setRotation(t,n,i){let o=e.getScale(t,qWe);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,$We);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],h=t[7],p=t[8],b=t[9],f=t[10],y=t[11],_=t[12],S=t[13],A=t[14],Z=t[15],V=n[0],E=n[1],L=n[2],v=n[3],I=n[4],X=n[5],N=n[6],g=n[7],C=n[8],R=n[9],G=n[10],P=n[11],Y=n[12],O=n[13],k=n[14],D=n[15],w=o*V+c*E+p*L+_*v,z=r*V+d*E+b*L+S*v,J=s*V+u*E+f*L+A*v,ee=a*V+h*E+y*L+Z*v,H=o*I+c*X+p*N+_*g,te=r*I+d*X+b*N+S*g,$=s*I+u*X+f*N+A*g,be=a*I+h*X+y*N+Z*g,ye=o*C+c*R+p*G+_*P,ce=r*C+d*R+b*G+S*P,Ze=s*C+u*R+f*G+A*P,xe=a*C+h*R+y*G+Z*P,Ge=o*Y+c*O+p*k+_*D,Ve=r*Y+d*O+b*k+S*D,Ye=s*Y+u*O+f*k+A*D,ke=a*Y+h*O+y*k+Z*D;return i[0]=w,i[1]=z,i[2]=J,i[3]=ee,i[4]=H,i[5]=te,i[6]=$,i[7]=be,i[8]=ye,i[9]=ce,i[10]=Ze,i[11]=xe,i[12]=Ge,i[13]=Ve,i[14]=Ye,i[15]=ke,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],h=t[9],p=t[10],b=t[12],f=t[13],y=t[14],_=n[0],S=n[1],A=n[2],Z=n[4],V=n[5],E=n[6],L=n[8],v=n[9],I=n[10],X=n[12],N=n[13],g=n[14],C=o*_+a*S+u*A,R=r*_+c*S+h*A,G=s*_+d*S+p*A,P=o*Z+a*V+u*E,Y=r*Z+c*V+h*E,O=s*Z+d*V+p*E,k=o*L+a*v+u*I,D=r*L+c*v+h*I,w=s*L+d*v+p*I,z=o*X+a*N+u*g+b,J=r*X+c*N+h*g+f,ee=s*X+d*N+p*g+y;return i[0]=C,i[1]=R,i[2]=G,i[3]=0,i[4]=P,i[5]=Y,i[6]=O,i[7]=0,i[8]=k,i[9]=D,i[10]=w,i[11]=0,i[12]=z,i[13]=J,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],h=t[9],p=t[10],b=n[0],f=n[1],y=n[2],_=n[3],S=n[4],A=n[5],Z=n[6],V=n[7],E=n[8],L=o*b+a*f+u*y,v=r*b+c*f+h*y,I=s*b+d*f+p*y,X=o*_+a*S+u*A,N=r*_+c*S+h*A,g=s*_+d*S+p*A,C=o*Z+a*V+u*E,R=r*Z+c*V+h*E,G=s*Z+d*V+p*E;return i[0]=L,i[1]=v,i[2]=I,i[3]=0,i[4]=X,i[5]=N,i[6]=g,i[7]=0,i[8]=C,i[9]=R,i[10]=G,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,h=t[3]*o+t[7]*r+t[11]*s+t[15]*a;return i.x=c,i.y=d,i.z=u,i.w=h,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],h=t[2],p=t[6],b=t[10],f=t[14],y=t[3],_=t[7],S=t[11],A=t[15],Z=b*A,V=f*S,E=p*A,L=f*_,v=p*S,I=b*_,X=h*A,N=f*y,g=h*S,C=b*y,R=h*_,G=p*y,P=Z*c+L*d+v*u-(V*c+E*d+I*u),Y=V*a+X*d+C*u-(Z*a+N*d+g*u),O=E*a+N*c+R*u-(L*a+X*c+G*u),k=I*a+g*c+G*d-(v*a+C*c+R*d),D=V*o+E*r+I*s-(Z*o+L*r+v*s),w=Z*i+N*r+g*s-(V*i+X*r+C*s),z=L*i+X*o+G*s-(E*i+N*o+R*s),J=v*i+C*o+R*r-(I*i+g*o+G*r);Z=r*u,V=s*d,E=o*u,L=s*c,v=o*d,I=r*c,X=i*u,N=s*a,g=i*d,C=r*a,R=i*c,G=o*a;let ee=Z*_+L*S+v*A-(V*_+E*S+I*A),H=V*y+X*S+C*A-(Z*y+N*S+g*A),te=E*y+N*_+R*A-(L*y+X*_+G*A),$=I*y+g*_+G*S-(v*y+C*_+R*S),be=E*b+I*f+V*p-(v*f+Z*p+L*b),ye=g*f+Z*h+N*b-(X*b+C*f+V*h),ce=X*p+G*f+L*h-(R*f+E*h+N*p),Ze=R*b+v*h+C*p-(g*p+G*b+I*h),xe=i*P+o*Y+r*O+s*k;if(Math.abs(xe)<W.EPSILON21){if(q.equalsEpsilon(e.getMatrix3(t,eve),tve,W.EPSILON7)&&se.equals(e.getRow(t,3,nve),ive))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 le("matrix is not invertible because its determinate is zero.")}return xe=1/xe,n[0]=P*xe,n[1]=Y*xe,n[2]=O*xe,n[3]=k*xe,n[4]=D*xe,n[5]=w*xe,n[6]=z*xe,n[7]=J*xe,n[8]=ee*xe,n[9]=H*xe,n[10]=te*xe,n[11]=$*xe,n[12]=be*xe,n[13]=ye*xe,n[14]=ce*xe,n[15]=Ze*xe,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],h=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-h*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]=h,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,ove),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]})
(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})
(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})
(${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 qA=new m,$A=new m,G1=new m,jWe=new m,QWe=new m,TH=new m,roe=new m,qWe=new m,$We=new m,eve=new q,tve=new q,nve=new se,ive=new se(0,0,0,1),ove=new rr,F=rr;var KXt=x(T(),1),soe={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(soe);var ne=soe;var rve=new m;function Ft(e){this._size=e.size,this._datatype=e.datatype,this.getValue=e.getValue}var Ha={};Ha[ne.FLOAT]="float";Ha[ne.FLOAT_VEC2]="vec2";Ha[ne.FLOAT_VEC3]="vec3";Ha[ne.FLOAT_VEC4]="vec4";Ha[ne.INT]="int";Ha[ne.INT_VEC2]="ivec2";Ha[ne.INT_VEC3]="ivec3";Ha[ne.INT_VEC4]="ivec4";Ha[ne.BOOL]="bool";Ha[ne.BOOL_VEC2]="bvec2";Ha[ne.BOOL_VEC3]="bvec3";Ha[ne.BOOL_VEC4]="bvec4";Ha[ne.FLOAT_MAT2]="mat2";Ha[ne.FLOAT_MAT3]="mat3";Ha[ne.FLOAT_MAT4]="mat4";Ha[ne.SAMPLER_2D]="sampler2D";Ha[ne.SAMPLER_CUBE]="samplerCube";Ft.prototype.getDeclaration=function(e){let t=`uniform ${Ha[this._datatype]} ${e}`,n=this._size;return n===1?t+=";":t+=`[${n.toString()}];`,t};var sve={czm_viewport:new Ft({size:1,datatype:ne.FLOAT_VEC4,getValue:function(e){return e.viewportCartesian4}}),czm_viewportOrthographic:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.viewportOrthographic}}),czm_viewportTransformation:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.viewportTransformation}}),czm_globeDepthTexture:new Ft({size:1,datatype:ne.SAMPLER_2D,getValue:function(e){return e.globeDepthTexture}}),czm_edgeIdTexture:new Ft({size:1,datatype:ne.SAMPLER_2D,getValue:function(e){return e.edgeIdTexture}}),czm_edgeColorTexture:new Ft({size:1,datatype:ne.SAMPLER_2D,getValue:function(e){return e.edgeColorTexture}}),czm_edgeDepthTexture:new Ft({size:1,datatype:ne.SAMPLER_2D,getValue:function(e){return e.edgeDepthTexture}}),czm_model:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.model}}),czm_inverseModel:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseModel}}),czm_view:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.view}}),czm_view3D:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.view3D}}),czm_viewRotation:new Ft({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.viewRotation}}),czm_viewRotation3D:new Ft({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.viewRotation3D}}),czm_inverseView:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseView}}),czm_inverseView3D:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseView3D}}),czm_inverseViewRotation:new Ft({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation}}),czm_inverseViewRotation3D:new Ft({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.inverseViewRotation3D}}),czm_projection:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.projection}}),czm_inverseProjection:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseProjection}}),czm_infiniteProjection:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.infiniteProjection}}),czm_modelView:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelView}}),czm_modelView3D:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelView3D}}),czm_modelViewRelativeToEye:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelViewRelativeToEye}}),czm_inverseModelView:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseModelView}}),czm_inverseModelView3D:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseModelView3D}}),czm_viewProjection:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.viewProjection}}),czm_inverseViewProjection:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseViewProjection}}),czm_modelViewProjection:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelViewProjection}}),czm_inverseModelViewProjection:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.inverseModelViewProjection}}),czm_modelViewProjectionRelativeToEye:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelViewProjectionRelativeToEye}}),czm_modelViewInfiniteProjection:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelViewInfiniteProjection}}),czm_orthographicIn3D:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.orthographicIn3D?1:0}}),czm_normal:new Ft({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.normal}}),czm_normal3D:new Ft({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.normal3D}}),czm_inverseNormal:new Ft({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.inverseNormal}}),czm_inverseNormal3D:new Ft({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.inverseNormal3D}}),czm_eyeHeight:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.eyeHeight}}),czm_eyeHeight2D:new Ft({size:1,datatype:ne.FLOAT_VEC2,getValue:function(e){return e.eyeHeight2D}}),czm_eyeEllipsoidNormalEC:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.eyeEllipsoidNormalEC}}),czm_eyeEllipsoidCurvature:new Ft({size:1,datatype:ne.FLOAT_VEC2,getValue:function(e){return e.eyeEllipsoidCurvature}}),czm_modelToEnu:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.modelToEnu}}),czm_enuToModel:new Ft({size:1,datatype:ne.FLOAT_MAT4,getValue:function(e){return e.enuToModel}}),czm_entireFrustum:new Ft({size:1,datatype:ne.FLOAT_VEC2,getValue:function(e){return e.entireFrustum}}),czm_currentFrustum:new Ft({size:1,datatype:ne.FLOAT_VEC2,getValue:function(e){return e.currentFrustum}}),czm_frustumPlanes:new Ft({size:1,datatype:ne.FLOAT_VEC4,getValue:function(e){return e.frustumPlanes}}),czm_farDepthFromNearPlusOne:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.farDepthFromNearPlusOne}}),czm_log2FarDepthFromNearPlusOne:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.log2FarDepthFromNearPlusOne}}),czm_oneOverLog2FarDepthFromNearPlusOne:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.oneOverLog2FarDepthFromNearPlusOne}}),czm_sunPositionWC:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.sunPositionWC}}),czm_sunPositionColumbusView:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.sunPositionColumbusView}}),czm_sunDirectionEC:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.sunDirectionEC}}),czm_sunDirectionWC:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.sunDirectionWC}}),czm_moonDirectionEC:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.moonDirectionEC}}),czm_lightDirectionEC:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.lightDirectionEC}}),czm_lightDirectionWC:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.lightDirectionWC}}),czm_lightColor:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.lightColor}}),czm_lightColorHdr:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.lightColorHdr}}),czm_encodedCameraPositionMCHigh:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCHigh}}),czm_encodedCameraPositionMCLow:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.encodedCameraPositionMCLow}}),czm_viewerPositionWC:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return F.getTranslation(e.inverseView,rve)}}),czm_frameNumber:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.frameState.frameNumber}}),czm_morphTime:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.frameState.morphTime}}),czm_sceneMode:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.frameState.mode}}),czm_pass:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.pass}}),czm_backgroundColor:new Ft({size:1,datatype:ne.FLOAT_VEC4,getValue:function(e){return e.backgroundColor}}),czm_brdfLut:new Ft({size:1,datatype:ne.SAMPLER_2D,getValue:function(e){return e.brdfLut}}),czm_environmentMap:new Ft({size:1,datatype:ne.SAMPLER_CUBE,getValue:function(e){return e.environmentMap}}),czm_specularEnvironmentMaps:new Ft({size:1,datatype:ne.SAMPLER_CUBE,getValue:function(e){return e.specularEnvironmentMaps}}),czm_specularEnvironmentMapsMaximumLOD:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.specularEnvironmentMapsMaximumLOD}}),czm_sphericalHarmonicCoefficients:new Ft({size:9,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.sphericalHarmonicCoefficients}}),czm_temeToPseudoFixed:new Ft({size:1,datatype:ne.FLOAT_MAT3,getValue:function(e){return e.temeToPseudoFixedMatrix}}),czm_pixelRatio:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.pixelRatio}}),czm_fogDensity:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.fogDensity}}),czm_fogVisualDensityScalar:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.fogVisualDensityScalar}}),czm_fogMinimumBrightness:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.fogMinimumBrightness}}),czm_atmosphereHsbShift:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.atmosphereHsbShift}}),czm_atmosphereLightIntensity:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.atmosphereLightIntensity}}),czm_atmosphereRayleighCoefficient:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.atmosphereRayleighCoefficient}}),czm_atmosphereRayleighScaleHeight:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.atmosphereRayleighScaleHeight}}),czm_atmosphereMieCoefficient:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.atmosphereMieCoefficient}}),czm_atmosphereMieScaleHeight:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.atmosphereMieScaleHeight}}),czm_atmosphereMieAnisotropy:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.atmosphereMieAnisotropy}}),czm_atmosphereDynamicLighting:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.atmosphereDynamicLighting}}),czm_splitPosition:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.splitPosition}}),czm_geometricToleranceOverMeter:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.geometricToleranceOverMeter}}),czm_minimumDisableDepthTestDistance:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.minimumDisableDepthTestDistance}}),czm_invertClassificationColor:new Ft({size:1,datatype:ne.FLOAT_VEC4,getValue:function(e){return e.invertClassificationColor}}),czm_gamma:new Ft({size:1,datatype:ne.FLOAT,getValue:function(e){return e.gamma}}),czm_ellipsoidRadii:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.radii}}),czm_ellipsoidInverseRadii:new Ft({size:1,datatype:ne.FLOAT_VEC3,getValue:function(e){return e.ellipsoid.oneOverRadii}})},E0=sve;var TNt=x(T(),1);var tNt=x(T(),1);function ave(){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 zn=ave;var iNt=x(T(),1);function cve(){return!0}function lve(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=cve}var me=lve;var cNt=x(T(),1);var ra={UNSIGNED_BYTE:ne.UNSIGNED_BYTE,UNSIGNED_SHORT:ne.UNSIGNED_SHORT,UNSIGNED_INT:ne.UNSIGNED_INT};ra.getSizeInBytes=function(e){switch(e){case ra.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case ra.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case ra.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}};ra.fromSizeInBytes=function(e){switch(e){case 2:return ra.UNSIGNED_SHORT;case 4:return ra.UNSIGNED_INT;case 1:return ra.UNSIGNED_BYTE}};ra.validate=function(e){return l(e)&&(e===ra.UNSIGNED_BYTE||e===ra.UNSIGNED_SHORT||e===ra.UNSIGNED_INT)};ra.createTypedArray=function(e,t){return e>=W.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)};ra.createTypedArrayFromArrayBuffer=function(e,t,n,i){return e>=W.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,n,i):new Uint16Array(t,n,i)};ra.fromTypedArray=function(e){if(e instanceof Uint8Array)return ra.UNSIGNED_BYTE;if(e instanceof Uint16Array)return ra.UNSIGNED_SHORT;if(e instanceof Uint32Array)return ra.UNSIGNED_INT};Object.freeze(ra);var Me=ra;var uNt=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 Fe=rT;function Yc(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=zn(),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=n,this._sizeInBytes=o,this._usage=r,this._buffer=a,this.vertexArrayDestroyable=!0}Yc.createPixelBuffer=function(e){if(!e.context._webgl2)throw new he("A WebGL 2 context is required to create PixelBuffers.");return new Yc({context:e.context,bufferTarget:ne.PIXEL_PACK_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})};Yc.createVertexBuffer=function(e){return new Yc({context:e.context,bufferTarget:ne.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})};Yc.createIndexBuffer=function(e){let t=e.context,n=e.indexDatatype,i=Me.getSizeInBytes(n),o=new Yc({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(Yc.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}});Yc.prototype._getBuffer=function(){return this._buffer};Yc.prototype._bind=function(){let e=this._gl,t=this._bufferTarget;e.bindBuffer(t,this._buffer)};Yc.prototype._unBind=function(){let e=this._gl,t=this._bufferTarget;e.bindBuffer(t,null)};Yc.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)};Yc.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)};Yc.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)};Yc.prototype.isDestroyed=function(){return!1};Yc.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),me(this)};var qe=Yc;var NNt=x(T(),1);var FNt=x(T(),1);var RNt=x(T(),1);var ANt=x(T(),1);var Dg,ts={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[ts.fullscreenElement]}},changeEventName:{get:function(){if(fd.supportsFullscreen())return ts.fullscreenchange}},errorEventName:{get:function(){if(fd.supportsFullscreen())return ts.fullscreenerror}},enabled:{get:function(){if(fd.supportsFullscreen())return document[ts.fullscreenEnabled]}},fullscreen:{get:function(){if(fd.supportsFullscreen())return fd.element!==null}}});fd.supportsFullscreen=function(){if(l(Dg))return Dg;Dg=!1;let e=document.body;if(typeof e.requestFullscreen=="function")return ts.requestFullscreen="requestFullscreen",ts.exitFullscreen="exitFullscreen",ts.fullscreenEnabled="fullscreenEnabled",ts.fullscreenElement="fullscreenElement",ts.fullscreenchange="fullscreenchange",ts.fullscreenerror="fullscreenerror",Dg=!0,Dg;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"?(ts.requestFullscreen=n,Dg=!0):(n=`${r}RequestFullScreen`,typeof e[n]=="function"&&(ts.requestFullscreen=n,Dg=!0)),n=`${r}ExitFullscreen`,typeof document[n]=="function"?ts.exitFullscreen=n:(n=`${r}CancelFullScreen`,typeof document[n]=="function"&&(ts.exitFullscreen=n)),n=`${r}FullscreenEnabled`,document[n]!==void 0?ts.fullscreenEnabled=n:(n=`${r}FullScreenEnabled`,document[n]!==void 0&&(ts.fullscreenEnabled=n)),n=`${r}FullscreenElement`,document[n]!==void 0?ts.fullscreenElement=n:(n=`${r}FullScreenElement`,document[n]!==void 0&&(ts.fullscreenElement=n)),n=`${r}fullscreenchange`,document[`on${n}`]!==void 0&&(r==="ms"&&(n="MSFullscreenChange"),ts.fullscreenchange=n),n=`${r}fullscreenerror`,document[`on${n}`]!==void 0&&(r==="ms"&&(n="MSFullscreenError"),ts.fullscreenerror=n)}return Dg};fd.requestFullscreen=function(e,t){fd.supportsFullscreen()&&e[ts.requestFullscreen]({vrDisplay:t})};fd.exitFullscreen=function(){fd.supportsFullscreen()&&document[ts.exitFullscreen]()};fd._names=ts;var Ur=fd;var sm;typeof navigator<"u"?sm=navigator:sm={};function L1(e){let t=e.split(".");for(let n=0,i=t.length;n<i;++n)t[n]=parseInt(t[n],10);return t}var pU,aoe;function CH(){if(!l(pU)&&(pU=!1,!_U())){let e=/ Chrome\/([\.0-9]+)/.exec(sm.userAgent);e!==null&&(pU=!0,aoe=L1(e[1]))}return pU}function dve(){return CH()&&aoe}var bU,coe;function loe(){if(!l(bU)&&(bU=!1,!CH()&&!_U()&&/ Safari\/[\.0-9]+/.test(sm.userAgent))){let e=/ Version\/([\.0-9]+)/.exec(sm.userAgent);e!==null&&(bU=!0,coe=L1(e[1]))}return bU}function uve(){return loe()&&coe}var gU,ZH;function doe(){if(!l(gU)){gU=!1;let e=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(sm.userAgent);e!==null&&(gU=!0,ZH=L1(e[1]),ZH.isNightly=!!e[2])}return gU}function mve(){return doe()&&ZH}var yU,uoe;function _U(){if(!l(yU)){yU=!1;let e=/ Edg\/([\.0-9]+)/.exec(sm.userAgent);e!==null&&(yU=!0,uoe=L1(e[1]))}return yU}function hve(){return _U()&&uoe}var xU,VH;function SU(){if(!l(xU)){xU=!1;let e=/Firefox\/([\.0-9]+)/.exec(sm.userAgent);e!==null&&(xU=!0,VH=L1(e[1]))}return xU}var _H;function fve(){return l(_H)||(_H=/Windows/i.test(sm.appVersion)),_H}var SH;function pve(){return l(SH)||(SH=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),SH}function bve(){return SU()&&VH}var AH;function gve(){return l(AH)||(AH=!SU()&&typeof PointerEvent<"u"&&(!l(sm.pointerEnabled)||sm.pointerEnabled)),AH}var moe,TU;function hoe(){if(!l(TU)){let e=document.createElement("canvas");e.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");let t=e.style.imageRendering;TU=l(t)&&t!=="",TU&&(moe=t)}return TU}function yve(){return hoe()?moe:void 0}function yl(){return yl._result}yl._promise=void 0;yl._result=void 0;yl.initialize=function(){return l(yl._promise)||(yl._promise=new Promise(e=>{let t=new Image;t.onload=function(){yl._result=t.width>0&&t.height>0,e(yl._result)},t.onerror=function(){yl._result=!1,e(yl._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),yl._promise};Object.defineProperties(yl,{initialized:{get:function(){return l(yl._result)}}});var eZ=[];typeof ArrayBuffer<"u"&&(eZ.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&eZ.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&eZ.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&eZ.push(BigInt64Array),typeof BigUint64Array<"u"&&eZ.push(BigUint64Array));var am={isChrome:CH,chromeVersion:dve,isSafari:loe,safariVersion:uve,isWebkit:doe,webkitVersion:mve,isEdge:_U,edgeVersion:hve,isFirefox:SU,firefoxVersion:bve,isWindows:fve,isIPadOrIOS:pve,hardwareConcurrency:sm.hardwareConcurrency??3,supportsPointerEvents:gve,supportsImageRenderingPixelated:hoe,supportsWebP:yl,imageRenderingValue:yve,typedArrayTypes:eZ};am.supportsBasis=function(e){return am.supportsWebAssembly()&&e.context.supportsBasis};am.supportsFullscreen=function(){return Ur.supportsFullscreen()};am.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};am.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};am.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};am.supportsBigInt=function(){return typeof BigInt<"u"};am.supportsWebWorkers=function(){return typeof Worker<"u"};am.supportsWebAssembly=function(){return typeof WebAssembly<"u"};am.supportsWebgl2=function(e){return e.context.webgl2};am.supportsEsmWebWorkers=function(){return!SU()||parseInt(VH)>=114};var an=am;function RH(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 GH[0]=t,e.fromBytes(G0[0],G0[1],G0[2],G0[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=RH(u,d,t+1/3),a=RH(u,d,t),c=RH(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=xve.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=Tve.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=_ve.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=Sve.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 G0[0]=t,G0[1]=n,G0[2]=i,G0[3]=o,GH[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}},EH,GH,G0;an.supportsTypedArrays()&&(EH=new ArrayBuffer(4),GH=new Uint32Array(EH),G0=new Uint8Array(EH));var xve=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,Tve=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,_ve=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,Sve=/^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 AU(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}AU.ALL=Object.freeze(new AU({color:new U(0,0,0,0),depth:1,stencil:0}));AU.prototype.execute=function(e,t){e.clear(this,t)};var si=AU;var DNt=x(T(),1);var wNt=x(T(),1),foe={ENVIRONMENT:0,COMPUTE:1,GLOBE:2,TERRAIN_CLASSIFICATION:3,CESIUM_3D_TILE_EDGES:4,CESIUM_3D_TILE:5,CESIUM_3D_TILE_CLASSIFICATION:6,CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW:7,OPAQUE:8,TRANSLUCENT:9,VOXELS:10,GAUSSIAN_SPLATS:11,OVERLAY:12,NUMBER_OF_PASSES:13};Object.freeze(foe);var Le=foe;function poe(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}poe.prototype.execute=function(e){e.execute(this)};var xl=poe;var MUt=x(T(),1);var akt=x(T(),1);var HNt=x(T(),1);var ns=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,ZU),e.magnitude(ZU)}static distanceSquared(t,n){return e.subtract(t,n,ZU),e.magnitudeSquared(ZU)}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,boe),o=e.multiplyByScalar(t,1-i,o),e.add(boe,o,o)}static angleBetween(t,n){return e.normalize(t,goe),e.normalize(n,yoe),W.acosClamped(e.dot(goe,yoe))}static mostOrthogonalAxis(t,n){let i=e.normalize(t,Ave);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})`}};ns.fromCartesian3=ns.clone;ns.fromCartesian4=ns.clone;ns.packedLength=2;ns.fromArray=ns.unpack;var ZU=new ns,boe=new ns,goe=new ns,yoe=new ns,Ave=new ns;ns.ZERO=Object.freeze(new ns(0,0));ns.ONE=Object.freeze(new ns(1,1));ns.UNIT_X=Object.freeze(new ns(1,0));ns.UNIT_Y=Object.freeze(new ns(0,1));var M=ns;var oYt=x(T(),1);var qNt=x(T(),1);var Zve=new m,Cve=new m;function Vve(e,t,n,i,o){let r=e.x,s=e.y,a=e.z,c=t.x,d=t.y,u=t.z,h=r*r*c*c,p=s*s*d*d,b=a*a*u*u,f=h+p+b,y=Math.sqrt(1/f),_=m.multiplyByScalar(e,y,Zve);if(f<i)return isFinite(y)?m.clone(_,o):void 0;let S=n.x,A=n.y,Z=n.z,V=Cve;V.x=_.x*S*2,V.y=_.y*A*2,V.z=_.z*Z*2;let E=(1-y)*m.magnitude(e)/(.5*m.magnitude(V)),L=0,v,I,X,N,g,C,R,G,P,Y,O;do{E-=L,X=1/(1+E*S),N=1/(1+E*A),g=1/(1+E*Z),C=X*X,R=N*N,G=g*g,P=C*X,Y=R*N,O=G*g,v=h*C+p*R+b*G-1,I=h*P*S+p*Y*A+b*O*Z;let k=-2*I;L=v/k}while(Math.abs(v)>W.EPSILON12);return l(o)?(o.x=r*X,o.y=s*N,o.z=a*g,o):new m(r*X,s*N,a*g)}var sT=Vve;var Tl=class Tl{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 Tl(t,n,i)}static fromDegrees(t,n,i,o){return t=W.toRadians(t),n=W.toRadians(n),Tl.fromRadians(t,n,i,o)}static fromCartesian(t,n,i){let o=l(n)?n.oneOverRadii:Tl._ellipsoidOneOverRadii,r=l(n)?n.oneOverRadiiSquared:Tl._ellipsoidOneOverRadiiSquared,s=l(n)?n._centerToleranceSquared:Tl._ellipsoidCenterToleranceSquared,a=sT(t,o,r,s,Eve);if(!l(a))return;let c=m.multiplyComponents(a,r,Rve);c=m.normalize(c,c);let d=m.subtract(t,a,Gve),u=Math.atan2(c.y,c.x),h=Math.asin(c.z),p=W.sign(m.dot(d,t))*m.magnitude(d);return l(i)?(i.longitude=u,i.latitude=h,i.height=p,i):new Tl(u,h,p)}static toCartesian(t,n,i){return m.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 Tl(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 Tl.clone(this,t)}equals(t){return Tl.equals(this,t)}equalsEpsilon(t,n){return Tl.equalsEpsilon(this,t,n)}toString(){return`(${this.longitude}, ${this.latitude}, ${this.height})`}};Qt(Tl,"_ellipsoidOneOverRadii",new m(1/6378137,1/6378137,1/6356752314245179e-9)),Qt(Tl,"_ellipsoidOneOverRadiiSquared",new m(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9))),Qt(Tl,"_ellipsoidCenterToleranceSquared",W.EPSILON1);var W1=Tl;W1.ZERO=Object.freeze(new W1(0,0,0));var Rve=new m,Eve=new m,Gve=new m,pe=W1;var hYt=x(T(),1);function xoe(e,t,n,i){t=t??0,n=n??0,i=i??0,e._radii=new m(t,n,i),e._radiiSquared=new m(t*t,n*n,i*i),e._radiiToTheFourth=new m(t*t*t*t,n*n*n*n,i*i*i*i),e._oneOverRadii=new m(t===0?0:1/t,n===0?0:1/n,i===0?0:1/i),e._oneOverRadiiSquared=new m(t===0?0:1/(t*t),n===0?0:1/(n*n),i===0?0:1/(i*i)),e._minimumRadius=Math.min(t,n,i),e._maximumRadius=Math.max(t,n,i),e._centerToleranceSquared=W.EPSILON1,e._radiiSquared.z!==0&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}var _l=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,xoe(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)?(m.clone(i,n._radii),m.clone(t._radiiSquared,n._radiiSquared),m.clone(t._radiiToTheFourth,n._radiiToTheFourth),m.clone(t._oneOverRadii,n._oneOverRadii),m.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)&&xoe(n,t.x,t.y,t.z),n}static get default(){return e._default}static set default(t){e._default=t,m._ellipsoidRadiiSquared=t.radiiSquared,pe._ellipsoidOneOverRadii=t.oneOverRadii,pe._ellipsoidOneOverRadiiSquared=t.oneOverRadiiSquared,pe._ellipsoidCenterToleranceSquared=t._centerToleranceSquared}clone(t){return e.clone(this,t)}static pack(t,n,i){return i=i??0,m.pack(t._radii,n,i),n}static unpack(t,n,i){n=n??0;let o=m.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 m),n.x=s,n.y=a,n.z=c,m.normalize(n,n)}geodeticSurfaceNormal(t,n){if(!m.equalsEpsilon(t,m.ZERO,W.EPSILON14))return l(n)||(n=new m),n=m.multiplyComponents(t,this._oneOverRadiiSquared,n),m.normalize(n,n)}cartographicToCartesian(t,n){let i=Lve,o=Wve;this.geodeticSurfaceNormalCartographic(t,i),m.multiplyComponents(this._radiiSquared,i,o);let r=Math.sqrt(m.dot(i,o));return m.divideByScalar(o,r,o),m.multiplyByScalar(i,t.height,i),l(n)||(n=new m),m.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,Fve);if(!l(i))return;let o=this.geodeticSurfaceNormal(i,vve),r=m.subtract(t,i,Ive),s=Math.atan2(o.y,o.x),a=Math.asin(o.z),c=W.sign(m.dot(r,t))*m.magnitude(r);return l(n)?(n.longitude=s,n.latitude=a,n.height=c,n):new pe(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 m);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 m.multiplyByScalar(t,a,n)}transformPositionToScaledSpace(t,n){return l(n)||(n=new m),m.multiplyComponents(t,this._oneOverRadii,n)}transformPositionFromScaledSpace(t,n){return l(n)||(n=new m),m.multiplyComponents(t,this._radii,n)}equals(t){return this===t||l(t)&&m.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 m),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 M);let i=this.getSurfaceNormalIntersectionWithZAxis(t,0,Pve),o=m.distance(t,i),r=this.minimumRadius*o/this.maximumRadius**2,s=o*r**2;return M.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 Toe(o,r,function(h){let p=Math.cos(h),b=Math.sin(h);return Math.cos(h)*Toe(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)})})}};_l.WGS84=Object.freeze(new _l(6378137,6378137,6356752314245179e-9));_l.UNIT_SPHERE=Object.freeze(new _l(1,1,1));_l.MOON=Object.freeze(new _l(W.LUNAR_RADIUS,W.LUNAR_RADIUS,W.LUNAR_RADIUS));_l.MARS=Object.freeze(new _l(3396190,3396190,3376200));_l._default=_l.WGS84;_l.packedLength=m.packedLength;_l.prototype.geocentricSurfaceNormal=m.normalize;var Lve=new m,Wve=new m,vve=new m,Fve=new m,Ive=new m,Pve=new m,Xve=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],Nve=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function Toe(e,t,n){let i=.5*(t+e),o=.5*(t-e),r=0;for(let s=0;s<5;s++){let a=o*Xve[s];r+=Nve[s]*(n(i+a)+n(i-a))}return r*=o,r}var ie=_l;var xYt=x(T(),1);var LH=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 m(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 pe(o,r,s)}},Di=LH;var _Yt=x(T(),1),_oe={OUTSIDE:-1,INTERSECTING:0,INSIDE:1};Object.freeze(_oe);var zt=_oe;var q9t=x(T(),1);var D9t=x(T(),1);var JMt=x(T(),1);var AYt=x(T(),1);function Yve(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 bo=Yve;var CYt=x(T(),1);function wve(e,t,n,i,o){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=i,this.ut1MinusUtc=o}var Og=wve;var HYt=x(T(),1);var vYt=x(T(),1);var RYt=x(T(),1);function Mve(e){return e%4===0&&e%100!==0||e%400===0}var Sh=Mve;var Soe=[31,28,31,30,31,30,31,31,30,31,30,31];function kve(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&&Sh(e)?Soe[t-1]+1:Soe[t-1];if(n>S)throw new he("Month and Day represents invalid date")}}var L0=kve;var IYt=x(T(),1);function Uve(e,t){this.julianDate=e,this.offset=t}var so=Uve;var XYt=x(T(),1),Aoe={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(Aoe);var ii=Aoe;var YYt=x(T(),1),Zoe={UTC:0,TAI:1};Object.freeze(Zoe);var ti=Zoe;var Coe=new L0,WH=[31,28,31,30,31,30,31,31,30,31,30,31],vH=29;function IH(e,t){return di.compare(e.julianDate,t.julianDate)}var tZ=new so;function CU(e){tZ.julianDate=e;let t=di.leapSeconds,n=bo(t,tZ,IH);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let i=t[n].offset;n>0&&di.secondsDifference(t[n].julianDate,e)>i&&(n--,i=t[n].offset),di.addSeconds(e,i,e)}function Voe(e,t){tZ.julianDate=e;let n=di.leapSeconds,i=bo(n,tZ,IH);if(i<0&&(i=~i),i===0)return di.addSeconds(e,-n[0].offset,t);if(i>=n.length)return di.addSeconds(e,-n[i-1].offset,t);let o=di.secondsDifference(n[i].julianDate,e);if(o===0)return di.addSeconds(e,-n[i].offset,t);if(!(o<=1))return di.addSeconds(e,-n[--i].offset,t)}function Bg(e,t,n){let i=t/ii.SECONDS_PER_DAY|0;return e+=i,t-=ii.SECONDS_PER_DAY*i,t<0&&(e--,t+=ii.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function FH(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*ii.SECONDS_PER_HOUR+o*ii.SECONDS_PER_MINUTE+s*ii.SECONDS_PER_MILLISECOND);return u>=43200&&(d-=1),[d,u]}var Dve=/^(\d{4})$/,Ove=/^(\d{4})-(\d{2})$/,Bve=/^(\d{4})-?(\d{3})$/,zve=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,Hve=/^(\d{4})-?(\d{2})-?(\d{2})$/,PH=/([Z+\-])?(\d{2})?:?(\d{2})?$/,Kve=/^(\d{2})(\.\d+)?/.source+PH.source,Jve=/^(\d{2}):?(\d{2})(\.\d+)?/.source+PH.source,jve=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+PH.source;var di=class e{constructor(t,n,i){this.dayNumber=void 0,this.secondsOfDay=void 0,t=t??0,n=n??0,i=i??ti.UTC;let o=t|0;n=n+(t-o)*ii.SECONDS_PER_DAY,Bg(o,n,this),i===ti.UTC&&CU(this)}static fromGregorianDate(t,n){let i=FH(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond);return l(n)?(Bg(i[0],i[1],n),CU(n),n):new e(i[0],i[1],ti.UTC)}static fromDate(t,n){let i=FH(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds());return l(n)?(Bg(i[0],i[1],n),CU(n),n):new e(i[0],i[1],ti.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,h=i[0],p=i[1],b,f;if(i=h.match(Hve),i!==null)o=+i[1],r=+i[2],s=+i[3];else if(i=h.match(Ove),i!==null)o=+i[1],r=+i[2];else if(i=h.match(Dve),i!==null)o=+i[1];else{let A;if(i=h.match(Bve),i!==null)o=+i[1],A=+i[2],f=Sh(o);else if(i=h.match(zve),i!==null){o=+i[1];let Z=+i[2],V=+i[3]||0,E=new Date(Date.UTC(o,0,4));A=Z*7+V-E.getUTCDay()-3}b=new Date(Date.UTC(o,0,1)),b.setUTCDate(A),r=b.getUTCMonth()+1,s=b.getUTCDate()}f=Sh(o);let y;if(l(p)){i=p.match(jve),i!==null?(a=+i[1],c=+i[2],d=+i[3],u=+(i[4]||0)*1e3,y=5):(i=p.match(Jve),i!==null?(a=+i[1],c=+i[2],d=+(i[3]||0)*60,y=4):(i=p.match(Kve),i!==null&&(a=+i[1],c=+(i[2]||0)*60,y=3)));let A=i[y],Z=+i[y+1],V=+(i[y+2]||0);switch(A){case"+":a=a-Z,c=c-V;break;case"-":a=a+Z,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?vH:WH[r-1];s>b;)s-=b,r++,r>12&&(r-=12,o++),b=f&&r===2?vH:WH[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?vH:WH[r-1],s+=b;let S=FH(o,r,s,a,c,d,u);return l(n)?(Bg(S[0],S[1],n),CU(n)):n=new e(S[0],S[1],ti.UTC),_&&e.addSeconds(n,1,n),n}static now(t){return e.fromDate(new Date,t)}static toGregorianDate(t,n){let i=!1,o=Voe(t,VU);l(o)||(e.addSeconds(t,-1,VU),o=Voe(VU,VU),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,h=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/ii.SECONDS_PER_HOUR|0,y=s-f*ii.SECONDS_PER_HOUR,_=y/ii.SECONDS_PER_MINUTE|0;y=y-_*ii.SECONDS_PER_MINUTE;let S=y|0,A=(y-S)/ii.SECONDS_PER_MILLISECOND;return f+=12,f>23&&(f-=24),i&&(S+=1),l(n)?(n.year=b,n.month=p,n.day=h,n.hour=f,n.minute=_,n.second=S,n.millisecond=A,n.isLeapSecond=i,n):new L0(b,p,h,f,_,S,A,i)}static toDate(t){let n=e.toGregorianDate(t,Coe),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,Coe),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 h;if(!l(n)&&u!==0){let p=u*.01;return h=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")}.${h}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`:(h=(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")}.${h}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,ti.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/ii.SECONDS_PER_DAY}static secondsDifference(t,n){return(t.dayNumber-n.dayNumber)*ii.SECONDS_PER_DAY+(t.secondsOfDay-n.secondsOfDay)}static daysDifference(t,n){let i=t.dayNumber-n.dayNumber,o=(t.secondsOfDay-n.secondsOfDay)/ii.SECONDS_PER_DAY;return i+o}static computeTaiMinusUtc(t){tZ.julianDate=t;let n=e.leapSeconds,i=bo(n,tZ,IH);return i<0&&(i=~i,--i,i<0&&(i=0)),n[i].offset}static addSeconds(t,n,i){return Bg(t.dayNumber,t.secondsOfDay+n,i)}static addMinutes(t,n,i){let o=t.secondsOfDay+n*ii.SECONDS_PER_MINUTE;return Bg(t.dayNumber,o,i)}static addHours(t,n,i){let o=t.secondsOfDay+n*ii.SECONDS_PER_HOUR;return Bg(t.dayNumber,o,i)}static addDays(t,n,i){let o=t.dayNumber+n;return Bg(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)}},VU=new di(0,0,ti.TAI);di.leapSeconds=[new so(new di(2441317,43210,ti.TAI),10),new so(new di(2441499,43211,ti.TAI),11),new so(new di(2441683,43212,ti.TAI),12),new so(new di(2442048,43213,ti.TAI),13),new so(new di(2442413,43214,ti.TAI),14),new so(new di(2442778,43215,ti.TAI),15),new so(new di(2443144,43216,ti.TAI),16),new so(new di(2443509,43217,ti.TAI),17),new so(new di(2443874,43218,ti.TAI),18),new so(new di(2444239,43219,ti.TAI),19),new so(new di(2444786,43220,ti.TAI),20),new so(new di(2445151,43221,ti.TAI),21),new so(new di(2445516,43222,ti.TAI),22),new so(new di(2446247,43223,ti.TAI),23),new so(new di(2447161,43224,ti.TAI),24),new so(new di(2447892,43225,ti.TAI),25),new so(new di(2448257,43226,ti.TAI),26),new so(new di(2448804,43227,ti.TAI),27),new so(new di(2449169,43228,ti.TAI),28),new so(new di(2449534,43229,ti.TAI),29),new so(new di(2450083,43230,ti.TAI),30),new so(new di(2450630,43231,ti.TAI),31),new so(new di(2451179,43232,ti.TAI),32),new so(new di(2453736,43233,ti.TAI),33),new so(new di(2454832,43234,ti.TAI),34),new so(new di(2456109,43235,ti.TAI),35),new so(new di(2457204,43236,ti.TAI),36),new so(new di(2457754,43237,ti.TAI),37)];var Q=di;var NMt=x(T(),1),Hoe=x(tu(),1);var $Yt=x(T(),1);function Qve(e){return(e.length===0||e[e.length-1]!=="/")&&(e=`${e}/`),e}var v1=Qve;var twt=x(T(),1);function Foe(e,t){if(e===null||typeof e!="object")return e;t=t??!1;let n=new e.constructor;for(let i in e)if(e.hasOwnProperty(i)){let o=e[i];t&&(o=Foe(o,t)),n[i]=o}return n}var ze=Foe;var owt=x(T(),1);function Ioe(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]=Ioe(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 Rt=Ioe;var swt=x(T(),1);function qve(){let e,t,n=new Promise(function(i,o){e=i,t=o});return{resolve:e,reject:t,promise:n}}var pd=qve;var lwt=x(T(),1),Poe=x(tu(),1);function XH(e,t){let n;return typeof document<"u"&&(n=document),XH._implementation(e,t,n)}XH._implementation=function(e,t,n){if(!l(t)){if(typeof n>"u")return e;t=n.baseURI??n.location.href}let i=new Poe.default(e);return i.scheme()!==""?i.toString():i.absoluteTo(t).toString()};var tp=XH;var uwt=x(T(),1),Xoe=x(tu(),1);function $ve(e,t){let n="",i=e.lastIndexOf("/");return i!==-1&&(n=e.substring(0,i+1)),t&&(e=new Xoe.default(e),e.query().length!==0&&(n+=`?${e.query()}`),e.fragment().length!==0&&(n+=`#${e.fragment()}`)),n}var F1=$ve;var hwt=x(T(),1),Noe=x(tu(),1);function eFe(e){let t=new Noe.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 W0=eFe;var bwt=x(T(),1);var Yoe={};function tFe(e,t,n){l(t)||(t=e.width),l(n)||(n=e.height);let i=Yoe[t];l(i)||(i={},Yoe[t]=i);let o=i[n];if(!l(o)){let r=document.createElement("canvas");r.width=t,r.height=n,o=r.getContext("2d",{willReadFrequently:!0}),o.globalCompositeOperation="copy",i[n]=o}return o.drawImage(e,0,0,t,n),o.getImageData(0,0,t,n).data}var Ah=tFe;var ywt=x(T(),1);var nFe=/^blob:/i;function iFe(e){return nFe.test(e)}var aT=iFe;var _wt=x(T(),1);var np;function oFe(e){l(np)||(np=document.createElement("a")),np.href=window.location.href;let t=np.host,n=np.protocol;return np.href=e,np.href=np.href,n!==np.protocol||t!==np.host}var zg=oFe;var Awt=x(T(),1);var rFe=/^data:/i;function sFe(e){return rFe.test(e)}var Zh=sFe;var Cwt=x(T(),1);function aFe(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=aFe;var Rwt=x(T(),1);function cFe(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=cFe;var Lwt=x(T(),1);function lFe(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 nu=lFe;var Mwt=x(T(),1);var vwt=x(T(),1),woe={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5};Object.freeze(woe);var ui=woe;var Iwt=x(T(),1),Moe={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3};Object.freeze(Moe);var ks=Moe;function LU(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??ks.OTHER,this.serverKey=e.serverKey,this.state=ui.UNISSUED,this.deferred=void 0,this.cancelled=!1}LU.prototype.cancel=function(){this.cancelled=!0};LU.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=ui.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new LU(this)};var fr=LU;var zwt=x(T(),1);var Uwt=x(T(),1);function dFe(e){let t={};if(!e)return t;let n=e.split(`\r
`);for(let i=0;i<n.length;++i){let o=n[i],r=o.indexOf(": ");if(r>0){let s=o.substring(0,r),a=o.substring(r+2);t[s]=a}}return t}var I1=dFe;function koe(e,t,n){this.statusCode=e,this.response=t,this.responseHeaders=n,typeof this.responseHeaders=="string"&&(this.responseHeaders=I1(this.responseHeaders))}koe.prototype.toString=function(){let e="Request has failed.";return l(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var ip=koe;var cMt=x(T(),1),WU=x(tu(),1);var Jwt=x(T(),1);function P1(){this._listeners=new Map,this._toRemove=new Map,this._toAdd=new Map,this._invokingListeners=!1,this._listenerCount=0}Object.defineProperties(P1.prototype,{numberOfListeners:{get:function(){return this._listenerCount}}});P1.prototype.addEventListener=function(e,t){let n=this,i=n._invokingListeners?n._toAdd:n._listeners;return YH(this,i,e,t)&&n._listenerCount++,function(){n.removeEventListener(e,t)}};function YH(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)}P1.prototype.removeEventListener=function(e,t){let n=NH(this,this._listeners,e,t),i=NH(this,this._toAdd,e,t),o=n||i;return o&&this._listenerCount--,o};function NH(e,t,n,i){let o=t.get(n);if(!o||!o.has(i))return!1;if(e._invokingListeners){if(!YH(e,e._toRemove,n,i))return!1}else o.delete(i),o.size===0&&t.delete(n);return!0}P1.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)YH(this,this._listeners,e,n);this._toAdd.clear();for(let[e,t]of this._toRemove.entries())for(let n of t)NH(this,this._listeners,e,n);this._toRemove.clear()};var _e=P1;var qwt=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 wH(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?(wH(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)wH(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 wH(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n};var X1=dT;function uFe(e,t){return e.priority-t.priority}var go={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},oZ=20,wc=new X1({comparator:uFe});wc.maximumLength=oZ;wc.reserve(oZ);var op=[],v0={},mFe=typeof document<"u"?new WU.default(document.location.href):new WU.default,vU=new _e;function pr(){}pr.maximumRequests=50;pr.maximumRequestsPerServer=18;pr.requestsByServer={};pr.throttleRequests=!0;pr.debugShowStatistics=!1;pr.requestCompletedEvent=vU;Object.defineProperties(pr,{statistics:{get:function(){return go}},priorityHeapLength:{get:function(){return oZ},set:function(e){if(e<oZ)for(;wc.length>e;){let t=wc.pop();uT(t)}oZ=e,wc.maximumLength=e,wc.reserve(e)}}});function Uoe(e){l(e.priorityFunction)&&(e.priority=e.priorityFunction())}pr.serverHasOpenSlots=function(e,t){t=t??1;let n=pr.requestsByServer[e]??pr.maximumRequestsPerServer;return v0[e]+t<=n};pr.heapHasOpenSlots=function(e){return wc.length+e<=oZ};function Doe(e){return e.state===ui.UNISSUED&&(e.state=ui.ISSUED,e.deferred=pd()),e.deferred.promise}function hFe(e){return function(t){if(e.state===ui.CANCELLED)return;let n=e.deferred;--go.numberOfActiveRequests,--v0[e.serverKey],vU.raiseEvent(),e.state=ui.RECEIVED,e.deferred=void 0,n.resolve(t)}}function fFe(e){return function(t){e.state!==ui.CANCELLED&&(++go.numberOfFailedRequests,--go.numberOfActiveRequests,--v0[e.serverKey],vU.raiseEvent(t),e.state=ui.FAILED,e.deferred.reject(t))}}function Ooe(e){let t=Doe(e);return e.state=ui.ACTIVE,op.push(e),++go.numberOfActiveRequests,++go.numberOfActiveRequestsEver,++v0[e.serverKey],e.requestFunction().then(hFe(e)).catch(fFe(e)),t}function uT(e){let t=e.state===ui.ACTIVE;if(e.state=ui.CANCELLED,++go.numberOfCancelledRequests,l(e.deferred)){let n=e.deferred;n.promise.catch(()=>{}),e.deferred=void 0,n.reject(new le(`Request cancelled: "${e.url}"`))}t&&(--go.numberOfActiveRequests,--v0[e.serverKey],++go.numberOfCancelledActiveRequests),l(e.cancelFunction)&&e.cancelFunction()}pr.update=function(){let e,t,n=0,i=op.length;for(e=0;e<i;++e){if(t=op[e],t.cancelled&&uT(t),t.state!==ui.ACTIVE){++n;continue}n>0&&(op[e-n]=t)}op.length-=n;let o=wc.internalArray,r=wc.length;for(e=0;e<r;++e)Uoe(o[e]);wc.resort();let s=Math.max(pr.maximumRequests-op.length,0),a=0;for(;a<s&&wc.length>0;){if(t=wc.pop(),t.cancelled){uT(t);continue}if(t.throttleByServer&&!pr.serverHasOpenSlots(t.serverKey)){uT(t);continue}Ooe(t),++a}pFe()};pr.getServerKey=function(e){let t=new WU.default(e);t.scheme()===""&&(t=t.absoluteTo(mFe),t.normalize());let n=t.authority();/:/.test(n)||(n=`${n}:${t.scheme()==="https"?"443":"80"}`);let i=v0[n];return l(i)||(v0[n]=0),n};pr.request=function(e){if(Zh(e.url)||aT(e.url))return vU.raiseEvent(),e.state=ui.RECEIVED,e.requestFunction();if(++go.numberOfAttemptedRequests,l(e.serverKey)||(e.serverKey=pr.getServerKey(e.url)),pr.throttleRequests&&e.throttleByServer&&!pr.serverHasOpenSlots(e.serverKey))return;if(!pr.throttleRequests||!e.throttle)return Ooe(e);if(op.length>=pr.maximumRequests)return;Uoe(e);let t=wc.insert(e);if(l(t)){if(t===e)return;uT(t)}return Doe(e)};function pFe(){pr.debugShowStatistics&&(go.numberOfActiveRequests===0&&go.lastNumberOfActiveRequests>0&&(go.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${go.numberOfAttemptedRequests}`),go.numberOfAttemptedRequests=0),go.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${go.numberOfCancelledRequests}`),go.numberOfCancelledRequests=0),go.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${go.numberOfCancelledActiveRequests}`),go.numberOfCancelledActiveRequests=0),go.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${go.numberOfFailedRequests}`),go.numberOfFailedRequests=0)),go.lastNumberOfActiveRequests=go.numberOfActiveRequests)}pr.clearForSpecs=function(){for(;wc.length>0;){let t=wc.pop();uT(t)}let e=op.length;for(let t=0;t<e;++t)uT(op[t]);op.length=0,v0={},go.numberOfAttemptedRequests=0,go.numberOfActiveRequests=0,go.numberOfCancelledRequests=0,go.numberOfCancelledActiveRequests=0,go.numberOfFailedRequests=0,go.numberOfActiveRequestsEver=0,go.lastNumberOfActiveRequests=0};pr.numberOfActiveRequestsByServer=function(e){return v0[e]};pr.requestHeap=wc;var Mc=pr;var uMt=x(T(),1),Boe=x(tu(),1);var N1={},rZ={};N1.add=function(e,t){let n=`${e.toLowerCase()}:${t}`;l(rZ[n])||(rZ[n]=!0)};N1.remove=function(e,t){let n=`${e.toLowerCase()}:${t}`;l(rZ[n])&&delete rZ[n]};function bFe(e){let t=new Boe.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}}N1.contains=function(e){let t=bFe(e);return!!(l(t)&&l(rZ[t]))};N1.clear=function(){rZ={}};var sZ=N1;var Koe=(function(){try{let e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob",e.responseType==="blob"}catch{return!1}})();function Xt(e){e=e??B.EMPTY_OBJECT,typeof e=="string"&&(e={url:e}),this._url=void 0,this._templateValues=rp(e.templateValues,{}),this._queryParameters=rp(e.queryParameters,{}),this.headers=rp(e.headers,{}),this.request=e.request??new fr,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 rp(e,t){return l(e)?ze(e):t}Xt.createIfNeeded=function(e){return e instanceof Xt?e.getDerivedResource({request:e.request}):typeof e!="string"?e:new Xt({url:e})};var aZ;Xt.supportsImageBitmapOptions=function(){return l(aZ)?aZ:typeof createImageBitmap!="function"?(aZ=Promise.resolve(!1),aZ):(aZ=Xt.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC"}).then(function(t){let n={imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"};return Promise.all([createImageBitmap(t,n),createImageBitmap(t)])}).then(function(t){let n=Ah(t[0]),i=Ah(t[1]);return n[1]!==i[1]}).catch(function(){return!1}),aZ)};Object.defineProperties(Xt,{isBlobSupported:{get:function(){return Koe}}});Object.defineProperties(Xt.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 W0(this._url)}},isDataUri:{get:function(){return Zh(this._url)}},isBlobUri:{get:function(){return aT(this._url)}},isCrossOriginUrl:{get:function(){return zg(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}},credits:{get:function(){return this._credits}}});Xt.prototype.toString=function(){return this.getUrlComponent(!0,!0)};Xt.prototype.parseUrl=function(e,t,n,i){let o=new Hoe.default(e),r=gFe(o.query());this._queryParameters=t?IU(r,this.queryParameters,n):r,o.search(""),o.fragment(""),l(i)&&o.scheme()===""&&(o=o.absoluteTo(tp(i))),this._url=o.toString()};function gFe(e){return e.length===0?{}:e.indexOf("=")===-1?{[e]:void 0}:nu(e)}function IU(e,t,n){if(!n)return Rt(e,t);let i=ze(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}Xt.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let n=this._url;e&&(n=`${n}${yFe(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 yFe(e){let t=Object.keys(e);return t.length===0?"":t.length===1&&!l(e[t[0]])?`?${t[0]}`:`?${lT(e)}`}Xt.prototype.setQueryParameters=function(e,t){t?this._queryParameters=IU(this._queryParameters,e,!1):this._queryParameters=IU(e,this._queryParameters,!1)};Xt.prototype.appendQueryParameters=function(e){this._queryParameters=IU(e,this._queryParameters,!0)};Xt.prototype.setTemplateValues=function(e,t){t?this._templateValues=Rt(this._templateValues,e):this._templateValues=Rt(e,this._templateValues)};Xt.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=Rt(e.queryParameters,t.queryParameters)),l(e.templateValues)&&(t._templateValues=Rt(e.templateValues,t.templateValues)),l(e.headers)&&(t.headers=Rt(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};Xt.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})};Xt.prototype.clone=function(e){return l(e)?(e._url=this._url,e._queryParameters=ze(this._queryParameters),e._templateValues=ze(this._templateValues),e.headers=ze(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e):new Xt({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})};Xt.prototype.getBaseUri=function(e){return F1(this.getUrlComponent(e),e)};Xt.prototype.appendForwardSlash=function(){this._url=v1(this._url)};Xt.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})};Xt.fetchArrayBuffer=function(e){return new Xt(e).fetchArrayBuffer()};Xt.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})};Xt.fetchBlob=function(e){return new Xt(e).fetchBlob()};Xt.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(MH(this.request),!Koe||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 Xt.supportsImageBitmapOptions().then(function(u){return s=u,a=s&&t,r}).then(function(u){if(!l(u))return;if(d=u,a)return Xt.createImageBitmapFromBlob(u,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o});let h=window.URL.createObjectURL(u);return c=new Xt({url:h}),c._fetchImage({flipY:i,skipColorSpaceConversion:o,preferImageBitmap:!1})}).then(function(u){if(l(u))return u.blob=d,a||window.URL.revokeObjectURL(c.url),u}).catch(function(u){return l(c)&&window.URL.revokeObjectURL(c.url),u.blob=d,Promise.reject(u)})};Xt.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 Xt._Implementations.createImage(r,a,c,n,i,o),c.promise};let s=Mc.request(r);if(l(s))return s.catch(function(a){return r.state!==ui.FAILED?Promise.reject(a):t.retryOnError(a).then(function(c){return c?(r.state=ui.UNISSUED,r.deferred=void 0,t._fetchImage({flipY:n,skipColorSpaceConversion:i,preferImageBitmap:o})):Promise.reject(a)})})};Xt.fetchImage=function(e){return new Xt(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})};Xt.prototype.fetchText=function(){return this.fetch({responseType:"text"})};Xt.fetchText=function(e){return new Xt(e).fetchText()};Xt.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)})};Xt.fetchJson=function(e){return new Xt(e).fetchJson()};Xt.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})};Xt.fetchXML=function(e){return new Xt(e).fetchXML()};Xt.prototype.fetchJsonp=function(e){e=e??"callback",MH(this.request);let t;do t=`loadJsonp${W.nextRandomNumber().toString().substring(2,8)}`;while(l(window[t]));return Joe(this,e,t)};function Joe(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}},Xt._Implementations.loadAndExecuteScript(r,n,a),a.promise};let s=Mc.request(o);if(l(s))return s.catch(function(a){return o.state!==ui.FAILED?Promise.reject(a):e.retryOnError(a).then(function(c){return c?(o.state=ui.UNISSUED,o.deferred=void 0,Joe(e,t,n)):Promise.reject(a)})})}Xt.fetchJsonp=function(e){return new Xt(e).fetchJsonp(e.callbackParameterName)};Xt.prototype._makeRequest=function(e){let t=this;MH(t.request);let n=t.request,i=t.url;n.url=i,n.requestFunction=function(){let r=e.responseType,s=Rt(e.headers,t.headers),a=e.overrideMimeType,c=e.method,d=e.data,u=pd(),h=Xt._Implementations.loadWithXhr(i,r,c,d,s,u,a);return l(h)&&l(h.abort)&&(n.cancelFunction=function(){h.abort()}),u.promise};let o=Mc.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!==ui.FAILED?Promise.reject(r):t.retryOnError(r).then(function(s){return s?(n.state=ui.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(r)})})};function MH(e){if(e.state===ui.ISSUED||e.state===ui.ACTIVE)throw new le("The Resource is already being fetched.");e.state=ui.UNISSUED,e.deferred=void 0}var xFe=/^data:(.*?)(;base64)?,(.*)$/;function FU(e,t){let n=decodeURIComponent(t);return e?atob(n):n}function zoe(e,t){let n=FU(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 TFe(e,t){t=t??"";let n=e[1],i=!!e[2],o=e[3],r,s;switch(t){case"":case"text":return FU(i,o);case"arraybuffer":return zoe(i,o);case"blob":return r=zoe(i,o),new Blob([r],{type:n});case"document":return s=new DOMParser,s.parseFromString(FU(i,o),n);case"json":return JSON.parse(FU(i,o));default:}}Xt.prototype.fetch=function(e){return e=rp(e,{}),e.method="GET",this._makeRequest(e)};Xt.fetch=function(e){return new Xt(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Xt.prototype.delete=function(e){return e=rp(e,{}),e.method="DELETE",this._makeRequest(e)};Xt.delete=function(e){return new Xt(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})};Xt.prototype.head=function(e){return e=rp(e,{}),e.method="HEAD",this._makeRequest(e)};Xt.head=function(e){return new Xt(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Xt.prototype.options=function(e){return e=rp(e,{}),e.method="OPTIONS",this._makeRequest(e)};Xt.options=function(e){return new Xt(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Xt.prototype.post=function(e,t){return No.defined("data",e),t=rp(t,{}),t.method="POST",t.data=e,this._makeRequest(t)};Xt.post=function(e){return new Xt(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Xt.prototype.put=function(e,t){return No.defined("data",e),t=rp(t,{}),t.method="PUT",t.data=e,this._makeRequest(t)};Xt.put=function(e){return new Xt(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Xt.prototype.patch=function(e,t){return No.defined("data",e),t=rp(t,{}),t.method="PATCH",t.data=e,this._makeRequest(t)};Xt.patch=function(e){return new Xt(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};Xt._Implementations={};Xt._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&&(sZ.contains(e)?i.crossOrigin="use-credentials":i.crossOrigin=""),i.src=e};Xt._Implementations.createImage=function(e,t,n,i,o,r,s){let a=e.url;Xt.supportsImageBitmapOptions().then(function(c){if(!(c&&r)){Xt._Implementations.loadImageElement(a,t,n);return}let d="blob",u="GET",h=pd(),p=Xt._Implementations.loadWithXhr(a,d,u,void 0,s,h,void 0,void 0,void 0);return l(p)&&l(p.abort)&&(e.cancelFunction=function(){p.abort()}),h.promise.then(function(b){if(!l(b)){n.reject(new le(`Successfully retrieved ${a} but it contained no content.`));return}return Xt.createImageBitmapFromBlob(b,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o})}).then(function(b){n.resolve(b)})}).catch(function(c){n.reject(c)})};Xt.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 _Fe(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 ip(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 ip)})}var SFe=typeof XMLHttpRequest>"u";Xt._Implementations.loadWithXhr=function(e,t,n,i,o,r,s){let a=xFe.exec(e);if(a!==null){r.resolve(TFe(a,t));return}if(SFe){_Fe(e,t,n,i,o,r,s);return}let c=new XMLHttpRequest;if(sZ.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 ip(c.status,c.response,c.getAllResponseHeaders()));return}let u=c.response,h=c.responseType;if(n==="HEAD"||n==="OPTIONS"){let b=c.getAllResponseHeaders().trim().split(/[\r\n]+/),f={};b.forEach(function(y){let _=y.split(": "),S=_.shift();f[S]=_.join(": ")}),r.resolve(f);return}if(c.status===204)r.resolve(void 0);else if(l(u)&&(!l(t)||h===t))r.resolve(u);else if(t==="json"&&typeof u=="string")try{r.resolve(JSON.parse(u))}catch(p){r.reject(p)}else(h===""||h==="document")&&l(c.responseXML)&&c.responseXML.hasChildNodes()?r.resolve(c.responseXML):(h===""||h==="text")&&l(c.responseText)?r.resolve(c.responseText):r.reject(new le("Invalid XMLHttpRequest response type."))},c.onerror=function(u){r.reject(new ip)},c.send(i),c};Xt._Implementations.loadAndExecuteScript=function(e,t,n){return cT(e,t).catch(function(i){n.reject(i)})};Xt._DefaultImplementations={};Xt._DefaultImplementations.createImage=Xt._Implementations.createImage;Xt._DefaultImplementations.loadWithXhr=Xt._Implementations.loadWithXhr;Xt._DefaultImplementations.loadAndExecuteScript=Xt._Implementations.loadAndExecuteScript;Xt.DEFAULT=Object.freeze(new Xt({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var We=Xt;function w1(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)?joe(this,e.data):joe(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}w1.fromUrl=async function(e,t){t=t??B.EMPTY_OBJECT;let n=We.createIfNeeded(e),i;try{i=await n.fetchJson()}catch{throw new le(`An error occurred while retrieving the EOP data from the URL ${n.url}.`)}return new w1({addNewLeapSeconds:t.addNewLeapSeconds,data:i})};w1.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 Og(0,0,0,0,0),t}});w1.prototype.compute=function(e,t){if(!l(this._samples))return;if(l(t)||(t=new Og(0,0,0,0,0)),this._samples.length===0)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;let n=this._dates,i=this._lastIndex,o=0,r=0;if(l(i)){let a=n[i],c=n[i+1],d=Q.lessThanOrEquals(a,e),u=!l(c),h=u||Q.greaterThanOrEquals(c,e);if(d&&h)return o=i,!u&&c.equals(e)&&++o,r=o+1,qoe(this,n,this._samples,e,o,r,t),t}let s=bo(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,qoe(this,n,this._samples,e,o,r,t),t};function AFe(e,t){return Q.compare(e.julianDate,t)}function joe(e,t){if(!l(t.columnNames))throw new le("Error in loaded EOP data: The columnNames property is required.");if(!l(t.samples))throw new le("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 le("Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");let d=e._samples=t.samples,u=e._dates=[];e._dateColumn=n,e._xPoleWanderRadiansColumn=i,e._yPoleWanderRadiansColumn=o,e._ut1MinusUtcSecondsColumn=r,e._xCelestialPoleOffsetRadiansColumn=s,e._yCelestialPoleOffsetRadiansColumn=a,e._taiMinusUtcSecondsColumn=c,e._columnCount=t.columnNames.length,e._lastIndex=void 0;let h,p=e._addNewLeapSeconds;for(let b=0,f=d.length;b<f;b+=e._columnCount){let y=d[b+n],_=d[b+c],S=y+ii.MODIFIED_JULIAN_DATE_DIFFERENCE,A=new Q(S,_,ti.TAI);if(u.push(A),p){if(_!==h&&l(h)){let Z=Q.leapSeconds,V=bo(Z,A,AFe);if(V<0){let E=new so(A,_);Z.splice(~V,0,E)}}h=_}}}function Qoe(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 Y1(e,t,n){return t+e*(n-t)}function qoe(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 Qoe(e,n,o,a,s),s;if(i.equals(d))return Qoe(e,n,r,a,s),s;let u=Q.secondsDifference(i,c)/Q.secondsDifference(d,c),h=o*a,p=r*a,b=n[h+e._ut1MinusUtcSecondsColumn],f=n[p+e._ut1MinusUtcSecondsColumn],y=f-b;if(y>.5||y<-.5){let _=n[h+e._taiMinusUtcSecondsColumn],S=n[p+e._taiMinusUtcSecondsColumn];_!==S&&(d.equals(i)?b=f:f-=S-_)}return s.xPoleWander=Y1(u,n[h+e._xPoleWanderRadiansColumn],n[p+e._xPoleWanderRadiansColumn]),s.yPoleWander=Y1(u,n[h+e._yPoleWanderRadiansColumn],n[p+e._yPoleWanderRadiansColumn]),s.xPoleOffset=Y1(u,n[h+e._xCelestialPoleOffsetRadiansColumn],n[p+e._xCelestialPoleOffsetRadiansColumn]),s.yPoleOffset=Y1(u,n[h+e._yCelestialPoleOffsetRadiansColumn],n[p+e._yCelestialPoleOffsetRadiansColumn]),s.ut1MinusUtc=Y1(u,b,f),s}var M1=w1;var $Mt=x(T(),1);function kc(e,t,n){this.heading=e??0,this.pitch=t??0,this.roll=n??0}kc.fromQuaternion=function(e,t){l(t)||(t=new kc);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};kc.fromDegrees=function(e,t,n,i){return l(i)||(i=new kc),i.heading=e*W.RADIANS_PER_DEGREE,i.pitch=t*W.RADIANS_PER_DEGREE,i.roll=n*W.RADIANS_PER_DEGREE,i};kc.clone=function(e,t){if(l(e))return l(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new kc(e.heading,e.pitch,e.roll)};kc.equals=function(e,t){return e===t||l(e)&&l(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll};kc.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)};kc.prototype.clone=function(e){return kc.clone(this,e)};kc.prototype.equals=function(e){return kc.equals(this,e)};kc.prototype.equalsEpsilon=function(e,t,n){return kc.equalsEpsilon(this,e,t,n)};kc.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};var yc=kc;var b9t=x(T(),1);var o9t=x(T(),1);var $oe={};var ere=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function ZFe(){let e=document.getElementsByTagName("script");for(let t=0,n=e.length;t<n;++t){let i=e[t].getAttribute("src"),o=ere.exec(i);if(o!==null)return o[1]}}var PU;function tre(e){return typeof document>"u"?e:(l(PU)||(PU=document.createElement("a")),PU.href=e,PU.href)}var mT;function nre(){if(l(mT))return mT;let e;return typeof CESIUM_BASE_URL<"u"?e=CESIUM_BASE_URL:l($oe?.url)?e=tp(".",$oe.url):typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(cU.toUrl)?e=tp("..",hT("Core/buildModuleUrl.js")):e=ZFe(),mT=new We({url:tre(e)}),mT.appendForwardSlash(),mT}function CFe(e){return tre(cU.toUrl(`../${e}`))}function ire(e){return nre().getDerivedResource({url:e}).url}var XU;function hT(e){return l(XU)||(typeof define=="object"&&l(define.amd)&&!define.amd.toUrlUndefined&&l(cU.toUrl)?XU=CFe:XU=ire),XU(e)}hT._cesiumScriptRegex=ere;hT._buildModuleUrlFromBaseUrl=ire;hT._clearBaseResource=function(){mT=void 0};hT.setBaseUrl=function(e){mT=We.DEFAULT.getDerivedResource({url:e})};hT.getCesiumBaseUrl=nre;var Kt=hT;var a9t=x(T(),1);function VFe(e,t,n){this.x=e,this.y=t,this.s=n}var fT=VFe;function NU(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,ti.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 RFe=new Q(0,0,ti.TAI);function kH(e,t,n){let i=RFe;return i.dayNumber=t,i.secondsOfDay=n,Q.daysDifference(i,e._sampleZeroDateTT)}NU.prototype.preload=function(e,t,n,i){let o=kH(this,e,t),r=kH(this,n,i),s=o/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);let a=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;a>=this._totalSamples&&(a=this._totalSamples-1);let c=s/this._samplesPerXysFile|0,d=a/this._samplesPerXysFile|0,u=[];for(let h=c;h<=d;++h)u.push(UH(this,h));return Promise.all(u)};NU.prototype.computeXysRadians=function(e,t,n){let i=kH(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])||(UH(this,s/this._samplesPerXysFile|0),c=!0),l(d[a*3])||(UH(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,h=this._work,p=this._denominators,b=this._coef,f=this._xTable,y,_;for(y=0;y<=r;++y)h[y]=u-f[y];for(y=0;y<=r;++y){for(b[y]=1,_=0;_<=r;++_)_!==y&&(b[y]*=h[_]);b[y]*=p[y];let S=(s+y)*3;n.x+=b[y]*d[S++],n.y+=b[y]*d[S++],n.s+=b[y]*d[S]}return n};NU.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 EFe(e,t,n){try{let i=await e.fetchJson();n._updateChunkData(t,i)}catch{}}function UH(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:Kt(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});let o=EFe(n,t,e);return e._chunkDownloadsInProgress[t]=o,o}var k1=NU;var A9t=x(T(),1);function rt(e,t,n,i){this.x=e??0,this.y=t??0,this.z=n??0,this.w=i??0}var U1=new m;rt.fromAxisAngle=function(e,t,n){let i=t/2,o=Math.sin(i);U1=m.normalize(e,U1);let r=U1.x*o,s=U1.y*o,a=U1.z*o,c=Math.cos(i);return l(n)?(n.x=r,n.y=s,n.z=a,n.w=c,n):new rt(r,s,a,c)};var GFe=[1,2,0],LFe=new Array(3);rt.fromRotationMatrix=function(e,t){let n,i,o,r,s,a=e[q.COLUMN0ROW0],c=e[q.COLUMN1ROW1],d=e[q.COLUMN2ROW2],u=a+c+d;if(u>0)n=Math.sqrt(u+1),s=.5*n,n=.5/n,i=(e[q.COLUMN1ROW2]-e[q.COLUMN2ROW1])*n,o=(e[q.COLUMN2ROW0]-e[q.COLUMN0ROW2])*n,r=(e[q.COLUMN0ROW1]-e[q.COLUMN1ROW0])*n;else{let h=GFe,p=0;c>a&&(p=1),d>a&&d>c&&(p=2);let b=h[p],f=h[b];n=Math.sqrt(e[q.getElementIndex(p,p)]-e[q.getElementIndex(b,b)]-e[q.getElementIndex(f,f)]+1);let y=LFe;y[p]=.5*n,n=.5/n,s=(e[q.getElementIndex(f,b)]-e[q.getElementIndex(b,f)])*n,y[b]=(e[q.getElementIndex(b,p)]+e[q.getElementIndex(p,b)])*n,y[f]=(e[q.getElementIndex(f,p)]+e[q.getElementIndex(p,f)])*n,i=-y[0],o=-y[1],r=-y[2]}return l(t)?(t.x=i,t.y=o,t.z=r,t.w=s,t):new rt(i,o,r,s)};var ore=new rt,rre=new rt,DH=new rt,sre=new rt;rt.fromHeadingPitchRoll=function(e,t){return sre=rt.fromAxisAngle(m.UNIT_X,e.roll,ore),DH=rt.fromAxisAngle(m.UNIT_Y,-e.pitch,t),t=rt.multiply(DH,sre,DH),rre=rt.fromAxisAngle(m.UNIT_Z,-e.heading,ore),rt.multiply(rre,t,t)};var YU=new m,OH=new m,Ch=new rt,are=new rt,wU=new rt;rt.packedLength=4;rt.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};rt.unpack=function(e,t,n){return t=t??0,l(n)||(n=new rt),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n};rt.packedInterpolationLength=3;rt.convertPackedArrayForInterpolation=function(e,t,n,i){rt.unpack(e,n*4,wU),rt.conjugate(wU,wU);for(let o=0,r=n-t+1;o<r;o++){let s=o*3;rt.unpack(e,(t+o)*4,Ch),rt.multiply(Ch,wU,Ch),Ch.w<0&&rt.negate(Ch,Ch),rt.computeAxis(Ch,YU);let a=rt.computeAngle(Ch);l(i)||(i=[]),i[s]=YU.x*a,i[s+1]=YU.y*a,i[s+2]=YU.z*a}};rt.unpackInterpolationResult=function(e,t,n,i,o){l(o)||(o=new rt),m.fromArray(e,0,OH);let r=m.magnitude(OH);return rt.unpack(t,i*4,are),r===0?rt.clone(rt.IDENTITY,Ch):rt.fromAxisAngle(OH,r,Ch),rt.multiply(Ch,are,o)};rt.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 rt(e.x,e.y,e.z,e.w)};rt.conjugate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t};rt.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};rt.magnitude=function(e){return Math.sqrt(rt.magnitudeSquared(e))};rt.normalize=function(e,t){let n=1/rt.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};rt.inverse=function(e,t){let n=rt.magnitudeSquared(e);return t=rt.conjugate(e,t),rt.multiplyByScalar(t,1/n,t)};rt.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};rt.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};rt.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t};rt.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w};rt.multiply=function(e,t,n){let i=e.x,o=e.y,r=e.z,s=e.w,a=t.x,c=t.y,d=t.z,u=t.w,h=s*a+i*u+o*d-r*c,p=s*c-i*d+o*u+r*a,b=s*d+i*c-o*a+r*u,f=s*u-i*a-o*c-r*d;return n.x=h,n.y=p,n.z=b,n.w=f,n};rt.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};rt.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};rt.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};rt.computeAngle=function(e){return Math.abs(e.w-1)<W.EPSILON6?0:2*Math.acos(e.w)};var BH=new rt;rt.lerp=function(e,t,n,i){return BH=rt.multiplyByScalar(t,n,BH),i=rt.multiplyByScalar(e,1-n,i),rt.add(BH,i,i)};var cre=new rt,zH=new rt,HH=new rt;rt.slerp=function(e,t,n,i){let o=rt.dot(e,t),r=t;if(o<0&&(o=-o,r=cre=rt.negate(t,cre)),1-o<W.EPSILON6)return rt.lerp(e,r,n,i);let s=Math.acos(o);return zH=rt.multiplyByScalar(e,Math.sin((1-n)*s),zH),HH=rt.multiplyByScalar(r,Math.sin(n*s),HH),i=rt.add(zH,HH,i),rt.multiplyByScalar(i,1/Math.sin(s),i)};rt.log=function(e,t){let n=W.acosClamped(e.w),i=0;return n!==0&&(i=n/Math.sin(n)),m.multiplyByScalar(e,i,t)};rt.exp=function(e,t){let n=m.magnitude(e),i=0;return n!==0&&(i=Math.sin(n)/n),t.x=e.x*i,t.y=e.y*i,t.z=e.z*i,t.w=Math.cos(n),t};var WFe=new m,vFe=new m,D1=new rt,cZ=new rt;rt.computeInnerQuadrangle=function(e,t,n,i){let o=rt.conjugate(t,D1);rt.multiply(o,n,cZ);let r=rt.log(cZ,WFe);rt.multiply(o,e,cZ);let s=rt.log(cZ,vFe);return m.add(r,s,r),m.multiplyByScalar(r,.25,r),m.negate(r,r),rt.exp(r,D1),rt.multiply(t,D1,i)};rt.squad=function(e,t,n,i,o,r){let s=rt.slerp(e,t,o,D1),a=rt.slerp(n,i,o,cZ);return rt.slerp(s,a,2*o*(1-o),r)};var FFe=new rt,lre=1.9011074535173003,MU=an.supportsTypedArrays()?new Float32Array(8):[],kU=an.supportsTypedArrays()?new Float32Array(8):[],F0=an.supportsTypedArrays()?new Float32Array(8):[],I0=an.supportsTypedArrays()?new Float32Array(8):[];for(let e=0;e<7;++e){let t=e+1,n=2*t+1;MU[e]=1/(t*n),kU[e]=t/n}MU[7]=lre/136;kU[7]=lre*8/17;rt.fastSlerp=function(e,t,n,i){let o=rt.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)F0[b]=(MU[b]*c-kU[b])*s,I0[b]=(MU[b]*d-kU[b])*s;let u=r*n*(1+F0[0]*(1+F0[1]*(1+F0[2]*(1+F0[3]*(1+F0[4]*(1+F0[5]*(1+F0[6]*(1+F0[7])))))))),h=a*(1+I0[0]*(1+I0[1]*(1+I0[2]*(1+I0[3]*(1+I0[4]*(1+I0[5]*(1+I0[6]*(1+I0[7])))))))),p=rt.multiplyByScalar(e,h,FFe);return rt.multiplyByScalar(t,u,i),rt.add(p,i,i)};rt.fastSquad=function(e,t,n,i,o,r){let s=rt.fastSlerp(e,t,o,D1),a=rt.fastSlerp(n,i,o,cZ);return rt.fastSlerp(s,a,2*o*(1-o),r)};rt.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};rt.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};rt.ZERO=Object.freeze(new rt(0,0,0,0));rt.IDENTITY=Object.freeze(new rt(0,0,0,1));rt.prototype.clone=function(e){return rt.clone(this,e)};rt.prototype.equals=function(e){return rt.equals(this,e)};rt.prototype.equalsEpsilon=function(e,t){return rt.equalsEpsilon(this,e,t)};rt.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Pe=rt;var mi={},KH={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"}},lZ={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},JH={},bd={east:new m,north:new m,up:new m,west:new m,south:new m,down:new m},Hg=new m,Kg=new m,Jg=new m;mi.localFrameToFixedFrameGenerator=function(e,t){if(!KH.hasOwnProperty(e)||!KH[e].hasOwnProperty(t))throw new he("firstAxis and secondAxis must be east, north, up, west, south or down.");let n=KH[e][t],i,o=e+t;return l(JH[o])?i=JH[o]:(i=function(r,s,a){if(l(a)||(a=new F),m.equalsEpsilon(r,m.ZERO,W.EPSILON14))m.unpack(lZ[e],0,Hg),m.unpack(lZ[t],0,Kg),m.unpack(lZ[n],0,Jg);else if(W.equalsEpsilon(r.x,0,W.EPSILON14)&&W.equalsEpsilon(r.y,0,W.EPSILON14)){let c=W.sign(r.z);m.unpack(lZ[e],0,Hg),e!=="east"&&e!=="west"&&m.multiplyByScalar(Hg,c,Hg),m.unpack(lZ[t],0,Kg),t!=="east"&&t!=="west"&&m.multiplyByScalar(Kg,c,Kg),m.unpack(lZ[n],0,Jg),n!=="east"&&n!=="west"&&m.multiplyByScalar(Jg,c,Jg)}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,m.normalize(d,bd.east),m.cross(c,d,bd.north),m.multiplyByScalar(bd.up,-1,bd.down),m.multiplyByScalar(bd.east,-1,bd.west),m.multiplyByScalar(bd.north,-1,bd.south),Hg=bd[e],Kg=bd[t],Jg=bd[n]}return a[0]=Hg.x,a[1]=Hg.y,a[2]=Hg.z,a[3]=0,a[4]=Kg.x,a[5]=Kg.y,a[6]=Kg.z,a[7]=0,a[8]=Jg.x,a[9]=Jg.y,a[10]=Jg.z,a[11]=0,a[12]=r.x,a[13]=r.y,a[14]=r.z,a[15]=1,a},JH[o]=i),i};mi.eastNorthUpToFixedFrame=mi.localFrameToFixedFrameGenerator("east","north");mi.northEastDownToFixedFrame=mi.localFrameToFixedFrameGenerator("north","east");mi.northUpEastToFixedFrame=mi.localFrameToFixedFrameGenerator("north","up");mi.northWestUpToFixedFrame=mi.localFrameToFixedFrameGenerator("north","west");var IFe=new Pe,PFe=new m(1,1,1),XFe=new F;mi.headingPitchRollToFixedFrame=function(e,t,n,i,o){i=i??mi.eastNorthUpToFixedFrame;let r=Pe.fromHeadingPitchRoll(t,IFe),s=F.fromTranslationQuaternionRotationScale(m.ZERO,r,PFe,XFe);return o=i(e,n,o),F.multiply(o,s,o)};var NFe=new F,YFe=new q;mi.headingPitchRollQuaternion=function(e,t,n,i,o){let r=mi.headingPitchRollToFixedFrame(e,t,n,i,NFe),s=F.getMatrix3(r,YFe);return Pe.fromRotationMatrix(s,o)};var wFe=new m(1,1,1),MFe=new m,dre=new F,kFe=new F,UFe=new q,DFe=new Pe;mi.fixedFrameToHeadingPitchRoll=function(e,t,n,i){t=t??ie.default,n=n??mi.eastNorthUpToFixedFrame,l(i)||(i=new yc);let o=F.getTranslation(e,MFe);if(m.equals(o,m.ZERO))return i.heading=0,i.pitch=0,i.roll=0,i;let r=F.inverseTransformation(n(o,t,dre),dre),s=F.setScale(e,wFe,kFe);s=F.setTranslation(s,m.ZERO,s),r=F.multiply(r,s,r);let a=Pe.fromRotationMatrix(F.getMatrix3(r,UFe),DFe);return a=Pe.normalize(a,a),yc.fromQuaternion(a,i)};var OFe=6*3600+2460+50.54841,BFe=8640184812866e-6,zFe=.093104,HFe=-62e-7,KFe=11772758384668e-32,JFe=72921158553e-15,jFe=W.TWO_PI/86400,UU=new Q;mi.computeIcrfToCentralBodyFixedMatrix=function(e,t){let n=mi.computeIcrfToFixedMatrix(e,t);return l(n)||(n=mi.computeTemeToPseudoFixedMatrix(e,t)),n};mi.computeTemeToPseudoFixedMatrix=function(e,t){UU=Q.addSeconds(e,-Q.computeTaiMinusUtc(e),UU);let n=UU.dayNumber,i=UU.secondsOfDay,o,r=n-2451545;i>=43200?o=(r+.5)/ii.DAYS_PER_JULIAN_CENTURY:o=(r-.5)/ii.DAYS_PER_JULIAN_CENTURY;let a=(OFe+o*(BFe+o*(zFe+o*HFe)))*jFe%W.TWO_PI,c=JFe+KFe*(n-24515455e-1),d=(i+ii.SECONDS_PER_DAY*.5)%ii.SECONDS_PER_DAY,u=a+c*d,h=Math.cos(u),p=Math.sin(u);return l(t)?(t[0]=h,t[1]=-p,t[2]=0,t[3]=p,t[4]=h,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new q(h,p,0,-p,h,0,0,0,1)};mi.iau2006XysData=new k1;mi.earthOrientationParameters=M1.NONE;var qH=32.184,QFe=2451545;mi.preloadIcrfFixed=function(e){let t=e.start.dayNumber,n=e.start.secondsOfDay+qH,i=e.stop.dayNumber,o=e.stop.secondsOfDay+qH;return mi.iau2006XysData.preload(t,n,i,o)};mi.computeIcrfToFixedMatrix=function(e,t){l(t)||(t=new q);let n=mi.computeFixedToIcrfMatrix(e,t);if(l(n))return q.transpose(n,t)};var qFe=32.184,$Fe=2451545,DU=new yc,e2e=new q,t2e=new Q;mi.computeMoonFixedToIcrfMatrix=function(e,t){l(t)||(t=new q);let n=Q.addSeconds(e,qFe,t2e),i=Q.totalDays(n)-$Fe,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 DU.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),DU.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),DU.heading=W.toRadians(244.375-90)+W.toRadians(13.17635831)*i+W.toRadians(3.558)*Math.sin(o)+W.toRadians(.121)*Math.sin(r)-W.toRadians(.064)*Math.sin(s)+W.toRadians(.016)*Math.sin(a)+W.toRadians(.025)*Math.sin(c),q.fromHeadingPitchRoll(DU,e2e)};mi.computeIcrfToMoonFixedMatrix=function(e,t){l(t)||(t=new q);let n=mi.computeMoonFixedToIcrfMatrix(e,t);if(l(n))return q.transpose(n,t)};var n2e=new fT(0,0,0),i2e=new Og(0,0,0,0,0,0),jH=new q,QH=new q;mi.computeFixedToIcrfMatrix=function(e,t){l(t)||(t=new q);let n=mi.earthOrientationParameters.compute(e,i2e);if(!l(n))return;let i=e.dayNumber,o=e.secondsOfDay+qH,r=mi.iau2006XysData.computeXysRadians(i,o,n2e);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=jH;d[0]=1-c*s*s,d[3]=-c*s*a,d[6]=s,d[1]=-c*s*a,d[4]=1-c*a*a,d[7]=a,d[2]=-s,d[5]=-a,d[8]=1-c*(s*s+a*a);let u=q.fromRotationZ(-r.s,QH),h=q.multiply(d,u,jH),p=e.dayNumber,b=e.secondsOfDay-Q.computeTaiMinusUtc(e)+n.ut1MinusUtc,f=p-2451545,y=b/ii.SECONDS_PER_DAY,_=.779057273264+y+.00273781191135448*(f+y);_=_%1*W.TWO_PI;let S=q.fromRotationZ(_,QH),A=q.multiply(h,S,jH),Z=Math.cos(n.xPoleWander),V=Math.cos(n.yPoleWander),E=Math.sin(n.xPoleWander),L=Math.sin(n.yPoleWander),v=i-QFe+o/ii.SECONDS_PER_DAY;v/=36525;let I=-47e-6*v*W.RADIANS_PER_DEGREE/3600,X=Math.cos(I),N=Math.sin(I),g=QH;return g[0]=Z*X,g[1]=Z*N,g[2]=E,g[3]=-V*N+L*E*X,g[4]=V*X+L*E*N,g[5]=-L*Z,g[6]=-L*N-V*E*X,g[7]=L*X-V*E*N,g[8]=V*Z,q.multiply(A,g,t)};var o2e=new se;mi.pointToWindowCoordinates=function(e,t,n,i){return i=mi.pointToGLWindowCoordinates(e,t,n,i),i.y=2*t[5]-i.y,i};mi.pointToGLWindowCoordinates=function(e,t,n,i){l(i)||(i=new M);let o=o2e;return F.multiplyByVector(e,se.fromElements(n.x,n.y,n.z,1,o),o),se.multiplyByScalar(o,1/o.w,o),F.multiplyByVector(t,o,o),M.fromCartesian4(o,i)};var r2e=new m,s2e=new m,a2e=new m;mi.rotationMatrixFromPositionVelocity=function(e,t,n,i){let o=(n??ie.default).geodeticSurfaceNormal(e,r2e),r=m.cross(t,o,s2e);m.equalsEpsilon(r,m.ZERO,W.EPSILON6)&&(r=m.clone(m.UNIT_X,r));let s=m.cross(r,t,a2e);return m.normalize(s,s),m.cross(t,s,r),m.negate(r,r),m.normalize(r,r),l(i)||(i=new q),i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=r.x,i[4]=r.y,i[5]=r.z,i[6]=s.x,i[7]=s.y,i[8]=s.z,i};mi.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 ure=new pe,$H=new m,c2e=new m,l2e=new q,eK=new F,mre=new F;mi.basisTo2D=function(e,t,n){let i=F.getTranslation(t,c2e),o=e.ellipsoid,r;if(m.equals(i,m.ZERO))r=m.clone(m.ZERO,$H);else{let u=o.cartesianToCartographic(i,ure);r=e.project(u,$H),m.fromElements(r.z,r.x,r.y,r)}let s=mi.eastNorthUpToFixedFrame(i,o,eK),a=F.inverseTransformation(s,mre),c=F.getMatrix3(t,l2e),d=F.multiplyByMatrix3(a,c,n);return F.multiply(mi.SWIZZLE_3D_TO_2D_MATRIX,d,n),F.setTranslation(n,r,n),n};mi.ellipsoidTo2DModelMatrix=function(e,t,n){let i=e.ellipsoid,o=mi.eastNorthUpToFixedFrame(t,i,eK),r=F.inverseTransformation(o,mre),s=i.cartesianToCartographic(t,ure),a=e.project(s,$H);m.fromElements(a.z,a.x,a.y,a);let c=F.fromTranslation(a,eK);return F.multiply(mi.SWIZZLE_3D_TO_2D_MATRIX,r,n),F.multiply(c,n,n),n};var dt=mi;var dZ=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 h=t[d];i=Math.min(i,h.longitude),o=Math.max(o,h.longitude),a=Math.min(a,h.latitude),c=Math.max(c,h.latitude);let p=h.longitude>=0?h.longitude:h.longitude+W.TWO_PI;r=Math.min(r,p),s=Math.max(s,p)}return o-i>s-r&&(i=r,o=s,o>W.PI&&(o=o-W.TWO_PI),i>W.PI&&(i=i-W.TWO_PI)),l(n)?(n.west=i,n.south=a,n.east=o,n.north=c,n):new 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,h=t.length;u<h;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),m.equals(o,m.ZERO))return e.clone(e.MAX_VALUE,i),i;let s=dt.eastNorthUpToFixedFrame(o,n,d2e),a=F.multiplyByPointAsVector(s,m.UNIT_X,u2e);m.normalize(a,a);let c=F.multiplyByPointAsVector(s,m.UNIT_Y,m2e);m.normalize(c,c),m.multiplyByScalar(c,r,c),m.multiplyByScalar(a,r,a);let d=m.negate(c,f2e),u=m.negate(a,h2e),h=tK,p=h[0];return m.add(o,c,p),p=h[1],m.add(o,u,p),p=h[2],m.add(o,d,p),p=h[3],m.add(o,a,p),h[4]=o,e.fromCartesianArray(h,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 pe(t.west,t.south)}static northwest(t,n){return l(n)?(n.longitude=t.west,n.latitude=t.north,n.height=0,n):new pe(t.west,t.north)}static northeast(t,n){return l(n)?(n.longitude=t.east,n.latitude=t.north,n.height=0,n):new pe(t.east,t.north)}static southeast(t,n){return l(n)?(n.longitude=t.east,n.latitude=t.south,n.height=0,n):new pe(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 pe(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),h=Math.min(t.north,n.north);if(!(u>=h))return l(i)?(i.west=c,i.south=u,i.east=d,i.north=h,i):new e(c,u,d,h)}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=p2e;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 h=1;h<8;++h)u.longitude=-Math.PI+h*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}};dZ.packedLength=4;var d2e=new F,u2e=new m,m2e=new m,h2e=new m,f2e=new m,tK=new Array(5);for(let e=0;e<tK.length;++e)tK[e]=new m;var p2e=new pe;dZ.MAX_VALUE=Object.freeze(new dZ(-Math.PI,-W.PI_OVER_TWO,Math.PI,W.PI_OVER_TWO));var ae=dZ;function is(e,t,n,i){this.x=e??0,this.y=t??0,this.width=n??0,this.height=i??0}is.packedLength=4;is.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};is.unpack=function(e,t,n){return t=t??0,l(n)||(n=new is),n.x=e[t++],n.y=e[t++],n.width=e[t++],n.height=e[t],n};is.fromPoints=function(e,t){if(l(t)||(t=new is),!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 hre=new Di,b2e=new pe,g2e=new pe;is.fromRectangle=function(e,t,n){if(l(n)||(n=new is),!l(e))return n.x=0,n.y=0,n.width=0,n.height=0,n;hre._ellipsoid=ie.default,t=t??hre;let i=t.project(ae.southwest(e,b2e)),o=t.project(ae.northeast(e,g2e));return M.subtract(o,i,o),n.x=i.x,n.y=i.y,n.width=o.x,n.height=o.y,n};is.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 is(e.x,e.y,e.width,e.height)};is.union=function(e,t,n){l(n)||(n=new is);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};is.expand=function(e,t,n){n=is.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};is.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?zt.OUTSIDE:zt.INTERSECTING};is.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};is.prototype.clone=function(e){return is.clone(this,e)};is.prototype.intersect=function(e){return is.intersect(this,e)};is.prototype.equals=function(e){return is.equals(this,e)};var Qe=is;var dkt=x(T(),1);var Ka={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};Ka.isLines=function(e){return e===Ka.LINES||e===Ka.LINE_LOOP||e===Ka.LINE_STRIP};Ka.isTriangles=function(e){return e===Ka.TRIANGLES||e===Ka.TRIANGLE_STRIP||e===Ka.TRIANGLE_FAN};Ka.validate=function(e){return e===Ka.POINTS||e===Ka.LINES||e===Ka.LINE_LOOP||e===Ka.LINE_STRIP||e===Ka.TRIANGLES||e===Ka.TRIANGLE_STRIP||e===Ka.TRIANGLE_FAN};Object.freeze(Ka);var ve=Ka;var mkt=x(T(),1),pT=`in vec4 position;
in vec2 textureCoordinates;
out vec2 v_textureCoordinates;
void main()
{
gl_Position = position;
v_textureCoordinates = textureCoordinates;
}
`;var gkt=x(T(),1);var Dr={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},nK=class e{constructor(t=B.EMPTY_OBJECT){this._boundingVolume=t.boundingVolume,this._orientedBoundingBox=t.orientedBoundingBox,this._modelMatrix=t.modelMatrix,this._primitiveType=t.primitiveType??ve.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 Uc(this,Dr.CULL)}set cull(t){Uc(this,Dr.CULL)!==t&&(jg(this,Dr.CULL,t),this.dirty=!0)}get occlude(){return Uc(this,Dr.OCCLUDE)}set occlude(t){Uc(this,Dr.OCCLUDE)!==t&&(jg(this,Dr.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 Uc(this,Dr.CAST_SHADOWS)}set castShadows(t){Uc(this,Dr.CAST_SHADOWS)!==t&&(jg(this,Dr.CAST_SHADOWS,t),this.dirty=!0)}get receiveShadows(){return Uc(this,Dr.RECEIVE_SHADOWS)}set receiveShadows(t){Uc(this,Dr.RECEIVE_SHADOWS)!==t&&(jg(this,Dr.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 Uc(this,Dr.EXECUTE_IN_CLOSEST_FRUSTUM)}set executeInClosestFrustum(t){Uc(this,Dr.EXECUTE_IN_CLOSEST_FRUSTUM)!==t&&(jg(this,Dr.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 Uc(this,Dr.DEBUG_SHOW_BOUNDING_VOLUME)}set debugShowBoundingVolume(t){Uc(this,Dr.DEBUG_SHOW_BOUNDING_VOLUME)!==t&&(jg(this,Dr.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 Uc(this,Dr.PICK_ONLY)}set pickOnly(t){Uc(this,Dr.PICK_ONLY)!==t&&(jg(this,Dr.PICK_ONLY,t),this.dirty=!0)}get depthForTranslucentClassification(){return Uc(this,Dr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)}set depthForTranslucentClassification(t){Uc(this,Dr.DEPTH_FOR_TRANSLUCENT_CLASSIFICATION)!==t&&(jg(this,Dr.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 Uc(e,t){return(e._flags&t)===t}function jg(e,t,n){n?e._flags|=t:e._flags&=~t}var et=nK;var vkt=x(T(),1);var Zkt=x(T(),1);var Tkt=x(T(),1);var Ri={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};Ri.toWebGLConstant=function(e,t){switch(e){case Ri.UNSIGNED_BYTE:return ne.UNSIGNED_BYTE;case Ri.UNSIGNED_SHORT:return ne.UNSIGNED_SHORT;case Ri.UNSIGNED_INT:return ne.UNSIGNED_INT;case Ri.FLOAT:return ne.FLOAT;case Ri.HALF_FLOAT:return t.webgl2?ne.HALF_FLOAT:ne.HALF_FLOAT_OES;case Ri.UNSIGNED_INT_24_8:return ne.UNSIGNED_INT_24_8;case Ri.UNSIGNED_SHORT_4_4_4_4:return ne.UNSIGNED_SHORT_4_4_4_4;case Ri.UNSIGNED_SHORT_5_5_5_1:return ne.UNSIGNED_SHORT_5_5_5_1;case Ri.UNSIGNED_SHORT_5_6_5:return Ri.UNSIGNED_SHORT_5_6_5}};Ri.isPacked=function(e){return e===Ri.UNSIGNED_INT_24_8||e===Ri.UNSIGNED_SHORT_4_4_4_4||e===Ri.UNSIGNED_SHORT_5_5_5_1||e===Ri.UNSIGNED_SHORT_5_6_5};Ri.sizeInBytes=function(e){switch(e){case Ri.UNSIGNED_BYTE:return 1;case Ri.UNSIGNED_SHORT:case Ri.UNSIGNED_SHORT_4_4_4_4:case Ri.UNSIGNED_SHORT_5_5_5_1:case Ri.UNSIGNED_SHORT_5_6_5:case Ri.HALF_FLOAT:return 2;case Ri.UNSIGNED_INT:case Ri.FLOAT:case Ri.UNSIGNED_INT_24_8:return 4}};Ri.validate=function(e){return e===Ri.UNSIGNED_BYTE||e===Ri.UNSIGNED_SHORT||e===Ri.UNSIGNED_INT||e===Ri.FLOAT||e===Ri.HALF_FLOAT||e===Ri.UNSIGNED_INT_24_8||e===Ri.UNSIGNED_SHORT_4_4_4_4||e===Ri.UNSIGNED_SHORT_5_5_5_1||e===Ri.UNSIGNED_SHORT_5_6_5};Ri.getTypedArrayConstructor=function(e){let t=Ri.sizeInBytes(e);return t===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:t===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:t===Float32Array.BYTES_PER_ELEMENT&&e===Ri.FLOAT?Float32Array:Uint32Array};Object.freeze(Ri);var Oe=Ri;var $e={DEPTH_COMPONENT:ne.DEPTH_COMPONENT,DEPTH_STENCIL:ne.DEPTH_STENCIL,ALPHA:ne.ALPHA,RED:ne.RED,RG:ne.RG,RGB:ne.RGB,RGBA:ne.RGBA,RED_INTEGER:ne.RED_INTEGER,RG_INTEGER:ne.RG_INTEGER,RGB_INTEGER:ne.RGB_INTEGER,RGBA_INTEGER:ne.RGBA_INTEGER,LUMINANCE:ne.LUMINANCE,LUMINANCE_ALPHA:ne.LUMINANCE_ALPHA,RGB_DXT1:ne.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:ne.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:ne.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:ne.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:ne.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:ne.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:ne.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:ne.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:ne.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:ne.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:ne.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:ne.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:ne.COMPRESSED_RGBA_BPTC_UNORM};$e.componentsLength=function(e){switch(e){case $e.RGB:case $e.RGB_INTEGER:return 3;case $e.RGBA:case $e.RGBA_INTEGER:return 4;case $e.LUMINANCE_ALPHA:case $e.RG:case $e.RG_INTEGER:return 2;case $e.ALPHA:case $e.RED:case $e.RED_INTEGER:case $e.LUMINANCE:return 1;default:return 1}};$e.validate=function(e){return e===$e.DEPTH_COMPONENT||e===$e.DEPTH_STENCIL||e===$e.ALPHA||e===$e.RED||e===$e.RG||e===$e.RGB||e===$e.RGBA||e===$e.RED_INTEGER||e===$e.RG_INTEGER||e===$e.RGB_INTEGER||e===$e.RGBA_INTEGER||e===$e.LUMINANCE||e===$e.LUMINANCE_ALPHA||e===$e.RGB_DXT1||e===$e.RGBA_DXT1||e===$e.RGBA_DXT3||e===$e.RGBA_DXT5||e===$e.RGB_PVRTC_4BPPV1||e===$e.RGB_PVRTC_2BPPV1||e===$e.RGBA_PVRTC_4BPPV1||e===$e.RGBA_PVRTC_2BPPV1||e===$e.RGBA_ASTC||e===$e.RGB_ETC1||e===$e.RGB8_ETC2||e===$e.RGBA8_ETC2_EAC||e===$e.RGBA_BC7};$e.isColorFormat=function(e){return e===$e.RED||e===$e.ALPHA||e===$e.RGB||e===$e.RGBA||e===$e.LUMINANCE||e===$e.LUMINANCE_ALPHA};$e.isDepthFormat=function(e){return e===$e.DEPTH_COMPONENT||e===$e.DEPTH_STENCIL};$e.isCompressedFormat=function(e){return e===$e.RGB_DXT1||e===$e.RGBA_DXT1||e===$e.RGBA_DXT3||e===$e.RGBA_DXT5||e===$e.RGB_PVRTC_4BPPV1||e===$e.RGB_PVRTC_2BPPV1||e===$e.RGBA_PVRTC_4BPPV1||e===$e.RGBA_PVRTC_2BPPV1||e===$e.RGBA_ASTC||e===$e.RGB_ETC1||e===$e.RGB8_ETC2||e===$e.RGBA8_ETC2_EAC||e===$e.RGBA_BC7};$e.isDXTFormat=function(e){return e===$e.RGB_DXT1||e===$e.RGBA_DXT1||e===$e.RGBA_DXT3||e===$e.RGBA_DXT5};$e.isPVRTCFormat=function(e){return e===$e.RGB_PVRTC_4BPPV1||e===$e.RGB_PVRTC_2BPPV1||e===$e.RGBA_PVRTC_4BPPV1||e===$e.RGBA_PVRTC_2BPPV1};$e.isASTCFormat=function(e){return e===$e.RGBA_ASTC};$e.isETC1Format=function(e){return e===$e.RGB_ETC1};$e.isETC2Format=function(e){return e===$e.RGB8_ETC2||e===$e.RGBA8_ETC2_EAC};$e.isBC7Format=function(e){return e===$e.RGBA_BC7};$e.compressedTextureSizeInBytes=function(e,t,n){switch(e){case $e.RGB_DXT1:case $e.RGBA_DXT1:case $e.RGB_ETC1:case $e.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*8;case $e.RGBA_DXT3:case $e.RGBA_DXT5:case $e.RGBA_ASTC:case $e.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((n+3)/4)*16;case $e.RGB_PVRTC_4BPPV1:case $e.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(n,8)*4+7)/8);case $e.RGB_PVRTC_2BPPV1:case $e.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(n,8)*2+7)/8);case $e.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(n/4)*16;default:return 0}};$e.textureSizeInBytes=function(e,t,n,i){let o=$e.componentsLength(e);return Oe.isPacked(t)&&(o=1),o*Oe.sizeInBytes(t)*n*i};$e.texture3DSizeInBytes=function(e,t,n,i,o){let r=$e.componentsLength(e);return Oe.isPacked(t)&&(r=1),r*Oe.sizeInBytes(t)*n*i*o};$e.alignmentInBytes=function(e,t,n){let i=$e.textureSizeInBytes(e,t,n,1)%4;return i===0?4:i===2?2:1};$e.createTypedArray=function(e,t,n,i){let o=Oe.getTypedArrayConstructor(t),r=$e.componentsLength(e)*n*i;return new o(r)};$e.flipY=function(e,t,n,i,o){if(o===1)return e;let r=$e.createTypedArray(t,n,i,o),s=$e.componentsLength(t),a=i*s;for(let c=0;c<o;++c){let d=c*i*s,u=(o-c-1)*i*s;for(let h=0;h<a;++h)r[u+h]=e[d+h]}return r};$e.toInternalFormat=function(e,t,n){if(!n.webgl2)return e;if(e===$e.DEPTH_STENCIL)return ne.DEPTH24_STENCIL8;if(e===$e.DEPTH_COMPONENT){if(t===Oe.UNSIGNED_SHORT)return ne.DEPTH_COMPONENT16;if(t===Oe.UNSIGNED_INT)return ne.DEPTH_COMPONENT24}if(t===Oe.FLOAT)switch(e){case $e.RGBA:return ne.RGBA32F;case $e.RGB:return ne.RGB32F;case $e.RG:return ne.RG32F;case $e.RED:return ne.R32F}if(t===Oe.HALF_FLOAT)switch(e){case $e.RGBA:return ne.RGBA16F;case $e.RGB:return ne.RGB16F;case $e.RG:return ne.RG16F;case $e.RED:return ne.R16F}if(t===Oe.UNSIGNED_BYTE)switch(e){case $e.RGBA:return ne.RGBA8;case $e.RGB:return ne.RGB8;case $e.RG:return ne.RG8;case $e.RED:return ne.R8}if(t===Oe.INT)switch(e){case $e.RGBA_INTEGER:return ne.RGBA32I;case $e.RGB_INTEGER:return ne.RGB32I;case $e.RG_INTEGER:return ne.RG32I;case $e.RED_INTEGER:return ne.R32I}if(t===Oe.UNSIGNED_INT)switch(e){case $e.RGBA_INTEGER:return ne.RGBA32UI;case $e.RGB_INTEGER:return ne.RGB32UI;case $e.RG_INTEGER:return ne.RG32UI;case $e.RED_INTEGER:return ne.R32UI}return e};Object.freeze($e);var Ke=$e;var Vkt=x(T(),1),Rr={_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(Rr,{maximumCombinedTextureImageUnits:{get:function(){return Rr._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return Rr._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return Rr._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return Rr._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return Rr._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return Rr._maximumTextureSize}},maximum3DTextureSize:{get:function(){return Rr._maximum3DTextureSize}},maximumVaryingVectors:{get:function(){return Rr._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return Rr._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return Rr._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return Rr._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return Rr._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return Rr._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return Rr._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return Rr._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return Rr._maximumViewportWidth}},maximumViewportHeight:{get:function(){return Rr._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return Rr._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return Rr._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return Rr._maximumColorAttachments}},maximumSamples:{get:function(){return Rr._maximumSamples}},highpFloatSupported:{get:function(){return Rr._highpFloatSupported}},highpIntSupported:{get:function(){return Rr._highpIntSupported}}});var Lt=Rr;function iK(e,t,n){let i=e._gl;i.framebufferTexture2D(i.FRAMEBUFFER,t,n._target,n._texture,0)}function OU(e,t,n){let i=e._gl;i.framebufferRenderbuffer(i.FRAMEBUFFER,t,i.RENDERBUFFER,n._getRenderbuffer())}function Vh(e){e=e??B.EMPTY_OBJECT;let n=e.context._gl,i=Lt.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;iK(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;OU(this,c,a),this._activeColorAttachments[s]=c,this._colorRenderbuffers[s]=a}}if(l(e.depthTexture)){let o=e.depthTexture;iK(this,this._gl.DEPTH_ATTACHMENT,o),this._depthTexture=o}if(l(e.depthRenderbuffer)){let o=e.depthRenderbuffer;OU(this,this._gl.DEPTH_ATTACHMENT,o),this._depthRenderbuffer=o}if(l(e.stencilRenderbuffer)){let o=e.stencilRenderbuffer;OU(this,this._gl.STENCIL_ATTACHMENT,o),this._stencilRenderbuffer=o}if(l(e.depthStencilTexture)){let o=e.depthStencilTexture;iK(this,this._gl.DEPTH_STENCIL_ATTACHMENT,o),this._depthStencilTexture=o}if(l(e.depthStencilRenderbuffer)){let o=e.depthStencilRenderbuffer;OU(this,this._gl.DEPTH_STENCIL_ATTACHMENT,o),this._depthStencilRenderbuffer=o}this._unBind()}Object.defineProperties(Vh.prototype,{status:{get:function(){this._bind();let e=this._gl.checkFramebufferStatus(this._gl.FRAMEBUFFER);return this._unBind(),e}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}}});Vh.prototype._bind=function(){let e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)};Vh.prototype._unBind=function(){let e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)};Vh.prototype.bindDraw=function(){let e=this._gl;e.bindFramebuffer(e.DRAW_FRAMEBUFFER,this._framebuffer)};Vh.prototype.bindRead=function(){let e=this._gl;e.bindFramebuffer(e.READ_FRAMEBUFFER,this._framebuffer)};Vh.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments};Vh.prototype.getColorTexture=function(e){return this._colorTextures[e]};Vh.prototype.getColorRenderbuffer=function(e){return this._colorRenderbuffers[e]};Vh.prototype.isDestroyed=function(){return!1};Vh.prototype.destroy=function(){if(this.destroyAttachments){let e=this._colorTextures;for(let n=0;n<e.length;++n){let i=e[n];l(i)&&i.destroy()}let t=this._colorRenderbuffers;for(let n=0;n<t.length;++n){let i=t[n];l(i)&&i.destroy()}this._depthTexture=this._depthTexture&&this._depthTexture.destroy(),this._depthRenderbuffer=this._depthRenderbuffer&&this._depthRenderbuffer.destroy(),this._stencilRenderbuffer=this._stencilRenderbuffer&&this._stencilRenderbuffer.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._depthStencilRenderbuffer=this._depthStencilRenderbuffer&&this._depthStencilRenderbuffer.destroy()}return this._gl.deleteFramebuffer(this._framebuffer),me(this)};var os=Vh;var Bkt=x(T(),1);var Pkt=x(T(),1);var O1={CLOCKWISE:ne.CW,COUNTER_CLOCKWISE:ne.CCW};O1.validate=function(e){return e===O1.CLOCKWISE||e===O1.COUNTER_CLOCKWISE};Object.freeze(O1);var Us=O1;var Nkt=x(T(),1);function fre(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]=fre(e[t]));return Object.freeze(e)}var oK=fre;function ap(e){let t=e??B.EMPTY_OBJECT,n=t.cull??B.EMPTY_OBJECT,i=t.polygonOffset??B.EMPTY_OBJECT,o=t.scissorTest??B.EMPTY_OBJECT,r=o.rectangle??B.EMPTY_OBJECT,s=t.depthRange??B.EMPTY_OBJECT,a=t.depthTest??B.EMPTY_OBJECT,c=t.colorMask??B.EMPTY_OBJECT,d=t.blending??B.EMPTY_OBJECT,u=d.color??B.EMPTY_OBJECT,h=t.stencilTest??B.EMPTY_OBJECT,p=h.frontOperation??B.EMPTY_OBJECT,b=h.backOperation??B.EMPTY_OBJECT,f=t.sampleCoverage??B.EMPTY_OBJECT,y=t.viewport;this.frontFace=t.frontFace??Us.COUNTER_CLOCKWISE,this.cull={enabled:n.enabled??!1,face:n.face??ne.BACK},this.lineWidth=t.lineWidth??1,this.polygonOffset={enabled:i.enabled??!1,factor:i.factor??0,units:i.units??0},this.scissorTest={enabled:o.enabled??!1,rectangle:Qe.clone(r)},this.depthRange={near:s.near??0,far:s.far??1},this.depthTest={enabled:a.enabled??!1,func:a.func??ne.LESS},this.colorMask={red:c.red??!0,green:c.green??!0,blue:c.blue??!0,alpha:c.alpha??!0},this.depthMask=t.depthMask??!0,this.stencilMask=t.stencilMask??-1,this.blending={enabled:d.enabled??!1,color:new U(u.red??0,u.green??0,u.blue??0,u.alpha??0),equationRgb:d.equationRgb??ne.FUNC_ADD,equationAlpha:d.equationAlpha??ne.FUNC_ADD,functionSourceRgb:d.functionSourceRgb??ne.ONE,functionSourceAlpha:d.functionSourceAlpha??ne.ONE,functionDestinationRgb:d.functionDestinationRgb??ne.ZERO,functionDestinationAlpha:d.functionDestinationAlpha??ne.ZERO},this.stencilTest={enabled:h.enabled??!1,frontFunction:h.frontFunction??ne.ALWAYS,backFunction:h.backFunction??ne.ALWAYS,reference:h.reference??0,mask:h.mask??-1,frontOperation:{fail:p.fail??ne.KEEP,zFail:p.zFail??ne.KEEP,zPass:p.zPass??ne.KEEP},backOperation:{fail:b.fail??ne.KEEP,zFail:b.zFail??ne.KEEP,zPass:b.zPass??ne.KEEP}},this.sampleCoverage={enabled:f.enabled??!1,value:f.value??1,invert:f.invert??!1},this.viewport=l(y)?new Qe(y.x,y.y,y.width,y.height):void 0,this.id=0,this._applyFunctions=[]}var y2e=0,sp={};ap.fromCache=function(e){let t=JSON.stringify(e),n=sp[t];if(l(n))return++n.referenceCount,n.state;let i=new ap(e),o=JSON.stringify(i);return n=sp[o],l(n)||(i.id=y2e++,n={referenceCount:0,state:i},sp[o]=n),++n.referenceCount,sp[t]={referenceCount:1,state:n.state},n.state};ap.removeFromCache=function(e){let t=new ap(e),n=JSON.stringify(t),i=sp[n],o=JSON.stringify(e),r=sp[o];l(r)&&(--r.referenceCount,r.referenceCount===0&&(delete sp[o],l(i)&&--i.referenceCount)),l(i)&&i.referenceCount===0&&delete sp[n]};ap.getCache=function(){return sp};ap.clearCache=function(){sp={}};function bT(e,t,n){n?e.enable(t):e.disable(t)}function pre(e,t){e.frontFace(t.frontFace)}function bre(e,t){let n=t.cull,i=n.enabled;bT(e,e.CULL_FACE,i),i&&e.cullFace(n.face)}function gre(e,t){e.lineWidth(t.lineWidth)}function yre(e,t){let n=t.polygonOffset,i=n.enabled;bT(e,e.POLYGON_OFFSET_FILL,i),i&&e.polygonOffset(n.factor,n.units)}function xre(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 Tre(e,t){let n=t.depthRange;e.depthRange(n.near,n.far)}function _re(e,t){let n=t.depthTest,i=n.enabled;bT(e,e.DEPTH_TEST,i),i&&e.depthFunc(n.func)}function Sre(e,t){let n=t.colorMask;e.colorMask(n.red,n.green,n.blue,n.alpha)}function Are(e,t){e.depthMask(t.depthMask)}function Zre(e,t){e.stencilMask(t.stencilMask)}function x2e(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)}function Cre(e,t,n){let i=t.blending,o=l(n.blendingEnabled)?n.blendingEnabled:i.enabled;bT(e,e.BLEND,o),o&&(x2e(e,i.color),e.blendEquationSeparate(i.equationRgb,i.equationAlpha),e.blendFuncSeparate(i.functionSourceRgb,i.functionDestinationRgb,i.functionSourceAlpha,i.functionDestinationAlpha))}function Vre(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,h=c.zPass;e.stencilOpSeparate(e.FRONT,d,u,h);let p=n.backOperation,b=p.fail,f=p.zFail,y=p.zPass;e.stencilOpSeparate(e.BACK,b,f,y)}}function Rre(e,t){let n=t.sampleCoverage,i=n.enabled;bT(e,e.SAMPLE_COVERAGE,i),i&&e.sampleCoverage(n.value,n.invert)}var T2e=new Qe;function Ere(e,t,n){let i=t.viewport??n.viewport;l(i)||(i=T2e,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)}ap.apply=function(e,t,n){pre(e,t),bre(e,t),gre(e,t),yre(e,t),Tre(e,t),_re(e,t),Sre(e,t),Are(e,t),Zre(e,t),Vre(e,t),Rre(e,t),xre(e,t,n),Cre(e,t,n),Ere(e,t,n)};function _2e(e,t){let n=[];return e.frontFace!==t.frontFace&&n.push(pre),(e.cull.enabled!==t.cull.enabled||e.cull.face!==t.cull.face)&&n.push(bre),e.lineWidth!==t.lineWidth&&n.push(gre),(e.polygonOffset.enabled!==t.polygonOffset.enabled||e.polygonOffset.factor!==t.polygonOffset.factor||e.polygonOffset.units!==t.polygonOffset.units)&&n.push(yre),(e.depthRange.near!==t.depthRange.near||e.depthRange.far!==t.depthRange.far)&&n.push(Tre),(e.depthTest.enabled!==t.depthTest.enabled||e.depthTest.func!==t.depthTest.func)&&n.push(_re),(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(Sre),e.depthMask!==t.depthMask&&n.push(Are),e.stencilMask!==t.stencilMask&&n.push(Zre),(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(Vre),(e.sampleCoverage.enabled!==t.sampleCoverage.enabled||e.sampleCoverage.value!==t.sampleCoverage.value||e.sampleCoverage.invert!==t.sampleCoverage.invert)&&n.push(Rre),n}ap.partialApply=function(e,t,n,i,o,r){if(t!==n){let u=n._applyFunctions[t.id];l(u)||(u=_2e(t,n),n._applyFunctions[t.id]=u);let h=u.length;for(let p=0;p<h;++p)u[p](e,n)}let s=l(i.scissorTest)?i.scissorTest:t.scissorTest,a=l(o.scissorTest)?o.scissorTest:n.scissorTest;(s!==a||r)&&xre(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)&&Cre(e,n,o),(t!==n||i!==o||i.context!==o.context)&&Ere(e,n,o)};ap.getState=function(e){return{frontFace:e.frontFace,cull:{enabled:e.cull.enabled,face:e.cull.face},lineWidth:e.lineWidth,polygonOffset:{enabled:e.polygonOffset.enabled,factor:e.polygonOffset.factor,units:e.polygonOffset.units},scissorTest:{enabled:e.scissorTest.enabled,rectangle:Qe.clone(e.scissorTest.rectangle)},depthRange:{near:e.depthRange.near,far:e.depthRange.far},depthTest:{enabled:e.depthTest.enabled,func:e.depthTest.func},colorMask:{red:e.colorMask.red,green:e.colorMask.green,blue:e.colorMask.blue,alpha:e.colorMask.alpha},depthMask:e.depthMask,stencilMask:e.stencilMask,blending:{enabled:e.blending.enabled,color:U.clone(e.blending.color),equationRgb:e.blending.equationRgb,equationAlpha:e.blending.equationAlpha,functionSourceRgb:e.blending.functionSourceRgb,functionSourceAlpha:e.blending.functionSourceAlpha,functionDestinationRgb:e.blending.functionDestinationRgb,functionDestinationAlpha:e.blending.functionDestinationAlpha},stencilTest:{enabled:e.stencilTest.enabled,frontFunction:e.stencilTest.frontFunction,backFunction:e.stencilTest.backFunction,reference:e.stencilTest.reference,mask:e.stencilTest.mask,frontOperation:{fail:e.stencilTest.frontOperation.fail,zFail:e.stencilTest.frontOperation.zFail,zPass:e.stencilTest.frontOperation.zPass},backOperation:{fail:e.stencilTest.backOperation.fail,zFail:e.stencilTest.backOperation.zFail,zPass:e.stencilTest.backOperation.zPass}},sampleCoverage:{enabled:e.sampleCoverage.enabled,value:e.sampleCoverage.value,invert:e.sampleCoverage.invert},viewport:l(e.viewport)?Qe.clone(e.viewport):void 0}};var De=ap;var RUt=x(T(),1);var sUt=x(T(),1);var Jkt=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,S2e),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,A2e),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=M.magnitude(M.fromElements(t[0],t[1],Gre)),n.y=M.magnitude(M.fromElements(t[2],t[3],Gre)),n}static getMaximumScale(t){return e.getScale(t,Lre),M.maximumComponent(Lre)}static setRotation(t,n,i){let o=e.getScale(t,Z2e);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,C2e);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]})
(${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 S2e=new M,A2e=new M,Gre=new M,Lre=new M,Z2e=new M,C2e=new M,Oi=gd;function V2e(e,t,n,i){switch(t.type){case e.FLOAT:return new Wre(e,t,n,i);case e.FLOAT_VEC2:return new vre(e,t,n,i);case e.FLOAT_VEC3:return new Fre(e,t,n,i);case e.FLOAT_VEC4:return new Ire(e,t,n,i);case e.SAMPLER_2D:case e.SAMPLER_3D:case e.SAMPLER_CUBE:return new BU(e,t,n,i);case e.UNSIGNED_INT_SAMPLER_2D:return new BU(e,t,n,i);case e.INT:case e.BOOL:return new Pre(e,t,n,i);case e.INT_VEC2:case e.BOOL_VEC2:return new Xre(e,t,n,i);case e.INT_VEC3:case e.BOOL_VEC3:return new Nre(e,t,n,i);case e.INT_VEC4:case e.BOOL_VEC4:return new Yre(e,t,n,i);case e.FLOAT_MAT2:return new wre(e,t,n,i);case e.FLOAT_MAT3:return new Mre(e,t,n,i);case e.FLOAT_MAT4:return new kre(e,t,n,i);default:throw new le(`Unrecognized uniform type: ${t.type} for uniform "${n}".`)}}function Wre(e,t,n,i){this.name=n,this.value=void 0,this._value=0,this._gl=e,this._location=i}Wre.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))};function vre(e,t,n,i){this.name=n,this.value=void 0,this._value=new M,this._gl=e,this._location=i}vre.prototype.set=function(){let e=this.value;M.equals(e,this._value)||(M.clone(e,this._value),this._gl.uniform2f(this._location,e.x,e.y))};function Fre(e,t,n,i){this.name=n,this.value=void 0,this._value=void 0,this._gl=e,this._location=i}Fre.prototype.set=function(){let e=this.value;l(e.red)?U.equals(e,this._value)||(this._value=U.clone(e,this._value),this._gl.uniform3f(this._location,e.red,e.green,e.blue)):l(e.x)&&(m.equals(e,this._value)||(this._value=m.clone(e,this._value),this._gl.uniform3f(this._location,e.x,e.y,e.z)))};function Ire(e,t,n,i){this.name=n,this.value=void 0,this._value=void 0,this._gl=e,this._location=i}Ire.prototype.set=function(){let e=this.value;l(e.red)?U.equals(e,this._value)||(this._value=U.clone(e,this._value),this._gl.uniform4f(this._location,e.red,e.green,e.blue,e.alpha)):l(e.x)&&(se.equals(e,this._value)||(this._value=se.clone(e,this._value),this._gl.uniform4f(this._location,e.x,e.y,e.z,e.w)))};function BU(e,t,n,i){this.name=n,this.value=void 0,this._gl=e,this._location=i,this.textureUnitIndex=void 0}BU.prototype.set=function(){let e=this._gl;e.activeTexture(e.TEXTURE0+this.textureUnitIndex);let t=this.value;e.bindTexture(t._target,t._texture)};BU.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1};function Pre(e,t,n,i){this.name=n,this.value=void 0,this._value=0,this._gl=e,this._location=i}Pre.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))};function Xre(e,t,n,i){this.name=n,this.value=void 0,this._value=new M,this._gl=e,this._location=i}Xre.prototype.set=function(){let e=this.value;M.equals(e,this._value)||(M.clone(e,this._value),this._gl.uniform2i(this._location,e.x,e.y))};function Nre(e,t,n,i){this.name=n,this.value=void 0,this._value=new m,this._gl=e,this._location=i}Nre.prototype.set=function(){let e=this.value;m.equals(e,this._value)||(m.clone(e,this._value),this._gl.uniform3i(this._location,e.x,e.y,e.z))};function Yre(e,t,n,i){this.name=n,this.value=void 0,this._value=new se,this._gl=e,this._location=i}Yre.prototype.set=function(){let e=this.value;se.equals(e,this._value)||(se.clone(e,this._value),this._gl.uniform4i(this._location,e.x,e.y,e.z,e.w))};var R2e=new Float32Array(4);function wre(e,t,n,i){this.name=n,this.value=void 0,this._value=new Oi,this._gl=e,this._location=i}wre.prototype.set=function(){if(!Oi.equalsArray(this.value,this._value,0)){Oi.clone(this.value,this._value);let e=Oi.toArray(this.value,R2e);this._gl.uniformMatrix2fv(this._location,!1,e)}};var E2e=new Float32Array(9);function Mre(e,t,n,i){this.name=n,this.value=void 0,this._value=new q,this._gl=e,this._location=i}Mre.prototype.set=function(){if(!q.equalsArray(this.value,this._value,0)){q.clone(this.value,this._value);let e=q.toArray(this.value,E2e);this._gl.uniformMatrix3fv(this._location,!1,e)}};var G2e=new Float32Array(16);function kre(e,t,n,i){this.name=n,this.value=void 0,this._value=new F,this._gl=e,this._location=i}kre.prototype.set=function(){if(!F.equalsArray(this.value,this._value,0)){F.clone(this.value,this._value);let e=F.toArray(this.value,G2e);this._gl.uniformMatrix4fv(this._location,!1,e)}};var B1=V2e;var gUt=x(T(),1);function L2e(e,t,n,i){switch(t.type){case e.FLOAT:return new Ure(e,t,n,i);case e.FLOAT_VEC2:return new Dre(e,t,n,i);case e.FLOAT_VEC3:return new Ore(e,t,n,i);case e.FLOAT_VEC4:return new Bre(e,t,n,i);case e.SAMPLER_2D:case e.SAMPLER_3D:case e.SAMPLER_CUBE:return new rK(e,t,n,i);case e.INT:case e.BOOL:return new zre(e,t,n,i);case e.INT_VEC2:case e.BOOL_VEC2:return new Hre(e,t,n,i);case e.INT_VEC3:case e.BOOL_VEC3:return new Kre(e,t,n,i);case e.INT_VEC4:case e.BOOL_VEC4:return new Jre(e,t,n,i);case e.FLOAT_MAT2:return new jre(e,t,n,i);case e.FLOAT_MAT3:return new Qre(e,t,n,i);case e.FLOAT_MAT4:return new qre(e,t,n,i);default:throw new le(`Unrecognized uniform type: ${t.type} for uniform "${n}".`)}}function Ure(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o),this._gl=e,this._location=i[0]}Ure.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1;for(let o=0;o<t;++o){let r=e[o];r!==n[o]&&(n[o]=r,i=!0)}i&&this._gl.uniform1fv(this._location,n)};function Dre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*2),this._gl=e,this._location=i[0]}Dre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];M.equalsArray(s,n,o)||(M.pack(s,n,o),i=!0),o+=2}i&&this._gl.uniform2fv(this._location,n)};function Ore(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*3),this._gl=e,this._location=i[0]}Ore.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];l(s.red)?(s.red!==n[o]||s.green!==n[o+1]||s.blue!==n[o+2])&&(n[o]=s.red,n[o+1]=s.green,n[o+2]=s.blue,i=!0):l(s.x)&&(m.equalsArray(s,n,o)||(m.pack(s,n,o),i=!0)),o+=3}i&&this._gl.uniform3fv(this._location,n)};function Bre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*4),this._gl=e,this._location=i[0]}Bre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];l(s.red)?U.equalsArray(s,n,o)||(U.pack(s,n,o),i=!0):l(s.x)&&(se.equalsArray(s,n,o)||(se.pack(s,n,o),i=!0)),o+=4}i&&this._gl.uniform4fv(this._location,n)};function rK(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o),this._gl=e,this._locations=i,this.textureUnitIndex=void 0}rK.prototype.set=function(){let e=this._gl,t=e.TEXTURE0+this.textureUnitIndex,n=this.value,i=n.length;for(let o=0;o<i;++o){let r=n[o];e.activeTexture(t+o),e.bindTexture(r._target,r._texture)}};rK.prototype._setSampler=function(e){this.textureUnitIndex=e;let t=this._locations,n=t.length;for(let i=0;i<n;++i){let o=e+i;this._gl.uniform1i(t[i],o)}return e+n};function zre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(o),this._gl=e,this._location=i[0]}zre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1;for(let o=0;o<t;++o){let r=e[o];r!==n[o]&&(n[o]=r,i=!0)}i&&this._gl.uniform1iv(this._location,n)};function Hre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(o*2),this._gl=e,this._location=i[0]}Hre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];M.equalsArray(s,n,o)||(M.pack(s,n,o),i=!0),o+=2}i&&this._gl.uniform2iv(this._location,n)};function Kre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(o*3),this._gl=e,this._location=i[0]}Kre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];m.equalsArray(s,n,o)||(m.pack(s,n,o),i=!0),o+=3}i&&this._gl.uniform3iv(this._location,n)};function Jre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Int32Array(o*4),this._gl=e,this._location=i[0]}Jre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];se.equalsArray(s,n,o)||(se.pack(s,n,o),i=!0),o+=4}i&&this._gl.uniform4iv(this._location,n)};function jre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*4),this._gl=e,this._location=i[0]}jre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];Oi.equalsArray(s,n,o)||(Oi.pack(s,n,o),i=!0),o+=4}i&&this._gl.uniformMatrix2fv(this._location,!1,n)};function Qre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*9),this._gl=e,this._location=i[0]}Qre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];q.equalsArray(s,n,o)||(q.pack(s,n,o),i=!0),o+=9}i&&this._gl.uniformMatrix3fv(this._location,!1,n)};function qre(e,t,n,i){let o=i.length;this.name=n,this.value=new Array(o),this._value=new Float32Array(o*16),this._gl=e,this._location=i[0]}qre.prototype.set=function(){let e=this.value,t=e.length,n=this._value,i=!1,o=0;for(let r=0;r<t;++r){let s=e[r];F.equalsArray(s,n,o)||(F.pack(s,n,o),i=!0),o+=16}i&&this._gl.uniformMatrix4fv(this._location,!1,n)};var z1=L2e;var W2e=0;function P0(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=v2e(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=W2e++}P0.fromCache=function(e){return e=e??B.EMPTY_OBJECT,e.context.shaderCache.getShaderProgram(e)};P0.replaceCache=function(e){return e=e??B.EMPTY_OBJECT,e.context.shaderCache.replaceShaderProgram(e)};Object.defineProperties(P0.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},vertexAttributes:{get:function(){return zU(this),this._vertexAttributes}},numberOfVertexAttributes:{get:function(){return zU(this),this._numberOfVertexAttributes}},allUniforms:{get:function(){return zU(this),this._uniformsByName}}});function $re(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 v2e(e,t){let n={};if(!Lt.highpFloatSupported||!Lt.highpIntSupported){let i,o,r,s,a=$re(e),c=$re(t),d=a.length,u=c.length;for(i=0;i<d;i++)for(o=0;o<u;o++)if(a[i]===c[o]){r=a[i],s=`czm_mediump_${r}`;let h=new RegExp(`${r}\\b`,"g");t=t.replace(h,s),n[s]=r}}return{fragmentShaderText:t,duplicateUniformNames:n}}var cp="[Cesium WebGL] ";function F2e(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(`${cp}Vertex shader compile log: ${c}`),c=e.getShaderInfoLog(r),l(c)&&c.length>0&&console.log(`${cp}Fragment shader compile log: ${c}`),c=e.getProgramInfoLog(s),l(c)&&c.length>0&&console.log(`${cp}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(`${cp}Shader program link log: ${c}`),h(o,"vertex"),h(r,"fragment"),d=`Program failed to link. Link log: ${c}`):(c=e.getShaderInfoLog(o),console.error(`${cp}Vertex shader compile log: ${c}`),console.error(`${cp} Vertex shader source:
${n}`),d=`Vertex shader failed to compile. Compile log: ${c}`):(c=e.getShaderInfoLog(r),console.error(`${cp}Fragment shader compile log: ${c}`),console.error(`${cp} Fragment shader source:
${i}`),d=`Fragment shader failed to compile. Compile log: ${c}`),e.deleteShader(o),e.deleteShader(r),e.deleteProgram(s),new le(d);function h(p,b){if(!l(u))return;let f=u.getTranslatedShaderSource(p);if(f===""){console.error(`${cp}${b} shader translation failed.`);return}console.error(`${cp}Translated ${b} shaderSource:
${f}`)}}function I2e(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 P2e(e,t){let n={},i=[],o=[],r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let s=0;s<r;++s){let a=e.getActiveUniform(t,s),c="[0]",d=a.name.indexOf(c,a.name.length-c.length)!==-1?a.name.slice(0,a.name.length-3):a.name;if(d.indexOf("gl_")!==0)if(a.name.indexOf("[")<0){let u=e.getUniformLocation(t,d);if(u!==null){let h=B1(e,a,d,u);n[d]=h,i.push(h),h._setSampler&&o.push(h)}}else{let u,h,p,b,f=d.indexOf("[");if(f>=0){if(u=n[d.slice(0,f)],!l(u))continue;h=u._locations,h.length<=1&&(p=u.value,b=e.getUniformLocation(t,d),b!==null&&(h.push(b),p.push(e.getUniform(t,b))))}else{h=[];for(let y=0;y<a.size;++y)b=e.getUniformLocation(t,`${d}[${y}]`),b!==null&&h.push(b);u=z1(e,a,d,h),n[d]=u,i.push(u),u._setSampler&&o.push(u)}}}return{uniformsByName:n,uniforms:i,samplerUniforms:o}}function X2e(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=E0[s];l(c)?n.push({uniform:r,automaticUniform:c}):i.push(r)}return{automaticUniforms:n,manualUniforms:i}}function N2e(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 zU(e){l(e._program)||ese(e)}function ese(e){let t=e._program,n=e._gl,i=F2e(n,e,e._debugShaders),o=n.getProgramParameter(i,n.ACTIVE_ATTRIBUTES),r=P2e(n,i),s=X2e(e,r.uniformsByName);e._program=i,e._numberOfVertexAttributes=o,e._vertexAttributes=I2e(n,i,o),e._uniformsByName=r.uniformsByName,e._uniforms=r.uniforms,e._automaticUniforms=s.automaticUniforms,e._manualUniforms=s.manualUniforms,e.maximumTextureUnitIndex=N2e(n,i,r.samplerUniforms),t&&e._gl.deleteProgram(t),typeof spector<"u"&&(e._program.__SPECTOR_rebuildProgram=function(a,c,d,u){let h=e._vertexShaderText,p=e._fragmentShaderText,b=/ ! = /g;e._vertexShaderText=a.replace(b," != "),e._fragmentShaderText=c.replace(b," != ");try{ese(e),d(e._program)}catch(f){e._vertexShaderText=h,e._fragmentShaderText=p;let _=/(?:Compile|Link) error: ([^]*)/.exec(f.message);u(_?_[1]:f.message)}})}P0.prototype._bind=function(){zU(this),this._gl.useProgram(this._program)};P0.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)}};P0.prototype.isDestroyed=function(){return!1};P0.prototype.destroy=function(){this._cachedShader.cache.releaseShaderProgram(this)};P0.prototype.finalDestroy=function(){return this._gl.deleteProgram(this._program),me(this)};var qt=P0;function HU(e){this._context=e}var H1,Y2e=new et({primitiveType:ve.TRIANGLES}),w2e=new si({color:new U(0,0,0,0)});function M2e(e,t){return new os({context:e,colorTextures:[t],destroyAttachments:!1})}function k2e(e,t){return qt.fromCache({context:e,vertexShaderSource:pT,fragmentShaderSource:t,attributeLocations:{position:0,textureCoordinates:1}})}function U2e(e,t){return(!l(H1)||H1.viewport.width!==e||H1.viewport.height!==t)&&(H1=De.fromCache({viewport:new Qe(0,0,e,t)})),H1}HU.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:k2e(o,e.fragmentShaderSource),a=M2e(o,t),c=U2e(n,i),d=e.uniformMap,u=w2e;u.framebuffer=a,u.renderState=c,u.execute(o);let h=Y2e;h.vertexArray=r,h.renderState=c,h.shaderProgram=s,h.uniformMap=d,h.framebuffer=a,h.execute(o),a.destroy(),e.persists||(s.destroy(),l(e.vertexArray)&&r.destroy()),l(e.postExecute)&&e.postExecute(t)};HU.prototype.isDestroyed=function(){return!1};HU.prototype.destroy=function(){return me(this)};var K1=HU;var h6t=x(T(),1);var OUt=x(T(),1);var Rn={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};Rn.getSizeInBytes=function(e){switch(e){case Rn.BYTE:return Int8Array.BYTES_PER_ELEMENT;case Rn.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Rn.SHORT:return Int16Array.BYTES_PER_ELEMENT;case Rn.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Rn.INT:return Int32Array.BYTES_PER_ELEMENT;case Rn.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case Rn.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case Rn.DOUBLE:return Float64Array.BYTES_PER_ELEMENT}};Rn.fromTypedArray=function(e){if(e instanceof Int8Array)return Rn.BYTE;if(e instanceof Uint8Array)return Rn.UNSIGNED_BYTE;if(e instanceof Int16Array)return Rn.SHORT;if(e instanceof Uint16Array)return Rn.UNSIGNED_SHORT;if(e instanceof Int32Array)return Rn.INT;if(e instanceof Uint32Array)return Rn.UNSIGNED_INT;if(e instanceof Float32Array)return Rn.FLOAT;if(e instanceof Float64Array)return Rn.DOUBLE};Rn.validate=function(e){return l(e)&&(e===Rn.BYTE||e===Rn.UNSIGNED_BYTE||e===Rn.SHORT||e===Rn.UNSIGNED_SHORT||e===Rn.INT||e===Rn.UNSIGNED_INT||e===Rn.FLOAT||e===Rn.DOUBLE)};Rn.createTypedArray=function(e,t){switch(e){case Rn.BYTE:return new Int8Array(t);case Rn.UNSIGNED_BYTE:return new Uint8Array(t);case Rn.SHORT:return new Int16Array(t);case Rn.UNSIGNED_SHORT:return new Uint16Array(t);case Rn.INT:return new Int32Array(t);case Rn.UNSIGNED_INT:return new Uint32Array(t);case Rn.FLOAT:return new Float32Array(t);case Rn.DOUBLE:return new Float64Array(t)}};Rn.createArrayBufferView=function(e,t,n,i){switch(n=n??0,i=i??(t.byteLength-n)/Rn.getSizeInBytes(e),e){case Rn.BYTE:return new Int8Array(t,n,i);case Rn.UNSIGNED_BYTE:return new Uint8Array(t,n,i);case Rn.SHORT:return new Int16Array(t,n,i);case Rn.UNSIGNED_SHORT:return new Uint16Array(t,n,i);case Rn.INT:return new Int32Array(t,n,i);case Rn.UNSIGNED_INT:return new Uint32Array(t,n,i);case Rn.FLOAT:return new Float32Array(t,n,i);case Rn.DOUBLE:return new Float64Array(t,n,i)}};Rn.fromName=function(e){switch(e){case"BYTE":return Rn.BYTE;case"UNSIGNED_BYTE":return Rn.UNSIGNED_BYTE;case"SHORT":return Rn.SHORT;case"UNSIGNED_SHORT":return Rn.UNSIGNED_SHORT;case"INT":return Rn.INT;case"UNSIGNED_INT":return Rn.UNSIGNED_INT;case"FLOAT":return Rn.FLOAT;case"DOUBLE":return Rn.DOUBLE}};Object.freeze(Rn);var K=Rn;var a5t=x(T(),1);var zUt=x(T(),1),tse={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3};Object.freeze(tse);var cm=tse;function sK(e){e=e??B.EMPTY_OBJECT,this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=e.primitiveType??ve.TRIANGLES,this.boundingSphere=e.boundingSphere,this.geometryType=e.geometryType??cm.NONE,this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}sK.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 D2e=new pe,O2e=new m,nse=new F,B2e=[new pe,new pe,new pe],z2e=[new M,new M,new M],H2e=[new M,new M,new M],K2e=new m,J2e=new Pe,j2e=new F,Q2e=new Oi;sK._textureCoordinateRotationPoints=function(e,t,n,i){let o,r=ae.center(i,D2e),s=pe.toCartesian(r,n,O2e),a=dt.eastNorthUpToFixedFrame(s,n,nse),c=F.inverse(a,nse),d=z2e,u=B2e;u[0].longitude=i.west,u[0].latitude=i.south,u[1].longitude=i.west,u[1].latitude=i.north,u[2].longitude=i.east,u[2].latitude=i.south;let h=K2e;for(o=0;o<3;o++)pe.toCartesian(u[o],n,h),h=F.multiplyByPointAsVector(c,h,h),d[o].x=h.x,d[o].y=h.y;let p=Pe.fromAxisAngle(m.UNIT_Z,-t,J2e),b=q.fromQuaternion(p,j2e),f=e.length,y=Number.POSITIVE_INFINITY,_=Number.POSITIVE_INFINITY,S=Number.NEGATIVE_INFINITY,A=Number.NEGATIVE_INFINITY;for(o=0;o<f;o++)h=F.multiplyByPointAsVector(c,e[o],h),h=q.multiplyByVector(b,h,h),y=Math.min(y,h.x),_=Math.min(_,h.y),S=Math.max(S,h.x),A=Math.max(A,h.y);let Z=Oi.fromRotation(t,Q2e),V=H2e;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],L=d[2].x-E.x,v=d[1].y-E.y;for(o=0;o<3;o++){let C=V[o];Oi.multiplyByVector(Z,C,C),C.x=(C.x-E.x)/L,C.y=(C.y-E.y)/v}let I=V[0],X=V[1],N=V[2],g=new Array(6);return M.pack(I,g),M.pack(X,g,2),M.pack(N,g,4),g};var ft=sK;var d5t=x(T(),1);function q2e(e){e=e??B.EMPTY_OBJECT,this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=e.normalize??!1,this.values=e.values}var Ie=q2e;var I5t=x(T(),1);var L5t=x(T(),1);var h5t=x(T(),1);function uZ(e,t,n,i,o){this._format=e,this._datatype=t,this._width=n,this._height=i,this._buffer=o}Object.defineProperties(uZ.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}}});uZ.clone=function(e){if(l(e))return new uZ(e._format,e._datatype,e._width,e._height,e._buffer)};uZ.prototype.clone=function(){return uZ.clone(this)};var J1=uZ;var Z5t=x(T(),1),ise=x(tu(),1);function ose(){if(!l(Ja._canTransferArrayBuffer)){let e=lK("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 cK=new _e;function aK(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 lK(e){let t=new ise.default(e),n=t.scheme().length!==0&&t.fragment().length===0,i=e.replace(/\.js$/,""),o={},r,s;if(zg(e))s=e;else if(!n){let a=Kt(`${Ja._workerModulePrefix}/${i}.js`);zg(a)&&(s=a)}if(s){let a=`import "${s}";`;return r=aK(a),o.type="module",new Worker(r,o)}if(!n&&typeof CESIUM_WORKERS<"u"){let a=`
importScripts("${aK(CESIUM_WORKERS)}");
CesiumWorkers["${i}"]();
`;return r=aK(a),new Worker(r,o)}if(r=e,n||(r=Kt(`${Ja._workerModulePrefix+i}.js`)),!an.supportsEsmWebWorkers())throw new le("This browser is not supported. Please update your browser to continue.");return o.type="module",new Worker(r,o)}async function $2e(e,t){let n={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!an.supportsWebAssembly()){if(!l(t.fallbackModulePath))throw new le(`This browser does not support Web Assembly, and no backup module was provided for ${e._workerPath}`);return n.modulePath=Kt(t.fallbackModulePath),n}n.wasmBinaryFile=Kt(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 eIe=(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 le(r.error.message),s.stack=r.error.stack):s.name==="DeveloperError"?(s=new he(r.error.message),s.stack=r.error.stack):s.name==="Error"&&(s=new Error(r.error.message),s.stack=r.error.stack),cK.raiseEvent(s),i(s)}else cK.raiseEvent(),n(r.result);e.removeEventListener("message",o)}};return o},tIe=[];async function nIe(e,t,n){let i=await Promise.resolve(ose());l(n)?i||(n.length=0):n=tIe;let o=e._nextID++,r=new Promise((s,a)=>{e._worker.addEventListener("message",eIe(e._worker,o,s,a))});return e._worker.postMessage({id:o,baseUrl:Kt.getCesiumBaseUrl().url,parameters:t,canTransferArrayBuffer:i},n),r}async function iIe(e,t,n){++e._activeTasks;try{let i=await nIe(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=lK(this._workerPath)),!(this._activeTasks>=this._maximumActiveTasks))return iIe(this,e,t)};Ja.prototype.initWebAssemblyModule=async function(e){if(l(this._webAssemblyPromise))return this._webAssemblyPromise;let t=async()=>{let n=this._worker=lK(this._workerPath),i=await $2e(this,e),o=await Promise.resolve(ose()),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 le("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(),me(this)};Ja.taskCompletedEvent=cK;Ja._defaultWorkerModulePrefix="Workers/";Ja._workerModulePrefix=Ja._defaultWorkerModulePrefix;Ja._canTransferArrayBuffer=void 0;var Hn=Ja;function X0(){}X0._transcodeTaskProcessor=new Hn("transcodeKTX2",Number.POSITIVE_INFINITY);X0._readyPromise=void 0;function oIe(){let e=X0._transcodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(t){if(t)return X0._transcodeTaskProcessor;throw new le("KTX2 transcoder could not be initialized.")});X0._readyPromise=e}X0.transcode=function(e,t){return l(X0._readyPromise)||oIe(),X0._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 J1(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 j1=X0;var rse;sse.setKTX2SupportedFormats=function(e,t,n,i,o,r){rse={s3tc:e,pvrtc:t,astc:n,etc:i,etc1:o,bc7:r}};function sse(e){let t;return e instanceof ArrayBuffer||ArrayBuffer.isView(e)?t=Promise.resolve(e):t=We.createIfNeeded(e).fetchArrayBuffer(),t.then(function(n){return j1.transcode(n,rse)})}var yd=sse;var n3t=x(T(),1);var gDt=x(T(),1);var J5t=x(T(),1);var X5t=x(T(),1);function rIe(e,t){this.start=e??0,this.stop=t??0}var Or=rIe;var KU=class e{constructor(t,n){this.center=m.clone(t??m.ZERO),this.radius=n??0}static fromPoints(t,n){if(l(n)||(n=new e),!l(t)||t.length===0)return n.center=m.clone(m.ZERO,n.center),n.radius=0,n;let i=m.clone(t[0],bK),o=m.clone(i,dK),r=m.clone(i,uK),s=m.clone(i,mK),a=m.clone(i,hK),c=m.clone(i,fK),d=m.clone(i,pK),u=t.length,h;for(h=1;h<u;h++){m.clone(t[h],i);let X=i.x,N=i.y,g=i.z;X<o.x&&m.clone(i,o),X>a.x&&m.clone(i,a),N<r.y&&m.clone(i,r),N>c.y&&m.clone(i,c),g<s.z&&m.clone(i,s),g>d.z&&m.clone(i,d)}let p=m.magnitudeSquared(m.subtract(a,o,ja)),b=m.magnitudeSquared(m.subtract(c,r,ja)),f=m.magnitudeSquared(m.subtract(d,s,ja)),y=o,_=a,S=p;b>S&&(S=b,y=r,_=c),f>S&&(S=f,y=s,_=d);let A=gK;A.x=(y.x+_.x)*.5,A.y=(y.y+_.y)*.5,A.z=(y.z+_.z)*.5;let Z=m.magnitudeSquared(m.subtract(_,A,ja)),V=Math.sqrt(Z),E=yK;E.x=o.x,E.y=r.y,E.z=s.z;let L=xK;L.x=a.x,L.y=c.y,L.z=d.z;let v=m.midpoint(E,L,TK),I=0;for(h=0;h<u;h++){m.clone(t[h],i);let X=m.magnitude(m.subtract(i,v,ja));X>I&&(I=X);let N=m.magnitudeSquared(m.subtract(i,A,ja));if(N>Z){let g=Math.sqrt(N);V=(V+g)*.5,Z=V*V;let C=g-V;A.x=(V*A.x+C*i.x)/g,A.y=(V*A.y+C*i.y)/g,A.z=(V*A.z+C*i.z)/g}}return V<I?(m.clone(A,n.center),n.radius=V):(m.clone(v,n.center),n.radius=I),n}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=m.clone(m.ZERO,r.center),r.radius=0,r;ase._ellipsoid=ie.default,n=n??ase,ae.southwest(t,_K),_K.height=i,ae.northeast(t,SK),SK.height=o;let s=n.project(_K,aIe),a=n.project(SK,cIe),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 h=r.center;return h.x=s.x+c*.5,h.y=s.y+d*.5,h.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=m.clone(m.ZERO,o.center),o.radius=0,o;let r=ae.subsample(t,n,i,lIe);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=m.clone(m.ZERO,o.center),o.radius=0,o;n=n??m.ZERO,i=i??3;let r=bK;r.x=t[0]+n.x,r.y=t[1]+n.y,r.z=t[2]+n.z;let s=m.clone(r,dK),a=m.clone(r,uK),c=m.clone(r,mK),d=m.clone(r,hK),u=m.clone(r,fK),h=m.clone(r,pK),p=t.length,b;for(b=0;b<p;b+=i){let g=t[b]+n.x,C=t[b+1]+n.y,R=t[b+2]+n.z;r.x=g,r.y=C,r.z=R,g<s.x&&m.clone(r,s),g>d.x&&m.clone(r,d),C<a.y&&m.clone(r,a),C>u.y&&m.clone(r,u),R<c.z&&m.clone(r,c),R>h.z&&m.clone(r,h)}let f=m.magnitudeSquared(m.subtract(d,s,ja)),y=m.magnitudeSquared(m.subtract(u,a,ja)),_=m.magnitudeSquared(m.subtract(h,c,ja)),S=s,A=d,Z=f;y>Z&&(Z=y,S=a,A=u),_>Z&&(Z=_,S=c,A=h);let V=gK;V.x=(S.x+A.x)*.5,V.y=(S.y+A.y)*.5,V.z=(S.z+A.z)*.5;let E=m.magnitudeSquared(m.subtract(A,V,ja)),L=Math.sqrt(E),v=yK;v.x=s.x,v.y=a.y,v.z=c.z;let I=xK;I.x=d.x,I.y=u.y,I.z=h.z;let X=m.midpoint(v,I,TK),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=m.magnitude(m.subtract(r,X,ja));g>N&&(N=g);let C=m.magnitudeSquared(m.subtract(r,V,ja));if(C>E){let R=Math.sqrt(C);L=(L+R)*.5,E=L*L;let G=R-L;V.x=(L*V.x+G*r.x)/R,V.y=(L*V.y+G*r.y)/R,V.z=(L*V.z+G*r.z)/R}}return L<N?(m.clone(V,o.center),o.radius=L):(m.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=m.clone(m.ZERO,i.center),i.radius=0,i;let o=bK;o.x=t[0]+n[0],o.y=t[1]+n[1],o.z=t[2]+n[2];let r=m.clone(o,dK),s=m.clone(o,uK),a=m.clone(o,mK),c=m.clone(o,hK),d=m.clone(o,fK),u=m.clone(o,pK),h=t.length,p;for(p=0;p<h;p+=3){let N=t[p]+n[p],g=t[p+1]+n[p+1],C=t[p+2]+n[p+2];o.x=N,o.y=g,o.z=C,N<r.x&&m.clone(o,r),N>c.x&&m.clone(o,c),g<s.y&&m.clone(o,s),g>d.y&&m.clone(o,d),C<a.z&&m.clone(o,a),C>u.z&&m.clone(o,u)}let b=m.magnitudeSquared(m.subtract(c,r,ja)),f=m.magnitudeSquared(m.subtract(d,s,ja)),y=m.magnitudeSquared(m.subtract(u,a,ja)),_=r,S=c,A=b;f>A&&(A=f,_=s,S=d),y>A&&(A=y,_=a,S=u);let Z=gK;Z.x=(_.x+S.x)*.5,Z.y=(_.y+S.y)*.5,Z.z=(_.z+S.z)*.5;let V=m.magnitudeSquared(m.subtract(S,Z,ja)),E=Math.sqrt(V),L=yK;L.x=r.x,L.y=s.y,L.z=a.z;let v=xK;v.x=c.x,v.y=d.y,v.z=u.z;let I=m.midpoint(L,v,TK),X=0;for(p=0;p<h;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=m.magnitude(m.subtract(o,I,ja));N>X&&(X=N);let g=m.magnitudeSquared(m.subtract(o,Z,ja));if(g>V){let C=Math.sqrt(g);E=(E+C)*.5,V=E*E;let R=C-E;Z.x=(E*Z.x+R*o.x)/C,Z.y=(E*Z.y+R*o.y)/C,Z.z=(E*Z.z+R*o.z)/C}}return E<X?(m.clone(Z,i.center),i.radius=E):(m.clone(I,i.center),i.radius=X),i}static fromCornerPoints(t,n,i){l(i)||(i=new e);let o=m.midpoint(t,n,i.center);return i.radius=m.distance(o,n),i}static fromEllipsoid(t,n){return l(n)||(n=new e),m.clone(m.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=m.clone(m.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,m.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=q.getColumn(i,0,dIe),r=q.getColumn(i,1,uIe),s=q.getColumn(i,2,mIe);return m.add(o,r,o),m.add(o,s,o),n.center=m.clone(t.center,n.center),n.radius=m.magnitude(o),n}static fromTransformation(t,n){l(n)||(n=new e);let i=F.getTranslation(t,hIe),o=F.getScale(t,fIe),r=.5*m.magnitude(o);return n.center=m.clone(i,n.center),n.radius=r,n}static clone(t,n){if(l(t))return l(n)?(n.center=m.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=m.subtract(s,o,pIe),d=m.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,h=m.multiplyByScalar(c,(-r+u)/d,bIe);return m.add(h,o,h),m.clone(h,i.center),i.radius=u,i}static expand(t,n,i){i=e.clone(t,i);let o=m.magnitude(m.subtract(n,i.center,gIe));return o>i.radius&&(i.radius=o),i}static intersectPlane(t,n){let i=t.center,o=t.radius,r=n.normal,s=m.dot(r,i)+n.distance;return s<-o?zt.OUTSIDE:s<o?zt.INTERSECTING:zt.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=m.subtract(t.center,n,yIe),o=m.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 Or);let r=m.subtract(t.center,n,xIe),s=m.dot(i,r);return o.start=s-t.radius,o.stop=s+t.radius,o}static projectTo2D(t,n,i){lse._ellipsoid=ie.default,n=n??lse;let o=n.ellipsoid,r=t.center,s=t.radius,a;m.equals(r,m.ZERO)?a=m.clone(m.UNIT_X,cse):a=o.geodeticSurfaceNormal(r,cse);let c=m.cross(m.UNIT_Z,a,TIe);m.normalize(c,c);let d=m.cross(a,c,_Ie);m.normalize(d,d),m.multiplyByScalar(a,s,a),m.multiplyByScalar(d,s,d),m.multiplyByScalar(c,s,c);let u=m.negate(d,AIe),h=m.negate(c,SIe),p=dse,b=p[0];m.add(a,d,b),m.add(b,c,b),b=p[1],m.add(a,d,b),m.add(b,h,b),b=p[2],m.add(a,u,b),m.add(b,h,b),b=p[3],m.add(a,u,b),m.add(b,c,b),m.negate(a,a),b=p[4],m.add(a,d,b),m.add(b,c,b),b=p[5],m.add(a,d,b),m.add(b,h,b),b=p[6],m.add(a,u,b),m.add(b,h,b),b=p[7],m.add(a,u,b),m.add(b,c,b);let f=p.length;for(let A=0;A<f;++A){let Z=p[A];m.add(r,Z,Z);let V=o.cartesianToCartographic(Z,ZIe);n.project(V,Z)}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)&&m.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 sIe*t*t*t}};KU.packedLength=4;var dK=new m,uK=new m,mK=new m,hK=new m,fK=new m,pK=new m,bK=new m,ja=new m,gK=new m,yK=new m,xK=new m,TK=new m,sIe=4/3*W.PI,ase=new Di,aIe=new m,cIe=new m,_K=new pe,SK=new pe,lIe=[],dIe=new m,uIe=new m,mIe=new m,hIe=new m,fIe=new m,pIe=new m,bIe=new m,gIe=new m,yIe=new m,xIe=new m,cse=new m,TIe=new m,_Ie=new m,SIe=new m,AIe=new m,ZIe=new pe,dse=new Array(8);for(let e=0;e<8;++e)dse[e]=new m;var lse=new Di,de=KU;var q5t=x(T(),1);function CIe(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 bn=CIe;var eDt=x(T(),1),use={NONE:0,TOP:1,ALL:2};Object.freeze(use);var dn=use;var oDt=x(T(),1);function Ds(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}Ds.POSITION_ONLY=Object.freeze(new Ds({position:!0}));Ds.POSITION_AND_NORMAL=Object.freeze(new Ds({position:!0,normal:!0}));Ds.POSITION_NORMAL_AND_ST=Object.freeze(new Ds({position:!0,normal:!0,st:!0}));Ds.POSITION_AND_ST=Object.freeze(new Ds({position:!0,st:!0}));Ds.POSITION_AND_COLOR=Object.freeze(new Ds({position:!0,color:!0}));Ds.ALL=Object.freeze(new Ds({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0}));Ds.DEFAULT=Ds.POSITION_NORMAL_AND_ST;Ds.packedLength=6;Ds.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};Ds.unpack=function(e,t,n){return t=t??0,l(n)||(n=new Ds),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};Ds.clone=function(e,t){if(l(e))return l(t)||(t=new Ds),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t};var Xe=Ds;var VIe=new m;function iu(e){e=e??B.EMPTY_OBJECT;let t=e.minimum,n=e.maximum,i=e.vertexFormat??Xe.DEFAULT;this._minimum=m.clone(t),this._maximum=m.clone(n),this._vertexFormat=i,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}iu.fromDimensions=function(e){e=e??B.EMPTY_OBJECT;let t=e.dimensions,n=m.multiplyByScalar(t,.5,new m);return new iu({minimum:m.negate(n,new m),maximum:n,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})};iu.fromAxisAlignedBoundingBox=function(e){return new iu({minimum:e.minimum,maximum:e.maximum})};iu.packedLength=2*m.packedLength+Xe.packedLength+1;iu.pack=function(e,t,n){return n=n??0,m.pack(e._minimum,t,n),m.pack(e._maximum,t,n+m.packedLength),Xe.pack(e._vertexFormat,t,n+2*m.packedLength),t[n+2*m.packedLength+Xe.packedLength]=e._offsetAttribute??-1,t};var hse=new m,fse=new m,pse=new Xe,mse={minimum:hse,maximum:fse,vertexFormat:pse,offsetAttribute:void 0};iu.unpack=function(e,t,n){t=t??0;let i=m.unpack(e,t,hse),o=m.unpack(e,t+m.packedLength,fse),r=Xe.unpack(e,t+2*m.packedLength,pse),s=e[t+2*m.packedLength+Xe.packedLength];return l(n)?(n._minimum=m.clone(i,n._minimum),n._maximum=m.clone(o,n._maximum),n._vertexFormat=Xe.clone(r,n._vertexFormat),n._offsetAttribute=s===-1?void 0:s,n):(mse.offsetAttribute=s===-1?void 0:s,new iu(mse))};iu.createGeometry=function(e){let t=e._minimum,n=e._maximum,i=e._vertexFormat;if(m.equals(t,n))return;let o=new bn,r,s;if(i.position&&(i.st||i.normal||i.tangent||i.bitangent)){if(i.position&&(s=new Float64Array(72),s[0]=t.x,s[1]=t.y,s[2]=n.z,s[3]=n.x,s[4]=t.y,s[5]=n.z,s[6]=n.x,s[7]=n.y,s[8]=n.z,s[9]=t.x,s[10]=n.y,s[11]=n.z,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=n.x,s[16]=t.y,s[17]=t.z,s[18]=n.x,s[19]=n.y,s[20]=t.z,s[21]=t.x,s[22]=n.y,s[23]=t.z,s[24]=n.x,s[25]=t.y,s[26]=t.z,s[27]=n.x,s[28]=n.y,s[29]=t.z,s[30]=n.x,s[31]=n.y,s[32]=n.z,s[33]=n.x,s[34]=t.y,s[35]=n.z,s[36]=t.x,s[37]=t.y,s[38]=t.z,s[39]=t.x,s[40]=n.y,s[41]=t.z,s[42]=t.x,s[43]=n.y,s[44]=n.z,s[45]=t.x,s[46]=t.y,s[47]=n.z,s[48]=t.x,s[49]=n.y,s[50]=t.z,s[51]=n.x,s[52]=n.y,s[53]=t.z,s[54]=n.x,s[55]=n.y,s[56]=n.z,s[57]=t.x,s[58]=n.y,s[59]=n.z,s[60]=t.x,s[61]=t.y,s[62]=t.z,s[63]=n.x,s[64]=t.y,s[65]=t.z,s[66]=n.x,s[67]=t.y,s[68]=n.z,s[69]=t.x,s[70]=t.y,s[71]=n.z,o.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})),i.normal){let d=new Float32Array(72);d[0]=0,d[1]=0,d[2]=1,d[3]=0,d[4]=0,d[5]=1,d[6]=0,d[7]=0,d[8]=1,d[9]=0,d[10]=0,d[11]=1,d[12]=0,d[13]=0,d[14]=-1,d[15]=0,d[16]=0,d[17]=-1,d[18]=0,d[19]=0,d[20]=-1,d[21]=0,d[22]=0,d[23]=-1,d[24]=1,d[25]=0,d[26]=0,d[27]=1,d[28]=0,d[29]=0,d[30]=1,d[31]=0,d[32]=0,d[33]=1,d[34]=0,d[35]=0,d[36]=-1,d[37]=0,d[38]=0,d[39]=-1,d[40]=0,d[41]=0,d[42]=-1,d[43]=0,d[44]=0,d[45]=-1,d[46]=0,d[47]=0,d[48]=0,d[49]=1,d[50]=0,d[51]=0,d[52]=1,d[53]=0,d[54]=0,d[55]=1,d[56]=0,d[57]=0,d[58]=1,d[59]=0,d[60]=0,d[61]=-1,d[62]=0,d[63]=0,d[64]=-1,d[65]=0,d[66]=0,d[67]=-1,d[68]=0,d[69]=0,d[70]=-1,d[71]=0,o.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:d})}if(i.st){let d=new Float32Array(48);d[0]=0,d[1]=0,d[2]=1,d[3]=0,d[4]=1,d[5]=1,d[6]=0,d[7]=1,d[8]=1,d[9]=0,d[10]=0,d[11]=0,d[12]=0,d[13]=1,d[14]=1,d[15]=1,d[16]=0,d[17]=0,d[18]=1,d[19]=0,d[20]=1,d[21]=1,d[22]=0,d[23]=1,d[24]=1,d[25]=0,d[26]=0,d[27]=0,d[28]=0,d[29]=1,d[30]=1,d[31]=1,d[32]=1,d[33]=0,d[34]=0,d[35]=0,d[36]=0,d[37]=1,d[38]=1,d[39]=1,d[40]=0,d[41]=0,d[42]=1,d[43]=0,d[44]=1,d[45]=1,d[46]=0,d[47]=1,o.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:d})}if(i.tangent){let d=new Float32Array(72);d[0]=1,d[1]=0,d[2]=0,d[3]=1,d[4]=0,d[5]=0,d[6]=1,d[7]=0,d[8]=0,d[9]=1,d[10]=0,d[11]=0,d[12]=-1,d[13]=0,d[14]=0,d[15]=-1,d[16]=0,d[17]=0,d[18]=-1,d[19]=0,d[20]=0,d[21]=-1,d[22]=0,d[23]=0,d[24]=0,d[25]=1,d[26]=0,d[27]=0,d[28]=1,d[29]=0,d[30]=0,d[31]=1,d[32]=0,d[33]=0,d[34]=1,d[35]=0,d[36]=0,d[37]=-1,d[38]=0,d[39]=0,d[40]=-1,d[41]=0,d[42]=0,d[43]=-1,d[44]=0,d[45]=0,d[46]=-1,d[47]=0,d[48]=-1,d[49]=0,d[50]=0,d[51]=-1,d[52]=0,d[53]=0,d[54]=-1,d[55]=0,d[56]=0,d[57]=-1,d[58]=0,d[59]=0,d[60]=1,d[61]=0,d[62]=0,d[63]=1,d[64]=0,d[65]=0,d[66]=1,d[67]=0,d[68]=0,d[69]=1,d[70]=0,d[71]=0,o.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:d})}if(i.bitangent){let d=new Float32Array(72);d[0]=0,d[1]=1,d[2]=0,d[3]=0,d[4]=1,d[5]=0,d[6]=0,d[7]=1,d[8]=0,d[9]=0,d[10]=1,d[11]=0,d[12]=0,d[13]=1,d[14]=0,d[15]=0,d[16]=1,d[17]=0,d[18]=0,d[19]=1,d[20]=0,d[21]=0,d[22]=1,d[23]=0,d[24]=0,d[25]=0,d[26]=1,d[27]=0,d[28]=0,d[29]=1,d[30]=0,d[31]=0,d[32]=1,d[33]=0,d[34]=0,d[35]=1,d[36]=0,d[37]=0,d[38]=1,d[39]=0,d[40]=0,d[41]=1,d[42]=0,d[43]=0,d[44]=1,d[45]=0,d[46]=0,d[47]=1,d[48]=0,d[49]=0,d[50]=1,d[51]=0,d[52]=0,d[53]=1,d[54]=0,d[55]=0,d[56]=1,d[57]=0,d[58]=0,d[59]=1,d[60]=0,d[61]=0,d[62]=1,d[63]=0,d[64]=0,d[65]=1,d[66]=0,d[67]=0,d[68]=1,d[69]=0,d[70]=0,d[71]=1,o.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:d})}r=new Uint16Array(36),r[0]=0,r[1]=1,r[2]=2,r[3]=0,r[4]=2,r[5]=3,r[6]=6,r[7]=5,r[8]=4,r[9]=7,r[10]=6,r[11]=4,r[12]=8,r[13]=9,r[14]=10,r[15]=8,r[16]=10,r[17]=11,r[18]=14,r[19]=13,r[20]=12,r[21]=15,r[22]=14,r[23]=12,r[24]=18,r[25]=17,r[26]=16,r[27]=19,r[28]=18,r[29]=16,r[30]=20,r[31]=21,r[32]=22,r[33]=20,r[34]=22,r[35]=23}else s=new Float64Array(24),s[0]=t.x,s[1]=t.y,s[2]=t.z,s[3]=n.x,s[4]=t.y,s[5]=t.z,s[6]=n.x,s[7]=n.y,s[8]=t.z,s[9]=t.x,s[10]=n.y,s[11]=t.z,s[12]=t.x,s[13]=t.y,s[14]=n.z,s[15]=n.x,s[16]=t.y,s[17]=n.z,s[18]=n.x,s[19]=n.y,s[20]=n.z,s[21]=t.x,s[22]=n.y,s[23]=n.z,o.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s}),r=new Uint16Array(36),r[0]=4,r[1]=5,r[2]=6,r[3]=4,r[4]=6,r[5]=7,r[6]=1,r[7]=0,r[8]=3,r[9]=1,r[10]=3,r[11]=2,r[12]=1,r[13]=6,r[14]=5,r[15]=1,r[16]=2,r[17]=6,r[18]=2,r[19]=3,r[20]=7,r[21]=2,r[22]=7,r[23]=6,r[24]=3,r[25]=0,r[26]=4,r[27]=3,r[28]=4,r[29]=7,r[30]=0,r[31]=1,r[32]=5,r[33]=0,r[34]=5,r[35]=4;let a=m.subtract(n,t,VIe),c=m.magnitude(a)*.5;if(l(e._offsetAttribute)){let d=s.length,u=e._offsetAttribute===dn.NONE?0:1,h=new Uint8Array(d/3).fill(u);o.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return new ft({attributes:o,indices:r,primitiveType:ve.TRIANGLES,boundingSphere:new de(m.ZERO,c),offsetAttribute:e._offsetAttribute})};var AK;iu.getUnitBox=function(){return l(AK)||(AK=iu.createGeometry(iu.fromDimensions({dimensions:new m(1,1,1),vertexFormat:Xe.POSITION_ONLY}))),AK};var xc=iu;var jOt=x(T(),1);var FDt=x(T(),1);var CDt=x(T(),1);var ho={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"};ho.getMathType=function(e){switch(e){case ho.SCALAR:return Number;case ho.VEC2:return M;case ho.VEC3:return m;case ho.VEC4:return se;case ho.MAT2:return Oi;case ho.MAT3:return q;case ho.MAT4:return F}};ho.getNumberOfComponents=function(e){switch(e){case ho.SCALAR:return 1;case ho.VEC2:return 2;case ho.VEC3:return 3;case ho.VEC4:case ho.MAT2:return 4;case ho.MAT3:return 9;case ho.MAT4:return 16}};ho.getAttributeLocationCount=function(e){switch(e){case ho.SCALAR:case ho.VEC2:case ho.VEC3:case ho.VEC4:return 1;case ho.MAT2:return 2;case ho.MAT3:return 3;case ho.MAT4:return 4}};ho.getGlslType=function(e){switch(e){case ho.SCALAR:return"float";case ho.VEC2:return"vec2";case ho.VEC3:return"vec3";case ho.VEC4:return"vec4";case ho.MAT2:return"mat2";case ho.MAT3:return"mat3";case ho.MAT4:return"mat4"}};Object.freeze(ho);var Nt=ho;var bse=1/256,RIe=65536,CK=256,_o={};_o.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};_o.octEncode=function(e,t){return _o.octEncodeInRange(e,255,t)};var Q1=new M,gse=new Uint8Array(1);function JU(e){return gse[0]=e,gse[0]}_o.octEncodeToCartesian4=function(e,t){return _o.octEncodeInRange(e,65535,Q1),t.x=JU(Q1.x*bse),t.y=JU(Q1.x),t.z=JU(Q1.y*bse),t.w=JU(Q1.y),t};_o.octDecodeInRange=function(e,t,n,i){if(i.x=W.fromSNorm(e,n),i.y=W.fromSNorm(t,n),i.z=1-(Math.abs(i.x)+Math.abs(i.y)),i.z<0){let o=i.x;i.x=(1-Math.abs(i.y))*W.signNotZero(o),i.y=(1-Math.abs(o))*W.signNotZero(i.y)}return m.normalize(i,i)};_o.octDecode=function(e,t,n){return _o.octDecodeInRange(e,t,255,n)};_o.octDecodeFromCartesian4=function(e,t){let n=e.x,i=e.y,o=e.z,r=e.w,s=n*CK+i,a=o*CK+r;return _o.octDecodeInRange(s,a,65535,t)};_o.octPackFloat=function(e){return 256*e.x+e.y};var VK=new M;_o.octEncodeFloat=function(e){return _o.octEncode(e,VK),_o.octPackFloat(VK)};_o.octDecodeFloat=function(e,t){let n=e/256,i=Math.floor(n),o=(n-i)*256;return _o.octDecode(i,o,t)};_o.octPack=function(e,t,n,i){let o=_o.octEncodeFloat(e),r=_o.octEncodeFloat(t),s=_o.octEncode(n,VK);return i.x=65536*s.x+o,i.y=65536*s.y+r,i};_o.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;_o.octDecodeFloat(s,t),_o.octDecodeFloat(c,n),_o.octDecode(r,a,i)};_o.compressTextureCoordinates=function(e){let t=e.x*4095|0,n=e.y*4095|0;return 4096*t+n};_o.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 ZK(e){return e>>1^-(e&1)}_o.zigZagDeltaDecode=function(e,t,n){let i=e.length,o=0,r=0,s=0;for(let a=0;a<i;++a)o+=ZK(e[a]),r+=ZK(t[a]),e[a]=o,t[a]=r,l(n)&&(s+=ZK(n[a]),n[a]=s)};_o.dequantize=function(e,t,n,i){let o=Nt.getNumberOfComponents(n),r;switch(t){case K.BYTE:r=127;break;case K.UNSIGNED_BYTE:r=255;break;case K.SHORT:r=32767;break;case K.UNSIGNED_SHORT:r=65535;break;case K.INT:r=2147483647;break;case K.UNSIGNED_INT:r=4294967295;break}let s=new Float32Array(i*o);for(let a=0;a<i;a++)for(let c=0;c<o;c++){let d=a*o+c;s[d]=Math.max(e[d]/r,-1)}return s};_o.encodeRGB8=function(e){return Math.round(W.clamp(e.red*255,0,255))*RIe+Math.round(W.clamp(e.green*255,0,255))*CK+Math.round(W.clamp(e.blue*255,0,255))};_o.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};_o.decodeRGB565=function(e,t){let n=e.length;l(t)||(t=new Float32Array(n*3));let i=31,o=63,r=1/31,s=1/63;for(let a=0;a<n;a++){let c=e[a],d=c>>11,u=c>>5&o,h=c&i,p=3*a;t[p]=d*r,t[p+1]=u*s,t[p+2]=h*r}return t};var cn=_o;var wDt=x(T(),1);var yse=new m,xse=new m,Tse=new m;function EIe(e,t,n,i,o){l(o)||(o=new m);let r,s,a,c,d,u,h,p;if(l(t.z)){if(m.equalsEpsilon(e,t,W.EPSILON14))return m.clone(m.UNIT_X,o);if(m.equalsEpsilon(e,n,W.EPSILON14))return m.clone(m.UNIT_Y,o);if(m.equalsEpsilon(e,i,W.EPSILON14))return m.clone(m.UNIT_Z,o);r=m.subtract(n,t,yse),s=m.subtract(i,t,xse),a=m.subtract(e,t,Tse),c=m.dot(r,r),d=m.dot(r,s),u=m.dot(r,a),h=m.dot(s,s),p=m.dot(s,a)}else{if(M.equalsEpsilon(e,t,W.EPSILON14))return m.clone(m.UNIT_X,o);if(M.equalsEpsilon(e,n,W.EPSILON14))return m.clone(m.UNIT_Y,o);if(M.equalsEpsilon(e,i,W.EPSILON14))return m.clone(m.UNIT_Z,o);r=M.subtract(n,t,yse),s=M.subtract(i,t,xse),a=M.subtract(e,t,Tse),c=M.dot(r,r),d=M.dot(r,s),u=M.dot(r,a),h=M.dot(s,s),p=M.dot(s,a)}o.y=h*u-d*p,o.z=c*p-d*u;let b=c*h-d*d;if(b!==0)return o.y/=b,o.z/=b,o.x=1-o.y-o.z,o}var gT=EIe;var DDt=x(T(),1);function lp(){this.high=m.clone(m.ZERO),this.low=m.clone(m.ZERO)}lp.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 N0={high:0,low:0};lp.fromCartesian=function(e,t){l(t)||(t=new lp);let n=t.high,i=t.low;return lp.encode(e.x,N0),n.x=N0.high,i.x=N0.low,lp.encode(e.y,N0),n.y=N0.high,i.y=N0.low,lp.encode(e.z,N0),n.z=N0.high,i.z=N0.low,t};var RK=new lp;lp.writeElements=function(e,t,n){lp.fromCartesian(e,RK);let i=RK.high,o=RK.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 Tn=lp;var pOt=x(T(),1);var zDt=x(T(),1);var EK={};EK.computeDiscriminant=function(e,t,n){return t*t-4*e*n};function _se(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}EK.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=_se(o,-r,W.EPSILON14);if(s<0)return[];let a=-.5*_se(t,W.sign(t)*Math.sqrt(s),W.EPSILON14);return t>0?[a/e,n/a]:[n/a,a/e]};var Sl=EK;var eOt=x(T(),1);var JDt=x(T(),1);var LK={};LK.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 GK(e,t,n,i){let o=e,r=t/3,s=n/3,a=i,c=o*s,d=r*a,u=r*r,h=s*s,p=o*s-u,b=o*a-r*s,f=r*a-h,y=4*p*f-b*b,_,S;if(y<0){let z,J,ee;u*d>=c*h?(z=o,J=p,ee=-2*r*p+o*b):(z=a,J=f,ee=-a*b+2*s*f);let te=-(ee<0?-1:1)*Math.abs(z)*Math.sqrt(-y);S=-ee+te;let $=S/2,be=$<0?-Math.pow(-$,1/3):Math.pow($,1/3),ye=S===te?-be:-J/be;return _=J<=0?be+ye:-ee/(be*be+ye*ye+J),u*d>=c*h?[(_-r)/o]:[-a/(_+s)]}let A=p,Z=-2*r*p+o*b,V=f,E=-a*b+2*s*f,L=Math.sqrt(y),v=Math.sqrt(3)/2,I=Math.abs(Math.atan2(o*L,-Z)/3);_=2*Math.sqrt(-A);let X=Math.cos(I);S=_*X;let N=_*(-X/2-v*Math.sin(I)),g=S+N>2*r?S-r:N-r,C=o,R=g/C;I=Math.abs(Math.atan2(a*L,-E)/3),_=2*Math.sqrt(-V),X=Math.cos(I),S=_*X,N=_*(-X/2-v*Math.sin(I));let G=-a,P=S+N<2*s?S+s:N+s,Y=G/P,O=C*P,k=-g*P-C*G,D=g*G,w=(s*k-r*D)/(-r*k+s*O);return R<=w?R<=Y?w<=Y?[R,w,Y]:[R,Y,w]:[Y,R,w]:R<=Y?[w,R,Y]:w<=Y?[w,Y,R]:[Y,w,R]}LK.computeRealRoots=function(e,t,n,i){let o,r;if(e===0)return Sl.computeRealRoots(t,n,i);if(t===0){if(n===0){if(i===0)return[0,0,0];r=-i/e;let s=r<0?-Math.pow(-r,1/3):Math.pow(r,1/3);return[s,s,s]}else if(i===0)return o=Sl.computeRealRoots(e,0,n),o.Length===0?[0]:[o[0],0,o[1]];return GK(e,0,n,i)}else{if(n===0)return i===0?(r=-t/e,r<0?[r,0,0]:[0,0,r]):GK(e,t,0,i);if(i===0)return o=Sl.computeRealRoots(e,t,n),o.length===0?[0]:o[1]<=0?[o[0],o[1],0]:o[0]>=0?[0,o[0],o[1]]:[o[0],0,o[1]]}return GK(e,t,n,i)};var yT=LK;var WK={};WK.computeDiscriminant=function(e,t,n,i,o){let r=e*e,s=r*e,a=t*t,c=a*t,d=n*n,u=d*n,h=i*i,p=h*i,b=o*o,f=b*o;return a*d*h-4*c*p-4*e*u*h+18*e*t*n*p-27*r*h*h+256*s*f+o*(18*c*n*i-4*a*u+16*e*d*d-80*e*t*d*i-6*e*a*h+144*r*n*h)+b*(144*e*a*n-27*a*a-128*r*d-192*r*t*i)};function Rh(e,t,n,i){let o=e*e,r=t-3*o/8,s=n-t*e/2+o*e/8,a=i-n*e/4+t*o/16-3*o*o/256,c=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 h=Sl.computeRealRoots(1,r,a);if(h.length===2){let p=h[0],b=h[1],f;if(p>=0&&b>=0){let y=Math.sqrt(p),_=Math.sqrt(b);return[d-_,d-y,d+y,d+_]}else{if(p>=0&&b<0)return f=Math.sqrt(p),[d-f,d+f];if(p<0&&b>=0)return f=Math.sqrt(b),[d-f,d+f]}}return[]}else if(u>0){let h=Math.sqrt(u),p=(r+u-s/h)/2,b=(r+u+s/h)/2,f=Sl.computeRealRoots(1,h,p),y=Sl.computeRealRoots(1,-h,b);return f.length!==0?(f[0]+=d,f[1]+=d,y.length!==0?(y[0]+=d,y[1]+=d,f[1]<=y[0]?[f[0],f[1],y[0],y[1]]:y[1]<=f[0]?[y[0],y[1],f[0],f[1]]:f[0]>=y[0]&&f[1]<=y[1]?[y[0],f[0],f[1],y[1]]:y[0]>=f[0]&&y[1]<=f[1]?[f[0],y[0],y[1],f[1]]:f[0]>y[0]&&f[0]<y[1]?[y[0],f[0],y[1],f[1]]:[f[0],y[0],f[1],y[1]]):f):y.length!==0?(y[0]+=d,y[1]+=d,y):[]}}return[]}function q1(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 h=u[0],p=t-h,b=p*p,f=e/2,y=p/2,_=b-4*i,S=b+4*Math.abs(i),A=s-4*h,Z=s+4*Math.abs(h),V,E;if(h<0||_*Z<A*S){let C=Math.sqrt(A);V=C/2,E=C===0?0:(e*y-n)/C}else{let C=Math.sqrt(_);V=C===0?0:(e*y-n)/C,E=C/2}let L,v;f===0&&V===0?(L=0,v=0):W.sign(f)===W.sign(V)?(L=f+V,v=h/L):(v=f-V,L=h/v);let I,X;y===0&&E===0?(I=0,X=0):W.sign(y)===W.sign(E)?(I=y+E,X=i/I):(X=y-E,I=i/X);let N=Sl.computeRealRoots(1,L,I),g=Sl.computeRealRoots(1,v,X);if(N.length!==0)return g.length!==0?N[1]<=g[0]?[N[0],N[1],g[0],g[1]]:g[1]<=N[0]?[g[0],g[1],N[0],N[1]]:N[0]>=g[0]&&N[1]<=g[1]?[g[0],N[0],N[1],g[1]]:g[0]>=N[0]&&g[1]<=N[1]?[N[0],g[0],g[1],N[1]]:N[0]>g[0]&&N[0]<g[1]?[g[0],N[0],g[1],N[1]]:[N[0],g[0],N[1],g[1]]:N;if(g.length!==0)return g}return[]}WK.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 Rh(r,s,a,c);case 1:return q1(r,s,a,c);case 2:return q1(r,s,a,c);case 3:return Rh(r,s,a,c);case 4:return Rh(r,s,a,c);case 5:return q1(r,s,a,c);case 6:return Rh(r,s,a,c);case 7:return Rh(r,s,a,c);case 8:return q1(r,s,a,c);case 9:return Rh(r,s,a,c);case 10:return Rh(r,s,a,c);case 11:return q1(r,s,a,c);case 12:return Rh(r,s,a,c);case 13:return Rh(r,s,a,c);case 14:return Rh(r,s,a,c);case 15:return Rh(r,s,a,c);default:return}};var $1=WK;var oOt=x(T(),1);var vK=class e{constructor(t,n){n=m.clone(n??m.ZERO),m.equals(n,m.ZERO)||m.normalize(n,n),this.origin=m.clone(t??m.ZERO),this.direction=n}static clone(t,n){if(l(t))return l(n)?(n.origin=m.clone(t.origin),n.direction=m.clone(t.direction),n):new e(t.origin,t.direction)}static getPoint(t,n,i){return l(i)||(i=new m),i=m.multiplyByScalar(t.direction,n,i),m.add(t.origin,i,i)}},gn=vK;var jo={};jo.rayPlane=function(e,t,n){l(n)||(n=new m);let i=e.origin,o=e.direction,r=t.normal,s=m.dot(r,o);if(Math.abs(s)<W.EPSILON15)return;let a=(-t.distance-m.dot(r,i))/s;if(!(a<0))return n=m.multiplyByScalar(o,a,n),m.add(i,n,n)};var GIe=new m,LIe=new m,Gse=new m,Sse=new m,Ase=new m;jo.rayTriangleParametric=function(e,t,n,i,o){o=o??!1;let r=e.origin,s=e.direction,a=m.subtract(n,t,GIe),c=m.subtract(i,t,LIe),d=m.cross(s,c,Gse),u=m.dot(a,d),h,p,b,f,y;if(o){if(u<W.EPSILON6||(h=m.subtract(r,t,Sse),b=m.dot(h,d),b<0||b>u)||(p=m.cross(h,a,Ase),f=m.dot(s,p),f<0||b+f>u))return;y=m.dot(c,p)/u}else{if(Math.abs(u)<W.EPSILON6)return;let _=1/u;if(h=m.subtract(r,t,Sse),b=m.dot(h,d)*_,b<0||b>1||(p=m.cross(h,a,Ase),f=m.dot(s,p)*_,f<0||b+f>1))return;y=m.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 m),m.multiplyByScalar(e.direction,s,r),m.add(e.origin,r,r)};var WIe=new gn;jo.lineSegmentTriangle=function(e,t,n,i,o,r,s){let a=WIe;m.clone(e,a.origin),m.subtract(t,e,a.direction),m.normalize(a.direction,a.direction);let c=jo.rayTriangleParametric(a,n,i,o,r);if(!(!l(c)||c<0||c>m.distance(e,t)))return l(s)||(s=new m),m.multiplyByScalar(a.direction,c,s),m.add(a.origin,s,s)};function vIe(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 FIe={root0:0,root1:0};function Lse(e,t,n){l(n)||(n=new Or);let i=e.origin,o=e.direction,r=t.center,s=t.radius*t.radius,a=m.subtract(i,r,Gse),c=m.dot(o,o),d=2*m.dot(o,a),u=m.magnitudeSquared(a)-s,h=vIe(c,d,u,FIe);if(l(h))return n.start=h.root0,n.stop=h.root1,n}jo.raySphere=function(e,t,n){if(n=Lse(e,t,n),!(!l(n)||n.stop<0))return n.start=Math.max(n.start,0),n};var IIe=new gn;jo.lineSegmentSphere=function(e,t,n,i){let o=IIe;m.clone(e,o.origin);let r=m.subtract(t,e,o.direction),s=m.magnitude(r);if(m.normalize(r,r),i=Lse(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 PIe=new m,XIe=new m;jo.rayEllipsoid=function(e,t){let n=t.oneOverRadii,i=m.multiplyComponents(n,e.origin,PIe),o=m.multiplyComponents(n,e.direction,XIe),r=m.magnitudeSquared(i),s=m.dot(i,o),a,c,d,u,h;if(r>1){if(s>=0)return;let p=s*s;if(a=r-1,c=m.magnitudeSquared(o),d=c*a,p<d)return;if(p>d){u=s*s-d,h=-s+Math.sqrt(u);let f=h/c,y=a/h;return f<y?new Or(f,y):{start:y,stop:f}}let b=Math.sqrt(a/c);return new Or(b,b)}else if(r<1)return a=r-1,c=m.magnitudeSquared(o),d=c*a,u=s*s-d,h=-s+Math.sqrt(u),new Or(0,h/c);if(s<0)return c=m.magnitudeSquared(o),new Or(0,-s/c)};var NIe=new Or,YIe=new Or,wIe=new Or;jo.rayAxisAlignedBoundingBox=function(e,t,n){l(n)||(n=new Or);let i=FK(e.origin.x,e.direction.x,t.minimum.x,t.maximum.x,NIe),o=FK(e.origin.y,e.direction.y,t.minimum.y,t.maximum.y,YIe),r=FK(e.origin.z,e.direction.z,t.minimum.z,t.maximum.z,wIe);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 FK(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[q.COLUMN1ROW1]-e[q.COLUMN2ROW2])*s,c=o*(i*xT(e[q.COLUMN1ROW0],e[q.COLUMN0ROW1],W.EPSILON15)+t.y),d=e[q.COLUMN0ROW0]*r+e[q.COLUMN2ROW2]*s+i*t.x+n,u=s*xT(e[q.COLUMN2ROW1],e[q.COLUMN1ROW2],W.EPSILON15),h=o*(i*xT(e[q.COLUMN2ROW0],e[q.COLUMN0ROW2])+t.z),p,b=[];if(h===0&&u===0){if(p=Sl.computeRealRoots(a,c,d),p.length===0)return b;let I=p[0],X=Math.sqrt(Math.max(1-I*I,0));if(b.push(new m(i,o*I,o*-X)),b.push(new m(i,o*I,o*X)),p.length===2){let N=p[1],g=Math.sqrt(Math.max(1-N*N,0));b.push(new m(i,o*N,o*-g)),b.push(new m(i,o*N,o*g))}return b}let f=h*h,y=u*u,_=a*a,S=h*u,A=_+y,Z=2*(c*a+S),V=2*d*a+c*c-y+f,E=2*(d*c-S),L=d*d-f;if(A===0&&Z===0&&V===0&&E===0)return b;p=$1.computeRealRoots(A,Z,V,E,L);let v=p.length;if(v===0)return b;for(let I=0;I<v;++I){let X=p[I],N=X*X,g=Math.max(1-N,0),C=Math.sqrt(g),R;W.sign(a)===W.sign(d)?R=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 G=xT(u*X,h,W.EPSILON15),P=R*G;P<0?b.push(new m(i,o*X,o*C)):P>0?b.push(new m(i,o*X,o*-C)):C!==0?(b.push(new m(i,o*X,o*-C)),b.push(new m(i,o*X,o*C)),++I):b.push(new m(i,o*X,o*C))}return b};var IK=new m,Zse=new m,Cse=new m,jU=new m,MIe=new m,kIe=new q,UIe=new q,DIe=new q,OIe=new q,BIe=new q,Vse=new q,Rse=new q,Ese=new m,zIe=new m,HIe=new pe;jo.grazingAltitudeLocation=function(e,t){let n=e.origin,i=e.direction;if(!m.equals(n,m.ZERO)){let L=t.geodeticSurfaceNormal(n,IK);if(m.dot(i,L)>=0)return n}let o=l(this.rayEllipsoid(e,t)),r=t.transformPositionToScaledSpace(i,IK),s=m.normalize(r,r),a=m.mostOrthogonalAxis(r,jU),c=m.normalize(m.cross(a,s,Zse),Zse),d=m.normalize(m.cross(s,c,Cse),Cse),u=kIe;u[0]=s.x,u[1]=s.y,u[2]=s.z,u[3]=c.x,u[4]=c.y,u[5]=c.z,u[6]=d.x,u[7]=d.y,u[8]=d.z;let h=q.transpose(u,UIe),p=q.fromScale(t.radii,DIe),b=q.fromScale(t.oneOverRadii,OIe),f=BIe;f[0]=0,f[1]=-i.z,f[2]=i.y,f[3]=i.z,f[4]=0,f[5]=-i.x,f[6]=-i.y,f[7]=i.x,f[8]=0;let y=q.multiply(q.multiply(h,b,Vse),f,Vse),_=q.multiply(q.multiply(y,p,Rse),u,Rse),S=q.multiplyByVector(y,n,MIe),A=jo.quadraticVectorExpression(_,m.negate(S,IK),0,0,1),Z,V,E=A.length;if(E>0){let L=m.clone(m.ZERO,zIe),v=Number.NEGATIVE_INFINITY;for(let X=0;X<E;++X){Z=q.multiplyByVector(p,q.multiplyByVector(u,A[X],Ese),Ese);let N=m.normalize(m.subtract(Z,n,jU),jU),g=m.dot(N,i);g>v&&(v=g,L=m.clone(Z,L))}let I=t.cartesianToCartographic(L,HIe);return v=W.clamp(v,0,1),V=m.magnitude(m.subtract(L,n,jU))*Math.sqrt(1-v*v),V=o?-V:V,I.height=V,t.cartographicToCartesian(I,new m)}};var KIe=new m;jo.lineSegmentPlane=function(e,t,n,i){l(i)||(i=new m);let o=m.subtract(t,e,KIe),r=n.normal,s=m.dot(r,o);if(Math.abs(s)<W.EPSILON6)return;let a=m.dot(r,e),c=-(n.distance+a)/s;if(!(c<0||c>1))return m.multiplyByScalar(o,c,i),m.add(e,i,i),i};jo.trianglePlaneIntersection=function(e,t,n,i){let o=i.normal,r=i.distance,s=m.dot(o,e)+r<0,a=m.dot(o,t)+r<0,c=m.dot(o,n)+r<0,d=0;d+=s?1:0,d+=a?1:0,d+=c?1:0;let u,h;if((d===1||d===2)&&(u=new m,h=new m),d===1){if(s)return jo.lineSegmentPlane(e,t,i,u),jo.lineSegmentPlane(e,n,i,h),{positions:[e,t,n,u,h],indices:[0,3,4,1,2,4,1,4,3]};if(a)return jo.lineSegmentPlane(t,n,i,u),jo.lineSegmentPlane(t,e,i,h),{positions:[e,t,n,u,h],indices:[1,3,4,2,0,4,2,4,3]};if(c)return jo.lineSegmentPlane(n,e,i,u),jo.lineSegmentPlane(n,t,i,h),{positions:[e,t,n,u,h],indices:[2,3,4,0,1,4,0,4,3]}}else if(d===2)if(s)if(a){if(!c)return jo.lineSegmentPlane(e,n,i,u),jo.lineSegmentPlane(t,n,i,h),{positions:[e,t,n,u,h],indices:[0,1,4,0,4,3,2,3,4]}}else return jo.lineSegmentPlane(n,t,i,u),jo.lineSegmentPlane(e,t,i,h),{positions:[e,t,n,u,h],indices:[2,0,4,2,4,3,1,3,4]};else return jo.lineSegmentPlane(t,e,i,u),jo.lineSegmentPlane(n,e,i,h),{positions:[e,t,n,u,h],indices:[1,2,4,1,4,3,0,3,4]}};var ai=jo;var _Ot=x(T(),1);function Va(e,t){this.normal=m.clone(e),this.distance=t}Va.fromPointNormal=function(e,t,n){let i=-m.dot(t,e);return l(n)?(m.clone(t,n.normal),n.distance=i,n):new Va(t,i)};var JIe=new m;Va.fromCartesian4=function(e,t){let n=m.fromCartesian4(e,JIe),i=e.w;return l(t)?(m.clone(n,t.normal),t.distance=i,t):new Va(n,i)};Va.getPointDistance=function(e,t){return m.dot(e.normal,t)+e.distance};var jIe=new m;Va.projectPointOntoPlane=function(e,t,n){l(n)||(n=new m);let i=Va.getPointDistance(e,t),o=m.multiplyByScalar(e.normal,i,jIe);return m.subtract(t,o,n)};var QIe=new F,qIe=new se,$Ie=new m;Va.transform=function(e,t,n){let i=e.normal,o=e.distance,r=F.inverseTranspose(t,QIe),s=se.fromElements(i.x,i.y,i.z,o,qIe);s=F.multiplyByVector(r,s,s);let a=m.fromCartesian4(s,$Ie);return s=se.divideByScalar(s,m.magnitude(a),s),Va.fromCartesian4(s,n)};Va.clone=function(e,t){return l(t)?(m.clone(e.normal,t.normal),t.distance=e.distance,t):new Va(e.normal,e.distance)};Va.equals=function(e,t){return e.distance===t.distance&&m.equals(e.normal,t.normal)};Va.ORIGIN_XY_PLANE=Object.freeze(new Va(m.UNIT_Z,0));Va.ORIGIN_YZ_PLANE=Object.freeze(new Va(m.UNIT_X,0));Va.ORIGIN_ZX_PLANE=Object.freeze(new Va(m.UNIT_Y,0));var nn=Va;var COt=x(T(),1);var PK={};PK.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)};PK.tipsify=function(e){e=e??B.EMPTY_OBJECT;let t=e.indices,n=e.maximumIndex,i=e.cacheSize??24,o;function r(g,C,R,G){for(;C.length>=1;){let P=C[C.length-1];if(C.splice(C.length-1,1),g[P].numLiveTriangles>0)return P}for(;o<G;){if(g[o].numLiveTriangles>0)return++o,o-1;++o}return-1}function s(g,C,R,G,P,Y,O){let k=-1,D,w=-1,z=0;for(;z<R.length;){let J=R[z];G[J].numLiveTriangles&&(D=0,P-G[J].timeStamp+2*G[J].numLiveTriangles<=C&&(D=P-G[J].timeStamp),(D>w||w===-1)&&(w=D,k=J)),++z}return k===-1?r(G,Y,g,O):k}let a=t.length,c=0,d=0,u=t[d],h=a;if(l(n))c=n+1;else{for(;d<h;)u>c&&(c=u),++d,u=t[d];if(c===-1)return 0;++c}let p=[],b;for(b=0;b<c;b++)p[b]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};d=0;let f=0;for(;d<h;)p[t[d]].vertexTriangles.push(f),++p[t[d]].numLiveTriangles,p[t[d+1]].vertexTriangles.push(f),++p[t[d+1]].numLiveTriangles,p[t[d+2]].vertexTriangles.push(f),++p[t[d+2]].numLiveTriangles,++f,d+=3;let y=0,_=i+1;o=1;let S=[],A=[],Z,V,E=0,L=[],v=a/3,I=[];for(b=0;b<v;b++)I[b]=!1;let X,N;for(;y!==-1;){S=[],V=p[y],N=V.vertexTriangles.length;for(let g=0;g<N;++g)if(f=V.vertexTriangles[g],!I[f]){I[f]=!0,d=f+f+f;for(let C=0;C<3;++C)X=t[d],S.push(X),A.push(X),L[E]=X,++E,Z=p[X],--Z.numLiveTriangles,_-Z.timeStamp>i&&(Z.timeStamp=_,++_),++d}y=s(t,i,S,p,_,A,c)}return L};var eE=PK;var Al={};function i5(e,t,n,i,o){e[t++]=n,e[t++]=i,e[t++]=i,e[t++]=o,e[t++]=o,e[t]=n}function ePe(e){let t=e.length,n=t/3*6,i=Me.createTypedArray(t,n),o=0;for(let r=0;r<t;r+=3,o+=6)i5(i,o,e[r],e[r+1],e[r+2]);return i}function tPe(e){let t=e.length;if(t>=3){let n=(t-2)*6,i=Me.createTypedArray(t,n);i5(i,0,e[0],e[1],e[2]);let o=6;for(let r=3;r<t;++r,o+=6)i5(i,o,e[r-1],e[r],e[r-2]);return i}return new Uint16Array}function nPe(e){if(e.length>0){let t=e.length-1,n=(t-1)*6,i=Me.createTypedArray(t,n),o=e[0],r=0;for(let s=1;s<t;++s,r+=6)i5(i,r,o,e[s],e[s+1]);return i}return new Uint16Array}Al.toWireframe=function(e){let t=e.indices;if(l(t)){switch(e.primitiveType){case ve.TRIANGLES:e.indices=ePe(t);break;case ve.TRIANGLE_STRIP:e.indices=tPe(t);break;case ve.TRIANGLE_FAN:e.indices=nPe(t);break}e.primitiveType=ve.LINES}return e};Al.createLineSegmentsForVectors=function(e,t,n){t=t??"normal",n=n??1e4;let i=e.attributes.position.values,o=e.attributes[t].values,r=i.length,s=new Float64Array(2*r),a=0;for(let u=0;u<r;u+=3)s[a++]=i[u],s[a++]=i[u+1],s[a++]=i[u+2],s[a++]=i[u]+o[u]*n,s[a++]=i[u+1]+o[u+1]*n,s[a++]=i[u+2]+o[u+2]*n;let c,d=e.boundingSphere;return l(d)&&(c=new de(d.center,d.radius+n)),new ft({attributes:{position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})},primitiveType:ve.LINES,boundingSphere:c})};Al.createAttributeLocations=function(e){let t=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=e.attributes,i={},o=0,r,s=t.length;for(r=0;r<s;++r){let a=t[r];l(n[a])&&(i[a]=o++)}for(let a in n)n.hasOwnProperty(a)&&!l(i[a])&&(i[a]=o++);return i};Al.reorderForPreVertexCache=function(e){let t=ft.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=Me.createTypedArray(t,r),a=0,c=0,d=0,u;for(;a<r;)u=i[o[a]],u!==-1?s[c]=u:(u=o[a],i[u]=d,s[c]=d,++d),++a,++c;e.indices=s;let h=e.attributes;for(let p in h)if(h.hasOwnProperty(p)&&l(h[p])&&l(h[p].values)){let b=h[p],f=b.values,y=0,_=b.componentsPerAttribute,S=K.createTypedArray(b.componentDatatype,d*_);for(;y<t;){let A=i[y];if(A!==-1)for(let Z=0;Z<_;Z++)S[_*A+Z]=f[_*y+Z];++y}b.values=S}}return e};Al.reorderForPostVertexCache=function(e,t){let n=e.indices;if(e.primitiveType===ve.TRIANGLES&&l(n)){let i=n.length,o=0;for(let r=0;r<i;r++)n[r]>o&&(o=n[r]);e.indices=eE.tipsify({indices:n,maximumIndex:o,cacheSize:t})}return e};function Wse(e){let t={};for(let n in e)if(e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)){let i=e[n];t[n]=new Ie({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return t}function iPe(e,t,n){for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];for(let r=0;r<o.componentsPerAttribute;++r)e[i].values.push(o.values[n*o.componentsPerAttribute+r])}}Al.fitToUnsignedShortIndices=function(e){let t=[],n=ft.computeNumberOfVertices(e);if(l(e.indices)&&n>=W.SIXTY_FOUR_KILOBYTES){let i=[],o=[],r=0,s=Wse(e.attributes),a=e.indices,c=a.length,d;e.primitiveType===ve.TRIANGLES?d=3:e.primitiveType===ve.LINES?d=2:e.primitiveType===ve.POINTS&&(d=1);for(let u=0;u<c;u+=d){for(let h=0;h<d;++h){let p=a[u+h],b=i[p];l(b)||(b=r++,i[p]=b,iPe(s,e.attributes,p)),o.push(b)}r+d>=W.SIXTY_FOUR_KILOBYTES&&(t.push(new ft({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),i=[],o=[],r=0,s=Wse(e.attributes))}o.length!==0&&t.push(new ft({attributes:s,indices:o,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var vse=new m,oPe=new pe;Al.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 h=m.fromArray(a,u,vse),p=s.cartesianToCartographic(h,oPe),b=o.project(p,vse);c[d++]=b.x,c[d++]=b.y,c[d++]=b.z}return e.attributes[n]=r,e.attributes[i]=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c}),delete e.attributes[t],e};var XK={high:0,low:0};Al.encodeAttribute=function(e,t,n,i){let o=e.attributes[t],r=o.values,s=r.length,a=new Float32Array(s),c=new Float32Array(s);for(let u=0;u<s;++u)Tn.encode(r[u],XK),a[u]=XK.high,c[u]=XK.low;let d=o.componentsPerAttribute;return e.attributes[n]=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:d,values:a}),e.attributes[i]=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:d,values:c}),delete e.attributes[t],e};var Gh=new m;function NK(e,t){if(l(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)m.unpack(n,o,Gh),F.multiplyByPoint(e,Gh,Gh),m.pack(Gh,n,o)}}function YK(e,t){if(l(t)){let n=t.values,i=n.length;for(let o=0;o<i;o+=3)m.unpack(n,o,Gh),q.multiplyByVector(e,Gh,Gh),Gh=m.normalize(Gh,Gh),m.pack(Gh,n,o)}}var QU=new F,qU=new q;Al.transformToWorldCoordinates=function(e){let t=e.modelMatrix;if(F.equals(t,F.IDENTITY))return e;let n=e.geometry.attributes;NK(t,n.position),NK(t,n.prevPosition),NK(t,n.nextPosition),(l(n.normal)||l(n.tangent)||l(n.bitangent))&&(F.inverse(t,QU),F.transpose(QU,QU),F.getMatrix3(QU,qU),YK(qU,n.normal),YK(qU,n.tangent),YK(qU,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 rPe(e,t){let n=e.length,i={},o=e[0][t].attributes,r;for(r in o)if(o.hasOwnProperty(r)&&l(o[r])&&l(o[r].values)){let s=o[r],a=s.values.length,c=!0;for(let d=1;d<n;++d){let u=e[d][t].attributes[r];if(!l(u)||s.componentDatatype!==u.componentDatatype||s.componentsPerAttribute!==u.componentsPerAttribute||s.normalize!==u.normalize){c=!1;break}a+=u.values.length}c&&(i[r]=new Ie({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:K.createTypedArray(s.componentDatatype,a)}))}return i}var sPe=new m;function wK(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=rPe(e,t),h,p,b;for(i in u)if(u.hasOwnProperty(i))for(h=u[i].values,s=0,o=0;o<n;++o)for(p=e[o][t].attributes[i].values,b=p.length,r=0;r<b;++r)h[s++]=p[r];let f;if(c){let A=0;for(o=0;o<n;++o)A+=e[o][t].indices.length;let Z=ft.computeNumberOfVertices(new ft({attributes:u,primitiveType:ve.POINTS})),V=Me.createTypedArray(Z,A),E=0,L=0;for(o=0;o<n;++o){let v=e[o][t].indices,I=v.length;for(s=0;s<I;++s)V[E++]=L+v[s];L+=ft.computeNumberOfVertices(e[o][t])}f=V}let y=new m,_=0,S;for(o=0;o<n;++o){if(S=e[o][t].boundingSphere,!l(S)){y=void 0;break}m.add(S.center,y,y)}if(l(y))for(m.divideByScalar(y,n,y),o=0;o<n;++o){S=e[o][t].boundingSphere;let A=m.magnitude(m.subtract(S.center,y,sPe))+S.radius;A>_&&(_=A)}return new ft({attributes:u,indices:f,primitiveType:d,boundingSphere:l(y)?new de(y,_):void 0})}Al.combineInstances=function(e){let t=[],n=[],i=e.length;for(let r=0;r<i;++r){let s=e[r];l(s.geometry)?t.push(s):l(s.westHemisphereGeometry)&&l(s.eastHemisphereGeometry)&&n.push(s)}let o=[];return t.length>0&&o.push(wK(t,"geometry")),n.length>0&&(o.push(wK(n,"westHemisphereGeometry")),o.push(wK(n,"eastHemisphereGeometry"))),o};var lm=new m,tE=new m,mZ=new m,hZ=new m;Al.computeNormal=function(e){let t=e.indices,n=e.attributes,i=n.position.values,o=n.position.values.length/3,r=t.length,s=new Array(o),a=new Array(r/3),c=new Array(r),d;for(d=0;d<o;d++)s[d]={indexOffset:0,count:0,currentCount:0};let u=0;for(d=0;d<r;d+=3){let f=t[d],y=t[d+1],_=t[d+2],S=f*3,A=y*3,Z=_*3;tE.x=i[S],tE.y=i[S+1],tE.z=i[S+2],mZ.x=i[A],mZ.y=i[A+1],mZ.z=i[A+2],hZ.x=i[Z],hZ.y=i[Z+1],hZ.z=i[Z+2],s[f].count++,s[y].count++,s[_].count++,m.subtract(mZ,tE,mZ),m.subtract(hZ,tE,hZ),a[u]=m.cross(mZ,hZ,new m),u++}let h=0;for(d=0;d<o;d++)s[d].indexOffset+=h,h+=s[d].count;u=0;let p;for(d=0;d<r;d+=3){p=s[t[d]];let f=p.indexOffset+p.currentCount;c[f]=u,p.currentCount++,p=s[t[d+1]],f=p.indexOffset+p.currentCount,c[f]=u,p.currentCount++,p=s[t[d+2]],f=p.indexOffset+p.currentCount,c[f]=u,p.currentCount++,u++}let b=new Float32Array(o*3);for(d=0;d<o;d++){let f=d*3;if(p=s[d],m.clone(m.ZERO,lm),p.count>0){for(u=0;u<p.count;u++)m.add(lm,a[c[p.indexOffset+u]],lm);m.equalsEpsilon(m.ZERO,lm,W.EPSILON10)&&m.clone(a[c[p.indexOffset]],lm)}m.equalsEpsilon(m.ZERO,lm,W.EPSILON10)&&(lm.z=1),m.normalize(lm,lm),b[f]=lm.x,b[f+1]=lm.y,b[f+2]=lm.z}return e.attributes.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b}),e};var aPe=new m,Fse=new m,cPe=new m;Al.computeTangentAndBitangent=function(e){let t=e.attributes,n=e.indices,i=e.attributes.position.values,o=e.attributes.normal.values,r=e.attributes.st.values,s=e.attributes.position.values.length/3,a=n.length,c=new Array(s*3),d;for(d=0;d<c.length;d++)c[d]=0;let u,h,p;for(d=0;d<a;d+=3){let y=n[d],_=n[d+1],S=n[d+2];u=y*3,h=_*3,p=S*3;let A=y*2,Z=_*2,V=S*2,E=i[u],L=i[u+1],v=i[u+2],I=r[A],X=r[A+1],N=r[Z+1]-X,g=r[V+1]-X,C=1/((r[Z]-I)*g-(r[V]-I)*N),R=(g*(i[h]-E)-N*(i[p]-E))*C,G=(g*(i[h+1]-L)-N*(i[p+1]-L))*C,P=(g*(i[h+2]-v)-N*(i[p+2]-v))*C;c[u]+=R,c[u+1]+=G,c[u+2]+=P,c[h]+=R,c[h+1]+=G,c[h+2]+=P,c[p]+=R,c[p+1]+=G,c[p+2]+=P}let b=new Float32Array(s*3),f=new Float32Array(s*3);for(d=0;d<s;d++){u=d*3,h=u+1,p=u+2;let y=m.fromArray(o,u,aPe),_=m.fromArray(c,u,cPe),S=m.dot(y,_);m.multiplyByScalar(y,S,Fse),m.normalize(m.subtract(_,Fse,_),_),b[u]=_.x,b[h]=_.y,b[p]=_.z,m.normalize(m.cross(y,_,_),_),f[u]=_.x,f[h]=_.y,f[p]=_.z}return e.attributes.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b}),e.attributes.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:f}),e};var nE=new M,Eh=new m,Ise=new m,Pse=new m,$U=new M;Al.compressVertices=function(e){let t=e.attributes.extrudeDirection,n,i;if(l(t)){let L=t.values;i=L.length/3;let v=new Float32Array(i*2),I=0;for(n=0;n<i;++n){if(m.fromArray(L,n*3,Eh),m.equals(Eh,m.ZERO)){I+=2;continue}$U=cn.octEncodeInRange(Eh,65535,$U),v[I++]=$U.x,v[I++]=$U.y}return e.attributes.compressedAttributes=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:v}),delete e.attributes.extrudeDirection,e}let o=e.attributes.normal,r=e.attributes.st,s=l(o),a=l(r);if(!s&&!a)return e;let c=e.attributes.tangent,d=e.attributes.bitangent,u=l(c),h=l(d),p,b,f,y;s&&(p=o.values),a&&(b=r.values),u&&(f=c.values),h&&(y=d.values),i=(s?p.length:b.length)/(s?3:2);let A=i,Z=a&&s?2:1;Z+=u||h?1:0,A*=Z;let V=new Float32Array(A),E=0;for(n=0;n<i;++n){a&&(M.fromArray(b,n*2,nE),V[E++]=cn.compressTextureCoordinates(nE));let L=n*3;s&&l(f)&&l(y)?(m.fromArray(p,L,Eh),m.fromArray(f,L,Ise),m.fromArray(y,L,Pse),cn.octPack(Eh,Ise,Pse,nE),V[E++]=nE.x,V[E++]=nE.y):(s&&(m.fromArray(p,L,Eh),V[E++]=cn.octEncodeFloat(Eh)),u&&(m.fromArray(f,L,Eh),V[E++]=cn.octEncodeFloat(Eh)),h&&(m.fromArray(y,L,Eh),V[E++]=cn.octEncodeFloat(Eh)))}return e.attributes.compressedAttributes=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:Z,values:V}),s&&delete e.attributes.normal,a&&delete e.attributes.st,h&&delete e.attributes.bitangent,u&&delete e.attributes.tangent,e};function lPe(e){if(l(e.indices))return e;let t=ft.computeNumberOfVertices(e),n=Me.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function dPe(e){let t=ft.computeNumberOfVertices(e),n=Me.createTypedArray(t,(t-2)*3);n[0]=1,n[1]=0,n[2]=2;let i=3;for(let o=3;o<t;++o)n[i++]=o-1,n[i++]=0,n[i++]=o;return e.indices=n,e.primitiveType=ve.TRIANGLES,e}function uPe(e){let t=ft.computeNumberOfVertices(e),n=Me.createTypedArray(t,(t-2)*3);n[0]=0,n[1]=1,n[2]=2,t>3&&(n[3]=0,n[4]=2,n[5]=3);let i=6;for(let o=3;o<t-1;o+=2)n[i++]=o,n[i++]=o-1,n[i++]=o+1,o+2<t&&(n[i++]=o,n[i++]=o+1,n[i++]=o+2);return e.indices=n,e.primitiveType=ve.TRIANGLES,e}function mPe(e){if(l(e.indices))return e;let t=ft.computeNumberOfVertices(e),n=Me.createTypedArray(t,t);for(let i=0;i<t;++i)n[i]=i;return e.indices=n,e}function hPe(e){let t=ft.computeNumberOfVertices(e),n=Me.createTypedArray(t,(t-1)*2);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return e.indices=n,e.primitiveType=ve.LINES,e}function fPe(e){let t=ft.computeNumberOfVertices(e),n=Me.createTypedArray(t,t*2);n[0]=0,n[1]=1;let i=2;for(let o=2;o<t;++o)n[i++]=o-1,n[i++]=o;return n[i++]=t-1,n[i]=0,e.indices=n,e.primitiveType=ve.LINES,e}function pPe(e){switch(e.primitiveType){case ve.TRIANGLE_FAN:return dPe(e);case ve.TRIANGLE_STRIP:return uPe(e);case ve.TRIANGLES:return lPe(e);case ve.LINE_STRIP:return hPe(e);case ve.LINE_LOOP:return fPe(e);case ve.LINES:return mPe(e)}return e}function Qg(e,t){Math.abs(e.y)<W.EPSILON6&&(t?e.y=-W.EPSILON6:e.y=W.EPSILON6)}function bPe(e,t,n){if(e.y!==0&&t.y!==0&&n.y!==0){Qg(e,e.y<0),Qg(t,t.y<0),Qg(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;Qg(e,a),Qg(t,a),Qg(n,a)}var Xse=new m;function dm(e,t,n,i){m.add(e,m.multiplyByScalar(m.subtract(t,e,Xse),e.y/(e.y-t.y),Xse),n),m.clone(n,i),Qg(n,!0),Qg(i,!1)}var TT=new m,_T=new m,ST=new m,AT=new m,MK={positions:new Array(7),indices:new Array(9)};function gPe(e,t,n){if(e.x>=0||t.x>=0||n.x>=0)return;bPe(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=MK.indices;s===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,i?(dm(e,t,TT,ST),dm(e,n,_T,AT),a[0]=0,a[3]=1,a[4]=2,a[6]=1):o?(dm(t,n,TT,ST),dm(t,e,_T,AT),a[0]=1,a[3]=2,a[4]=0,a[6]=2):r&&(dm(n,e,TT,ST),dm(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||(dm(n,e,TT,ST),dm(n,t,_T,AT),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(dm(t,n,TT,ST),dm(t,e,_T,AT),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(dm(e,t,TT,ST),dm(e,n,_T,AT),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let c=MK.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),MK}function Nse(e,t){let n=e.attributes;if(n.position.values.length===0)return;for(let o in n)if(n.hasOwnProperty(o)&&l(n[o])&&l(n[o].values)){let r=n[o];r.values=K.createTypedArray(r.componentDatatype,r.values)}let i=ft.computeNumberOfVertices(e);return e.indices=Me.createTypedArray(i,e.indices),t&&(e.boundingSphere=de.fromVertices(n.position.values)),e}function pZ(e){let t=e.attributes,n={};for(let i in t)if(t.hasOwnProperty(i)&&l(t[i])&&l(t[i].values)){let o=t[i];n[i]=new Ie({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:[]})}return new ft({attributes:n,indices:[],primitiveType:e.primitiveType})}function OK(e,t,n){let i=l(e.geometry.boundingSphere);t=Nse(t,i),n=Nse(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 BK(e,t){let n=new e,i=new e,o=new e;return function(r,s,a,c,d,u,h,p){let b=e.fromArray(d,r*t,n),f=e.fromArray(d,s*t,i),y=e.fromArray(d,a*t,o);e.multiplyByScalar(b,c.x,b),e.multiplyByScalar(f,c.y,f),e.multiplyByScalar(y,c.z,y);let _=e.add(b,f,b);e.add(_,y,_),p&&e.normalize(_,_),e.pack(_,u,h*t)}}var yPe=BK(se,4),n5=BK(m,3),Dse=BK(M,2),xPe=function(e,t,n,i,o,r,s){let a=o[e]*i.x,c=o[t]*i.y,d=o[n]*i.z;r[s]=a+c+d>W.EPSILON6?1:0},iE=new m,kK=new m,UK=new m,TPe=new m;function e5(e,t,n,i,o,r,s,a,c,d,u,h,p,b,f,y){if(!l(r)&&!l(s)&&!l(a)&&!l(c)&&!l(d)&&b===0)return;let _=m.fromArray(o,e*3,iE),S=m.fromArray(o,t*3,kK),A=m.fromArray(o,n*3,UK),Z=gT(i,_,S,A,TPe);if(l(Z)){if(l(r)&&n5(e,t,n,Z,r,h.normal.values,y,!0),l(d)){let V=m.fromArray(d,e*3,iE),E=m.fromArray(d,t*3,kK),L=m.fromArray(d,n*3,UK);m.multiplyByScalar(V,Z.x,V),m.multiplyByScalar(E,Z.y,E),m.multiplyByScalar(L,Z.z,L);let v;!m.equals(V,m.ZERO)||!m.equals(E,m.ZERO)||!m.equals(L,m.ZERO)?(v=m.add(V,E,V),m.add(v,L,v),m.normalize(v,v)):(v=iE,v.x=0,v.y=0,v.z=0),m.pack(v,h.extrudeDirection.values,y*3)}if(l(u)&&xPe(e,t,n,Z,u,h.applyOffset.values,y),l(s)&&n5(e,t,n,Z,s,h.tangent.values,y,!0),l(a)&&n5(e,t,n,Z,a,h.bitangent.values,y,!0),l(c)&&Dse(e,t,n,Z,c,h.st.values,y),b>0)for(let V=0;V<b;V++){let E=p[V];_Pe(e,t,n,Z,y,f[E],h[E])}}}function _Pe(e,t,n,i,o,r,s){let a=r.componentsPerAttribute,c=r.values,d=s.values;switch(a){case 4:yPe(e,t,n,i,c,d,o,!1);break;case 3:n5(e,t,n,i,c,d,o,!1);break;case 2:Dse(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 dp(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 SPe={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function Yse(e){let t=e.geometry,n=t.attributes,i=n.position.values,o=l(n.normal)?n.normal.values:void 0,r=l(n.bitangent)?n.bitangent.values:void 0,s=l(n.tangent)?n.tangent.values:void 0,a=l(n.st)?n.st.values:void 0,c=l(n.extrudeDirection)?n.extrudeDirection.values:void 0,d=l(n.applyOffset)?n.applyOffset.values:void 0,u=t.indices,h=[];for(let v in n)n.hasOwnProperty(v)&&!SPe[v]&&l(n[v])&&h.push(v);let p=h.length,b=pZ(t),f=pZ(t),y,_,S,A,Z,V=[];V.length=i.length/3;let E=[];for(E.length=i.length/3,Z=0;Z<V.length;++Z)V[Z]=-1,E[Z]=-1;let L=u.length;for(Z=0;Z<L;Z+=3){let v=u[Z],I=u[Z+1],X=u[Z+2],N=m.fromArray(i,v*3),g=m.fromArray(i,I*3),C=m.fromArray(i,X*3),R=gPe(N,g,C);if(l(R)&&R.positions.length>3){let G=R.positions,P=R.indices,Y=P.length;for(let O=0;O<Y;++O){let k=P[O],D=G[k];D.y<0?(y=f.attributes,_=f.indices,S=V):(y=b.attributes,_=b.indices,S=E),A=dp(y,_,S,u,k<3?Z+k:-1,D),e5(v,I,X,D,i,o,s,r,a,c,d,y,h,p,n,A)}}else l(R)&&(N=R.positions[0],g=R.positions[1],C=R.positions[2]),N.y<0?(y=f.attributes,_=f.indices,S=V):(y=b.attributes,_=b.indices,S=E),A=dp(y,_,S,u,Z,N),e5(v,I,X,N,i,o,s,r,a,c,d,y,h,p,n,A),A=dp(y,_,S,u,Z+1,g),e5(v,I,X,g,i,o,s,r,a,c,d,y,h,p,n,A),A=dp(y,_,S,u,Z+2,C),e5(v,I,X,C,i,o,s,r,a,c,d,y,h,p,n,A)}OK(e,f,b)}var Ose=nn.fromPointNormal(m.ZERO,m.UNIT_Y),APe=new m,ZPe=new m;function fZ(e,t,n,i,o,r,s){if(!l(s))return;let a=m.fromArray(i,e*3,iE);m.equalsEpsilon(a,n,W.EPSILON10)?r.applyOffset.values[o]=s[e]:r.applyOffset.values[o]=s[t]}function wse(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=pZ(t),a=pZ(t),c,d=r.length,u=[];u.length=i.length/3;let h=[];for(h.length=i.length/3,c=0;c<u.length;++c)u[c]=-1,h[c]=-1;for(c=0;c<d;c+=2){let p=r[c],b=r[c+1],f=m.fromArray(i,p*3,iE),y=m.fromArray(i,b*3,kK),_;Math.abs(f.y)<W.EPSILON6&&(f.y<0?f.y=-W.EPSILON6:f.y=W.EPSILON6),Math.abs(y.y)<W.EPSILON6&&(y.y<0?y.y=-W.EPSILON6:y.y=W.EPSILON6);let S=s.attributes,A=s.indices,Z=h,V=a.attributes,E=a.indices,L=u,v=ai.lineSegmentPlane(f,y,Ose,UK);if(l(v)){let I=m.multiplyByScalar(m.UNIT_Y,5*W.EPSILON9,APe);f.y<0&&(m.negate(I,I),S=a.attributes,A=a.indices,Z=u,V=s.attributes,E=s.indices,L=h);let X=m.add(v,I,ZPe);_=dp(S,A,Z,r,c,f),fZ(p,b,f,i,_,S,o),_=dp(S,A,Z,r,-1,X),fZ(p,b,X,i,_,S,o),m.negate(I,I),m.add(v,I,X),_=dp(V,E,L,r,-1,X),fZ(p,b,X,i,_,V,o),_=dp(V,E,L,r,c+1,y),fZ(p,b,y,i,_,V,o)}else{let I,X,N;f.y<0?(I=a.attributes,X=a.indices,N=u):(I=s.attributes,X=s.indices,N=h),_=dp(I,X,N,r,c,f),fZ(p,b,f,i,_,I,o),_=dp(I,X,N,r,c+1,y),fZ(p,b,y,i,_,I,o)}}OK(e,a,s)}var Mse=new M,CPe=new M,Bse=new m,zse=new m,DK=new m,VPe=new m,RPe=new m,EPe=new m,kse=new se;function Use(e){let t=e.attributes,n=t.position.values,i=t.prevPosition.values,o=t.nextPosition.values,r=n.length;for(let s=0;s<r;s+=3){let a=m.unpack(n,s,Bse);if(a.x>0)continue;let c=m.unpack(i,s,zse);(a.y<0&&c.y>0||a.y>0&&c.y<0)&&(s-3>0?(i[s]=n[s-3],i[s+1]=n[s-2],i[s+2]=n[s-1]):m.pack(a,i,s));let d=m.unpack(o,s,DK);(a.y<0&&d.y>0||a.y>0&&d.y<0)&&(s+3<r?(o[s]=n[s+3],o[s+1]=n[s+4],o[s+2]=n[s+5]):m.pack(a,o,s))}}var GPe=5*W.EPSILON9,t5=W.EPSILON6;function LPe(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=pZ(t),u=pZ(t),h,p,b,f=!1,y=i.length/3;for(h=0;h<y;h+=4){let _=h,S=h+2,A=m.fromArray(i,_*3,Bse),Z=m.fromArray(i,S*3,zse);if(Math.abs(A.y)<t5)for(A.y=t5*(Z.y<0?-1:1),i[h*3+1]=A.y,i[(h+1)*3+1]=A.y,p=_*3;p<_*3+12;p+=3)o[p]=i[h*3],o[p+1]=i[h*3+1],o[p+2]=i[h*3+2];if(Math.abs(Z.y)<t5)for(Z.y=t5*(A.y<0?-1:1),i[(h+2)*3+1]=Z.y,i[(h+3)*3+1]=Z.y,p=_*3;p<_*3+12;p+=3)r[p]=i[(h+2)*3],r[p+1]=i[(h+2)*3+1],r[p+2]=i[(h+2)*3+2];let V=d.attributes,E=d.indices,L=u.attributes,v=u.indices,I=ai.lineSegmentPlane(A,Z,Ose,VPe);if(l(I)){f=!0;let X=m.multiplyByScalar(m.UNIT_Y,GPe,RPe);A.y<0&&(m.negate(X,X),V=u.attributes,E=u.indices,L=d.attributes,v=d.indices);let N=m.add(I,X,EPe);V.position.values.push(A.x,A.y,A.z,A.x,A.y,A.z),V.position.values.push(N.x,N.y,N.z),V.position.values.push(N.x,N.y,N.z),V.prevPosition.values.push(o[_*3],o[_*3+1],o[_*3+2]),V.prevPosition.values.push(o[_*3+3],o[_*3+4],o[_*3+5]),V.prevPosition.values.push(A.x,A.y,A.z,A.x,A.y,A.z),V.nextPosition.values.push(N.x,N.y,N.z),V.nextPosition.values.push(N.x,N.y,N.z),V.nextPosition.values.push(N.x,N.y,N.z),V.nextPosition.values.push(N.x,N.y,N.z),m.negate(X,X),m.add(I,X,N),L.position.values.push(N.x,N.y,N.z),L.position.values.push(N.x,N.y,N.z),L.position.values.push(Z.x,Z.y,Z.z,Z.x,Z.y,Z.z),L.prevPosition.values.push(N.x,N.y,N.z),L.prevPosition.values.push(N.x,N.y,N.z),L.prevPosition.values.push(N.x,N.y,N.z),L.prevPosition.values.push(N.x,N.y,N.z),L.nextPosition.values.push(Z.x,Z.y,Z.z,Z.x,Z.y,Z.z),L.nextPosition.values.push(r[S*3],r[S*3+1],r[S*3+2]),L.nextPosition.values.push(r[S*3+3],r[S*3+4],r[S*3+5]);let g=M.fromArray(s,_*2,Mse),C=Math.abs(g.y);V.expandAndWidth.values.push(-1,C,1,C),V.expandAndWidth.values.push(-1,-C,1,-C),L.expandAndWidth.values.push(-1,C,1,C),L.expandAndWidth.values.push(-1,-C,1,-C);let R=m.magnitudeSquared(m.subtract(I,A,DK));if(R/=m.magnitudeSquared(m.subtract(Z,A,DK)),l(c)){let G=se.fromArray(c,_*4,kse),P=se.fromArray(c,S*4,kse),Y=W.lerp(G.x,P.x,R),O=W.lerp(G.y,P.y,R),k=W.lerp(G.z,P.z,R),D=W.lerp(G.w,P.w,R);for(p=_*4;p<_*4+8;++p)V.color.values.push(c[p]);for(V.color.values.push(Y,O,k,D),V.color.values.push(Y,O,k,D),L.color.values.push(Y,O,k,D),L.color.values.push(Y,O,k,D),p=S*4;p<S*4+8;++p)L.color.values.push(c[p])}if(l(a)){let G=M.fromArray(a,_*2,Mse),P=M.fromArray(a,(h+3)*2,CPe),Y=W.lerp(G.x,P.x,R);for(p=_*2;p<_*2+4;++p)V.st.values.push(a[p]);for(V.st.values.push(Y,G.y),V.st.values.push(Y,P.y),L.st.values.push(Y,G.y),L.st.values.push(Y,P.y),p=S*2;p<S*2+4;++p)L.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=L.position.values.length/3-4,v.push(b,b+2,b+1),v.push(b+1,b+2,b+3)}else{let X,N;for(A.y<0?(X=u.attributes,N=u.indices):(X=d.attributes,N=d.indices),X.position.values.push(A.x,A.y,A.z),X.position.values.push(A.x,A.y,A.z),X.position.values.push(Z.x,Z.y,Z.z),X.position.values.push(Z.x,Z.y,Z.z),p=h*3;p<h*3+12;++p)X.prevPosition.values.push(o[p]),X.nextPosition.values.push(r[p]);for(p=h*2;p<h*2+8;++p)X.expandAndWidth.values.push(s[p]),l(a)&&X.st.values.push(a[p]);if(l(c))for(p=h*4;p<h*4+16;++p)X.color.values.push(c[p]);b=X.position.values.length/3-4,N.push(b,b+2,b+1),N.push(b+1,b+2,b+3)}}f&&(Use(u),Use(d)),OK(e,u,d)}Al.splitLongitude=function(e){let t=e.geometry,n=t.boundingSphere;if(l(n)&&(n.center.x-n.radius>0||de.intersectPlane(n,nn.ORIGIN_ZX_PLANE)!==zt.INTERSECTING))return e;if(t.geometryType!==cm.NONE)switch(t.geometryType){case cm.POLYLINES:LPe(e);break;case cm.TRIANGLES:Yse(e);break;case cm.LINES:wse(e);break}else pPe(t),t.primitiveType===ve.TRIANGLES?Yse(e):t.primitiveType===ve.LINES&&wse(e);return e};var Un=Al;var tBt=x(T(),1);function oE(e,t,n,i,o,r,s,a,c,d,u){this._context=e,this._texture=t,this._textureTarget=n,this._targetFace=i,this._pixelDatatype=s,this._internalFormat=o,this._pixelFormat=r,this._size=a,this._preMultiplyAlpha=c,this._flipY=d,this._initialized=u}Object.defineProperties(oE.prototype,{pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},_target:{get:function(){return this._targetFace}}});oE.prototype.copyFrom=function(e){let{xOffset:t=0,yOffset:n=0,source:i,skipColorSpaceConversion:o=!1}=e,{width:r,height:s}=i,a=this._context._gl,c=this._textureTarget,d=this._targetFace;a.activeTexture(a.TEXTURE0),a.bindTexture(c,this._texture);let u=i.arrayBufferView,h=this._size,p=this._pixelFormat,b=this._internalFormat,f=this._pixelDatatype,y=this._preMultiplyAlpha,_=this._flipY,S=4;l(u)&&(S=Ke.alignmentInBytes(p,f,r)),a.pixelStorei(a.UNPACK_ALIGNMENT,S),o?a.pixelStorei(a.UNPACK_COLORSPACE_CONVERSION_WEBGL,a.NONE):a.pixelStorei(a.UNPACK_COLORSPACE_CONVERSION_WEBGL,a.BROWSER_DEFAULT_WEBGL);let A=!1;if(!this._initialized){let Z;t===0&&n===0&&r===h&&s===h?(l(u)?(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),_&&(u=Ke.flipY(u,p,f,h,h)),Z=u):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,_),Z=i),A=!0):(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),Z=Ke.createTypedArray(p,f,h,h)),a.texImage2D(d,0,b,h,h,0,p,Oe.toWebGLConstant(f,this._context),Z),this._initialized=!0}A||(l(u)?(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),_&&(u=Ke.flipY(u,p,f,r,s)),a.texSubImage2D(d,0,t,n,r,s,p,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)};oE.prototype.copyFromFramebuffer=function(e,t,n,i,o,r){e=e??0,t=t??0,n=n??0,i=i??0,o=o??this._size,r=r??this._size;let s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture),s.copyTexSubImage2D(this._targetFace,0,e,t,n,i,o,r),s.bindTexture(a,null),this._initialized=!0};oE.prototype.copyMipmapFromFramebuffer=function(e,t,n,i,o){e=e??0,t=t??0,n=n??this._size,i=i??this._size,o=o??0;let r=this._context._gl,s=this._textureTarget;r.activeTexture(r.TEXTURE0),r.bindTexture(s,this._texture),r.copyTexImage2D(this._targetFace,o,this._internalFormat,e,t,n,i,0),r.bindTexture(s,null),this._initialized=!0};var rE=oE;var oBt=x(T(),1);var sE={DONT_CARE:ne.DONT_CARE,FASTEST:ne.FASTEST,NICEST:ne.NICEST,validate:function(e){return e===sE.DONT_CARE||e===sE.FASTEST||e===sE.NICEST}};Object.freeze(sE);var um=sE;var TBt=x(T(),1);var aBt=x(T(),1);var aE={NEAREST:ne.NEAREST,LINEAR:ne.LINEAR};aE.validate=function(e){return e===aE.NEAREST||e===aE.LINEAR};Object.freeze(aE);var ni=aE;var dBt=x(T(),1);var Y0={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};Y0.validate=function(e){return e===Y0.NEAREST||e===Y0.LINEAR||e===Y0.NEAREST_MIPMAP_NEAREST||e===Y0.LINEAR_MIPMAP_NEAREST||e===Y0.NEAREST_MIPMAP_LINEAR||e===Y0.LINEAR_MIPMAP_LINEAR};Object.freeze(Y0);var kt=Y0;var hBt=x(T(),1);var cE={CLAMP_TO_EDGE:ne.CLAMP_TO_EDGE,REPEAT:ne.REPEAT,MIRRORED_REPEAT:ne.MIRRORED_REPEAT,validate:function(e){return e===cE.CLAMP_TO_EDGE||e===cE.REPEAT||e===cE.MIRRORED_REPEAT}};Object.freeze(cE);var un=cE;function lE(e){e=e??B.EMPTY_OBJECT;let{wrapR:t=un.CLAMP_TO_EDGE,wrapS:n=un.CLAMP_TO_EDGE,wrapT:i=un.CLAMP_TO_EDGE,minificationFilter:o=kt.LINEAR,magnificationFilter:r=ni.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(lE.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}}});lE.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};lE.NEAREST=Object.freeze(new lE({wrapR:un.CLAMP_TO_EDGE,wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:kt.NEAREST,magnificationFilter:ni.NEAREST}));var Ut=lE;var NBt=x(T(),1);var ABt=x(T(),1);function WPe(e,t){if(!e)throw new he(t)}var zK=WPe;function vPe(e,t,n,i){let o=l(t.vertexBuffer),r=l(t.value),s=t.value?t.value.length:t.componentsPerAttribute,a={index:t.index??n,enabled:t.enabled??!0,vertexBuffer:t.vertexBuffer,value:r?t.value.slice(0):void 0,componentsPerAttribute:s,componentDatatype:t.componentDatatype??K.FLOAT,normalize:t.normalize??!1,offsetInBytes:t.offsetInBytes??0,strideInBytes:t.strideInBytes??0,instanceDivisor:t.instanceDivisor??0};if(o)a.vertexAttrib=function(c){let d=this.index;c.bindBuffer(c.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),c.vertexAttribPointer(d,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),c.enableVertexAttribArray(d),this.instanceDivisor>0&&(i.glVertexAttribDivisor(d,this.instanceDivisor),i._vertexAttribDivisors[d]=this.instanceDivisor,i._previousDrawInstanced=!0)},a.disableVertexAttribArray=function(c){c.disableVertexAttribArray(this.index),this.instanceDivisor>0&&i.glVertexAttribDivisor(n,0)};else{switch(a.componentsPerAttribute){case 1:a.vertexAttrib=function(c){c.vertexAttrib1fv(this.index,this.value)};break;case 2:a.vertexAttrib=function(c){c.vertexAttrib2fv(this.index,this.value)};break;case 3:a.vertexAttrib=function(c){c.vertexAttrib3fv(this.index,this.value)};break;case 4:a.vertexAttrib=function(c){c.vertexAttrib4fv(this.index,this.value)};break}a.disableVertexAttribArray=function(c){}}e.push(a)}function Kse(e,t,n){for(let i=0;i<t.length;++i){let o=t[i];o.enabled&&o.vertexAttrib(e)}l(n)&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n._getBuffer())}function Lh(e){e=e??B.EMPTY_OBJECT;let t=e.context,n=t._gl,i=e.attributes,o=e.indexBuffer,r,s=[],a=1,c=!1,d=!1,u=i.length;for(r=0;r<u;++r)vPe(s,i[r],r,t);for(u=s.length,r=0;r<u;++r){let p=s[r];if(l(p.vertexBuffer)&&p.instanceDivisor===0){let b=p.strideInBytes||p.componentsPerAttribute*K.getSizeInBytes(p.componentDatatype);a=p.vertexBuffer.sizeInBytes/b;break}}for(r=0;r<u;++r)s[r].instanceDivisor>0&&(c=!0),l(s[r].value)&&(d=!0);let h;t.vertexArrayObject&&(h=t.glCreateVertexArray(),t.glBindVertexArray(h),Kse(n,s,o),t.glBindVertexArray(null)),this._numberOfVertices=a,this._hasInstancedAttributes=c,this._hasConstantAttributes=d,this._context=t,this._gl=n,this._vao=h,this._attributes=s,this._indexBuffer=o}function Hse(e){return e.values.length/e.componentsPerAttribute}function FPe(e){return K.getSizeInBytes(e.componentDatatype)*e.componentsPerAttribute}function IPe(e){let t,n,i,o=[];for(n in e)e.hasOwnProperty(n)&&l(e[n])&&l(e[n].values)&&(o.push(n),e[n].componentDatatype===K.DOUBLE&&(e[n].componentDatatype=K.FLOAT,e[n].values=K.createTypedArray(K.FLOAT,e[n].values)));let r,s=o.length;if(s>0)for(r=Hse(e[o[0]]),t=1;t<s;++t){let d=Hse(e[o[t]]);if(d!==r)throw new le(`Each attribute list must have the same number of vertices. Attribute ${o[t]} has a different number of vertices (${d.toString()}) than attribute ${o[0]} (${r.toString()}).`)}o.sort(function(d,u){return K.getSizeInBytes(e[u].componentDatatype)-K.getSizeInBytes(e[d].componentDatatype)});let a=0,c={};for(t=0;t<s;++t)n=o[t],i=e[n],c[n]=a,a+=FPe(i);if(a>0){let d=K.getSizeInBytes(e[o[0]].componentDatatype),u=a%d;u!==0&&(a+=d-u);let h=r*a,p=new ArrayBuffer(h),b={};for(t=0;t<s;++t){n=o[t];let f=K.getSizeInBytes(e[n].componentDatatype);b[n]={pointer:K.createTypedArray(e[n].componentDatatype,p),index:c[n]/f,strideInComponentType:a/f}}for(t=0;t<r;++t)for(let f=0;f<s;++f){n=o[f],i=e[n];let y=i.values,_=b[n],S=_.pointer,A=i.componentsPerAttribute;for(let Z=0;Z<A;++Z)S[_.index+Z]=y[t*A+Z];_.index+=_.strideInComponentType}return{buffer:p,offsetsInBytes:c,vertexSizeInBytes:a}}}Lh.fromGeometry=function(e){e=e??B.EMPTY_OBJECT;let t=e.context,n=e.geometry??B.EMPTY_OBJECT,i=e.bufferUsage??Fe.DYNAMIC_DRAW,o=e.attributeLocations??B.EMPTY_OBJECT,r=e.interleave??!1,s=e.vertexArrayAttributes,a,c,d,u=l(s)?s:[],h=n.attributes;if(r){let f=IPe(h);if(l(f)){d=qe.createVertexBuffer({context:t,typedArray:f.buffer,usage:i});let y=f.offsetsInBytes,_=f.vertexSizeInBytes;for(a in h)h.hasOwnProperty(a)&&l(h[a])&&(c=h[a],l(c.values)?u.push({index:o[a],vertexBuffer:d,componentDatatype:c.componentDatatype,componentsPerAttribute:c.componentsPerAttribute,normalize:c.normalize,offsetInBytes:y[a],strideInBytes:_}):u.push({index:o[a],value:c.value,componentDatatype:c.componentDatatype,normalize:c.normalize}))}}else for(a in h)if(h.hasOwnProperty(a)&&l(h[a])){c=h[a];let f=c.componentDatatype;f===K.DOUBLE&&(f=K.FLOAT);let y={};d=void 0,l(c.values)&&(d=qe.createVertexBuffer({context:t,typedArray:K.createTypedArray(f,c.values),usage:i}),y={index:o[a],vertexBuffer:d,value:c.value,componentDatatype:f,componentsPerAttribute:c.componentsPerAttribute,normalize:c.normalize}),l(c.typedArray)&&(d=qe.createVertexBuffer({context:t,typedArray:c.typedArray,usage:i}),y={index:o[a],vertexBuffer:d,value:void 0,componentDatatype:f,componentsPerAttribute:Nt.getNumberOfComponents(c.type),normalize:c.normalized,instanceDivisor:c.instanceDivisor}),u.push(y)}let p,b=n.indices;return l(b)&&(ft.computeNumberOfVertices(n)>=W.SIXTY_FOUR_KILOBYTES&&t.elementIndexUint?p=qe.createIndexBuffer({context:t,typedArray:new Uint32Array(b),usage:i,indexDatatype:Me.UNSIGNED_INT}):p=qe.createIndexBuffer({context:t,typedArray:new Uint16Array(b),usage:i,indexDatatype:Me.UNSIGNED_SHORT})),new Lh({context:t,attributes:u,indexBuffer:p})};Object.defineProperties(Lh.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}});Lh.prototype.getAttribute=function(e){return this._attributes[e]};function PPe(e){let t=e._context,n=e._hasInstancedAttributes;if(!n&&!t._previousDrawInstanced)return;t._previousDrawInstanced=n;let i=t._vertexAttribDivisors,o=e._attributes,r=Lt.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 XPe(e,t){let n=e._attributes,i=n.length;for(let o=0;o<i;++o){let r=n[o];r.enabled&&l(r.value)&&r.vertexAttrib(t)}}Lh.prototype.copyAttributeFromRange=function(e,t,n,i){let o=this.getAttribute(e),r=o.vertexBuffer,s=o.componentsPerAttribute,a=t.constructor,c=n*s*a.BYTES_PER_ELEMENT,d=new a(t.buffer,t.byteOffset+c,i*s);r.copyFromArrayView(d,c)};Lh.prototype.copyIndexFromRange=function(e,t,n){let i=this._indexBuffer,o=e.constructor,r=t*o.BYTES_PER_ELEMENT,s=new o(e.buffer,e.byteOffset+r,n);i.copyFromArrayView(s,r)};Lh.prototype._bind=function(){l(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&PPe(this),this._hasConstantAttributes&&XPe(this,this._gl)):Kse(this._gl,this._attributes,this._indexBuffer)};Lh.prototype._unBind=function(){if(l(this._vao))this._context.glBindVertexArray(null);else{let e=this._attributes,t=this._gl;for(let n=0;n<e.length;++n){let i=e[n];i.enabled&&i.disableVertexAttribArray(t)}this._indexBuffer&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null)}};Lh.prototype.isDestroyed=function(){return!1};Lh.prototype.destroy=function(){let e=this._attributes;for(let n=0;n<e.length;++n){let i=e[n].vertexBuffer;l(i)&&!i.isDestroyed()&&i.vertexArrayDestroyable&&i.destroy()}let t=this._indexBuffer;return l(t)&&!t.isDestroyed()&&t.vertexArrayDestroyable&&t.destroy(),l(this._vao)&&this._context.glDeleteVertexArray(this._vao),me(this)};var Mn=Lh;function br(e){e=e??B.EMPTY_OBJECT;let{context:t,source:n,pixelFormat:i=Ke.RGBA,pixelDatatype:o=Oe.UNSIGNED_BYTE,flipY:r=!0,skipColorSpaceConversion:s=!1,sampler:a=new Ut}=e,c=e.preMultiplyAlpha||i===Ke.RGB||i===Ke.LUMINANCE,{width:d,height:u}=e;l(n)&&({width:d,height:u}=n.positiveX);let h=d,p=Ke.textureSizeInBytes(i,o,h,h)*6,b=Ke.toInternalFormat(i,o,t),f=t._gl,y=f.TEXTURE_CUBE_MAP,_=f.createTexture();this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=y,this._texture=_,this._pixelFormat=i,this._pixelDatatype=o,this._size=h,this._hasMipmap=!1,this._sizeInBytes=p,this._preMultiplyAlpha=c,this._flipY=r;let S=l(n);function A(Z){return new rE(t,_,y,Z,b,i,o,h,c,r,S)}this._positiveX=A(f.TEXTURE_CUBE_MAP_POSITIVE_X),this._negativeX=A(f.TEXTURE_CUBE_MAP_NEGATIVE_X),this._positiveY=A(f.TEXTURE_CUBE_MAP_POSITIVE_Y),this._negativeY=A(f.TEXTURE_CUBE_MAP_NEGATIVE_Y),this._positiveZ=A(f.TEXTURE_CUBE_MAP_POSITIVE_Z),this._negativeZ=A(f.TEXTURE_CUBE_MAP_NEGATIVE_Z),this._sampler=a,Jse(this,a),f.activeTexture(f.TEXTURE0),f.bindTexture(y,_),s?f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.NONE):f.pixelStorei(f.UNPACK_COLORSPACE_CONVERSION_WEBGL,f.BROWSER_DEFAULT_WEBGL);for(let Z of br.faceNames())HK(this[Z],n?.[Z],0);f.bindTexture(y,null)}br.prototype.copyFace=function(e,t,n,i){let o=e.context,r=new os({context:o,colorTextures:[t],destroyAttachments:!1});r._bind(),this[n].copyMipmapFromFramebuffer(0,0,t.width,t.height,i??0),r._unBind(),r.destroy()};br.FaceName=Object.freeze({POSITIVEX:"positiveX",NEGATIVEX:"negativeX",POSITIVEY:"positiveY",NEGATIVEY:"negativeY",POSITIVEZ:"positiveZ",NEGATIVEZ:"negativeZ"});function*NPe(){yield br.FaceName.POSITIVEX,yield br.FaceName.NEGATIVEX,yield br.FaceName.POSITIVEY,yield br.FaceName.NEGATIVEY,yield br.FaceName.POSITIVEZ,yield br.FaceName.NEGATIVEZ}br.faceNames=function(){return NPe()};function HK(e,t,n){n=n??0;let i=e._targetFace,o=Math.max(Math.floor(e._size/2**n),1),r=e._pixelFormat,s=e._pixelDatatype,a=e._internalFormat,c=e._flipY,d=e._preMultiplyAlpha,u=e._context,h=u._gl;if(!l(t)){h.texImage2D(i,n,a,o,o,0,r,Oe.toWebGLConstant(s,u),null);return}let{arrayBufferView:p}=t,b=4;l(p)&&(b=Ke.alignmentInBytes(r,s,o)),h.pixelStorei(h.UNPACK_ALIGNMENT,b),l(p)?(h.pixelStorei(h.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,!1),c&&(p=Ke.flipY(p,r,s,o,o)),h.texImage2D(i,n,a,o,o,0,r,Oe.toWebGLConstant(s,u),p)):(h.pixelStorei(h.UNPACK_PREMULTIPLY_ALPHA_WEBGL,d),h.pixelStorei(h.UNPACK_FLIP_Y_WEBGL,c),h.texImage2D(i,n,a,r,Oe.toWebGLConstant(s,u),t))}br.loadFace=HK;Object.defineProperties(br.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){Jse(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}}});br.getDirection=function(e,t){switch(e){case br.FaceName.POSITIVEX:return m.clone(m.UNIT_X,t);case br.FaceName.NEGATIVEX:return m.negate(m.UNIT_X,t);case br.FaceName.POSITIVEY:return m.clone(m.UNIT_Y,t);case br.FaceName.NEGATIVEY:return m.negate(m.UNIT_Y,t);case br.FaceName.POSITIVEZ:return m.clone(m.UNIT_Z,t);case br.FaceName.NEGATIVEZ:return m.negate(m.UNIT_Z,t)}};function Jse(e,t){let{minificationFilter:n,magnificationFilter:i}=t,o=[kt.NEAREST_MIPMAP_NEAREST,kt.NEAREST_MIPMAP_LINEAR,kt.LINEAR_MIPMAP_NEAREST,kt.LINEAR_MIPMAP_LINEAR].includes(n),r=e._context,s=e._pixelDatatype;(s===Oe.FLOAT&&!r.textureFloatLinear||s===Oe.HALF_FLOAT&&!r.textureHalfFloatLinear)&&(n=o?kt.NEAREST_MIPMAP_NEAREST:kt.NEAREST,i=ni.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)}br.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 br.faceNames())HK(this[c],s[c],a)}n.bindTexture(o,null),this._hasMipmap=!0};br.prototype.generateMipmap=function(e){e=e??um.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)};br.createVertexArray=function(e){let t=xc.createGeometry(xc.fromDimensions({dimensions:new m(2,2,2),vertexFormat:Xe.POSITION_ONLY})),n=this._attributeLocations=Un.createAttributeLocations(t);return Mn.fromGeometry({context:e,geometry:t,attributeLocations:n,bufferUsage:Fe.STATIC_DRAW})};br.prototype.isDestroyed=function(){return!1};br.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._positiveX=me(this._positiveX),this._negativeX=me(this._negativeX),this._positiveY=me(this._positiveY),this._negativeY=me(this._negativeY),this._positiveZ=me(this._positiveZ),this._negativeZ=me(this._negativeZ),me(this)};var Br=br;var o3t=x(T(),1);function YPe(e){this.context=e,this.framebuffer=void 0,this.blendingEnabled=void 0,this.scissorTest=void 0,this.viewport=void 0}var Dc=YPe;var s3t=x(T(),1),KK=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)}},dE=KK;var f8t=x(T(),1);var c8t=x(T(),1);var $Qt=x(T(),1);var c3t=x(T(),1),uE=`/**
* A built-in GLSL floating-point constant for converting radians to degrees.
*
* @alias czm_degreesPerRadian
* @glslConstant
*
* @see CesiumMath.DEGREES_PER_RADIAN
*
* @example
* // GLSL declaration
* const float czm_degreesPerRadian = ...;
*
* // Example
* float deg = czm_degreesPerRadian * rad;
*/
const float czm_degreesPerRadian = 57.29577951308232;
`;var d3t=x(T(),1),mE=`/**
* A built-in GLSL vec2 constant for defining the depth range.
* This is a workaround to a bug where IE11 does not implement gl_DepthRange.
*
* @alias czm_depthRange
* @glslConstant
*
* @example
* // GLSL declaration
* float depthRangeNear = czm_depthRange.near;
* float depthRangeFar = czm_depthRange.far;
*
*/
const czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);
`;var m3t=x(T(),1),hE=`/**
* 0.1
*
* @name czm_epsilon1
* @glslConstant
*/
const float czm_epsilon1 = 0.1;
`;var f3t=x(T(),1),fE=`/**
* 0.01
*
* @name czm_epsilon2
* @glslConstant
*/
const float czm_epsilon2 = 0.01;
`;var b3t=x(T(),1),pE=`/**
* 0.001
*
* @name czm_epsilon3
* @glslConstant
*/
const float czm_epsilon3 = 0.001;
`;var y3t=x(T(),1),bE=`/**
* 0.0001
*
* @name czm_epsilon4
* @glslConstant
*/
const float czm_epsilon4 = 0.0001;
`;var T3t=x(T(),1),gE=`/**
* 0.00001
*
* @name czm_epsilon5
* @glslConstant
*/
const float czm_epsilon5 = 0.00001;
`;var S3t=x(T(),1),yE=`/**
* 0.000001
*
* @name czm_epsilon6
* @glslConstant
*/
const float czm_epsilon6 = 0.000001;
`;var Z3t=x(T(),1),xE=`/**
* 0.0000001
*
* @name czm_epsilon7
* @glslConstant
*/
const float czm_epsilon7 = 0.0000001;
`;var V3t=x(T(),1),TE=`/**
* DOC_TBA
*
* @name czm_infinity
* @glslConstant
*/
const float czm_infinity = 5906376272000.0; // Distance from the Sun to Pluto in meters. TODO: What is best given lowp, mediump, and highp?
`;var E3t=x(T(),1),_E=`/**
* A built-in GLSL floating-point constant for <code>1/pi</code>.
*
* @alias czm_oneOverPi
* @glslConstant
*
* @see CesiumMath.ONE_OVER_PI
*
* @example
* // GLSL declaration
* const float czm_oneOverPi = ...;
*
* // Example
* float pi = 1.0 / czm_oneOverPi;
*/
const float czm_oneOverPi = 0.3183098861837907;
`;var L3t=x(T(),1),SE=`/**
* A built-in GLSL floating-point constant for <code>1/2pi</code>.
*
* @alias czm_oneOverTwoPi
* @glslConstant
*
* @see CesiumMath.ONE_OVER_TWO_PI
*
* @example
* // GLSL declaration
* const float czm_oneOverTwoPi = ...;
*
* // Example
* float pi = 2.0 * czm_oneOverTwoPi;
*/
const float czm_oneOverTwoPi = 0.15915494309189535;
`;var v3t=x(T(),1),AE=`/**
* The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE}
*
* @name czm_passCesium3DTile
* @glslConstant
*
* @see czm_pass
*/
const float czm_passCesium3DTile = 5.0;
`;var I3t=x(T(),1),ZE=`/**
* The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION}
*
* @name czm_passCesium3DTileClassification
* @glslConstant
*
* @see czm_pass
*/
const float czm_passCesium3DTileClassification = 6.0;
`;var X3t=x(T(),1),CE=`/**
* The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW}
*
* @name czm_passCesium3DTileClassificationIgnoreShow
* @glslConstant
*
* @see czm_pass
*/
const float czm_passCesium3DTileClassificationIgnoreShow = 7.0;
`;var Y3t=x(T(),1),VE=`/**
* The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_EDGES}
*
* @name czm_passCesium3DTileEdges
* @glslConstant
*
* @see czm_pass
*/
const float czm_passCesium3DTileEdges = 4.0;
`;var M3t=x(T(),1),RE=`/**
* The automatic GLSL constant for {@link Pass#CLASSIFICATION}
*
* @name czm_passClassification
* @glslConstant
*
* @see czm_pass
*/
const float czm_passClassification = 7.0;
`;var U3t=x(T(),1),EE=`/**
* The automatic GLSL constant for {@link Pass#COMPUTE}
*
* @name czm_passCompute
* @glslConstant
*
* @see czm_pass
*/
const float czm_passCompute = 1.0;
`;var O3t=x(T(),1),GE=`/**
* The automatic GLSL constant for {@link Pass#ENVIRONMENT}
*
* @name czm_passEnvironment
* @glslConstant
*
* @see czm_pass
*/
const float czm_passEnvironment = 0.0;
`;var z3t=x(T(),1),LE=`/**
* The automatic GLSL constant for {@link Pass#GAUSSIAN_SPLATS}
*
* @name czm_passGaussianSplats
* @glslConstant
*
* @see czm_pass
*/
const float czm_passGaussianSplats = 11.0;
`;var K3t=x(T(),1),WE=`/**
* The automatic GLSL constant for {@link Pass#GLOBE}
*
* @name czm_passGlobe
* @glslConstant
*
* @see czm_pass
*/
const float czm_passGlobe = 2.0;
`;var j3t=x(T(),1),vE=`/**
* The automatic GLSL constant for {@link Pass#OPAQUE}
*
* @name czm_passOpaque
* @glslConstant
*
* @see czm_pass
*/
const float czm_passOpaque = 8.0;
`;var q3t=x(T(),1),FE=`/**
* The automatic GLSL constant for {@link Pass#OVERLAY}
*
* @name czm_passOverlay
* @glslConstant
*
* @see czm_pass
*/
const float czm_passOverlay = 12.0;
`;var ezt=x(T(),1),IE=`/**
* The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION}
*
* @name czm_passTerrainClassification
* @glslConstant
*
* @see czm_pass
*/
const float czm_passTerrainClassification = 3.0;
`;var nzt=x(T(),1),PE=`/**
* The automatic GLSL constant for {@link Pass#TRANSLUCENT}
*
* @name czm_passTranslucent
* @glslConstant
*
* @see czm_pass
*/
const float czm_passTranslucent = 9.0;
`;var ozt=x(T(),1),XE=`/**
* The automatic GLSL constant for {@link Pass#VOXELS}
*
* @name czm_passVoxels
* @glslConstant
*
* @see czm_pass
*/
const float czm_passVoxels = 10.0;
`;var szt=x(T(),1),NE=`/**
* A built-in GLSL floating-point constant for <code>Math.PI</code>.
*
* @alias czm_pi
* @glslConstant
*
* @see CesiumMath.PI
*
* @example
* // GLSL declaration
* const float czm_pi = ...;
*
* // Example
* float twoPi = 2.0 * czm_pi;
*/
const float czm_pi = 3.141592653589793;
`;var czt=x(T(),1),YE=`/**
* A built-in GLSL floating-point constant for <code>pi/4</code>.
*
* @alias czm_piOverFour
* @glslConstant
*
* @see CesiumMath.PI_OVER_FOUR
*
* @example
* // GLSL declaration
* const float czm_piOverFour = ...;
*
* // Example
* float pi = 4.0 * czm_piOverFour;
*/
const float czm_piOverFour = 0.7853981633974483;
`;var dzt=x(T(),1),wE=`/**
* A built-in GLSL floating-point constant for <code>pi/6</code>.
*
* @alias czm_piOverSix
* @glslConstant
*
* @see CesiumMath.PI_OVER_SIX
*
* @example
* // GLSL declaration
* const float czm_piOverSix = ...;
*
* // Example
* float pi = 6.0 * czm_piOverSix;
*/
const float czm_piOverSix = 0.5235987755982988;
`;var mzt=x(T(),1),ME=`/**
* A built-in GLSL floating-point constant for <code>pi/3</code>.
*
* @alias czm_piOverThree
* @glslConstant
*
* @see CesiumMath.PI_OVER_THREE
*
* @example
* // GLSL declaration
* const float czm_piOverThree = ...;
*
* // Example
* float pi = 3.0 * czm_piOverThree;
*/
const float czm_piOverThree = 1.0471975511965976;
`;var fzt=x(T(),1),kE=`/**
* A built-in GLSL floating-point constant for <code>pi/2</code>.
*
* @alias czm_piOverTwo
* @glslConstant
*
* @see CesiumMath.PI_OVER_TWO
*
* @example
* // GLSL declaration
* const float czm_piOverTwo = ...;
*
* // Example
* float pi = 2.0 * czm_piOverTwo;
*/
const float czm_piOverTwo = 1.5707963267948966;
`;var bzt=x(T(),1),UE=`/**
* A built-in GLSL floating-point constant for converting degrees to radians.
*
* @alias czm_radiansPerDegree
* @glslConstant
*
* @see CesiumMath.RADIANS_PER_DEGREE
*
* @example
* // GLSL declaration
* const float czm_radiansPerDegree = ...;
*
* // Example
* float rad = czm_radiansPerDegree * deg;
*/
const float czm_radiansPerDegree = 0.017453292519943295;
`;var yzt=x(T(),1),DE=`/**
* The constant identifier for the 2D {@link SceneMode}
*
* @name czm_sceneMode2D
* @glslConstant
* @see czm_sceneMode
* @see czm_sceneModeColumbusView
* @see czm_sceneMode3D
* @see czm_sceneModeMorphing
*/
const float czm_sceneMode2D = 2.0;
`;var Tzt=x(T(),1),OE=`/**
* The constant identifier for the 3D {@link SceneMode}
*
* @name czm_sceneMode3D
* @glslConstant
* @see czm_sceneMode
* @see czm_sceneMode2D
* @see czm_sceneModeColumbusView
* @see czm_sceneModeMorphing
*/
const float czm_sceneMode3D = 3.0;
`;var Szt=x(T(),1),BE=`/**
* The constant identifier for the Columbus View {@link SceneMode}
*
* @name czm_sceneModeColumbusView
* @glslConstant
* @see czm_sceneMode
* @see czm_sceneMode2D
* @see czm_sceneMode3D
* @see czm_sceneModeMorphing
*/
const float czm_sceneModeColumbusView = 1.0;
`;var Zzt=x(T(),1),zE=`/**
* The constant identifier for the Morphing {@link SceneMode}
*
* @name czm_sceneModeMorphing
* @glslConstant
* @see czm_sceneMode
* @see czm_sceneMode2D
* @see czm_sceneModeColumbusView
* @see czm_sceneMode3D
*/
const float czm_sceneModeMorphing = 0.0;
`;var Vzt=x(T(),1),HE=`/**
* A built-in GLSL floating-point constant for one solar radius.
*
* @alias czm_solarRadius
* @glslConstant
*
* @see CesiumMath.SOLAR_RADIUS
*
* @example
* // GLSL declaration
* const float czm_solarRadius = ...;
*/
const float czm_solarRadius = 695500000.0;
`;var Ezt=x(T(),1),KE=`/**
* A built-in GLSL floating-point constant for <code>3pi/2</code>.
*
* @alias czm_threePiOver2
* @glslConstant
*
* @see CesiumMath.THREE_PI_OVER_TWO
*
* @example
* // GLSL declaration
* const float czm_threePiOver2 = ...;
*
* // Example
* float pi = (2.0 / 3.0) * czm_threePiOver2;
*/
const float czm_threePiOver2 = 4.71238898038469;
`;var Lzt=x(T(),1),JE=`/**
* A built-in GLSL floating-point constant for <code>2pi</code>.
*
* @alias czm_twoPi
* @glslConstant
*
* @see CesiumMath.TWO_PI
*
* @example
* // GLSL declaration
* const float czm_twoPi = ...;
*
* // Example
* float pi = czm_twoPi / 2.0;
*/
const float czm_twoPi = 6.283185307179586;
`;var vzt=x(T(),1),jE=`/**
* The maximum latitude, in radians, both North and South, supported by a Web Mercator
* (EPSG:3857) projection. Technically, the Mercator projection is defined
* for any latitude up to (but not including) 90 degrees, but it makes sense
* to cut it off sooner because it grows exponentially with increasing latitude.
* The logic behind this particular cutoff value, which is the one used by
* Google Maps, Bing Maps, and Esri, is that it makes the projection
* square. That is, the rectangle is equal in the X and Y directions.
*
* The constant value is computed as follows:
* czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))
*
* @name czm_webMercatorMaxLatitude
* @glslConstant
*/
const float czm_webMercatorMaxLatitude = 1.4844222297453324;
`;var Izt=x(T(),1),QE=`/**
* @name czm_depthRangeStruct
* @glslStruct
*/
struct czm_depthRangeStruct
{
float near;
float far;
};
`;var Xzt=x(T(),1),qE=`/**
* Holds material information that can be used for lighting. Returned by all czm_getMaterial functions.
*
* @name czm_material
* @glslStruct
*
* @property {vec3} diffuse Incoming light that scatters evenly in all directions.
* @property {float} specular Intensity of incoming light reflecting in a single direction.
* @property {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.
* @property {vec3} normal Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.
* @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.
* @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.
*/
struct czm_material
{
vec3 diffuse;
float specular;
float shininess;
vec3 normal;
vec3 emission;
float alpha;
};
`;var Yzt=x(T(),1),$E=`/**
* Used as input to every material's czm_getMaterial function.
*
* @name czm_materialInput
* @glslStruct
*
* @property {float} s 1D texture coordinates.
* @property {vec2} st 2D texture coordinates.
* @property {vec3} str 3D texture coordinates.
* @property {vec3} normalEC Unperturbed surface normal in eye coordinates.
* @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space.
* @property {vec3} positionToEyeEC Vector from the fragment to the eye in eye coordinates. The magnitude is the distance in meters from the fragment to the eye.
* @property {float} height The height of the terrain in meters above or below the ellipsoid. Only available for globe materials.
* @property {float} slope The slope of the terrain in radians. 0 is flat; pi/2 is vertical. Only available for globe materials.
* @property {float} aspect The aspect of the terrain in radians. 0 is East, pi/2 is North, pi is West, 3pi/2 is South. Only available for globe materials.
* @property {float} waterMask The value of the water mask. 0 is land, 1 is water. Only available for globe materials.
*/
struct czm_materialInput
{
float s;
vec2 st;
vec3 str;
vec3 normalEC;
mat3 tangentToEyeMatrix;
vec3 positionToEyeEC;
float height;
float slope;
float aspect;
float waterMask;
};
`;var Mzt=x(T(),1),eG=`/**
* Struct for representing a material for a {@link Model}. The model
* rendering pipeline will pass this struct between material, custom shaders,
* and lighting stages. This is not to be confused with {@link czm_material}
* which is used by the older Fabric materials system, although they are similar.
* <p>
* All color values (diffuse, specular, emissive) are in linear color space.
* </p>
*
* @name czm_modelMaterial
* @glslStruct
*
* @property {vec4} baseColor The base color of the material.
* @property {vec3} diffuse Incoming light that scatters evenly in all directions.
* @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.
* @property {vec3} specular Color of reflected light at normal incidence in PBR materials. This is sometimes referred to as f0 in the literature.
* @property {float} roughness A number from 0.0 to 1.0 representing how rough the surface is. Values near 0.0 produce glossy surfaces, while values near 1.0 produce rough surfaces.
* @property {vec3} normalEC Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.
* @property {float} occlusion Ambient occlusion recieved at this point on the material. 1.0 means fully lit, 0.0 means fully occluded.
* @property {vec3} emissive Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.
*/
struct czm_modelMaterial {
vec4 baseColor;
vec3 diffuse;
float alpha;
vec3 specular;
float roughness;
vec3 normalEC;
float occlusion;
vec3 emissive;
#ifdef USE_SPECULAR
float specularWeight;
#endif
#ifdef USE_ANISOTROPY
vec3 anisotropicT;
vec3 anisotropicB;
float anisotropyStrength;
#endif
#ifdef USE_CLEARCOAT
float clearcoatFactor;
float clearcoatRoughness;
vec3 clearcoatNormal;
// Add clearcoatF0 when KHR_materials_ior is implemented
#endif
};
`;var Uzt=x(T(),1),tG=`/**
* Struct for representing the output of a custom vertex shader.
*
* @name czm_modelVertexOutput
* @glslStruct
*
* @see {@link CustomShader}
* @see {@link Model}
*
* @property {vec3} positionMC The position of the vertex in model coordinates
* @property {float} pointSize A custom value for gl_PointSize. This is only used for point primitives.
*/
struct czm_modelVertexOutput {
vec3 positionMC;
float pointSize;
};
`;var Ozt=x(T(),1),nG=`/**
* DOC_TBA
*
* @name czm_ray
* @glslStruct
*/
struct czm_ray
{
vec3 origin;
vec3 direction;
};
`;var zzt=x(T(),1),iG=`/**
* DOC_TBA
*
* @name czm_raySegment
* @glslStruct
*/
struct czm_raySegment
{
float start;
float stop;
};
/**
* DOC_TBA
*
* @name czm_emptyRaySegment
* @glslConstant
*/
const czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);
/**
* DOC_TBA
*
* @name czm_fullRaySegment
* @glslConstant
*/
const czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);
`;var Kzt=x(T(),1),oG=`struct czm_shadowParameters
{
#ifdef USE_CUBE_MAP_SHADOW
vec3 texCoords;
#else
vec2 texCoords;
#endif
float depthBias;
float depth;
float nDotL;
vec2 texelStepSize;
float normalShadingSmooth;
float darkness;
};
`;var jzt=x(T(),1),rG=`/**
* Converts an HSB color (hue, saturation, brightness) to RGB
* HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}
*
* @name czm_HSBToRGB
* @glslFunction
*
* @param {vec3} hsb The color in HSB.
*
* @returns {vec3} The color in RGB.
*
* @example
* vec3 hsb = czm_RGBToHSB(rgb);
* hsb.z *= 0.1;
* rgb = czm_HSBToRGB(hsb);
*/
const vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 czm_HSBToRGB(vec3 hsb)
{
vec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);
return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);
}
`;var qzt=x(T(),1),sG=`/**
* Converts an HSL color (hue, saturation, lightness) to RGB
* HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}
*
* @name czm_HSLToRGB
* @glslFunction
*
* @param {vec3} rgb The color in HSL.
*
* @returns {vec3} The color in RGB.
*
* @example
* vec3 hsl = czm_RGBToHSL(rgb);
* hsl.z *= 0.1;
* rgb = czm_HSLToRGB(hsl);
*/
vec3 hueToRGB(float hue)
{
float r = abs(hue * 6.0 - 3.0) - 1.0;
float g = 2.0 - abs(hue * 6.0 - 2.0);
float b = 2.0 - abs(hue * 6.0 - 4.0);
return clamp(vec3(r, g, b), 0.0, 1.0);
}
vec3 czm_HSLToRGB(vec3 hsl)
{
vec3 rgb = hueToRGB(hsl.x);
float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;
return (rgb - 0.5) * c + hsl.z;
}
`;var eHt=x(T(),1),aG=`/**
* Converts an RGB color to HSB (hue, saturation, brightness)
* HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}
*
* @name czm_RGBToHSB
* @glslFunction
*
* @param {vec3} rgb The color in RGB.
*
* @returns {vec3} The color in HSB.
*
* @example
* vec3 hsb = czm_RGBToHSB(rgb);
* hsb.z *= 0.1;
* rgb = czm_HSBToRGB(hsb);
*/
const vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec3 czm_RGBToHSB(vec3 rgb)
{
vec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));
vec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));
float d = q.x - min(q.w, q.y);
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);
}
`;var nHt=x(T(),1),cG=`/**
* Converts an RGB color to HSL (hue, saturation, lightness)
* HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}
*
* @name czm_RGBToHSL
* @glslFunction
*
* @param {vec3} rgb The color in RGB.
*
* @returns {vec3} The color in HSL.
*
* @example
* vec3 hsl = czm_RGBToHSL(rgb);
* hsl.z *= 0.1;
* rgb = czm_HSLToRGB(hsl);
*/
vec3 RGBtoHCV(vec3 rgb)
{
// Based on work by Sam Hocevar and Emil Persson
vec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);
vec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);
float c = q.x - min(q.w, q.y);
float h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);
return vec3(h, c, q.x);
}
vec3 czm_RGBToHSL(vec3 rgb)
{
vec3 hcv = RGBtoHCV(rgb);
float l = hcv.z - hcv.y * 0.5;
float s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);
return vec3(hcv.x, s, l);
}
`;var oHt=x(T(),1),lG=`/**
* Converts an RGB color to CIE Yxy.
* <p>The conversion is described in
* {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}
* </p>
*
* @name czm_RGBToXYZ
* @glslFunction
*
* @param {vec3} rgb The color in RGB.
*
* @returns {vec3} The color in CIE Yxy.
*
* @example
* vec3 xyz = czm_RGBToXYZ(rgb);
* xyz.x = max(xyz.x - luminanceThreshold, 0.0);
* rgb = czm_XYZToRGB(xyz);
*/
vec3 czm_RGBToXYZ(vec3 rgb)
{
const mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,
0.3576, 0.7152, 0.1192,
0.1805, 0.0722, 0.9505);
vec3 xyz = RGB2XYZ * rgb;
vec3 Yxy;
Yxy.r = xyz.g;
float temp = dot(vec3(1.0), xyz);
Yxy.gb = xyz.rg / temp;
return Yxy;
}
`;var sHt=x(T(),1),dG=`/**
* Converts a CIE Yxy color to RGB.
* <p>The conversion is described in
* {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}
* </p>
*
* @name czm_XYZToRGB
* @glslFunction
*
* @param {vec3} Yxy The color in CIE Yxy.
*
* @returns {vec3} The color in RGB.
*
* @example
* vec3 xyz = czm_RGBToXYZ(rgb);
* xyz.x = max(xyz.x - luminanceThreshold, 0.0);
* rgb = czm_XYZToRGB(xyz);
*/
vec3 czm_XYZToRGB(vec3 Yxy)
{
const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,
-1.5371, 1.8760, -0.2040,
-0.4985, 0.0416, 1.0572);
vec3 xyz;
xyz.r = Yxy.r * Yxy.g / Yxy.b;
xyz.g = Yxy.r;
xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;
return XYZ2RGB * xyz;
}
`;var cHt=x(T(),1),uG=`// See:
// https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/
vec3 czm_acesTonemapping(vec3 color) {
float g = 0.985;
float a = 0.065;
float b = 0.0001;
float c = 0.433;
float d = 0.238;
color = (color * (color + a) - b) / (color * (g * color + c) + d);
color = clamp(color, 0.0, 1.0);
return color;
}
`;var dHt=x(T(),1),mG=`/**
* @private
*/
float czm_alphaWeight(float a)
{
float z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];
// See Weighted Blended Order-Independent Transparency for examples of different weighting functions:
// http://jcgt.org/published/0002/02/09/
return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));
}
`;var mHt=x(T(),1),hG=`/**
* Procedural anti-aliasing by blurring two colors that meet at a sharp edge.
*
* @name czm_antialias
* @glslFunction
*
* @param {vec4} color1 The color on one side of the edge.
* @param {vec4} color2 The color on the other side of the edge.
* @param {vec4} currentcolor The current color, either <code>color1</code> or <code>color2</code>.
* @param {float} dist The distance to the edge in texture coordinates.
* @param {float} [fuzzFactor=0.1] Controls the blurriness between the two colors.
* @returns {vec4} The anti-aliased color.
*
* @example
* // GLSL declarations
* vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor);
* vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist);
*
* // get the color for a material that has a sharp edge at the line y = 0.5 in texture space
* float dist = abs(textureCoordinates.t - 0.5);
* vec4 currentColor = mix(bottomColor, topColor, step(0.5, textureCoordinates.t));
* vec4 color = czm_antialias(bottomColor, topColor, currentColor, dist, 0.1);
*/
vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)
{
float val1 = clamp(dist / fuzzFactor, 0.0, 1.0);
float val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);
val1 = val1 * (1.0 - val2);
val1 = val1 * val1 * (3.0 - (2.0 * val1));
val1 = pow(val1, 0.5); //makes the transition nicer
vec4 midColor = (color1 + color2) * 0.5;
return mix(midColor, currentColor, val1);
}
vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)
{
return czm_antialias(color1, color2, currentColor, dist, 0.1);
}
`;var fHt=x(T(),1),fG=`/**
* Apply a HSB color shift to an RGB color.
*
* @param {vec3} rgb The color in RGB space.
* @param {vec3} hsbShift The amount to shift each component. The xyz components correspond to hue, saturation, and brightness. Shifting the hue by +/- 1.0 corresponds to shifting the hue by a full cycle. Saturation and brightness are clamped between 0 and 1 after the adjustment
* @param {bool} ignoreBlackPixels If true, black pixels will be unchanged. This is necessary in some shaders such as atmosphere-related effects.
*
* @return {vec3} The RGB color after shifting in HSB space and clamping saturation and brightness to a valid range.
*/
vec3 czm_applyHSBShift(vec3 rgb, vec3 hsbShift, bool ignoreBlackPixels) {
// Convert rgb color to hsb
vec3 hsb = czm_RGBToHSB(rgb);
// Perform hsb shift
// Hue cycles around so no clamp is needed.
hsb.x += hsbShift.x; // hue
hsb.y = clamp(hsb.y + hsbShift.y, 0.0, 1.0); // saturation
// brightness
//
// Some shaders such as atmosphere-related effects need to leave black
// pixels unchanged
if (ignoreBlackPixels) {
hsb.z = hsb.z > czm_epsilon7 ? hsb.z + hsbShift.z : 0.0;
} else {
hsb.z = hsb.z + hsbShift.z;
}
hsb.z = clamp(hsb.z, 0.0, 1.0);
// Convert shifted hsb back to rgb
return czm_HSBToRGB(hsb);
}
`;var bHt=x(T(),1),pG=`/**
* Approximately computes spherical coordinates given a normal.
* Uses approximate inverse trigonometry for speed and consistency,
* since inverse trigonometry can differ from vendor-to-vendor and when compared with the CPU.
*
* @name czm_approximateSphericalCoordinates
* @glslFunction
*
* @param {vec3} normal arbitrary-length normal.
*
* @returns {vec2} Approximate latitude and longitude spherical coordinates.
*/
vec2 czm_approximateSphericalCoordinates(vec3 normal) {
// Project into plane with vertical for latitude
float latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);
float longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);
return vec2(latitudeApproximation, longitudeApproximation);
}
`;var yHt=x(T(),1),bG=`/**
* Compute a rational approximation to tanh(x)
*
* @param {float} x A real number input
* @returns {float} An approximation for tanh(x)
*/
float czm_approximateTanh(float x) {
float x2 = x * x;
return max(-1.0, min(1.0, x * (27.0 + x2) / (27.0 + 9.0 * x2)));
}
`;var THt=x(T(),1),gG=`/**
* Determines if the fragment is back facing
*
* @name czm_backFacing
* @glslFunction
*
* @returns {bool} <code>true</code> if the fragment is back facing; otherwise, <code>false</code>.
*/
bool czm_backFacing()
{
// !gl_FrontFacing doesn't work as expected on Mac/Intel so use the more verbose form instead. See https://github.com/CesiumGS/cesium/pull/8494.
return gl_FrontFacing == false;
}
`;var SHt=x(T(),1),yG=`/**
* Branchless ternary operator to be used when it's inexpensive to explicitly
* evaluate both possibilities for a float expression.
*
* @name czm_branchFreeTernary
* @glslFunction
*
* @param {bool} comparison A comparison statement
* @param {float} a Value to return if the comparison is true.
* @param {float} b Value to return if the comparison is false.
*
* @returns {float} equivalent of comparison ? a : b
*/
float czm_branchFreeTernary(bool comparison, float a, float b) {
float useA = float(comparison);
return a * useA + b * (1.0 - useA);
}
/**
* Branchless ternary operator to be used when it's inexpensive to explicitly
* evaluate both possibilities for a vec2 expression.
*
* @name czm_branchFreeTernary
* @glslFunction
*
* @param {bool} comparison A comparison statement
* @param {vec2} a Value to return if the comparison is true.
* @param {vec2} b Value to return if the comparison is false.
*
* @returns {vec2} equivalent of comparison ? a : b
*/
vec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {
float useA = float(comparison);
return a * useA + b * (1.0 - useA);
}
/**
* Branchless ternary operator to be used when it's inexpensive to explicitly
* evaluate both possibilities for a vec3 expression.
*
* @name czm_branchFreeTernary
* @glslFunction
*
* @param {bool} comparison A comparison statement
* @param {vec3} a Value to return if the comparison is true.
* @param {vec3} b Value to return if the comparison is false.
*
* @returns {vec3} equivalent of comparison ? a : b
*/
vec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {
float useA = float(comparison);
return a * useA + b * (1.0 - useA);
}
/**
* Branchless ternary operator to be used when it's inexpensive to explicitly
* evaluate both possibilities for a vec4 expression.
*
* @name czm_branchFreeTernary
* @glslFunction
*
* @param {bool} comparison A comparison statement
* @param {vec3} a Value to return if the comparison is true.
* @param {vec3} b Value to return if the comparison is false.
*
* @returns {vec3} equivalent of comparison ? a : b
*/
vec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {
float useA = float(comparison);
return a * useA + b * (1.0 - useA);
}
`;var ZHt=x(T(),1),xG=`
vec4 czm_cascadeColor(vec4 weights)
{
return vec4(1.0, 0.0, 0.0, 1.0) * weights.x +
vec4(0.0, 1.0, 0.0, 1.0) * weights.y +
vec4(0.0, 0.0, 1.0, 1.0) * weights.z +
vec4(1.0, 0.0, 1.0, 1.0) * weights.w;
}
`;var VHt=x(T(),1),TG=`
uniform vec4 shadowMap_cascadeDistances;
float czm_cascadeDistance(vec4 weights)
{
return dot(shadowMap_cascadeDistances, weights);
}
`;var EHt=x(T(),1),_G=`
uniform mat4 shadowMap_cascadeMatrices[4];
mat4 czm_cascadeMatrix(vec4 weights)
{
return shadowMap_cascadeMatrices[0] * weights.x +
shadowMap_cascadeMatrices[1] * weights.y +
shadowMap_cascadeMatrices[2] * weights.z +
shadowMap_cascadeMatrices[3] * weights.w;
}
`;var LHt=x(T(),1),SG=`
uniform vec4 shadowMap_cascadeSplits[2];
vec4 czm_cascadeWeights(float depthEye)
{
// One component is set to 1.0 and all others set to 0.0.
vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));
vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);
return near * far;
}
`;var vHt=x(T(),1),AG=`float getSignedDistance(vec2 uv, highp sampler2D clippingDistance) {
float signedDistance = texture(clippingDistance, uv).r;
return (signedDistance - 0.5) * 2.0;
}
void czm_clipPolygons(highp sampler2D clippingDistance, int extentsLength, vec2 clippingPosition, int regionIndex) {
// Position is completely outside of polygons bounds
vec2 rectUv = clippingPosition;
if (regionIndex < 0 || rectUv.x <= 0.0 || rectUv.y <= 0.0 || rectUv.x >= 1.0 || rectUv.y >= 1.0) {
#ifdef CLIPPING_INVERSE
discard;
#endif
return;
}
vec2 clippingDistanceTextureDimensions = vec2(textureSize(clippingDistance, 0));
vec2 sampleOffset = max(1.0 / clippingDistanceTextureDimensions, vec2(0.005));
float dimension = float(extentsLength);
if (extentsLength > 2) {
dimension = ceil(log2(float(extentsLength)));
}
vec2 textureOffset = vec2(mod(float(regionIndex), dimension), floor(float(regionIndex) / dimension)) / dimension;
vec2 uv = textureOffset + rectUv / dimension;
float signedDistance = getSignedDistance(uv, clippingDistance);
#ifdef CLIPPING_INVERSE
if (signedDistance > 0.0) {
discard;
}
#else
if (signedDistance < 0.0) {
discard;
}
#endif
}
`;var IHt=x(T(),1),ZG=`/**
* DOC_TBA
*
* @name czm_columbusViewMorph
* @glslFunction
*/
vec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)
{
// Just linear for now.
// We're manually doing the equivalent of a \`mix\` here because, some GPUs
// (NVidia GeForce 3070 Ti and Intel Arc A750, to name two), \`mix\` seems to
// use an alternate formulation that introduces jitter even when \`time\` is
// 0.0 or 1.0. That is, the value of \`p\` won't be exactly \`position2D.xyz\`
// when \`time\` is 0.0 and it won't be exactly \`position3D.xyz\` when \`time\` is
// 1.0. The "textbook" formulation here, while probably a bit slower,
// does not have this problem.
vec3 p = position2D.xyz * (1.0 - time) + position3D.xyz * time;
return vec4(p, 1.0);
}
`;var XHt=x(T(),1),CG=`/**
* Compute the atmosphere color, applying Rayleigh and Mie scattering. This
* builtin uses automatic uniforms so the atmophere settings are synced with the
* state of the Scene, even in other contexts like Model.
*
* @name czm_computeAtmosphereColor
* @glslFunction
*
* @param {vec3} positionWC Position of the fragment in world coords (low precision)
* @param {vec3} lightDirection Light direction from the sun or other light source.
* @param {vec3} rayleighColor The Rayleigh scattering color computed by a scattering function
* @param {vec3} mieColor The Mie scattering color computed by a scattering function
* @param {float} opacity The opacity computed by a scattering function.
*/
vec4 czm_computeAtmosphereColor(
vec3 positionWC,
vec3 lightDirection,
vec3 rayleighColor,
vec3 mieColor,
float opacity
) {
// Setup the primary ray: from the camera position to the vertex position.
vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
float cosAngle = dot(cameraToPositionWCDirection, lightDirection);
float cosAngleSq = cosAngle * cosAngle;
float G = czm_atmosphereMieAnisotropy;
float GSq = G * G;
// The Rayleigh phase function.
float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
// The Mie phase function.
float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));
// The final color is generated by combining the effects of the Rayleigh and Mie scattering.
vec3 rayleigh = rayleighPhase * rayleighColor;
vec3 mie = miePhase * mieColor;
vec3 color = (rayleigh + mie) * czm_atmosphereLightIntensity;
return vec4(color, opacity);
}
/**
* Compute the atmosphere color, applying Rayleigh and Mie scattering. This
* builtin uses automatic uniforms so the atmophere settings are synced with the
* state of the Scene, even in other contexts like Model.
*
* @name czm_computeAtmosphereColor
* @glslFunction
*
* @param {czm_ray} primaryRay Ray from the origin to sky fragment to in world coords (low precision)
* @param {vec3} lightDirection Light direction from the sun or other light source.
* @param {vec3} rayleighColor The Rayleigh scattering color computed by a scattering function
* @param {vec3} mieColor The Mie scattering color computed by a scattering function
* @param {float} opacity The opacity computed by a scattering function.
*/
vec4 czm_computeAtmosphereColor(
czm_ray primaryRay,
vec3 lightDirection,
vec3 rayleighColor,
vec3 mieColor,
float opacity
) {
vec3 direction = normalize(primaryRay.direction);
float cosAngle = dot(direction, lightDirection);
float cosAngleSq = cosAngle * cosAngle;
float G = czm_atmosphereMieAnisotropy;
float GSq = G * G;
// The Rayleigh phase function.
float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
// The Mie phase function.
float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));
// The final color is generated by combining the effects of the Rayleigh and Mie scattering.
vec3 rayleigh = rayleighPhase * rayleighColor;
vec3 mie = miePhase * mieColor;
vec3 color = (rayleigh + mie) * czm_atmosphereLightIntensity;
return vec4(color, opacity);
}
`;var YHt=x(T(),1),VG=`/**
* Compute atmosphere scattering for the ground atmosphere and fog. This method
* uses automatic uniforms so it is always synced with the scene settings.
*
* @name czm_computeGroundAtmosphereScattering
* @glslfunction
*
* @param {vec3} positionWC The position of the fragment in world coordinates.
* @param {vec3} lightDirection The direction of the light to calculate the scattering from.
* @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.
* @param {vec3} mieColor The variable the Mie scattering will be written to.
* @param {float} opacity The variable the transmittance will be written to.
*/
void czm_computeGroundAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) {
vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
float atmosphereInnerRadius = length(positionWC);
czm_computeScattering(
primaryRay,
length(cameraToPositionWC),
lightDirection,
atmosphereInnerRadius,
rayleighColor,
mieColor,
opacity
);
}
`;var MHt=x(T(),1),RG=`/**
* Returns a position in model coordinates relative to eye taking into
* account the current scene mode: 3D, 2D, or Columbus view.
* <p>
* This uses standard position attributes, <code>position3DHigh</code>,
* <code>position3DLow</code>, <code>position2DHigh</code>, and <code>position2DLow</code>,
* and should be used when writing a vertex shader for an {@link Appearance}.
* </p>
*
* @name czm_computePosition
* @glslFunction
*
* @returns {vec4} The position relative to eye.
*
* @example
* vec4 p = czm_computePosition();
* v_positionEC = (czm_modelViewRelativeToEye * p).xyz;
* gl_Position = czm_modelViewProjectionRelativeToEye * p;
*
* @see czm_translateRelativeToEye
*/
vec4 czm_computePosition();
`;var UHt=x(T(),1),EG=`/**
* This function computes the colors contributed by Rayliegh and Mie scattering on a given ray, as well as
* the transmittance value for the ray. This function uses automatic uniforms
* so the atmosphere settings are always synced with the current scene.
*
* @name czm_computeScattering
* @glslfunction
*
* @param {czm_ray} primaryRay The ray from the camera to the position.
* @param {float} primaryRayLength The length of the primary ray.
* @param {vec3} lightDirection The direction of the light to calculate the scattering from.
* @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.
* @param {vec3} mieColor The variable the Mie scattering will be written to.
* @param {float} opacity The variable the transmittance will be written to.
*/
void czm_computeScattering(
czm_ray primaryRay,
float primaryRayLength,
vec3 lightDirection,
float atmosphereInnerRadius,
out vec3 rayleighColor,
out vec3 mieColor,
out float opacity
) {
const float ATMOSPHERE_THICKNESS = 111e3; // The thickness of the atmosphere in meters.
const int PRIMARY_STEPS_MAX = 16; // Maximum number of times the ray from the camera to the world position (primary ray) is sampled.
const int LIGHT_STEPS_MAX = 4; // Maximum number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.
// Initialize the default scattering amounts to 0.
rayleighColor = vec3(0.0);
mieColor = vec3(0.0);
opacity = 0.0;
float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;
vec3 origin = vec3(0.0);
// Calculate intersection from the camera to the outer ring of the atmosphere.
czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);
// Return empty colors if no intersection with the atmosphere geometry.
if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {
return;
}
// To deal with smaller values of PRIMARY_STEPS (e.g. 4)
// we implement a split strategy: sky or horizon.
// For performance reasons, instead of a if/else branch
// a soft choice is implemented through a weight 0.0 <= w_stop_gt_lprl <= 1.0
float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);
// Value close to 0.0: close to the horizon
// Value close to 1.0: above in the sky
float w_stop_gt_lprl = 0.5 * (1.0 + czm_approximateTanh(x));
// The ray should start from the first intersection with the outer atmopshere, or from the camera position, if it is inside the atmosphere.
float start_0 = primaryRayAtmosphereIntersect.start;
primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);
// The ray should end at the exit from the atmosphere or at the distance to the vertex, whichever is smaller.
primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));
// For the number of ray steps, distinguish inside or outside atmosphere (outer space)
// (1) from outer space we have to use more ray steps to get a realistic rendering
// (2) within atmosphere we need fewer steps for faster rendering
float x_o_a = start_0 - ATMOSPHERE_THICKNESS; // ATMOSPHERE_THICKNESS used as an ad-hoc constant, no precise meaning here, only the order of magnitude matters
float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + czm_approximateTanh(x_o_a));
int PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0); // Number of times the ray from the camera to the world position (primary ray) is sampled.
int LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0); // Number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.
// Setup for sampling positions along the ray - starting from the intersection with the outer ring of the atmosphere.
float rayPositionLength = primaryRayAtmosphereIntersect.start;
// (1) Outside the atmosphere: constant rayStepLength
// (2) Inside atmosphere: variable rayStepLength to compensate the rough rendering of the smaller number of ray steps
float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;
float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));
float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));
vec3 rayleighAccumulation = vec3(0.0);
vec3 mieAccumulation = vec3(0.0);
vec2 opticalDepth = vec2(0.0);
vec2 heightScale = vec2(czm_atmosphereRayleighScaleHeight, czm_atmosphereMieScaleHeight);
// Sample positions on the primary ray.
for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {
// The loop should be: for (int i = 0; i < PRIMARY_STEPS; ++i) {...} but WebGL1 cannot
// loop with non-constant condition, so it has to break early instead
if (i >= PRIMARY_STEPS) {
break;
}
// Calculate sample position along viewpoint ray.
vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);
// Calculate height of sample position above ellipsoid.
float sampleHeight = length(samplePosition) - atmosphereInnerRadius;
// Calculate and accumulate density of particles at the sample position.
vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;
opticalDepth += sampleDensity;
// Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere.
czm_ray lightRay = czm_ray(samplePosition, lightDirection);
czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);
float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);
float lightPositionLength = 0.0;
vec2 lightOpticalDepth = vec2(0.0);
// Sample positions along the light ray, to accumulate incidence of light on the latest sample segment.
for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {
// The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot
// loop with non-constant condition, so it has to break early instead
if (j >= LIGHT_STEPS) {
break;
}
// Calculate sample position along light ray.
vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);
// Calculate height of the light sample position above ellipsoid.
float lightHeight = length(lightPosition) - atmosphereInnerRadius;
// Calculate density of photons at the light sample position.
lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;
// Increment distance on light ray.
lightPositionLength += lightStepLength;
}
// Compute attenuation via the primary ray and the light ray.
vec3 attenuation = exp(-((czm_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (czm_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));
// Accumulate the scattering.
rayleighAccumulation += sampleDensity.x * attenuation;
mieAccumulation += sampleDensity.y * attenuation;
// Increment distance on primary ray.
rayPositionLength += (rayStepLength += rayStepLengthIncrease);
}
// Compute the scattering amount.
rayleighColor = czm_atmosphereRayleighCoefficient * rayleighAccumulation;
mieColor = czm_atmosphereMieCoefficient * mieAccumulation;
// Compute the transmittance i.e. how much light is passing through the atmosphere.
opacity = length(exp(-((czm_atmosphereMieCoefficient * opticalDepth.y) + (czm_atmosphereRayleighCoefficient * opticalDepth.x))));
}
`;var OHt=x(T(),1),GG=`/**
* Applies a 2D texture transformation matrix to texture coordinates.
* This function applies translation, rotation, and scaling transformations
* as specified by the KHR_texture_transform glTF extension.
*
* @name czm_computeTextureTransform
* @glslFunction
*
* @param {vec2} texCoord The texture coordinates to transform.
* @param {mat3} textureTransform The 3x3 transformation matrix.
*
* @returns {vec2} The transformed texture coordinates.
*
* @example
* // GLSL declaration
* vec2 czm_computeTextureTransform(vec2 texCoord, mat3 textureTransform);
*
* // Apply texture transform to UV coordinates
* vec2 transformedUV = czm_computeTextureTransform(uv, u_textureTransform);
*/
vec2 czm_computeTextureTransform(vec2 texCoord, mat3 textureTransform)
{
return vec2(textureTransform * vec3(texCoord, 1.0));
}`;var zHt=x(T(),1),LG=`/**
* @private
*/
vec2 cordic(float angle)
{
// Scale the vector by the appropriate factor for the 24 iterations to follow.
vec2 vector = vec2(6.0725293500888267e-1, 0.0);
// Iteration 1
float sense = (angle < 0.0) ? -1.0 : 1.0;
// float factor = sense * 1.0; // 2^-0
mat2 rotation = mat2(1.0, sense, -sense, 1.0);
vector = rotation * vector;
angle -= sense * 7.8539816339744828e-1; // atan(2^-0)
// Iteration 2
sense = (angle < 0.0) ? -1.0 : 1.0;
float factor = sense * 5.0e-1; // 2^-1
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 4.6364760900080609e-1; // atan(2^-1)
// Iteration 3
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 2.5e-1; // 2^-2
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 2.4497866312686414e-1; // atan(2^-2)
// Iteration 4
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 1.25e-1; // 2^-3
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 1.2435499454676144e-1; // atan(2^-3)
// Iteration 5
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 6.25e-2; // 2^-4
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 6.2418809995957350e-2; // atan(2^-4)
// Iteration 6
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 3.125e-2; // 2^-5
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 3.1239833430268277e-2; // atan(2^-5)
// Iteration 7
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 1.5625e-2; // 2^-6
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 1.5623728620476831e-2; // atan(2^-6)
// Iteration 8
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 7.8125e-3; // 2^-7
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 7.8123410601011111e-3; // atan(2^-7)
// Iteration 9
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 3.90625e-3; // 2^-8
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 3.9062301319669718e-3; // atan(2^-8)
// Iteration 10
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 1.953125e-3; // 2^-9
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 1.9531225164788188e-3; // atan(2^-9)
// Iteration 11
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 9.765625e-4; // 2^-10
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 9.7656218955931946e-4; // atan(2^-10)
// Iteration 12
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 4.8828125e-4; // 2^-11
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 4.8828121119489829e-4; // atan(2^-11)
// Iteration 13
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 2.44140625e-4; // 2^-12
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 2.4414062014936177e-4; // atan(2^-12)
// Iteration 14
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 1.220703125e-4; // 2^-13
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 1.2207031189367021e-4; // atan(2^-13)
// Iteration 15
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 6.103515625e-5; // 2^-14
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 6.1035156174208773e-5; // atan(2^-14)
// Iteration 16
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 3.0517578125e-5; // 2^-15
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 3.0517578115526096e-5; // atan(2^-15)
// Iteration 17
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 1.52587890625e-5; // 2^-16
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 1.5258789061315762e-5; // atan(2^-16)
// Iteration 18
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 7.62939453125e-6; // 2^-17
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 7.6293945311019700e-6; // atan(2^-17)
// Iteration 19
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 3.814697265625e-6; // 2^-18
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 3.8146972656064961e-6; // atan(2^-18)
// Iteration 20
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 1.9073486328125e-6; // 2^-19
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 1.9073486328101870e-6; // atan(2^-19)
// Iteration 21
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 9.5367431640625e-7; // 2^-20
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 9.5367431640596084e-7; // atan(2^-20)
// Iteration 22
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 4.76837158203125e-7; // 2^-21
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 4.7683715820308884e-7; // atan(2^-21)
// Iteration 23
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 2.384185791015625e-7; // 2^-22
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
angle -= sense * 2.3841857910155797e-7; // atan(2^-22)
// Iteration 24
sense = (angle < 0.0) ? -1.0 : 1.0;
factor = sense * 1.1920928955078125e-7; // 2^-23
rotation[0][1] = factor;
rotation[1][0] = -factor;
vector = rotation * vector;
// angle -= sense * 1.1920928955078068e-7; // atan(2^-23)
return vector;
}
/**
* Computes the cosine and sine of the provided angle using the CORDIC algorithm.
*
* @name czm_cosineAndSine
* @glslFunction
*
* @param {float} angle The angle in radians.
*
* @returns {vec2} The resulting cosine of the angle (as the x coordinate) and sine of the angle (as the y coordinate).
*
* @example
* vec2 v = czm_cosineAndSine(czm_piOverSix);
* float cosine = v.x;
* float sine = v.y;
*/
vec2 czm_cosineAndSine(float angle)
{
if (angle < -czm_piOverTwo || angle > czm_piOverTwo)
{
if (angle < 0.0)
{
return -cordic(angle + czm_pi);
}
else
{
return -cordic(angle - czm_pi);
}
}
else
{
return cordic(angle);
}
}
`;var KHt=x(T(),1),WG=`/**
* Decodes RGB values packed into a single float at 8-bit precision. Encoded
* representation is equivalent to 0xFFFFFF in JavaScript.
*
* @name czm_decodeRGB8
* @glslFunction
*
* @param {float} encoded Float-encoded RGB values.
* @returns {vec4} Decoded RGB values.
*/
vec4 czm_decodeRGB8(float encoded) {
const float SHIFT_RIGHT16 = 1.0 / 65536.0;
const float SHIFT_RIGHT8 = 1.0 / 256.0;
const float SHIFT_LEFT16 = 65536.0;
const float SHIFT_LEFT8 = 256.0;
vec4 color = vec4(255.0);
color.r = floor(encoded * SHIFT_RIGHT16);
color.g = floor((encoded - color.r * SHIFT_LEFT16) * SHIFT_RIGHT8);
color.b = floor(encoded - color.r * SHIFT_LEFT16 - color.g * SHIFT_LEFT8);
return color / 255.0;
}
`;var jHt=x(T(),1),vG=`/**
* Decompresses texture coordinates that were packed into a single float.
*
* @name czm_decompressTextureCoordinates
* @glslFunction
*
* @param {float} encoded The compressed texture coordinates.
* @returns {vec2} The decompressed texture coordinates.
*/
vec2 czm_decompressTextureCoordinates(float encoded)
{
float temp = encoded / 4096.0;
float xZeroTo4095 = floor(temp);
float stx = xZeroTo4095 / 4095.0;
float sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;
return vec2(stx, sty);
}
`;var qHt=x(T(),1),FG=`// emulated noperspective
#if (__VERSION__ == 300 || defined(GL_EXT_frag_depth)) && !defined(LOG_DEPTH)
out float v_WindowZ;
#endif
/**
* Emulates GL_DEPTH_CLAMP, which is not available in WebGL 1 or 2.
* GL_DEPTH_CLAMP clamps geometry that is outside the near and far planes,
* capping the shadow volume. More information here:
* https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_depth_clamp.txt.
*
* When GL_EXT_frag_depth is available we emulate GL_DEPTH_CLAMP by ensuring
* no geometry gets clipped by setting the clip space z value to 0.0 and then
* sending the unaltered screen space z value (using emulated noperspective
* interpolation) to the frag shader where it is clamped to [0,1] and then
* written with gl_FragDepth (see czm_writeDepthClamp). This technique is based on:
* https://stackoverflow.com/questions/5960757/how-to-emulate-gl-depth-clamp-nv.
*
* When GL_EXT_frag_depth is not available, which is the case on some mobile
* devices, we must attempt to fix this only in the vertex shader.
* The approach is to clamp the z value to the far plane, which closes the
* shadow volume but also distorts the geometry, so there can still be artifacts
* on frustum seams.
*
* @name czm_depthClamp
* @glslFunction
*
* @param {vec4} coords The vertex in clip coordinates.
* @returns {vec4} The modified vertex.
*
* @example
* gl_Position = czm_depthClamp(czm_modelViewProjection * vec4(position, 1.0));
*
* @see czm_writeDepthClamp
*/
vec4 czm_depthClamp(vec4 coords)
{
#ifndef LOG_DEPTH
#if __VERSION__ == 300 || defined(GL_EXT_frag_depth)
v_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;
coords.z = 0.0;
#else
coords.z = min(coords.z, coords.w);
#endif
#endif
return coords;
}
`;var eKt=x(T(),1),IG=`/**
* Computes a 3x3 rotation matrix that transforms vectors from an ellipsoid's east-north-up coordinate system
* to eye coordinates. In east-north-up coordinates, x points east, y points north, and z points along the
* surface normal. East-north-up can be used as an ellipsoid's tangent space for operations such as bump mapping.
* <br /><br />
* The ellipsoid is assumed to be centered at the model coordinate's origin.
*
* @name czm_eastNorthUpToEyeCoordinates
* @glslFunction
*
* @param {vec3} positionMC The position on the ellipsoid in model coordinates.
* @param {vec3} normalEC The normalized ellipsoid surface normal, at <code>positionMC</code>, in eye coordinates.
*
* @returns {mat3} A 3x3 rotation matrix that transforms vectors from the east-north-up coordinate system to eye coordinates.
*
* @example
* // Transform a vector defined in the east-north-up coordinate
* // system, (0, 0, 1) which is the surface normal, to eye
* // coordinates.
* mat3 m = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);
* vec3 normalEC = m * vec3(0.0, 0.0, 1.0);
*/
mat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)
{
vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0)); // normalized surface tangent in model coordinates
vec3 tangentEC = normalize(czm_normal3D * tangentMC); // normalized surface tangent in eye coordinates
vec3 bitangentEC = normalize(cross(normalEC, tangentEC)); // normalized surface bitangent in eye coordinates
return mat3(
tangentEC.x, tangentEC.y, tangentEC.z,
bitangentEC.x, bitangentEC.y, bitangentEC.z,
normalEC.x, normalEC.y, normalEC.z);
}
`;var nKt=x(T(),1),PG=`/**
* DOC_TBA
*
* @name czm_ellipsoidContainsPoint
* @glslFunction
*
*/
bool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)
{
vec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;
return (dot(scaled, scaled) <= 1.0);
}
`;var oKt=x(T(),1),XG=`/**
* Approximate uv coordinates based on the ellipsoid normal.
*
* @name czm_ellipsoidTextureCoordinates
* @glslFunction
*/
vec2 czm_ellipsoidTextureCoordinates(vec3 normal)
{
return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);
}
`;var sKt=x(T(),1),NG=`/**
* Compares <code>left</code> and <code>right</code> componentwise. Returns <code>true</code>
* if they are within <code>epsilon</code> and <code>false</code> otherwise. The inputs
* <code>left</code> and <code>right</code> can be <code>float</code>s, <code>vec2</code>s,
* <code>vec3</code>s, or <code>vec4</code>s.
*
* @name czm_equalsEpsilon
* @glslFunction
*
* @param {} left The first vector.
* @param {} right The second vector.
* @param {float} epsilon The epsilon to use for equality testing.
* @returns {bool} <code>true</code> if the components are within <code>epsilon</code> and <code>false</code> otherwise.
*
* @example
* // GLSL declarations
* bool czm_equalsEpsilon(float left, float right, float epsilon);
* bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon);
* bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon);
* bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon);
*/
bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {
return all(lessThanEqual(abs(left - right), vec4(epsilon)));
}
bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {
return all(lessThanEqual(abs(left - right), vec3(epsilon)));
}
bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {
return all(lessThanEqual(abs(left - right), vec2(epsilon)));
}
bool czm_equalsEpsilon(float left, float right, float epsilon) {
return (abs(left - right) <= epsilon);
}
`;var cKt=x(T(),1),YG=`/**
* DOC_TBA
*
* @name czm_eyeOffset
* @glslFunction
*
* @param {vec4} positionEC DOC_TBA.
* @param {vec3} eyeOffset DOC_TBA.
*
* @returns {vec4} DOC_TBA.
*/
vec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)
{
// This equation is approximate in x and y.
vec4 p = positionEC;
vec4 zEyeOffset = normalize(p) * eyeOffset.z;
p.xy += eyeOffset.xy + zEyeOffset.xy;
p.z += zEyeOffset.z;
return p;
}
`;var dKt=x(T(),1),wG=`/**
* Transforms a position from eye to window coordinates. The transformation
* from eye to clip coordinates is done using {@link czm_projection}.
* The transform from normalized device coordinates to window coordinates is
* done using {@link czm_viewportTransformation}, which assumes a depth range
* of <code>near = 0</code> and <code>far = 1</code>.
* <br /><br />
* This transform is useful when there is a need to manipulate window coordinates
* in a vertex shader as done by {@link BillboardCollection}.
*
* @name czm_eyeToWindowCoordinates
* @glslFunction
*
* @param {vec4} position The position in eye coordinates to transform.
*
* @returns {vec4} The transformed position in window coordinates.
*
* @see czm_modelToWindowCoordinates
* @see czm_projection
* @see czm_viewportTransformation
* @see BillboardCollection
*
* @example
* vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
*/
vec4 czm_eyeToWindowCoordinates(vec4 positionEC)
{
vec4 q = czm_projection * positionEC; // clip coordinates
q.xyz /= q.w; // normalized device coordinates
q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates
return q;
}
`;var mKt=x(T(),1),MG=`/**
* Approxiamtes atan over the range [0, 1]. Safe to flip output for negative input.
*
* Based on Michal Drobot's approximation from ShaderFastLibs, which in turn is based on
* "Efficient approximations for the arctangent function," Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.
* Adapted from ShaderFastLibs under MIT License.
*
* Chosen for the following characteristics over range [0, 1]:
* - basically no error at 0 and 1, important for getting around range limit (naive atan2 via atan requires infinite range atan)
* - no visible artifacts from first-derivative discontinuities, unlike latitude via range-reduced sqrt asin approximations (at equator)
*
* The original code is x * (-0.1784 * abs(x) - 0.0663 * x * x + 1.0301);
* Removed the abs() in here because it isn't needed, the input range is guaranteed as [0, 1] by how we're approximating atan2.
*
* @name czm_fastApproximateAtan
* @glslFunction
*
* @param {float} x Value between 0 and 1 inclusive.
*
* @returns {float} Approximation of atan(x)
*/
float czm_fastApproximateAtan(float x) {
return x * (-0.1784 * x - 0.0663 * x * x + 1.0301);
}
/**
* Approximation of atan2.
*
* Range reduction math based on nvidia's cg reference implementation for atan2: http://developer.download.nvidia.com/cg/atan2.html
* However, we replaced their atan curve with Michael Drobot's (see above).
*
* @name czm_fastApproximateAtan
* @glslFunction
*
* @param {float} x Value between -1 and 1 inclusive.
* @param {float} y Value between -1 and 1 inclusive.
*
* @returns {float} Approximation of atan2(x, y)
*/
float czm_fastApproximateAtan(float x, float y) {
// atan approximations are usually only reliable over [-1, 1], or, in our case, [0, 1] due to modifications.
// So range-reduce using abs and by flipping whether x or y is on top.
float t = abs(x); // t used as swap and atan result.
float opposite = abs(y);
float adjacent = max(t, opposite);
opposite = min(t, opposite);
t = czm_fastApproximateAtan(opposite / adjacent);
// Undo range reduction
t = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);
t = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);
t = czm_branchFreeTernary(y < 0.0, -t, t);
return t;
}
`;var fKt=x(T(),1),kG=`/**
* Gets the color with fog at a distance from the camera.
*
* @name czm_fog
* @glslFunction
*
* @param {float} distanceToCamera The distance to the camera in meters.
* @param {vec3} color The original color.
* @param {vec3} fogColor The color of the fog.
*
* @returns {vec3} The color adjusted for fog at the distance from the camera.
*/
vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)
{
float scalar = distanceToCamera * czm_fogDensity;
float fog = 1.0 - exp(-(scalar * scalar));
return mix(color, fogColor, fog);
}
/**
* Gets the color with fog at a distance from the camera.
*
* @name czm_fog
* @glslFunction
*
* @param {float} distanceToCamera The distance to the camera in meters.
* @param {vec3} color The original color.
* @param {vec3} fogColor The color of the fog.
* @param {float} fogModifierConstant A constant to modify the appearance of fog.
*
* @returns {vec3} The color adjusted for fog at the distance from the camera.
*/
vec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)
{
float scalar = distanceToCamera * czm_fogDensity;
float fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));
return mix(color, fogColor, fog);
}
`;var bKt=x(T(),1),UG=`/**
* Converts a color from RGB space to linear space.
*
* @name czm_gammaCorrect
* @glslFunction
*
* @param {vec3} color The color in RGB space.
* @returns {vec3} The color in linear space.
*/
vec3 czm_gammaCorrect(vec3 color) {
#ifdef HDR
color = pow(color, vec3(czm_gamma));
#endif
return color;
}
vec4 czm_gammaCorrect(vec4 color) {
#ifdef HDR
color.rgb = pow(color.rgb, vec3(czm_gamma));
#endif
return color;
}
`;var yKt=x(T(),1),DG=`/**
* DOC_TBA
*
* @name czm_geodeticSurfaceNormal
* @glslFunction
*
* @param {vec3} positionOnEllipsoid DOC_TBA
* @param {vec3} ellipsoidCenter DOC_TBA
* @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA
*
* @returns {vec3} DOC_TBA.
*/
vec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)
{
return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);
}
`;var TKt=x(T(),1),OG=`/**
* An czm_material with default values. Every material's czm_getMaterial
* should use this default material as a base for the material it returns.
* The default normal value is given by materialInput.normalEC.
*
* @name czm_getDefaultMaterial
* @glslFunction
*
* @param {czm_materialInput} input The input used to construct the default material.
*
* @returns {czm_material} The default material.
*
* @see czm_materialInput
* @see czm_material
* @see czm_getMaterial
*/
czm_material czm_getDefaultMaterial(czm_materialInput materialInput)
{
czm_material material;
material.diffuse = vec3(0.0);
material.specular = 0.0;
material.shininess = 1.0;
material.normal = materialInput.normalEC;
material.emission = vec3(0.0);
material.alpha = 1.0;
return material;
}
`;var SKt=x(T(),1),BG=`/**
* Select which direction vector to use for dynamic atmosphere lighting based on an enum value
*
* @name czm_getDynamicAtmosphereLightDirection
* @glslfunction
* @see DynamicAtmosphereLightingType.js
*
* @param {vec3} positionWC the position of the vertex/fragment in world coordinates. This is normalized and returned when dynamic lighting is turned off.
* @param {float} lightEnum The enum value for selecting between light sources.
* @return {vec3} The normalized light direction vector. Depending on the enum value, it is either positionWC, czm_lightDirectionWC or czm_sunDirectionWC
*/
vec3 czm_getDynamicAtmosphereLightDirection(vec3 positionWC, float lightEnum) {
const float NONE = 0.0;
const float SCENE_LIGHT = 1.0;
const float SUNLIGHT = 2.0;
vec3 lightDirection =
positionWC * float(lightEnum == NONE) +
czm_lightDirectionWC * float(lightEnum == SCENE_LIGHT) +
czm_sunDirectionWC * float(lightEnum == SUNLIGHT);
return normalize(lightDirection);
}
`;var ZKt=x(T(),1),zG=`/**
* Calculates the intensity of diffusely reflected light.
*
* @name czm_getLambertDiffuse
* @glslFunction
*
* @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
* @param {vec3} normalEC The surface normal in eye coordinates.
*
* @returns {float} The intensity of the diffuse reflection.
*
* @see czm_phong
*
* @example
* float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);
* float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);
* vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);
*/
float czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)
{
return max(dot(lightDirectionEC, normalEC), 0.0);
}
`;var VKt=x(T(),1),HG=`/**
* Calculates the specular intensity of reflected light.
*
* @name czm_getSpecular
* @glslFunction
*
* @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
* @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates.
* @param {vec3} normalEC The surface normal in eye coordinates.
* @param {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.
*
* @returns {float} The intensity of the specular highlight.
*
* @see czm_phong
*
* @example
* float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);
* float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);
* vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);
*/
float czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)
{
vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);
float specular = max(dot(toReflectedLight, toEyeEC), 0.0);
// pow has undefined behavior if both parameters <= 0.
// Prevent this by making sure shininess is at least czm_epsilon2.
return pow(specular, max(shininess, czm_epsilon2));
}
`;var EKt=x(T(),1),KG=`/**
* @private
*/
vec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)
{
float cosAngle = cos(angleInRadians);
float sinAngle = sin(angleInRadians);
// time dependent sampling directions
vec2 s0 = vec2(1.0/17.0, 0.0);
vec2 s1 = vec2(-1.0/29.0, 0.0);
vec2 s2 = vec2(1.0/101.0, 1.0/59.0);
vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);
// rotate sampling direction by specified angle
s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));
s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));
s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));
s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));
vec2 uv0 = (uv/103.0) + (time * s0);
vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);
vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);
vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);
uv0 = fract(uv0);
uv1 = fract(uv1);
uv2 = fract(uv2);
uv3 = fract(uv3);
vec4 noise = (texture(normalMap, uv0)) +
(texture(normalMap, uv1)) +
(texture(normalMap, uv2)) +
(texture(normalMap, uv3));
// average and scale to between -1 and 1
return ((noise / 4.0) - 0.5) * 2.0;
}
`;var LKt=x(T(),1),JG=`/**
* Adjusts the hue of a color.
*
* @name czm_hue
* @glslFunction
*
* @param {vec3} rgb The color.
* @param {float} adjustment The amount to adjust the hue of the color in radians.
*
* @returns {float} The color with the hue adjusted.
*
* @example
* vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)
*/
vec3 czm_hue(vec3 rgb, float adjustment)
{
const mat3 toYIQ = mat3(0.299, 0.587, 0.114,
0.595716, -0.274453, -0.321263,
0.211456, -0.522591, 0.311135);
const mat3 toRGB = mat3(1.0, 0.9563, 0.6210,
1.0, -0.2721, -0.6474,
1.0, -1.107, 1.7046);
vec3 yiq = toYIQ * rgb;
float hue = atan(yiq.z, yiq.y) + adjustment;
float chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);
vec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));
return toRGB * color;
}
`;var vKt=x(T(),1),jG=`/**
* Converts a color in linear space to RGB space.
*
* @name czm_inverseGamma
* @glslFunction
*
* @param {vec3} color The color in linear space.
* @returns {vec3} The color in RGB space.
*/
vec3 czm_inverseGamma(vec3 color) {
return pow(color, vec3(1.0 / czm_gamma));
}
`;var IKt=x(T(),1),QG=`/**
* Determines if a time interval is empty.
*
* @name czm_isEmpty
* @glslFunction
*
* @param {czm_raySegment} interval The interval to test.
*
* @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.
*
* @example
* bool b0 = czm_isEmpty(czm_emptyRaySegment); // true
* bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false
* bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.
*/
bool czm_isEmpty(czm_raySegment interval)
{
return (interval.stop < 0.0);
}
`;var XKt=x(T(),1),qG=`/**
* Determines if a time interval is empty.
*
* @name czm_isFull
* @glslFunction
*
* @param {czm_raySegment} interval The interval to test.
*
* @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.
*
* @example
* bool b0 = czm_isEmpty(czm_emptyRaySegment); // true
* bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false
* bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.
*/
bool czm_isFull(czm_raySegment interval)
{
return (interval.start == 0.0 && interval.stop == czm_infinity);
}
`;var YKt=x(T(),1),$G=`/**
* Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located.
*
* @name czm_latitudeToWebMercatorFraction
* @glslFunction
*
* @param {float} latitude The geodetic latitude, in radians.
* @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle.
* @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates.
*
* @returns {float} The fraction of the rectangle at which the latitude occurs. If the latitude is the southern
* boundary of the rectangle, the return value will be zero. If it is the northern boundary, the return
* value will be 1.0. Latitudes in between are mapped according to the Web Mercator projection.
*/
float czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)
{
float sinLatitude = sin(latitude);
float mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));
return (mercatorY - southMercatorY) * oneOverMercatorHeight;
}
`;var MKt=x(T(),1),eL=`/**
* Computes distance from an point in 2D to a line in 2D.
*
* @name czm_lineDistance
* @glslFunction
*
* param {vec2} point1 A point along the line.
* param {vec2} point2 A point along the line.
* param {vec2} point A point that may or may not be on the line.
* returns {float} The distance from the point to the line.
*/
float czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {
return abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);
}
`;var UKt=x(T(),1),tL=`/**
* Converts a linear RGB color to an sRGB color.
*
* @param {vec3|vec4} linearIn The color in linear color space.
* @returns {vec3|vec4} The color in sRGB color space. The vector type matches the input.
*/
vec3 czm_linearToSrgb(vec3 linearIn)
{
return pow(linearIn, vec3(1.0/2.2));
}
vec4 czm_linearToSrgb(vec4 linearIn)
{
vec3 srgbOut = pow(linearIn.rgb, vec3(1.0/2.2));
return vec4(srgbOut, linearIn.a);
}
`;var OKt=x(T(),1),nL=`/**
* Computes the luminance of a color.
*
* @name czm_luminance
* @glslFunction
*
* @param {vec3} rgb The color.
*
* @returns {float} The luminance.
*
* @example
* float light = czm_luminance(vec3(0.0)); // 0.0
* float dark = czm_luminance(vec3(1.0)); // ~1.0
*/
float czm_luminance(vec3 rgb)
{
// Algorithm from Chapter 10 of Graphics Shaders.
const vec3 W = vec3(0.2125, 0.7154, 0.0721);
return dot(rgb, W);
}
`;var zKt=x(T(),1),iL=`/**
* Find the maximum component of a vector.
*
* @name czm_maximumComponent
* @glslFunction
*
* @param {vec2|vec3|vec4} v The input vector.
* @returns {float} The value of the largest component.
*/
float czm_maximumComponent(vec2 v)
{
return max(v.x, v.y);
}
float czm_maximumComponent(vec3 v)
{
return max(max(v.x, v.y), v.z);
}
float czm_maximumComponent(vec4 v)
{
return max(max(max(v.x, v.y), v.z), v.w);
}
`;var KKt=x(T(),1),oL=`/**
* Computes the size of a pixel in meters at a distance from the eye.
* <p>
* Use this version when passing in a custom pixel ratio. For example, passing in 1.0 will return meters per native device pixel.
* </p>
* @name czm_metersPerPixel
* @glslFunction
*
* @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.
* @param {float} pixelRatio The scaling factor from pixel space to coordinate space
*
* @returns {float} The meters per pixel at positionEC.
*/
float czm_metersPerPixel(vec4 positionEC, float pixelRatio)
{
float width = czm_viewport.z;
float height = czm_viewport.w;
float pixelWidth;
float pixelHeight;
float top = czm_frustumPlanes.x;
float bottom = czm_frustumPlanes.y;
float left = czm_frustumPlanes.z;
float right = czm_frustumPlanes.w;
if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)
{
float frustumWidth = right - left;
float frustumHeight = top - bottom;
pixelWidth = frustumWidth / width;
pixelHeight = frustumHeight / height;
}
else
{
float distanceToPixel = -positionEC.z;
float inverseNear = 1.0 / czm_currentFrustum.x;
float tanTheta = top * inverseNear;
pixelHeight = 2.0 * distanceToPixel * tanTheta / height;
tanTheta = right * inverseNear;
pixelWidth = 2.0 * distanceToPixel * tanTheta / width;
}
return max(pixelWidth, pixelHeight) * pixelRatio;
}
/**
* Computes the size of a pixel in meters at a distance from the eye.
* <p>
* Use this version when scaling by pixel ratio.
* </p>
* @name czm_metersPerPixel
* @glslFunction
*
* @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.
*
* @returns {float} The meters per pixel at positionEC.
*/
float czm_metersPerPixel(vec4 positionEC)
{
return czm_metersPerPixel(positionEC, czm_pixelRatio);
}
`;var jKt=x(T(),1),rL=`/**
* Transforms a position from model to window coordinates. The transformation
* from model to clip coordinates is done using {@link czm_modelViewProjection}.
* The transform from normalized device coordinates to window coordinates is
* done using {@link czm_viewportTransformation}, which assumes a depth range
* of <code>near = 0</code> and <code>far = 1</code>.
* <br /><br />
* This transform is useful when there is a need to manipulate window coordinates
* in a vertex shader as done by {@link BillboardCollection}.
* <br /><br />
* This function should not be confused with {@link czm_viewportOrthographic},
* which is an orthographic projection matrix that transforms from window
* coordinates to clip coordinates.
*
* @name czm_modelToWindowCoordinates
* @glslFunction
*
* @param {vec4} position The position in model coordinates to transform.
*
* @returns {vec4} The transformed position in window coordinates.
*
* @see czm_eyeToWindowCoordinates
* @see czm_modelViewProjection
* @see czm_viewportTransformation
* @see czm_viewportOrthographic
* @see BillboardCollection
*
* @example
* vec4 positionWC = czm_modelToWindowCoordinates(positionMC);
*/
vec4 czm_modelToWindowCoordinates(vec4 position)
{
vec4 positionEC = czm_modelView * position;
vec4 q = czm_projection * positionEC;
q.xyz /= q.w; // normalized device coordinates
q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates
return q;
}
`;var qKt=x(T(),1),sL=`/**
* DOC_TBA
*
* @name czm_multiplyWithColorBalance
* @glslFunction
*/
vec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)
{
// Algorithm from Chapter 10 of Graphics Shaders.
const vec3 W = vec3(0.2125, 0.7154, 0.0721);
vec3 target = left * right;
float leftLuminance = dot(left, W);
float rightLuminance = dot(right, W);
float targetLuminance = dot(target, W);
return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;
}
`;var eJt=x(T(),1),aL=`/**
* Computes a value that scales with distance. The scaling is clamped at the near and
* far distances, and does not extrapolate. This function works with the
* {@link NearFarScalar} JavaScript class.
*
* @name czm_nearFarScalar
* @glslFunction
*
* @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w).
* @param {float} cameraDistSq The square of the current distance from the camera.
*
* @returns {float} The value at this distance.
*/
float czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)
{
float valueAtMin = nearFarScalar.y;
float valueAtMax = nearFarScalar.w;
float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;
float farDistanceSq = nearFarScalar.z * nearFarScalar.z;
float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);
t = pow(clamp(t, 0.0, 1.0), 0.2);
return mix(valueAtMin, valueAtMax, t);
}
`;var nJt=x(T(),1),cL=` /**
* Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.
* The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
* Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
*
* @name czm_octDecode
* @param {vec2} encoded The oct-encoded, unit-length vector
* @param {float} range The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.
* @returns {vec3} The decoded and normalized vector
*/
vec3 czm_octDecode(vec2 encoded, float range)
{
if (encoded.x == 0.0 && encoded.y == 0.0) {
return vec3(0.0, 0.0, 0.0);
}
encoded = encoded / range * 2.0 - 1.0;
vec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));
if (v.z < 0.0)
{
v.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);
}
return normalize(v);
}
/**
* Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.
* The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
* Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
*
* @name czm_octDecode
* @param {vec2} encoded The oct-encoded, unit-length vector
* @returns {vec3} The decoded and normalized vector
*/
vec3 czm_octDecode(vec2 encoded)
{
return czm_octDecode(encoded, 255.0);
}
/**
* Decodes a unit-length vector in 'oct' encoding packed into a floating-point number to a normalized 3-component Cartesian vector.
* The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
* Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
*
* @name czm_octDecode
* @param {float} encoded The oct-encoded, unit-length vector
* @returns {vec3} The decoded and normalized vector
*/
vec3 czm_octDecode(float encoded)
{
float temp = encoded / 256.0;
float x = floor(temp);
float y = (temp - x) * 256.0;
return czm_octDecode(vec2(x, y));
}
/**
* Decodes three unit-length vectors in 'oct' encoding packed into two floating-point numbers to normalized 3-component Cartesian vectors.
* The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
* Cigolle et al 2014: http://jcgt.org/published/0003/02/01/
*
* @name czm_octDecode
* @param {vec2} encoded The packed oct-encoded, unit-length vectors.
* @param {vec3} vector1 One decoded and normalized vector.
* @param {vec3} vector2 One decoded and normalized vector.
* @param {vec3} vector3 One decoded and normalized vector.
*/
void czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)
{
float temp = encoded.x / 65536.0;
float x = floor(temp);
float encodedFloat1 = (temp - x) * 65536.0;
temp = encoded.y / 65536.0;
float y = floor(temp);
float encodedFloat2 = (temp - y) * 65536.0;
vector1 = czm_octDecode(encodedFloat1);
vector2 = czm_octDecode(encodedFloat2);
vector3 = czm_octDecode(vec2(x, y));
}
`;var oJt=x(T(),1),lL=`/**
* Packs a depth value into a vec4 that can be represented by unsigned bytes.
*
* @name czm_packDepth
* @glslFunction
*
* @param {float} depth The floating-point depth.
* @returns {vec4} The packed depth.
*/
vec4 czm_packDepth(float depth)
{
// See Aras Pranckevi\u010Dius' post Encoding Floats to RGBA
// http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/
vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;
enc = fract(enc);
enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);
return enc;
}
`;var sJt=x(T(),1),dL=`vec3 lambertianDiffuse(vec3 diffuseColor)
{
return diffuseColor / czm_pi;
}
vec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)
{
float versine = 1.0 - VdotH;
// pow(versine, 5.0) is slow. See https://stackoverflow.com/a/68793086/10082269
float versineSquared = versine * versine;
return f0 + (f90 - f0) * versineSquared * versineSquared * versine;
}
#ifdef USE_ANISOTROPY
/**
* @param {float} bitangentRoughness Material roughness (along the anisotropy bitangent)
* @param {float} tangentialRoughness Anisotropic roughness (along the anisotropy tangent)
* @param {vec3} lightDirection The direction from the fragment to the light source, transformed to tangent-bitangent-normal coordinates
* @param {vec3} viewDirection The direction from the fragment to the camera, transformed to tangent-bitangent-normal coordinates
*/
float smithVisibilityGGX_anisotropic(float bitangentRoughness, float tangentialRoughness, vec3 lightDirection, vec3 viewDirection)
{
vec3 roughnessScale = vec3(tangentialRoughness, bitangentRoughness, 1.0);
float GGXV = lightDirection.z * length(roughnessScale * viewDirection);
float GGXL = viewDirection.z * length(roughnessScale * lightDirection);
float v = 0.5 / (GGXV + GGXL);
return clamp(v, 0.0, 1.0);
}
/**
* @param {float} bitangentRoughness Material roughness (along the anisotropy bitangent)
* @param {float} tangentialRoughness Anisotropic roughness (along the anisotropy tangent)
* @param {vec3} halfwayDirection The unit vector halfway between light and view directions, transformed to tangent-bitangent-normal coordinates
*/
float GGX_anisotropic(float bitangentRoughness, float tangentialRoughness, vec3 halfwayDirection)
{
float roughnessSquared = bitangentRoughness * tangentialRoughness;
vec3 f = halfwayDirection * vec3(bitangentRoughness, tangentialRoughness, roughnessSquared);
float w2 = roughnessSquared / dot(f, f);
return roughnessSquared * w2 * w2 / czm_pi;
}
#endif
/**
* Estimate the geometric self-shadowing of the microfacets in a surface,
* using the Smith Joint GGX visibility function.
* Note: Vis = G / (4 * NdotL * NdotV)
* see Eric Heitz. 2014. Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs. Journal of Computer Graphics Techniques, 3
* see Real-Time Rendering. Page 331 to 336.
* see https://google.github.io/filament/Filament.md.html#materialsystem/specularbrdf/geometricshadowing(specularg)
*
* @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
* @param {float} NdotL The cosine of the angle between the surface normal and the direction to the light source.
* @param {float} NdotV The cosine of the angle between the surface normal and the direction to the camera.
*/
float smithVisibilityGGX(float alphaRoughness, float NdotL, float NdotV)
{
float alphaRoughnessSq = alphaRoughness * alphaRoughness;
float GGXV = NdotL * sqrt(NdotV * NdotV * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
float GGXL = NdotV * sqrt(NdotL * NdotL * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
float GGX = GGXV + GGXL;
if (GGX > 0.0)
{
return 0.5 / GGX;
}
return 0.0;
}
/**
* Estimate the fraction of the microfacets in a surface that are aligned with
* the halfway vector, which is aligned halfway between the directions from
* the fragment to the camera and from the fragment to the light source.
*
* @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
* @param {float} NdotH The cosine of the angle between the surface normal and the halfway vector.
* @return {float} The fraction of microfacets aligned to the halfway vector.
*/
float GGX(float alphaRoughness, float NdotH)
{
float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
float f = (NdotH * alphaRoughnessSquared - NdotH) * NdotH + 1.0;
return alphaRoughnessSquared / (czm_pi * f * f);
}
/**
* Compute the strength of the specular reflection due to direct lighting.
*
* @param {vec3} normal The surface normal.
* @param {vec3} lightDirection The unit vector pointing from the fragment to the light source.
* @param {vec3} viewDirection The unit vector pointing from the fragment to the camera.
* @param {vec3} halfwayDirection The unit vector pointing from the fragment to halfway between the light source and the camera.
* @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
* @return {float} The strength of the specular reflection.
*/
float computeDirectSpecularStrength(vec3 normal, vec3 lightDirection, vec3 viewDirection, vec3 halfwayDirection, float alphaRoughness)
{
float NdotL = clamp(dot(normal, lightDirection), 0.0, 1.0);
float NdotV = clamp(dot(normal, viewDirection), 0.0, 1.0);
float G = smithVisibilityGGX(alphaRoughness, NdotL, NdotV);
float NdotH = clamp(dot(normal, halfwayDirection), 0.0, 1.0);
float D = GGX(alphaRoughness, NdotH);
return G * D;
}
/**
* Compute the diffuse and specular contributions using physically based
* rendering. This function only handles direct lighting.
* <p>
* This function only handles the lighting calculations. Metallic/roughness
* and specular/glossy must be handled separately. See {@MaterialStageFS}
* </p>
*
* @name czm_pbrLighting
* @glslFunction
*
* @param {vec3} viewDirectionEC Unit vector pointing from the fragment to the eye position
* @param {vec3} normalEC The surface normal in eye coordinates
* @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.
* @param {czm_modelMaterial} The material properties.
* @return {vec3} The computed HDR color
*/
vec3 czm_pbrLighting(vec3 viewDirectionEC, vec3 normalEC, vec3 lightDirectionEC, czm_modelMaterial material)
{
vec3 halfwayDirectionEC = normalize(viewDirectionEC + lightDirectionEC);
float VdotH = clamp(dot(viewDirectionEC, halfwayDirectionEC), 0.0, 1.0);
float NdotL = clamp(dot(normalEC, lightDirectionEC), 0.001, 1.0);
vec3 f0 = material.specular;
float reflectance = czm_maximumComponent(f0);
// Typical dielectrics will have reflectance 0.04, so f90 will be 1.0.
// In this case, at grazing angle, all incident energy is reflected.
vec3 f90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));
vec3 F = fresnelSchlick2(f0, f90, VdotH);
#if defined(USE_SPECULAR)
F *= material.specularWeight;
#endif
float alphaRoughness = material.roughness * material.roughness;
#ifdef USE_ANISOTROPY
mat3 tbn = mat3(material.anisotropicT, material.anisotropicB, normalEC);
vec3 lightDirection = lightDirectionEC * tbn;
vec3 viewDirection = viewDirectionEC * tbn;
vec3 halfwayDirection = halfwayDirectionEC * tbn;
float anisotropyStrength = material.anisotropyStrength;
float tangentialRoughness = mix(alphaRoughness, 1.0, anisotropyStrength * anisotropyStrength);
float bitangentRoughness = clamp(alphaRoughness, 0.001, 1.0);
float G = smithVisibilityGGX_anisotropic(bitangentRoughness, tangentialRoughness, lightDirection, viewDirection);
float D = GGX_anisotropic(bitangentRoughness, tangentialRoughness, halfwayDirection);
vec3 specularContribution = F * G * D;
#else
float specularStrength = computeDirectSpecularStrength(normalEC, lightDirectionEC, viewDirectionEC, halfwayDirectionEC, alphaRoughness);
vec3 specularContribution = F * specularStrength;
#endif
vec3 diffuseColor = material.diffuse;
// F here represents the specular contribution
vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);
// Lo = (diffuse + specular) * Li * NdotL
return (diffuseContribution + specularContribution) * NdotL;
}
`;var cJt=x(T(),1),uL=`// KhronosGroup https://github.com/KhronosGroup/ToneMapping/tree/main/PBR_Neutral
// Input color is non-negative and resides in the Linear Rec. 709 color space.
// Output color is also Linear Rec. 709, but in the [0, 1] range.
vec3 czm_pbrNeutralTonemapping(vec3 color) {
const float startCompression = 0.8 - 0.04;
const float desaturation = 0.15;
float x = min(color.r, min(color.g, color.b));
float offset = czm_branchFreeTernary(x < 0.08, x - 6.25 * x * x, 0.04);
color -= offset;
float peak = max(color.r, max(color.g, color.b));
if (peak < startCompression) return color;
const float d = 1.0 - startCompression;
float newPeak = 1.0 - d * d / (peak + d - startCompression);
color *= newPeak / peak;
float g = 1.0 - 1.0 / (desaturation * (peak - newPeak) + 1.0);
return mix(color, newPeak * vec3(1.0, 1.0, 1.0), g);
}
`;var dJt=x(T(),1),mL=`float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)
{
return czm_getLambertDiffuse(lightDirectionEC, material.normal);
}
float czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)
{
return czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);
}
/**
* Computes a color using the Phong lighting model.
*
* @name czm_phong
* @glslFunction
*
* @param {vec3} toEye A normalized vector from the fragment to the eye in eye coordinates.
* @param {czm_material} material The fragment's material.
*
* @returns {vec4} The computed color.
*
* @example
* vec3 positionToEyeEC = // ...
* czm_material material = // ...
* vec3 lightDirectionEC = // ...
* out_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC);
*
* @see czm_getMaterial
*/
vec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
{
// Diffuse from directional light sources at eye (for top-down)
float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);
if (czm_sceneMode == czm_sceneMode3D) {
// (and horizon views in 3D)
diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);
}
float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);
// Temporary workaround for adding ambient.
vec3 materialDiffuse = material.diffuse * 0.5;
vec3 ambient = materialDiffuse;
vec3 color = ambient + material.emission;
color += materialDiffuse * diffuse * czm_lightColor;
color += material.specular * specular * czm_lightColor;
return vec4(color, material.alpha);
}
vec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
{
float diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);
float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);
vec3 ambient = vec3(0.0);
vec3 color = ambient + material.emission;
color += material.diffuse * diffuse * czm_lightColor;
color += material.specular * specular * czm_lightColor;
return vec4(color, material.alpha);
}
`;var mJt=x(T(),1),hL=`/**
* Computes distance from a point to a plane.
*
* @name czm_planeDistance
* @glslFunction
*
* param {vec4} plane A Plane in Hessian Normal Form. See Plane.js
* param {vec3} point A point in the same space as the plane.
* returns {float} The distance from the point to the plane.
*/
float czm_planeDistance(vec4 plane, vec3 point) {
return (dot(plane.xyz, point) + plane.w);
}
/**
* Computes distance from a point to a plane.
*
* @name czm_planeDistance
* @glslFunction
*
* param {vec3} planeNormal Normal for a plane in Hessian Normal Form. See Plane.js
* param {float} planeDistance Distance for a plane in Hessian Normal form. See Plane.js
* param {vec3} point A point in the same space as the plane.
* returns {float} The distance from the point to the plane.
*/
float czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {
return (dot(planeNormal, point) + planeDistance);
}
`;var fJt=x(T(),1),fL=`/**
* Computes the point along a ray at the given time. <code>time</code> can be positive, negative, or zero.
*
* @name czm_pointAlongRay
* @glslFunction
*
* @param {czm_ray} ray The ray to compute the point along.
* @param {float} time The time along the ray.
*
* @returns {vec3} The point along the ray at the given time.
*
* @example
* czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction
* vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0)
*/
vec3 czm_pointAlongRay(czm_ray ray, float time)
{
return ray.origin + (time * ray.direction);
}
`;var bJt=x(T(),1),pL=`/**
* DOC_TBA
*
* @name czm_rayEllipsoidIntersectionInterval
* @glslFunction
*/
czm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)
{
// ray and ellipsoid center in eye coordinates. radii in model coordinates.
vec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;
vec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;
q = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;
float q2 = dot(q, q);
float qw = dot(q, w);
if (q2 > 1.0) // Outside ellipsoid.
{
if (qw >= 0.0) // Looking outward or tangent (0 intersections).
{
return czm_emptyRaySegment;
}
else // qw < 0.0.
{
float qw2 = qw * qw;
float difference = q2 - 1.0; // Positively valued.
float w2 = dot(w, w);
float product = w2 * difference;
if (qw2 < product) // Imaginary roots (0 intersections).
{
return czm_emptyRaySegment;
}
else if (qw2 > product) // Distinct roots (2 intersections).
{
float discriminant = qw * qw - product;
float temp = -qw + sqrt(discriminant); // Avoid cancellation.
float root0 = temp / w2;
float root1 = difference / temp;
if (root0 < root1)
{
czm_raySegment i = czm_raySegment(root0, root1);
return i;
}
else
{
czm_raySegment i = czm_raySegment(root1, root0);
return i;
}
}
else // qw2 == product. Repeated roots (2 intersections).
{
float root = sqrt(difference / w2);
czm_raySegment i = czm_raySegment(root, root);
return i;
}
}
}
else if (q2 < 1.0) // Inside ellipsoid (2 intersections).
{
float difference = q2 - 1.0; // Negatively valued.
float w2 = dot(w, w);
float product = w2 * difference; // Negatively valued.
float discriminant = qw * qw - product;
float temp = -qw + sqrt(discriminant); // Positively valued.
czm_raySegment i = czm_raySegment(0.0, temp / w2);
return i;
}
else // q2 == 1.0. On ellipsoid.
{
if (qw < 0.0) // Looking inward.
{
float w2 = dot(w, w);
czm_raySegment i = czm_raySegment(0.0, -qw / w2);
return i;
}
else // qw >= 0.0. Looking outward or tangent.
{
return czm_emptyRaySegment;
}
}
}
`;var yJt=x(T(),1),bL=`/**
* Compute the intersection interval of a ray with a sphere.
*
* @name czm_raySphereIntersectionInterval
* @glslFunction
*
* @param {czm_ray} ray The ray.
* @param {vec3} center The center of the sphere.
* @param {float} radius The radius of the sphere.
* @return {czm_raySegment} The intersection interval of the ray with the sphere.
*/
czm_raySegment czm_raySphereIntersectionInterval(czm_ray ray, vec3 center, float radius)
{
vec3 o = ray.origin;
vec3 d = ray.direction;
vec3 oc = o - center;
float a = dot(d, d);
float b = 2.0 * dot(d, oc);
float c = dot(oc, oc) - (radius * radius);
float det = (b * b) - (4.0 * a * c);
if (det < 0.0) {
return czm_emptyRaySegment;
}
float sqrtDet = sqrt(det);
float t0 = (-b - sqrtDet) / (2.0 * a);
float t1 = (-b + sqrtDet) / (2.0 * a);
czm_raySegment result = czm_raySegment(t0, t1);
return result;
}
`;var TJt=x(T(),1),gL=`float czm_readDepth(sampler2D depthTexture, vec2 texCoords)
{
return czm_reverseLogDepth(texture(depthTexture, texCoords).r);
}
`;var SJt=x(T(),1),yL=`/**
* Reads a value previously transformed with {@link czm_writeNonPerspective}
* by dividing it by \`w\`, the value used in the perspective divide.
* This function is intended to be called in a fragment shader to access a
* \`varying\` that should not be subject to perspective interpolation.
* For example, screen-space texture coordinates. The value should have been
* previously written in the vertex shader with a call to
* {@link czm_writeNonPerspective}.
*
* @name czm_readNonPerspective
* @glslFunction
*
* @param {float|vec2|vec3|vec4} value The non-perspective value to be read.
* @param {float} oneOverW One over the perspective divide value, \`w\`. Usually this is simply \`gl_FragCoord.w\`.
* @returns {float|vec2|vec3|vec4} The usable value.
*/
float czm_readNonPerspective(float value, float oneOverW) {
return value * oneOverW;
}
vec2 czm_readNonPerspective(vec2 value, float oneOverW) {
return value * oneOverW;
}
vec3 czm_readNonPerspective(vec3 value, float oneOverW) {
return value * oneOverW;
}
vec4 czm_readNonPerspective(vec4 value, float oneOverW) {
return value * oneOverW;
}
`;var ZJt=x(T(),1),xL=`float czm_reverseLogDepth(float logZ)
{
#ifdef LOG_DEPTH
float near = czm_currentFrustum.x;
float far = czm_currentFrustum.y;
float log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;
float depthFromNear = exp2(log2Depth) - 1.0;
return far * (1.0 - near / (depthFromNear + near)) / (far - near);
#endif
return logZ;
}
`;var VJt=x(T(),1),TL=`/**
* Round a floating point value. This function exists because round() doesn't
* exist in GLSL 1.00.
*
* @param {float|vec2|vec3|vec4} value The value to round
* @param {float|vec2|vec3|vec3} The rounded value. The type matches the input.
*/
float czm_round(float value) {
return floor(value + 0.5);
}
vec2 czm_round(vec2 value) {
return floor(value + 0.5);
}
vec3 czm_round(vec3 value) {
return floor(value + 0.5);
}
vec4 czm_round(vec4 value) {
return floor(value + 0.5);
}
`;var EJt=x(T(),1),_L=`/**
* Adjusts the saturation of a color.
*
* @name czm_saturation
* @glslFunction
*
* @param {vec3} rgb The color.
* @param {float} adjustment The amount to adjust the saturation of the color.
*
* @returns {float} The color with the saturation adjusted.
*
* @example
* vec3 greyScale = czm_saturation(color, 0.0);
* vec3 doubleSaturation = czm_saturation(color, 2.0);
*/
vec3 czm_saturation(vec3 rgb, float adjustment)
{
// Algorithm from Chapter 16 of OpenGL Shading Language
const vec3 W = vec3(0.2125, 0.7154, 0.0721);
vec3 intensity = vec3(dot(rgb, W));
return mix(intensity, rgb, adjustment);
}
`;var LJt=x(T(),1),SL=`
float czm_sampleShadowMap(highp samplerCube shadowMap, vec3 d)
{
return czm_unpackDepth(czm_textureCube(shadowMap, d));
}
float czm_sampleShadowMap(highp sampler2D shadowMap, vec2 uv)
{
#ifdef USE_SHADOW_DEPTH_TEXTURE
return texture(shadowMap, uv).r;
#else
return czm_unpackDepth(texture(shadowMap, uv));
#endif
}
float czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)
{
return step(depth, czm_sampleShadowMap(shadowMap, uv));
}
float czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)
{
return step(depth, czm_sampleShadowMap(shadowMap, uv));
}
`;var vJt=x(T(),1),AL=`
float czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)
{
#ifdef USE_NORMAL_SHADING
#ifdef USE_NORMAL_SHADING_SMOOTH
float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);
#else
float strength = step(0.0, nDotL);
#endif
visibility *= strength;
#endif
visibility = max(visibility, darkness);
return visibility;
}
#ifdef USE_CUBE_MAP_SHADOW
float czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)
{
float depthBias = shadowParameters.depthBias;
float depth = shadowParameters.depth;
float nDotL = shadowParameters.nDotL;
float normalShadingSmooth = shadowParameters.normalShadingSmooth;
float darkness = shadowParameters.darkness;
vec3 uvw = shadowParameters.texCoords;
depth -= depthBias;
float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);
return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);
}
#else
float czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)
{
float depthBias = shadowParameters.depthBias;
float depth = shadowParameters.depth;
float nDotL = shadowParameters.nDotL;
float normalShadingSmooth = shadowParameters.normalShadingSmooth;
float darkness = shadowParameters.darkness;
vec2 uv = shadowParameters.texCoords;
depth -= depthBias;
#ifdef USE_SOFT_SHADOWS
vec2 texelStepSize = shadowParameters.texelStepSize;
float radius = 1.0;
float dx0 = -texelStepSize.x * radius;
float dy0 = -texelStepSize.y * radius;
float dx1 = texelStepSize.x * radius;
float dy1 = texelStepSize.y * radius;
float visibility = (
czm_shadowDepthCompare(shadowMap, uv, depth) +
czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +
czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +
czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +
czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +
czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +
czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +
czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +
czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)
) * (1.0 / 9.0);
#else
float visibility = czm_shadowDepthCompare(shadowMap, uv, depth);
#endif
return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);
}
#endif
`;var IJt=x(T(),1),ZL=`/**
* Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative. This is similar to the GLSL
* built-in function <code>sign</code> except that returns 1.0 instead of 0.0 when the input value is 0.0.
*
* @name czm_signNotZero
* @glslFunction
*
* @param {} value The value for which to determine the sign.
* @returns {} 1.0 if the value is positive or zero, -1.0 if the value is negative.
*/
float czm_signNotZero(float value)
{
return value >= 0.0 ? 1.0 : -1.0;
}
vec2 czm_signNotZero(vec2 value)
{
return vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));
}
vec3 czm_signNotZero(vec3 value)
{
return vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));
}
vec4 czm_signNotZero(vec4 value)
{
return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));
}
`;var XJt=x(T(),1),CL=`/**
* Computes a color from the third order spherical harmonic coefficients and a normalized direction vector.
* <p>
* The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22].
* </p>
*
* @name czm_sphericalHarmonics
* @glslFunction
*
* @param {vec3} normal The normalized direction.
* @param {vec3[9]} coefficients The third order spherical harmonic coefficients.
* @returns {vec3} The color at the direction.
*
* @see https://graphics.stanford.edu/papers/envmap/envmap.pdf
*/
vec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9])
{
vec3 L00 = coefficients[0];
vec3 L1_1 = coefficients[1];
vec3 L10 = coefficients[2];
vec3 L11 = coefficients[3];
vec3 L2_2 = coefficients[4];
vec3 L2_1 = coefficients[5];
vec3 L20 = coefficients[6];
vec3 L21 = coefficients[7];
vec3 L22 = coefficients[8];
float x = normal.x;
float y = normal.y;
float z = normal.z;
vec3 L =
L00
+ L1_1 * y
+ L10 * z
+ L11 * x
+ L2_2 * (y * x)
+ L2_1 * (y * z)
+ L20 * (3.0 * z * z - 1.0)
+ L21 * (z * x)
+ L22 * (x * x - y * y);
return max(L, vec3(0.0));
}
`;var YJt=x(T(),1),VL=`/**
* Converts an sRGB color to a linear RGB color.
*
* @param {vec3|vec4} srgbIn The color in sRGB space
* @returns {vec3|vec4} The color in linear color space. The vector type matches the input.
*/
vec3 czm_srgbToLinear(vec3 srgbIn)
{
return pow(srgbIn, vec3(2.2));
}
vec4 czm_srgbToLinear(vec4 srgbIn)
{
vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));
return vec4(linearOut, srgbIn.a);
}
`;var MJt=x(T(),1),RL=`/**
* Creates a matrix that transforms vectors from tangent space to eye space.
*
* @name czm_tangentToEyeSpaceMatrix
* @glslFunction
*
* @param {vec3} normalEC The normal vector in eye coordinates.
* @param {vec3} tangentEC The tangent vector in eye coordinates.
* @param {vec3} bitangentEC The bitangent vector in eye coordinates.
*
* @returns {mat3} The matrix that transforms from tangent space to eye space.
*
* @example
* mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC);
* vec3 normal = tangentToEye * texture(normalMap, st).xyz;
*/
mat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)
{
vec3 normal = normalize(normalEC);
vec3 tangent = normalize(tangentEC);
vec3 bitangent = normalize(bitangentEC);
return mat3(tangent.x , tangent.y , tangent.z,
bitangent.x, bitangent.y, bitangent.z,
normal.x , normal.y , normal.z);
}
`;var UJt=x(T(),1),EL=`/**
* A wrapper around the texture (WebGL2) / textureCube (WebGL1)
* function to allow for WebGL 1 support.
*
* @name czm_textureCube
* @glslFunction
*
* @param {samplerCube} sampler The sampler.
* @param {vec3} p The coordinate at which to sample the texture.
*/
vec4 czm_textureCube(samplerCube sampler, vec3 p) {
#if __VERSION__ == 300
return texture(sampler, p);
#else
return textureCube(sampler, p);
#endif
}
/**
* A wrapper around the textureLod (WebGL2) / textureCube (WebGL1)
* function to allow for WebGL 1 support in fragment shaders.
*
* @name czm_textureCubeLod
* @glslFunction
*
* @param {samplerCube} sampler The sampler.
* @param {vec3} p The coordinate at which to sample the texture.
* @param {float} lod The mipmap level from which to sample.
*/
vec4 czm_textureCube(samplerCube sampler, vec3 p, float lod) {
#if __VERSION__ == 300
return textureLod(sampler, p, lod);
#elif defined(GL_EXT_shader_texture_lod)
return textureCubeLodEXT(sampler, p, lod);
#endif
}`;var OJt=x(T(),1),GL=`/**
* Transforms a plane.
*
* @name czm_transformPlane
* @glslFunction
*
* @param {vec4} plane The plane in Hessian Normal Form.
* @param {mat4} transform The inverse-transpose of a transformation matrix.
*/
vec4 czm_transformPlane(vec4 plane, mat4 transform) {
vec4 transformedPlane = transform * plane;
// Convert the transformed plane to Hessian Normal Form
float normalMagnitude = length(transformedPlane.xyz);
return transformedPlane / normalMagnitude;
}
`;var zJt=x(T(),1),LL=`/**
* Translates a position (or any <code>vec3</code>) that was encoded with {@link EncodedCartesian3},
* and then provided to the shader as separate <code>high</code> and <code>low</code> bits to
* be relative to the eye. As shown in the example, the position can then be transformed in eye
* or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye},
* respectively.
* <p>
* This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as
* described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
* </p>
*
* @name czm_translateRelativeToEye
* @glslFunction
*
* @param {vec3} high The position's high bits.
* @param {vec3} low The position's low bits.
* @returns {vec3} The position translated to be relative to the camera's position.
*
* @example
* in vec3 positionHigh;
* in vec3 positionLow;
*
* void main()
* {
* vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
* gl_Position = czm_modelViewProjectionRelativeToEye * p;
* }
*
* @see czm_modelViewRelativeToEye
* @see czm_modelViewProjectionRelativeToEye
* @see czm_computePosition
* @see EncodedCartesian3
*/
vec4 czm_translateRelativeToEye(vec3 high, vec3 low)
{
vec3 highDifference = high - czm_encodedCameraPositionMCHigh;
// This check handles the case when NaN values have gotten into \`highDifference\`.
// Such a thing could happen on devices running iOS.
if (length(highDifference) == 0.0) {
highDifference = vec3(0);
}
vec3 lowDifference = low - czm_encodedCameraPositionMCLow;
return vec4(highDifference + lowDifference, 1.0);
}
`;var KJt=x(T(),1),WL=`/**
* @private
*/
vec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)
{
// Diffuse from directional light sources at eye (for top-down and horizon views)
float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);
if (czm_sceneMode == czm_sceneMode3D) {
// (and horizon views in 3D)
diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);
}
diffuse = clamp(diffuse, 0.0, 1.0);
float specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);
// Temporary workaround for adding ambient.
vec3 materialDiffuse = material.diffuse * 0.5;
vec3 ambient = materialDiffuse;
vec3 color = ambient + material.emission;
color += materialDiffuse * diffuse * czm_lightColor;
color += material.specular * specular * czm_lightColor;
return vec4(color, material.alpha);
}
`;var jJt=x(T(),1),vL=`/**
* Returns the transpose of the matrix. The input <code>matrix</code> can be
* a <code>mat2</code>, <code>mat3</code>, or <code>mat4</code>.
*
* @name czm_transpose
* @glslFunction
*
* @param {} matrix The matrix to transpose.
*
* @returns {} The transposed matrix.
*
* @example
* // GLSL declarations
* mat2 czm_transpose(mat2 matrix);
* mat3 czm_transpose(mat3 matrix);
* mat4 czm_transpose(mat4 matrix);
*
* // Transpose a 3x3 rotation matrix to find its inverse.
* mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates(
* positionMC, normalEC);
* mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye);
*/
mat2 czm_transpose(mat2 matrix)
{
return mat2(
matrix[0][0], matrix[1][0],
matrix[0][1], matrix[1][1]);
}
mat3 czm_transpose(mat3 matrix)
{
return mat3(
matrix[0][0], matrix[1][0], matrix[2][0],
matrix[0][1], matrix[1][1], matrix[2][1],
matrix[0][2], matrix[1][2], matrix[2][2]);
}
mat4 czm_transpose(mat4 matrix)
{
return mat4(
matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],
matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],
matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],
matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);
}
`;var qJt=x(T(),1),FL=`vec2 getLookupUv(vec2 dimensions, int i) {
int pixY = i / int(dimensions.x);
int pixX = i - (pixY * int(dimensions.x));
float pixelWidth = 1.0 / dimensions.x;
float pixelHeight = 1.0 / dimensions.y;
float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
float v = (float(pixY) + 0.5) * pixelHeight;
return vec2(u, v);
}
vec4 czm_unpackClippingExtents(highp sampler2D extentsTexture, int index) {
vec2 textureDimensions = vec2(textureSize(extentsTexture, 0));
return texture(extentsTexture, getLookupUv(textureDimensions, index));
}`;var ejt=x(T(),1),IL=`/**
* Unpacks a vec4 depth value to a float in [0, 1) range.
*
* @name czm_unpackDepth
* @glslFunction
*
* @param {vec4} packedDepth The packed depth.
*
* @returns {float} The floating-point depth in [0, 1) range.
*/
float czm_unpackDepth(vec4 packedDepth)
{
// See Aras Pranckevi\u010Dius' post Encoding Floats to RGBA
// http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/
return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));
}
`;var njt=x(T(),1),PL=`/**
* Unpack an IEEE 754 single-precision float that is packed as a little-endian unsigned normalized vec4.
*
* @name czm_unpackFloat
* @glslFunction
*
* @param {vec4} packedFloat The packed float.
*
* @returns {float} The floating-point depth in arbitrary range.
*/
float czm_unpackFloat(vec4 packedFloat)
{
// Convert to [0.0, 255.0] and round to integer
packedFloat = floor(packedFloat * 255.0 + 0.5);
float sign = 1.0 - step(128.0, packedFloat[3]) * 2.0;
float exponent = 2.0 * mod(packedFloat[3], 128.0) + step(128.0, packedFloat[2]) - 127.0;
if (exponent == -127.0)
{
return 0.0;
}
float mantissa = mod(packedFloat[2], 128.0) * 65536.0 + packedFloat[1] * 256.0 + packedFloat[0] + float(0x800000);
float result = sign * exp2(exponent - 23.0) * mantissa;
return result;
}
`;var ojt=x(T(),1),XL=`/**
* Useful for reinterpreting texture data as higher-precision values.
* Only works correctly in WebGL 2, which supports the uint type and bitwise operations.
*
* @param {float|vec2|vec3|vec4} 1-4 values from a texture lookup (RGBA channels), normalized to [0.0, 1.0].
* @return {uint} Raw bits as an unsigned integer.
*/
uint czm_unpackTexture(float packedValue) {
float rounded = czm_round(packedValue * 255.0);
return uint(rounded);
}
uint czm_unpackTexture(vec2 packedValue) {
vec2 rounded = czm_round(packedValue * 255.0);
uint byte0 = uint(rounded.x);
uint byte1 = uint(rounded.y);
return byte0 | (byte1 << 8);
}
uint czm_unpackTexture(vec3 packedValue) {
vec3 rounded = czm_round(packedValue * 255.0);
uint byte0 = uint(rounded.x);
uint byte1 = uint(rounded.y);
uint byte2 = uint(rounded.z);
return byte0 | (byte1 << 8) | (byte2 << 16);
}
uint czm_unpackTexture(vec4 packedValue) {
vec4 rounded = czm_round(packedValue * 255.0);
uint byte0 = uint(rounded.x);
uint byte1 = uint(rounded.y);
uint byte2 = uint(rounded.z);
uint byte3 = uint(rounded.w);
return byte0 | (byte1 << 8) | (byte2 << 16) | (byte3 << 24);
}
`;var sjt=x(T(),1),NL=`/**
* Unpack unsigned integers of 1-4 bytes. in WebGL 1, there is no uint type,
* so the return value is an int.
* <p>
* There are also precision limitations in WebGL 1. highp int is still limited
* to 24 bits. Above the value of 2^24 = 16777216, precision loss may occur.
* </p>
*
* @param {float|vec2|vec3|vec4} packed The packed value. For vectors, the components are listed in little-endian order.
*
* @return {int} The unpacked value.
*/
int czm_unpackUint(float packedValue) {
float rounded = czm_round(packedValue * 255.0);
return int(rounded);
}
int czm_unpackUint(vec2 packedValue) {
vec2 rounded = czm_round(packedValue * 255.0);
return int(dot(rounded, vec2(1.0, 256.0)));
}
int czm_unpackUint(vec3 packedValue) {
vec3 rounded = czm_round(packedValue * 255.0);
return int(dot(rounded, vec3(1.0, 256.0, 65536.0)));
}
int czm_unpackUint(vec4 packedValue) {
vec4 rounded = czm_round(packedValue * 255.0);
return int(dot(rounded, vec4(1.0, 256.0, 65536.0, 16777216.0)));
}
`;var cjt=x(T(),1),YL=`/**
* Transform metadata values following the EXT_structural_metadata spec
* by multiplying by scale and adding the offset. Operations are always
* performed component-wise, even for matrices.
*
* @param {float|vec2|vec3|vec4|mat2|mat3|mat4} offset The offset to add
* @param {float|vec2|vec3|vec4|mat2|mat3|mat4} scale The scale factor to multiply
* @param {float|vec2|vec3|vec4|mat2|mat3|mat4} value The original value.
*
* @return {float|vec2|vec3|vec4|mat2|mat3|mat4} The transformed value of the same scalar/vector/matrix type as the input.
*/
float czm_valueTransform(float offset, float scale, float value) {
return scale * value + offset;
}
vec2 czm_valueTransform(vec2 offset, vec2 scale, vec2 value) {
return scale * value + offset;
}
vec3 czm_valueTransform(vec3 offset, vec3 scale, vec3 value) {
return scale * value + offset;
}
vec4 czm_valueTransform(vec4 offset, vec4 scale, vec4 value) {
return scale * value + offset;
}
mat2 czm_valueTransform(mat2 offset, mat2 scale, mat2 value) {
return matrixCompMult(scale, value) + offset;
}
mat3 czm_valueTransform(mat3 offset, mat3 scale, mat3 value) {
return matrixCompMult(scale, value) + offset;
}
mat4 czm_valueTransform(mat4 offset, mat4 scale, mat4 value) {
return matrixCompMult(scale, value) + offset;
}
`;var djt=x(T(),1),wL=`#ifdef LOG_DEPTH
// 1.0 at the near plane, increasing linearly from there.
out float v_depthFromNearPlusOne;
#ifdef SHADOW_MAP
out vec3 v_logPositionEC;
#endif
#endif
vec4 czm_updatePositionDepth(vec4 coords) {
#if defined(LOG_DEPTH)
#ifdef SHADOW_MAP
vec3 logPositionEC = (czm_inverseProjection * coords).xyz;
v_logPositionEC = logPositionEC;
#endif
// With the very high far/near ratios used with the logarithmic depth
// buffer, floating point rounding errors can cause linear depth values
// to end up on the wrong side of the far plane, even for vertices that
// are really nowhere near it. Since we always write a correct logarithmic
// depth value in the fragment shader anyway, we just need to make sure
// such errors don't cause the primitive to be clipped entirely before
// we even get to the fragment shader.
coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;
#endif
return coords;
}
/**
* Writes the logarithmic depth to gl_Position using the already computed gl_Position.
*
* @name czm_vertexLogDepth
* @glslFunction
*/
void czm_vertexLogDepth()
{
#ifdef LOG_DEPTH
v_depthFromNearPlusOne = (gl_Position.w - czm_currentFrustum.x) + 1.0;
gl_Position = czm_updatePositionDepth(gl_Position);
#endif
}
/**
* Writes the logarithmic depth to gl_Position using the provided clip coordinates.
* <p>
* An example use case for this function would be moving the vertex in window coordinates
* before converting back to clip coordinates. Use the original vertex clip coordinates.
* </p>
* @name czm_vertexLogDepth
* @glslFunction
*
* @param {vec4} clipCoords The vertex in clip coordinates.
*
* @example
* czm_vertexLogDepth(czm_projection * vec4(positionEyeCoordinates, 1.0));
*/
void czm_vertexLogDepth(vec4 clipCoords)
{
#ifdef LOG_DEPTH
v_depthFromNearPlusOne = (clipCoords.w - czm_currentFrustum.x) + 1.0;
czm_updatePositionDepth(clipCoords);
#endif
}
`;var mjt=x(T(),1),ML=`vec4 czm_screenToEyeCoordinates(vec4 screenCoordinate)
{
// Reconstruct NDC coordinates
float x = 2.0 * screenCoordinate.x - 1.0;
float y = 2.0 * screenCoordinate.y - 1.0;
float z = (screenCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];
vec4 q = vec4(x, y, z, 1.0);
// Reverse the perspective division to obtain clip coordinates.
q /= screenCoordinate.w;
// Reverse the projection transformation to obtain eye coordinates.
if (!(czm_inverseProjection == mat4(0.0))) // IE and Edge sometimes do something weird with != between mat4s
{
q = czm_inverseProjection * q;
}
else
{
float top = czm_frustumPlanes.x;
float bottom = czm_frustumPlanes.y;
float left = czm_frustumPlanes.z;
float right = czm_frustumPlanes.w;
float near = czm_currentFrustum.x;
float far = czm_currentFrustum.y;
q.x = (q.x * (right - left) + left + right) * 0.5;
q.y = (q.y * (top - bottom) + bottom + top) * 0.5;
q.z = (q.z * (near - far) - near - far) * 0.5;
q.w = 1.0;
}
return q;
}
/**
* Transforms a position from window to eye coordinates.
* The transform from window to normalized device coordinates is done using components
* of (@link czm_viewport} and {@link czm_viewportTransformation} instead of calculating
* the inverse of <code>czm_viewportTransformation</code>. The transformation from
* normalized device coordinates to clip coordinates is done using <code>fragmentCoordinate.w</code>,
* which is expected to be the scalar used in the perspective divide. The transformation
* from clip to eye coordinates is done using {@link czm_inverseProjection}.
*
* @name czm_windowToEyeCoordinates
* @glslFunction
*
* @param {vec4} fragmentCoordinate The position in window coordinates to transform.
*
* @returns {vec4} The transformed position in eye coordinates.
*
* @see czm_modelToWindowCoordinates
* @see czm_eyeToWindowCoordinates
* @see czm_inverseProjection
* @see czm_viewport
* @see czm_viewportTransformation
*
* @example
* vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);
*/
vec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)
{
vec2 screenCoordXY = (fragmentCoordinate.xy - czm_viewport.xy) / czm_viewport.zw;
return czm_screenToEyeCoordinates(vec4(screenCoordXY, fragmentCoordinate.zw));
}
vec4 czm_screenToEyeCoordinates(vec2 screenCoordinateXY, float depthOrLogDepth)
{
// See reverseLogDepth.glsl. This is separate to re-use the pow.
#if defined(LOG_DEPTH) || defined(LOG_DEPTH_READ_ONLY)
float near = czm_currentFrustum.x;
float far = czm_currentFrustum.y;
float log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;
float depthFromNear = exp2(log2Depth) - 1.0;
float depthFromCamera = depthFromNear + near;
vec4 screenCoord = vec4(screenCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);
vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);
eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision
#else
vec4 screenCoord = vec4(screenCoordinateXY, depthOrLogDepth, 1.0);
vec4 eyeCoordinate = czm_screenToEyeCoordinates(screenCoord);
#endif
return eyeCoordinate;
}
/**
* Transforms a position given as window x/y and a depth or a log depth from window to eye coordinates.
* This function produces more accurate results for window positions with log depth than
* conventionally unpacking the log depth using czm_reverseLogDepth and using the standard version
* of czm_windowToEyeCoordinates.
*
* @name czm_windowToEyeCoordinates
* @glslFunction
*
* @param {vec2} fragmentCoordinateXY The XY position in window coordinates to transform.
* @param {float} depthOrLogDepth A depth or log depth for the fragment.
*
* @see czm_modelToWindowCoordinates
* @see czm_eyeToWindowCoordinates
* @see czm_inverseProjection
* @see czm_viewport
* @see czm_viewportTransformation
*
* @returns {vec4} The transformed position in eye coordinates.
*/
vec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)
{
vec2 screenCoordXY = (fragmentCoordinateXY.xy - czm_viewport.xy) / czm_viewport.zw;
return czm_screenToEyeCoordinates(screenCoordXY, depthOrLogDepth);
}
`;var fjt=x(T(),1),kL=`// emulated noperspective
#if !defined(LOG_DEPTH)
in float v_WindowZ;
#endif
/**
* Emulates GL_DEPTH_CLAMP. Clamps a fragment to the near and far plane
* by writing the fragment's depth. See czm_depthClamp for more details.
*
* @name czm_writeDepthClamp
* @glslFunction
*
* @example
* out_FragColor = color;
* czm_writeDepthClamp();
*
* @see czm_depthClamp
*/
void czm_writeDepthClamp()
{
#if (!defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
gl_FragDepth = clamp(v_WindowZ * gl_FragCoord.w, 0.0, 1.0);
#endif
}
`;var bjt=x(T(),1),UL=`#ifdef LOG_DEPTH
in float v_depthFromNearPlusOne;
#ifdef POLYGON_OFFSET
uniform vec2 u_polygonOffset;
#endif
#endif
/**
* Writes the fragment depth to the logarithmic depth buffer.
* <p>
* Use this when the vertex shader does not call {@link czm_vertexLogDepth}, for example, when
* ray-casting geometry using a full screen quad.
* </p>
* @name czm_writeLogDepth
* @glslFunction
*
* @param {float} depth The depth coordinate, where 1.0 is on the near plane and
* depth increases in eye-space units from there
*
* @example
* czm_writeLogDepth((czm_projection * v_positionEyeCoordinates).w + 1.0);
*/
void czm_writeLogDepth(float depth)
{
#if (defined(LOG_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
// Discard the vertex if it's not between the near and far planes.
// We allow a bit of epsilon on the near plane comparison because a 1.0
// from the vertex shader (indicating the vertex should be _on_ the near
// plane) will not necessarily come here as exactly 1.0.
if (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) {
discard;
}
#ifdef POLYGON_OFFSET
// Polygon offset: m * factor + r * units
float factor = u_polygonOffset[0];
float units = u_polygonOffset[1];
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
// This factor doesn't work in IE 10
if (factor != 0.0) {
// m = sqrt(dZdX^2 + dZdY^2);
float x = dFdx(depth);
float y = dFdy(depth);
float m = sqrt(x * x + y * y);
// Apply the factor before computing the log depth.
depth += m * factor;
}
#endif
#endif
gl_FragDepth = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne;
#ifdef POLYGON_OFFSET
// Apply the units after the log depth.
gl_FragDepth += czm_epsilon7 * units;
#endif
#endif
}
/**
* Writes the fragment depth to the logarithmic depth buffer.
* <p>
* Use this when the vertex shader calls {@link czm_vertexLogDepth}.
* </p>
*
* @name czm_writeLogDepth
* @glslFunction
*/
void czm_writeLogDepth() {
#ifdef LOG_DEPTH
czm_writeLogDepth(v_depthFromNearPlusOne);
#endif
}
`;var yjt=x(T(),1),DL=`/**
* Transforms a value for non-perspective interpolation by multiplying
* it by w, the value used in the perspective divide. This function is
* intended to be called in a vertex shader to compute the value of a
* \`varying\` that should not be subject to perspective interpolation.
* For example, screen-space texture coordinates. The fragment shader
* must call {@link czm_readNonPerspective} to retrieve the final
* non-perspective value.
*
* @name czm_writeNonPerspective
* @glslFunction
*
* @param {float|vec2|vec3|vec4} value The value to be interpolated without accounting for perspective.
* @param {float} w The perspective divide value. Usually this is the computed \`gl_Position.w\`.
* @returns {float|vec2|vec3|vec4} The transformed value, intended to be stored in a \`varying\` and read in the
* fragment shader with {@link czm_readNonPerspective}.
*/
float czm_writeNonPerspective(float value, float w) {
return value * w;
}
vec2 czm_writeNonPerspective(vec2 value, float w) {
return value * w;
}
vec3 czm_writeNonPerspective(vec3 value, float w) {
return value * w;
}
vec4 czm_writeNonPerspective(vec4 value, float w) {
return value * w;
}
`;var ZT={czm_degreesPerRadian:uE,czm_depthRange:mE,czm_epsilon1:hE,czm_epsilon2:fE,czm_epsilon3:pE,czm_epsilon4:bE,czm_epsilon5:gE,czm_epsilon6:yE,czm_epsilon7:xE,czm_infinity:TE,czm_oneOverPi:_E,czm_oneOverTwoPi:SE,czm_passCesium3DTile:AE,czm_passCesium3DTileClassification:ZE,czm_passCesium3DTileClassificationIgnoreShow:CE,czm_passCesium3DTileEdges:VE,czm_passClassification:RE,czm_passCompute:EE,czm_passEnvironment:GE,czm_passGaussianSplats:LE,czm_passGlobe:WE,czm_passOpaque:vE,czm_passOverlay:FE,czm_passTerrainClassification:IE,czm_passTranslucent:PE,czm_passVoxels:XE,czm_pi:NE,czm_piOverFour:YE,czm_piOverSix:wE,czm_piOverThree:ME,czm_piOverTwo:kE,czm_radiansPerDegree:UE,czm_sceneMode2D:DE,czm_sceneMode3D:OE,czm_sceneModeColumbusView:BE,czm_sceneModeMorphing:zE,czm_solarRadius:HE,czm_threePiOver2:KE,czm_twoPi:JE,czm_webMercatorMaxLatitude:jE,czm_depthRangeStruct:QE,czm_material:qE,czm_materialInput:$E,czm_modelMaterial:eG,czm_modelVertexOutput:tG,czm_ray:nG,czm_raySegment:iG,czm_shadowParameters:oG,czm_HSBToRGB:rG,czm_HSLToRGB:sG,czm_RGBToHSB:aG,czm_RGBToHSL:cG,czm_RGBToXYZ:lG,czm_XYZToRGB:dG,czm_acesTonemapping:uG,czm_alphaWeight:mG,czm_antialias:hG,czm_applyHSBShift:fG,czm_approximateSphericalCoordinates:pG,czm_approximateTanh:bG,czm_backFacing:gG,czm_branchFreeTernary:yG,czm_cascadeColor:xG,czm_cascadeDistance:TG,czm_cascadeMatrix:_G,czm_cascadeWeights:SG,czm_clipPolygons:AG,czm_columbusViewMorph:ZG,czm_computeAtmosphereColor:CG,czm_computeGroundAtmosphereScattering:VG,czm_computePosition:RG,czm_computeScattering:EG,czm_computeTextureTransform:GG,czm_cosineAndSine:LG,czm_decodeRGB8:WG,czm_decompressTextureCoordinates:vG,czm_depthClamp:FG,czm_eastNorthUpToEyeCoordinates:IG,czm_ellipsoidContainsPoint:PG,czm_ellipsoidTextureCoordinates:XG,czm_equalsEpsilon:NG,czm_eyeOffset:YG,czm_eyeToWindowCoordinates:wG,czm_fastApproximateAtan:MG,czm_fog:kG,czm_gammaCorrect:UG,czm_geodeticSurfaceNormal:DG,czm_getDefaultMaterial:OG,czm_getDynamicAtmosphereLightDirection:BG,czm_getLambertDiffuse:zG,czm_getSpecular:HG,czm_getWaterNoise:KG,czm_hue:JG,czm_inverseGamma:jG,czm_isEmpty:QG,czm_isFull:qG,czm_latitudeToWebMercatorFraction:$G,czm_lineDistance:eL,czm_linearToSrgb:tL,czm_luminance:nL,czm_maximumComponent:iL,czm_metersPerPixel:oL,czm_modelToWindowCoordinates:rL,czm_multiplyWithColorBalance:sL,czm_nearFarScalar:aL,czm_octDecode:cL,czm_packDepth:lL,czm_pbrLighting:dL,czm_pbrNeutralTonemapping:uL,czm_phong:mL,czm_planeDistance:hL,czm_pointAlongRay:fL,czm_rayEllipsoidIntersectionInterval:pL,czm_raySphereIntersectionInterval:bL,czm_readDepth:gL,czm_readNonPerspective:yL,czm_reverseLogDepth:xL,czm_round:TL,czm_saturation:_L,czm_shadowDepthCompare:SL,czm_shadowVisibility:AL,czm_signNotZero:ZL,czm_sphericalHarmonics:CL,czm_srgbToLinear:VL,czm_tangentToEyeSpaceMatrix:RL,czm_textureCube:EL,czm_transformPlane:GL,czm_translateRelativeToEye:LL,czm_translucentPhong:WL,czm_transpose:vL,czm_unpackClippingExtents:FL,czm_unpackDepth:IL,czm_unpackFloat:PL,czm_unpackTexture:XL,czm_unpackUint:NL,czm_valueTransform:YL,czm_vertexLogDepth:wL,czm_windowToEyeCoordinates:ML,czm_writeDepthClamp:kL,czm_writeLogDepth:UL,czm_writeNonPerspective:DL};var t8t=x(T(),1);function wPe(e,t){let n=e;return n=n.replaceAll("version 300 es",""),n=n.replaceAll(/(texture\()/g,"texture2D("),t?(n=n.replaceAll(/\n\s*(in)\s+(vec\d|mat\d|float)/g,`
varying $2`),/out_FragData_(\d+)/.test(n)&&(n=`#extension GL_EXT_draw_buffers : enable
${n}`,n=n.replaceAll(/layout\s+\(location\s*=\s*\d+\)\s*out\s+vec4\s+out_FragData_\d+;/g,""),n=n.replaceAll(/out_FragData_(\d+)/g,"gl_FragData[$1]")),n=n.replaceAll(/layout\s+\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g,""),n=n.replaceAll(/out_FragColor/g,"gl_FragColor"),n=n.replaceAll(/out_FragColor\[(\d+)\]/g,"gl_FragColor[$1]"),/gl_FragDepth/.test(n)&&(n=`#extension GL_EXT_frag_depth : enable
${n}`,n=n.replaceAll(/gl_FragDepth/g,"gl_FragDepthEXT")),n=`#ifdef GL_EXT_shader_texture_lod
#extension GL_EXT_shader_texture_lod : enable
#endif
${n}`,n=`#ifdef GL_OES_standard_derivatives
#extension GL_OES_standard_derivatives : enable
#endif
${n}`):(n=n.replaceAll(/(in)\s+(vec\d|mat\d|float)/g,"attribute $2"),n=n.replaceAll(/(out)\s+(vec\d|mat\d|float)\s+([\w]+);/g,"varying $2 $3;")),n=`#version 100
${n}`,n}var OL=wPe;function jse(e){return e=e.replace(/\/\/.*/g,""),e.replace(/\/\*\*[\s\S]*?\*\//gm,function(t){let n=t.match(/\n/gm).length,i="";for(let o=0;o<n;++o)i+=`
`;return i})}function Qse(e,t,n){let i;for(let o=0;o<n.length;++o)n[o].name===e&&(i=n[o]);return l(i)||(t=jse(t),i={name:e,glslSource:t,dependsOn:[],requiredBy:[],evaluated:!1},n.push(i)),i}function qse(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&&Ra._czmBuiltinsAndUniforms.hasOwnProperty(i)){let o=Qse(i,Ra._czmBuiltinsAndUniforms[i],t);e.dependsOn.push(o),o.requiredBy.push(e),qse(o,t)}}))}function MPe(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 kPe(e){let t=[],n=Qse("main",e,t);qse(n,t),MPe(t);let i="";for(let o=t.length-1;o>=0;--o)i=`${i+t[o].glslSource}
`;return i.replace(n.glslSource,"")}function $se(e,t,n){let i="",o=e.sources;if(l(o))for(let b=0;b<o.length;++b)i+=`
#line 0
${o[b]}`;i=jse(i);let r;i=i.replace(/#version\s+(.*?)\n/gm,function(b,f){return r=f,`
`});let s=[];i=i.replace(/#extension.*\n/gm,function(b){return s.push(b),`
`}),i=i.replace(/precision\s(lowp|mediump|highp)\s(float|int);/,"");let a=e.pickColorQualifier;l(a)&&(i=Ra.createPickFragmentShaderSource(i,a));let c="",d=s.length;for(let b=0;b<d;b++)c+=s[b];t&&(c+=`
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
precision highp int;
#else
precision mediump float;
precision mediump int;
#define highp mediump
#endif
`),n.webgl2&&(c+=`precision highp sampler3D;
`);let u=e.defines;if(l(u))for(let b=0,f=u.length;b<f;++b){let y=u[b];y.length!==0&&(c+=`#define ${y}
`)}n.textureFloatLinear&&(c+=`#define OES_texture_float_linear
`),n.floatingPointTexture&&(c+=`#define OES_texture_float
`);let h="";e.includeBuiltIns&&(h=kPe(i)),c+=`
#line 0
`;let p=h+i;return n.webgl2&&t&&!/layout\s*\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g.test(p)&&!/czm_out_FragColor/g.test(p)&&/out_FragColor/g.test(p)&&(c+=`layout(location = 0) out vec4 out_FragColor;
`),c+=h,c+=i,n.webgl2?c=`#version 300 es
${c}`:c=OL(c,t),c}function Ra(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}Ra.prototype.clone=function(){return new Ra({sources:this.sources,defines:this.defines,pickColorQualifier:this.pickColorQualifier,includeBuiltIns:this.includeBuiltIns})};Ra.replaceMain=function(e,t){return t=`void ${t}()`,e.replace(/void\s+main\s*\(\s*(?:void)?\s*\)/g,t)};Ra.prototype.getCacheKey=function(){let t=this.defines.slice().sort().join(","),n=this.pickColorQualifier,i=this.includeBuiltIns,o=this.sources.join(`
`);return`${t}:${n}:${i}:${o}`};Ra.prototype.createCombinedVertexShader=function(e){return $se(this,!1,e)};Ra.prototype.createCombinedFragmentShader=function(e){return $se(this,!0,e)};Ra._czmBuiltinsAndUniforms={};for(let e in ZT)ZT.hasOwnProperty(e)&&(Ra._czmBuiltinsAndUniforms[e]=ZT[e]);for(let e in E0)if(E0.hasOwnProperty(e)){let t=E0[e];typeof t.getDeclaration=="function"&&(Ra._czmBuiltinsAndUniforms[e]=t.getDeclaration(e))}Ra.createPickVertexShaderSource=function(e){return`${Ra.replaceMain(e,"czm_old_main")}
in vec4 pickColor;
out vec4 czm_pickColor;
void main()
{
czm_old_main();
czm_pickColor = pickColor;
}`};Ra.createPickFragmentShaderSource=function(e,t){let n=Ra.replaceMain(e,"czm_old_main"),i=`${t} vec4 czm_pickColor;
void main()
{
czm_old_main();
if (out_FragColor.a == 0.0) {
discard;
}
out_FragColor = czm_pickColor;
}`;return`${n}
${i}`};function UPe(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 eae(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 tae(e,t){let n=t.length;for(let i=0;i<n;++i){let o=t[i];if(eae(e,o))return o}}var DPe=["v_normalEC","v_normal"];Ra.findNormalVarying=function(e){return eae(e,"#ifdef HAS_NORMALS")?UPe(e,"HAS_NORMALS")?"v_normalEC":void 0:tae(e,DPe)};var OPe=["v_positionEC"];Ra.findPositionVarying=function(e){return tae(e,OPe)};var Be=Ra;function Wh(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}Object.defineProperties(Wh.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}});Wh.prototype.replaceShaderProgram=function(e){return l(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)};function BPe(e){let t=Object.keys(e).sort();return JSON.stringify(e,t)}Wh.prototype.getShaderProgram=function(e){let t=e.vertexShaderSource,n=e.fragmentShaderSource,i=e.attributeLocations;typeof t=="string"&&(t=new Be({sources:[t]})),typeof n=="string"&&(n=new Be({sources:[n]}));let o=t.getCacheKey(),r=n.getCacheKey(),s=l(i)?BPe(i):"",a=`${o}:${r}:${s}`,c;if(l(this._shaders[a]))c=this._shaders[a],delete this._shadersToRelease[a];else{let d=this._context,u=t.createCombinedVertexShader(d),h=n.createCombinedFragmentShader(d),p=new qt({gl:d._gl,logShaderCompilation:d.logShaderCompilation,debugShaders:d.debugShaders,vertexShaderSource:t,vertexShaderText:u,fragmentShaderSource:n,fragmentShaderText:h,attributeLocations:i});c={cache:this,shaderProgram:p,keyword:a,derivedKeywords:[],count:0},p._cachedShader=c,this._shaders[a]=c,++this._numberOfShaders}return++c.count,c.shaderProgram};Wh.prototype.replaceDerivedShaderProgram=function(e,t,n){let i=e._cachedShader,o=t+i.keyword,r=this._shaders[o];if(l(r)){JK(this,r);let s=i.derivedKeywords.indexOf(t);s>-1&&i.derivedKeywords.splice(s,1)}return this.createDerivedShaderProgram(e,t,n)};Wh.prototype.getDerivedShaderProgram=function(e,t){let n=e._cachedShader,i=t+n.keyword,o=this._shaders[i];if(l(o))return o.shaderProgram};Wh.prototype.createDerivedShaderProgram=function(e,t,n){let i=e._cachedShader,o=t+i.keyword,r=n.vertexShaderSource,s=n.fragmentShaderSource,a=n.attributeLocations;typeof r=="string"&&(r=new Be({sources:[r]})),typeof s=="string"&&(s=new Be({sources:[s]}));let c=this._context,d=r.createCombinedVertexShader(c),u=s.createCombinedFragmentShader(c),h=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:h,keyword:o,derivedKeywords:[],count:0};return i.derivedKeywords.push(t),h._cachedShader=p,this._shaders[o]=p,h};function JK(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];JK(e,s)}delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}Wh.prototype.destroyReleasedShaderPrograms=function(){let e=this._shadersToRelease;for(let t in e)if(e.hasOwnProperty(t)){let n=e[t];JK(this,n),--this._numberOfShaders}this._shadersToRelease={}};Wh.prototype.releaseShaderProgram=function(e){if(l(e)){let t=e._cachedShader;t&&--t.count===0&&(this._shadersToRelease[t.keyword]=t)}};Wh.prototype.isDestroyed=function(){return!1};Wh.prototype.destroy=function(){let e=this._shaders;for(let t in e)e.hasOwnProperty(t)&&e[t].shaderProgram.finalDestroy();return me(this)};var BL=Wh;var R8t=x(T(),1);function vh(e){e=e??B.EMPTY_OBJECT;let{context:t,source:n,pixelFormat:i=Ke.RGBA,pixelDatatype:o=Oe.UNSIGNED_BYTE,flipY:r=!0,skipColorSpaceConversion:s=!1,sampler:a=new Ut}=e,{width:c,height:d}=e;l(n)&&(l(c)||(c=n.videoWidth??n.naturalWidth??n.width),l(d)||(d=n.videoHeight??n.naturalHeight??n.height));let u=e.preMultiplyAlpha||i===Ke.RGB||i===Ke.LUMINANCE,h=Ke.toInternalFormat(i,o,t),p=Ke.isCompressedFormat(h),b=t._gl,f=p?Ke.compressedTextureSizeInBytes(i,c,d):Ke.textureSizeInBytes(i,o,c,d);this._id=e.id??zn(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=b.TEXTURE_2D,this._texture=b.createTexture(),this._internalFormat=h,this._pixelFormat=i,this._pixelDatatype=o,this._width=c,this._height=d,this._dimensions=new M(c,d),this._hasMipmap=!1,this._sizeInBytes=f,this._preMultiplyAlpha=u,this._flipY=r,this._initialized=!1,this._sampler=void 0,this._sampler=a,rae(this,a),b.activeTexture(b.TEXTURE0),b.bindTexture(this._textureTarget,this._texture),l(n)?(s?b.pixelStorei(b.UNPACK_COLORSPACE_CONVERSION_WEBGL,b.NONE):b.pixelStorei(b.UNPACK_COLORSPACE_CONVERSION_WEBGL,b.BROWSER_DEFAULT_WEBGL),l(n.arrayBufferView)?Ke.isCompressedFormat(h)?zPe(this,n):nae(this,n):l(n.framebuffer)?KPe(this,n):iae(this,n),this._initialized=!0):oae(this),b.bindTexture(this._textureTarget,null)}function zPe(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=o5(c),d=o5(d),i.compressedTexImage2D(o,u+1,r,c,d,0,t.mipLevels[u])}}function nae(e,t){let n=e._context,i=n._gl,o=e._textureTarget,r=e._internalFormat,{width:s,height:a,pixelFormat:c,pixelDatatype:d,flipY:u}=e,h=Ke.alignmentInBytes(c,d,s);i.pixelStorei(i.UNPACK_ALIGNMENT,h),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1);let{arrayBufferView:p}=t;if(u&&(p=Ke.flipY(p,c,d,s,a)),i.texImage2D(o,0,r,s,a,0,c,Oe.toWebGLConstant(d,n),p),l(t.mipLevels)){let b=s,f=a;for(let y=0;y<t.mipLevels.length;++y)b=o5(b),f=o5(f),i.texImage2D(o,y+1,r,b,f,0,c,Oe.toWebGLConstant(d,n),t.mipLevels[y])}}function HPe(e,t,n,i,o,r){let s=e._context,a=s._gl,{pixelFormat:c,pixelDatatype:d}=e,u=Ke.alignmentInBytes(c,d,o);a.pixelStorei(a.UNPACK_ALIGNMENT,u),a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,!1),e.flipY&&(t=Ke.flipY(t,c,d,o,r)),a.texSubImage2D(e._textureTarget,0,n,i,o,r,c,Oe.toWebGLConstant(d,s),t)}function KPe(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 iae(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 JPe(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 o5(e){let t=Math.floor(e/2)|0;return Math.max(t,1)}function oae(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)}vh.create=function(e){return new vh(e)};vh.fromFramebuffer=function(e){e=e??B.EMPTY_OBJECT;let t=e.context,{pixelFormat:n=Ke.RGB,framebufferXOffset:i=0,framebufferYOffset:o=0,width:r=t.drawingBufferWidth,height:s=t.drawingBufferHeight,framebuffer:a}=e;return new vh({context:t,width:r,height:s,pixelFormat:n,source:{framebuffer:l(a)?a:t.defaultFramebuffer,xOffset:i,yOffset:o,width:r,height:s}})};Object.defineProperties(vh.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){rae(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 rae(e,t){let{minificationFilter:n,magnificationFilter:i}=t,o=[kt.NEAREST_MIPMAP_NEAREST,kt.NEAREST_MIPMAP_LINEAR,kt.LINEAR_MIPMAP_NEAREST,kt.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?kt.NEAREST_MIPMAP_NEAREST:kt.NEAREST,i=ni.NEAREST),r.webgl2&&Ke.isDepthFormat(s)&&(n=kt.NEAREST,i=ni.NEAREST);let c=r._gl,d=e._textureTarget;c.activeTexture(c.TEXTURE0),c.bindTexture(d,e._texture),c.texParameteri(d,c.TEXTURE_MIN_FILTER,n),c.texParameteri(d,c.TEXTURE_MAG_FILTER,i),c.texParameteri(d,c.TEXTURE_WRAP_S,t.wrapS),c.texParameteri(d,c.TEXTURE_WRAP_T,t.wrapT),l(e._textureFilterAnisotropic)&&c.texParameteri(d,e._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,t.maximumAnisotropy),c.bindTexture(d,null)}vh.prototype.copyFrom=function(e){let{xOffset:t=0,yOffset:n=0,source:i,skipColorSpaceConversion:o=!1}=e,s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture);let{width:c,height:d}=i;l(i.videoWidth)&&l(i.videoHeight)?(c=i.videoWidth,d=i.videoHeight):l(i.naturalWidth)&&l(i.naturalHeight)&&(c=i.naturalWidth,d=i.naturalHeight),o?s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.NONE):s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.BROWSER_DEFAULT_WEBGL);let u=!1;this._initialized||(t===0&&n===0&&c===this._width&&d===this._height?(l(i.arrayBufferView)?nae(this,i):iae(this,i),u=!0):(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),oae(this)),this._initialized=!0),u||(l(i.arrayBufferView)?HPe(this,i.arrayBufferView,t,n,c,d):JPe(this,i,t,n)),s.bindTexture(a,null)};vh.prototype.copyFromFramebuffer=function(e,t,n,i,o,r){e=e??0,t=t??0,n=n??0,i=i??0,o=o??this._width,r=r??this._height;let s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture),s.copyTexSubImage2D(a,0,e,t,n,i,o,r),s.bindTexture(a,null),this._initialized=!0};vh.prototype.generateMipmap=function(e){e=e??um.DONT_CARE,this._hasMipmap=!0;let t=this._context._gl,n=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(n,this._texture),t.generateMipmap(n),t.bindTexture(n,null)};vh.prototype.isDestroyed=function(){return!1};vh.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),me(this)};var Et=vh;var W8t=x(T(),1);function CT(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}Object.defineProperties(CT.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}});CT.prototype.getTexture=function(e){let t=this._textures[e];if(l(t))return delete this._texturesToRelease[e],++t.count,t.texture};CT.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};CT.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={}};CT.prototype.isDestroyed=function(){return!1};CT.prototype.destroy=function(){let e=this._textures;for(let t in e)e.hasOwnProperty(t)&&e[t].texture.finalDestroy();return me(this)};var zL=CT;var F7t=x(T(),1);var $8t=x(T(),1);var H8t=x(T(),1);var Y8t=x(T(),1);function mm(e){this.planes=e??[]}var HL=[new m,new m,new m];m.clone(m.UNIT_X,HL[0]);m.clone(m.UNIT_Y,HL[1]);m.clone(m.UNIT_Z,HL[2]);var qg=new m,jPe=new m,sae=new nn(new m(1,0,0),0);mm.fromBoundingSphere=function(e,t){l(t)||(t=new mm);let n=HL.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=HL[a],d=i[s],u=i[s+1];l(d)||(d=i[s]=new se),l(u)||(u=i[s+1]=new se),m.multiplyByScalar(c,-r,qg),m.add(o,qg,qg),d.x=c.x,d.y=c.y,d.z=c.z,d.w=-m.dot(c,qg),m.multiplyByScalar(c,r,qg),m.add(o,qg,qg),u.x=-c.x,u.y=-c.y,u.z=-c.z,u.w=-m.dot(m.negate(c,jPe),qg),s+=2}return t};mm.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],sae));if(r===zt.OUTSIDE)return zt.OUTSIDE;r===zt.INTERSECTING&&(n=!0)}return n?zt.INTERSECTING:zt.INSIDE};mm.prototype.computeVisibilityWithPlaneMask=function(e,t){if(t===mm.MASK_OUTSIDE||t===mm.MASK_INSIDE)return t;let n=mm.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],sae));if(a===zt.OUTSIDE)return mm.MASK_OUTSIDE;a===zt.INTERSECTING&&(n|=s)}return n};mm.MASK_OUTSIDE=4294967295;mm.MASK_INSIDE=0;mm.MASK_INDETERMINATE=2147483647;var Os=mm;function up(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 Os,this._orthographicMatrix=new F}function aae(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(up.prototype,{projectionMatrix:{get:function(){return aae(this),this._orthographicMatrix}}});var QPe=new m,qPe=new m,$Pe=new m,jK=new m;up.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,c=this.near,d=this.far,u=m.cross(t,n,QPe);m.normalize(u,u);let h=qPe;m.multiplyByScalar(t,c,h),m.add(e,h,h);let p=$Pe;m.multiplyByScalar(u,a,p),m.add(h,p,p);let b=i[0];return l(b)||(b=i[0]=new se),b.x=u.x,b.y=u.y,b.z=u.z,b.w=-m.dot(u,p),m.multiplyByScalar(u,s,p),m.add(h,p,p),b=i[1],l(b)||(b=i[1]=new se),b.x=-u.x,b.y=-u.y,b.z=-u.z,b.w=-m.dot(m.negate(u,jK),p),m.multiplyByScalar(n,r,p),m.add(h,p,p),b=i[2],l(b)||(b=i[2]=new se),b.x=n.x,b.y=n.y,b.z=n.z,b.w=-m.dot(n,p),m.multiplyByScalar(n,o,p),m.add(h,p,p),b=i[3],l(b)||(b=i[3]=new se),b.x=-n.x,b.y=-n.y,b.z=-n.z,b.w=-m.dot(m.negate(n,jK),p),b=i[4],l(b)||(b=i[4]=new se),b.x=t.x,b.y=t.y,b.z=t.z,b.w=-m.dot(t,h),m.multiplyByScalar(t,d,p),m.add(e,p,p),b=i[5],l(b)||(b=i[5]=new se),b.x=-t.x,b.y=-t.y,b.z=-t.z,b.w=-m.dot(m.negate(t,jK),p),this._cullingVolume};up.prototype.getPixelDimensions=function(e,t,n,i,o){aae(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};up.prototype.clone=function(e){return l(e)||(e=new up),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};up.prototype.equals=function(e){return l(e)&&e instanceof up&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};up.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof up&&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 rs=up;function xd(e){e=e??B.EMPTY_OBJECT,this._offCenterFrustum=new rs,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 $g(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 $g(this),this._offCenterFrustum.projectionMatrix}},offCenterFrustum:{get:function(){return $g(this),this._offCenterFrustum}}});xd.prototype.computeCullingVolume=function(e,t,n){return $g(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};xd.prototype.getPixelDimensions=function(e,t,n,i,o){return $g(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:($g(this),$g(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:($g(this),$g(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 mn=xd;var c7t=x(T(),1);var QK={};function eXe(e){let t=6.239996+.0172019696544*e;return .001657*Math.sin(t+.01671*Math.sin(t))}var tXe=32.184,nXe=2451545;function Vae(e,t){t=Q.addSeconds(e,tXe,t);let n=Q.totalDays(t)-nXe;return t=Q.addSeconds(t,eXe(n),t),t}var r5=new Q(2451545,0,ti.TAI),iXe=1e3,hm=W.RADIANS_PER_DEGREE,ou=W.RADIANS_PER_ARCSECOND,Tc=14959787e4,cae=new q;function Rae(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=rXe(r-i,t),h=oXe(t,0);dXe(c,n,d,cae);let p=a*(1+t),b=Math.cos(u),f=Math.sin(u),y=1+t*b,_=p/y;return l(s)?(s.x=_*b,s.y=_*f,s.z=0):s=new m(_*b,_*f,0),q.multiplyByVector(cae,s,s)}function oXe(e,t){return e<=t?"Circular":e<1-t?"Elliptical":e<=1+t?"Parabolic":"Hyperbolic"}function rXe(e,t){let n=cXe(e,t);return lXe(n,t)}var sXe=50,aXe=W.EPSILON8;function cXe(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<sXe&&Math.abs(o-i)>aXe;++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 lXe(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 dXe(e,t,n,i){let o=Math.cos(e),r=Math.sin(e),s=Math.cos(t),a=Math.sin(t),c=Math.cos(n),d=Math.sin(n);return l(i)?(i[0]=c*o-d*r*s,i[1]=d*o+c*r*s,i[2]=r*a,i[3]=-c*r-d*o*s,i[4]=-d*r+c*o*s,i[5]=o*a,i[6]=d*a,i[7]=-c*a,i[8]=s):i=new q(c*o-d*r*s,-c*r-d*o*s,d*a,d*o+c*r*s,-d*r+c*o*s,-c*a,r*a,o*a,s),i}var uXe=1.0000010178*Tc,mXe=100.46645683*hm,hXe=129597742283429e-5*ou,lae=16002,dae=21863,uae=32004,mae=10931,hae=14529,fae=16368,pae=15318,bae=32794,fXe=64*1e-7*Tc,pXe=-152*1e-7*Tc,bXe=62*1e-7*Tc,gXe=-8*1e-7*Tc,yXe=32*1e-7*Tc,xXe=-41*1e-7*Tc,TXe=19*1e-7*Tc,_Xe=-11*1e-7*Tc,SXe=-150*1e-7*Tc,AXe=-46*1e-7*Tc,ZXe=68*1e-7*Tc,CXe=54*1e-7*Tc,VXe=14*1e-7*Tc,RXe=24*1e-7*Tc,EXe=-28*1e-7*Tc,GXe=22*1e-7*Tc,gae=10,yae=16002,xae=21863,Tae=10931,_ae=1473,Sae=32004,Aae=4387,Zae=73,LXe=-325*1e-7,WXe=-322*1e-7,vXe=-79*1e-7,FXe=232*1e-7,IXe=-52*1e-7,PXe=97*1e-7,XXe=55*1e-7,NXe=-41*1e-7,YXe=-105*1e-7,wXe=-137*1e-7,MXe=258*1e-7,kXe=35*1e-7,UXe=-116*1e-7,DXe=-88*1e-7,OXe=-112*1e-7,BXe=-80*1e-7,bZ=new Q(0,0,ti.TAI);function zXe(e,t){Vae(e,bZ);let i=(bZ.dayNumber-r5.dayNumber+(bZ.secondsOfDay-r5.secondsOfDay)/ii.SECONDS_PER_DAY)/(ii.DAYS_PER_JULIAN_CENTURY*10),o=.3595362*i,r=uXe+fXe*Math.cos(lae*o)+SXe*Math.sin(lae*o)+pXe*Math.cos(dae*o)+AXe*Math.sin(dae*o)+bXe*Math.cos(uae*o)+ZXe*Math.sin(uae*o)+gXe*Math.cos(mae*o)+CXe*Math.sin(mae*o)+yXe*Math.cos(hae*o)+VXe*Math.sin(hae*o)+xXe*Math.cos(fae*o)+RXe*Math.sin(fae*o)+TXe*Math.cos(pae*o)+EXe*Math.sin(pae*o)+_Xe*Math.cos(bae*o)+GXe*Math.sin(bae*o),s=mXe+hXe*i+LXe*Math.cos(gae*o)+YXe*Math.sin(gae*o)+WXe*Math.cos(yae*o)+wXe*Math.sin(yae*o)+vXe*Math.cos(xae*o)+MXe*Math.sin(xae*o)+FXe*Math.cos(Tae*o)+kXe*Math.sin(Tae*o)+IXe*Math.cos(_ae*o)+UXe*Math.sin(_ae*o)+PXe*Math.cos(Sae*o)+DXe*Math.sin(Sae*o)+XXe*Math.cos(Aae*o)+OXe*Math.sin(Aae*o)+NXe*Math.cos(Zae*o)+BXe*Math.sin(Zae*o),a=.0167086342-.0004203654*i,c=102.93734808*hm+11612.3529*ou*i,d=469.97289*ou*i,u=174.87317577*hm-8679.27034*ou*i;return Rae(r,a,d,c,u,s,t)}function Eae(e,t){Vae(e,bZ);let i=(bZ.dayNumber-r5.dayNumber+(bZ.secondsOfDay-r5.secondsOfDay)/ii.SECONDS_PER_DAY)/ii.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*hm,u=-8e-5*i+.02966*o-42e-6*r-13e-8*s,h=83.35324312*hm,p=146434202669e-4*i-38.2702*o-.045047*r+21301e-8*s,b=125.04455501*hm,f=-69679193631e-4*i+6.3602*o+.007625*r-3586e-8*s,y=218.31664563*hm,_=17325593434847e-4*i-6.391*o+.006588*r-3169e-8*s,S=297.85019547*hm+ou*(1602961601209e-3*i-6.3706*o+.006593*r-3169e-8*s),A=93.27209062*hm+ou*(17395272628478e-4*i-12.7512*o-.001037*r+417e-8*s),Z=134.96340251*hm+ou*(17179159232178e-4*i+31.8792*o+.051635*r-2447e-7*s),V=357.52910918*hm+ou*(1295965810481e-4*i-.5532*o+136e-6*r-1149e-8*s),E=310.17137918*hm-ou*(6967051436e-3*i+6.2068*o+.007618*r-3219e-8*s),L=2*S,v=4*S,I=6*S,X=2*Z,N=3*Z,g=4*Z,C=2*A;a+=3400.4*Math.cos(L)-635.6*Math.cos(L-Z)-235.6*Math.cos(Z)+218.1*Math.cos(L-V)+181*Math.cos(L+Z),c+=.014216*Math.cos(L-Z)+.008551*Math.cos(L-X)-.001383*Math.cos(Z)+.001356*Math.cos(L+Z)-.001147*Math.cos(v-N)-914e-6*Math.cos(v-X)+869e-6*Math.cos(L-V-Z)-627e-6*Math.cos(L)-394e-6*Math.cos(v-g)+282e-6*Math.cos(L-V-X)-279e-6*Math.cos(S-Z)-236e-6*Math.cos(X)+231e-6*Math.cos(v)+229e-6*Math.cos(I-g)-201e-6*Math.cos(X-C),u+=486.26*Math.cos(L-C)-40.13*Math.cos(L)+37.51*Math.cos(C)+25.73*Math.cos(X-C)+19.97*Math.cos(L-V-C),p+=-55609*Math.sin(L-Z)-34711*Math.sin(L-X)-9792*Math.sin(Z)+9385*Math.sin(v-N)+7505*Math.sin(v-X)+5318*Math.sin(L+Z)+3484*Math.sin(v-g)-3417*Math.sin(L-V-Z)-2530*Math.sin(I-g)-2376*Math.sin(L)-2075*Math.sin(L-N)-1883*Math.sin(X)-1736*Math.sin(I-5*Z)+1626*Math.sin(V)-1370*Math.sin(I-N),f+=-5392*Math.sin(L-C)-540*Math.sin(V)-441*Math.sin(L)+423*Math.sin(C)-288*Math.sin(X-C),_+=-3332.9*Math.sin(L)+1197.4*Math.sin(L-Z)-662.5*Math.sin(V)+396.3*Math.sin(Z)-218*Math.sin(L-V);let R=2*E,G=3*E;u+=46.997*Math.cos(E)*i-.614*Math.cos(L-C+E)*i+.614*Math.cos(L-C-E)*i-.0297*Math.cos(R)*o-.0335*Math.cos(E)*o+.0012*Math.cos(L-C+R)*o-16e-5*Math.cos(E)*r+4e-5*Math.cos(G)*r+4e-5*Math.cos(R)*r;let P=2.116*Math.sin(E)*i-.111*Math.sin(L-C-E)*i-.0015*Math.sin(E)*o;p+=P,_+=P,f+=-520.77*Math.sin(E)*i+13.66*Math.sin(L-C+E)*i+1.12*Math.sin(L-E)*i-1.06*Math.sin(C-E)*i+.66*Math.sin(R)*o+.371*Math.sin(E)*o-.035*Math.sin(L-C+R)*o-.015*Math.sin(L-C+E)*o+.0014*Math.sin(E)*r-.0011*Math.sin(G)*r-9e-4*Math.sin(R)*r,a*=iXe;let Y=d+u*ou,O=h+p*ou,k=y+_*ou,D=b+f*ou;return Rae(a,c,Y,O,D,k,t)}var Cae=.012300034,HXe=Cae/(Cae+1)*-1;function KXe(e,t){return t=Eae(e,t),m.multiplyByScalar(t,HXe,t)}var Gae=new q(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),KL=new m;QK.computeSunPositionInEarthInertialFrame=function(e,t){return l(e)||(e=Q.now()),l(t)||(t=new m),KL=zXe(e,KL),t=m.negate(KL,t),KXe(e,KL),m.subtract(t,KL,t),q.multiplyByVector(Gae,t,t),t};QK.computeMoonPositionInEarthInertialFrame=function(e,t){return l(e)||(e=Q.now()),t=Eae(e,t),q.multiplyByVector(Gae,t,t),t};var ey=QK;var d7t=x(T(),1),JL={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3};JL.getMorphTime=function(e){return e===JL.SCENE3D?1:e===JL.MORPHING?void 0:0};Object.freeze(JL);var re=JL;var f7t=x(T(),1);function JXe(e){e=e??B.EMPTY_OBJECT,this.color=U.clone(e.color??U.WHITE),this.intensity=e.intensity??2}var w0=JXe;function gZ(){this.globeDepthTexture=void 0,this.edgeIdTexture=void 0,this.edgeColorTexture=void 0,this.edgeDepthTexture=void 0,this.gamma=void 0,this._viewport=new Qe,this._viewportCartesian4=new se,this._viewportDirty=!1,this._viewportOrthographicMatrix=F.clone(F.IDENTITY),this._viewportTransformation=F.clone(F.IDENTITY),this._model=F.clone(F.IDENTITY),this._view=F.clone(F.IDENTITY),this._inverseView=F.clone(F.IDENTITY),this._projection=F.clone(F.IDENTITY),this._infiniteProjection=F.clone(F.IDENTITY),this._entireFrustum=new M,this._currentFrustum=new M,this._frustumPlanes=new se,this._farDepthFromNearPlusOne=void 0,this._log2FarDepthFromNearPlusOne=void 0,this._oneOverLog2FarDepthFromNearPlusOne=void 0,this._frameState=void 0,this._temeToPseudoFixed=q.clone(F.IDENTITY),this._view3DDirty=!0,this._view3D=new F,this._inverseView3DDirty=!0,this._inverseView3D=new F,this._inverseModelDirty=!0,this._inverseModel=new F,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new q,this._viewRotation=new q,this._inverseViewRotation=new q,this._viewRotation3D=new q,this._inverseViewRotation3D=new q,this._inverseProjectionDirty=!0,this._inverseProjection=new F,this._modelViewDirty=!0,this._modelView=new F,this._modelView3DDirty=!0,this._modelView3D=new F,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new F,this._inverseModelViewDirty=!0,this._inverseModelView=new F,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new F,this._viewProjectionDirty=!0,this._viewProjection=new F,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new F,this._modelViewProjectionDirty=!0,this._modelViewProjection=new F,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new F,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new F,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new F,this._normalDirty=!0,this._normal=new q,this._normal3DDirty=!0,this._normal3D=new q,this._inverseNormalDirty=!0,this._inverseNormal=new q,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new q,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new Tn,this._cameraPosition=new m,this._sunPositionWC=new m,this._sunPositionColumbusView=new m,this._sunDirectionWC=new m,this._sunDirectionEC=new m,this._moonDirectionEC=new m,this._lightDirectionWC=new m,this._lightDirectionEC=new m,this._lightColor=new m,this._lightColorHdr=new m,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._ellipsoid=void 0,this._cameraDirection=new m,this._cameraRight=new m,this._cameraUp=new m,this._frustum2DWidth=0,this._eyeHeight=0,this._eyeHeight2D=new M,this._eyeEllipsoidNormalEC=new m,this._eyeEllipsoidCurvature=new M,this._modelToEnu=new F,this._enuToModel=new F,this._pixelRatio=1,this._orthographicIn3D=!1,this._backgroundColor=new U,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._fogVisualDensityScalar=void 0,this._fogMinimumBrightness=void 0,this._atmosphereHsbShift=void 0,this._atmosphereLightIntensity=void 0,this._atmosphereRayleighCoefficient=new m,this._atmosphereRayleighScaleHeight=new m,this._atmosphereMieCoefficient=new m,this._atmosphereMieScaleHeight=void 0,this._atmosphereMieAnisotropy=void 0,this._atmosphereDynamicLighting=void 0,this._invertClassificationColor=void 0,this._splitPosition=0,this._pixelSizePerMeter=void 0,this._geometricToleranceOverMeter=void 0,this._minimumDisableDepthTestDistance=void 0}Object.defineProperties(gZ.prototype,{frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!Qe.equals(e,this._viewport)){Qe.clone(e,this._viewport);let t=this._viewport,n=this._viewportCartesian4;n.x=t.x,n.y=t.y,n.z=t.width,n.w=t.height,this._viewportDirty=!0}}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return Wae(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return Wae(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){F.clone(e,this._model),this._modelView3DDirty=!0,this._inverseModelView3DDirty=!0,this._inverseModelDirty=!0,this._inverseTransposeModelDirty=!0,this._modelViewDirty=!0,this._inverseModelViewDirty=!0,this._modelViewRelativeToEyeDirty=!0,this._inverseModelViewDirty=!0,this._modelViewProjectionDirty=!0,this._inverseModelViewProjectionDirty=!0,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewInfiniteProjectionDirty=!0,this._normalDirty=!0,this._inverseNormalDirty=!0,this._normal3DDirty=!0,this._inverseNormal3DDirty=!0,this._encodedCameraPositionMCDirty=!0}},inverseModel:{get:function(){return this._inverseModelDirty&&(this._inverseModelDirty=!1,F.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){let e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,F.getMatrix3(this.inverseModel,e),q.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return $K(this),this._view3D}},viewRotation:{get:function(){return $K(this),this._viewRotation}},viewRotation3D:{get:function(){return $K(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return Iae(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return Iae(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){return sNe(this),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){return aNe(this),this._modelView}},modelView3D:{get:function(){return cNe(this),this._modelView3D}},modelViewRelativeToEye:{get:function(){return fNe(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){return lNe(this),this._inverseModelView}},inverseModelView3D:{get:function(){return dNe(this),this._inverseModelView3D}},viewProjection:{get:function(){return uNe(this),this._viewProjection}},inverseViewProjection:{get:function(){return mNe(this),this._inverseViewProjection}},modelViewProjection:{get:function(){return hNe(this),this._modelViewProjection}},inverseModelViewProjection:{get:function(){return pNe(this),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){return bNe(this),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){return gNe(this),this._modelViewInfiniteProjection}},normal:{get:function(){return yNe(this),this._normal}},normal3D:{get:function(){return xNe(this),this._normal3D}},inverseNormal:{get:function(){return TNe(this),this._inverseNormal}},inverseNormal3D:{get:function(){return _Ne(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 Fae(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return Fae(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 jXe(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 QXe(e,t){F.clone(t,e._inverseView),F.getMatrix3(t,e._inverseViewRotation)}function qXe(e,t){F.clone(t,e._projection),e._inverseProjectionDirty=!0,e._viewProjectionDirty=!0,e._inverseViewProjectionDirty=!0,e._modelViewProjectionDirty=!0,e._modelViewProjectionRelativeToEyeDirty=!0}function $Xe(e,t){F.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}var Lae=new m,eNe=new F;function tNe(e,t){m.clone(t.positionWC,e._cameraPosition),m.clone(t.directionWC,e._cameraDirection),m.clone(t.rightWC,e._cameraRight),m.clone(t.upWC,e._cameraUp);let n=e._ellipsoid,i,o=t.positionCartographic;if(l(o)?(e._eyeHeight=o.height,e._eyeEllipsoidNormalEC=n.geodeticSurfaceNormalCartographic(o,e._eyeEllipsoidNormalEC),i=m.fromRadians(o.longitude,o.latitude,0,n,Lae)):(e._eyeHeight=-n.maximumRadius,m.magnitude(t.positionWC)>0&&(e._eyeEllipsoidNormalEC=m.normalize(t.positionWC,e._eyeEllipsoidNormalEC)),i=n.scaleToGeodeticSurface(t.positionWC,Lae)),e._encodedCameraPositionMCDirty=!0,!l(i))return;e._eyeEllipsoidNormalEC=q.multiplyByVector(e._viewRotation,e._eyeEllipsoidNormalEC,e._eyeEllipsoidNormalEC);let r=dt.eastNorthUpToFixedFrame(i,n,eNe);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 qK=new q,nNe=new pe;function iNe(e,t){dt.computeIcrfToCentralBodyFixedMatrix(t.time,qK);let n=ey.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);q.multiplyByVector(qK,n,n),m.normalize(n,e._sunDirectionWC),n=q.multiplyByVector(e.viewRotation3D,n,e._sunDirectionEC),m.normalize(n,n),n=ey.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),q.multiplyByVector(qK,n,n),q.multiplyByVector(e.viewRotation3D,n,n),m.normalize(n,n);let i=t.mapProjection,r=i.ellipsoid.cartesianToCartographic(e._sunPositionWC,nNe);i.project(r,e._sunPositionColumbusView)}gZ.prototype.updateCamera=function(e){jXe(this,e.viewMatrix),QXe(this,e.inverseViewMatrix),tNe(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 mn};gZ.prototype.updateFrustum=function(e){qXe(this,e.projectionMatrix),l(e.infiniteProjectionMatrix)&&$Xe(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};gZ.prototype.updatePass=function(e){this._pass=e};var oNe=[],rNe=new w0;gZ.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),iNe(this,e);let n=e.light??rNe;n instanceof w0?(this._lightDirectionWC=m.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=m.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=m.normalize(m.negate(n.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=q.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));let i=n.color,o=m.fromElements(i.red,i.green,i.blue,this._lightColorHdr);o=m.multiplyByScalar(o,n.intensity,o);let r=m.maximumComponent(o);r>1?m.divideByScalar(o,r,this._lightColor):m.clone(o,this._lightColor);let s=e.brdfLutGenerator,a=l(s)?s.colorTexture:void 0;this._brdfLut=a,this._environmentMap=e.environmentMap??e.context.defaultCubeMap,this._sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients??oNe,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,this._fogDensity=e.fog.density,this._fogVisualDensityScalar=e.fog.visualDensityScalar,this._fogMinimumBrightness=e.fog.minimumBrightness;let c=e.atmosphere;l(c)&&(this._atmosphereHsbShift=m.fromElements(c.hueShift,c.saturationShift,c.brightnessShift,this._atmosphereHsbShift),this._atmosphereLightIntensity=c.lightIntensity,this._atmosphereRayleighCoefficient=m.clone(c.rayleighCoefficient,this._atmosphereRayleighCoefficient),this._atmosphereRayleighScaleHeight=c.rayleighScaleHeight,this._atmosphereMieCoefficient=m.clone(c.mieCoefficient,this._atmosphereMieCoefficient),this._atmosphereMieScaleHeight=c.mieScaleHeight,this._atmosphereMieAnisotropy=c.mieAnisotropy,this._atmosphereDynamicLighting=c.dynamicLighting),this._invertClassificationColor=e.invertClassificationColor,this._frameState=e,this._temeToPseudoFixed=dt.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._splitPosition=e.splitPosition*e.context.drawingBufferWidth;let d=t.frustum.fov,u=this._viewport,h;l(d)?u.height>u.width?h=Math.tan(.5*d)*2/u.height:h=Math.tan(.5*d)*2/u.width:h=1/Math.max(u.width,u.height),this._geometricToleranceOverMeter=h*e.maximumScreenSpaceError,U.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1)};function Wae(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 sNe(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 aNe(e){e._modelViewDirty&&(e._modelViewDirty=!1,F.multiplyTransformation(e._view,e._model,e._modelView))}function cNe(e){e._modelView3DDirty&&(e._modelView3DDirty=!1,F.multiplyTransformation(e.view3D,e._model,e._modelView3D))}function lNe(e){e._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,F.inverse(e.modelView,e._inverseModelView))}function dNe(e){e._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,F.inverse(e.modelView3D,e._inverseModelView3D))}function uNe(e){e._viewProjectionDirty&&(e._viewProjectionDirty=!1,F.multiply(e._projection,e._view,e._viewProjection))}function mNe(e){e._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,F.inverse(e.viewProjection,e._inverseViewProjection))}function hNe(e){e._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,F.multiply(e._projection,e.modelView,e._modelViewProjection))}function fNe(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 pNe(e){e._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,F.inverse(e.modelViewProjection,e._inverseModelViewProjection))}function bNe(e){e._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,F.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye))}function gNe(e){e._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,F.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection))}function yNe(e){if(e._normalDirty){e._normalDirty=!1;let t=e._normal;F.getMatrix3(e.inverseModelView,t),q.transpose(t,t)}}function xNe(e){if(e._normal3DDirty){e._normal3DDirty=!1;let t=e._normal3D;F.getMatrix3(e.inverseModelView3D,t),q.transpose(t,t)}}function TNe(e){if(e._inverseNormalDirty){e._inverseNormalDirty=!1;let t=e._inverseNormal;F.getMatrix3(e.modelView,t),q.transpose(t,t)}}function _Ne(e){if(e._inverseNormal3DDirty){e._inverseNormal3DDirty=!1;let t=e._inverseNormal3D;F.getMatrix3(e.modelView3D,t),q.transpose(t,t)}}var vae=new m;function Fae(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,F.multiplyByPoint(e.inverseModel,e._cameraPosition,vae),Tn.fromCartesian(vae,e._encodedCameraPositionMC))}var SNe=new m,ANe=new m,ZNe=new m,CNe=new m,VNe=new pe,RNe=new m,ENe=new F;function GNe(e,t,n,i,o,r,s,a){let c=SNe;c.x=e.y,c.y=e.z,c.z=e.x;let d=ANe;d.x=n.y,d.y=n.z,d.z=n.x;let u=ZNe;u.x=i.y,u.y=i.z,u.z=i.x;let h=CNe;h.x=t.y,h.y=t.z,h.z=t.x,r===re.SCENE2D&&(c.z=o*.5);let p=s.unproject(c,VNe);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,RNe),y=dt.eastNorthUpToFixedFrame(f,b,ENe);return F.multiplyByPointAsVector(y,d,d),F.multiplyByPointAsVector(y,u,u),F.multiplyByPointAsVector(y,h,h),l(a)||(a=new F),a[0]=d.x,a[1]=u.x,a[2]=-h.x,a[3]=0,a[4]=d.y,a[5]=u.y,a[6]=-h.y,a[7]=0,a[8]=d.z,a[9]=u.z,a[10]=-h.z,a[11]=0,a[12]=-m.dot(d,f),a[13]=-m.dot(u,f),a[14]=m.dot(h,f),a[15]=1,a}function $K(e){e._view3DDirty&&(e._mode===re.SCENE3D?F.clone(e._view,e._view3D):GNe(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 Iae(e){e._inverseView3DDirty&&(F.inverseTransformation(e.view3D,e._inverseView3D),F.getMatrix3(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}var jL=gZ;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):LNe(e,o,i),c=typeof WebGL2RenderingContext<"u"&&s instanceof WebGL2RenderingContext;this._canvas=e,this._originalGLContext=s,this._gl=s,this._webgl2=c,this._id=zn(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new BL(this),this._textureCache=new zL;let d=s;this._stencilBits=d.getParameter(d.STENCIL_BITS),Lt._maximumCombinedTextureImageUnits=d.getParameter(d.MAX_COMBINED_TEXTURE_IMAGE_UNITS),Lt._maximumCubeMapSize=d.getParameter(d.MAX_CUBE_MAP_TEXTURE_SIZE),Lt._maximumFragmentUniformVectors=d.getParameter(d.MAX_FRAGMENT_UNIFORM_VECTORS),Lt._maximumTextureImageUnits=d.getParameter(d.MAX_TEXTURE_IMAGE_UNITS),Lt._maximumRenderbufferSize=d.getParameter(d.MAX_RENDERBUFFER_SIZE),Lt._maximumTextureSize=d.getParameter(d.MAX_TEXTURE_SIZE),Lt._maximum3DTextureSize=d.getParameter(d.MAX_3D_TEXTURE_SIZE),Lt._maximumVaryingVectors=d.getParameter(d.MAX_VARYING_VECTORS),Lt._maximumVertexAttributes=d.getParameter(d.MAX_VERTEX_ATTRIBS),Lt._maximumVertexTextureImageUnits=d.getParameter(d.MAX_VERTEX_TEXTURE_IMAGE_UNITS),Lt._maximumVertexUniformVectors=d.getParameter(d.MAX_VERTEX_UNIFORM_VECTORS),Lt._maximumSamples=this._webgl2?d.getParameter(d.MAX_SAMPLES):0;let u=d.getParameter(d.ALIASED_LINE_WIDTH_RANGE);Lt._minimumAliasedLineWidth=u[0],Lt._maximumAliasedLineWidth=u[1];let h=d.getParameter(d.ALIASED_POINT_SIZE_RANGE);Lt._minimumAliasedPointSize=h[0],Lt._maximumAliasedPointSize=h[1];let p=d.getParameter(d.MAX_VIEWPORT_DIMS);Lt._maximumViewportWidth=p[0],Lt._maximumViewportHeight=p[1];let b=d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_FLOAT);Lt._highpFloatSupported=b.precision!==0;let f=d.getShaderPrecisionFormat(d.FRAGMENT_SHADER,d.HIGH_INT);Lt._highpIntSupported=f.rangeMax!==0,this._antialias=d.getContextAttributes().antialias,this._standardDerivatives=!!zr(d,["OES_standard_derivatives"]),this._blendMinmax=!!zr(d,["EXT_blend_minmax"]),this._elementIndexUint=!!zr(d,["OES_element_index_uint"]),this._depthTexture=!!zr(d,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),this._fragDepth=!!zr(d,["EXT_frag_depth"]),this._debugShaders=zr(d,["WEBGL_debug_shaders"]),this._textureFloat=!!zr(d,["OES_texture_float"]),this._textureHalfFloat=!!zr(d,["OES_texture_half_float"]),this._textureFloatLinear=!!zr(d,["OES_texture_float_linear"]),this._textureHalfFloatLinear=!!zr(d,["OES_texture_half_float_linear"]),this._supportsTextureLod=!!zr(d,["EXT_shader_texture_lod"]),this._colorBufferFloat=!!zr(d,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),this._floatBlend=!!zr(d,["EXT_float_blend"]),this._colorBufferHalfFloat=!!zr(d,["EXT_color_buffer_half_float"]),this._s3tc=!!zr(d,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),this._pvrtc=!!zr(d,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),this._astc=!!zr(d,["WEBGL_compressed_texture_astc"]),this._etc=!!zr(d,["WEBG_compressed_texture_etc"]),this._etc1=!!zr(d,["WEBGL_compressed_texture_etc1"]),this._bc7=!!zr(d,["EXT_texture_compression_bptc"]),yd.setKTX2SupportedFormats(this._s3tc,this._pvrtc,this._astc,this._etc,this._etc1,this._bc7);let y=r?zr(d,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;this._textureFilterAnisotropic=y,Lt._maximumTextureFilterAnisotropy=l(y)?d.getParameter(y.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1;let _,S,A,Z,V,E,L,v,I,X;if(c){let R=this;_=function(){return R._gl.createVertexArray()},S=function(G){R._gl.bindVertexArray(G)},A=function(G){R._gl.deleteVertexArray(G)},Z=function(G,P,Y,O,k){d.drawElementsInstanced(G,P,Y,O,k)},V=function(G,P,Y,O){d.drawArraysInstanced(G,P,Y,O)},E=function(G,P){d.vertexAttribDivisor(G,P)},L=function(G){d.drawBuffers(G)}}else v=zr(d,["OES_vertex_array_object"]),l(v)&&(_=function(){return v.createVertexArrayOES()},S=function(R){v.bindVertexArrayOES(R)},A=function(R){v.deleteVertexArrayOES(R)}),I=zr(d,["ANGLE_instanced_arrays"]),l(I)&&(Z=function(R,G,P,Y,O){I.drawElementsInstancedANGLE(R,G,P,Y,O)},V=function(R,G,P,Y){I.drawArraysInstancedANGLE(R,G,P,Y)},E=function(R,G){I.vertexAttribDivisorANGLE(R,G)}),X=zr(d,["WEBGL_draw_buffers"]),l(X)&&(L=function(R){X.drawBuffersWEBGL(R)});this.glCreateVertexArray=_,this.glBindVertexArray=S,this.glDeleteVertexArray=A,this.glDrawElementsInstanced=Z,this.glDrawArraysInstanced=V,this.glVertexAttribDivisor=E,this.glDrawBuffers=L,this._vertexArrayObject=!!v,this._instancedArrays=!!I,this._drawBuffers=!!X,Lt._maximumDrawBuffers=this.drawBuffers?d.getParameter(ne.MAX_DRAW_BUFFERS):1,Lt._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 jL,g=new Dc(this),C=De.fromCache();this._defaultPassState=g,this._defaultRenderState=C,this._defaultTexture=void 0,this._defaultEmissiveTexture=void 0,this._defaultNormalTexture=void 0,this._defaultCubeMap=void 0,this._us=N,this._currentRenderState=C,this._currentPassState=g,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(let R=0;R<Lt._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,C,g)}function LNe(e,t,n){if(typeof WebGLRenderingContext>"u")throw new le("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 le("The browser supports WebGL, but initialization failed.");return r}function WNe(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 vNe(e,t,n,i){let o=`${WNe(e,i)}: ${t.name}(`;for(let r=0;r<n.length;++r)r!==0&&(o+=", "),o+=n[r];return o+=");",o}function FNe(e,t,n){let i=e.getError();if(i!==e.NO_ERROR)throw new le(vNe(e,t,n,i))}function INe(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 PNe(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,INe(e,o,t))}return i}function zr(e,t){let n=t.length;for(let i=0;i<n;++i){let o=e.getExtension(t[i]);if(o)return o}}var XNe={};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=PNe(this._originalGLContext,e?FNe:void 0)}},defaultTexture:{get:function(){return this._defaultTexture===void 0&&(this._defaultTexture=new Et({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 Et({context:this,pixelFormat:Ke.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([0,0,0])},flipY:!1})),this._defaultEmissiveTexture}},defaultNormalTexture:{get:function(){return this._defaultNormalTexture===void 0&&(this._defaultNormalTexture=new Et({context:this,pixelFormat:Ke.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([128,128,255])},flipY:!1})),this._defaultNormalTexture}},defaultCubeMap:{get:function(){if(this._defaultCubeMap===void 0){let e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])};this._defaultCubeMap=new Br({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 XNe}}});function Pae(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 eJ;typeof WebGLRenderingContext<"u"&&(eJ=[ne.BACK]);function s5(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;let n=eJ;if(l(t))t._bind(),n=t._getActiveColorAttachments();else{let i=e._gl;i.bindFramebuffer(i.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(n)}}var NNe=new si;Td.prototype.clear=function(e,t){e=e??NNe,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;Pae(this,a,t,!0);let c=e.framebuffer??t.framebuffer;s5(this,c),n.clear(i)};function YNe(e,t,n,i,o){s5(e,t),Pae(e,o,n,!1),i._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,i.maximumTextureUnitIndex)}function wNe(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,YNe(this,o,t,n,r),wNe(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=eJ;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 he("A WebGL 2 context is required to read pixels using a PBO.");let a=Oe.UNSIGNED_BYTE,c=Ke.RGBA;l(s)&&s.numberOfColorAttachments>0&&(a=s.getColorTexture(0).pixelDatatype,c=s.getColorTexture(0).pixelFormat);let d=qe.createPixelBuffer({context:this,sizeInBytes:Ke.textureSizeInBytes(c,a,o,r),usage:Fe.DYNAMIC_READ});return s5(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=Ke.RGBA;l(s)&&s.numberOfColorAttachments>0&&(a=s.getColorTexture(0).pixelDatatype,c=s.getColorTexture(0).pixelFormat);let d=Ke.createTypedArray(c,a,o,r);return s5(this,s),t.readPixels(n,i,o,r,Ke.RGBA,Oe.toWebGLConstant(a,this),d),d};var Xae={position:0,textureCoordinates:1};Td.prototype.getViewportQuadVertexArray=function(){let e=this.cache.viewportQuad_vertexArray;if(!l(e)){let t=new ft({attributes:{position:new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:ve.TRIANGLES});e=Mn.fromGeometry({context:this,geometry:t,attributeLocations:Xae,bufferUsage:Fe.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e};Td.prototype.createViewportQuadCommand=function(e,t){return t=t??B.EMPTY_OBJECT,new et({vertexArray:this.getViewportQuadVertexArray(),primitiveType:ve.TRIANGLES,renderState:t.renderState,shaderProgram:qt.fromCache({context:this,vertexShaderSource:pT,fragmentShaderSource:e,attributeLocations:Xae}),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 le("Out of unique Pick IDs.");return this._pickObjects.set(t,e),new dE(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(),me(this)};var VT=Td;var U6t=x(T(),1);var T6t=x(T(),1);function yZ(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 he("Both color renderbuffer and texture attachments must be provided.");if(l(s)!==l(a))throw new he("Both depth-stencil renderbuffer and texture attachments must be provided.");this._renderFramebuffer=new os({context:t,colorRenderbuffers:o,depthStencilRenderbuffer:s,destroyAttachments:c}),this._colorFramebuffer=new os({context:t,colorTextures:r,depthStencilTexture:a,destroyAttachments:c})}yZ.prototype.getRenderFramebuffer=function(){return this._renderFramebuffer};yZ.prototype.getColorFramebuffer=function(){return this._colorFramebuffer};yZ.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)};yZ.prototype.isDestroyed=function(){return!1};yZ.prototype.destroy=function(){return this._renderFramebuffer.destroy(),this._colorFramebuffer.destroy(),me(this)};var QL=yZ;var L6t=x(T(),1);var A6t=x(T(),1);var Zl={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===Zl.RGBA4||e===Zl.RGBA8||e===Zl.RGBA16F||e===Zl.RGBA32F||e===Zl.RGB5_A1||e===Zl.RGB565||e===Zl.DEPTH_COMPONENT16||e===Zl.STENCIL_INDEX8||e===Zl.DEPTH_STENCIL||e===Zl.DEPTH24_STENCIL8},getColorFormat:function(e){return e===ne.FLOAT?Zl.RGBA32F:e===ne.HALF_FLOAT_OES?Zl.RGBA16F:Zl.RGBA8}};Object.freeze(Zl);var Cl=Zl;function qL(e){e=e??B.EMPTY_OBJECT;let t=e.context,n=t._gl,i=Lt.maximumRenderbufferSize,o=e.format??Cl.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(qL.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});qL.prototype._getRenderbuffer=function(){return this._renderbuffer};qL.prototype.isDestroyed=function(){return!1};qL.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),me(this)};var ru=qL;function sa(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(sa.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}}});sa.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])};sa.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??Ke.RGBA:void 0),this.isDirty(t,n,i,o,r)){if(this.destroy(),this._width=t,this._height=n,this._numSamples=i,this._pixelDatatype=o,this._pixelFormat=r,this._attachmentsDirty=!1,this._color&&this._createColorAttachments){for(let s=0;s<this._colorAttachmentsLength;++s)if(this._colorTextures[s]=new Et({context:e,width:t,height:n,pixelFormat:r,pixelDatatype:o,sampler:Ut.NEAREST}),this._numSamples>1){let a=Cl.getColorFormat(o);this._colorRenderbuffers[s]=new ru({context:e,width:t,height:n,format:a,numSamples:this._numSamples})}}this._depthStencil&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?(this._depthStencilTexture=new Et({context:e,width:t,height:n,pixelFormat:Ke.DEPTH_STENCIL,pixelDatatype:Oe.UNSIGNED_INT_24_8,sampler:Ut.NEAREST}),this._numSamples>1&&(this._depthStencilRenderbuffer=new ru({context:e,width:t,height:n,format:Cl.DEPTH24_STENCIL8,numSamples:this._numSamples}))):this._depthStencilRenderbuffer=new ru({context:e,width:t,height:n,format:Cl.DEPTH_STENCIL})),this._depth&&this._createDepthAttachments&&(this._supportsDepthTexture&&e.depthTexture?this._depthTexture=new Et({context:e,width:t,height:n,pixelFormat:Ke.DEPTH_COMPONENT,pixelDatatype:Oe.UNSIGNED_INT,sampler:Ut.NEAREST}):this._depthRenderbuffer=new ru({context:e,width:t,height:n,format:Cl.DEPTH_COMPONENT16})),this._numSamples>1?this._multisampleFramebuffer=new QL({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 os({context:e,colorTextures:this._colorTextures,depthTexture:this._depthTexture,depthRenderbuffer:this._depthRenderbuffer,depthStencilTexture:this._depthStencilTexture,depthStencilRenderbuffer:this._depthStencilRenderbuffer,destroyAttachments:!1})}};sa.prototype.getColorTexture=function(e){return e=e??0,this._colorTextures[e]};sa.prototype.setColorTexture=function(e,t){t=t??0,this._attachmentsDirty=e!==this._colorTextures[t],this._colorTextures[t]=e};sa.prototype.getColorRenderbuffer=function(e){return e=e??0,this._colorRenderbuffers[e]};sa.prototype.setColorRenderbuffer=function(e,t){t=t??0,this._attachmentsDirty=e!==this._colorRenderbuffers[t],this._colorRenderbuffers[t]=e};sa.prototype.getDepthRenderbuffer=function(){return this._depthRenderbuffer};sa.prototype.setDepthRenderbuffer=function(e){this._attachmentsDirty=e!==this._depthRenderbuffer,this._depthRenderbuffer=e};sa.prototype.getDepthTexture=function(){return this._depthTexture};sa.prototype.setDepthTexture=function(e){this._attachmentsDirty=e!==this._depthTexture,this._depthTexture=e};sa.prototype.getDepthStencilRenderbuffer=function(){return this._depthStencilRenderbuffer};sa.prototype.setDepthStencilRenderbuffer=function(e){this._attachmentsDirty=e!==this._depthStencilRenderbuffer,this._depthStencilRenderbuffer=e};sa.prototype.getDepthStencilTexture=function(){return this._depthStencilTexture};sa.prototype.setDepthStencilTexture=function(e){this._attachmentsDirty=e!==this._depthStencilTexture,this._depthStencilTexture=e};sa.prototype.prepareTextures=function(e,t){this._numSamples>1&&this._multisampleFramebuffer.blitFramebuffers(e,t)};sa.prototype.clear=function(e,t,n){let i=t.framebuffer;t.framebuffer=this.framebuffer,t.execute(e,n),t.framebuffer=i};sa.prototype.destroyFramebuffer=function(){this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._multisampleFramebuffer=this._multisampleFramebuffer&&this._multisampleFramebuffer.destroy()};sa.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 yi=sa;var aqt=x(T(),1);var O6t=x(T(),1);var ty={NONE:0,VERTEX:1,FRAGMENT:2,BOTH:3};ty.includesVertexShader=function(e){return(e&ty.VERTEX)!==0};ty.includesFragmentShader=function(e){return(e&ty.FRAGMENT)!==0};ty.union=function(...e){let t=0;for(let n=0;n<e.length;n++)t|=e[n];return t};ty.intersection=function(...e){let t=e[0];for(let n=1;n<e.length;n++)t&=e[n];return t};Object.freeze(ty);var fe=ty;var z6t=x(T(),1);function tJ(e){this.name=e,this.fields=[]}tJ.prototype.addField=function(e,t){let n=` ${e} ${t};`;this.fields.push(n)};tJ.prototype.generateGlslLines=function(){let e=this.fields;return e.length===0&&(e=[" float _empty;"]),[].concat(`struct ${this.name}`,"{",e,"};")};var $L=tJ;var K6t=x(T(),1);function nJ(e){this.signature=e,this.body=[]}nJ.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}`)};nJ.prototype.generateGlslLines=function(){return[].concat(this.signature,"{",this.body,"}")};var eW=nJ;var Q6t=x(T(),1);function MNe(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=MNe;function Vl(){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(Vl.prototype,{attributeLocations:{get:function(){return this._attributeLocations}}});Vl.prototype.addDefine=function(e,t,n){n=n??fe.BOTH;let i=e;l(t)&&(i+=` ${t.toString()}`),fe.includesVertexShader(n)&&this._vertexShaderParts.defineLines.push(i),fe.includesFragmentShader(n)&&this._fragmentShaderParts.defineLines.push(i)};Vl.prototype.addStruct=function(e,t,n){this._structs[e]=new $L(t),fe.includesVertexShader(n)&&this._vertexShaderParts.structIds.push(e),fe.includesFragmentShader(n)&&this._fragmentShaderParts.structIds.push(e)};Vl.prototype.addStructField=function(e,t,n){this._structs[e].addField(t,n)};Vl.prototype.addFunction=function(e,t,n){this._functions[e]=new eW(t),fe.includesVertexShader(n)&&this._vertexShaderParts.functionIds.push(e),fe.includesFragmentShader(n)&&this._fragmentShaderParts.functionIds.push(e)};Vl.prototype.addFunctionLines=function(e,t){this._functions[e].addLines(t)};Vl.prototype.addUniform=function(e,t,n){n=n??fe.BOTH;let i=`uniform ${e} ${t};`;fe.includesVertexShader(n)&&this._vertexShaderParts.uniformLines.push(i),fe.includesFragmentShader(n)&&this._fragmentShaderParts.uniformLines.push(i)};Vl.prototype.setPositionAttribute=function(e,t){return this._positionAttributeLine=`in ${e} ${t};`,this._attributeLocations[t]=0,0};Vl.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+=UNe(e),i};Vl.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}`)};Vl.prototype.addVertexLines=function(e){let t=this._vertexShaderParts.shaderLines;Array.isArray(e)?qn(t,e):t.push(e)};Vl.prototype.addFragmentLines=function(e){let t=this._fragmentShaderParts.shaderLines;Array.isArray(e)?qn(t,e):t.push(e)};Vl.prototype.buildShaderProgram=function(e){let t=l(this._positionAttributeLine)?[this._positionAttributeLine]:[],n=kNe(this),i=DNe(this),o=t.concat(this._attributeLines,this._vertexShaderParts.uniformLines,this._vertexShaderParts.varyingLines,n.vertexLines,i.vertexLines,this._vertexShaderParts.shaderLines).join(`
`),r=new Be({defines:this._vertexShaderParts.defineLines,sources:[o]}),s=this._fragmentShaderParts.uniformLines.concat(this._fragmentShaderParts.varyingLines,n.fragmentLines,i.fragmentLines,this._fragmentShaderParts.shaderLines).join(`
`),a=new Be({defines:this._fragmentShaderParts.defineLines,sources:[s]});return qt.fromCache({context:e,vertexShaderSource:r,fragmentShaderSource:a,attributeLocations:this._attributeLocations})};Vl.prototype.clone=function(){return ze(this,!0)};function kNe(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 UNe(e){switch(e){case"mat2":return 2;case"mat3":return 3;case"mat4":return 4;default:return 1}}function DNe(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 M0=Vl;var mqt=x(T(),1);function a5(e){this._autoDestroy=e?.autoDestroy??!0,this._canvas=document.createElement("canvas"),this._context=new VT(this._canvas,ze(e?.contextOptions)),this._canvases=[]}a5.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)}}})};a5.prototype.destroy=function(){this._context.destroy(),me(this)};a5.prototype.isDestroyed=function(){return!1};var tW=a5;var xqt=x(T(),1);function RT(e){e=e??B.EMPTY_OBJECT;let t=e.context;if(!t._webgl2)throw new he("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),me(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 le("Wait for signal timeout")):e(i(o,r,s-1))}}return new Promise((o,r)=>{e(i(o,r,t))})};var nW=RT;var Fqt=x(T(),1);function ny(e){e=e??B.EMPTY_OBJECT;let{context:t,source:n,pixelFormat:i=Ke.RGBA,pixelDatatype:o=Oe.UNSIGNED_BYTE,flipY:r=!0,skipColorSpaceConversion:s=!1,sampler:a=new Ut}=e;if(!t.webgl2&&!l(t.options.getWebGLStub))throw new he("WebGL1 does not support texture3D. Please use a WebGL2 context.");let{width:c,height:d,depth:u}=e;l(n)&&(l(c)||(c=n.width),l(d)||(d=n.height),l(u)||(u=n.depth));let h=e.preMultiplyAlpha||i===Ke.RGB||i===Ke.LUMINANCE,p=Ke.toInternalFormat(i,o,t),b=Ke.isCompressedFormat(p),f=t._gl,y=Ke.texture3DSizeInBytes(i,o,c,d,u);if(this._id=e.id??zn(),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=f.TEXTURE_3D,this._texture=f.createTexture(),this._internalFormat=p,this._pixelFormat=i,this._pixelDatatype=o,this._width=c,this._height=d,this._depth=u,this._dimensions=new m(c,d,u),this._hasMipmap=!1,this._sizeInBytes=y,this._preMultiplyAlpha=h,this._flipY=r,this._initialized=!1,this._sampler=void 0,this._sampler=a,wae(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 he("For Texture3D, options.source.arrayBufferView must be defined");Nae(this,n),this._initialized=!0}else Yae(this);f.bindTexture(this._textureTarget,null)}function Nae(e,t){let n=e._context,i=n._gl,o=e._textureTarget,r=e._internalFormat,{width:s,height:a,depth:c,pixelFormat:d,pixelDatatype:u,flipY:h}=e,p=Ke.alignmentInBytes(d,u,s);i.pixelStorei(i.UNPACK_ALIGNMENT,p),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1);let{arrayBufferView:b}=t;h&&console.warn("texture3D.flipY is not supported.");let f=1;if(t.mipLevels&&t.mipLevels.length&&(f=t.mipLevels.length+1),i.texStorage3D(o,f,r,s,a,c),i.texSubImage3D(o,0,0,0,0,s,a,c,d,Oe.toWebGLConstant(u,n),b),f>1){let y=s,_=a,S=c;for(let A=0;A<t.mipLevels.length;++A)y=iJ(y),_=iJ(_),S=iJ(S),i.texSubImage3D(o,A+1,0,0,0,y,_,S,d,Oe.toWebGLConstant(u,n),t.mipLevels[A])}}ny.prototype.copyFrom=function(e){e=e??B.EMPTY_OBJECT;let{source:t,xOffset:n=0,yOffset:i=0,zOffset:o=0}=e,s=this._context._gl,a=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(a,this._texture);let{width:c,height:d,depth:u}=t,h=!1;this._initialized||(n===0&&i===0&&o===0&&c===this._width&&d===this._height&&u===this._depth?(Nae(this,t),h=!0):(s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!1),Yae(this)),this._initialized=!0),h||ONe(this,t.arrayBufferView,n,i,o,c,d,u),s.bindTexture(a,null)};function ONe(e,t,n,i,o,r,s,a){let c=e._context,d=c._gl,{pixelFormat:u,pixelDatatype:h}=e,p=Ke.alignmentInBytes(u,h,r);d.pixelStorei(d.UNPACK_ALIGNMENT,p),d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,!1),d.texSubImage3D(e._textureTarget,0,n,i,o,r,s,a,u,Oe.toWebGLConstant(h,c),t)}function iJ(e){let t=Math.floor(e/2)|0;return Math.max(t,1)}function Yae(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)}ny.create=function(e){return new ny(e)};Object.defineProperties(ny.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){wae(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 wae(e,t){let{minificationFilter:n,magnificationFilter:i}=t,o=[kt.NEAREST_MIPMAP_NEAREST,kt.NEAREST_MIPMAP_LINEAR,kt.LINEAR_MIPMAP_NEAREST,kt.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?kt.NEAREST_MIPMAP_NEAREST:kt.NEAREST,i=ni.NEAREST),Ke.isDepthFormat(s)&&(n=kt.NEAREST,i=ni.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)}ny.prototype.generateMipmap=function(e){e=e??um.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)};ny.prototype.isDestroyed=function(){return!1};ny.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),me(this)};var iW=ny;var qqt=x(T(),1);var Nqt=x(T(),1);function oW({x:e,y:t,width:n,height:i}){this.rectangle=new Qe(e,t,n,i),this.childNode1=void 0,this.childNode2=void 0,this.index=void 0}function oJ({width:e,height:t,borderPadding:n}){this._width=e,this._height=t,this._borderPadding=n,this._root=new oW({x:n,y:n,width:e-2*n,height:t-2*n})}oJ.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};oJ.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 oW({x:i.x,y:i.y,width:t,height:r});let u=s-c;return u>0&&(e.childNode2=new oW({x:i.x+t+c,y:i.y,width:u,height:r})),this._findNode(e.childNode1,{width:t,height:n})}e.childNode1=new oW({x:i.x,y:i.y,width:o,height:n});let d=a-c;return d>0&&(e.childNode2=new oW({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 xZ=oJ;var Mae=16;function Rl(e){e=e??B.EMPTY_OBJECT;let t=e.borderWidthInPixels??1,n=e.initialSize??new M(Mae,Mae);this._pixelFormat=e.pixelFormat??Ke.RGBA,this._sampler=e.sampler,this._borderWidthInPixels=t,this._initialSize=n,this._texturePacker=void 0,this._rectangles=[],this._subRegions=new Map,this._guid=zn(),this._imagesToAddQueue=[],this._indexById=new Map,this._indexPromiseById=new Map,this._nextIndex=0}Object.defineProperties(Rl.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}}});Rl.prototype.computeTextureCoordinates=function(e,t){let n=this._texture,i=this._rectangles[e];if(l(t)||(t=new Qe),!l(i))return t.x=0,t.y=0,t.width=0,t.height=0,t;let o=n.width,r=n.height,s=i.width,a=i.height,c=i.x,d=i.y,u=this._subRegions.get(e);if(l(u)){let h=this._rectangles[u];c+=h.x,d+=h.y}return t.x=c/o,t.y=d/r,t.width=s/o,t.height=a/r,t};Rl.prototype._copyFromTexture=function(e,t,n,i){let o=this._pixelFormat,r=this._sampler,s=new Et({context:e,height:n,width:t,pixelFormat:o,sampler:r}),a=e._gl,c=s._textureTarget,d=this._texture,u=new os({context:e,colorTextures:[d],destroyAttachments:!1});a.activeTexture(a.TEXTURE0),a.bindTexture(c,s._texture),u._bind();let h=this.rectangles,p=this._subRegions;for(let b=0;b<h.length;++b){let f=i[b],y=h[b];if(!l(f)||!l(y)||l(p.get(b)))continue;let{x:_,y:S,width:A,height:Z}=f;a.copyTexSubImage2D(c,0,_,S,y.x,y.y,A,Z)}return a.bindTexture(c,null),s._initialized=!0,u._unBind(),u.destroy(),s};Rl.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 kae({index:S,image:_})).filter((_,S)=>l(_.image)&&!l(c.get(S))),u=0,h=0,p=0;for(let _=t;_<o.length;++_){let{width:S,height:A}=o[_].image;u=Math.max(u,S),h=Math.max(h,A),p+=S*A,d.push(o[_])}for(s=W.nextPowerOfTwo(Math.max(u,s)),a=W.nextPowerOfTwo(Math.max(h,a));p>=s*a;)s>a?a*=2:s*=2;d.sort(({image:_},{image:S})=>S.height*S.width-_.height*_.width);let b=new Array(this._nextIndex);for(let _ of this._subRegions.keys())l(c.get(_))&&(b[_]=i[_]);let f,y=!1;for(;!y;){f=new xZ({height:a,width:s,borderPadding:n});let _;for(_=0;_<d.length;++_){let{index:S,image:A}=d[_];if(!l(A))continue;let Z=f.pack(S,A);if(!l(Z)){s>a?a*=2:s*=2;break}b[S]=Z.rectangle}y=_===d.length}this._texturePacker=f,this._texture=this._copyFromTexture(e,s,a,b),r.destroy(),this._rectangles=b,this._guid=zn()};Rl.prototype.getImageIndex=function(e){return this._indexById.get(e)};Rl.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 kae({index:e,image:t,resolve:n,reject:i}){this.index=e,this.image=t,this.resolve=n,this.reject=i,this.rectangle=void 0}Rl.prototype._addImage=function(e,t){return new Promise((n,i)=>{this._imagesToAddQueue.push(new kae({index:e,image:t,resolve:n,reject:i})),this._imagesToAddQueue.sort(({image:o},{image:r})=>r.height*r.width-o.height*o.width)})};Rl.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};Rl.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 Et({context:e,width:t,height:n,pixelFormat:i,sampler:o}),this._texturePacker=new xZ({height:n,width:t,borderPadding:r})}return this._processImageQueue(e)};async function BNe(e,t){return typeof e=="function"&&(e=e(t)),(typeof e=="string"||e instanceof We)&&(e=We.createIfNeeded(e).fetchImage()),e}Rl.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 BNe(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)};Rl.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};Rl.prototype.addImageSubRegion=function(e,t){let n=this._indexById.get(e);if(!l(n))throw new le(`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}))};Rl.prototype.isDestroyed=function(){return!1};Rl.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),this._imagesToAddQueue.forEach(({resolve:e})=>{l(e)&&e(-1)}),me(this)};var ET=Rl;var a$t=x(T(),1);function Ea(e,t,n,i){let o=Ea._verifyAttributes(t);n=n??0;let r=[],s={},a,c,d=o.length;for(let h=0;h<d;++h){let p=o[h];if(p.vertexBuffer){r.push(p);continue}c=p.usage,a=s[c],l(a)||(a=s[c]=[]),a.push(p)}function u(h,p){return K.getSizeInBytes(p.componentDatatype)-K.getSizeInBytes(h.componentDatatype)}this._allBuffers=[];for(c in s)if(s.hasOwnProperty(c)){a=s[c],a.sort(u);let h=Ea._vertexSizeInBytes(a),p=a[0].usage,b={vertexSizeInBytes:h,vertexBuffer:void 0,usage:p,needsCommit:!1,arrayBuffer:void 0,arrayViews:Ea._createArrayViews(a,h)};this._allBuffers.push(b)}this._size=0,this._instanced=i??!1,this._precreated=r,this._context=e,this.writers=void 0,this.va=void 0,this.resize(n)}Ea._verifyAttributes=function(e){let t=[];for(let i=0;i<e.length;++i){let o=e[i],r={index:o.index??i,enabled:o.enabled??!0,componentsPerAttribute:o.componentsPerAttribute,componentDatatype:o.componentDatatype??K.FLOAT,normalize:o.normalize??!1,vertexBuffer:o.vertexBuffer,usage:o.usage??Fe.STATIC_DRAW};t.push(r)}let n=new Array(t.length);for(let i=0;i<t.length;++i){let r=t[i].index;n[r]=!0}return t};Ea._vertexSizeInBytes=function(e){let t=0,n=e.length;for(let s=0;s<n;++s){let a=e[s];t+=a.componentsPerAttribute*K.getSizeInBytes(a.componentDatatype)}let i=n>0?K.getSizeInBytes(e[0].componentDatatype):0,o=i>0?t%i:0,r=o===0?0:i-o;return t+=r,t};Ea._createArrayViews=function(e,t){let n=[],i=0,o=e.length;for(let r=0;r<o;++r){let s=e[r],a=s.componentDatatype;n.push({index:s.index,enabled:s.enabled,componentsPerAttribute:s.componentsPerAttribute,componentDatatype:a,normalize:s.normalize,offsetInBytes:i,vertexSizeInComponentType:t/K.getSizeInBytes(a),view:void 0}),i+=s.componentsPerAttribute*K.getSizeInBytes(a)}return n};Ea.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];Ea._resize(o,this._size),Ea._appendWriters(this.writers,o)}rJ(this)};Ea._resize=function(e,t){if(e.vertexSizeInBytes>0){let n=new ArrayBuffer(t*e.vertexSizeInBytes);if(l(e.arrayBuffer)){let r=new Uint8Array(n),s=new Uint8Array(e.arrayBuffer),a=s.length;for(let c=0;c<a;++c)r[c]=s[c]}let i=e.arrayViews,o=i.length;for(let r=0;r<o;++r){let s=i[r];s.view=K.createArrayBufferView(s.componentDatatype,n,s.offsetInBytes)}e.arrayBuffer=n}};var zNe=[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}}];Ea._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]=zNe[r.componentsPerAttribute-1](t,r.view,r.vertexSizeInComponentType)}};Ea.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=HNe(this,i)||t;if(t||!l(this.va)){rJ(this);let s=this.va=[],a=W.SIXTY_FOUR_KILOBYTES-4,c=l(e)&&!this._instanced?Math.ceil(this._size/a):1;for(let d=0;d<c;++d){let u=[];for(o=0,r=n.length;o<r;++o){i=n[o];let h=d*(i.vertexSizeInBytes*a);Ea._appendAttributes(u,i,h,this._instanced)}u=u.concat(this._precreated),s.push({va:new Mn({context:this._context,attributes:u,indexBuffer:e}),indicesCount:1.5*(d!==c-1?a:this._size%a)})}}};function HNe(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}Ea._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})}};Ea.prototype.subCommit=function(e,t){let n=this._allBuffers;for(let i=0,o=n.length;i<o;++i)KNe(n[i],e,t)};function KNe(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)}}Ea.prototype.endSubCommits=function(){let e=this._allBuffers;for(let t=0,n=e.length;t<n;++t)e[t].needsCommit=!1};function rJ(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}Ea.prototype.isDestroyed=function(){return!1};Ea.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 rJ(this),me(this)};var k0=Ea;var u$t=x(T(),1);function JNe(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 Br({context:e,source:{positiveX:r[0],negativeX:r[1],positiveY:r[2],negativeY:r[3],positiveZ:r[4],negativeZ:r[5]}})})}var rW=JNe;var C$t=x(T(),1);var x$t=x(T(),1);var p$t=x(T(),1);function iy(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new _e,this.setValue(e)}Object.defineProperties(iy.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}});iy.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value};iy.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))}};iy.prototype.equals=function(e){return this===e||e instanceof iy&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))};iy.prototype.valueOf=function(){return this._value};iy.prototype.toString=function(){return String(this._value)};var ci=iy;function jNe(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 QNe(e){return new ci(e)}function qNe(e,t,n){return jNe(e,`_${e.toString()}`,`_${e.toString()}Subscription`,t??!1,n??QNe)}var ge=qNe;function sW(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(sW.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")});sW.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 sW(this)};sW.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 Oc=sW;var uen=x(T(),1);var E$t=x(T(),1);var sJ=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)}},It=sJ;var W$t=x(T(),1);function su(e,t){e=e??0,this._near=e,t=t??Number.MAX_VALUE,this._far=t}Object.defineProperties(su.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}}});su.packedLength=2;su.pack=function(e,t,n){return n=n??0,t[n++]=e.near,t[n]=e.far,t};su.unpack=function(e,t,n){return t=t??0,l(n)||(n=new su),n.near=e[t++],n.far=e[t],n};su.equals=function(e,t){return e===t||l(e)&&l(t)&&e.near===t.near&&e.far===t.far};su.clone=function(e,t){if(l(e))return l(t)||(t=new su),t.near=e.near,t.far=e.far,t};su.prototype.clone=function(e){return su.clone(this,e)};su.prototype.equals=function(e){return su.equals(this,e)};var Yt=su;var I$t=x(T(),1);function fm(e,t,n,i){this.near=e??0,this.nearValue=t??0,this.far=n??1,this.farValue=i??0}fm.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 fm(e.near,e.nearValue,e.far,e.farValue)};fm.packedLength=4;fm.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};fm.unpack=function(e,t,n){return t=t??0,l(n)||(n=new fm),n.near=e[t++],n.nearValue=e[t++],n.far=e[t++],n.farValue=e[t],n};fm.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};fm.prototype.clone=function(e){return fm.clone(this,e)};fm.prototype.equals=function(e){return fm.equals(this,e)};var wt=fm;var X$t=x(T(),1),oy={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(oy);var tt=oy;function pm(e){return e===oy.CLAMP_TO_GROUND||e===oy.CLAMP_TO_3D_TILE||e===oy.CLAMP_TO_TERRAIN}function TZ(e){return e===oy.RELATIVE_TO_GROUND||e===oy.RELATIVE_TO_3D_TILE||e===oy.RELATIVE_TO_TERRAIN}var Y$t=x(T(),1),Uae={CENTER:0,LEFT:1,RIGHT:-1};Object.freeze(Uae);var Ii=Uae;var M$t=x(T(),1),Dae={CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1};Object.freeze(Dae);var Dn=Dae;var U$t=x(T(),1),$Ne=Object.freeze({DONE:0,PENDING:1,FAILED:2}),xt=$Ne;var z$t=x(T(),1);function Fh(){he.throwInstantiationError()}Object.defineProperties(Fh.prototype,{isConstant:{get:he.throwInstantiationError},definitionChanged:{get:he.throwInstantiationError}});Fh.prototype.getValue=he.throwInstantiationError;Fh.prototype.equals=he.throwInstantiationError;Fh.equals=function(e,t){return e===t||l(e)&&e.equals(t)};Fh.arrayEquals=function(e,t){if(e===t)return!0;if(!l(e)||!l(t)||e.length!==t.length)return!1;let n=e.length;for(let i=0;i<n;i++)if(!Fh.equals(e[i],t[i]))return!1;return!0};Fh.isConstant=function(e){return!l(e)||e.isConstant};Fh.getValueOrUndefined=function(e,t,n){return l(e)?e.getValue(t,n):void 0};Fh.getValueOrDefault=function(e,t,n,i){return l(e)?e.getValue(t,i)??n:n};Fh.getValueOrClonedDefault=function(e,t,n,i){let o;return l(e)&&(o=e.getValue(t,i)),l(o)||(o=n.clone(o)),o};var j=Fh;var K$t=x(T(),1),Oae={LEFT:-1,NONE:0,RIGHT:1};Object.freeze(Oae);var Er=Oae;var eYe=U.WHITE,tYe=m.ZERO,nYe=tt.NONE,iYe=M.ZERO,oYe=1,rYe=0,sYe=m.ZERO,aYe=Ii.CENTER,cYe=Dn.CENTER,lYe=!1,dYe=Er.NONE,uYe=new m,mYe=new U,hYe=new m,fYe=new M,pYe=new wt,bYe=new wt,gYe=new wt,yYe=new Qe,xYe=new Yt;function Bae(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function ry(e,t){t.collectionChanged.addEventListener(ry.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new It,this._onCollectionChanged(t,t.values,[],[])}ry.prototype.update=function(e){let t=this._items.values,n=this._cluster;for(let i=0,o=t.length;i<o;i++){let r=t[i],s=r.entity,a=s._billboard,c,d=r.billboard,u=s.isShowing&&s.isAvailable(e)&&j.getValueOrDefault(a._show,e,!0),h;if(u&&(h=j.getValueOrUndefined(s._position,e,uYe),c=j.getValueOrUndefined(a._image,e),u=l(h)&&l(c)),!u){aJ(r,s,n);continue}j.isConstant(s._position)||(n._clusterDirty=!0),l(d)||(d=n.getBillboard(s),d.id=s,r.billboard=d,r.textureValue=void 0),d.show=u,d.position=h,d.color=j.getValueOrDefault(a._color,e,eYe,mYe),d.eyeOffset=j.getValueOrDefault(a._eyeOffset,e,tYe,hYe),d.heightReference=j.getValueOrDefault(a._heightReference,e,nYe),d.pixelOffset=j.getValueOrDefault(a._pixelOffset,e,iYe,fYe),d.scale=j.getValueOrDefault(a._scale,e,oYe),d.rotation=j.getValueOrDefault(a._rotation,e,rYe),d.alignedAxis=j.getValueOrDefault(a._alignedAxis,e,sYe),d.horizontalOrigin=j.getValueOrDefault(a._horizontalOrigin,e,aYe),d.verticalOrigin=j.getValueOrDefault(a._verticalOrigin,e,cYe),d.width=j.getValueOrUndefined(a._width,e),d.height=j.getValueOrUndefined(a._height,e),d.scaleByDistance=j.getValueOrUndefined(a._scaleByDistance,e,pYe),d.translucencyByDistance=j.getValueOrUndefined(a._translucencyByDistance,e,bYe),d.pixelOffsetScaleByDistance=j.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,gYe),d.sizeInMeters=j.getValueOrDefault(a._sizeInMeters,e,lYe),d.distanceDisplayCondition=j.getValueOrUndefined(a._distanceDisplayCondition,e,xYe),d.disableDepthTestDistance=j.getValueOrUndefined(a._disableDepthTestDistance,e),d.splitDirection=j.getValueOrDefault(a._splitDirection,e,dYe),r.textureValue!==c&&(d.image=c,r.textureValue=c);let p=j.getValueOrUndefined(a._imageSubRegion,e,yYe);l(p)&&d.setImageSubRegion(d.image,p)}return!0};ry.prototype.getBoundingSphere=function(e,t){let n=this._items.get(e.id);if(!l(n)||!l(n.billboard))return xt.FAILED;let i=n.billboard;if(i.heightReference===tt.NONE)t.center=m.clone(i.position,t.center);else{if(!l(i._clampedPosition))return xt.PENDING;t.center=m.clone(i._clampedPosition,t.center)}return t.radius=0,xt.DONE};ry.prototype.isDestroyed=function(){return!1};ry.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(ry.prototype._onCollectionChanged,this);let e=this._entityCollection.values;for(let t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return me(this)};ry.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 Bae(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 Bae(r)):(aJ(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],aJ(s.get(r.id),r,a),s.remove(r.id)};function aJ(e,t,n){l(e)&&(e.billboard=void 0,n.removeBillboard(t))}var aW=ry;var Gpn=x(T(),1);var Aen=x(T(),1);var TYe=new m;function mp(e){e=e??B.EMPTY_OBJECT;let t=e.minimum,n=e.maximum;this._min=m.clone(t),this._max=m.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}mp.fromDimensions=function(e){e=e??B.EMPTY_OBJECT;let t=e.dimensions,n=m.multiplyByScalar(t,.5,new m);return new mp({minimum:m.negate(n,new m),maximum:n,offsetAttribute:e.offsetAttribute})};mp.fromAxisAlignedBoundingBox=function(e){return new mp({minimum:e.minimum,maximum:e.maximum})};mp.packedLength=2*m.packedLength+1;mp.pack=function(e,t,n){return n=n??0,m.pack(e._min,t,n),m.pack(e._max,t,n+m.packedLength),t[n+m.packedLength*2]=e._offsetAttribute??-1,t};var Hae=new m,Kae=new m,zae={minimum:Hae,maximum:Kae,offsetAttribute:void 0};mp.unpack=function(e,t,n){t=t??0;let i=m.unpack(e,t,Hae),o=m.unpack(e,t+m.packedLength,Kae),r=e[t+m.packedLength*2];return l(n)?(n._min=m.clone(i,n._min),n._max=m.clone(o,n._max),n._offsetAttribute=r===-1?void 0:r,n):(zae.offsetAttribute=r===-1?void 0:r,new mp(zae))};mp.createGeometry=function(e){let t=e._min,n=e._max;if(m.equals(t,n))return;let i=new bn,o=new Uint16Array(24),r=new Float64Array(24);r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=n.x,r[4]=t.y,r[5]=t.z,r[6]=n.x,r[7]=n.y,r[8]=t.z,r[9]=t.x,r[10]=n.y,r[11]=t.z,r[12]=t.x,r[13]=t.y,r[14]=n.z,r[15]=n.x,r[16]=t.y,r[17]=n.z,r[18]=n.x,r[19]=n.y,r[20]=n.z,r[21]=t.x,r[22]=n.y,r[23]=n.z,i.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:r}),o[0]=4,o[1]=5,o[2]=5,o[3]=6,o[4]=6,o[5]=7,o[6]=7,o[7]=4,o[8]=0,o[9]=1,o[10]=1,o[11]=2,o[12]=2,o[13]=3,o[14]=3,o[15]=0,o[16]=0,o[17]=4,o[18]=1,o[19]=5,o[20]=2,o[21]=6,o[22]=3,o[23]=7;let s=m.subtract(n,t,TYe),a=m.magnitude(s)*.5;if(l(e._offsetAttribute)){let c=r.length,d=e._offsetAttribute===dn.NONE?0:1,u=new Uint8Array(c/3).fill(d);i.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}return new ft({attributes:i,indices:o,primitiveType:ve.LINES,boundingSphere:new de(m.ZERO,a),offsetAttribute:e._offsetAttribute})};var Ih=mp;var Een=x(T(),1);function _Z(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(_Z.prototype,{componentDatatype:{get:function(){return K.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}});_Z.fromColor=function(e){return new _Z(e.red,e.green,e.blue,e.alpha)};_Z.toValue=function(e,t){return l(t)?e.toBytes(t):new Uint8Array(e.toBytes())};_Z.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 Ht=_Z;var ven=x(T(),1);function cW(e,t){e=e??0,t=t??Number.MAX_VALUE,this.value=new Float32Array([e,t])}Object.defineProperties(cW.prototype,{componentDatatype:{get:function(){return K.FLOAT}},componentsPerAttribute:{get:function(){return 2}},normalize:{get:function(){return!1}}});cW.fromDistanceDisplayCondition=function(e){return new cW(e.near,e.far)};cW.toValue=function(e,t){return l(t)?(t[0]=e.near,t[1]=e.far,t):new Float32Array([e.near,e.far])};var Kn=cW;var Xen=x(T(),1);function _Ye(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 Wt=_Ye;var zen=x(T(),1);var Uen=x(T(),1);function gr(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(gr.prototype,{isEmpty:{get:function(){let e=Q.compare(this.stop,this.start);return e<0||e===0&&(!this.isStartIncluded||!this.isStopIncluded)}}});var SZ={start:void 0,stop:void 0,isStartIncluded:void 0,isStopIncluded:void 0,data:void 0};gr.fromIso8601=function(e,t){let n=e.iso8601.split("/");if(n.length!==2)throw new he("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):(SZ.start=i,SZ.stop=o,SZ.isStartIncluded=r,SZ.isStopIncluded=s,SZ.data=a,new gr(SZ))};gr.toIso8601=function(e,t){return`${Q.toIso8601(e.start,t)}/${Q.toIso8601(e.stop,t)}`};gr.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 gr(e)};gr.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)))};gr.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)))};gr.intersect=function(e,t,n,i){if(!l(t))return gr.clone(gr.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 gr.clone(gr.EMPTY,n);let u=e.isStartIncluded,h=e.isStopIncluded,p=t.isStartIncluded,b=t.isStopIncluded,f=Q.lessThan(r,a);return l(n)||(n=new gr),n.start=c?s:o,n.isStartIncluded=u&&p||!Q.equals(s,o)&&(c&&p||d&&u),n.stop=f?r:a,n.isStopIncluded=f?h:h&&b||!Q.equals(a,r)&&b,n.data=l(i)?i(e.data,t.data):e.data,n};gr.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};gr.prototype.clone=function(e){return gr.clone(this,e)};gr.prototype.equals=function(e,t){return gr.equals(this,e,t)};gr.prototype.equalsEpsilon=function(e,t,n){return gr.equalsEpsilon(this,e,t,n)};gr.prototype.toString=function(){return gr.toIso8601(this)};gr.EMPTY=Object.freeze(new gr({start:new Q,stop:new Q,isStartIncluded:!1,isStopIncluded:!1}));var En=gr;var Jae=Object.freeze(Q.fromIso8601("0000-01-01T00:00:00Z")),jae=Object.freeze(Q.fromIso8601("9999-12-31T24:00:00Z")),SYe=Object.freeze(new En({start:Jae,stop:jae})),AYe={MINIMUM_VALUE:Jae,MAXIMUM_VALUE:jae,MAXIMUM_INTERVAL:SYe},Je=AYe;var jen=x(T(),1);function lW(e,t,n){e=e??0,t=t??0,n=n??0,this.value=new Float32Array([e,t,n])}Object.defineProperties(lW.prototype,{componentDatatype:{get:function(){return K.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}});lW.fromCartesian3=function(e){return new lW(e.x,e.y,e.z)};lW.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 fo=lW;var etn=x(T(),1);function c5(e){e=e??!0,this.value=c5.toValue(e)}Object.defineProperties(c5.prototype,{componentDatatype:{get:function(){return K.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}});c5.toValue=function(e,t){return l(t)?(t[0]=e,t):new Uint8Array([e])};var Zn=c5;var pin=x(T(),1);var ntn=x(T(),1),dW=`in vec3 v_positionEC;
in vec3 v_normalEC;
in vec3 v_tangentEC;
in vec3 v_bitangentEC;
in vec2 v_st;
void main()
{
vec3 positionToEyeEC = -v_positionEC;
mat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);
vec3 normalEC = normalize(v_normalEC);
#ifdef FACE_FORWARD
normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif
czm_materialInput materialInput;
materialInput.normalEC = normalEC;
materialInput.tangentToEyeMatrix = tangentToEyeMatrix;
materialInput.positionToEyeEC = positionToEyeEC;
materialInput.st = v_st;
czm_material material = czm_getMaterial(materialInput);
#ifdef FLAT
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#else
out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}
`;var otn=x(T(),1),uW=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 normal;
in vec3 tangent;
in vec3 bitangent;
in vec2 st;
in float batchId;
out vec3 v_positionEC;
out vec3 v_normalEC;
out vec3 v_tangentEC;
out vec3 v_bitangentEC;
out vec2 v_st;
void main()
{
vec4 p = czm_computePosition();
v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
v_normalEC = czm_normal * normal; // normal in eye coordinates
v_tangentEC = czm_normal * tangent; // tangent in eye coordinates
v_bitangentEC = czm_normal * bitangent; // bitangent in eye coordinates
v_st = st;
gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;var stn=x(T(),1),mW=`in vec3 v_positionEC;
in vec3 v_normalEC;
void main()
{
vec3 positionToEyeEC = -v_positionEC;
vec3 normalEC = normalize(v_normalEC);
#ifdef FACE_FORWARD
normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif
czm_materialInput materialInput;
materialInput.normalEC = normalEC;
materialInput.positionToEyeEC = positionToEyeEC;
czm_material material = czm_getMaterial(materialInput);
#ifdef FLAT
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#else
out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}
`;var ctn=x(T(),1),hW=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 normal;
in float batchId;
out vec3 v_positionEC;
out vec3 v_normalEC;
void main()
{
vec4 p = czm_computePosition();
v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
v_normalEC = czm_normal * normal; // normal in eye coordinates
gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;var dtn=x(T(),1),fW=`in vec3 v_positionEC;
in vec3 v_normalEC;
in vec2 v_st;
void main()
{
vec3 positionToEyeEC = -v_positionEC;
vec3 normalEC = normalize(v_normalEC);
#ifdef FACE_FORWARD
normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif
czm_materialInput materialInput;
materialInput.normalEC = normalEC;
materialInput.positionToEyeEC = positionToEyeEC;
materialInput.st = v_st;
czm_material material = czm_getMaterial(materialInput);
#ifdef FLAT
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#else
out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}
`;var mtn=x(T(),1),pW=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 normal;
in vec2 st;
in float batchId;
out vec3 v_positionEC;
out vec3 v_normalEC;
out vec2 v_st;
void main()
{
vec4 p = czm_computePosition();
v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
v_normalEC = czm_normal * normal; // normal in eye coordinates
v_st = st;
gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;var Ftn=x(T(),1);var Stn=x(T(),1);var ptn=x(T(),1);var Qae={ADD:ne.FUNC_ADD,SUBTRACT:ne.FUNC_SUBTRACT,REVERSE_SUBTRACT:ne.FUNC_REVERSE_SUBTRACT,MIN:ne.MIN,MAX:ne.MAX};Object.freeze(Qae);var _c=Qae;var ytn=x(T(),1);var qae={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(qae);var Do=qae;var $ae={DISABLED:Object.freeze({enabled:!1}),ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:_c.ADD,equationAlpha:_c.ADD,functionSourceRgb:Do.SOURCE_ALPHA,functionSourceAlpha:Do.ONE,functionDestinationRgb:Do.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:Do.ONE_MINUS_SOURCE_ALPHA}),PRE_MULTIPLIED_ALPHA_BLEND:Object.freeze({enabled:!0,equationRgb:_c.ADD,equationAlpha:_c.ADD,functionSourceRgb:Do.ONE,functionSourceAlpha:Do.ONE,functionDestinationRgb:Do.ONE_MINUS_SOURCE_ALPHA,functionDestinationAlpha:Do.ONE_MINUS_SOURCE_ALPHA}),ADDITIVE_BLEND:Object.freeze({enabled:!0,equationRgb:_c.ADD,equationAlpha:_c.ADD,functionSourceRgb:Do.SOURCE_ALPHA,functionSourceAlpha:Do.ONE,functionDestinationRgb:Do.ONE,functionDestinationAlpha:Do.ONE})};Object.freeze($ae);var tn=$ae;var Ctn=x(T(),1);var ece={FRONT:ne.FRONT,BACK:ne.BACK,FRONT_AND_BACK:ne.FRONT_AND_BACK};Object.freeze(ece);var Pi=ece;function AZ(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(AZ.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}}});AZ.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(`
`)};AZ.prototype.isTranslucent=function(){return l(this.material)&&this.material.isTranslucent()||!l(this.material)&&this.translucent};AZ.prototype.getRenderState=function(){let e=this.isTranslucent(),t=ze(this.renderState,!1);return e?(t.depthMask=!1,t.blending=tn.ALPHA_BLEND):t.depthMask=!0,t};AZ.getDefaultRenderState=function(e,t,n){let i={depthTest:{enabled:!0}};return e&&(i.depthMask=!1,i.blending=tn.ALPHA_BLEND),t&&(i.cull={enabled:!0,face:Pi.BACK}),l(n)&&(i=Rt(n,i,!0)),i};var yo=AZ;var nin=x(T(),1);var Ptn=x(T(),1),bW=`uniform sampler2D image;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec4 rampColor = texture(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));
rampColor = czm_gammaCorrect(rampColor);
material.diffuse = rampColor.rgb;
material.alpha = rampColor.a;
return material;
}
`;var Ntn=x(T(),1),gW=`uniform sampler2D image;
uniform float strength;
uniform vec2 repeat;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 st = materialInput.st;
vec2 centerPixel = fract(repeat * st);
float centerBump = texture(image, centerPixel).channel;
float imageWidth = float(imageDimensions.x);
vec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));
float rightBump = texture(image, rightPixel).channel;
float imageHeight = float(imageDimensions.y);
vec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));
float topBump = texture(image, leftPixel).channel;
vec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));
vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;
material.normal = normalEC;
material.diffuse = vec3(0.01);
return material;
}
`;var wtn=x(T(),1),yW=`uniform vec4 lightColor;
uniform vec4 darkColor;
uniform vec2 repeat;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 st = materialInput.st;
// From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights
float b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0); // 0.0 or 1.0
// Find the distance from the closest separator (region between two colors)
float scaledWidth = fract(repeat.s * st.s);
scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));
float scaledHeight = fract(repeat.t * st.t);
scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));
float value = min(scaledWidth, scaledHeight);
vec4 currentColor = mix(lightColor, darkColor, b);
vec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);
color = czm_gammaCorrect(color);
material.diffuse = color.rgb;
material.alpha = color.a;
return material;
}
`;var ktn=x(T(),1),xW=`uniform vec4 lightColor;
uniform vec4 darkColor;
uniform vec2 repeat;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
// From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights
float b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5)); // 0.0 or 1.0
vec4 color = mix(lightColor, darkColor, b);
color = czm_gammaCorrect(color);
material.diffuse = color.rgb;
material.alpha = color.a;
return material;
}
`;var Dtn=x(T(),1),TW=`uniform sampler2D heights;
uniform sampler2D colors;
// This material expects heights to be sorted from lowest to highest.
float getHeight(int idx, float invTexSize)
{
vec2 uv = vec2((float(idx) + 0.5) * invTexSize, 0.5);
#ifdef OES_texture_float
return texture(heights, uv).x;
#else
return czm_unpackFloat(texture(heights, uv));
#endif
}
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
float height = materialInput.height;
float invTexSize = 1.0 / float(heightsDimensions.x);
float minHeight = getHeight(0, invTexSize);
float maxHeight = getHeight(heightsDimensions.x - 1, invTexSize);
// early-out when outside the height range
if (height < minHeight || height > maxHeight) {
material.diffuse = vec3(0.0);
material.alpha = 0.0;
return material;
}
// Binary search to find heights above and below.
int idxBelow = 0;
int idxAbove = heightsDimensions.x;
float heightBelow = minHeight;
float heightAbove = maxHeight;
// while loop not allowed, so use for loop with max iterations.
// maxIterations of 16 supports a texture size up to 65536 (2^16).
const int maxIterations = 16;
for (int i = 0; i < maxIterations; i++) {
if (idxBelow >= idxAbove - 1) {
break;
}
int idxMid = (idxBelow + idxAbove) / 2;
float heightTex = getHeight(idxMid, invTexSize);
if (height > heightTex) {
idxBelow = idxMid;
heightBelow = heightTex;
} else {
idxAbove = idxMid;
heightAbove = heightTex;
}
}
float lerper = heightBelow == heightAbove ? 1.0 : (height - heightBelow) / (heightAbove - heightBelow);
vec2 colorUv = vec2(invTexSize * (float(idxBelow) + 0.5 + lerper), 0.5);
vec4 color = texture(colors, colorUv);
// undo preumultiplied alpha
if (color.a > 0.0)
{
color.rgb /= color.a;
}
color.rgb = czm_gammaCorrect(color.rgb);
material.diffuse = color.rgb;
material.alpha = color.a;
return material;
}
`;var Btn=x(T(),1),_W=`uniform vec4 color;
uniform float spacing;
uniform float width;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
float distanceToContour = mod(materialInput.height, spacing);
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
float dxc = abs(dFdx(materialInput.height));
float dyc = abs(dFdy(materialInput.height));
float dF = max(dxc, dyc) * czm_pixelRatio * width;
float alpha = (distanceToContour < dF) ? 1.0 : 0.0;
#else
// If no derivatives available (IE 10?), use pixel ratio
float alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;
#endif
vec4 outColor = czm_gammaCorrect(vec4(color.rgb, alpha * color.a));
material.diffuse = outColor.rgb;
material.alpha = outColor.a;
return material;
}
`;var Htn=x(T(),1),SW=`uniform sampler2D image;
uniform float minimumHeight;
uniform float maximumHeight;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
float scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);
vec4 rampColor = texture(image, vec2(scaledHeight, 0.5));
rampColor = czm_gammaCorrect(rampColor);
material.diffuse = rampColor.rgb;
material.alpha = rampColor.a;
return material;
}
`;var Jtn=x(T(),1),AW=`uniform vec4 fadeInColor;
uniform vec4 fadeOutColor;
uniform float maximumDistance;
uniform bool repeat;
uniform vec2 fadeDirection;
uniform vec2 time;
float getTime(float t, float coord)
{
float scalar = 1.0 / maximumDistance;
float q = distance(t, coord) * scalar;
if (repeat)
{
float r = distance(t, coord + 1.0) * scalar;
float s = distance(t, coord - 1.0) * scalar;
q = min(min(r, s), q);
}
return clamp(q, 0.0, 1.0);
}
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 st = materialInput.st;
float s = getTime(time.x, st.s) * fadeDirection.s;
float t = getTime(time.y, st.t) * fadeDirection.t;
float u = length(vec2(s, t));
vec4 color = mix(fadeInColor, fadeOutColor, u);
color = czm_gammaCorrect(color);
material.emission = color.rgb;
material.alpha = color.a;
return material;
}
`;var Qtn=x(T(),1),ZW=`uniform vec4 color;
uniform float cellAlpha;
uniform vec2 lineCount;
uniform vec2 lineThickness;
uniform vec2 lineOffset;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 st = materialInput.st;
float scaledWidth = fract(lineCount.s * st.s - lineOffset.s);
scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));
float scaledHeight = fract(lineCount.t * st.t - lineOffset.t);
scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));
float value;
// Fuzz Factor - Controls blurriness of lines
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
const float fuzz = 1.2;
vec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;
// From "3D Engine Design for Virtual Globes" by Cozzi and Ring, Listing 4.13.
vec2 dx = abs(dFdx(st));
vec2 dy = abs(dFdy(st));
vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;
value = min(
smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),
smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));
#else
// If no derivatives available (IE 10?), revert to view-dependent fuzz
const float fuzz = 0.05;
vec2 range = 0.5 - (lineThickness * 0.05);
value = min(
1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),
1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));
#endif
// Edges taken from RimLightingMaterial.glsl
// See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html
float dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));
float sRim = smoothstep(0.8, 1.0, dRim);
value *= (1.0 - sRim);
vec4 halfColor;
halfColor.rgb = color.rgb * 0.5;
halfColor.a = color.a * (1.0 - ((1.0 - cellAlpha) * value));
halfColor = czm_gammaCorrect(halfColor);
material.diffuse = halfColor.rgb;
material.emission = halfColor.rgb;
material.alpha = halfColor.a;
return material;
}
`;var $tn=x(T(),1),CW=`uniform sampler2D image;
uniform float strength;
uniform vec2 repeat;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec4 textureValue = texture(image, fract(repeat * materialInput.st));
vec3 normalTangentSpace = textureValue.channels;
normalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;
normalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);
normalTangentSpace = normalize(normalTangentSpace);
vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;
material.normal = normalEC;
return material;
}
`;var tnn=x(T(),1),VW=`uniform vec4 color;
float getPointOnLine(vec2 p0, vec2 p1, float x)
{
float slope = (p0.y - p1.y) / (p0.x - p1.x);
return slope * (x - p0.x) + p0.y;
}
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 st = materialInput.st;
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
float base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;
#else
// If no derivatives available (IE 10?), 2.5% of the line will be the arrow head
float base = 0.975;
#endif
vec2 center = vec2(1.0, 0.5);
float ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);
float ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);
float halfWidth = 0.15;
float s = step(0.5 - halfWidth, st.t);
s *= 1.0 - step(0.5 + halfWidth, st.t);
s *= 1.0 - step(base, st.s);
float t = step(base, materialInput.st.s);
t *= 1.0 - step(ptOnUpperLine, st.t);
t *= step(ptOnLowerLine, st.t);
// Find the distance from the closest separator (region between two colors)
float dist;
if (st.s < base)
{
float d1 = abs(st.t - (0.5 - halfWidth));
float d2 = abs(st.t - (0.5 + halfWidth));
dist = min(d1, d2);
}
else
{
float d1 = czm_infinity;
if (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)
{
d1 = abs(st.s - base);
}
float d2 = abs(st.t - ptOnUpperLine);
float d3 = abs(st.t - ptOnLowerLine);
dist = min(min(d1, d2), d3);
}
vec4 outsideColor = vec4(0.0);
vec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));
vec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);
outColor = czm_gammaCorrect(outColor);
material.diffuse = outColor.rgb;
material.alpha = outColor.a;
return material;
}
`;var inn=x(T(),1),RW=`uniform vec4 color;
uniform vec4 gapColor;
uniform float dashLength;
uniform float dashPattern;
in float v_polylineAngle;
const float maskLength = 16.0;
mat2 rotate(float rad) {
float c = cos(rad);
float s = sin(rad);
return mat2(
c, s,
-s, c
);
}
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;
// Get the relative position within the dash from 0 to 1
float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));
// Figure out the mask index.
float maskIndex = floor(dashPosition * maskLength);
// Test the bit mask.
float maskTest = floor(dashPattern / pow(2.0, maskIndex));
vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;
if (fragColor.a < 0.005) { // matches 0/255 and 1/255
discard;
}
fragColor = czm_gammaCorrect(fragColor);
material.emission = fragColor.rgb;
material.alpha = fragColor.a;
return material;
}
`;var rnn=x(T(),1),EW=`uniform vec4 color;
uniform float glowPower;
uniform float taperPower;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 st = materialInput.st;
float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);
if (taperPower <= 0.99999) {
glow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));
}
vec4 fragColor;
fragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);
fragColor.a = clamp(0.0, 1.0, glow) * color.a;
fragColor = czm_gammaCorrect(fragColor);
material.emission = fragColor.rgb;
material.alpha = fragColor.a;
return material;
}
`;var ann=x(T(),1),GW=`uniform vec4 color;
uniform vec4 outlineColor;
uniform float outlineWidth;
in float v_width;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec2 st = materialInput.st;
float halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;
float b = step(0.5 - halfInteriorWidth, st.t);
b *= 1.0 - step(0.5 + halfInteriorWidth, st.t);
// Find the distance from the closest separator (region between two colors)
float d1 = abs(st.t - (0.5 - halfInteriorWidth));
float d2 = abs(st.t - (0.5 + halfInteriorWidth));
float dist = min(d1, d2);
vec4 currentColor = mix(outlineColor, color, b);
vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);
outColor = czm_gammaCorrect(outColor);
material.diffuse = outColor.rgb;
material.alpha = outColor.a;
return material;
}
`;var lnn=x(T(),1),LW=`uniform vec4 color;
uniform vec4 rimColor;
uniform float width;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
// See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html
float d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));
float s = smoothstep(1.0 - width, 1.0, d);
vec4 outColor = czm_gammaCorrect(color);
vec4 outRimColor = czm_gammaCorrect(rimColor);
material.diffuse = outColor.rgb;
material.emission = outRimColor.rgb * s;
material.alpha = mix(outColor.a, outRimColor.a, s);
return material;
}
`;var unn=x(T(),1),WW=`uniform sampler2D image;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec4 rampColor = texture(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));
rampColor = czm_gammaCorrect(rampColor);
material.diffuse = rampColor.rgb;
material.alpha = rampColor.a;
return material;
}
`;var hnn=x(T(),1),vW=`uniform vec4 evenColor;
uniform vec4 oddColor;
uniform float offset;
uniform float repeat;
uniform bool horizontal;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
// Based on the Stripes Fragment Shader in the Orange Book (11.1.2)
float coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));
float value = fract((coord - offset) * (repeat * 0.5));
float dist = min(value, min(abs(value - 0.5), 1.0 - value));
vec4 currentColor = mix(evenColor, oddColor, step(0.5, value));
vec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);
color = czm_gammaCorrect(color);
material.diffuse = color.rgb;
material.alpha = color.a;
return material;
}
`;var pnn=x(T(),1),FW=`uniform vec4 waterColor;
uniform vec4 landColor;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
vec4 outColor = mix(landColor, waterColor, materialInput.waterMask);
outColor = czm_gammaCorrect(outColor);
material.diffuse = outColor.rgb;
material.alpha = outColor.a;
return material;
}
`;var gnn=x(T(),1),IW=`// Thanks for the contribution Jonas
// http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog
uniform sampler2D specularMap;
uniform sampler2D normalMap;
uniform vec4 baseWaterColor;
uniform vec4 blendColor;
uniform float frequency;
uniform float animationSpeed;
uniform float amplitude;
uniform float specularIntensity;
uniform float fadeFactor;
czm_material czm_getMaterial(czm_materialInput materialInput)
{
czm_material material = czm_getDefaultMaterial(materialInput);
float time = czm_frameNumber * animationSpeed;
// fade is a function of the distance from the fragment and the frequency of the waves
float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);
float specularMapValue = texture(specularMap, materialInput.st).r;
// note: not using directional motion at this time, just set the angle to 0.0;
vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);
vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));
// fade out the normal perturbation as we move further from the water surface
normalTangentSpace.xy /= fade;
// attempt to fade out the normal perturbation as we approach non water areas (low specular map value)
normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);
normalTangentSpace = normalize(normalTangentSpace);
// get ratios for alignment of the new normal vector with a vector perpendicular to the tangent plane
float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);
// fade out water effect as specular map value decreases
material.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;
// base color is a blend of the water and non-water color based on the value from the specular map
// may need a uniform blend factor to better control this
material.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);
// diffuse highlights are based on how perturbed the normal is
material.diffuse += (0.1 * tsPerturbationRatio);
material.diffuse = material.diffuse;
material.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);
material.specular = specularIntensity;
material.shininess = 10.0;
return material;
}
`;function je(e){this.type=void 0,this.shaderSource=void 0,this.materials=void 0,this.uniforms=void 0,this._uniforms=void 0,this.translucent=void 0,this._minificationFilter=e.minificationFilter??kt.LINEAR,this._magnificationFilter=e.magnificationFilter??ni.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,ZYe(e,this),Object.defineProperties(this,{type:{value:this.type,writable:!1},minificationFilter:{get:function(){return this._minificationFilter},set:function(t){this._minificationFilter=t}},magnificationFilter:{get:function(){return this._magnificationFilter},set:function(t){this._magnificationFilter=t}}}),l(je._uniformList[this.type])||(je._uniformList[this.type]=Object.keys(this._uniforms))}je._uniformList={};je.fromType=function(e,t){let n=new je({fabric:{type:e}});if(l(t))for(let i in t)t.hasOwnProperty(i)&&(n.uniforms[i]=t[i]);return n};je.fromTypeAsync=async function(e,t){let n=[],i=new je({fabric:{type:e,uniforms:t}});if(ice(i,n),await Promise.all(n),n.length=0,l(i._initializationError))throw i._initializationError;return i};function ice(e,t){t.push(...e._initializationPromises);let n=e.materials;for(let i in n)if(n.hasOwnProperty(i)){let o=n[i];ice(o,t)}}je.prototype.isTranslucent=function(){if(l(this.translucent))return typeof this.translucent=="function"?this.translucent():this.translucent;let e=!0,t=this._translucentFunctions,n=t.length;for(let i=0;i<n;++i){let o=t[i];if(typeof o=="function"?e=e&&o():e=e&&o,!e)break}return e};je.prototype.update=function(e){this._defaultTexture=e.defaultTexture;let t,n,i=this._loadedImages,o=i.length;for(t=0;t<o;++t){let c=i[t];n=c.id;let d=c.image,u;Array.isArray(d)&&(u=d.slice(1,d.length).map(function(y){return y.bufferView}),d=d[0]);let h=new Ut({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter}),p;l(d.internalFormat)?p=new Et({context:e,pixelFormat:d.internalFormat,width:d.width,height:d.height,source:{arrayBufferView:d.bufferView,mipLevels:u},sampler:h}):p=new Et({context:e,source:d,sampler:h});let b=this._textures[n];l(b)&&b!==this._defaultTexture&&b.destroy(),this._textures[n]=p;let f=`${n}Dimensions`;if(this.uniforms.hasOwnProperty(f)){let y=this.uniforms[f];y.x=p._width,y.y=p._height}}i.length=0;let r=this._loadedCubeMaps;for(o=r.length,t=0;t<o;++t){let c=r[t];n=c.id;let d=c.images,u=new Br({context:e,source:{positiveX:d[0],negativeX:d[1],positiveY:d[2],negativeY:d[3],positiveZ:d[4],negativeZ:d[5]},sampler:new Ut({minificationFilter:this._minificationFilter,magnificationFilter:this._magnificationFilter})});this._textures[n]=u}r.length=0;let s=this._updateFunctions;for(o=s.length,t=0;t<o;++t)s[t](this,e);let a=this.materials;for(let c in a)a.hasOwnProperty(c)&&a[c].update(e)};je.prototype.isDestroyed=function(){return!1};je.prototype.destroy=function(){let e=this._textures;for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];i!==this._defaultTexture&&i.destroy()}let t=this.materials;for(let n in t)t.hasOwnProperty(n)&&t[n].destroy();return me(this)};function ZYe(e,t){e=e??B.EMPTY_OBJECT,t._strict=e.strict??!1,t._count=e.count??0,t._template=ze(e.fabric??B.EMPTY_OBJECT),t.fabric=ze(e.fabric??B.EMPTY_OBJECT),t._template.uniforms=ze(t._template.uniforms??B.EMPTY_OBJECT),t._template.materials=ze(t._template.materials??B.EMPTY_OBJECT),t.type=l(t._template.type)?t._template.type:zn(),t.shaderSource="",t.materials={},t.uniforms={},t._uniforms={},t._translucentFunctions=[];let n,i=je._materialCache.getMaterial(t.type);if(l(i)){let r=ze(i.fabric,!0);t._template=Rt(t._template,r,!0),n=i.translucent}EYe(t),LYe(t),IYe(t),XYe(t),l(i)||je._materialCache.addMaterial(t.type,t);let o=t._translucentFunctions.length===0?!0:void 0;if(n=n??o,n=e.translucent??n,l(n))if(typeof n=="function"){let r=function(){return n(t)};t._translucentFunctions.push(r)}else t._translucentFunctions.push(n)}function cJ(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 tce(e,t){}function CYe(e,t){}var VYe=["type","materials","uniforms","components","source"],RYe=["diffuse","specular","shininess","normal","emission","alpha"];function EYe(e){let t=e._template,n=t.uniforms,i=t.materials,o=t.components;cJ(t,VYe,tce,!0),cJ(o,RYe,tce,!0);let r=[];for(let s in i)i.hasOwnProperty(s)&&r.push(s);cJ(n,r,CYe,!1)}function GYe(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 LYe(e){let t=e._template.components,n=e._template.source;if(l(n))e.shaderSource+=`${n}
`;else{if(e.shaderSource+=`czm_material czm_getMaterial(czm_materialInput materialInput)
{
`,e.shaderSource+=`czm_material material = czm_getDefaultMaterial(materialInput);
`,l(t)){let i=Object.keys(e._template.materials).length>0;for(let o in t)if(t.hasOwnProperty(o))if(o==="diffuse"||o==="emission"){let s=i&&GYe(t[o],e)?t[o]:`czm_gammaCorrect(${t[o]})`;e.shaderSource+=`material.${o} = ${s};
`}else o==="alpha"?e.shaderSource+=`material.alpha = ${t.alpha};
`:e.shaderSource+=`material.${o} = ${t[o]};
`}e.shaderSource+=`return material;
}
`}}var nce={mat2:Oi,mat3:q,mat4:F},WYe=/\.ktx2$/i;function vYe(e){let t;return function(n,i){let o=n.uniforms,r=o[e],s=t!==r,a=!l(r)||r===je.DefaultImageId;t=r;let c=n._textures[e],d,u;if(r instanceof HTMLVideoElement){if(r.readyState>=2){if(s&&l(c)&&(c!==i.defaultTexture&&c.destroy(),c=void 0),!l(c)||c===i.defaultTexture){let h=new Ut({minificationFilter:n._minificationFilter,magnificationFilter:n._magnificationFilter});c=new Et({context:i,source:r,sampler:h}),n._textures[e]=c;return}c.copyFrom({source:r})}else l(c)||(n._textures[e]=i.defaultTexture);return}if(r instanceof Et&&r!==c){n._texturePaths[e]=void 0;let h=n._textures[e];l(h)&&h!==n._defaultTexture&&h.destroy(),n._textures[e]=r,d=`${e}Dimensions`,o.hasOwnProperty(d)&&(u=o[d],u.x=r._width,u.y=r._height);return}if(s&&l(c)&&a&&(c!==n._defaultTexture&&c.destroy(),c=void 0,n._texturePaths[e]=void 0),l(c)||(c=n._textures[e]=n._defaultTexture,d=`${e}Dimensions`,o.hasOwnProperty(d)&&(u=o[d],u.x=c._width,u.y=c._height)),!a){if((r instanceof HTMLCanvasElement||r instanceof HTMLImageElement||r instanceof ImageBitmap||r instanceof OffscreenCanvas)&&r!==n._texturePaths[e]){n._loadedImages.push({id:e,image:r}),n._texturePaths[e]=r;return}oce(n,e)}}}function oce(e,t){let i=e.uniforms[t];if(i===je.DefaultImageId)return Promise.resolve();let o=We.createIfNeeded(i);if(!(o instanceof We))return Promise.resolve();let r=We.createIfNeeded(e._texturePaths[t]);if(!(!l(r)||r.url!==o.url))return Promise.resolve();let a;return WYe.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 FYe(e){return function(t,n){let i=t.uniforms[e];if(i instanceof Br){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),rce(t,e)}}function rce(e,t){let i=e.uniforms[t];if(i===je.DefaultCubeMapId)return Promise.resolve();let o=i.positiveX+i.negativeX+i.positiveY+i.negativeY+i.positiveZ+i.negativeZ;if(o===e._texturePaths[t])return Promise.resolve();let r=[We.createIfNeeded(i.positiveX).fetchImage(),We.createIfNeeded(i.negativeX).fetchImage(),We.createIfNeeded(i.positiveY).fetchImage(),We.createIfNeeded(i.negativeY).fetchImage(),We.createIfNeeded(i.positiveZ).fetchImage(),We.createIfNeeded(i.negativeZ).fetchImage()],s=Promise.all(r);return s.then(function(a){e._loadedCubeMaps.push({id:t,images:a})}).catch(function(a){e._initializationError=a}),e._texturePaths[t]=o,s}function IYe(e){let t=e._template.uniforms;for(let n in t)t.hasOwnProperty(n)&&sce(e,n)}function sce(e,t){let n=e._strict,i=e._template.uniforms,o=i[t],r=PYe(o),s;if(r==="channels")s=PW(e,t,o,!1);else{if(r==="sampler2D"){let d=`${t}Dimensions`;NYe(e,d)>0&&(i[d]={type:"ivec3",x:1,y:1},sce(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=PW(e,t,c),e.uniforms[t]=o,r==="sampler2D")e._uniforms[c]=function(){return e._textures[t]},e._updateFunctions.push(vYe(t)),e._initializationPromises.push(oce(e,t));else if(r==="samplerCube")e._uniforms[c]=function(){return e._textures[t]},e._updateFunctions.push(FYe(t)),e._initializationPromises.push(rce(e,t));else if(r.indexOf("mat")!==-1){let d=new nce[r];e._uniforms[c]=function(){return nce[r].fromColumnMajorArray(e.uniforms[t],d)}}else e._uniforms[c]=function(){return e.uniforms[t]}}}function PYe(e){let t=e.type;if(!l(t)){let n=typeof e;if(n==="number")t="float";else if(n==="boolean")t="bool";else if(n==="string"||e instanceof We||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement||e instanceof ImageBitmap||e instanceof OffscreenCanvas)/^([rgba]){1,4}$/i.test(e)?t="channels":e===je.DefaultCubeMapId?t="samplerCube":t="sampler2D";else if(n==="object")if(Array.isArray(e))(e.length===4||e.length===9||e.length===16)&&(t=`mat${Math.sqrt(e.length)}`);else{let i=0;for(let o in e)e.hasOwnProperty(o)&&(i+=1);i>=2&&i<=4?t=`vec${i}`:i===6&&(t="samplerCube")}}return t}function XYe(e){let t=e._strict,n=e._template.materials;for(let i in n)if(n.hasOwnProperty(i)){let o=new je({strict:t,fabric:n[i],count:e._count});e._count=o._count,e._uniforms=Rt(e._uniforms,o._uniforms,!0),e.materials[i]=o,e._translucentFunctions=e._translucentFunctions.concat(o._translucentFunctions);let r="czm_getMaterial",s=`${r}_${e._count++}`;PW(o,r,s),e.shaderSource=o.shaderSource+e.shaderSource;let a=`${s}(materialInput)`,c=PW(e,i,a)}}function PW(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 NYe(e,t,n){return PW(e,t,t,n)}je._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}};je.DefaultImageId="czm_defaultImage";je.DefaultCubeMapId="czm_defaultCubeMap";je.ColorType="Color";je._materialCache.addMaterial(je.ColorType,{fabric:{type:je.ColorType,uniforms:{color:new U(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}});je.ImageType="Image";je._materialCache.addMaterial(je.ImageType,{fabric:{type:je.ImageType,uniforms:{image:je.DefaultImageId,repeat:new M(1,1),color:new U(1,1,1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture(image, fract(repeat * materialInput.st)).a * color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}});je.DiffuseMapType="DiffuseMap";je._materialCache.addMaterial(je.DiffuseMapType,{fabric:{type:je.DiffuseMapType,uniforms:{image:je.DefaultImageId,channels:"rgb",repeat:new M(1,1)},components:{diffuse:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});je.AlphaMapType="AlphaMap";je._materialCache.addMaterial(je.AlphaMapType,{fabric:{type:je.AlphaMapType,uniforms:{image:je.DefaultImageId,channel:"a",repeat:new M(1,1)},components:{alpha:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!0});je.SpecularMapType="SpecularMap";je._materialCache.addMaterial(je.SpecularMapType,{fabric:{type:je.SpecularMapType,uniforms:{image:je.DefaultImageId,channel:"r",repeat:new M(1,1)},components:{specular:"texture(image, fract(repeat * materialInput.st)).channel"}},translucent:!1});je.EmissionMapType="EmissionMap";je._materialCache.addMaterial(je.EmissionMapType,{fabric:{type:je.EmissionMapType,uniforms:{image:je.DefaultImageId,channels:"rgb",repeat:new M(1,1)},components:{emission:"texture(image, fract(repeat * materialInput.st)).channels"}},translucent:!1});je.BumpMapType="BumpMap";je._materialCache.addMaterial(je.BumpMapType,{fabric:{type:je.BumpMapType,uniforms:{image:je.DefaultImageId,channel:"r",strength:.8,repeat:new M(1,1)},source:gW},translucent:!1});je.NormalMapType="NormalMap";je._materialCache.addMaterial(je.NormalMapType,{fabric:{type:je.NormalMapType,uniforms:{image:je.DefaultImageId,channels:"rgb",strength:.8,repeat:new M(1,1)},source:CW},translucent:!1});je.GridType="Grid";je._materialCache.addMaterial(je.GridType,{fabric:{type:je.GridType,uniforms:{color:new U(0,1,0,1),cellAlpha:.1,lineCount:new M(8,8),lineThickness:new M(1,1),lineOffset:new M(0,0)},source:ZW},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}});je.StripeType="Stripe";je._materialCache.addMaterial(je.StripeType,{fabric:{type:je.StripeType,uniforms:{horizontal:!0,evenColor:new U(1,1,1,.5),oddColor:new U(0,0,1,.5),offset:0,repeat:5},source:vW},translucent:function(e){let t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}});je.CheckerboardType="Checkerboard";je._materialCache.addMaterial(je.CheckerboardType,{fabric:{type:je.CheckerboardType,uniforms:{lightColor:new U(1,1,1,.5),darkColor:new U(0,0,0,.5),repeat:new M(5,5)},source:yW},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});je.DotType="Dot";je._materialCache.addMaterial(je.DotType,{fabric:{type:je.DotType,uniforms:{lightColor:new U(1,1,0,.75),darkColor:new U(0,1,1,.75),repeat:new M(5,5)},source:xW},translucent:function(e){let t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}});je.WaterType="Water";je._materialCache.addMaterial(je.WaterType,{fabric:{type:je.WaterType,uniforms:{baseWaterColor:new U(.2,.3,.6,1),blendColor:new U(0,1,.699,1),specularMap:je.DefaultImageId,normalMap:je.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:IW},translucent:function(e){let t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}});je.RimLightingType="RimLighting";je._materialCache.addMaterial(je.RimLightingType,{fabric:{type:je.RimLightingType,uniforms:{color:new U(1,0,0,.7),rimColor:new U(1,1,1,.4),width:.3},source:LW},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}});je.FadeType="Fade";je._materialCache.addMaterial(je.FadeType,{fabric:{type:je.FadeType,uniforms:{fadeInColor:new U(1,0,0,1),fadeOutColor:new U(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new M(.5,.5)},source:AW},translucent:function(e){let t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}});je.PolylineArrowType="PolylineArrow";je._materialCache.addMaterial(je.PolylineArrowType,{fabric:{type:je.PolylineArrowType,uniforms:{color:new U(1,1,1,1)},source:VW},translucent:!0});je.PolylineDashType="PolylineDash";je._materialCache.addMaterial(je.PolylineDashType,{fabric:{type:je.PolylineDashType,uniforms:{color:new U(1,0,1,1),gapColor:new U(0,0,0,0),dashLength:16,dashPattern:255},source:RW},translucent:!0});je.PolylineGlowType="PolylineGlow";je._materialCache.addMaterial(je.PolylineGlowType,{fabric:{type:je.PolylineGlowType,uniforms:{color:new U(0,.5,1,1),glowPower:.25,taperPower:1},source:EW},translucent:!0});je.PolylineOutlineType="PolylineOutline";je._materialCache.addMaterial(je.PolylineOutlineType,{fabric:{type:je.PolylineOutlineType,uniforms:{color:new U(1,1,1,1),outlineColor:new U(1,0,0,1),outlineWidth:1},source:GW},translucent:function(e){let t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}});je.ElevationContourType="ElevationContour";je._materialCache.addMaterial(je.ElevationContourType,{fabric:{type:je.ElevationContourType,uniforms:{spacing:100,color:new U(1,0,0,1),width:1},source:_W},translucent:!1});je.ElevationRampType="ElevationRamp";je._materialCache.addMaterial(je.ElevationRampType,{fabric:{type:je.ElevationRampType,uniforms:{image:je.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:SW},translucent:!1});je.SlopeRampMaterialType="SlopeRamp";je._materialCache.addMaterial(je.SlopeRampMaterialType,{fabric:{type:je.SlopeRampMaterialType,uniforms:{image:je.DefaultImageId},source:WW},translucent:!1});je.AspectRampMaterialType="AspectRamp";je._materialCache.addMaterial(je.AspectRampMaterialType,{fabric:{type:je.AspectRampMaterialType,uniforms:{image:je.DefaultImageId},source:bW},translucent:!1});je.ElevationBandType="ElevationBand";je._materialCache.addMaterial(je.ElevationBandType,{fabric:{type:je.ElevationBandType,uniforms:{heights:je.DefaultImageId,colors:je.DefaultImageId},source:TW},translucent:!0});je.WaterMaskType="WaterMask";je._materialCache.addMaterial(je.WaterMaskType,{fabric:{type:je.WaterMaskType,source:FW,uniforms:{waterColor:new U(1,1,1,1),landColor:new U(0,0,0,0)}},translucent:!1});var Bi=je;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=yo.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=yo.prototype.getFragmentShaderSource;GT.prototype.isTranslucent=yo.prototype.isTranslucent;GT.prototype.getRenderState=yo.prototype.getRenderState;GT.MaterialSupport={BASIC:Object.freeze({vertexFormat:Xe.POSITION_AND_NORMAL,vertexShaderSource:hW,fragmentShaderSource:mW}),TEXTURED:Object.freeze({vertexFormat:Xe.POSITION_NORMAL_AND_ST,vertexShaderSource:pW,fragmentShaderSource:fW}),ALL:Object.freeze({vertexFormat:Xe.ALL,vertexShaderSource:uW,fragmentShaderSource:dW})};var po=GT;var vin=x(T(),1);var gin=x(T(),1),XW=`in vec3 v_positionEC;
in vec3 v_normalEC;
in vec4 v_color;
void main()
{
vec3 positionToEyeEC = -v_positionEC;
vec3 normalEC = normalize(v_normalEC);
#ifdef FACE_FORWARD
normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif
vec4 color = czm_gammaCorrect(v_color);
czm_materialInput materialInput;
materialInput.normalEC = normalEC;
materialInput.positionToEyeEC = positionToEyeEC;
czm_material material = czm_getDefaultMaterial(materialInput);
material.diffuse = color.rgb;
material.alpha = color.a;
out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
}
`;var xin=x(T(),1),NW=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 normal;
in vec4 color;
in float batchId;
out vec3 v_positionEC;
out vec3 v_normalEC;
out vec4 v_color;
void main()
{
vec4 p = czm_computePosition();
v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
v_normalEC = czm_normal * normal; // normal in eye coordinates
v_color = color;
gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;var _in=x(T(),1),LT=`in vec4 v_color;
void main()
{
out_FragColor = czm_gammaCorrect(v_color);
}
`;var Ain=x(T(),1),YW=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec4 color;
in float batchId;
out vec4 v_color;
void main()
{
vec4 p = czm_computePosition();
v_color = color;
gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;function U0(e){e=e??B.EMPTY_OBJECT;let t=e.translucent??!0,n=e.closed??!1,i=e.flat??!1,o=i?YW:NW,r=i?LT:XW,s=i?U0.FLAT_VERTEX_FORMAT:U0.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=e.vertexShaderSource??o,this._fragmentShaderSource=e.fragmentShaderSource??r,this._renderState=yo.getDefaultRenderState(t,n,e.renderState),this._closed=n,this._vertexFormat=s,this._flat=i,this._faceForward=e.faceForward??!n}Object.defineProperties(U0.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}}});U0.VERTEX_FORMAT=Xe.POSITION_AND_NORMAL;U0.FLAT_VERTEX_FORMAT=Xe.POSITION_ONLY;U0.prototype.getFragmentShaderSource=yo.prototype.getFragmentShaderSource;U0.prototype.isTranslucent=yo.prototype.isTranslucent;U0.prototype.getRenderState=yo.prototype.getRenderState;var hn=U0;var Min=x(T(),1);function ZZ(e){this._definitionChanged=new _e,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(ZZ.prototype,{isConstant:{get:function(){return j.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:ge("color")});ZZ.prototype.getType=function(e){return"Color"};var YYe=new Q;ZZ.prototype.getValue=function(e,t){return l(e)||(e=Q.now(YYe)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,U.WHITE,t.color),t};ZZ.prototype.equals=function(e){return this===e||e instanceof ZZ&&j.equals(this._color,e._color)};var Bt=ZZ;var ycn=x(T(),1);var Qan=x(T(),1);var aon=x(T(),1);var Jin=x(T(),1);var lJ=class{constructor(t){t=t??B.EMPTY_OBJECT,this._ellipsoid=t.ellipsoid??ie.default,this._rectangle=t.rectangle??ae.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 ae(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,h=r.height/a,p=r.north-n*h,b=r.north-(n+1)*h;return l(o)||(o=new ae(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(!ae.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 h=(o.north-t.latitude)/c|0;return h>=s&&(h=s-1),l(i)?(i.x=u,i.y=h,i):new M(u,h)}},zi=lJ;var ace=new m,cce=new m,lce=new pe,dJ=new m,wYe=new m,dce=new de,MYe=new zi,wW=[new pe,new pe,new pe,new pe],MW=new M,Vs={};Vs.initialize=function(){let e=Vs._initPromise;return l(e)||(e=We.fetchJson(Kt("Assets/approximateTerrainHeights.json")).then(function(t){Vs._terrainHeights=t}),Vs._initPromise=e),e};Vs.getMinimumMaximumHeights=function(e,t){t=t??ie.default;let n=uce(e),i=Vs._defaultMinTerrainHeight,o=Vs._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=Vs._terrainHeights[r];l(s)&&(i=s[0],o=s[1]),t.cartographicToCartesian(ae.northeast(e,lce),ace),t.cartographicToCartesian(ae.southwest(e,lce),cce),m.midpoint(cce,ace,dJ);let a=t.scaleToGeodeticSurface(dJ,wYe);if(l(a)){let c=m.distance(dJ,a);i=Math.min(i,-c)}else i=Vs._defaultMinTerrainHeight}return i=Math.max(Vs._defaultMinTerrainHeight,i),{minimumTerrainHeight:i,maximumTerrainHeight:o}};Vs.getBoundingSphere=function(e,t){t=t??ie.default;let n=uce(e),i=Vs._defaultMaxTerrainHeight;if(l(n)){let r=`${n.level}-${n.x}-${n.y}`,s=Vs._terrainHeights[r];l(s)&&(i=s[1])}let o=de.fromRectangle3D(e,t,0);return de.fromRectangle3D(e,t,i,dce),de.union(o,dce,o)};function uce(e){pe.fromRadians(e.east,e.north,0,wW[0]),pe.fromRadians(e.west,e.north,0,wW[1]),pe.fromRadians(e.east,e.south,0,wW[2]),pe.fromRadians(e.west,e.south,0,wW[3]);let t=0,n=0,i=0,o=0,r=Vs._terrainHeightsMaxLevel,s;for(s=0;s<=r;++s){let a=!1;for(let c=0;c<4;++c){let d=wW[c];if(MYe.positionToTileXY(d,s,MW),c===0)i=MW.x,o=MW.y;else if(i!==MW.x||o!==MW.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}}Vs._terrainHeightsMaxLevel=6;Vs._defaultMaxTerrainHeight=9e3;Vs._defaultMinTerrainHeight=-1e5;Vs._terrainHeights=void 0;Vs._initPromise=void 0;Object.defineProperties(Vs,{initialized:{get:function(){return l(Vs._terrainHeights)}}});var Ei=Vs;var kon=x(T(),1);var Con=x(T(),1);var mon=x(T(),1);function Qa(e,t,n){this.minimum=m.clone(e??m.ZERO),this.maximum=m.clone(t??m.ZERO),l(n)?n=m.clone(n):n=m.midpoint(this.minimum,this.maximum,new m),this.center=n}Qa.fromCorners=function(e,t,n){return l(n)||(n=new Qa),n.minimum=m.clone(e,n.minimum),n.maximum=m.clone(t,n.maximum),n.center=m.midpoint(e,t,n.center),n};Qa.fromPoints=function(e,t){if(l(t)||(t=new Qa),!l(e)||e.length===0)return t.minimum=m.clone(m.ZERO,t.minimum),t.maximum=m.clone(m.ZERO,t.maximum),t.center=m.clone(m.ZERO,t.center),t;let n=e[0].x,i=e[0].y,o=e[0].z,r=e[0].x,s=e[0].y,a=e[0].z,c=e.length;for(let h=1;h<c;h++){let p=e[h],b=p.x,f=p.y,y=p.z;n=Math.min(b,n),r=Math.max(b,r),i=Math.min(f,i),s=Math.max(f,s),o=Math.min(y,o),a=Math.max(y,a)}let d=t.minimum;d.x=n,d.y=i,d.z=o;let u=t.maximum;return u.x=r,u.y=s,u.z=a,t.center=m.midpoint(d,u,t.center),t};Qa.clone=function(e,t){if(l(e))return l(t)?(t.minimum=m.clone(e.minimum,t.minimum),t.maximum=m.clone(e.maximum,t.maximum),t.center=m.clone(e.center,t.center),t):new Qa(e.minimum,e.maximum,e.center)};Qa.equals=function(e,t){return e===t||l(e)&&l(t)&&m.equals(e.center,t.center)&&m.equals(e.minimum,t.minimum)&&m.equals(e.maximum,t.maximum)};var l5=new m;Qa.intersectPlane=function(e,t){l5=m.subtract(e.maximum,e.minimum,l5);let n=m.multiplyByScalar(l5,.5,l5),i=t.normal,o=n.x*Math.abs(i.x)+n.y*Math.abs(i.y)+n.z*Math.abs(i.z),r=m.dot(e.center,i)+t.distance;return r-o>0?zt.INSIDE:r+o<0?zt.OUTSIDE:zt.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 au=Qa;var uJ=new se;function hp(e,t){t=t??ie.default,e=t.scaleToGeodeticSurface(e);let n=dt.eastNorthUpToFixedFrame(e,t);this._ellipsoid=t,this._origin=e,this._xAxis=m.fromCartesian4(F.getColumn(n,0,uJ)),this._yAxis=m.fromCartesian4(F.getColumn(n,1,uJ));let i=m.fromCartesian4(F.getColumn(n,2,uJ));this._plane=nn.fromPointNormal(e,i)}Object.defineProperties(hp.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 kYe=new au;hp.fromPoints=function(e,t){let n=au.fromPoints(e,kYe);return new hp(n.center,t)};var mce=new gn,d5=new m;hp.prototype.projectPointOntoPlane=function(e,t){let n=mce;n.origin=e,m.normalize(e,n.direction);let i=ai.rayPlane(n,this._plane,d5);if(l(i)||(m.negate(n.direction,n.direction),i=ai.rayPlane(n,this._plane,d5)),l(i)){let o=m.subtract(i,this._origin,i),r=m.dot(this._xAxis,o),s=m.dot(this._yAxis,o);return l(t)?(t.x=r,t.y=s,t):new M(r,s)}};hp.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};hp.prototype.projectPointToNearestOnPlane=function(e,t){l(t)||(t=new M);let n=mce;n.origin=e,m.clone(this._plane.normal,n.direction);let i=ai.rayPlane(n,this._plane,d5);l(i)||(m.negate(n.direction,n.direction),i=ai.rayPlane(n,this._plane,d5));let o=m.subtract(i,this._origin,i),r=m.dot(this._xAxis,o),s=m.dot(this._yAxis,o);return t.x=r,t.y=s,t};hp.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 UYe=new m;hp.prototype.projectPointOntoEllipsoid=function(e,t){l(t)||(t=new m);let n=this._ellipsoid,i=this._origin,o=this._xAxis,r=this._yAxis,s=UYe;return m.multiplyByScalar(o,e.x,s),t=m.add(i,s,t),m.multiplyByScalar(r,e.y,s),m.add(t,s,t),n.scaleToGeocentricSurface(t,t),t};hp.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 Rs=hp;function eo(e,t){this.center=m.clone(e??m.ZERO),this.halfAxes=q.clone(t??q.ZERO)}eo.packedLength=m.packedLength+q.packedLength;eo.pack=function(e,t,n){return n=n??0,m.pack(e.center,t,n),q.pack(e.halfAxes,t,n+m.packedLength),t};eo.unpack=function(e,t,n){return t=t??0,l(n)||(n=new eo),m.unpack(e,t,n.center),q.unpack(e,t+m.packedLength,n.halfAxes),n};var DYe=new m,OYe=new m,BYe=new m,zYe=new m,HYe=new m,KYe=new m,JYe=new q,jYe={unitary:new q,diagonal:new q};eo.fromPoints=function(e,t){if(l(t)||(t=new eo),!l(e)||e.length===0)return t.halfAxes=q.ZERO,t.center=m.ZERO,t;let n,i=e.length,o=m.clone(e[0],DYe);for(n=1;n<i;n++)m.add(o,e[n],o);let r=1/i;m.multiplyByScalar(o,r,o);let s=0,a=0,c=0,d=0,u=0,h=0,p;for(n=0;n<i;n++)p=m.subtract(e[n],o,OYe),s+=p.x*p.x,a+=p.x*p.y,c+=p.x*p.z,d+=p.y*p.y,u+=p.y*p.z,h+=p.z*p.z;s*=r,a*=r,c*=r,d*=r,u*=r,h*=r;let b=JYe;b[0]=s,b[1]=a,b[2]=c,b[3]=a,b[4]=d,b[5]=u,b[6]=c,b[7]=u,b[8]=h;let f=q.computeEigenDecomposition(b,jYe),y=q.clone(f.unitary,t.halfAxes),_=q.getColumn(y,0,zYe),S=q.getColumn(y,1,HYe),A=q.getColumn(y,2,KYe),Z=-Number.MAX_VALUE,V=-Number.MAX_VALUE,E=-Number.MAX_VALUE,L=Number.MAX_VALUE,v=Number.MAX_VALUE,I=Number.MAX_VALUE;for(n=0;n<i;n++)p=e[n],Z=Math.max(m.dot(_,p),Z),V=Math.max(m.dot(S,p),V),E=Math.max(m.dot(A,p),E),L=Math.min(m.dot(_,p),L),v=Math.min(m.dot(S,p),v),I=Math.min(m.dot(A,p),I);_=m.multiplyByScalar(_,.5*(L+Z),_),S=m.multiplyByScalar(S,.5*(v+V),S),A=m.multiplyByScalar(A,.5*(I+E),A);let X=m.add(_,S,t.center);m.add(X,A,X);let N=BYe;return N.x=Z-L,N.y=V-v,N.z=E-I,m.multiplyByScalar(N,.5,N),q.multiplyByScale(t.halfAxes,N,t.halfAxes),t};var yce=new m,QYe=new m;function hce(e,t,n,i,o,r,s,a,c,d,u){l(u)||(u=new eo);let h=u.halfAxes;q.setColumn(h,0,t,h),q.setColumn(h,1,n,h),q.setColumn(h,2,i,h);let p=yce;p.x=(o+r)/2,p.y=(s+a)/2,p.z=(c+d)/2;let b=QYe;b.x=(r-o)/2,b.y=(a-s)/2,b.z=(d-c)/2;let f=u.center;return p=q.multiplyByVector(h,p,p),m.add(e,p,f),q.multiplyByScale(h,b,h),u}var fce=new pe,qYe=new m,$Ye=new pe,ewe=new pe,twe=new pe,nwe=new pe,iwe=new pe,owe=new m,pce=new m,rwe=new m,bce=new m,swe=new m,awe=new M,cwe=new M,lwe=new M,dwe=new M,uwe=new M,mwe=new m,hwe=new m,fwe=new m,pwe=new m,bwe=new M,gwe=new m,ywe=new m,xwe=new m,Twe=new nn(m.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,h;if(e.width<=W.PI){let v=ae.center(e,fce),I=i.cartographicToCartesian(v,qYe),X=new Rs(I,i);h=X.plane;let N=v.longitude,g=e.south<0&&e.north>0?0:v.latitude,C=pe.fromRadians(N,e.north,n,$Ye),R=pe.fromRadians(e.west,e.north,n,ewe),G=pe.fromRadians(e.west,g,n,twe),P=pe.fromRadians(e.west,e.south,n,nwe),Y=pe.fromRadians(N,e.south,n,iwe),O=i.cartographicToCartesian(C,owe),k=i.cartographicToCartesian(R,pce),D=i.cartographicToCartesian(G,rwe),w=i.cartographicToCartesian(P,bce),z=i.cartographicToCartesian(Y,swe),J=X.projectPointToNearestOnPlane(O,awe),ee=X.projectPointToNearestOnPlane(k,cwe),H=X.projectPointToNearestOnPlane(D,lwe),te=X.projectPointToNearestOnPlane(w,dwe),$=X.projectPointToNearestOnPlane(z,uwe);return r=Math.min(ee.x,H.x,te.x),s=-r,c=Math.max(ee.y,J.y),a=Math.min(te.y,$.y),R.height=P.height=t,k=i.cartographicToCartesian(R,pce),w=i.cartographicToCartesian(P,bce),d=Math.min(nn.getPointDistance(h,k),nn.getPointDistance(h,w)),u=n,hce(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=ae.center(e,fce).longitude,_=m.fromRadians(y,f,n,i,mwe);_.z=0;let A=Math.abs(_.x)<W.EPSILON10&&Math.abs(_.y)<W.EPSILON10?m.UNIT_X:m.normalize(_,hwe),Z=m.UNIT_Z,V=m.cross(A,Z,fwe);h=nn.fromPointNormal(_,A,Twe);let E=m.fromRadians(y+W.PI_OVER_TWO,f,n,i,pwe);s=m.dot(nn.projectPointOntoPlane(h,E,bwe),V),r=-s,c=m.fromRadians(0,e.north,b?t:n,i,gwe).z,a=m.fromRadians(0,e.south,p?t:n,i,ywe).z;let L=m.fromRadians(e.east,f,n,i,xwe);return d=nn.getPointDistance(h,L),u=0,hce(_,V,Z,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=q.multiplyByScalar(t.halfAxes,.5,t.halfAxes),t};eo.clone=function(e,t){if(l(e))return l(t)?(m.clone(e.center,t.center),q.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[q.COLUMN0ROW0]+s*o[q.COLUMN0ROW1]+a*o[q.COLUMN0ROW2])+Math.abs(r*o[q.COLUMN1ROW0]+s*o[q.COLUMN1ROW1]+a*o[q.COLUMN1ROW2])+Math.abs(r*o[q.COLUMN2ROW0]+s*o[q.COLUMN2ROW1]+a*o[q.COLUMN2ROW2]),d=m.dot(i,n)+t.distance;return d<=-c?zt.OUTSIDE:d>=c?zt.INSIDE:zt.INTERSECTING};var xce=new m,Tce=new m,_ce=new m,_we=new m,gce=new m,Swe=new m;eo.distanceSquaredTo=function(e,t){let n=m.subtract(t,e.center,yce),i=e.halfAxes,o=q.getColumn(i,0,xce),r=q.getColumn(i,1,Tce),s=q.getColumn(i,2,_ce),a=m.magnitude(o),c=m.magnitude(r),d=m.magnitude(s),u=!0,h=!0,p=!0;a>0?m.divideByScalar(o,a,o):u=!1,c>0?m.divideByScalar(r,c,r):h=!1,d>0?m.divideByScalar(s,d,s):p=!1;let b=!u+!h+!p,f,y,_;if(b===1){let V=o;f=r,y=s,h?p||(V=s,y=o):(V=r,f=o),_=m.cross(f,y,gce),V===o?o=_:V===r?r=_:V===s&&(s=_)}else if(b===2){f=o,h?f=r:p&&(f=s);let V=m.UNIT_Y;V.equalsEpsilon(f,W.EPSILON3)&&(V=m.UNIT_X),y=m.cross(f,V,_we),m.normalize(y,y),_=m.cross(f,y,gce),m.normalize(_,_),f===o?(r=y,s=_):f===r?(s=y,o=_):f===s&&(o=y,r=_)}else b===3&&(o=m.UNIT_X,r=m.UNIT_Y,s=m.UNIT_Z);let S=Swe;S.x=m.dot(n,o),S.y=m.dot(n,r),S.z=m.dot(n,s);let A=0,Z;return S.x<-a?(Z=S.x+a,A+=Z*Z):S.x>a&&(Z=S.x-a,A+=Z*Z),S.y<-c?(Z=S.y+c,A+=Z*Z):S.y>c&&(Z=S.y-c,A+=Z*Z),S.z<-d?(Z=S.z+d,A+=Z*Z):S.z>d&&(Z=S.z-d,A+=Z*Z),A};var Awe=new m,Zwe=new m;eo.computePlaneDistances=function(e,t,n,i){l(i)||(i=new Or);let o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=e.center,a=e.halfAxes,c=q.getColumn(a,0,xce),d=q.getColumn(a,1,Tce),u=q.getColumn(a,2,_ce),h=m.add(c,d,Awe);m.add(h,u,h),m.add(h,s,h);let p=m.subtract(h,t,Zwe),b=m.dot(n,p);return o=Math.min(b,o),r=Math.max(b,r),m.add(s,c,h),m.add(h,d,h),m.subtract(h,u,h),m.subtract(h,t,p),b=m.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),m.add(s,c,h),m.subtract(h,d,h),m.add(h,u,h),m.subtract(h,t,p),b=m.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),m.add(s,c,h),m.subtract(h,d,h),m.subtract(h,u,h),m.subtract(h,t,p),b=m.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),m.subtract(s,c,h),m.add(h,d,h),m.add(h,u,h),m.subtract(h,t,p),b=m.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),m.subtract(s,c,h),m.add(h,d,h),m.subtract(h,u,h),m.subtract(h,t,p),b=m.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),m.subtract(s,c,h),m.subtract(h,d,h),m.add(h,u,h),m.subtract(h,t,p),b=m.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),m.subtract(s,c,h),m.subtract(h,d,h),m.subtract(h,u,h),m.subtract(h,t,p),b=m.dot(n,p),o=Math.min(b,o),r=Math.max(b,r),i.start=o,i.stop=r,i};var Cwe=new m,Vwe=new m,Rwe=new m;eo.computeCorners=function(e,t){l(t)||(t=[new m,new m,new m,new m,new m,new m,new m,new m]);let n=e.center,i=e.halfAxes,o=q.getColumn(i,0,Cwe),r=q.getColumn(i,1,Vwe),s=q.getColumn(i,2,Rwe);return m.clone(n,t[0]),m.subtract(t[0],o,t[0]),m.subtract(t[0],r,t[0]),m.subtract(t[0],s,t[0]),m.clone(n,t[1]),m.subtract(t[1],o,t[1]),m.subtract(t[1],r,t[1]),m.add(t[1],s,t[1]),m.clone(n,t[2]),m.subtract(t[2],o,t[2]),m.add(t[2],r,t[2]),m.subtract(t[2],s,t[2]),m.clone(n,t[3]),m.subtract(t[3],o,t[3]),m.add(t[3],r,t[3]),m.add(t[3],s,t[3]),m.clone(n,t[4]),m.add(t[4],o,t[4]),m.subtract(t[4],r,t[4]),m.subtract(t[4],s,t[4]),m.clone(n,t[5]),m.add(t[5],o,t[5]),m.subtract(t[5],r,t[5]),m.add(t[5],s,t[5]),m.clone(n,t[6]),m.add(t[6],o,t[6]),m.add(t[6],r,t[6]),m.subtract(t[6],s,t[6]),m.clone(n,t[7]),m.add(t[7],o,t[7]),m.add(t[7],r,t[7]),m.add(t[7],s,t[7]),t};var Ewe=new q;eo.computeTransformation=function(e,t){l(t)||(t=new F);let n=e.center,i=q.multiplyByUniformScale(e.halfAxes,2,Ewe);return F.fromRotationTranslation(i,n,t)};var Gwe=new de;eo.isOccluded=function(e,t){let n=de.fromOrientedBoundingBox(e,Gwe);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)&&m.equals(e.center,t.center)&&q.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 $t=eo;var zon=x(T(),1);var u5={};u5.getHeight=function(e,t,n){return(e-n)*t+n};var Lwe=new pe;u5.getPosition=function(e,t,n,i,o){let r=t.cartesianToCartographic(e,Lwe);if(!l(r))return m.clone(e,o);let s=u5.getHeight(r.height,n,i);return m.fromRadians(r.longitude,r.latitude,s,t,o)};var ao=u5;var Fan=x(T(),1);var Kon=x(T(),1),kW=`in vec3 position3DHigh;
in vec3 position3DLow;
in float batchId;
#ifdef EXTRUDED_GEOMETRY
in vec3 extrudeDirection;
uniform float u_globeMinimumAltitude;
#endif // EXTRUDED_GEOMETRY
#ifdef PER_INSTANCE_COLOR
out vec4 v_color;
#endif // PER_INSTANCE_COLOR
#ifdef TEXTURE_COORDINATES
#ifdef SPHERICAL
out vec4 v_sphericalExtents;
#else // SPHERICAL
out vec2 v_inversePlaneExtents;
out vec4 v_westPlane;
out vec4 v_southPlane;
#endif // SPHERICAL
out vec3 v_uvMinAndSphericalLongitudeRotation;
out vec3 v_uMaxAndInverseDistance;
out vec3 v_vMaxAndInverseDistance;
#endif // TEXTURE_COORDINATES
void main()
{
vec4 position = czm_computePosition();
#ifdef EXTRUDED_GEOMETRY
float delta = min(u_globeMinimumAltitude, czm_geometricToleranceOverMeter * length(position.xyz));
delta *= czm_sceneMode == czm_sceneMode3D ? 1.0 : 0.0;
//extrudeDirection is zero for the top layer
position = position + vec4(extrudeDirection * delta, 0.0);
#endif
#ifdef TEXTURE_COORDINATES
#ifdef SPHERICAL
v_sphericalExtents = czm_batchTable_sphericalExtents(batchId);
v_uvMinAndSphericalLongitudeRotation.z = czm_batchTable_longitudeRotation(batchId);
#else // SPHERICAL
#ifdef COLUMBUS_VIEW_2D
vec4 planes2D_high = czm_batchTable_planes2D_HIGH(batchId);
vec4 planes2D_low = czm_batchTable_planes2D_LOW(batchId);
// If the primitive is split across the IDL (planes2D_high.x > planes2D_high.w):
// - If this vertex is on the east side of the IDL (position3DLow.y > 0.0, comparison with position3DHigh may produce artifacts)
// - existing "east" is on the wrong side of the world, far away (planes2D_high/low.w)
// - so set "east" as beyond the eastmost extent of the projection (idlSplitNewPlaneHiLow)
vec2 idlSplitNewPlaneHiLow = vec2(EAST_MOST_X_HIGH - (WEST_MOST_X_HIGH - planes2D_high.w), EAST_MOST_X_LOW - (WEST_MOST_X_LOW - planes2D_low.w));
bool idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y > 0.0;
planes2D_high.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.w);
planes2D_low.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.w);
// - else, if this vertex is on the west side of the IDL (position3DLow.y < 0.0)
// - existing "west" is on the wrong side of the world, far away (planes2D_high/low.x)
// - so set "west" as beyond the westmost extent of the projection (idlSplitNewPlaneHiLow)
idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y < 0.0;
idlSplitNewPlaneHiLow = vec2(WEST_MOST_X_HIGH - (EAST_MOST_X_HIGH - planes2D_high.x), WEST_MOST_X_LOW - (EAST_MOST_X_LOW - planes2D_low.x));
planes2D_high.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.x);
planes2D_low.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.x);
vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.xy), vec3(0.0, planes2D_low.xy))).xyz;
vec3 northWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.x, planes2D_high.z), vec3(0.0, planes2D_low.x, planes2D_low.z))).xyz;
vec3 southEastCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.w, planes2D_high.y), vec3(0.0, planes2D_low.w, planes2D_low.y))).xyz;
#else // COLUMBUS_VIEW_2D
// 3D case has smaller "plane extents," so planes encoded as a 64 bit position and 2 vec3s for distances/direction
vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(czm_batchTable_southWest_HIGH(batchId), czm_batchTable_southWest_LOW(batchId))).xyz;
vec3 northWestCorner = czm_normal * czm_batchTable_northward(batchId) + southWestCorner;
vec3 southEastCorner = czm_normal * czm_batchTable_eastward(batchId) + southWestCorner;
#endif // COLUMBUS_VIEW_2D
vec3 eastWard = southEastCorner - southWestCorner;
float eastExtent = length(eastWard);
eastWard /= eastExtent;
vec3 northWard = northWestCorner - southWestCorner;
float northExtent = length(northWard);
northWard /= northExtent;
v_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));
v_southPlane = vec4(northWard, -dot(northWard, southWestCorner));
v_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);
#endif // SPHERICAL
vec4 uvMinAndExtents = czm_batchTable_uvMinAndExtents(batchId);
vec4 uMaxVmax = czm_batchTable_uMaxVmax(batchId);
v_uMaxAndInverseDistance = vec3(uMaxVmax.xy, uvMinAndExtents.z);
v_vMaxAndInverseDistance = vec3(uMaxVmax.zw, uvMinAndExtents.w);
v_uvMinAndSphericalLongitudeRotation.xy = uvMinAndExtents.xy;
#endif // TEXTURE_COORDINATES
#ifdef PER_INSTANCE_COLOR
v_color = czm_batchTable_color(batchId);
#endif
gl_Position = czm_depthClamp(czm_modelViewProjectionRelativeToEye * position);
}
`;var jon=x(T(),1),sy=`#ifdef VECTOR_TILE
uniform vec4 u_highlightColor;
#endif
void main(void)
{
#ifdef VECTOR_TILE
out_FragColor = czm_gammaCorrect(u_highlightColor);
#else
out_FragColor = vec4(1.0);
#endif
czm_writeDepthClamp();
}
`;var qon=x(T(),1),mJ={TERRAIN:0,CESIUM_3D_TILE:1,BOTH:2};mJ.NUMBER_OF_CLASSIFICATION_TYPES=3;Object.freeze(mJ);var Jn=mJ;var trn=x(T(),1);var Sce={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(Sce);var qa=Sce;var Lsn=x(T(),1);var irn=x(T(),1);function Wwe(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 UW=Wwe;var grn=x(T(),1);function D0(e,t,n){if(this._attributes=t,this._numberOfInstances=n,t.length===0)return;let i=vwe(t),o=e.floatingPointTexture,r=i===Oe.FLOAT&&!o,s=Fwe(t,r),a=Iwe(s,t,r),c=Math.floor(Lt.maximumTextureSize/a),d=Math.min(n,c),u=a*d,h=Math.ceil(n/d),p=1/u,b=p*.5,f=1/h,y=f*.5;this._textureDimensions=new M(u,h),this._textureStep=new se(p,b,f,y),this._pixelDatatype=r?Oe.UNSIGNED_BYTE:i,this._packFloats=r,this._offsets=s,this._stride=a,this._texture=void 0;let _=4*u*h;this._batchValues=i===Oe.FLOAT&&!r?new Float32Array(_):new Uint8Array(_),this._batchValuesDirty=!1}Object.defineProperties(D0.prototype,{attributes:{get:function(){return this._attributes}},numberOfInstances:{get:function(){return this._numberOfInstances}}});function vwe(e){let t=!1,n=e.length;for(let i=0;i<n;++i)if(e[i].componentDatatype!==K.UNSIGNED_BYTE){t=!0;break}return t?Oe.FLOAT:Oe.UNSIGNED_BYTE}function Zce(e,t){let n=e[t].componentsPerAttribute;return n===2?M:n===3?m:n===4?se:Number}function Fwe(e,t){let n=new Array(e.length),i=0,o=e.length;for(let r=0;r<o;++r){let a=e[r].componentDatatype;n[r]=i,a!==K.UNSIGNED_BYTE&&t?i+=4:++i}return n}function Iwe(e,t,n){let i=e.length,o=e[i-1];return t[i-1].componentDatatype!==K.UNSIGNED_BYTE&&n?o+4:o+1}var DW=new se;function Pwe(e,t,n){let i=se.unpack(e,t,DW),o=se.unpackFloat(i);i=se.unpack(e,t+4,DW);let r=se.unpackFloat(i);i=se.unpack(e,t+8,DW);let s=se.unpackFloat(i);i=se.unpack(e,t+12,DW);let a=se.unpackFloat(i);return se.fromElements(o,r,s,a,n)}function Xwe(e,t,n){let i=se.packFloat(e.x,DW);se.pack(i,t,n),i=se.packFloat(e.y,i),se.pack(i,t,n+4),i=se.packFloat(e.z,i),se.pack(i,t,n+8),i=se.packFloat(e.w,i),se.pack(i,t,n+12)}var Ace=new se;D0.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=Pwe(this._batchValues,s,Ace):a=se.unpack(this._batchValues,s,Ace);let c=Zce(i,t);return l(c.fromCartesian4)?c.fromCartesian4(a,n):l(c.clone)?c.clone(a,n):a.x};var Nwe=[void 0,void 0,new M,new m,new se],Ywe=new se;D0.prototype.setBatchedAttribute=function(e,t,n){let i=this._attributes,o=Nwe[i[t].componentsPerAttribute],r=this.getBatchedAttribute(e,t,o),s=Zce(this._attributes,t);if(l(s.equals)?s.equals(r,n):r===n)return;let c=Ywe;c.x=l(n.x)?n.x:n,c.y=l(n.y)?n.y:0,c.z=l(n.z)?n.z:0,c.w=l(n.w)?n.w:0;let d=this._offsets[t],h=4*this._stride*e+4*d;this._packFloats&&i[t].componentDatatype!==Oe.UNSIGNED_BYTE?Xwe(c,this._batchValues,h):se.pack(c,this._batchValues,h),this._batchValuesDirty=!0};function wwe(e,t){let n=e._textureDimensions;e._texture=new Et({context:t,pixelFormat:Ke.RGBA,pixelDatatype:e._pixelDatatype,width:n.x,height:n.y,sampler:Ut.NEAREST,flipY:!1})}function Mwe(e){let t=e._textureDimensions;e._texture.copyFrom({source:{width:t.x,height:t.y,arrayBufferView:e._batchValues}})}D0.prototype.update=function(e){l(this._texture)&&!this._batchValuesDirty||this._attributes.length===0||(this._batchValuesDirty=!1,l(this._texture)||wwe(this,e.context),Mwe(this))};D0.prototype.getUniformMapCallback=function(){let e=this;return function(t){return e._attributes.length===0?t:Rt(t,{batchTexture:function(){return e._texture},batchTextureDimensions:function(){return e._textureDimensions},batchTextureStep:function(){return e._textureStep}})}};function kwe(e){let t=e._stride;return e._textureDimensions.y===1?`uniform vec4 batchTextureStep;
vec2 computeSt(float batchId)
{
float stepX = batchTextureStep.x;
float centerX = batchTextureStep.y;
float numberOfAttributes = float(${t});
return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5);
}
`:`uniform vec4 batchTextureStep;
uniform vec2 batchTextureDimensions;
vec2 computeSt(float batchId)
{
float stepX = batchTextureStep.x;
float centerX = batchTextureStep.y;
float stepY = batchTextureStep.z;
float centerY = batchTextureStep.w;
float numberOfAttributes = float(${t});
float xId = mod(batchId * numberOfAttributes, batchTextureDimensions.x);
float yId = floor(batchId * numberOfAttributes / batchTextureDimensions.x);
return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
}
`}function Uwe(e){return e===1?"float":`vec${e}`}function Dwe(e){return e===1?".x":e===2?".xy":e===3?".xyz":""}function Owe(e,t){let i=e._attributes[t],o=i.componentsPerAttribute,r=i.functionName,s=Uwe(o),a=Dwe(o),c=e._offsets[t],d=`${s} ${r}(float batchId)
{
vec2 st = computeSt(batchId);
st.x += batchTextureStep.x * float(${c});
`;return e._packFloats&&i.componentDatatype!==Oe.UNSIGNED_BYTE?d+=`vec4 textureValue;
textureValue.x = czm_unpackFloat(texture(batchTexture, st));
textureValue.y = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x, 0.0)));
textureValue.z = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 2.0, 0.0)));
textureValue.w = czm_unpackFloat(texture(batchTexture, st + vec2(batchTextureStep.x * 3.0, 0.0)));
`:d+=` vec4 textureValue = texture(batchTexture, st);
`,d+=` ${s} value = textureValue${a};
`,e._pixelDatatype===Oe.UNSIGNED_BYTE&&i.componentDatatype===K.UNSIGNED_BYTE&&!i.normalize?d+=`value *= 255.0;
`:e._pixelDatatype===Oe.FLOAT&&i.componentDatatype===K.UNSIGNED_BYTE&&i.normalize&&(d+=`value /= 255.0;
`),d+=` return value;
}
`,d}D0.prototype.getVertexShaderCallback=function(){let e=this._attributes;if(e.length===0)return function(i){return i};let t=`uniform highp sampler2D batchTexture;
`;t+=`${kwe(this)}
`;let n=e.length;for(let i=0;i<n;++i)t+=Owe(this,i);return function(i){let o=i.indexOf("void main"),r=i.substring(0,o),s=i.substring(o);return`${r}
${t}
${s}`}};D0.prototype.isDestroyed=function(){return!1};D0.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),me(this)};var WT=D0;var wrn=x(T(),1);var Zrn=x(T(),1);var OW=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 m(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 pe(o,r,s)}};OW.MaximumLatitude=OW.mercatorAngleToGeodeticLatitude(Math.PI);var li=OW;function Bwe(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)&&Un.transformToWorldCoordinates(e[r]);else F.multiplyTransformation(t,e[0].modelMatrix,t)}function hJ(e,t){let n=e.attributes,i=n.position,o=i.values.length/i.componentsPerAttribute;n.batchId=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:1,values:new Float32Array(o)});let r=n.batchId.values;for(let s=0;s<o;++s)r[s]=t}function zwe(e){let t=e.length;for(let n=0;n<t;++n){let i=e[n];l(i.geometry)?hJ(i.geometry,n):l(i.westHemisphereGeometry)&&l(i.eastHemisphereGeometry)&&(hJ(i.westHemisphereGeometry,n),hJ(i.eastHemisphereGeometry,n))}}function Hwe(e){let t=e.instances,n=e.projection,i=e.elementIndexUintSupported,o=e.scene3DOnly,r=e.vertexCacheOptimize,s=e.compressVertices,a=e.modelMatrix,c,d,u,h=t.length;for(c=0;c<h;++c)if(l(t[c].geometry)){u=t[c].geometry.primitiveType;break}if(Bwe(t,a,o),!o)for(c=0;c<h;++c)l(t[c].geometry)&&Un.splitLongitude(t[c]);if(zwe(t),r)for(c=0;c<h;++c){let b=t[c];l(b.geometry)?(Un.reorderForPostVertexCache(b.geometry),Un.reorderForPreVertexCache(b.geometry)):l(b.westHemisphereGeometry)&&l(b.eastHemisphereGeometry)&&(Un.reorderForPostVertexCache(b.westHemisphereGeometry),Un.reorderForPreVertexCache(b.westHemisphereGeometry),Un.reorderForPostVertexCache(b.eastHemisphereGeometry),Un.reorderForPreVertexCache(b.eastHemisphereGeometry))}let p=Un.combineInstances(t);for(h=p.length,c=0;c<h;++c){d=p[c];let b=d.attributes;if(o)for(let f in b)b.hasOwnProperty(f)&&b[f].componentDatatype===K.DOUBLE&&Un.encodeAttribute(d,f,`${f}3DHigh`,`${f}3DLow`);else for(let f in b)if(b.hasOwnProperty(f)&&b[f].componentDatatype===K.DOUBLE){let y=`${f}3D`,_=`${f}2D`;Un.projectTo2D(d,f,y,_,n),l(d.boundingSphere)&&f==="position"&&(d.boundingSphereCV=de.fromVertices(d.attributes.position2D.values)),Un.encodeAttribute(d,y,`${y}High`,`${y}Low`),Un.encodeAttribute(d,_,`${_}High`,`${_}Low`)}s&&Un.compressVertices(d)}if(!i){let b=[];for(h=p.length,c=0;c<h;++c)d=p[c],b=b.concat(Un.fitToUnsignedShortIndices(d));p=b}return p}function fJ(e,t,n,i){let o,r,s,a=i.length-1;if(a>=0){let d=i[a];o=d.offset+d.count,s=d.index,r=n[s].indices.length}else o=0,s=0,r=n[s].indices.length;let c=e.length;for(let d=0;d<c;++d){let h=e[d][t];if(!l(h))continue;let p=h.indices.length;o+p>r&&(o=0,r=n[++s].indices.length),i.push({index:s,offset:o,count:p}),o+=p}}function Kwe(e,t){let n=[];return fJ(e,"geometry",t,n),fJ(e,"westHemisphereGeometry",t,n),fJ(e,"eastHemisphereGeometry",t,n),n}var O0={};O0.combineGeometry=function(e){let t,n,i=e.instances,o=i.length,r,s,a=!1;o>0&&(t=Hwe(e),t.length>0&&(n=Un.createAttributeLocations(t[0]),e.createPickOffsets&&(r=Kwe(i,t))),l(i[0].attributes)&&l(i[0].attributes.offset)&&(s=new Array(o),a=!0));let c=new Array(o),d=new Array(o);for(let u=0;u<o;++u){let h=i[u],p=h.geometry;l(p)&&(c[u]=p.boundingSphere,d[u]=p.boundingSphereCV,a&&(s[u]=h.geometry.offsetAttribute));let b=h.eastHemisphereGeometry,f=h.westHemisphereGeometry;l(b)&&l(f)&&(l(b.boundingSphere)&&l(f.boundingSphere)&&(c[u]=de.union(b.boundingSphere,f.boundingSphere)),l(b.boundingSphereCV)&&l(f.boundingSphereCV)&&(d[u]=de.union(b.boundingSphereCV,f.boundingSphereCV)))}return{geometries:t,modelMatrix:e.modelMatrix,attributeLocations:n,pickOffsets:r,offsetInstanceExtend:s,boundingSpheres:c,boundingSpheresCV:d}};function Jwe(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 jwe(e,t){let n=e.length;for(let i=0;i<n;++i)Jwe(e[i],t)}function Qwe(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}O0.packCreateGeometryResults=function(e,t){let n=new Float64Array(Qwe(e)),i=[],o={},r=e.length,s=0;n[s++]=r;for(let a=0;a<r;a++){let c=e[a],d=l(c);if(n[s++]=d?1:0,!d)continue;n[s++]=c.primitiveType,n[s++]=c.geometryType,n[s++]=c.offsetAttribute??-1;let u=l(c.boundingSphere)?1:0;n[s++]=u,u&&de.pack(c.boundingSphere,n,s),s+=de.packedLength;let h=l(c.boundingSphereCV)?1:0;n[s++]=h,h&&de.pack(c.boundingSphereCV,n,s),s+=de.packedLength;let p=c.attributes,b=[];for(let y in p)p.hasOwnProperty(y)&&l(p[y])&&(b.push(y),l(o[y])||(o[y]=i.length,i.push(y)));n[s++]=b.length;for(let y=0;y<b.length;y++){let _=b[y],S=p[_];n[s++]=o[_],n[s++]=S.componentDatatype,n[s++]=S.componentsPerAttribute,n[s++]=S.normalize?1:0,n[s++]=S.values.length,n.set(S.values,s),s+=S.values.length}let f=l(c.indices)?c.indices.length:0;n[s++]=f,f>0&&(n.set(c.indices,s),s+=f)}return t.push(n.buffer),{stringTable:i,packedData:n}};O0.unpackCreateGeometryResults=function(e){let t=e.stringTable,n=e.packedData,i,o=new Array(n[0]),r=0,s=1;for(;s<n.length;){if(!(n[s++]===1)){o[r++]=void 0;continue}let c=n[s++],d=n[s++],u=n[s++];u===-1&&(u=void 0);let h,p;n[s++]===1&&(h=de.unpack(n,s)),s+=de.packedLength,n[s++]===1&&(p=de.unpack(n,s)),s+=de.packedLength;let y,_,S,A=new bn,Z=n[s++];for(i=0;i<Z;i++){let E=t[n[s++]],L=n[s++];S=n[s++];let v=n[s++]!==0;y=n[s++],_=K.createTypedArray(L,y);for(let I=0;I<y;I++)_[I]=n[s++];A[E]=new Ie({componentDatatype:L,componentsPerAttribute:S,normalize:v,values:_})}let V;if(y=n[s++],y>0){let E=_.length/S;for(V=Me.createTypedArray(E,y),i=0;i<y;i++)V[i]=n[s++]}o[r++]=new ft({primitiveType:c,geometryType:d,boundingSphere:h,boundingSphereCV:p,indices:V,attributes:A,offsetAttribute:u})}return o};function qwe(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 $we(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 fo(t[o],t[o+1],t[o+2])}),o+=3,n[i++]={modelMatrix:r,attributes:s}}return n}O0.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:qwe(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}};O0.unpackCombineGeometryParameters=function(e){let t=$we(e.packedInstances),n=e.createGeometryResults,i=n.length,o=0;for(let a=0;a<i;a++){let c=O0.unpackCreateGeometryResults(n[a]),d=c.length;for(let u=0;u<d;u++){let h=c[u],p=t[o];p.geometry=h,++o}}let r=ie.clone(e.ellipsoid),s=e.isGeographic?new Di(r):new li(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 Cce(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 Vce(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}O0.packCombineGeometryResults=function(e,t){l(e.geometries)&&jwe(e.geometries,t);let n=Cce(e.boundingSpheres),i=Cce(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}};O0.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:Vce(e.boundingSpheres),boundingSpheresCV:Vce(e.boundingSpheresCV)}};var vT=O0;var krn=x(T(),1),Rce={READY:0,CREATING:1,CREATED:2,COMBINING:3,COMBINED:4,COMPLETE:5,FAILED:6};Object.freeze(Rce);var Hr=Rce;var Drn=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 Cn=_d;function Kr(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??Cn.DISABLED,this._translucent=void 0,this._state=Hr.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(Kr.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 eMe(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 tMe=new M,nMe=new m,Xce=new se;function Nce(e){let t=e.length;if(t===1)return e[0];if(t===2)return M.unpack(e,0,tMe);if(t===3)return m.unpack(e,0,nMe);if(t===4)return se.unpack(e,0,Xce)}function iMe(e,t){let n=e.geometryInstances,i=Array.isArray(n)?n:[n],o=i.length;if(o===0)return;let r=eMe(i),s=r.length,a=[],c={},d={},u,p=i[0].attributes,b,f,y;for(b=0;b<s;++b)f=r[b],y=p[f],c[f]=b,a.push({functionName:`czm_batchTable_${f}`,componentDatatype:y.componentDatatype,componentsPerAttribute:y.componentsPerAttribute,normalize:y.normalize});r.indexOf("distanceDisplayCondition")!==-1&&(a.push({functionName:"czm_batchTable_boundingSphereCenter3DHigh",componentDatatype:K.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter3DLow",componentDatatype:K.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DHigh",componentDatatype:K.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereCenter2DLow",componentDatatype:K.FLOAT,componentsPerAttribute:3},{functionName:"czm_batchTable_boundingSphereRadius",componentDatatype:K.FLOAT,componentsPerAttribute:1}),d.center3DHigh=a.length-5,d.center3DLow=a.length-4,d.center2DHigh=a.length-3,d.center2DLow=a.length-2,d.radius=a.length-1),r.indexOf("offset")!==-1&&(a.push({functionName:"czm_batchTable_offset2D",componentDatatype:K.FLOAT,componentsPerAttribute:3}),u=a.length-1),a.push({functionName:"czm_batchTable_pickColor",componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0});let _=a.length,S=new WT(t,a,o);for(b=0;b<o;++b){let A=i[b];p=A.attributes;for(let v=0;v<s;++v){f=r[v],y=p[f];let I=Nce(y.value),X=c[f];S.setBatchedAttribute(b,X,I)}let Z={primitive:A.pickPrimitive??e};l(A.id)&&(Z.id=A.id);let V=t.createPickId(Z);e._pickIds.push(V);let E=V.color,L=Xce;L.x=U.floatToByte(E.red),L.y=U.floatToByte(E.green),L.z=U.floatToByte(E.blue),L.w=U.floatToByte(E.alpha),S.setBatchedAttribute(b,_-1,L)}e._batchTable=S,e._batchTableAttributeIndices=c,e._batchTableBoundingSphereAttributeIndices=d,e._batchTableOffsetAttribute2DIndex=u}function oMe(e){let t;return Array.isArray(e.values)?t=e.values.slice(0):t=new e.values.constructor(e.values),new Ie({componentDatatype:e.componentDatatype,componentsPerAttribute:e.componentsPerAttribute,normalize:e.normalize,values:t})}function rMe(e){let t=e.attributes,n=new bn;for(let o in t)t.hasOwnProperty(o)&&l(t[o])&&(n[o]=oMe(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 ft({attributes:n,indices:i,primitiveType:e.primitiveType,boundingSphere:de.clone(e.boundingSphere)})}function sMe(e,t){return{geometry:t,attributes:e.attributes,modelMatrix:F.clone(e.modelMatrix),pickPrimitive:e.pickPrimitive,id:e.id}}var aMe=/in\s+vec(?:3|4)\s+(.*)3DHigh;/g;Kr._modifyShaderPosition=function(e,t,n){let i,o="",r="",s="";for(;(i=aMe.exec(t))!==null;){let a=i[1],c=`vec4 czm_compute${a[0].toUpperCase()}${a.substr(1)}()`;c!=="vec4 czm_computePosition()"&&(o+=`${c};
`),l(e.rtcCenter)?(t=t.replace(/in\s+vec(?:3|4)\s+position3DHigh;/g,""),t=t.replace(/in\s+vec(?:3|4)\s+position3DLow;/g,""),o+=`uniform mat4 u_modifiedModelView;
`,r+=`in vec4 position;
`,s+=`${c}
{
return u_modifiedModelView * position;
}
`,t=t.replace(/czm_modelViewRelativeToEye\s+\*\s+/g,""),t=t.replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):n?s+=`${c}
{
return czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow);
}
`:(r+=`in vec3 ${a}2DHigh;
in vec3 ${a}2DLow;
`,s+=`${c}
{
vec4 p;
if (czm_morphTime == 1.0)
{
p = czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow);
}
else if (czm_morphTime == 0.0)
{
p = czm_translateRelativeToEye(${a}2DHigh.zxy, ${a}2DLow.zxy);
}
else
{
p = czm_columbusViewMorph(
czm_translateRelativeToEye(${a}2DHigh.zxy, ${a}2DLow.zxy),
czm_translateRelativeToEye(${a}3DHigh, ${a}3DLow),
czm_morphTime);
}
return p;
}
`)}return[o,r,t,s].join(`
`)};Kr._appendShowToShader=function(e,t){return l(e._batchTableAttributeIndices.show)?`${Be.replaceMain(t,"czm_non_show_main")}
void main()
{
czm_non_show_main();
gl_Position *= czm_batchTable_show(batchId);
}`:t};Kr._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 Ece(e){return`${Be.replaceMain(e,"czm_non_pick_main")}
out vec4 v_pickColor;
void main()
{
czm_non_pick_main();
v_pickColor = czm_batchTable_pickColor(batchId);
}`}function Gce(e){return`in vec4 v_pickColor;
${e}`}Kr._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};Kr._appendOffsetToShader=function(e,t){if(!l(e._batchTableAttributeIndices.offset))return t;let n=`in float batchId;
`;n+="in float applyOffset;";let i=t.replace(/in\s+float\s+batchId;/g,n),o=`vec4 $1 = czm_computePosition();
`;return o+=` if (czm_sceneMode == czm_sceneMode3D)
`,o+=` {
`,o+=" $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);",o+=` }
`,o+=` else
`,o+=` {
`,o+=" $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);",o+=` }
`,i=i.replace(/vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,o),i};Kr._appendDistanceDisplayConditionToShader=function(e,t,n){if(!l(e._batchTableAttributeIndices.distanceDisplayCondition))return t;let i=Be.replaceMain(t,"czm_non_distanceDisplayCondition_main"),o=`void main()
{
czm_non_distanceDisplayCondition_main();
vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);
vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);
vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);
float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);
`;return n?o+=` vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);
`:o+=` vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);
vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);
vec4 centerRTE;
if (czm_morphTime == 1.0)
{
centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);
}
else if (czm_morphTime == 0.0)
{
centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);
}
else
{
centerRTE = czm_columbusViewMorph(
czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),
czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),
czm_morphTime);
}
`,o+=` float radiusSq = boundingSphereRadius * boundingSphereRadius;
float distanceSq;
if (czm_sceneMode == czm_sceneMode2D)
{
distanceSq = czm_eyeHeight2D.y - radiusSq;
}
else
{
distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq;
}
distanceSq = max(distanceSq, 0.0);
float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;
float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;
float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0;
gl_Position *= show;
}`,`${i}
${o}`};function Lce(e,t){if(!e.compressVertices)return t;let n=t.search(/in\s+vec3\s+normal;/g)!==-1,i=t.search(/in\s+vec2\s+st;/g)!==-1;if(!n&&!i)return t;let o=t.search(/in\s+vec3\s+tangent;/g)!==-1,r=t.search(/in\s+vec3\s+bitangent;/g)!==-1,s=i&&n?2:1;s+=o||r?1:0;let a=s>1?`vec${s}`:"float",c="compressedAttributes",d=`in ${a} ${c};`,u="",h="";if(i){u+=`vec2 st;
`;let f=s>1?`${c}.x`:c;h+=` st = czm_decompressTextureCoordinates(${f});
`}n&&o&&r?(u+=`vec3 normal;
vec3 tangent;
vec3 bitangent;
`,h+=` czm_octDecode(${c}.${i?"yz":"xy"}, normal, tangent, bitangent);
`):(n&&(u+=`vec3 normal;
`,h+=` normal = czm_octDecode(${c}${s>1?`.${i?"y":"x"}`:""});
`),o&&(u+=`vec3 tangent;
`,h+=` tangent = czm_octDecode(${c}.${i&&n?"z":"y"});
`),r&&(u+=`vec3 bitangent;
`,h+=` bitangent = czm_octDecode(${c}.${i&&n?"z":"y"});
`));let p=t;p=p.replace(/in\s+vec3\s+normal;/g,""),p=p.replace(/in\s+vec2\s+st;/g,""),p=p.replace(/in\s+vec3\s+tangent;/g,""),p=p.replace(/in\s+vec3\s+bitangent;/g,""),p=Be.replaceMain(p,"czm_non_compressed_main");let b=`void main()
{
${h} czm_non_compressed_main();
}`;return[d,u,p,b].join(`
`)}function cMe(e){let t=Be.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() {
czm_non_depth_clamp_main();
gl_Position = czm_depthClamp(gl_Position);}
`,t}function lMe(e){let t=Be.replaceMain(e,"czm_non_depth_clamp_main");return t+=`void main() {
czm_non_depth_clamp_main();
#if defined(LOG_DEPTH)
czm_writeLogDepth();
#else
czm_writeDepthClamp();
#endif
}
`,t}function Wce(e,t){let n=e.vertexAttributes}function dMe(e,t){return function(){return e[t]}}var pJ=Math.max(an.hardwareConcurrency-1,1),m5,uMe=new Hn("combineGeometry");function mMe(e,t){let n,i,o,r,s=e._instanceIds;if(e._state===Hr.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(m5))for(m5=new Array(pJ),o=0;o<pJ;o++)m5[o]=new Hn("createGeometry");let u;for(d=UW(d,pJ),o=0;o<d.length;o++){let h=0,p=d[o],b=p.length;for(r=0;r<b;++r)u=p[r],i=u.geometry,l(i.constructor.pack)&&(u.offset=h,h+=i.constructor.packedLength??i.packedLength);let f;if(h>0){let y=new Float64Array(h);for(f=[y.buffer],r=0;r<b;++r)u=p[r],i=u.geometry,l(i.constructor.pack)&&(i.constructor.pack(i,y,u.offset),u.geometry=y)}c.push(m5[o].scheduleTask({subTasks:d[o]},f))}e._state=Hr.CREATING,Promise.all(c).then(function(h){e._createGeometryResults=h,e._state=Hr.CREATED}).catch(function(h){zW(e,t,Hr.FAILED,h)})}else if(e._state===Hr.CREATED){let a=[];n=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];let c=t.scene3DOnly,d=t.mapProjection,u=uMe.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=Hr.COMBINING,Promise.resolve(u).then(function(h){let p=vT.unpackCombineGeometryResults(h);e._geometries=p.geometries,e._attributeLocations=p.attributeLocations,e.modelMatrix=F.clone(p.modelMatrix,e.modelMatrix),e._pickOffsets=p.pickOffsets,e._offsetInstanceExtend=p.offsetInstanceExtend,e._instanceBoundingSpheres=p.boundingSpheres,e._instanceBoundingSpheresCV=p.boundingSpheresCV,l(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=Hr.COMBINED):zW(e,t,Hr.FAILED,void 0)}).catch(function(h){zW(e,t,Hr.FAILED,h)})}}function hMe(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=rMe(p):b=p.constructor.createGeometry(p),o[c++]=sMe(s,b),r.push(s.id)}o.length=c;let d=t.scene3DOnly,u=t.mapProjection,h=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=h.geometries,e._attributeLocations=h.attributeLocations,e.modelMatrix=F.clone(h.modelMatrix,e.modelMatrix),e._pickOffsets=h.pickOffsets,e._offsetInstanceExtend=h.offsetInstanceExtend,e._instanceBoundingSpheres=h.boundingSpheres,e._instanceBoundingSpheresCV=h.boundingSpheresCV,l(e._geometries)&&e._geometries.length>0?(e._recomputeBoundingSpheres=!0,e._state=Hr.COMBINED):zW(e,t,Hr.FAILED,void 0)}function fMe(e,t){let n=e._batchTableAttributeIndices.offset;if(!e._recomputeBoundingSpheres||!l(n)){e._recomputeBoundingSpheres=!1;return}let i,o=e._offsetInstanceExtend,r=e._instanceBoundingSpheres,s=r.length,a=e._tempBoundingSpheres;if(!l(a)){for(a=new Array(s),i=0;i<s;i++)a[i]=new de;e._tempBoundingSpheres=a}for(i=0;i<s;++i){let y=a[i],_=e._batchTable.getBatchedAttribute(i,n,new m);y=r[i].clone(y),kce(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)!==zt.INTERSECTING?c.push(y):(d.push(y),u.push(y))}let h=c[0],p=u[0],b=d[0];for(i=1;i<c.length;i++)h=de.union(h,c[i]);for(i=1;i<u.length;i++)p=de.union(p,u[i]);for(i=1;i<d.length;i++)b=de.union(b,d[i]);let f=[];for(l(h)&&f.push(h),l(p)&&f.push(p),l(b)&&f.push(b),i=0;i<f.length;i++){let y=f[i].clone(e._boundingSpheres[i]);e._boundingSpheres[i]=y,e._boundingSphereCV[i]=de.projectTo2D(y,t.mapProjection,e._boundingSphereCV[i])}Kr._updateBoundingVolumes(e,t,e.modelMatrix,!0),e._recomputeBoundingSpheres=!1}var vce=new Tn,Yce=new pe,wce=new m,Mce=new de;function pMe(e,t){if(!l(e._batchTableAttributeIndices.distanceDisplayCondition)||e._batchTableBoundingSpheresUpdated)return;let i=e._batchTableBoundingSphereAttributeIndices,o=i.center3DHigh,r=i.center3DLow,s=i.center2DHigh,a=i.center2DLow,c=i.radius,d=t.mapProjection,u=d.ellipsoid,h=e._batchTable,p=e._instanceBoundingSpheres,b=p.length;for(let f=0;f<b;++f){let y=p[f];if(!l(y))continue;let _=e.modelMatrix;l(_)&&(y=de.transform(y,_,Mce));let S=y.center,A=y.radius,Z=Tn.fromCartesian(S,vce);if(h.setBatchedAttribute(f,o,Z.high),h.setBatchedAttribute(f,r,Z.low),!t.scene3DOnly){let V=u.cartesianToCartographic(S,Yce),E=d.project(V,wce);Z=Tn.fromCartesian(E,vce),h.setBatchedAttribute(f,s,Z.high),h.setBatchedAttribute(f,a,Z.low)}h.setBatchedAttribute(f,c,A)}e._batchTableBoundingSpheresUpdated=!0}var bJ=new m,bMe=new m;function Fce(e,t){if(!l(e._batchTableAttributeIndices.offset)||e._batchTableOffsetsUpdated||t.scene3DOnly)return;let i=e._batchTableOffsetAttribute2DIndex,o=t.mapProjection,r=o.ellipsoid,s=e._batchTable,a=e._instanceBoundingSpheres,c=a.length;for(let d=0;d<c;++d){let u=a[d];if(!l(u))continue;let h=s.getBatchedAttribute(d,e._batchTableAttributeIndices.offset);if(m.equals(h,m.ZERO)){s.setBatchedAttribute(d,i,m.ZERO);continue}let p=e.modelMatrix;l(p)&&(u=de.transform(u,p,Mce));let b=u.center;b=r.scaleToGeodeticSurface(b,bMe);let f=r.cartesianToCartographic(b,Yce),y=o.project(f,wce),_=m.add(h,b,bJ);f=r.cartesianToCartographic(_,f);let S=o.project(f,bJ),A=m.subtract(S,y,bJ),Z=A.x;A.x=A.z,A.z=A.y,A.y=Z,s.setBatchedAttribute(d,i,A)}e._batchTableOffsetsUpdated=!0}function gMe(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(Mn.fromGeometry({context:r,geometry:d,attributeLocations:n,bufferUsage:Fe.STATIC_DRAW,interleave:e._interleave})),l(e._createBoundingVolumeFunction))e._createBoundingVolumeFunction(t,d);else if(e._boundingSpheres.push(de.clone(d.boundingSphere)),e._boundingSphereWC.push(new de),!o){let u=d.boundingSphereCV.center,h=u.x,p=u.y,b=u.z;u.x=b,u.y=h,u.z=p,e._boundingSphereCV.push(de.clone(d.boundingSphereCV)),e._boundingSphere2D.push(new de),e._boundingSphereMorph.push(new de)}}e._va=s,e._primitiveType=i[0].primitiveType,e.releaseGeometryInstances&&(e.geometryInstances=void 0),e._geometries=void 0,zW(e,t,Hr.COMPLETE,void 0)}function yMe(e,t,n,i){let o=n.getRenderState(),r;i?(r=ze(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=ze(o,!1),l(e._depthFailAppearance)&&(r.depthTest.enabled=!1),l(e._depthFailAppearance)&&(o=e._depthFailAppearance.getRenderState(),r=ze(o,!1),r.depthTest.func=qa.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 xMe(e,t,n){let i=t.context,o=e._attributeLocations,r=e._batchTable.getVertexShaderCallback()(n.vertexShaderSource);r=Kr._appendOffsetToShader(e,r),r=Kr._appendShowToShader(e,r),r=Kr._appendDistanceDisplayConditionToShader(e,r,t.scene3DOnly),r=Ece(r),r=Kr._updateColorAttribute(e,r,!1),r=Lce(e,r),r=Kr._modifyShaderPosition(e,r,t.scene3DOnly);let s=n.getFragmentShaderSource();s=Gce(s),e._sp=qt.replaceCache({context:i,shaderProgram:e._sp,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o}),Wce(e._sp,o),l(e._depthFailAppearance)&&(r=e._batchTable.getVertexShaderCallback()(e._depthFailAppearance.vertexShaderSource),r=Kr._appendShowToShader(e,r),r=Kr._appendDistanceDisplayConditionToShader(e,r,t.scene3DOnly),r=Ece(r),r=Kr._updateColorAttribute(e,r,!0),r=Lce(e,r),r=Kr._modifyShaderPosition(e,r,t.scene3DOnly),r=cMe(r),s=e._depthFailAppearance.getFragmentShaderSource(),s=Gce(s),s=lMe(s),e._spDepthFail=qt.replaceCache({context:i,shaderProgram:e._spDepthFail,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o}),Wce(e._spDepthFail,o))}var BW=new F,Ice=new m;function Pce(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]=dMe(s,c));let a=Rt(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,BW),F.multiplyByPoint(BW,e.rtcCenter,Ice),F.setTranslation(BW,Ice,BW),BW}),a}function TMe(e,t,n,i,o,r,s,a){let c=Pce(e,t,n,a),d;l(e._depthFailAppearance)&&(d=Pce(e,e._depthFailAppearance,e._depthFailAppearance.material,a));let u=i?Le.TRANSLUCENT:Le.OPAQUE,h=o?2:1;h*=l(e._depthFailAppearance)?2:1,r.length=e._va.length*h;let p=r.length,b=0;for(let f=0;f<p;++f){let y;o&&(y=r[f],l(y)||(y=r[f]=new et({owner:e,primitiveType:e._primitiveType})),y.vertexArray=e._va[b],y.renderState=e._backFaceRS,y.shaderProgram=e._sp,y.uniformMap=c,y.pass=u,++f),y=r[f],l(y)||(y=r[f]=new et({owner:e,primitiveType:e._primitiveType})),y.vertexArray=e._va[b],y.renderState=e._frontFaceRS,y.shaderProgram=e._sp,y.uniformMap=c,y.pass=u,l(e._depthFailAppearance)&&(o&&(++f,y=r[f],l(y)||(y=r[f]=new et({owner:e,primitiveType:e._primitiveType})),y.vertexArray=e._va[b],y.renderState=e._backFaceDepthFailRS,y.shaderProgram=e._spDepthFail,y.uniformMap=d,y.pass=u),++f,y=r[f],l(y)||(y=r[f]=new et({owner:e,primitiveType:e._primitiveType})),y.vertexArray=e._va[b],y.renderState=e._frontFaceDepthFailRS,y.shaderProgram=e._spDepthFail,y.uniformMap=d,y.pass=u),++b}}Kr._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 _Me(e,t,n,i,o,r,s,a){Kr._updateBoundingVolumes(e,t,o);let c;t.mode===re.SCENE3D?c=e._boundingSphereWC:t.mode===re.COLUMBUS_VIEW?c=e._boundingSphereCV:t.mode===re.SCENE2D&&l(e._boundingSphere2D)?c=e._boundingSphere2D:l(e._boundingSphereMorph)&&(c=e._boundingSphereMorph);let d=t.commandList,u=t.passes;if(u.render||u.pick){let h=e.allowPicking,p=Cn.castShadows(e.shadows),b=Cn.receiveShadows(e.shadows),f=n.length,y=a?2:1;y*=l(e._depthFailAppearance)?2:1;for(let _=0;_<f;++_){let S=Math.floor(_/y),A=n[_];A.modelMatrix=o,A.boundingVolume=c[S],A.cull=r,A.debugShowBoundingVolume=s,A.castShadows=p,A.receiveShadows=b,h?A.pickId="v_pickColor":A.pickId=void 0,d.push(A)}}}Kr.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===Hr.FAILED)return;let t=e.context;if(l(this._batchTable)||iMe(this,t),this._batchTable.attributes.length>0){if(Lt.maximumVertexTextureImageUnits===0)throw new le("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!==Hr.COMPLETE&&this._state!==Hr.COMBINED&&(this.asynchronous?mMe(this,e):hMe(this,e)),this._state===Hr.COMBINED&&(pMe(this,e),Fce(this,e),gMe(this,e)),!this.show||this._state!==Hr.COMPLETE)return;this._batchTableOffsetsUpdated||Fce(this,e),this._recomputeBoundingSpheres&&fMe(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??yMe)(this,t,n,d),r&&(this._createShaderProgramFunction??xMe)(this,e,n),(o||r)&&(this._createCommandsFunction??TMe)(this,n,i,c,d,this._colorCommands,this._pickCommands,e),(this._updateAndQueueCommandsFunction??_Me)(this,e,this._colorCommands,this._pickCommands,this.modelMatrix,this.cull,this.debugShowBoundingVolume,d)};var SMe=new de,AMe=new de;function kce(e,t,n){if(n===dn.TOP){let i=de.clone(e,SMe),o=de.clone(e,AMe);o.center=m.add(o.center,t,o.center),e=de.union(i,o,e)}else n===dn.ALL&&(e.center=m.add(e.center,t,e.center));return e}function ZMe(e,t,n){return function(){let i=e.getBatchedAttribute(t,n),o=e.attributes[n],r=o.componentsPerAttribute,s=K.createTypedArray(o.componentDatatype,r);return l(i.constructor.pack)?i.constructor.pack(i,s,0):s[0]=i,s}}function CMe(e,t,n,i,o){return function(r){let s=Nce(r);e.setBatchedAttribute(t,n,s),o==="offset"&&(i._recomputeBoundingSpheres=!0,i._batchTableOffsetsUpdated=!1)}}var VMe=new m;function RMe(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)&&kce(i,m.fromArray(r.get(),0,VMe),e._offsetInstanceExtend[n]),l(o)&&(i=de.transform(i,o))}return i}},t.boundingSphereCV={get:function(){return e._instanceBoundingSpheresCV[n]}}}function EMe(e,t,n){t.pickId={get:function(){return e._pickIds[n]}}}Kr.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:ZMe(s,n,u),set:CMe(s,n,u,this,d)}}return RMe(this,c,n),EMe(this,c,n),Object.defineProperties(t,c),this._lastPerInstanceAttributeIndex=n,this._perInstanceAttributeCache.set(e,t),t};Kr.prototype.isDestroyed=function(){return!1};Kr.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,me(this)};function zW(e,t,n,i){e._error=i,e._state=n,t.afterRender.push(function(){return e._ready=e._state===Hr.COMPLETE||e._state===Hr.FAILED,!0})}var Ln=Kr;var Qsn=x(T(),1);var Fsn=x(T(),1);function GMe(e){e=e??B.EMPTY_OBJECT,this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=e.normalize??!1,this.value=e.value}var Bc=GMe;var Psn=x(T(),1),CZ=`#ifdef TEXTURE_COORDINATES
#ifdef SPHERICAL
in vec4 v_sphericalExtents;
#else // SPHERICAL
in vec2 v_inversePlaneExtents;
in vec4 v_westPlane;
in vec4 v_southPlane;
#endif // SPHERICAL
in vec3 v_uvMinAndSphericalLongitudeRotation;
in vec3 v_uMaxAndInverseDistance;
in vec3 v_vMaxAndInverseDistance;
#endif // TEXTURE_COORDINATES
#ifdef PER_INSTANCE_COLOR
in vec4 v_color;
#endif
#ifdef NORMAL_EC
vec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth) {
vec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);
return eyeCoordinate.xyz / eyeCoordinate.w;
}
vec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset) {
vec2 glFragCoordXY = gl_FragCoord.xy;
// Sample depths at both offset and negative offset
float upOrRightLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY + positiveOffset) / czm_viewport.zw));
float downOrLeftLogDepth = czm_unpackDepth(texture(czm_globeDepthTexture, (glFragCoordXY - positiveOffset) / czm_viewport.zw));
// Explicitly evaluate both paths
// Necessary for multifrustum and for edges of the screen
bvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);
float useUpOrRight = float(upOrRightLogDepth > 0.0 && upOrRightInBounds.x && upOrRightInBounds.y);
float useDownOrLeft = float(useUpOrRight == 0.0);
vec3 upOrRightEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY + positiveOffset, upOrRightLogDepth);
vec3 downOrLeftEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY - positiveOffset, downOrLeftLogDepth);
return (upOrRightEC - (eyeCoordinate.xyz / eyeCoordinate.w)) * useUpOrRight + ((eyeCoordinate.xyz / eyeCoordinate.w) - downOrLeftEC) * useDownOrLeft;
}
#endif // NORMAL_EC
void main(void)
{
#ifdef REQUIRES_EC
float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));
vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
#endif
#ifdef REQUIRES_WC
vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;
vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;
#endif
#ifdef TEXTURE_COORDINATES
vec2 uv;
#ifdef SPHERICAL
// Treat world coords as a sphere normal for spherical coordinates
vec2 sphericalLatLong = czm_approximateSphericalCoordinates(worldCoordinate);
sphericalLatLong.y += v_uvMinAndSphericalLongitudeRotation.z;
sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
uv.x = (sphericalLatLong.y - v_sphericalExtents.y) * v_sphericalExtents.w;
uv.y = (sphericalLatLong.x - v_sphericalExtents.x) * v_sphericalExtents.z;
#else // SPHERICAL
// Unpack planes and transform to eye space
uv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;
uv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;
#endif // SPHERICAL
#endif // TEXTURE_COORDINATES
#ifdef CULL_FRAGMENTS
// When classifying translucent geometry, logDepthOrDepth == 0.0
// indicates a region that should not be classified, possibly due to there
// being opaque pixels there in another buffer.
if (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y || logDepthOrDepth == 0.0) {
discard;
}
#endif
#ifdef PICK
out_FragColor.a = 1.0; // Explicitly set the alpha, otherwise this may be discarded by ShaderSource.createPickFragmentShaderSource
#ifdef CULL_FRAGMENTS
czm_writeDepthClamp();
#endif // CULL_FRAGMENTS
#else // PICK
#ifdef NORMAL_EC
// Compute normal by sampling adjacent pixels in 2x2 block in screen space
vec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0));
vec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0));
vec3 normalEC = normalize(cross(leftRight, downUp));
#endif
#ifdef PER_INSTANCE_COLOR
vec4 color = czm_gammaCorrect(v_color);
#ifdef FLAT
out_FragColor = color;
#else // FLAT
czm_materialInput materialInput;
materialInput.normalEC = normalEC;
materialInput.positionToEyeEC = -eyeCoordinate.xyz;
czm_material material = czm_getDefaultMaterial(materialInput);
material.diffuse = color.rgb;
material.alpha = color.a;
out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);
#endif // FLAT
// Premultiply alpha. Required for classification primitives on translucent globe.
out_FragColor.rgb *= out_FragColor.a;
#else // PER_INSTANCE_COLOR
// Material support.
// USES_ is distinct from REQUIRES_, because some things are dependencies of each other or
// dependencies for culling but might not actually be used by the material.
czm_materialInput materialInput;
#ifdef USES_NORMAL_EC
materialInput.normalEC = normalEC;
#endif
#ifdef USES_POSITION_TO_EYE_EC
materialInput.positionToEyeEC = -eyeCoordinate.xyz;
#endif
#ifdef USES_TANGENT_TO_EYE
materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(worldCoordinate, normalEC);
#endif
#ifdef USES_ST
// Remap texture coordinates from computed (approximately aligned with cartographic space) to the desired
// texture coordinate system, which typically forms a tight oriented bounding box around the geometry.
// Shader is provided a set of reference points for remapping.
materialInput.st.x = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_uMaxAndInverseDistance.xy, uv) * v_uMaxAndInverseDistance.z;
materialInput.st.y = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_vMaxAndInverseDistance.xy, uv) * v_vMaxAndInverseDistance.z;
#endif
czm_material material = czm_getMaterial(materialInput);
#ifdef FLAT
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#else // FLAT
out_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);
#endif // FLAT
// Premultiply alpha. Required for classification primitives on translucent globe.
out_FragColor.rgb *= out_FragColor.a;
#endif // PER_INSTANCE_COLOR
czm_writeDepthClamp();
#endif // PICK
}
`;function bm(e,t,n){this._projectionExtentDefines={eastMostYhighDefine:"",eastMostYlowDefine:"",westMostYhighDefine:"",westMostYlowDefine:""};let i=new gJ;i.requiresTextureCoordinates=e,i.requiresEC=!n.flat;let o=new gJ;if(o.requiresTextureCoordinates=e,n instanceof hn)i.requiresNormalEC=!n.flat;else{let r=`${n.material.shaderSource}
${n.fragmentShaderSource}`;i.normalEC=r.indexOf("materialInput.normalEC")!==-1||r.indexOf("czm_getDefaultMaterial")!==-1,i.positionToEyeEC=r.indexOf("materialInput.positionToEyeEC")!==-1,i.tangentToEyeMatrix=r.indexOf("materialInput.tangentToEyeMatrix")!==-1,i.st=r.indexOf("materialInput.st")!==-1}this._colorShaderDependencies=i,this._pickShaderDependencies=o,this._appearance=n,this._extentsCulling=e,this._planarExtents=t}bm.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 hn&&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 hn||(o=t.material.shaderSource),new Be({defines:i,sources:[o,CZ]})};bm.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 Be({defines:n,sources:[CZ],pickColorQualifier:"in"})};bm.prototype.createVertexShader=function(e,t,n,i){return Jce(this._colorShaderDependencies,this._planarExtents,n,e,t,this._appearance,i,this._projectionExtentDefines)};bm.prototype.createPickVertexShader=function(e,t,n,i){return Jce(this._pickShaderDependencies,this._planarExtents,n,e,t,void 0,i,this._projectionExtentDefines)};var Uce=new m,Dce=new pe,Oce={high:0,low:0};function Jce(e,t,n,i,o,r,s,a){let c=i.slice();if(a.eastMostYhighDefine===""){let d=Dce;d.longitude=W.PI,d.latitude=0,d.height=0;let u=s.project(d,Uce),h=Tn.encode(u.x,Oce);a.eastMostYhighDefine=`EAST_MOST_X_HIGH ${h.high.toFixed(`${h.high}`.length+1)}`,a.eastMostYlowDefine=`EAST_MOST_X_LOW ${h.low.toFixed(`${h.low}`.length+1)}`;let p=Dce;p.longitude=-W.PI,p.latitude=0,p.height=0;let b=s.project(p,Uce);h=Tn.encode(b.x,Oce),a.westMostYhighDefine=`WEST_MOST_X_HIGH ${h.high.toFixed(`${h.high}`.length+1)}`,a.westMostYlowDefine=`WEST_MOST_X_LOW ${h.low.toFixed(`${h.low}`.length+1)}`}return n&&(c.push(a.eastMostYhighDefine),c.push(a.eastMostYlowDefine),c.push(a.westMostYhighDefine),c.push(a.westMostYlowDefine)),l(r)&&r instanceof hn&&c.push("PER_INSTANCE_COLOR"),e.requiresTextureCoordinates&&(c.push("TEXTURE_COORDINATES"),t||n||c.push("SPHERICAL"),n&&c.push("COLUMBUS_VIEW_2D")),new Be({defines:c,sources:[o]})}function gJ(){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(gJ.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 Bce(e,t,n){return Math.abs((t.y-e.y)*n.x-(t.x-e.x)*n.y+t.x*e.y-t.y*e.x)/M.distance(t,e)}var LMe=[new M,new M,new M,new M];function jce(e,t){let n=LMe,i=M.unpack(t,0,n[0]),o=M.unpack(t,2,n[1]),r=M.unpack(t,4,n[2]);e.uMaxVmax=new Bc({componentDatatype:K.FLOAT,componentsPerAttribute:4,normalize:!1,value:[o.x,o.y,r.x,r.y]});let s=1/Bce(i,o,r),a=1/Bce(i,r,o);e.uvMinAndExtents=new Bc({componentDatatype:K.FLOAT,componentsPerAttribute:4,normalize:!1,value:[i.x,i.y,s,a]})}var Qce=new pe,qce=new m,WMe=new m,vMe=new m,h5={high:0,low:0};function $ce(e,t,n){let i=Qce;i.height=0,i.longitude=e.west,i.latitude=e.south;let o=t.project(i,qce);i.latitude=e.north;let r=t.project(i,WMe);i.longitude=e.east,i.latitude=e.south;let s=t.project(i,vMe),a=[0,0,0,0],c=[0,0,0,0],d=Tn.encode(o.x,h5);a[0]=d.high,c[0]=d.low,d=Tn.encode(o.y,h5),a[1]=d.high,c[1]=d.low,d=Tn.encode(r.y,h5),a[2]=d.high,c[2]=d.low,d=Tn.encode(s.x,h5),a[3]=d.high,c[3]=d.low,n.planes2D_HIGH=new Bc({componentDatatype:K.FLOAT,componentsPerAttribute:4,normalize:!1,value:a}),n.planes2D_LOW=new Bc({componentDatatype:K.FLOAT,componentsPerAttribute:4,normalize:!1,value:c})}var FMe=new F,IMe=new F,zce=new m,PMe=new pe,XMe=[new pe,new pe,new pe,new pe,new pe,new pe,new pe,new pe];function NMe(e,t,n,i,o,r){let s=ae.center(e,PMe);s.height=n;let a=pe.toCartesian(s,t,zce),c=dt.eastNorthUpToFixedFrame(a,t,FMe),d=F.inverse(c,IMe),u=e.west,h=e.east,p=e.north,b=e.south,f=XMe;f[0].latitude=b,f[0].longitude=u,f[1].latitude=p,f[1].longitude=u,f[2].latitude=p,f[2].longitude=h,f[3].latitude=b,f[3].longitude=h;let y=(u+h)*.5,_=(p+b)*.5;f[4].latitude=b,f[4].longitude=y,f[5].latitude=p,f[5].longitude=y,f[6].latitude=_,f[6].longitude=u,f[7].latitude=_,f[7].longitude=h;let S=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,Z=Number.POSITIVE_INFINITY,V=Number.NEGATIVE_INFINITY;for(let I=0;I<8;I++){f[I].height=n;let X=pe.toCartesian(f[I],t,zce);F.multiplyByPoint(d,X,X),X.z=0,S=Math.min(S,X.x),A=Math.max(A,X.x),Z=Math.min(Z,X.y),V=Math.max(V,X.y)}let E=i;E.x=S,E.y=Z,E.z=0,F.multiplyByPoint(c,E,E);let L=o;L.x=A,L.y=Z,L.z=0,F.multiplyByPoint(c,L,L),m.subtract(L,E,o);let v=r;v.x=S,v.y=V,v.z=0,F.multiplyByPoint(c,v,v),m.subtract(v,E,r)}var YMe=new m,wMe=new m,MMe=new Tn;bm.getPlanarTextureCoordinateAttributes=function(e,t,n,i,o){let r=qce,s=YMe,a=wMe;NMe(e,n,o??0,r,s,a);let c={};jce(c,t);let d=Tn.fromCartesian(r,MMe);return c.southWest_HIGH=new Bc({componentDatatype:K.FLOAT,componentsPerAttribute:3,normalize:!1,value:m.pack(d.high,[0,0,0])}),c.southWest_LOW=new Bc({componentDatatype:K.FLOAT,componentsPerAttribute:3,normalize:!1,value:m.pack(d.low,[0,0,0])}),c.eastward=new Bc({componentDatatype:K.FLOAT,componentsPerAttribute:3,normalize:!1,value:m.pack(s,[0,0,0])}),c.northward=new Bc({componentDatatype:K.FLOAT,componentsPerAttribute:3,normalize:!1,value:m.pack(a,[0,0,0])}),$ce(e,i,c),c};var kMe=new m;function Hce(e,t,n,i){let o=Qce;o.latitude=e,o.longitude=t,o.height=0;let r=pe.toCartesian(o,n,kMe),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 Kce=new M;bm.getSphericalExtentGeometryInstanceAttributes=function(e,t,n,i){let o=Hce(e.south,e.west,n,Kce),r=o.x,s=o.y,a=Hce(e.north,e.east,n,Kce),c=a.x,d=a.y,u=0;s>d&&(u=W.PI-s,s=-W.PI,d+=u),r-=W.EPSILON5,s-=W.EPSILON5,c+=W.EPSILON5,d+=W.EPSILON5;let h=1/(d-s),p=1/(c-r),b={sphericalExtents:new Bc({componentDatatype:K.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r,s,p,h]}),longitudeRotation:new Bc({componentDatatype:K.FLOAT,componentsPerAttribute:1,normalize:!1,value:[u]})};return jce(b,t),$ce(e,i,b),b};bm.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)};bm.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 UMe(e){return Math.max(e.width,e.height)>bm.MAX_WIDTH_FOR_PLANAR_EXTENTS}bm.shouldUseSphericalCoordinates=function(e){return UMe(e)};bm.MAX_WIDTH_FOR_PLANAR_EXTENTS=W.toRadians(1);var cu=bm;var aan=x(T(),1);var ean=x(T(),1);var ele={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(ele);var jn=ele;var ian=x(T(),1);var tle={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(tle);var Zt=tle;var f5={CESIUM_3D_TILE_MASK:128,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15};f5.setCesium3DTileBit=function(){return{enabled:!0,frontFunction:jn.ALWAYS,frontOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.REPLACE},backFunction:jn.ALWAYS,backOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.REPLACE},reference:f5.CESIUM_3D_TILE_MASK,mask:f5.CESIUM_3D_TILE_MASK}};var Ot=Object.freeze(f5);function FT(e){e=e??B.EMPTY_OBJECT;let t=e.geometryInstances;this.geometryInstances=t,this.show=e.show??!0,this.classificationType=e.classificationType??Jn.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 VZ(e,t){let n=t?jn.EQUAL:jn.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:n,frontOperation:{fail:Zt.KEEP,zFail:Zt.DECREMENT_WRAP,zPass:Zt.KEEP},backFunction:n,backOperation:{fail:Zt.KEEP,zFail:Zt.INCREMENT_WRAP,zPass:Zt.KEEP},reference:Ot.CESIUM_3D_TILE_MASK,mask:Ot.CESIUM_3D_TILE_MASK},stencilMask:Ot.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:qa.LESS_OR_EQUAL},depthMask:!1}}function xJ(e){return{stencilTest:{enabled:e,frontFunction:jn.NOT_EQUAL,frontOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},backFunction:jn.NOT_EQUAL,backOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},reference:0,mask:Ot.CLASSIFICATION_MASK},stencilMask:Ot.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:tn.PRE_MULTIPLIED_ALPHA_BLEND}}var DMe={stencilTest:{enabled:!0,frontFunction:jn.NOT_EQUAL,frontOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},backFunction:jn.NOT_EQUAL,backOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},reference:0,mask:Ot.CLASSIFICATION_MASK},stencilMask:Ot.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function OMe(e,t,n,i){if(l(e._rsStencilDepthPass))return;let o=!e.debugShowShadowVolume;e._rsStencilDepthPass=De.fromCache(VZ(o,!1)),e._rsStencilDepthPass3DTiles=De.fromCache(VZ(o,!0)),e._rsColorPass=De.fromCache(xJ(o,!1)),e._rsPickPass=De.fromCache(DMe)}function BMe(e,t){if(!e.compressVertices)return t;if(t.search(/in\s+vec3\s+extrudeDirection;/g)!==-1){let n="compressedAttributes",i=`in vec2 ${n};`,o=`vec3 extrudeDirection;
`,r=` extrudeDirection = czm_octDecode(${n}, 65535.0);
`,s=t;s=s.replace(/in\s+vec3\s+extrudeDirection;/g,""),s=Be.replaceMain(s,"czm_non_compressed_main");let a=`void main()
{
${r} czm_non_compressed_main();
}`;return[i,o,s,a].join(`
`)}}function zMe(e,t){let n=t.context,i=e._primitive,o=kW;o=e._primitive._batchTable.getVertexShaderCallback()(o),o=Ln._appendDistanceDisplayConditionToShader(i,o),o=Ln._modifyShaderPosition(e,o,t.scene3DOnly),o=Ln._updateColorAttribute(i,o);let r=e._hasPlanarExtentsAttributes,s=r||e._hasSphericalExtentsAttribute;e._extruded&&(o=BMe(i,o));let a=e._extruded?"EXTRUDED_GEOMETRY":"",c=new Be({defines:[a],sources:[o]}),d=new Be({sources:[sy]}),u=e._primitive._attributeLocations,h=new cu(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=Be.createPickVertexShaderSource(o);f=Ln._appendShowToShader(i,f),f=Ln._updatePickColorAttribute(f);let y=h.createPickFragmentShader(!1),_=h.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=h.createPickFragmentShader(!0),Z=h.createPickVertexShader([a],f,!0,t.mapProjection);S=n.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:Z,fragmentShaderSource:A,attributeLocations:u})}e._spPick2D=S}}else e._spPick=qt.fromCache({context:n,vertexShaderSource:c,fragmentShaderSource:d,attributeLocations:u});o=Ln._appendShowToShader(i,o),c=new Be({defines:[a],sources:[o]}),e._sp=qt.replaceCache({context:n,shaderProgram:e._sp,vertexShaderSource:c,fragmentShaderSource:d,attributeLocations:u});let p=h.createFragmentShader(!1),b=h.createVertexShader([a],o,!1,t.mapProjection);if(e._spColor=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=h.createFragmentShader(!0),_=h.createVertexShader([a],o,!0,t.mapProjection);f=n.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:_,fragmentShaderSource:y,attributeLocations:u})}e._spColor2D=f}}function HMe(e,t){let n=e._primitive,i=n._va.length*2;t.length=i;let o,r,s,a=0,c=n._batchTable.getUniformMapCallback()(e._uniformMap),d=e._needs2DShader;for(o=0;o<i;o+=2){let b=n._va[a++];r=t[o],l(r)||(r=t[o]=new et({owner:e,primitiveType:n._primitiveType})),r.vertexArray=b,r.renderState=e._rsStencilDepthPass,r.shaderProgram=e._sp,r.uniformMap=c,r.pass=Le.TERRAIN_CLASSIFICATION,s=et.shallowClone(r,r.derivedCommands.tileset),s.renderState=e._rsStencilDepthPass3DTiles,s.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,r.derivedCommands.tileset=s,r=t[o+1],l(r)||(r=t[o+1]=new et({owner:e,primitiveType:n._primitiveType})),r.vertexArray=b,r.renderState=e._rsColorPass,r.shaderProgram=e._spColor,r.pass=Le.TERRAIN_CLASSIFICATION;let y=e.appearance.material;if(l(y)&&(c=Rt(c,y._uniforms)),r.uniformMap=c,s=et.shallowClone(r,r.derivedCommands.tileset),s.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,r.derivedCommands.tileset=s,d){let _=et.shallowClone(r,r.derivedCommands.appearance2D);_.shaderProgram=e._spColor2D,r.derivedCommands.appearance2D=_,_=et.shallowClone(s,s.derivedCommands.appearance2D),_.shaderProgram=e._spColor2D,s.derivedCommands.appearance2D=_}}let u=e._commandsIgnoreShow,h=e._spStencil,p=0;i=u.length=i/2;for(let b=0;b<i;++b){let f=u[b]=et.shallowClone(t[p],u[b]);f.shaderProgram=h,f.pass=Le.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,p+=2}}function KMe(e,t){let n=e._usePickOffsets,i=e._primitive,o=i._va.length*2,r,s=0,a;n&&(r=i._pickOffsets,o=r.length*2),t.length=o;let c,d,u,h=0,p=i._batchTable.getUniformMapCallback()(e._uniformMap),b=e._needs2DShader;for(c=0;c<o;c+=2){let f=i._va[h++];if(n&&(a=r[s++],f=i._va[a.index]),d=t[c],l(d)||(d=t[c]=new et({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),d.vertexArray=f,d.renderState=e._rsStencilDepthPass,d.shaderProgram=e._sp,d.uniformMap=p,d.pass=Le.TERRAIN_CLASSIFICATION,n&&(d.offset=a.offset,d.count=a.count),u=et.shallowClone(d,d.derivedCommands.tileset),u.renderState=e._rsStencilDepthPass3DTiles,u.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,d.derivedCommands.tileset=u,d=t[c+1],l(d)||(d=t[c+1]=new et({owner:e,primitiveType:i._primitiveType,pickOnly:!0})),d.vertexArray=f,d.renderState=e._rsPickPass,d.shaderProgram=e._spPick,d.uniformMap=p,d.pass=Le.TERRAIN_CLASSIFICATION,n&&(d.offset=a.offset,d.count=a.count),u=et.shallowClone(d,d.derivedCommands.tileset),u.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,d.derivedCommands.tileset=u,b){let y=et.shallowClone(d,d.derivedCommands.pick2D);y.shaderProgram=e._spPick2D,d.derivedCommands.pick2D=y,y=et.shallowClone(u,u.derivedCommands.pick2D),y.shaderProgram=e._spPick2D,u.derivedCommands.pick2D=y}}}function JMe(e,t,n,i,o,r,s){HMe(e,r),KMe(e,s)}function nle(e,t){return Math.floor(e%t/2)}function yJ(e,t,n,i,o,r){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,e.debugShowBoundingVolume=r,t.commandList.push(e)}function ile(e,t,n,i,o){e.modelMatrix=n,e.boundingVolume=o,e.cull=i,t.commandList.push(e)}function jMe(e,t,n,i,o,r,s,a){let c=e._primitive;Ln._updateBoundingVolumes(c,t,o);let d;t.mode===re.SCENE3D?d=c._boundingSphereWC:t.mode===re.COLUMBUS_VIEW?d=c._boundingSphereCV:t.mode===re.SCENE2D&&l(c._boundingSphere2D)?d=c._boundingSphere2D:l(c._boundingSphereMorph)&&(d=c._boundingSphereMorph);let u=e.classificationType,h=u!==Jn.CESIUM_3D_TILE,p=u!==Jn.TERRAIN,b=t.passes,f,y,_;if(b.render){let S=n.length;for(f=0;f<S;++f)y=d[nle(f,S)],h&&(_=n[f],yJ(_,t,o,r,y,s)),p&&(_=n[f].derivedCommands.tileset,yJ(_,t,o,r,y,s));if(t.invertClassification){let A=e._commandsIgnoreShow,Z=A.length;for(f=0;f<Z;++f)y=d[f],_=A[f],yJ(_,t,o,r,y,s)}}if(b.pick){let S=i.length,A=c._pickOffsets;for(f=0;f<S;++f){let Z=A[nle(f,S)];y=d[Z.index],h&&(_=i[f],ile(_,t,o,r,y)),p&&(_=i[f].derivedCommands.tileset,ile(_,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,h,p=!1,b=!1;for(r>0&&(c=o[0].attributes,p=cu.hasAttributesForSphericalExtents(c),b=cu.hasAttributesForTextureCoordinatePlanes(c),h=c.color),s=0;s<r;s++){a=o[s];let y=a.attributes.color;l(y)&&(d=!0),u=u&&l(y)&&Ht.equals(h,y)}if(!u&&!p&&!b)throw new he("All GeometryInstances must have the same color attribute except via GroundPrimitives");d&&!l(t)&&(t=new hn({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 Wt({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){OMe(n,_)},i._createShaderProgramFunction=function(y,_,S){zMe(n,_)},i._createCommandsFunction=function(y,_,S,A,Z,V,E){JMe(n,void 0,void 0,!0,!1,V,E)},l(this._updateAndQueueCommandsFunction)?i._updateAndQueueCommandsFunction=function(y,_,S,A,Z,V,E,L){n._updateAndQueueCommandsFunction(y,_,S,A,Z,V,E,L)}:i._updateAndQueueCommandsFunction=function(y,_,S,A,Z,V,E,L){jMe(n,_,S,A,Z,V,E,L)},this._primitive=new Ln(i)}this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=De.fromCache(VZ(!1,!1)),this._rsStencilDepthPass3DTiles=De.fromCache(VZ(!1,!0)),this._rsColorPass=De.fromCache(xJ(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=De.fromCache(VZ(!0,!1)),this._rsStencilDepthPass3DTiles=De.fromCache(VZ(!0,!0)),this._rsColorPass=De.fromCache(xJ(!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,me(this)};var RZ=FT;var QMe={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 hn({flat:!0});break}}}this.appearance=t,this.geometryInstances=e.geometryInstances,this.show=e.show??!0,this.classificationType=e.classificationType??Jn.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=Ei._defaultMaxTerrainHeight,this._minTerrainHeight=Ei._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:QMe}}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=RZ.isSupported;function ole(e){return function(t,n){let i=n.maximumRadius,o=i/Math.cos(t*.5)-i;return e._maxHeight+o}}function rle(e){return function(t,n){return e._minHeight}}var qMe=new m,$Me=new m,e9e=new m,t9e=new pe,n9e=new ae;function p5(e,t){let n=e.mapProjection.ellipsoid;if(!l(t.attributes)||!l(t.attributes.position3DHigh))return l(t.rectangle)?t.rectangle:void 0;let i=t.attributes.position3DHigh.values,o=t.attributes.position3DLow.values,r=i.length,s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,d=Number.NEGATIVE_INFINITY;for(let h=0;h<r;h+=3){let p=m.unpack(i,h,qMe),b=m.unpack(o,h,$Me),f=m.add(p,b,e9e),y=n.cartesianToCartographic(f,t9e),_=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=n9e;return u.north=c,u.south=s,u.east=d,u.west=a,u}function i9e(e,t,n){let i=Ei.getMinimumMaximumHeights(t,n);e._minTerrainHeight=i.minimumTerrainHeight,e._maxTerrainHeight=i.maximumTerrainHeight}function o9e(e,t,n){let i=t.mapProjection.ellipsoid,o=p5(t,n),r=$t.fromRectangle(o,e._minHeight,e._maxHeight,i);if(e._boundingVolumes.push(r),!t.scene3DOnly){let s=t.mapProjection,a=de.fromRectangleWithHeights2D(o,s,e._maxHeight,e._minHeight);m.fromElements(a.center.z,a.center.x,a.center.y,a.center),e._boundingVolumes2D.push(a)}}function TJ(e,t){return Math.floor(e%t/2)}function _J(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 sle(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 r9e(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!==Jn.CESIUM_3D_TILE,h=d!==Jn.TERRAIN,p=t.passes,b=e._primitive,f,y,_;if(p.render){let S=n.length;for(f=0;f<S;++f)y=c[TJ(f,S)],u&&(_=n[f],_J(e,_,t,o,r,y,s)),h&&(_=n[f].derivedCommands.tileset,_J(e,_,t,o,r,y,s));if(t.invertClassification){let A=b._commandsIgnoreShow,Z=A.length;for(f=0;f<Z;++f)y=c[f],_=A[f],_J(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[TJ(f,S)],!e._useFragmentCulling){let Z=A[TJ(f,S)];y=c[Z.index]}u&&(_=i[f],sle(e,_,t,o,r,y)),h&&(_=i[f].derivedCommands.tileset,sle(e,_,t,o,r,y))}}}Sd.initializeTerrainHeights=function(){return Ei.initialize()};Sd.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;if(!Ei.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,h;for(u=0;u<c;++u){o=a[u],r=o.geometry;let y=p5(e,r);l(h)?l(y)&&ae.union(h,y,h):h=ae.clone(y);let _=o.id;if(l(_)&&l(y)){let S=Ei.getBoundingSphere(y,i);this._boundingSpheresKeys.push(_),this._boundingSpheres.push(S)}s=r.constructor,!l(s)||l(s.createShadowVolume)}i9e(this,h,i);let p=e.verticalExaggeration,b=e.verticalExaggerationRelativeHeight;this._minHeight=ao.getHeight(this._minTerrainHeight,p,b),this._maxHeight=ao.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,h=p5(e,r),cu.shouldUseSphericalCoordinates(h)){_=!1;break}for(u=0;u<c;++u){o=a[u],r=o.geometry,s=r.constructor;let S=p5(e,r),A=r.textureCoordinateRotationPoints;_?y=cu.getPlanarTextureCoordinateAttributes(S,A,i,e.mapProjection,this._maxHeight):y=cu.getSphericalExtentGeometryInstanceAttributes(S,A,i,e.mapProjection);let Z=o.attributes;for(let V in Z)Z.hasOwnProperty(V)&&(y[V]=Z[V]);d[u]=new Wt({geometry:s.createShadowVolume(r,rle(this),ole(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 Wt({geometry:s.createShadowVolume(r,rle(this),ole(this)),attributes:o.attributes,id:o.id});n.geometryInstances=d,n.appearance=this.appearance,n._createBoundingVolumeFunction=function(y,_){o9e(t,y,_)},n._updateAndQueueCommandsFunction=function(y,_,S,A,Z,V,E,L){r9e(t,_,S,A,Z,V,E,L)},this._primitive=new RZ(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(),me(this)};Sd._supportsMaterials=function(e){return e.depthTexture};Sd.supportsMaterials=function(e){return Sd._supportsMaterials(e.frameState.context)};var El=Sd;var ocn=x(T(),1);function EZ(){he.throwInstantiationError()}Object.defineProperties(EZ.prototype,{isConstant:{get:he.throwInstantiationError},definitionChanged:{get:he.throwInstantiationError}});EZ.prototype.getType=he.throwInstantiationError;EZ.prototype.getValue=he.throwInstantiationError;EZ.prototype.equals=he.throwInstantiationError;var s9e=new Q;EZ.getValue=function(e,t,n){let i;return l(e)||(e=Q.now(s9e)),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 yr=EZ;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=he.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 Bt,h,p=t._getIsClosed(c);if(u)h=new hn({closed:p,flat:n&&!t._supportsMaterialsforEntitiesOnTerrain});else{let b=yr.getValue(e,d,this._material);this._material=b,h=new po({material:b,translucent:b.isTranslucent(),closed:p})}if(n)c.vertexFormat=hn.VERTEX_FORMAT,this._primitive=o.add(new El({geometryInstances:this._geometryUpdater.createFillGeometryInstance(e),appearance:h,asynchronous:!1,shadows:a,classificationType:this._geometryUpdater.classificationTypeProperty.getValue(e)}),j.getValueOrUndefined(this._geometryUpdater.zIndex,e));else{c.vertexFormat=h.vertexFormat;let b=this._geometryUpdater.createFillGeometryInstance(e);u&&(h.translucent=b.attributes.color.value[3]!==255),this._primitive=i.add(new Ln({geometryInstances:b,appearance:h,asynchronous:!1,shadows:a}))}}if(!n&&l(s.outline)&&s.outline.getValue(e)){let d=this._geometryUpdater.createOutlineGeometryInstance(e),u=j.getValueOrDefault(s.outlineWidth,e,1);this._outlinePrimitive=i.add(new Ln({geometryInstances:d,appearance:new hn({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),xt.DONE):l(i)&&i.show&&i.ready&&(o=i.getGeometryInstanceAttributes(t),l(o)&&l(o.boundingSphere))?(de.clone(o.boundingSphere,e),xt.DONE):l(n)&&!n.ready||l(i)&&!i.ready?xt.PENDING:xt.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),me(this)};var xi=IT;var Yfn=x(T(),1);var _cn=x(T(),1);var ale={};function HW(e,t){l(ale[e])||(ale[e]=!0,console.warn(t??e))}HW.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.";HW.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";HW.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";HW.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var Tt=HW;var Sfn=x(T(),1);var Acn=x(T(),1),cle={AUTODETECT:0,ENU:1,INERTIAL:2,VELOCITY:3};Object.freeze(cle);var B0=cle;var Zdn=x(T(),1);var fln=x(T(),1);var Ccn=x(T(),1),lle={NONE:0,GEODESIC:1,RHUMB:2};Object.freeze(lle);var on=lle;var Gcn=x(T(),1);var dle=W.EPSILON10;function a9e(e,t,n,i){if(!l(e))return;n=n??!1;let o=l(i),r=e.length;if(r<2)return e;let s,a=e[0],c,d,u=0,h=-1;for(s=1;s<r;++s)c=e[s],t(a,c,dle)?(l(d)||(d=e.slice(0,s),u=s-1,h=0),o&&i.push(s)):(l(d)&&(d.push(c),u=s,o&&(h=i.length)),a=c);return n&&t(e[0],e[r-1],dle)&&(o&&(l(d)?i.splice(h,0,u):i.push(r-1)),l(d)?d.length-=1:d=e.slice(0,-1)),l(d)?d:e}var Yo=a9e;var Xcn=x(T(),1);function c9e(e){let t=e._uSquared,n=e._ellipsoid.maximumRadius,i=e._ellipsoid.minimumRadius,o=(n-i)/n,r=Math.cos(e._startHeading),s=Math.sin(e._startHeading),a=(1-o)*Math.tan(e._start.latitude),c=1/Math.sqrt(1+a*a),d=c*a,u=Math.atan2(a,r),h=c*s,p=h*h,b=1-p,f=Math.sqrt(b),y=t/4,_=y*y,S=_*y,A=_*_,Z=1+y-3*_/4+5*S/4-175*A/64,V=1-y+15*_/8-35*S/8,E=1-3*y+35*_/4,L=1-5*y,v=Z*u-V*Math.sin(2*u)*y/2-E*Math.sin(4*u)*_/16-L*Math.sin(6*u)*S/48-Math.sin(8*u)*5*A/512,I=e._constants;I.a=n,I.b=i,I.f=o,I.cosineHeading=r,I.sineHeading=s,I.tanU=a,I.cosineU=c,I.sineU=d,I.sigma=u,I.sineAlpha=h,I.sineSquaredAlpha=p,I.cosineSquaredAlpha=b,I.cosineAlpha=f,I.u2Over4=y,I.u4Over16=_,I.u6Over64=S,I.u8Over256=A,I.a0=Z,I.a1=V,I.a2=E,I.a3=L,I.distanceRatio=v}function l9e(e,t){return e*t*(4+e*(4-3*t))/16}function ule(e,t,n,i,o,r,s){let a=l9e(e,n);return(1-a)*e*t*(i+a*o*(s+a*r*(2*s*s-1)))}function d9e(e,t,n,i,o,r,s){let a=(t-n)/t,c=r-i,d=Math.atan((1-a)*Math.tan(o)),u=Math.atan((1-a)*Math.tan(s)),h=Math.cos(d),p=Math.sin(d),b=Math.cos(u),f=Math.sin(u),y=h*b,_=h*f,S=p*f,A=p*b,Z=c,V=W.TWO_PI,E=Math.cos(Z),L=Math.sin(Z),v,I,X,N,g;do{E=Math.cos(Z),L=Math.sin(Z);let w=_-A*E;X=Math.sqrt(b*b*L*L+w*w),I=S+y*E,v=Math.atan2(X,I);let z;X===0?(z=0,N=1):(z=y*L/X,N=1-z*z),V=Z,g=I-2*S/N,isFinite(g)||(g=0),Z=c+ule(a,z,N,v,X,I,g)}while(Math.abs(Z-V)>W.EPSILON12);let C=N*(t*t-n*n)/(n*n),R=1+C*(4096+C*(C*(320-175*C)-768))/16384,G=C*(256+C*(C*(74-47*C)-128))/1024,P=g*g,Y=G*X*(g+G*(I*(2*P-1)-G*g*(4*X*X-3)*(4*P-3)/6)/4),O=n*R*(v-Y),k=Math.atan2(b*L,_-A*E),D=Math.atan2(h*L,_*E-A);e._distance=O,e._startHeading=k,e._endHeading=D,e._uSquared=C}var u9e=new m,SJ=new m;function mle(e,t,n,i){let o=m.normalize(i.cartographicToCartesian(t,SJ),u9e),r=m.normalize(i.cartographicToCartesian(n,SJ),SJ);d9e(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude),e._start=pe.clone(t,e._start),e._end=pe.clone(n,e._end),e._start.height=0,e._end.height=0,c9e(e)}function KW(e,t,n){let i=n??ie.default;this._ellipsoid=i,this._start=new pe,this._end=new pe,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,l(e)&&l(t)&&mle(this,e,t,i)}Object.defineProperties(KW.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}});KW.prototype.setEndPoints=function(e,t){mle(this,e,t,this._ellipsoid)};KW.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)};KW.prototype.interpolateUsingSurfaceDistance=function(e,t){let n=this._constants,i=n.distanceRatio+e/n.b,o=Math.cos(2*i),r=Math.cos(4*i),s=Math.cos(6*i),a=Math.sin(2*i),c=Math.sin(4*i),d=Math.sin(6*i),u=Math.sin(8*i),h=i*i,p=i*h,b=n.u8Over256,f=n.u2Over4,y=n.u6Over64,_=n.u4Over16,S=2*p*b*o/3+i*(1-f+7*_/4-15*y/4+579*b/64-(_-15*y/4+187*b/16)*o-(5*y/4-115*b/16)*r-29*b*s/16)+(f/2-_+71*y/32-85*b/16)*a+(5*_/16-5*y/4+383*b/96)*c-h*((y-11*b/2)*a+5*b*c/2)+(29*y/96-29*b/16)*d+539*b*u/1536,A=Math.asin(Math.sin(S)*n.cosineAlpha),Z=Math.atan(n.a/n.b*Math.tan(A));S=S-n.sigma;let V=Math.cos(2*n.sigma+S),E=Math.sin(S),L=Math.cos(S),v=n.cosineU*L,I=n.sineU*E,N=Math.atan2(E*n.sineHeading,v-I*n.cosineHeading)-ule(n.f,n.sineAlpha,n.cosineSquaredAlpha,S,E,L,V);return l(t)?(t.longitude=this._start.longitude+N,t.latitude=Z,t.height=0,t):new pe(this._start.longitude+N,Z,0)};var z0=KW;var Dcn=x(T(),1);function ZJ(e,t,n){if(e===0)return t*n;let i=e*e,o=i*i,r=o*i,s=r*i,a=s*i,c=a*i,d=n,u=Math.sin(2*d),h=Math.sin(4*d),p=Math.sin(6*d),b=Math.sin(8*d),f=Math.sin(10*d),y=Math.sin(12*d);return t*((1-i/4-3*o/64-5*r/256-175*s/16384-441*a/65536-4851*c/1048576)*d-(3*i/8+3*o/32+45*r/1024+105*s/4096+2205*a/131072+6237*c/524288)*u+(15*o/256+45*r/1024+525*s/16384+1575*a/65536+155925*c/8388608)*h-(35*r/3072+175*s/12288+3675*a/262144+13475*c/1048576)*p+(315*s/131072+2205*a/524288+43659*c/8388608)*b-(693*a/1310720+6237*c/5242880)*f+1001*c/8388608*y)}function m9e(e,t,n){let i=e/n;if(t===0)return i;let o=i*i,r=o*i,s=r*i,a=t,c=a*a,d=c*c,u=d*c,h=u*c,p=h*c,b=p*c,f=Math.sin(2*i),y=Math.cos(2*i),_=Math.sin(4*i),S=Math.cos(4*i),A=Math.sin(6*i),Z=Math.cos(6*i),V=Math.sin(8*i),E=Math.cos(8*i),L=Math.sin(10*i),v=Math.cos(10*i),I=Math.sin(12*i);return i+i*c/4+7*i*d/64+15*i*u/256+579*i*h/16384+1515*i*p/65536+16837*i*b/1048576+(3*i*d/16+45*i*u/256-i*(32*o-561)*h/4096-i*(232*o-1677)*p/16384+i*(399985-90560*o+512*s)*b/5242880)*y+(21*i*u/256+483*i*h/4096-i*(224*o-1969)*p/16384-i*(33152*o-112599)*b/1048576)*S+(151*i*h/4096+4681*i*p/65536+1479*i*b/16384-453*r*b/32768)*Z+(1097*i*p/65536+42783*i*b/1048576)*E+8011*i*b/1048576*v+(3*c/8+3*d/16+213*u/2048-3*o*u/64+255*h/4096-33*o*h/512+20861*p/524288-33*o*p/512+s*p/1024+28273*b/1048576-471*o*b/8192+9*s*b/4096)*f+(21*d/256+21*u/256+533*h/8192-21*o*h/512+197*p/4096-315*o*p/4096+584039*b/16777216-12517*o*b/131072+7*s*b/2048)*_+(151*u/6144+151*h/4096+5019*p/131072-453*o*p/16384+26965*b/786432-8607*o*b/131072)*A+(1097*h/131072+1097*p/65536+225797*b/10485760-1097*o*b/65536)*V+(8011*p/2621440+8011*b/1048576)*L+293393*b/251658240*I}function GZ(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 h9e(e,t,n,i,o){let r=GZ(e._ellipticity,n),s=GZ(e._ellipticity,o);return Math.atan2(W.negativePiToPi(i-t),s-r)}function f9e(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=ZJ(e._ellipticity,t,o);d=(ZJ(e._ellipticity,t,s)-u)/Math.cos(a)}return Math.abs(d)}var p9e=new m,AJ=new m;function hle(e,t,n,i){let o=m.normalize(i.cartographicToCartesian(t,AJ),p9e),r=m.normalize(i.cartographicToCartesian(n,AJ),AJ),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=pe.clone(t,e._start),e._start.height=0,e._end=pe.clone(n,e._end),e._end.height=0,e._heading=h9e(e,t.longitude,t.latitude,n.longitude,n.latitude),e._distance=f9e(e,i.maximumRadius,i.minimumRadius,t.longitude,t.latitude,n.longitude,n.latitude)}function fle(e,t,n,i,o,r){if(n===0)return pe.clone(e,r);let s=o*o,a,c,d;if(Math.abs(W.PI_OVER_TWO-Math.abs(t))>W.EPSILON8){let u=ZJ(o,i,e.latitude),h=n*Math.cos(t),p=u+h;if(c=m9e(p,o,i),Math.abs(t)<W.EPSILON10)a=W.negativePiToPi(e.longitude);else{let b=GZ(o,e.latitude),f=GZ(o,c);d=Math.tan(t)*(f-b),a=W.negativePiToPi(e.longitude+d)}}else{c=e.latitude;let u;if(o===0)u=i*Math.cos(e.latitude);else{let h=Math.sin(e.latitude);u=i*Math.cos(e.latitude)/Math.sqrt(1-s*h*h)}d=n/u,t>0?a=W.negativePiToPi(e.longitude+d):a=W.negativePiToPi(e.longitude-d)}return l(r)?(r.longitude=a,r.latitude=c,r.height=0,r):new pe(a,c,0)}function H0(e,t,n){let i=n??ie.default;this._ellipsoid=i,this._start=new pe,this._end=new pe,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(e)&&l(t)&&hle(this,e,t,i)}Object.defineProperties(H0.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}}});H0.fromStartHeadingDistance=function(e,t,n,i,o){let r=i??ie.default,s=r.maximumRadius,a=r.minimumRadius,c=s*s,d=a*a,u=Math.sqrt((c-d)/c);t=W.negativePiToPi(t);let h=fle(e,t,n,r.maximumRadius,u);return!l(o)||l(i)&&!i.equals(o.ellipsoid)?new H0(e,h,r):(o.setEndPoints(e,h),o)};H0.prototype.setEndPoints=function(e,t){hle(this,e,t,this._ellipsoid)};H0.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)};H0.prototype.interpolateUsingSurfaceDistance=function(e,t){return fle(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)};H0.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 pe),Math.abs(W.PI_OVER_TWO-o)<=W.EPSILON8)return t.longitude=e,t.latitude=r.latitude,t.height=0,t;if(W.equalsEpsilon(Math.abs(W.PI_OVER_TWO-o),W.PI_OVER_TWO,W.EPSILON8))return W.equalsEpsilon(e,r.longitude,W.EPSILON12)?void 0:(t.longitude=e,t.latitude=W.PI_OVER_TWO*W.sign(W.PI_OVER_TWO-i),t.height=0,t);let s=r.latitude,a=n*Math.sin(s),c=Math.tan(.5*(W.PI_OVER_TWO+s))*Math.exp((e-r.longitude)/Math.tan(i)),d=(1+a)/(1-a),u=r.latitude,h;do{h=u;let p=n*Math.sin(h),b=(1+p)/(1-p);u=2*Math.atan(c*Math.pow(b/d,n/2))-W.PI_OVER_TWO}while(!W.equalsEpsilon(u,h,W.EPSILON12));return t.longitude=e,t.latitude=u,t.height=0,t};H0.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=GZ(n,o.latitude),s=GZ(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 pe(c,e,0)};var Sc=H0;var vJ=[Di,li],b9e=vJ.length,Ile=Math.cos(W.toRadians(30)),ple=Math.cos(W.toRadians(150)),Ple=0,Xle=1e3;function cy(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??on.GEODESIC,this._ellipsoid=ie.default,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(cy.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+ie.packedLength+1+1}}});cy.setProjectionAndEllipsoid=function(e,t){let n=0;for(let i=0;i<b9e;i++)if(t instanceof vJ[i]){n=i;break}e._projectionIndex=n,e._ellipsoid=t.ellipsoid};var g9e=new m,ble=new m,gle=new m;function WJ(e,t,n,i,o){let r=Gl(i,e,0,g9e),s=Gl(i,e,n,ble),a=Gl(i,t,0,gle),c=K0(s,r,ble),d=K0(a,r,gle);return m.cross(d,c,o),m.normalize(o,o)}var y9e=new pe,x9e=new m,T9e=new m,_9e=new m;function CJ(e,t,n,i,o,r,s,a,c,d,u){if(o===0)return;let h;r===on.GEODESIC?h=new z0(e,t,s):r===on.RHUMB&&(h=new Sc(e,t,s));let p=h.surfaceDistance;if(p<o)return;let b=WJ(e,t,i,s,_9e),f=Math.ceil(p/o),y=p/f,_=y,S=f-1,A=a.length;for(let Z=0;Z<S;Z++){let V=h.interpolateUsingSurfaceDistance(_,y9e),E=Gl(s,V,n,x9e),L=Gl(s,V,i,T9e);m.pack(b,a,A),m.pack(E,c,A),m.pack(L,d,A),u.push(V.latitude),u.push(V.longitude),A+=3,_+=y}}var VJ=new pe;function Gl(e,t,n,i){return pe.clone(t,VJ),VJ.height=n,pe.toCartesian(VJ,e,i)}cy.pack=function(e,t,n){let i=n??0,o=e._positions,r=o.length;t[i++]=r;for(let s=0;s<r;++s){let a=o[s];m.pack(a,t,i),i+=3}return t[i++]=e.granularity,t[i++]=e.loop?1:0,t[i++]=e.arcType,ie.pack(e._ellipsoid,t,i),i+=ie.packedLength,t[i++]=e._projectionIndex,t[i++]=e._scene3DOnly?1:0,t};cy.unpack=function(e,t,n){let i=t??0,o=e[i++],r=new Array(o);for(let p=0;p<o;p++)r[p]=m.unpack(e,i),i+=3;let s=e[i++],a=e[i++]===1,c=e[i++],d=ie.unpack(e,i);i+=ie.packedLength;let u=e[i++],h=e[i++]===1;return l(n)||(n=new cy({positions:r})),n._positions=r,n.granularity=s,n.loop=a,n.arcType=c,n._ellipsoid=d,n._projectionIndex=u,n._scene3DOnly=h,n};function K0(e,t,n){return m.subtract(e,t,n),m.normalize(n,n),n}function yle(e,t,n,i){return i=K0(e,t,i),i=m.cross(i,n,i),i=m.normalize(i,i),i=m.cross(n,i,i),i}var S9e=new m,A9e=new m,Z9e=new m,Nle=new m,C9e=0,V9e=-1;function RJ(e,t,n,i,o){let r=K0(n,t,Nle),s=yle(e,t,r,S9e),a=yle(i,t,r,A9e);if(W.equalsEpsilon(m.dot(s,a),V9e,W.EPSILON5))return o=m.cross(r,s,o),o=m.normalize(o,o),o;o=m.add(a,s,o),o=m.normalize(o,o);let c=m.cross(r,o,Z9e);return m.dot(a,c)<C9e&&(o=m.negate(o,o)),o}var x5=nn.fromPointNormal(m.ZERO,m.UNIT_Y),R9e=new m,E9e=new m,G9e=new m,L9e=new m,W9e=new m,b5=new m,g5=new pe,xle=new pe,Tle=new pe;cy.createGeometry=function(e){let t=!e._scene3DOnly,n=e.loop,i=e._ellipsoid,o=e.granularity,r=e.arcType,s=new vJ[e._projectionIndex](i),a=Ple,c=Xle,d,u,h=e._positions,p=h.length;p===2&&(n=!1);let b,f,y,_,S=new Sc(void 0,void 0,i),A,Z,V,E=[h[0]];for(u=0;u<p-1;u++)b=h[u],f=h[u+1],A=ai.lineSegmentPlane(b,f,x5,b5),l(A)&&!m.equalsEpsilon(A,b,W.EPSILON7)&&!m.equalsEpsilon(A,f,W.EPSILON7)&&(e.arcType===on.GEODESIC?E.push(m.clone(A)):e.arcType===on.RHUMB&&(V=i.cartesianToCartographic(A,g5).longitude,y=i.cartesianToCartographic(b,g5),_=i.cartesianToCartographic(f,xle),S.setEndPoints(y,_),Z=S.findIntersectionWithLongitude(V,Tle),A=i.cartographicToCartesian(Z,b5),l(A)&&!m.equalsEpsilon(A,b,W.EPSILON7)&&!m.equalsEpsilon(A,f,W.EPSILON7)&&E.push(m.clone(A)))),E.push(f);n&&(b=h[p-1],f=h[0],A=ai.lineSegmentPlane(b,f,x5,b5),l(A)&&!m.equalsEpsilon(A,b,W.EPSILON7)&&!m.equalsEpsilon(A,f,W.EPSILON7)&&(e.arcType===on.GEODESIC?E.push(m.clone(A)):e.arcType===on.RHUMB&&(V=i.cartesianToCartographic(A,g5).longitude,y=i.cartesianToCartographic(b,g5),_=i.cartesianToCartographic(f,xle),S.setEndPoints(y,_),Z=S.findIntersectionWithLongitude(V,Tle),A=i.cartographicToCartesian(Z,b5),l(A)&&!m.equalsEpsilon(A,b,W.EPSILON7)&&!m.equalsEpsilon(A,f,W.EPSILON7)&&E.push(m.clone(A)))));let L=E.length,v=new Array(L);for(u=0;u<L;u++){let J=pe.fromCartesian(E[u],i);J.height=0,v[u]=J}if(v=Yo(v,pe.equalsEpsilon),L=v.length,L<2)return;let I=[],X=[],N=[],g=[],C=R9e,R=E9e,G=G9e,P=L9e,Y=W9e,O=v[0],k=v[1],D=v[L-1];for(C=Gl(i,D,a,C),P=Gl(i,k,a,P),R=Gl(i,O,a,R),G=Gl(i,O,c,G),n?Y=RJ(C,R,G,P,Y):Y=WJ(O,k,c,i,Y),m.pack(Y,X,0),m.pack(R,N,0),m.pack(G,g,0),I.push(O.latitude),I.push(O.longitude),CJ(O,k,a,c,o,r,i,X,N,g,I),u=1;u<L-1;++u){C=m.clone(R,C),R=m.clone(P,R);let J=v[u];Gl(i,J,c,G),Gl(i,v[u+1],a,P),RJ(C,R,G,P,Y),d=X.length,m.pack(Y,X,d),m.pack(R,N,d),m.pack(G,g,d),I.push(J.latitude),I.push(J.longitude),CJ(v[u],v[u+1],a,c,o,r,i,X,N,g,I)}let w=v[L-1],z=v[L-2];if(R=Gl(i,w,a,R),G=Gl(i,w,c,G),n){let J=v[0];C=Gl(i,z,a,C),P=Gl(i,J,a,P),Y=RJ(C,R,G,P,Y)}else Y=WJ(z,w,c,i,Y);if(d=X.length,m.pack(Y,X,d),m.pack(R,N,d),m.pack(G,g,d),I.push(w.latitude),I.push(w.longitude),n){for(CJ(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 ike(n,s,N,g,X,I,t)};var v9e=new m,F9e=new q,I9e=new Pe;function _le(e,t,n,i){let o=K0(n,t,v9e),r=m.dot(o,e);if(r>Ile||r<ple){let s=K0(i,n,Nle),a=r<ple?W.PI_OVER_TWO:-W.PI_OVER_TWO,c=Pe.fromAxisAngle(s,a,I9e),d=q.fromQuaternion(c,F9e);return q.multiplyByVector(d,e,e),!0}return!1}var Sle=new pe,P9e=new m,Ale=new m;function JW(e,t,n,i,o){let r=pe.toCartesian(t,e._ellipsoid,P9e),s=m.add(r,n,Ale),a=!1,c=e._ellipsoid,d=c.cartesianToCartographic(s,Sle);Math.abs(t.longitude-d.longitude)>W.PI_OVER_TWO&&(a=!0,s=m.subtract(r,n,Ale),d=c.cartesianToCartographic(s,Sle)),d.height=0;let u=e.project(d,o);return o=m.subtract(u,i,o),o.z=0,o=m.normalize(o,o),a&&m.negate(o,o),o}var X9e=new m,Zle=new m;function Cle(e,t,n,i,o,r){let s=m.subtract(t,e,X9e);m.normalize(s,s);let a=n-Ple,c=m.multiplyByScalar(s,a,Zle);m.add(e,c,o);let d=i-Xle;c=m.multiplyByScalar(s,d,Zle),m.add(t,c,r)}var N9e=new m;function y5(e,t){let n=nn.getPointDistance(x5,e),i=nn.getPointDistance(x5,t),o=N9e;W.equalsEpsilon(n,0,W.EPSILON2)?(o=K0(t,e,o),m.multiplyByScalar(o,W.EPSILON2,o),m.add(e,o,e)):W.equalsEpsilon(i,0,W.EPSILON2)&&(o=K0(e,t,o),m.multiplyByScalar(o,W.EPSILON2,o),m.add(t,o,t))}function Y9e(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 Yle=new pe,wle=new pe,Vle=new m,EJ=new m,Rle=new m,Ele=new m,w9e=new m,Gle=new m,M9e=[Yle,wle],k9e=new ae,U9e=new m,D9e=new m,O9e=new m,B9e=new m,z9e=new m,H9e=new m,GJ=new m,LJ=new m,K9e=new m,J9e=new m,j9e=new m,Lle=new m,Q9e=new m,q9e=new m,$9e=new Tn,eke=new Tn,Wle=new m,tke=new m,vle=new m,nke=[new de,new de],Mle=[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],Fle=Mle.length;function ike(e,t,n,i,o,r,s){let a,c,d=t._ellipsoid,u=n.length/3-1,h=u*8,p=h*4,b=u*36,f=h>65535?new Uint32Array(b):new Uint16Array(b),y=new Float64Array(h*3),_=new Float32Array(p),S=new Float32Array(p),A=new Float32Array(p),Z=new Float32Array(p),V=new Float32Array(p),E,L,v,I;s&&(E=new Float32Array(p),L=new Float32Array(p),v=new Float32Array(p),I=new Float32Array(h*2));let X=r.length/2,N=0,g=Yle;g.height=0;let C=wle;C.height=0;let R=Vle,G=EJ;if(s)for(c=0,a=1;a<X;a++)g.latitude=r[c],g.longitude=r[c+1],C.latitude=r[c+2],C.longitude=r[c+3],R=t.project(g,R),G=t.project(C,G),N+=m.distance(R,G),c+=2;let P=i.length/3;G=m.unpack(i,0,G);let Y=0;for(c=3,a=1;a<P;a++)R=m.clone(G,R),G=m.unpack(i,c,G),Y+=m.distance(R,G),c+=3;let O;c=3;let k=0,D=0,w=0,z=0,J=!1,ee=m.unpack(n,0,Ele),H=m.unpack(i,0,EJ),te=m.unpack(o,0,Gle);if(e){let Ve=m.unpack(n,n.length-6,Rle);_le(te,Ve,ee,H)&&(te=m.negate(te,te))}let $=0,be=0,ye=0;for(a=0;a<u;a++){let Ve=m.clone(ee,Rle),Ye=m.clone(H,Vle),ke=m.clone(te,w9e);J&&(ke=m.negate(ke,ke)),ee=m.unpack(n,c,Ele),H=m.unpack(i,c,EJ),te=m.unpack(o,c,Gle),J=_le(te,Ve,ee,H),g.latitude=r[k],g.longitude=r[k+1],C.latitude=r[k+2],C.longitude=r[k+3];let it,pt,Vt,Ue;if(s){let An=Y9e(g,C);it=t.project(g,z9e),pt=t.project(C,H9e);let Uo=K0(pt,it,Wle);Uo.y=Math.abs(Uo.y),Vt=GJ,Ue=LJ,An===0||m.dot(Uo,m.UNIT_Y)>Ile?(Vt=JW(t,g,ke,it,GJ),Ue=JW(t,C,te,pt,LJ)):An===1?(Ue=JW(t,C,te,pt,LJ),Vt.x=0,Vt.y=W.sign(g.longitude-Math.abs(C.longitude)),Vt.z=0):(Vt=JW(t,g,ke,it,GJ),Ue.x=0,Ue.y=W.sign(g.longitude-C.longitude),Ue.z=0)}let St=m.distance(Ye,H),ht=Tn.fromCartesian(Ve,$9e),ot=m.subtract(ee,Ve,K9e),Jt=m.normalize(ot,Lle),jt=m.subtract(Ye,Ve,J9e);jt=m.normalize(jt,jt);let yt=m.cross(Jt,jt,Lle);yt=m.normalize(yt,yt);let Gt=m.cross(jt,ke,Q9e);Gt=m.normalize(Gt,Gt);let ln=m.subtract(H,ee,j9e);ln=m.normalize(ln,ln);let st=m.cross(te,ln,q9e);st=m.normalize(st,st);let Nn=St/Y,Zi=$/Y,Ci=0,Dt,Ro,ki,ri=0,kn=0;if(s){Ci=m.distance(it,pt),Dt=Tn.fromCartesian(it,eke),Ro=m.subtract(pt,it,Wle),ki=m.normalize(Ro,tke);let An=ki.x;ki.x=ki.y,ki.y=-An,ri=Ci/N,kn=be/N}for(O=0;O<8;O++){let An=z+O*4,Uo=D+O*2,Eo=An+3,na=O<4?1:-1,Wi=O===2||O===3||O===6||O===7?1:-1;m.pack(ht.high,_,An),_[Eo]=ot.x,m.pack(ht.low,S,An),S[Eo]=ot.y,m.pack(Gt,A,An),A[Eo]=ot.z,m.pack(st,Z,An),Z[Eo]=Nn*na,m.pack(yt,V,An);let Go=Zi*Wi;Go===0&&Wi<0&&(Go=9),V[Eo]=Go,s&&(E[An]=Dt.high.x,E[An+1]=Dt.high.y,E[An+2]=Dt.low.x,E[An+3]=Dt.low.y,v[An]=-Vt.y,v[An+1]=Vt.x,v[An+2]=Ue.y,v[An+3]=-Ue.x,L[An]=Ro.x,L[An+1]=Ro.y,L[An+2]=ki.x,L[An+3]=ki.y,I[Uo]=ri*na,Go=kn*Wi,Go===0&&Wi<0&&(Go=9),I[Uo+1]=Go)}let Yn=O9e,Ui=B9e,Vi=U9e,ir=D9e,wr=ae.fromCartographicArray(M9e,k9e),Ss=Ei.getMinimumMaximumHeights(wr,d),Vr=Ss.minimumTerrainHeight,wn=Ss.maximumTerrainHeight;ye+=Math.abs(Vr),ye+=Math.abs(wn),Cle(Ve,Ye,Vr,wn,Yn,Vi),Cle(ee,H,Vr,wn,Ui,ir);let uo=m.multiplyByScalar(yt,W.EPSILON5,vle);m.add(Yn,uo,Yn),m.add(Ui,uo,Ui),m.add(Vi,uo,Vi),m.add(ir,uo,ir),y5(Yn,Ui),y5(Vi,ir),m.pack(Yn,y,w),m.pack(Ui,y,w+3),m.pack(ir,y,w+6),m.pack(Vi,y,w+9),uo=m.multiplyByScalar(yt,-2*W.EPSILON5,vle),m.add(Yn,uo,Yn),m.add(Ui,uo,Ui),m.add(Vi,uo,Vi),m.add(ir,uo,ir),y5(Yn,Ui),y5(Vi,ir),m.pack(Yn,y,w+12),m.pack(Ui,y,w+15),m.pack(ir,y,w+18),m.pack(Vi,y,w+21),k+=2,c+=3,D+=16,w+=24,z+=32,$+=St,be+=Ci}c=0;let ce=0;for(a=0;a<u;a++){for(O=0;O<Fle;O++)f[c+O]=Mle[O]+ce;ce+=8,c+=Fle}let Ze=nke;de.fromVertices(n,m.ZERO,3,Ze[0]),de.fromVertices(i,m.ZERO,3,Ze[1]);let xe=de.fromBoundingSpheres(Ze);xe.radius+=ye/(u*2);let Ge={position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,normalize:!1,values:y}),startHiAndForwardOffsetX:ay(_),startLoAndForwardOffsetY:ay(S),startNormalAndForwardOffsetZ:ay(A),endNormalAndTextureCoordinateNormalizationX:ay(Z),rightNormalAndTextureCoordinateNormalizationY:ay(V)};return s&&(Ge.startHiLo2D=ay(E),Ge.offsetAndRight2D=ay(L),Ge.startEndNormals2D=ay(v),Ge.texcoordNormalization2D=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,normalize:!1,values:I})),new ft({attributes:Ge,indices:f,boundingSphere:xe})}function ay(e){return new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}cy._projectNormal=JW;var PT=cy;var bln=x(T(),1),jW=`in vec4 v_startPlaneNormalEcAndHalfWidth;
in vec4 v_endPlaneNormalEcAndBatchId;
in vec4 v_rightPlaneEC; // Technically can compute distance for this here
in vec4 v_endEcAndStartEcX;
in vec4 v_texcoordNormalizationAndStartEcYZ;
#ifdef PER_INSTANCE_COLOR
in vec4 v_color;
#endif
void main(void)
{
float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));
vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);
// Discard for sky
if (logDepthOrDepth == 0.0) {
#ifdef DEBUG_SHOW_VOLUME
out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);
return;
#else // DEBUG_SHOW_VOLUME
discard;
#endif // DEBUG_SHOW_VOLUME
}
vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
eyeCoordinate /= eyeCoordinate.w;
float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);
// Check distance of the eye coordinate against the right-facing plane
float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);
// Check eye coordinate against the mitering planes
float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);
float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);
if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {
#ifdef DEBUG_SHOW_VOLUME
out_FragColor = vec4(1.0, 0.0, 0.0, 0.5);
return;
#else // DEBUG_SHOW_VOLUME
discard;
#endif // DEBUG_SHOW_VOLUME
}
// Check distance of the eye coordinate against start and end planes with normals in the right plane.
// For computing unskewed lengthwise texture coordinate.
// Can also be used for clipping extremely pointy miters, but in practice unnecessary because of miter breaking.
// aligned plane: cross the right plane normal with miter plane normal, then cross the result with right again to point it more "forward"
vec3 alignedPlaneNormal;
// start aligned plane
alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);
alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));
distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);
// end aligned plane
alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);
alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));
distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);
#ifdef PER_INSTANCE_COLOR
out_FragColor = czm_gammaCorrect(v_color);
#else // PER_INSTANCE_COLOR
// Clamp - distance to aligned planes may be negative due to mitering,
// so fragment texture coordinate might be out-of-bounds.
float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);
s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;
float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);
czm_materialInput materialInput;
materialInput.s = s;
materialInput.st = vec2(s, t);
materialInput.str = vec3(s, t, 0.0);
czm_material material = czm_getMaterial(materialInput);
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#endif // PER_INSTANCE_COLOR
// Premultiply alpha. Required for classification primitives on translucent globe.
out_FragColor.rgb *= out_FragColor.a;
czm_writeDepthClamp();
}
`;var yln=x(T(),1),QW=`in vec3 v_forwardDirectionEC;
in vec3 v_texcoordNormalizationAndHalfWidth;
in float v_batchId;
#ifdef PER_INSTANCE_COLOR
in vec4 v_color;
#else
in vec2 v_alignedPlaneDistances;
in float v_texcoordT;
#endif
float rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {
// We don't expect the ray to ever be parallel to the plane
return (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);
}
void main(void)
{
vec4 eyeCoordinate = gl_FragCoord;
eyeCoordinate /= eyeCoordinate.w;
#ifdef PER_INSTANCE_COLOR
out_FragColor = czm_gammaCorrect(v_color);
#else // PER_INSTANCE_COLOR
// Use distances for planes aligned with segment to prevent skew in dashing
float distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);
float distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);
// Clamp - distance to aligned planes may be negative due to mitering
distanceFromStart = max(0.0, distanceFromStart);
distanceFromEnd = max(0.0, distanceFromEnd);
float s = distanceFromStart / (distanceFromStart + distanceFromEnd);
s = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;
czm_materialInput materialInput;
materialInput.s = s;
materialInput.st = vec2(s, v_texcoordT);
materialInput.str = vec3(s, v_texcoordT, 0.0);
czm_material material = czm_getMaterial(materialInput);
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#endif // PER_INSTANCE_COLOR
}
`;var Tln=x(T(),1),qW=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec4 startHiAndForwardOffsetX;
in vec4 startLoAndForwardOffsetY;
in vec4 startNormalAndForwardOffsetZ;
in vec4 endNormalAndTextureCoordinateNormalizationX;
in vec4 rightNormalAndTextureCoordinateNormalizationY;
in vec4 startHiLo2D;
in vec4 offsetAndRight2D;
in vec4 startEndNormals2D;
in vec2 texcoordNormalization2D;
in float batchId;
out vec3 v_forwardDirectionEC;
out vec3 v_texcoordNormalizationAndHalfWidth;
out float v_batchId;
// For materials
#ifdef WIDTH_VARYING
out float v_width;
#endif
#ifdef ANGLE_VARYING
out float v_polylineAngle;
#endif
#ifdef PER_INSTANCE_COLOR
out vec4 v_color;
#else
out vec2 v_alignedPlaneDistances;
out float v_texcoordT;
#endif
// Morphing planes using SLERP or NLERP doesn't seem to work, so instead draw the material directly on the shadow volume.
// Morph views are from very far away and aren't meant to be used precisely, so this should be sufficient.
void main()
{
v_batchId = batchId;
// Start position
vec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));
vec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);
vec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);
vec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;
vec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;
vec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;
// Start plane
vec4 startPlane2D;
vec4 startPlane3D;
startPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);
startPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;
startPlane2D.w = -dot(startPlane2D.xyz, posEc2D);
startPlane3D.w = -dot(startPlane3D.xyz, posEc3D);
// Right plane
vec4 rightPlane2D;
vec4 rightPlane3D;
rightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);
rightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;
rightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);
rightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);
// End position
posRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);
posRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);
posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);
posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;
posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;
vec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;
vec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));
vec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));
// End plane
vec4 endPlane2D;
vec4 endPlane3D;
endPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);
endPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;
endPlane2D.w = -dot(endPlane2D.xyz, posEc2D);
endPlane3D.w = -dot(endPlane3D.xyz, posEc3D);
// Forward direction
v_forwardDirectionEC = normalize(endEC - startEC);
vec2 cleanTexcoordNormalization2D;
cleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);
cleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));
vec2 cleanTexcoordNormalization3D;
cleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);
cleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;
cleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));
v_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);
#ifdef PER_INSTANCE_COLOR
v_color = czm_batchTable_color(batchId);
#else // PER_INSTANCE_COLOR
// For computing texture coordinates
v_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);
v_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);
#endif // PER_INSTANCE_COLOR
#ifdef WIDTH_VARYING
float width = czm_batchTable_width(batchId);
float halfWidth = width * 0.5;
v_width = width;
v_texcoordNormalizationAndHalfWidth.z = halfWidth;
#else
float halfWidth = 0.5 * czm_batchTable_width(batchId);
v_texcoordNormalizationAndHalfWidth.z = halfWidth;
#endif
// Compute a normal along which to "push" the position out, extending the miter depending on view distance.
// Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.
// Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.
// Since this is morphing, compute both 3D and 2D positions and then blend.
// ****** 3D ******
// Check distance to the end plane and start plane, pick the plane that is closer
vec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow); // w = 1.0, see czm_computePosition
float absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));
float absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));
vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);
vec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.
// Nudge the top vertex upwards to prevent flickering
vec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));
geodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);
geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;
positionEc3D.xyz += geodeticSurfaceNormal;
// Determine if this vertex is on the "left" or "right"
normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);
// A "perfect" implementation would push along normals according to the angle against forward.
// In practice, just pushing the normal out by halfWidth is sufficient for morph views.
positionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)
// ****** 2D ******
// Check distance to the end plane and start plane, pick the plane that is closer
vec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy); // w = 1.0, see czm_computePosition
absStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));
absEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));
planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);
upOrDown = normalize(cross(rightPlane2D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.
// Nudge the top vertex upwards to prevent flickering
geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));
geodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);
geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;
positionEc2D.xyz += geodeticSurfaceNormal;
// Determine if this vertex is on the "left" or "right"
normalEC *= sign(texcoordNormalization2D.x);
#ifndef PER_INSTANCE_COLOR
// Use vertex's sidedness to compute its texture coordinate.
v_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);
#endif
// A "perfect" implementation would push along normals according to the angle against forward.
// In practice, just pushing the normal out by halfWidth is sufficient for morph views.
positionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)
// Blend for actual position
gl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);
#ifdef ANGLE_VARYING
// Approximate relative screen space direction of the line.
vec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));
approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);
v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);
#endif
}
`;var Sln=x(T(),1),$W=`in vec3 position3DHigh;
in vec3 position3DLow;
// In 2D and in 3D, texture coordinate normalization component signs encodes:
// * X sign - sidedness relative to right plane
// * Y sign - is negative OR magnitude is greater than 1.0 if vertex is on bottom of volume
#ifndef COLUMBUS_VIEW_2D
in vec4 startHiAndForwardOffsetX;
in vec4 startLoAndForwardOffsetY;
in vec4 startNormalAndForwardOffsetZ;
in vec4 endNormalAndTextureCoordinateNormalizationX;
in vec4 rightNormalAndTextureCoordinateNormalizationY;
#else
in vec4 startHiLo2D;
in vec4 offsetAndRight2D;
in vec4 startEndNormals2D;
in vec2 texcoordNormalization2D;
#endif
in float batchId;
out vec4 v_startPlaneNormalEcAndHalfWidth;
out vec4 v_endPlaneNormalEcAndBatchId;
out vec4 v_rightPlaneEC;
out vec4 v_endEcAndStartEcX;
out vec4 v_texcoordNormalizationAndStartEcYZ;
// For materials
#ifdef WIDTH_VARYING
out float v_width;
#endif
#ifdef ANGLE_VARYING
out float v_polylineAngle;
#endif
#ifdef PER_INSTANCE_COLOR
out vec4 v_color;
#endif
void main()
{
#ifdef COLUMBUS_VIEW_2D
vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;
vec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);
vec3 ecEnd = forwardDirectionEC + ecStart;
forwardDirectionEC = normalize(forwardDirectionEC);
// Right plane
v_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);
v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);
// start plane
vec4 startPlaneEC;
startPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);
startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);
// end plane
vec4 endPlaneEC;
endPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);
endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);
v_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);
v_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;
#else // COLUMBUS_VIEW_2D
vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;
vec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);
vec3 ecEnd = ecStart + offset;
vec3 forwardDirectionEC = normalize(offset);
// start plane
vec4 startPlaneEC;
startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;
startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);
// end plane
vec4 endPlaneEC;
endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;
endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);
// Right plane
v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;
v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);
v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);
v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;
#endif // COLUMBUS_VIEW_2D
v_endEcAndStartEcX.xyz = ecEnd;
v_endEcAndStartEcX.w = ecStart.x;
v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;
#ifdef PER_INSTANCE_COLOR
v_color = czm_batchTable_color(batchId);
#endif // PER_INSTANCE_COLOR
// Compute a normal along which to "push" the position out, extending the miter depending on view distance.
// Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.
// Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.
vec4 positionRelativeToEye = czm_computePosition();
// Check distance to the end plane and start plane, pick the plane that is closer
vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye; // w = 1.0, see czm_computePosition
float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));
float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));
vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);
vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.
vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.
// Extrude bottom vertices downward for far view distances, like for GroundPrimitives
upOrDown = cross(forwardDirectionEC, normalEC);
upOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;
upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;
upOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;
positionEC.xyz += upOrDown;
v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));
// Determine distance along normalEC to push for a volume of appropriate width.
// Make volumes about double pixel width for a conservative fit - in practice the
// extra cost here is minimal compared to the loose volume heights.
//
// N = normalEC (guaranteed "right-facing")
// R = rightEC
// p = angle between N and R
// w = distance to push along R if R == N
// d = distance to push along N
//
// N R
// { p| } * cos(p) = dot(N, R) = w / d
// d | |w * d = w / dot(N, R)
// { | }
// o---------- polyline segment ---->
//
float width = czm_batchTable_width(batchId);
#ifdef WIDTH_VARYING
v_width = width;
#endif
v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;
v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;
v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;
v_endPlaneNormalEcAndBatchId.w = batchId;
width = width * max(0.0, czm_metersPerPixel(positionEC)); // width = distance to push along R
width = width / dot(normalEC, v_rightPlaneEC.xyz); // width = distance to push along N
// Determine if this vertex is on the "left" or "right"
#ifdef COLUMBUS_VIEW_2D
normalEC *= sign(texcoordNormalization2D.x);
#else
normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);
#endif
positionEC.xyz += width * normalEC;
gl_Position = czm_depthClamp(czm_projection * positionEC);
#ifdef ANGLE_VARYING
// Approximate relative screen space direction of the line.
vec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));
approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);
v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);
#endif
}
`;var Iln=x(T(),1);var Zln=x(T(),1),ev=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 prevPosition3DHigh;
in vec3 prevPosition3DLow;
in vec3 nextPosition3DHigh;
in vec3 nextPosition3DLow;
in vec2 expandAndWidth;
in vec4 color;
in float batchId;
out vec4 v_color;
void main()
{
float expandDir = expandAndWidth.x;
float width = abs(expandAndWidth.y) + 0.5;
bool usePrev = expandAndWidth.y < 0.0;
vec4 p = czm_computePosition();
vec4 prev = czm_computePrevPosition();
vec4 next = czm_computeNextPosition();
float angle;
vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);
gl_Position = czm_viewportOrthographic * positionWC;
v_color = color;
}
`;var Vln=x(T(),1),Ll=`void clipLineSegmentToNearPlane(
vec3 p0,
vec3 p1,
out vec4 positionWC,
out bool clipped,
out bool culledByNearPlane,
out vec4 clippedPositionEC)
{
culledByNearPlane = false;
clipped = false;
vec3 p0ToP1 = p1 - p0;
float magnitude = length(p0ToP1);
vec3 direction = normalize(p0ToP1);
// Distance that p0 is behind the near plane. Negative means p0 is
// in front of the near plane.
float endPoint0Distance = czm_currentFrustum.x + p0.z;
// Camera looks down -Z.
// When moving a point along +Z: LESS VISIBLE
// * Points in front of the camera move closer to the camera.
// * Points behind the camrea move farther away from the camera.
// When moving a point along -Z: MORE VISIBLE
// * Points in front of the camera move farther away from the camera.
// * Points behind the camera move closer to the camera.
// Positive denominator: -Z, becoming more visible
// Negative denominator: +Z, becoming less visible
// Nearly zero: parallel to near plane
float denominator = -direction.z;
if (endPoint0Distance > 0.0 && abs(denominator) < czm_epsilon7)
{
// p0 is behind the near plane and the line to p1 is nearly parallel to
// the near plane, so cull the segment completely.
culledByNearPlane = true;
}
else if (endPoint0Distance > 0.0)
{
// p0 is behind the near plane, and the line to p1 is moving distinctly
// toward or away from it.
// t = (-plane distance - dot(plane normal, ray origin)) / dot(plane normal, ray direction)
float t = endPoint0Distance / denominator;
if (t < 0.0 || t > magnitude)
{
// Near plane intersection is not between the two points.
// We already confirmed p0 is behind the naer plane, so now
// we know the entire segment is behind it.
culledByNearPlane = true;
}
else
{
// Segment crosses the near plane, update p0 to lie exactly on it.
p0 = p0 + t * direction;
// Numerical noise might put us a bit on the wrong side of the near plane.
// Don't let that happen.
p0.z = min(p0.z, -czm_currentFrustum.x);
clipped = true;
}
}
clippedPositionEC = vec4(p0, 1.0);
positionWC = czm_eyeToWindowCoordinates(clippedPositionEC);
}
vec4 getPolylineWindowCoordinatesEC(vec4 positionEC, vec4 prevEC, vec4 nextEC, float expandDirection, float width, bool usePrevious, out float angle)
{
// expandDirection +1 is to the _left_ when looking from positionEC toward nextEC.
#ifdef POLYLINE_DASH
// Compute the window coordinates of the points.
vec4 positionWindow = czm_eyeToWindowCoordinates(positionEC);
vec4 previousWindow = czm_eyeToWindowCoordinates(prevEC);
vec4 nextWindow = czm_eyeToWindowCoordinates(nextEC);
// Determine the relative screen space direction of the line.
vec2 lineDir;
if (usePrevious) {
lineDir = normalize(positionWindow.xy - previousWindow.xy);
}
else {
lineDir = normalize(nextWindow.xy - positionWindow.xy);
}
angle = atan(lineDir.x, lineDir.y) - 1.570796327; // precomputed atan(1,0)
// Quantize the angle so it doesn't change rapidly between segments.
angle = floor(angle / czm_piOverFour + 0.5) * czm_piOverFour;
#endif
vec4 clippedPrevWC, clippedPrevEC;
bool prevSegmentClipped, prevSegmentCulled;
clipLineSegmentToNearPlane(prevEC.xyz, positionEC.xyz, clippedPrevWC, prevSegmentClipped, prevSegmentCulled, clippedPrevEC);
vec4 clippedNextWC, clippedNextEC;
bool nextSegmentClipped, nextSegmentCulled;
clipLineSegmentToNearPlane(nextEC.xyz, positionEC.xyz, clippedNextWC, nextSegmentClipped, nextSegmentCulled, clippedNextEC);
bool segmentClipped, segmentCulled;
vec4 clippedPositionWC, clippedPositionEC;
clipLineSegmentToNearPlane(positionEC.xyz, usePrevious ? prevEC.xyz : nextEC.xyz, clippedPositionWC, segmentClipped, segmentCulled, clippedPositionEC);
if (segmentCulled)
{
return vec4(0.0, 0.0, 0.0, 1.0);
}
vec2 directionToPrevWC = normalize(clippedPrevWC.xy - clippedPositionWC.xy);
vec2 directionToNextWC = normalize(clippedNextWC.xy - clippedPositionWC.xy);
// If a segment was culled, we can't use the corresponding direction
// computed above. We should never see both of these be true without
// \`segmentCulled\` above also being true.
if (prevSegmentCulled)
{
directionToPrevWC = -directionToNextWC;
}
else if (nextSegmentCulled)
{
directionToNextWC = -directionToPrevWC;
}
vec2 thisSegmentForwardWC, otherSegmentForwardWC;
if (usePrevious)
{
thisSegmentForwardWC = -directionToPrevWC;
otherSegmentForwardWC = directionToNextWC;
}
else
{
thisSegmentForwardWC = directionToNextWC;
otherSegmentForwardWC = -directionToPrevWC;
}
vec2 thisSegmentLeftWC = vec2(-thisSegmentForwardWC.y, thisSegmentForwardWC.x);
vec2 leftWC = thisSegmentLeftWC;
float expandWidth = width * 0.5;
// When lines are split at the anti-meridian, the position may be at the
// same location as the next or previous position, and we need to handle
// that to avoid producing NaNs.
if (!czm_equalsEpsilon(prevEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1) && !czm_equalsEpsilon(nextEC.xyz - positionEC.xyz, vec3(0.0), czm_epsilon1))
{
vec2 otherSegmentLeftWC = vec2(-otherSegmentForwardWC.y, otherSegmentForwardWC.x);
vec2 leftSumWC = thisSegmentLeftWC + otherSegmentLeftWC;
float leftSumLength = length(leftSumWC);
leftWC = leftSumLength < czm_epsilon6 ? thisSegmentLeftWC : (leftSumWC / leftSumLength);
// The sine of the angle between the two vectors is given by the formula
// |a x b| = |a||b|sin(theta)
// which is
// float sinAngle = length(cross(vec3(leftWC, 0.0), vec3(-thisSegmentForwardWC, 0.0)));
// Because the z components of both vectors are zero, the x and y coordinate will be zero.
// Therefore, the sine of the angle is just the z component of the cross product.
vec2 u = -thisSegmentForwardWC;
vec2 v = leftWC;
float sinAngle = abs(u.x * v.y - u.y * v.x);
expandWidth = clamp(expandWidth / sinAngle, 0.0, width * 2.0);
}
vec2 offset = leftWC * expandDirection * expandWidth * czm_pixelRatio;
return vec4(clippedPositionWC.xy + offset, -clippedPositionWC.z, 1.0) * (czm_projection * clippedPositionEC).w;
}
vec4 getPolylineWindowCoordinates(vec4 position, vec4 previous, vec4 next, float expandDirection, float width, bool usePrevious, out float angle)
{
vec4 positionEC = czm_modelViewRelativeToEye * position;
vec4 prevEC = czm_modelViewRelativeToEye * previous;
vec4 nextEC = czm_modelViewRelativeToEye * next;
return getPolylineWindowCoordinatesEC(positionEC, prevEC, nextEC, expandDirection, width, usePrevious, angle);
}
`;var oke=`#define CLIP_POLYLINE
${Ll}
${ev}`,rke=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??oke,this._fragmentShaderSource=e.fragmentShaderSource??rke,this._renderState=yo.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=Xe.POSITION_ONLY;XT.prototype.getFragmentShaderSource=yo.prototype.getFragmentShaderSource;XT.prototype.isTranslucent=yo.prototype.isTranslucent;XT.prototype.getRenderState=yo.prototype.getRenderState;var Es=XT;var Kln=x(T(),1);var Xln=x(T(),1),tv=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 prevPosition3DHigh;
in vec3 prevPosition3DLow;
in vec3 nextPosition3DHigh;
in vec3 nextPosition3DLow;
in vec2 expandAndWidth;
in vec2 st;
in float batchId;
out float v_width;
out vec2 v_st;
out float v_polylineAngle;
void main()
{
float expandDir = expandAndWidth.x;
float width = abs(expandAndWidth.y) + 0.5;
bool usePrev = expandAndWidth.y < 0.0;
vec4 p = czm_computePosition();
vec4 prev = czm_computePrevPosition();
vec4 next = czm_computeNextPosition();
float angle;
vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);
gl_Position = czm_viewportOrthographic * positionWC;
v_width = width;
v_st.s = st.s;
v_st.t = czm_writeNonPerspective(st.t, gl_Position.w);
v_polylineAngle = angle;
}
`;var Yln=x(T(),1),NT=`#ifdef VECTOR_TILE
uniform vec4 u_highlightColor;
#endif
in vec2 v_st;
void main()
{
czm_materialInput materialInput;
vec2 st = v_st;
st.t = czm_readNonPerspective(st.t, gl_FragCoord.w);
materialInput.s = st.s;
materialInput.st = st;
materialInput.str = vec3(st, 0.0);
czm_material material = czm_getMaterial(materialInput);
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#ifdef VECTOR_TILE
out_FragColor *= u_highlightColor;
#endif
czm_writeLogDepth();
}
`;var ske=`#define CLIP_POLYLINE
${Ll}
${tv}`,ake=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??ske,this._fragmentShaderSource=e.fragmentShaderSource??ake,this._renderState=yo.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
${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=Xe.POSITION_AND_ST;YT.prototype.getFragmentShaderSource=yo.prototype.getFragmentShaderSource;YT.prototype.isTranslucent=yo.prototype.isTranslucent;YT.prototype.getRenderState=yo.prototype.getRenderState;var $a=YT;function J0(e){e=e??B.EMPTY_OBJECT,this.geometryInstances=e.geometryInstances,this._hasPerInstanceColors=!0;let t=e.appearance;l(t)||(t=new $a),this.appearance=t,this.show=e.show??!0,this.classificationType=e.classificationType??Jn.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=kle(!1),this._renderState3DTiles=kle(!0),this._renderStateMorph=De.fromCache({cull:{enabled:!0,face:Pi.FRONT},depthTest:{enabled:!0},blending:tn.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1})}Object.defineProperties(J0.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}}});J0.initializeTerrainHeights=function(){return Ei.initialize()};function cke(e,t,n){let i=t.context,o=e._primitive,r=o._attributeLocations,s=o._batchTable.getVertexShaderCallback()($W);s=Ln._appendShowToShader(o,s),s=Ln._appendDistanceDisplayConditionToShader(o,s),s=Ln._modifyShaderPosition(e,s,t.scene3DOnly);let a=o._batchTable.getVertexShaderCallback()(qW);a=Ln._appendShowToShader(o,a),a=Ln._appendDistanceDisplayConditionToShader(o,a),a=Ln._modifyShaderPosition(e,a,t.scene3DOnly);let c=o._batchTable.getVertexShaderCallback()(jW),d=[`GLOBE_MINIMUM_ALTITUDE ${t.mapProjection.ellipsoid.minimumRadius.toFixed(1)}`],u="",h="";l(n.material)?(h=l(n.material)?n.material.shaderSource:"",h.search(/in\s+float\s+v_polylineAngle;/g)!==-1&&d.push("ANGLE_VARYING"),h.search(/in\s+float\s+v_width;/g)!==-1&&d.push("WIDTH_VARYING")):u="PER_INSTANCE_COLOR",d.push(u);let p=e.debugShowShadowVolume?["DEBUG_SHOW_VOLUME",u]:[u],b=new Be({defines:d,sources:[s]}),f=new Be({defines:p,sources:[h,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 Be({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 Be({defines:d.concat([`MAX_TERRAIN_HEIGHT ${Ei._defaultMaxTerrainHeight.toFixed(1)}`]),sources:[a]});c=o._batchTable.getVertexShaderCallback()(QW);let A=new Be({defines:p,sources:[h,c]});_=i.shaderCache.createDerivedShaderProgram(e._sp,"MorphColor",{context:i,shaderProgram:e._spMorph,vertexShaderSource:S,fragmentShaderSource:A,attributeLocations:r})}e._spMorph=_}function kle(e){return De.fromCache({cull:{enabled:!0},blending:tn.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:jn.EQUAL,frontOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.KEEP},backFunction:jn.EQUAL,backOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.KEEP},reference:Ot.CESIUM_3D_TILE_MASK,mask:Ot.CESIUM_3D_TILE_MASK}})}function lke(e,t,n,i,o,r){let s=e._primitive,a=s._va.length;o.length=a,r.length=a;let d=t instanceof Es?{}:n._uniforms,u=s._batchTable.getUniformMapCallback()(d);for(let h=0;h<a;h++){let p=s._va[h],b=o[h];l(b)||(b=o[h]=new et({owner:e,primitiveType:s._primitiveType})),b.vertexArray=p,b.renderState=e._renderState,b.shaderProgram=e._sp,b.uniformMap=u,b.pass=Le.TERRAIN_CLASSIFICATION,b.pickId="czm_batchTable_pickColor(v_endPlaneNormalEcAndBatchId.w)";let f=et.shallowClone(b,b.derivedCommands.tileset);f.renderState=e._renderState3DTiles,f.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,b.derivedCommands.tileset=f;let y=et.shallowClone(b,b.derivedCommands.color2D);y.shaderProgram=e._sp2D,b.derivedCommands.color2D=y;let _=et.shallowClone(f,f.derivedCommands.color2D);_.shaderProgram=e._sp2D,f.derivedCommands.color2D=_;let S=et.shallowClone(b,b.derivedCommands.colorMorph);S.renderState=e._renderStateMorph,S.shaderProgram=e._spMorph,S.pickId="czm_batchTable_pickColor(v_batchId)",b.derivedCommands.colorMorph=S}}function Ule(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 dke(e,t,n,i,o,r,s){let a=e._primitive;Ln._updateBoundingVolumes(a,t,o);let c;t.mode===re.SCENE3D?c=a._boundingSphereWC:t.mode===re.COLUMBUS_VIEW?c=a._boundingSphereCV:t.mode===re.SCENE2D&&l(a._boundingSphere2D)?c=a._boundingSphere2D:l(a._boundingSphereMorph)&&(c=a._boundingSphereMorph);let d=t.mode===re.MORPHING,u=e.classificationType,h=u!==Jn.CESIUM_3D_TILE,p=u!==Jn.TERRAIN&&!d,b,f=t.passes;if(f.render||f.pick&&a.allowPicking){let y=n.length;for(let _=0;_<y;++_){let S=c[_];h&&(b=n[_],Ule(e,b,t,o,r,S,s)),p&&(b=n[_].derivedCommands.tileset,Ule(e,b,t,o,r,S,s))}}}J0.prototype.update=function(e){if(!l(this._primitive)&&!l(this.geometryInstances))return;if(!Ei.initialized){J0.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 Bc({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,value:[c.geometry.width]})),c.geometry._scene3DOnly=e.scene3DOnly,PT.setProjectionAndEllipsoid(c.geometry,e.mapProjection),s[t]=new Wt({geometry:c.geometry,attributes:a,id:c.id,pickPrimitive:n})}i.geometryInstances=s,i.appearance=this.appearance,i._createShaderProgramFunction=function(c,d,u){cke(n,d,u)},i._createCommandsFunction=function(c,d,u,h,p,b,f){lke(n,d,u,h,b,f)},i._updateAndQueueCommandsFunction=function(c,d,u,h,p,b,f,y){dke(n,d,u,h,p,b,f)},this._primitive=new Ln(i)}if(this.appearance instanceof Es&&!this._hasPerInstanceColors)throw new he("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))})};J0.prototype.getGeometryInstanceAttributes=function(e){return this._primitive.getGeometryInstanceAttributes(e)};J0.isSupported=function(e){return e.frameState.context.depthTexture};J0.prototype.isDestroyed=function(){return!1};J0.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,me(this)};var Ph=J0;var Kdn=x(T(),1);var kdn=x(T(),1);var Idn=x(T(),1);var uke=new M(1,1),mke=!1,hke=U.WHITE;function LZ(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(LZ.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")});LZ.prototype.getType=function(e){return"Image"};var fke=new Q;LZ.prototype.getValue=function(e,t){return l(e)||(e=Q.now(fke)),l(t)||(t={}),t.image=j.getValueOrUndefined(this._image,e),t.repeat=j.getValueOrClonedDefault(this._repeat,e,uke,t.repeat),t.color=j.getValueOrClonedDefault(this._color,e,hke,t.color),j.getValueOrDefault(this._transparent,e,mke)&&(t.color.alpha=Math.min(.99,t.color.alpha)),t};LZ.prototype.equals=function(e){return this===e||e instanceof LZ&&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 ly=LZ;function pke(e){if(e instanceof U)return new Bt(e);if(typeof e=="string"||e instanceof We||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement){let t=new ly;return t.image=e,t}}function bke(e,t){return ge(e,t,pke)}var Qo=bke;function nv(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(nv.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")});nv.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 nv(this)};nv.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=nv;var mun=x(T(),1);var jdn=x(T(),1),Dle={FIXED:0,INERTIAL:1};Object.freeze(Dle);var Xi=Dle;var oun=x(T(),1);function WZ(){he.throwInstantiationError()}Object.defineProperties(WZ.prototype,{isConstant:{get:he.throwInstantiationError},definitionChanged:{get:he.throwInstantiationError},referenceFrame:{get:he.throwInstantiationError}});WZ.prototype.getValue=he.throwInstantiationError;WZ.prototype.getValueInReferenceFrame=he.throwInstantiationError;WZ.prototype.equals=he.throwInstantiationError;var Ole=new q;WZ.convertToReferenceFrame=function(e,t,n,i,o){if(!l(t))return t;if(l(o)||(o=new m),n===i)return m.clone(t,o);let r=dt.computeIcrfToCentralBodyFixedMatrix(e,Ole);if(n===Xi.INERTIAL)return q.multiplyByVector(r,t,o);if(n===Xi.FIXED)return q.multiplyByVector(q.transpose(r,Ole),t,o)};var Xh=WZ;function MT(e,t){this._definitionChanged=new _e,this._value=m.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 gke=new Q;MT.prototype.getValue=function(e,t){return l(e)||(e=Q.now(gke)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};MT.prototype.setValue=function(e,t){let n=!1;m.equals(this._value,e)||(n=!0,this._value=m.clone(e)),l(t)&&this._referenceFrame!==t&&(n=!0,this._referenceFrame=t),n&&this._definitionChanged.raiseEvent(this)};MT.prototype.getValueInReferenceFrame=function(e,t,n){return Xh.convertToReferenceFrame(e,this._value,this._referenceFrame,t,n)};MT.prototype.equals=function(e){return this===e||e instanceof MT&&m.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame};var Wl=MT;var xun=x(T(),1);function iv(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(iv.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")});iv.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 iv(this)};iv.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=iv;var Sun=x(T(),1);function yke(e){return e}function xke(e,t){return ge(e,t,yke)}var vl=xke;var Gun=x(T(),1);function ov(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(ov.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")});ov.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 ov(this)};ov.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=ov;var Xun=x(T(),1);function rv(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(rv.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")});rv.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 rv(this)};rv.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=rv;var Dun=x(T(),1);function sv(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(sv.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")});sv.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 sv(this)};sv.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=sv;var Jun=x(T(),1);function av(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(av.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")});av.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 av(this)};av.prototype.merge=function(e){this.show=this.show??e.show,this.text=this.text??e.text,this.font=this.font??e.font,this.style=this.style??e.style,this.scale=this.scale??e.scale,this.showBackground=this.showBackground??e.showBackground,this.backgroundColor=this.backgroundColor??e.backgroundColor,this.backgroundPadding=this.backgroundPadding??e.backgroundPadding,this.pixelOffset=this.pixelOffset??e.pixelOffset,this.eyeOffset=this.eyeOffset??e.eyeOffset,this.horizontalOrigin=this.horizontalOrigin??e.horizontalOrigin,this.verticalOrigin=this.verticalOrigin??e.verticalOrigin,this.heightReference=this.heightReference??e.heightReference,this.fillColor=this.fillColor??e.fillColor,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.translucencyByDistance=this.translucencyByDistance??e.translucencyByDistance,this.pixelOffsetScaleByDistance=this.pixelOffsetScaleByDistance??e.pixelOffsetScaleByDistance,this.scaleByDistance=this.scaleByDistance??e.scaleByDistance,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.disableDepthTestDistance=this.disableDepthTestDistance??e.disableDepthTestDistance};var Nh=av;var Cmn=x(T(),1);var lmn=x(T(),1);var emn=x(T(),1);var Tke=new m(1,1,1),_ke=m.ZERO,Ske=Pe.IDENTITY;function Ble(e,t,n){this.translation=m.clone(e??_ke),this.rotation=Pe.clone(t??Ske),this.scale=m.clone(n??Tke)}Ble.prototype.equals=function(e){return this===e||l(e)&&m.equals(this.translation,e.translation)&&Pe.equals(this.rotation,e.rotation)&&m.equals(this.scale,e.scale)};var dy=Ble;var FJ=new dy;function cv(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(cv.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 Ake=new Q;cv.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Ake)),l(t)||(t=new dy),t.translation=j.getValueOrClonedDefault(this._translation,e,FJ.translation,t.translation),t.rotation=j.getValueOrClonedDefault(this._rotation,e,FJ.rotation,t.rotation),t.scale=j.getValueOrClonedDefault(this._scale,e,FJ.scale,t.scale),t};cv.prototype.equals=function(e){return this===e||e instanceof cv&&j.equals(this._translation,e._translation)&&j.equals(this._rotation,e._rotation)&&j.equals(this._scale,e._scale)};var BT=cv;var gmn=x(T(),1);function j0(e,t){this._propertyNames=[],this._definitionChanged=new _e,l(e)&&this.merge(e,t)}Object.defineProperties(j0.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}}});j0.prototype.hasProperty=function(e){return this._propertyNames.indexOf(e)!==-1};function Zke(e){return new ci(e)}j0.prototype.addProperty=function(e,t,n){this._propertyNames.push(e),Object.defineProperty(this,e,ge(e,!0,n??Zke)),l(t)&&(this[e]=t),this._definitionChanged.raiseEvent(this)};j0.prototype.removeProperty=function(e){let n=this._propertyNames.indexOf(e);this._propertyNames.splice(n,1),delete this[e],this._definitionChanged.raiseEvent(this)};var Cke=new Q;j0.prototype.getValue=function(e,t){l(e)||(e=Q.now(Cke)),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};j0.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 Vke(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}j0.prototype.equals=function(e){return this===e||e instanceof j0&&Vke(this,e)};var Fl=j0;function zle(e){return new BT(e)}function Rke(e){return new Fl(e,zle)}function Eke(e){return new Fl(e)}function Gke(e){return new Fl(e)}function lv(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(lv.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,Gke),lightColor:ge("lightColor"),distanceDisplayCondition:ge("distanceDisplayCondition"),nodeTransformations:ge("nodeTransformations",void 0,Rke),articulations:ge("articulations",void 0,Eke),clippingPlanes:ge("clippingPlanes"),customShader:ge("customShader")});lv.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 lv(this)};lv.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 Fl(t,zle)}let n=e.articulations;if(l(n)){let i=this.articulations;l(i)?i.merge(n):this.articulations=new Fl(n)}};var Q0=lv;var Wmn=x(T(),1);function dv(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(dv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),uri:ge("uri"),maximumScreenSpaceError:ge("maximumScreenSpaceError")});dv.prototype.clone=function(e){return l(e)?(e.show=this.show,e.uri=this.uri,e.maximumScreenSpaceError=this.maximumScreenSpaceError,e):new dv(this)};dv.prototype.merge=function(e){this.show=this.show??e.show,this.uri=this.uri??e.uri,this.maximumScreenSpaceError=this.maximumScreenSpaceError??e.maximumScreenSpaceError};var zT=dv;var Ymn=x(T(),1);function uv(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(uv.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")});uv.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 uv(this)};uv.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 q0=uv;var Bmn=x(T(),1);function mv(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(mv.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")});mv.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 mv(this)};mv.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 hv=mv;var Qmn=x(T(),1);function fv(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(fv.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")});fv.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 fv(this)};fv.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=fv;var lhn=x(T(),1);var ehn=x(T(),1);function Lke(e,t){this.positions=l(e)?e:[],this.holes=l(t)?t:[]}var Ac=Lke;function Wke(e){return Array.isArray(e)&&(e=new Ac(e)),new ci(e)}function pv(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(pv.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:ge("show"),hierarchy:ge("hierarchy",void 0,Wke),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")});pv.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 pv(this)};pv.prototype.merge=function(e){this.show=this.show??e.show,this.hierarchy=this.hierarchy??e.hierarchy,this.height=this.height??e.height,this.heightReference=this.heightReference??e.heightReference,this.extrudedHeight=this.extrudedHeight??e.extrudedHeight,this.extrudedHeightReference=this.extrudedHeightReference??e.extrudedHeightReference,this.stRotation=this.stRotation??e.stRotation,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.perPositionHeight=this.perPositionHeight??e.perPositionHeight,this.closeTop=this.closeTop??e.closeTop,this.closeBottom=this.closeBottom??e.closeBottom,this.arcType=this.arcType??e.arcType,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex,this.textureCoordinates=this.textureCoordinates??e.textureCoordinates};var Yh=pv;var bhn=x(T(),1);function bv(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(bv.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")});bv.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 bv(this)};bv.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 zc=bv;var Ahn=x(T(),1);function gv(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(gv.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")});gv.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 gv(this)};gv.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=gv;var Lhn=x(T(),1);function yv(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(yv.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")});yv.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 yv(this)};yv.prototype.merge=function(e){this.show=this.show??e.show,this.coordinates=this.coordinates??e.coordinates,this.height=this.height??e.height,this.heightReference=this.heightReference??e.heightReference,this.extrudedHeight=this.extrudedHeight??e.extrudedHeight,this.extrudedHeightReference=this.extrudedHeightReference??e.extrudedHeightReference,this.rotation=this.rotation??e.rotation,this.stRotation=this.stRotation??e.stRotation,this.granularity=this.granularity??e.granularity,this.fill=this.fill??e.fill,this.material=this.material??e.material,this.outline=this.outline??e.outline,this.outlineColor=this.outlineColor??e.outlineColor,this.outlineWidth=this.outlineWidth??e.outlineWidth,this.shadows=this.shadows??e.shadows,this.distanceDisplayCondition=this.distanceDisplayCondition??e.distanceDisplayCondition,this.classificationType=this.classificationType??e.classificationType,this.zIndex=this.zIndex??e.zIndex};var wh=yv;var Nhn=x(T(),1);function xv(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(xv.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")});xv.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 xv(this)};xv.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 $0=xv;var vke=new pe,IJ=[];function Fke(e){return new Wl(e)}function Ike(e){return ge(e,void 0,Fke)}function Ga(e,t){return ge(e,void 0,function(n){return n instanceof t?n:new t(n)})}function gm(e){e=e??B.EMPTY_OBJECT;let t=e.id;l(t)||(t=zn()),this._availability=void 0,this._id=t,this._definitionChanged=new _e,this._name=e.name,this._show=e.show??!0,this._trackingReferenceFrame=e.trackingReferenceFrame??B0.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",...IJ],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 PJ(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)&&PJ(r,r._children,n)}e._definitionChanged.raiseEvent(e,"isShowing",n,!n)}Object.defineProperties(gm.prototype,{availability:vl("availability"),id:{get:function(){return this._id}},definitionChanged:{get:function(){return this._definitionChanged}},name:vl("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&&PJ(this,this._children,n),this._definitionChanged.raiseEvent(this,"show",e,!e)}},trackingReferenceFrame:vl("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&&PJ(this,this._children,i),this._definitionChanged.raiseEvent(this,"parent",e,t)}},propertyNames:{get:function(){return this._propertyNames}},billboard:Ga("billboard",Oc),box:Ga("box",wT),corridor:Ga("corridor",kT),cylinder:Ga("cylinder",UT),description:ge("description"),ellipse:Ga("ellipse",DT),ellipsoid:Ga("ellipsoid",OT),label:Ga("label",Nh),model:Ga("model",Q0),tileset:Ga("tileset",zT),orientation:ge("orientation"),path:Ga("path",q0),plane:Ga("plane",hv),point:Ga("point",HT),polygon:Ga("polygon",Yh),polyline:Ga("polyline",zc),polylineVolume:Ga("polylineVolume",KT),properties:Ga("properties",Fl),position:Ike("position"),rectangle:Ga("rectangle",wh),viewFrom:ge("viewFrom"),wall:Ga("wall",$0)});gm.registerEntityType=function(e,t){Object.defineProperties(gm.prototype,{[e]:Ga(e,t)}),IJ.includes(e)||IJ.push(e)};gm.prototype.isAvailable=function(e){let t=this._availability;return!l(t)||t.contains(e)};gm.prototype.addProperty=function(e){this._propertyNames.push(e),Object.defineProperty(this,e,vl(e,!0))};gm.prototype.removeProperty=function(e){let n=this._propertyNames.indexOf(e);this._propertyNames.splice(n,1),delete this[e]};gm.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 Hle=new q,Kle=new m,Jle=new Pe;gm.prototype.computeModelMatrix=function(e,t){let n=j.getValueOrUndefined(this._position,e,Kle);if(!l(n))return;let i=j.getValueOrUndefined(this._orientation,e,Jle);return l(i)?t=F.fromRotationTranslation(q.fromQuaternion(i,Hle),n,t):t=dt.eastNorthUpToFixedFrame(n,void 0,t),t};gm.prototype.computeModelMatrixForHeightReference=function(e,t,n,i,o){let r=j.getValueOrDefault(t,e,tt.NONE),s=j.getValueOrUndefined(this._position,e,Kle);if(r===tt.NONE||!l(s)||m.equalsEpsilon(s,m.ZERO,W.EPSILON8))return this.computeModelMatrix(e,o);let a=i.cartesianToCartographic(s,vke);pm(r)?a.height=n:a.height+=n,s=i.cartographicToCartesian(a,s);let c=j.getValueOrUndefined(this._orientation,e,Jle);return l(c)?o=F.fromRotationTranslation(q.fromQuaternion(c,Hle),s,o):o=dt.eastNorthUpToFixedFrame(s,void 0,o),o};gm.supportsMaterialsforEntitiesOnTerrain=function(e){return El.supportsMaterials(e)};gm.supportsPolylinesOnTerrain=function(e){return Ph.isSupported(e)};var Oo=gm;var Pke=new Bt(U.WHITE),Xke=new ci(!0),Nke=new ci(!0),Yke=new ci(!1),wke=new ci(U.BLACK),Mke=new ci(Cn.DISABLED),kke=new ci(new Yt),Uke=new ci(Jn.BOTH);function Il(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=Oo.supportsMaterialsforEntitiesOnTerrain(e.scene)}Object.defineProperties(Il.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}}});Il.prototype.isOutlineVisible=function(e){let t=this._entity;return(this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e))??!1};Il.prototype.isFilled=function(e){let t=this._entity;return(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e))??!1};Il.prototype.createFillGeometryInstance=he.throwInstantiationError;Il.prototype.createOutlineGeometryInstance=he.throwInstantiationError;Il.prototype.isDestroyed=function(){return!1};Il.prototype.destroy=function(){me(this)};Il.prototype._isHidden=function(e,t){let n=t.show;return l(n)&&n.isConstant&&!n.getValue(Je.MINIMUM_VALUE)};Il.prototype._isOnTerrain=function(e,t){return!1};Il.prototype._getIsClosed=function(e){return!0};Il.prototype._isDynamic=he.throwInstantiationError;Il.prototype._setStaticOptions=he.throwInstantiationError;Il.prototype._onEntityPropertyChanged=function(e,t,n,i){if(this._observedPropertyNames.indexOf(t)===-1)return;let o=this._entity[this._geometryPropertyName];if(!l(o)){(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this));return}let r=o.fill,s=l(r)&&r.isConstant?r.getValue(Je.MINIMUM_VALUE):!0,a=o.outline,c=l(a);if(c&&a.isConstant&&(c=a.getValue(Je.MINIMUM_VALUE)),!s&&!c){(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this));return}let d=o.show;if(this._isHidden(e,o)){(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this));return}this._materialProperty=o.material??Pke,this._fillProperty=r??Nke,this._showProperty=d??Xke,this._showOutlineProperty=o.outline??Yke,this._outlineColorProperty=c?o.outlineColor??wke:void 0,this._shadowsProperty=o.shadows??Mke,this._distanceDisplayConditionProperty=o.distanceDisplayCondition??kke,this._classificationTypeProperty=o.classificationType??Uke,this._fillEnabled=s;let u=this._isOnTerrain(e,o)&&(this._supportsMaterialsforEntitiesOnTerrain||this._materialProperty instanceof Bt);if(c&&u&&(Tt(Tt.geometryOutlines),c=!1),this._onTerrain=u,this._outlineEnabled=c,this._isDynamic(e,o))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{this._setStaticOptions(e,o),this._isClosed=this._getIsClosed(this._options);let h=o.outlineWidth;this._outlineWidth=l(h)?h.getValue(Je.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}};Il.prototype.createDynamicUpdater=function(e,t){return new this.constructor.DynamicGeometryUpdater(this,e,t)};var Ti=Il;var apn=x(T(),1);var Dfn=x(T(),1);function vZ(e,t){this._callback=void 0,this._isConstant=void 0,this._definitionChanged=new _e,this.setCallback(e,t)}Object.defineProperties(vZ.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}}});var Dke=new Q;vZ.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Dke)),this._callback(e,t)};vZ.prototype.setCallback=function(e,t){let n=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,n&&this._definitionChanged.raiseEvent(this)};vZ.prototype.equals=function(e){return this===e||e instanceof vZ&&this._callback===e._callback&&this._isConstant===e._isConstant};var Mh=vZ;var tpn=x(T(),1);var jle=new m;function FZ(e,t,n,i){this._scene=e,this._heightReference=n,this._extrudedHeightReference=i,this._positionProperty=t,this._position=new m,this._cartographicPosition=new pe,this._normal=new m,this._definitionChanged=new _e,this._terrainHeight=0,this._removeCallbackFunc=void 0,this._removeEventListener=void 0,this._removeModeListener=void 0;let o=this;if(l(e.globe)&&(this._removeEventListener=e.terrainProviderChanged.addEventListener(function(){o._updateClamping()}),this._removeModeListener=e.morphComplete.addEventListener(function(){o._updateClamping()})),t.isConstant){let r=t.getValue(Je.MINIMUM_VALUE,jle);if(!l(r)||m.equals(r,m.ZERO)||!l(e.globe))return;this._position=m.clone(r,this._position),this._updateClamping(),this._normal=e.ellipsoid.geodeticSurfaceNormal(r,this._normal)}}Object.defineProperties(FZ.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}}});FZ.prototype._updateClamping=function(){l(this._removeCallbackFunc)&&this._removeCallbackFunc();let e=this._scene,t=this._position;if(m.equals(t,m.ZERO)){this._terrainHeight=0;return}let i=e.ellipsoid.cartesianToCartographic(t,this._cartographicPosition),o=e.getHeight(i,this._heightReference);l(o)?this._terrainHeight=o:this._terrainHeight=0;let r=s=>{this._terrainHeight=s.height,this.definitionChanged.raiseEvent()};this._removeCallbackFunc=e.updateHeight(i,r,this._heightReference)};var Oke=new Q;FZ.prototype.getValue=function(e,t){l(e)||(e=Q.now(Oke));let n=j.getValueOrDefault(this._heightReference,e,tt.NONE),i=j.getValueOrDefault(this._extrudedHeightReference,e,tt.NONE);if(n===tt.NONE&&!TZ(i))return this._position=m.clone(m.ZERO,this._position),m.clone(m.ZERO,t);if(this._positionProperty.isConstant)return m.multiplyByScalar(this._normal,this._terrainHeight,t);let o=this._scene,r=this._positionProperty.getValue(e,jle);if(!l(r)||m.equals(r,m.ZERO)||!l(o.globe))return m.clone(m.ZERO,t);if(m.equalsEpsilon(this._position,r,W.EPSILON10))return m.multiplyByScalar(this._normal,this._terrainHeight,t);this._position=m.clone(r,this._position),this._updateClamping();let s=o.ellipsoid.geodeticSurfaceNormal(r,this._normal);return m.multiplyByScalar(s,this._terrainHeight,t)};FZ.prototype.isDestroyed=function(){return!1};FZ.prototype.destroy=function(){return l(this._removeEventListener)&&this._removeEventListener(),l(this._removeModeListener)&&this._removeModeListener(),l(this._removeCallbackFunc)&&this._removeCallbackFunc(),me(this)};var JT=FZ;function Bke(e,t,n,i){if(Ti.prototype._onEntityPropertyChanged.call(this,e,t,n,i),this._observedPropertyNames.indexOf(t)===-1)return;let o=this._entity[this._geometryPropertyName];if(!l(o))return;l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);let r=o.heightReference;if(l(r)){let s=new Mh(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new JT(this._scene,s,r)}}var eb=Bke;var Qle=m.ZERO,qle=new m,zke=new m,$le=new U;function Hke(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function lu(e,t){Ti.call(this,{entity:e,scene:t,geometryOptions:new Hke(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}l(Object.create)&&(lu.prototype=Object.create(Ti.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 Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=Kn.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r,color:void 0,offset:void 0};if(this._materialProperty instanceof Bt){let a;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,$le)),l(a)||(a=U.WHITE),s.color=Ht.fromColor(a)}return l(this._options.offsetAttribute)&&(s.offset=fo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,Qle,qle))),new Wt({id:t,geometry:xc.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.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,$le),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=fo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,Qle,qle))),new Wt({id:t,geometry:Ih.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,this._options.dimensions.z*.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(t.dimensions)||!l(e.position)||Ti.prototype._isHidden.call(this,e,t)};lu.prototype._isDynamic=function(e,t){return!e.position.isConstant||!j.isConstant(e.orientation)||!t.dimensions.isConstant||!j.isConstant(t.outlineWidth)};lu.prototype._setStaticOptions=function(e,t){let n=j.getValueOrDefault(t.heightReference,Je.MINIMUM_VALUE,tt.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Bt?hn.VERTEX_FORMAT:po.MaterialSupport.TEXTURED.vertexFormat,i.dimensions=t.dimensions.getValue(Je.MINIMUM_VALUE,i.dimensions),i.offsetAttribute=n!==tt.NONE?dn.ALL:void 0};lu.prototype._onEntityPropertyChanged=eb;lu.DynamicGeometryUpdater=IZ;function IZ(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(IZ.prototype=Object.create(xi.prototype),IZ.prototype.constructor=IZ);IZ.prototype._isHidden=function(e,t,n){let i=j.getValueOrUndefined(e.position,n,zke),o=this._options.dimensions;return!l(i)||!l(o)||xi.prototype._isHidden.call(this,e,t,n)};IZ.prototype._setOptions=function(e,t,n){let i=j.getValueOrDefault(t.heightReference,n,tt.NONE),o=this._options;o.dimensions=j.getValueOrUndefined(t.dimensions,n,o.dimensions),o.offsetAttribute=i!==tt.NONE?dn.ALL:void 0};var Tv=lu;var Xpn=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 Kke=new Q;jT.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Kke)),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 Xh.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 _v=jT;var Ffi=x(T(),1);var Sfi=x(T(),1);var Upn=x(T(),1);var Ypn=x(T(),1);/*! @license DOMPurify 3.4.2 | (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.2/LICENSE */var{entries:mde,setPrototypeOf:ede,isFrozen:Jke,getPrototypeOf:jke,getOwnPropertyDescriptor:Qke}=Object,{freeze:Xl,seal:ym,create:XZ}=Object,{apply:kJ,construct:UJ}=typeof Reflect<"u"&&Reflect;Xl||(Xl=function(t){return t});ym||(ym=function(t){return t});kJ||(kJ=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)});UJ||(UJ=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 Sv=aa(Array.prototype.forEach),qke=aa(Array.prototype.lastIndexOf),tde=aa(Array.prototype.pop),Av=aa(Array.prototype.push),$ke=aa(Array.prototype.splice),Pl=Array.isArray,Vv=aa(String.prototype.toLowerCase),XJ=aa(String.prototype.toString),nde=aa(String.prototype.match),PZ=aa(String.prototype.replace),ide=aa(String.prototype.indexOf),eUe=aa(String.prototype.trim),tUe=aa(Number.prototype.toString),nUe=aa(Boolean.prototype.toString),ode=typeof BigInt>"u"?null:aa(BigInt.prototype.toString),rde=typeof Symbol>"u"?null:aa(Symbol.prototype.toString),Gs=aa(Object.prototype.hasOwnProperty),Zv=aa(Object.prototype.toString),Zc=aa(RegExp.prototype.test),T5=iUe(TypeError);function aa(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 kJ(e,t,i)}}function iUe(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return UJ(e,n)}}function Gi(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vv;if(ede&&ede(e,null),!Pl(t))return e;let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){let r=n(o);r!==o&&(Jke(t)||(t[i]=r),o=r)}e[o]=!0}return e}function oUe(e){for(let t=0;t<e.length;t++)Gs(e,t)||(e[t]=null);return e}function Ad(e){let t=XZ(null);for(let[n,i]of mde(e))Gs(e,n)&&(Pl(i)?t[n]=oUe(i):i&&typeof i=="object"&&i.constructor===Object?t[n]=Ad(i):t[n]=i);return t}function rUe(e){switch(typeof e){case"string":return e;case"number":return tUe(e);case"boolean":return nUe(e);case"bigint":return ode?ode(e):"0";case"symbol":return rde?rde(e):"Symbol()";case"undefined":return Zv(e);case"function":case"object":{if(e===null)return Zv(e);let t=e,n=NZ(t,"toString");if(typeof n=="function"){let i=n(t);return typeof i=="string"?i:Zv(i)}return Zv(e)}default:return Zv(e)}}function NZ(e,t){for(;e!==null;){let i=Qke(e,t);if(i){if(i.get)return aa(i.get);if(typeof i.value=="function")return aa(i.value)}e=jke(e)}function n(){return null}return n}function sUe(e){try{return Zc(e,""),!0}catch{return!1}}var sde=Xl(["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"]),NJ=Xl(["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"]),YJ=Xl(["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"]),aUe=Xl(["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"]),wJ=Xl(["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"]),cUe=Xl(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ade=Xl(["#text"]),cde=Xl(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),MJ=Xl(["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"]),lde=Xl(["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"]),_5=Xl(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),lUe=ym(/\{\{[\w\W]*|[\w\W]*\}\}/gm),dUe=ym(/<%[\w\W]*|[\w\W]*%>/gm),uUe=ym(/\$\{[\w\W]*/gm),mUe=ym(/^data-[\-\w.\u00B7-\uFFFF]+$/),hUe=ym(/^aria-[\-\w]+$/),hde=ym(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fUe=ym(/^(?:\w+script|data):/i),pUe=ym(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fde=ym(/^html$/i),bUe=ym(/^[a-z][.\w]*(-[.\w]+)+$/i),dde=Object.freeze({__proto__:null,ARIA_ATTR:hUe,ATTR_WHITESPACE:pUe,CUSTOM_ELEMENT:bUe,DATA_ATTR:mUe,DOCTYPE_NAME:fde,ERB_EXPR:dUe,IS_ALLOWED_URI:hde,IS_SCRIPT_OR_DATA:fUe,MUSTACHE_EXPR:lUe,TMPLIT_EXPR:uUe}),Cv={element:1,text:3,progressingInstruction:7,comment:8,document:9},gUe=function(){return typeof window>"u"?null:window},yUe=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}},ude=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function pde(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gUe(),t=vn=>pde(vn);if(t.version="3.4.2",t.removed=[],!e||!e.document||e.document.nodeType!==Cv.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,i=n,o=i.currentScript,{DocumentFragment:r,HTMLTemplateElement:s,Node:a,Element:c,NodeFilter:d,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:b}=e,f=c.prototype,y=NZ(f,"cloneNode"),_=NZ(f,"remove"),S=NZ(f,"nextSibling"),A=NZ(f,"childNodes"),Z=NZ(f,"parentNode");if(typeof s=="function"){let vn=n.createElement("template");vn.content&&vn.content.ownerDocument&&(n=vn.content.ownerDocument)}let V,E="",{implementation:L,createNodeIterator:v,createDocumentFragment:I,getElementsByTagName:X}=n,{importNode:N}=i,g=ude();t.isSupported=typeof mde=="function"&&typeof Z=="function"&&L&&L.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:C,ERB_EXPR:R,TMPLIT_EXPR:G,DATA_ATTR:P,ARIA_ATTR:Y,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:k,CUSTOM_ELEMENT:D}=dde,{IS_ALLOWED_URI:w}=dde,z=null,J=Gi({},[...sde,...NJ,...YJ,...wJ,...ade]),ee=null,H=Gi({},[...cde,...MJ,...lde,..._5]),te=Object.seal(XZ(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$=null,be=null,ye=Object.seal(XZ(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ce=!0,Ze=!0,xe=!1,Ge=!0,Ve=!1,Ye=!0,ke=!1,it=!1,pt=!1,Vt=!1,Ue=!1,St=!1,ht=!0,ot=!1,Jt="user-content-",jt=!0,yt=!1,Gt={},ln=null,st=Gi({},["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"]),Nn=null,Zi=Gi({},["audio","video","img","source","image","track"]),Ci=null,Dt=Gi({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ro="http://www.w3.org/1998/Math/MathML",ki="http://www.w3.org/2000/svg",ri="http://www.w3.org/1999/xhtml",kn=ri,Yn=!1,Ui=null,Vi=Gi({},[Ro,ki,ri],XJ),ir=Gi({},["mi","mo","mn","ms","mtext"]),wr=Gi({},["annotation-xml"]),Ss=Gi({},["title","style","font","a","script"]),Vr=null,wn=["application/xhtml+xml","text/html"],uo="text/html",An=null,Uo=null,Eo=n.createElement("form"),na=function(Ee){return Ee instanceof RegExp||Ee instanceof Function},Wi=function(){let Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Uo&&Uo===Ee)return;(!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OLE_DOCUMENT||!1,Vt=Ee.RETURN_DOM||!1,Ue=Ee.RETURN_DOM_FRAGMENT||!1,St=Ee.RETURN_TRUSTED_TYPE||!1,pt=Ee.FORCE_BODY||!1,ht=Ee.SANITIZE_DOM!==!1,ot=Ee.SANITIZE_NAMED_PROPS||!1,jt=Ee.KEEP_CONTENT!==!1,yt=Ee.IN_PLACE||!1,w=sUe(Ee.ALLOWED_URI_REGEXP)?Ee.ALLOWED_URI_REGEXP:hde,kn=typeof Ee.NAMESPACE=="string"?Ee.NAMESPACE:ri,ir=Gs(Ee,"MATHML_TEXT_INTEGRATION_POINTS")&&Ee.MATHML_TEXT_INTEGRATION_POINTS&&typeof Ee.MATHML_TEXT_INTEGRATION_POINTS=="object"?Ad(Ee.MATHML_TEXT_INTEGRATION_POINTS):Gi({},["mi","mo","mn","ms","mtext"]),wr=Gs(Ee,"HTML_INTEGRATION_POINTS")&&Ee.HTML_INTEGRATION_POINTS&&typeof Ee.HTML_INTEGRATION_POINTS=="object"?Ad(Ee.HTML_INTEGRATION_POINTS):Gi({},["annotation-xml"]);let at=Gs(Ee,"CUSTOM_ELEMENT_HANDLING")&&Ee.CUSTOM_ELEMENT_HANDLING&&typeof Ee.CUSTOM_ELEMENT_HANDLING=="object"?Ad(Ee.CUSTOM_ELEMENT_HANDLING):XZ(null);if(te=XZ(null),Gs(at,"tagNameCheck")&&na(at.tagNameCheck)&&(te.tagNameCheck=at.tagNameCheck),Gs(at,"attributeNameCheck")&&na(at.attributeNameCheck)&&(te.attributeNameCheck=at.attributeNameCheck),Gs(at,"allowCustomizedBuiltInElements")&&typeof at.allowCustomizedBuiltInElements=="boolean"&&(te.allowCustomizedBuiltInElements=at.allowCustomizedBuiltInElements),Ve&&(Ze=!1),Ue&&(Vt=!0),Gt&&(z=Gi({},ade),ee=XZ(null),Gt.html===!0&&(Gi(z,sde),Gi(ee,cde)),Gt.svg===!0&&(Gi(z,NJ),Gi(ee,MJ),Gi(ee,_5)),Gt.svgFilters===!0&&(Gi(z,YJ),Gi(ee,MJ),Gi(ee,_5)),Gt.mathMl===!0&&(Gi(z,wJ),Gi(ee,lde),Gi(ee,_5))),ye.tagCheck=null,ye.attributeCheck=null,Gs(Ee,"ADD_TAGS")&&(typeof Ee.ADD_TAGS=="function"?ye.tagCheck=Ee.ADD_TAGS:Pl(Ee.ADD_TAGS)&&(z===J&&(z=Ad(z)),Gi(z,Ee.ADD_TAGS,An))),Gs(Ee,"ADD_ATTR")&&(typeof Ee.ADD_ATTR=="function"?ye.attributeCheck=Ee.ADD_ATTR:Pl(Ee.ADD_ATTR)&&(ee===H&&(ee=Ad(ee)),Gi(ee,Ee.ADD_ATTR,An))),Gs(Ee,"ADD_URI_SAFE_ATTR")&&Pl(Ee.ADD_URI_SAFE_ATTR)&&Gi(Ci,Ee.ADD_URI_SAFE_ATTR,An),Gs(Ee,"FORBID_CONTENTS")&&Pl(Ee.FORBID_CONTENTS)&&(ln===st&&(ln=Ad(ln)),Gi(ln,Ee.FORBID_CONTENTS,An)),Gs(Ee,"ADD_FORBID_CONTENTS")&&Pl(Ee.ADD_FORBID_CONTENTS)&&(ln===st&&(ln=Ad(ln)),Gi(ln,Ee.ADD_FORBID_CONTENTS,An)),jt&&(z["#text"]=!0),ke&&Gi(z,["html","head","body"]),z.table&&(Gi(z,["tbody"]),delete $.tbody),Ee.TRUSTED_TYPES_POLICY){if(typeof Ee.TRUSTED_TYPES_POLICY.createHTML!="function")throw T5('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ee.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw T5('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');V=Ee.TRUSTED_TYPES_POLICY,E=V.createHTML("")}else V===void 0&&(V=yUe(b,o)),V!==null&&typeof E=="string"&&(E=V.createHTML(""));Xl&&Xl(Ee),Uo=Ee},Go=Gi({},[...NJ,...YJ,...aUe]),gc=Gi({},[...wJ,...cUe]),ws=function(Ee){let at=Z(Ee);(!at||!at.tagName)&&(at={namespaceURI:kn,tagName:"template"});let fn=Vv(Ee.tagName),Jo=Vv(at.tagName);return Ui[Ee.namespaceURI]?Ee.namespaceURI===ki?at.namespaceURI===ri?fn==="svg":at.namespaceURI===Ro?fn==="svg"&&(Jo==="annotation-xml"||ir[Jo]):!!Go[fn]:Ee.namespaceURI===Ro?at.namespaceURI===ri?fn==="math":at.namespaceURI===ki?fn==="math"&&wr[Jo]:!!gc[fn]:Ee.namespaceURI===ri?at.namespaceURI===ki&&!wr[Jo]||at.namespaceURI===Ro&&!ir[Jo]?!1:!gc[fn]&&(Ss[fn]||!Go[fn]):!!(Vr==="application/xhtml+xml"&&Ui[Ee.namespaceURI]):!1},As=function(Ee){Av(t.removed,{element:Ee});try{Z(Ee).removeChild(Ee)}catch{_(Ee)}},es=function(Ee,at){try{Av(t.removed,{attribute:at.getAttributeNode(Ee),from:at})}catch{Av(t.removed,{attribute:null,from:at})}if(at.removeAttribute(Ee),Ee==="is")if(Vt||Ue)try{As(at)}catch{}else try{at.setAttribute(Ee,"")}catch{}},C0=function(Ee){let at=null,fn=null;if(pt)Ee="<remove></remove>"+Ee;else{let Cs=nde(Ee,/^[\r\n\t ]+/);fn=Cs&&Cs[0]}Vr==="application/xhtml+xml"&&kn===ri&&(Ee='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Ee+"</body></html>");let Jo=V?V.createHTML(Ee):Ee;if(kn===ri)try{at=new p().parseFromString(Jo,Vr)}catch{}if(!at||!at.documentElement){at=L.createDocument(kn,"template",null);try{at.documentElement.innerHTML=Yn?E:Jo}catch{}}let za=at.body||at.documentElement;return Ee&&fn&&za.insertBefore(n.createTextNode(fn),za.childNodes[0]||null),kn===ri?X.call(at,ke?"html":"body")[0]:ke?at.documentElement:za},Za=function(Ee){return v.call(Ee.ownerDocument||Ee,Ee,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Zs=function(Ee){return Ee instanceof h&&(typeof Ee.nodeName!="string"||typeof Ee.textContent!="string"||typeof Ee.removeChild!="function"||!(Ee.attributes instanceof u)||typeof Ee.removeAttribute!="function"||typeof Ee.setAttribute!="function"||typeof Ee.namespaceURI!="string"||typeof Ee.insertBefore!="function"||typeof Ee.hasChildNodes!="function")},nm=function(Ee){return typeof a=="function"&&Ee instanceof a};function Lo(vn,Ee,at){Sv(vn,fn=>{fn.call(t,Ee,at,Uo)})}let Ic=function(Ee){let at=null;if(Lo(g.beforeSanitizeElements,Ee,null),Zs(Ee))return As(Ee),!0;let fn=An(Ee.nodeName);if(Lo(g.uponSanitizeElement,Ee,{tagName:fn,allowedTags:z}),Ye&&Ee.hasChildNodes()&&!nm(Ee.firstElementChild)&&Zc(/<[/\w!]/g,Ee.innerHTML)&&Zc(/<[/\w!]/g,Ee.textContent)||Ye&&Ee.namespaceURI===ri&&fn==="style"&&nm(Ee.firstElementChild)||Ee.nodeType===Cv.progressingInstruction||Ye&&Ee.nodeType===Cv.comment&&Zc(/<[/\w]/g,Ee.data))return As(Ee),!0;if($[fn]||!(ye.tagCheck instanceof Function&&ye.tagCheck(fn))&&!z[fn]){if(!$[fn]&&Xo(fn)&&(te.tagNameCheck instanceof RegExp&&Zc(te.tagNameCheck,fn)||te.tagNameCheck instanceof Function&&te.tagNameCheck(fn)))return!1;if(jt&&!ln[fn]){let Jo=Z(Ee)||Ee.parentNode,za=A(Ee)||Ee.childNodes;if(za&&Jo){let Cs=za.length;for(let Pc=Cs-1;Pc>=0;--Pc){let Xc=y(za[Pc],!0);Jo.insertBefore(Xc,S(Ee))}}}return As(Ee),!0}return Ee instanceof c&&!ws(Ee)||(fn==="noscript"||fn==="noembed"||fn==="noframes")&&Zc(/<\/no(script|embed|frames)/i,Ee.innerHTML)?(As(Ee),!0):(Ve&&Ee.nodeType===Cv.text&&(at=Ee.textContent,Sv([C,R,G],Jo=>{at=PZ(at,Jo," ")}),Ee.textContent!==at&&(Av(t.removed,{element:Ee.cloneNode()}),Ee.textContent=at)),Lo(g.afterSanitizeElements,Ee,null),!1)},ud=function(Ee,at,fn){if(be[at]||ht&&(at==="id"||at==="name")&&(fn in n||fn in Eo))return!1;let Jo=ee[at]||ye.attributeCheck instanceof Function&&ye.attributeCheck(at,Ee);if(!(Ze&&!be[at]&&Zc(P,at))){if(!(ce&&Zc(Y,at))){if(!Jo||be[at]){if(!(Xo(Ee)&&(te.tagNameCheck instanceof RegExp&&Zc(te.tagNameCheck,Ee)||te.tagNameCheck instanceof Function&&te.tagNameCheck(Ee))&&(te.attributeNameCheck instanceof RegExp&&Zc(te.attributeNameCheck,at)||te.attributeNameCheck instanceof Function&&te.attributeNameCheck(at,Ee))||at==="is"&&te.allowCustomizedBuiltInElements&&(te.tagNameCheck instanceof RegExp&&Zc(te.tagNameCheck,fn)||te.tagNameCheck instanceof Function&&te.tagNameCheck(fn))))return!1}else if(!Ci[at]){if(!Zc(w,PZ(fn,k,""))){if(!((at==="src"||at==="xlink:href"||at==="href")&&Ee!=="script"&&ide(fn,"data:")===0&&Nn[Ee])){if(!(xe&&!Zc(O,PZ(fn,k,"")))){if(fn)return!1}}}}}}return!0},$d=Gi({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Xo=function(Ee){return!$d[Vv(Ee)]&&Zc(D,Ee)},md=function(Ee){Lo(g.beforeSanitizeAttributes,Ee,null);let{attributes:at}=Ee;if(!at||Zs(Ee))return;let fn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ee,forceKeepAttr:void 0},Jo=at.length;for(;Jo--;){let za=at[Jo],{name:Cs,namespaceURI:Pc,value:Xc}=za,hd=An(Cs),iT=Xc,ia=Cs==="value"?iT:eUe(iT);if(fn.attrName=hd,fn.attrValue=ia,fn.keepAttr=!0,fn.forceKeepAttr=void 0,Lo(g.uponSanitizeAttribute,Ee,fn),ia=fn.attrValue,ot&&(hd==="id"||hd==="name")&&ide(ia,Jt)!==0&&(es(Cs,Ee),ia=Jt+ia),Ye&&Zc(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ia)){es(Cs,Ee);continue}if(hd==="attributename"&&nde(ia,"href")){es(Cs,Ee);continue}if(fn.forceKeepAttr)continue;if(!fn.keepAttr){es(Cs,Ee);continue}if(!Ge&&Zc(/\/>/i,ia)){es(Cs,Ee);continue}Ve&&Sv([C,R,G],JA=>{ia=PZ(ia,JA," ")});let Z1=An(Ee.nodeName);if(!ud(Z1,hd,ia)){es(Cs,Ee);continue}if(V&&typeof b=="object"&&typeof b.getAttributeType=="function"&&!Pc)switch(b.getAttributeType(Z1,hd)){case"TrustedHTML":{ia=V.createHTML(ia);break}case"TrustedScriptURL":{ia=V.createScriptURL(ia);break}}if(ia!==iT)try{Pc?Ee.setAttributeNS(Pc,Cs,ia):Ee.setAttribute(Cs,ia),Zs(Ee)?As(Ee):tde(t.removed)}catch{es(Cs,Ee)}}Lo(g.afterSanitizeAttributes,Ee,null)},kg=function(Ee){let at=null,fn=Za(Ee);for(Lo(g.beforeSanitizeShadowDOM,Ee,null);at=fn.nextNode();)Lo(g.uponSanitizeShadowNode,at,null),Ic(at),md(at),at.content instanceof r&&kg(at.content);Lo(g.afterSanitizeShadowDOM,Ee,null)};return t.sanitize=function(vn){let Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},at=null,fn=null,Jo=null,za=null;if(Yn=!vn,Yn&&(vn="<!-->"),typeof vn!="string"&&!nm(vn)&&(vn=rUe(vn),typeof vn!="string"))throw T5("dirty is not a string, aborting");if(!t.isSupported)return vn;if(it||Wi(Ee),t.removed=[],typeof vn=="string"&&(yt=!1),yt){let Xc=vn.nodeName;if(typeof Xc=="string"){let hd=An(Xc);if(!z[hd]||$[hd])throw T5("root node is forbidden and cannot be sanitized in-place")}}else if(vn instanceof a)at=C0("<!---->"),fn=at.ownerDocument.importNode(vn,!0),fn.nodeType===Cv.element&&fn.nodeName==="BODY"||fn.nodeName==="HTML"?at=fn:at.appendChild(fn);else{if(!Vt&&!Ve&&!ke&&vn.indexOf("<")===-1)return V&&St?V.createHTML(vn):vn;if(at=C0(vn),!at)return Vt?null:St?E:""}at&&pt&&As(at.firstChild);let Cs=Za(yt?vn:at);for(;Jo=Cs.nextNode();)Ic(Jo),md(Jo),Jo.content instanceof r&&kg(Jo.content);if(yt)return vn;if(Vt){if(Ve){at.normalize();let Xc=at.innerHTML;Sv([C,R,G],hd=>{Xc=PZ(Xc,hd," ")}),at.innerHTML=Xc}if(Ue)for(za=I.call(at.ownerDocument);at.firstChild;)za.appendChild(at.firstChild);else za=at;return(ee.shadowroot||ee.shadowrootmode)&&(za=N.call(i,za,!0)),za}let Pc=ke?at.outerHTML:at.innerHTML;return ke&&z["!doctype"]&&at.ownerDocument&&at.ownerDocument.doctype&&at.ownerDocument.doctype.name&&Zc(fde,at.ownerDocument.doctype.name)&&(Pc="<!DOCTYPE "+at.ownerDocument.doctype.name+`>
`+Pc),Ve&&Sv([C,R,G],Xc=>{Pc=PZ(Pc,Xc," ")}),V&&St?V.createHTML(Pc):Pc},t.setConfig=function(){let vn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Wi(vn),it=!0},t.clearConfig=function(){Uo=null,it=!1},t.isValidAttribute=function(vn,Ee,at){Uo||Wi({});let fn=An(vn),Jo=An(Ee);return ud(fn,Jo,at)},t.addHook=function(vn,Ee){typeof Ee=="function"&&Av(g[vn],Ee)},t.removeHook=function(vn,Ee){if(Ee!==void 0){let at=qke(g[vn],Ee);return at===-1?void 0:$ke(g[vn],at,1)[0]}return tde(g[vn])},t.removeHooks=function(vn){g[vn]=[]},t.removeAllHooks=function(){g=ude()},t}var bde=pde();var xUe=0,DJ={},OJ=class e{constructor(t,n){let i,o=t;l(DJ[o])?i=DJ[o]:(i=xUe++,DJ[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=bde.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)}},bt=OJ;var Bpn=x(T(),1);function TUe(e,t){Tt(e,t)}var La=TUe;var l0n=x(T(),1);var n0n=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 BJ(e){e._cubeMapBuffers=void 0}QT.prototype.update=function(e){let{context:t}=e;if(!QT.isSupported(t))return;if(l(this._texture)){BJ(this);return}if(!l(this._texture)&&!this._loading){let u=t.textureCache.getTexture(this._url);l(u)&&(BJ(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(h){u._cubeMapBuffers=h,u._loading=!1}).catch(function(h){u.isDestroyed()||u._errorEvent.raiseEvent(h)}),this._loading=!0}if(!l(this._cubeMapBuffers))return;let{pixelDatatype:i}=n[0].positiveX;l(i)||(i=t.halfFloatingPointTexture?Oe.HALF_FLOAT:Oe.FLOAT);let o=Ke.RGBA,r=n.length;this._maximumMipmapLevel=r-1;let s=n[0].positiveX.width,a=Math.log2(s)+1;if(r!==a){let u={};Object.values(Br.FaceName).forEach(h=>{u[h]=void 0});for(let h=r;h<a;h++)n.push(u)}let c=new Ut({minificationFilter:kt.LINEAR_MIPMAP_LINEAR}),d=new Br({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 BJ(this),this._texture=this._texture&&this._texture.destroy(),me(this)};var kh=QT;function Rv(e){e=e??B.EMPTY_OBJECT;let t=l(e.imageBasedLightingFactor)?M.clone(e.imageBasedLightingFactor):new M(1,1);this._imageBasedLightingFactor=t;let n=e.sphericalHarmonicCoefficients;this._sphericalHarmonicCoefficients=n,this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentCubeMap=void 0,this._specularEnvironmentCubeMapDirty=!0,this._specularEnvironmentMapLoaded=!1,this._previousSpecularEnvironmentMapLoaded=!1,this._useDefaultSpecularMaps=!1,this._useDefaultSphericalHarmonics=!1,this._shouldRegenerateShaders=!1,this._previousFrameNumber=void 0,this._previousFrameContext=void 0,this._previousImageBasedLightingFactor=M.clone(t),this._previousSphericalHarmonicCoefficients=n,this._removeErrorListener=void 0}Object.defineProperties(Rv.prototype,{imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){this._previousImageBasedLightingFactor=M.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor),this._imageBasedLightingFactor=M.clone(e,this._imageBasedLightingFactor)}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients},set:function(e){this._previousSphericalHarmonicCoefficients=this._sphericalHarmonicCoefficients,this._sphericalHarmonicCoefficients=e}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps},set:function(e){e!==this._specularEnvironmentMaps&&(this._specularEnvironmentCubeMapDirty=this._specularEnvironmentCubeMapDirty||e!==this._specularEnvironmentMaps,this._specularEnvironmentMapLoaded=!1),this._specularEnvironmentMaps=e}},enabled:{get:function(){return this._imageBasedLightingFactor.x>0||this._imageBasedLightingFactor.y>0}},shouldRegenerateShaders:{get:function(){return this._shouldRegenerateShaders}},specularEnvironmentCubeMap:{get:function(){return this._specularEnvironmentCubeMap}},useDefaultSphericalHarmonics:{get:function(){return this._useDefaultSphericalHarmonics}},useDefaultSpecularMaps:{get:function(){return this._useDefaultSpecularMaps}},useSpecularEnvironmentMaps:{get:function(){return l(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.ready||this._useDefaultSpecularMaps}}});function _Ue(e,t){if(kh.isSupported(t)){if(e._specularEnvironmentCubeMap=e._specularEnvironmentCubeMap&&e._specularEnvironmentCubeMap.destroy(),l(e._specularEnvironmentMaps)){let n=new kh(e._specularEnvironmentMaps);e._specularEnvironmentCubeMap=n,e._removeErrorListener=n.errorEvent.addEventListener(i=>{console.error(`Error loading specularEnvironmentMaps: ${i}`)})}e._shouldRegenerateShaders=!0}}Rv.prototype.update=function(e){if(e.frameNumber===this._previousFrameNumber&&e.context===this._previousFrameContext)return;this._previousFrameNumber=e.frameNumber;let t=this._previousFrameContext=e.context;e.brdfLutGenerator.update(e),this._shouldRegenerateShaders=!1;let n=this._imageBasedLightingFactor,i=this._previousImageBasedLightingFactor;M.equals(n,i)||(this._shouldRegenerateShaders=n.x>0&&i.x===0||n.x===0&&i.x>0,this._shouldRegenerateShaders=this._shouldRegenerateShaders||n.y>0&&i.y===0||n.y===0&&i.y>0,this._previousImageBasedLightingFactor=M.clone(this._imageBasedLightingFactor,this._previousImageBasedLightingFactor)),this._previousSphericalHarmonicCoefficients!==this._sphericalHarmonicCoefficients&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||l(this._previousSphericalHarmonicCoefficients)!==l(this._sphericalHarmonicCoefficients),this._previousSphericalHarmonicCoefficients=this._sphericalHarmonicCoefficients),this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._previousSpecularEnvironmentMapLoaded!==this._specularEnvironmentMapLoaded,this._previousSpecularEnvironmentMapLoaded=this._specularEnvironmentMapLoaded,this._specularEnvironmentCubeMapDirty&&(_Ue(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)};Rv.prototype.isDestroyed=function(){return!1};Rv.prototype.destroy=function(){return this._specularEnvironmentCubeMap=this._specularEnvironmentCubeMap&&this._specularEnvironmentCubeMap.destroy(),this._removeErrorListener=this._removeErrorListener&&this._removeErrorListener(),me(this)};var qT=Rv;var S0n=x(T(),1),HJ=x(tu(),1);var f0n=x(T(),1);var zJ,gde="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmODUzYTQzYi1jMWM2LTQ2MTEtYWE4OS0wYzIwNTkyNjk1NDMiLCJpZCI6MjU5LCJpYXQiOjE3NzcwOTU1MzF9.pWL_6uenO0yB3nCXJNs8wWT9mic_UBo_d1CYDpwaXdQ",S5={};S5.defaultAccessToken=gde;S5.defaultServer=new We({url:"https://api.cesium.com/"});S5.getDefaultTokenCredit=function(e){if(e===gde){if(!l(zJ)){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>`;zJ=new bt(t,!0)}return zJ}};var Uh=S5;function Nl(e,t){let n,i=e.externalType,o=l(i);if(!o)n={url:e.url,retryAttempts:1,retryCallback:SUe};else if(i==="3DTILES"||i==="STK_TERRAIN_SERVER")n={url:e.options.url};else throw new le("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");We.call(this,n),this._ionEndpoint=e,this._ionEndpointDomain=o?void 0:new HJ.default(e.url).authority(),this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=o,this.refreshCallback=void 0}l(Object.create)&&(Nl.prototype=Object.create(We.prototype),Nl.prototype.constructor=Nl);Nl.fromAssetId=function(e,t){let n=Nl._createEndpointResource(e,t);return n.fetchJson().then(function(i){return new Nl(i,n)})};Object.defineProperties(Nl.prototype,{credits:{get:function(){return l(this._ionRoot)?this._ionRoot.credits:l(this._credits)?this._credits:(this._credits=Nl.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource),this._credits)}}});Nl.getCreditsFromEndpoint=function(e,t){let n=e.attributions.map(bt.getIonCredit),i=Uh.getDefaultTokenCredit(t.queryParameters.access_token);return l(i)&&n.push(bt.clone(i)),n};Nl.prototype.clone=function(e){let t=this._ionRoot??this;return l(e)||(e=new Nl(t._ionEndpoint,t._ionEndpointResource)),e=We.prototype.clone.call(this,e),e._ionRoot=t,e._isExternal=this._isExternal,e};Nl.prototype.fetchImage=function(e){if(!this._isExternal){let t=e;e={preferBlob:!0},l(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return We.prototype.fetchImage.call(this,e)};Nl.prototype._makeRequest=function(e){return this._isExternal||new HJ.default(this.url).authority()!==this._ionEndpointDomain?We.prototype._makeRequest.call(this,e):(e.headers=yde(e.headers),e.headers.Authorization=`Bearer ${this._ionEndpoint.accessToken}`,We.prototype._makeRequest.call(this,e))};Nl._createEndpointResource=function(e,t){t=t??B.EMPTY_OBJECT;let n=t.server??Uh.defaultServer,i=t.accessToken??Uh.defaultAccessToken;n=We.createIfNeeded(n);let o={url:`v1/assets/${e}/endpoint`};return l(i)&&(o.queryParameters={access_token:i}),l(t.queryParameters)&&(o.queryParameters={...o.queryParameters,...t.queryParameters}),o.headers=yde(o.headers),n.getDerivedResource(o)};function yde(e={}){return e["X-Cesium-Client"]="CesiumJS",typeof CESIUM_VERSION<"u"&&(e["X-Cesium-Client-Version"]=CESIUM_VERSION),e}function SUe(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 ss=Nl;var Z0n=x(T(),1);function fp(e){e=e??0,this._array=new Array(e),this._length=e}Object.defineProperties(fp.prototype,{length:{get:function(){return this._length},set:function(e){let t=this._array,n=this._length;if(e<n)for(let i=e;i<n;++i)t[i]=void 0;else e>t.length&&(t.length=e);this._length=e}},values:{get:function(){return this._array}}});fp.prototype.get=function(e){return this._array[e]};fp.prototype.set=function(e,t){e>=this._length&&(this.length=e+1),this._array[e]=t};fp.prototype.peek=function(){return this._array[this._length-1]};fp.prototype.push=function(e){let t=this.length++;this._array[t]=e};fp.prototype.pop=function(){if(this._length===0)return;let e=this._array[this._length-1];return--this.length,e};fp.prototype.reserve=function(e){e>this._array.length&&(this._array.length=e)};fp.prototype.resize=function(e){this.length=e};fp.prototype.trim=function(e){e=e??this._length,this._array.length=e};var Yl=fp;var E0n=x(T(),1);var pp={X:0,Y:1,Z:2};pp.Y_UP_TO_Z_UP=F.fromRotationTranslation(q.fromArray([1,0,0,0,0,1,0,-1,0]));pp.Z_UP_TO_Y_UP=F.fromRotationTranslation(q.fromArray([1,0,0,0,0,-1,0,1,0]));pp.X_UP_TO_Z_UP=F.fromRotationTranslation(q.fromArray([0,0,1,0,1,0,-1,0,0]));pp.Z_UP_TO_X_UP=F.fromRotationTranslation(q.fromArray([0,0,-1,0,1,0,1,0,0]));pp.X_UP_TO_Y_UP=F.fromRotationTranslation(q.fromArray([0,1,0,-1,0,0,0,0,1]));pp.Y_UP_TO_X_UP=F.fromRotationTranslation(q.fromArray([0,-1,0,1,0,0,0,0,1]));pp.fromName=function(e){return pp[e]};Object.freeze(pp);var to=pp;var Rui=x(T(),1);var W0n=x(T(),1);function xde(e){e=e??B.EMPTY_OBJECT,this._metadata=e.metadata}Object.defineProperties(xde.prototype,{metadata:{get:function(){return this._metadata}}});var $T=xde;var rai=x(T(),1);var O0n=x(T(),1);var N0n=x(T(),1);var I0n=x(T(),1);function uy(e,t,n){return t=t??0,n=n??e.byteLength-t,e=e.subarray(t,t+n),uy.decode(e)}uy.decodeWithTextDecoder=function(e){return new TextDecoder("utf-8").decode(e)};uy.decodeWithFromCharCode=function(e){let t="",n=AUe(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 Ev(e,t,n){return t<=e&&e<=n}function AUe(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(Ev(d,0,127)){s.push(d);continue}if(Ev(d,194,223)){i=1,t=d&31;continue}if(Ev(d,224,239)){d===224&&(o=160),d===237&&(r=159),i=2,t=d&15;continue}if(Ev(d,240,244)){d===240&&(o=144),d===244&&(r=143),i=3,t=d&7;continue}throw new le("String decoding failed.")}if(!Ev(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"?uy.decode=uy.decodeWithTextDecoder:uy.decode=uy.decodeWithFromCharCode;var Zd=uy;function ZUe(e,t){return t=t??0,Zd(e,t,Math.min(4,e.length))}var Dh=ZUe;function xm(e,t,n,i){this._tileset=e,this._tile=t,this._resource=n,l(i)||(i=[]),this._contents=i,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(xm.prototype,{featurePropertiesDirty:{get:function(){let e=this._contents,t=e.length;for(let n=0;n<t;++n)if(e[n].featurePropertiesDirty)return!0;return!1},set:function(e){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].featurePropertiesDirty=e}},featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){return this._contents}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e;let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].metadata=e}},batchTable:{get:function(){}},group:{get:function(){return this._group},set:function(e){this._group=e;let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].group=e}}});var Gv=Uint32Array.BYTES_PER_ELEMENT;xm.fromTileType=async function(e,t,n,i,o,r){o=o??0;let s=new Uint8Array(i),a=new DataView(i);o+=Gv;let c=a.getUint32(o,!0);if(c!==1)throw new le(`Only Composite Tile version 1 is supported. Version ${c} is not.`);o+=Gv,o+=Gv;let d=a.getUint32(o,!0);o+=Gv;let u=n.queryParameters.compositeIndex;l(u)?u=`${u}_`:u="";let h=[];h.length=d;for(let f=0;f<d;++f){let y=Dh(s,o),_=a.getUint32(o+Gv*2,!0),S=r[y],A=`${u}${f}`,Z=n.getDerivedResource({queryParameters:{compositeIndex:A}});if(l(S))h[f]=Promise.resolve(S(e,t,Z,i,o));else throw new le(`Unknown tile content type, ${y}, inside Composite tile`);o+=_}let p=await Promise.all(h);return new xm(e,t,n,p)};xm.prototype.hasProperty=function(e,t){return!1};xm.prototype.getFeature=function(e){};xm.prototype.applyDebugSettings=function(e,t){let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].applyDebugSettings(e,t)};xm.prototype.applyStyle=function(e){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].applyStyle(e)};xm.prototype.update=function(e,t){let n=this._contents,i=n.length,o=!0;for(let r=0;r<i;++r)n[r].update(e,t),o=o&&n[r].ready;!this._ready&&o&&(this._ready=!0)};xm.prototype.pick=function(e,t,n){if(!this._ready)return;let i,o=Number.POSITIVE_INFINITY,r=this._contents,s=r.length;for(let a=0;a<s;++a){let c=r[a].pick(e,t,n);if(!l(c))continue;let d=m.distance(e.origin,c);d<o&&(i=c,o=d)}if(l(i))return n};xm.prototype.isDestroyed=function(){return!1};xm.prototype.destroy=function(){let e=this._contents,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return me(this)};var Lv=xm;var Tyn=x(T(),1);var H0n=x(T(),1);function CUe(e,t,n){return JSON.parse(Zd(e,t,n))}var xr=CUe;var qbn=x(T(),1);var sbn=x(T(),1);function Hc(e){this._id=zn();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,Lt.maximumTextureSize),r=Math.ceil(t/Lt.maximumTextureSize),s=1/o,a=s*.5,c=1/r,d=c*.5;n=new M(o,r),i=new se(s,a,c,d)}this._translucentFeaturesLength=0,this._featuresLength=t,this._textureDimensions=n,this._textureStep=i,this._owner=e.owner,this._statistics=e.statistics,this._colorChangedCallback=e.colorChangedCallback}Object.defineProperties(Hc.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}}});Hc.DEFAULT_COLOR_VALUE=U.WHITE;Hc.DEFAULT_SHOW_VALUE=!0;function Tde(e){let t=e._textureDimensions;return t.x*t.y*4}function _de(e){if(!l(e._batchValues)){let t=Tde(e),n=new Uint8Array(t).fill(255);e._batchValues=n}return e._batchValues}function Sde(e){if(!l(e._showAlphaProperties)){let t=2*e._featuresLength,n=new Uint8Array(t).fill(255);e._showAlphaProperties=n}return e._showAlphaProperties}Hc.prototype.setShow=function(e,t){if(t&&!l(this._showAlphaProperties))return;let n=Sde(this),i=e*2,o=t?255:0;if(n[i]!==o){n[i]=o;let r=_de(this),s=e*4+3;r[s]=t?n[i+1]:0,this._batchValuesDirty=!0}};Hc.prototype.setAllShow=function(e){let t=this._featuresLength;for(let n=0;n<t;++n)this.setShow(n,e)};Hc.prototype.getShow=function(e){if(!l(this._showAlphaProperties))return!0;let t=e*2;return this._showAlphaProperties[t]===255};var VUe=new Array(4);Hc.prototype.setColor=function(e,t){if(U.equals(t,Hc.DEFAULT_COLOR_VALUE)&&!l(this._batchValues))return;let n=t.toBytes(VUe),i=n[3],o=_de(this),r=e*4,s=Sde(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)}};Hc.prototype.setAllColor=function(e){let t=this._featuresLength;for(let n=0;n<t;++n)this.setColor(n,e)};Hc.prototype.getColor=function(e,t){if(!l(this._batchValues))return U.clone(Hc.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)};Hc.prototype.getPickColor=function(e){return this._pickIds[e]};function Ade(e,t,n){let i=e._textureDimensions;return new Et({context:t,pixelFormat:Ke.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,source:{width:i.x,height:i.y,arrayBufferView:n},flipY:!1,sampler:Ut.NEAREST})}function RUe(e,t){let n=e._featuresLength;if(!l(e._pickTexture)&&n>0){let i=e._pickIds,o=Tde(e),r=new Uint8Array(o),s=e._owner,a=e._statistics;for(let c=0;c<n;++c){let d=t.createPickId(s.getFeature(c));i.push(d);let u=d.color,h=c*4;r[h]=U.floatToByte(u.red),r[h+1]=U.floatToByte(u.green),r[h+2]=U.floatToByte(u.blue),r[h+3]=U.floatToByte(u.alpha)}e._pickTexture=Ade(e,t,r),l(a)&&(a.batchTableByteLength+=e._pickTexture.sizeInBytes)}}function EUe(e){let t=e._textureDimensions;e._batchTexture.copyFrom({source:{width:t.x,height:t.y,arrayBufferView:e._batchValues}})}Hc.prototype.update=function(e,t){let n=t.context;this._defaultTexture=n.defaultTexture;let i=t.passes;(i.pick||i.postProcess)&&RUe(this,n),this._batchValuesDirty&&(this._batchValuesDirty=!1,l(this._batchTexture)||(this._batchTexture=Ade(this,n,this._batchValues),l(this._statistics)&&(this._statistics.batchTableByteLength+=this._batchTexture.sizeInBytes)),EUe(this))};Hc.prototype.isDestroyed=function(){return!1};Hc.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 me(this)};var wl=Hc;var Zbn=x(T(),1);var pbn=x(T(),1);var GUe={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},LUe={SCALAR:void 0,VEC2:M,VEC3:m,VEC4:se,MAT2:Oi,MAT3:q,MAT4:F};function WUe(e){let t=e.componentType,n;typeof t=="string"?n=K.fromName(t):n=t;let i=GUe[e.type],o=LUe[e.type];return{componentsPerAttribute:i,classType:o,createArrayBufferView:function(r,s,a){return K.createArrayBufferView(n,r,s,i*a)}}}var Tm=WUe;function tb(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,vUe(this,e.extension,e.binaryBody)}Object.defineProperties(tb.prototype,{byteLength:{get:function(){return this._byteLength}}});function vUe(e,t,n){let i,o,r,s=t.instancesLength,a=t.classes,c=t.classIds,d=t.parentCounts,u=t.parentIds,h=s,p=0;l(c.byteOffset)&&(c.componentType=c.componentType??K.UNSIGNED_SHORT,c.type=Nt.SCALAR,r=Tm(c),c=r.createArrayBufferView(n.buffer,n.byteOffset+c.byteOffset,s),p+=c.byteLength);let b;if(l(d)){for(l(d.byteOffset)&&(d.componentType=d.componentType??K.UNSIGNED_SHORT,d.type=Nt.SCALAR,r=Tm(d),d=r.createArrayBufferView(n.buffer,n.byteOffset+d.byteOffset,s),p+=d.byteLength),b=new Uint16Array(s),h=0,i=0;i<s;++i)b[i]=h,h+=d[i];p+=b.byteLength}l(u)&&l(u.byteOffset)&&(u.componentType=u.componentType??K.UNSIGNED_SHORT,u.type=Nt.SCALAR,r=Tm(u),u=r.createArrayBufferView(n.buffer,n.byteOffset+u.byteOffset,h),p+=u.byteLength);let f=a.length;for(i=0;i<f;++i){let S=a[i].length,A=a[i].instances,Z=Oh.getBinaryProperties(S,A,n);p+=FUe(Z),a[i].instances=Rt(Z,A)}let y=new Array(f).fill(0),_=new Uint16Array(s);for(i=0;i<s;++i)o=c[i],_[i]=y[o],++y[o];p+=_.byteLength,e._classes=a,e._classIds=c,e._classIndexes=_,e._parentCounts=d,e._parentIndexes=b,e._parentIds=u,e._byteLength=p}function FUe(e){let t=0;for(let n in e)e.hasOwnProperty(n)&&(t+=e[n].typedArray.byteLength);return t}var IUe=[],PUe=[],XUe=0;function NUe(e,t,n){let i=e._classIds,o=e._parentCounts,r=e._parentIds,s=e._parentIndexes,a=i.length,c=IUe;c.length=Math.max(c.length,a);let d=++XUe,u=PUe;for(u.length=0,u.push(t);u.length>0;){if(t=u.pop(),c[t]===d)continue;c[t]=d;let h=n(e,t);if(l(h))return h;let p=o[t],b=s[t];for(let f=0;f<p;++f){let y=r[b+f];y!==t&&u.push(y)}}}function YUe(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 Wv(e,t,n){let i=e._parentCounts,o=e._parentIds;if(l(o)){if(l(i))return NUe(e,t,n)}else return n(e,t);return YUe(e,t,n)}tb.prototype.hasProperty=function(e,t){let n=Wv(this,e,function(i,o){let r=i._classIds[o],s=i._classes[r].instances;if(l(s[t]))return!0});return l(n)};tb.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};tb.prototype.getPropertyIds=function(e,t){return t=l(t)?t:[],t.length=0,Wv(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};tb.prototype.getProperty=function(e,t){return Wv(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)?wUe(a,s):ze(a[s],!0)})};function wUe(e,t){let n=e.typedArray,i=e.componentCount;return i===1?n[t]:e.type.unpack(n,t*i)}tb.prototype.setProperty=function(e,t,n){let i=Wv(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)?MUe(d,c,n):d[c]=ze(n,!0),!0});return l(i)};function MUe(e,t,n){let i=e.typedArray,o=e.componentCount;o===1?i[t]=n:e.type.pack(n,i,t*o)}tb.prototype.isClass=function(e,t){let n=Wv(this,e,function(i,o){let r=i._classIds[o];if(i._classes[r].name===t)return!0});return l(n)};tb.prototype.getClassName=function(e){let t=this._classIds[e];return this._classes[t].name};var e_=tb;var Vbn=x(T(),1),Zde={HIGHLIGHT:0,REPLACE:1,MIX:2};Object.freeze(Zde);var Cd=Zde;var KJ=wl.DEFAULT_COLOR_VALUE,JJ=wl.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=kUe(n);this._properties=s,this._batchTableHierarchy=UUe(this,n,i);let a=Vde(t,s,i);this._binaryPropertiesByteLength=DUe(a),this._batchTableBinaryProperties=a,this._content=e,this._batchTexture=new wl({featuresLength:t,colorChangedCallback:o,owner:e,statistics:e.tileset.statistics})}wo._deprecationWarning=La;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 kUe(e){let t={};if(!l(e))return t;for(let n in e)e.hasOwnProperty(n)&&n!=="HIERARCHY"&&n!=="extensions"&&n!=="extras"&&(t[n]=ze(e[n],!0));return t}function UUe(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 Vde(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 le("componentType is required.");if(!l(c))throw new le("type is required.");if(!l(n))throw new le(`Property ${o} requires a batch table binary.`);let d=Tm(r),u=d.componentsPerAttribute,h=d.classType,p=d.createArrayBufferView(n.buffer,n.byteOffset+s,e);l(i)||(i={}),i[o]={typedArray:p,componentCount:u,type:h}}}return i}function DUe(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 Vde(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 OUe=new U;wo.prototype.applyStyle=function(e){if(!l(e)){this.setAllColor(KJ),this.setAllShow(JJ);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,OUe)??KJ:KJ,s=l(e.show)?e.show.evaluate(o)??JJ:JJ;this.setColor(i,r),this.setShow(i,s)}};function BUe(e,t){let n=e.typedArray,i=e.componentCount;return i===1?n[t]:e.type.unpack(n,t*i)}function zUe(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 BUe(i,e)}let n=this._properties[t];if(l(n))return ze(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)){zUe(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]=ze(n,!0)};function HUe(e){return e._batchTexture.textureDimensions.y===1?`uniform vec4 tile_textureStep;
vec2 computeSt(float batchId)
{
float stepX = tile_textureStep.x;
float centerX = tile_textureStep.y;
return vec2(centerX + (batchId * stepX), 0.5);
}
`:`uniform vec4 tile_textureStep;
uniform vec2 tile_textureDimensions;
vec2 computeSt(float batchId)
{
float stepX = tile_textureStep.x;
float centerX = tile_textureStep.y;
float stepY = tile_textureStep.z;
float centerY = tile_textureStep.w;
float xId = mod(batchId, tile_textureDimensions.x);
float yId = floor(batchId / tile_textureDimensions.x);
return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
}
`}wo.prototype.getVertexShaderCallback=function(e,t,n){if(this.featuresLength===0)return;let i=this;return function(o){let r=Rde(o,n,!1),s;return Lt.maximumVertexTextureImageUnits>0?(s="",e&&(s+=`uniform bool tile_translucentCommand;
`),s+=`uniform sampler2D tile_batchTexture;
out vec4 tile_featureColor;
out vec2 tile_featureSt;
void main()
{
vec2 st = computeSt(${t});
vec4 featureProperties = texture(tile_batchTexture, st);
tile_color(featureProperties);
float show = ceil(featureProperties.a);
gl_Position *= show;
`,e&&(s+=` bool isStyleTranslucent = (featureProperties.a != 1.0);
if (czm_pass == czm_passTranslucent)
{
if (!isStyleTranslucent && !tile_translucentCommand)
{
gl_Position *= 0.0;
}
}
else
{
if (isStyleTranslucent)
{
gl_Position *= 0.0;
}
}
`),s+=` tile_featureColor = featureProperties;
tile_featureSt = st;
}`):s=`out vec2 tile_featureSt;
void main()
{
tile_color(vec4(1.0));
tile_featureSt = computeSt(${t});
}`,`${r}
${HUe(i)}${s}`}};function Cde(e,t){return e=Be.replaceMain(e,"tile_main"),t?`${e}uniform float tile_colorBlend;
void tile_color(vec4 tile_featureColor)
{
tile_main();
tile_featureColor = czm_gammaCorrect(tile_featureColor);
out_FragColor.a *= tile_featureColor.a;
float highlight = ceil(tile_colorBlend);
out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight);
}
`:`${e}void tile_color(vec4 tile_featureColor)
{
tile_main();
}
`}function KUe(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 Rde(e,t,n){if(!l(t))return Cde(e,n);let i=new RegExp(`(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+${t};`),o=e.match(i);if(!l(o))return Cde(e,n);let r=o[0],s=o[2];e=Be.replaceMain(e,"tile_main"),e=e.replace(r,"");let a=`bool isWhite(vec3 color)
{
return all(greaterThan(color, vec3(1.0 - czm_epsilon3)));
}
vec4 tile_diffuse_final(vec4 sourceDiffuse, vec4 tileDiffuse)
{
vec4 blendDiffuse = mix(sourceDiffuse, tileDiffuse, tile_colorBlend);
vec4 diffuse = isWhite(tileDiffuse.rgb) ? sourceDiffuse : blendDiffuse;
return vec4(diffuse.rgb, sourceDiffuse.a);
}
`,c=` tile_featureColor = czm_gammaCorrect(tile_featureColor);
out_FragColor.a *= tile_featureColor.a;
float highlight = ceil(tile_colorBlend);
out_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight);
`,d;if(s==="vec3"||s==="vec4"){let u=s==="vec3"?`vec4(${t}, 1.0)`:t,h=s==="vec3"?"tile_diffuse.xyz":"tile_diffuse";i=new RegExp(t,"g"),e=e.replace(i,h),d=` vec4 source = ${u};
tile_diffuse = tile_diffuse_final(source, tile_featureColor);
tile_main();
`}else s==="sampler2D"&&(e=KUe(e,t),d=` tile_diffuse = tile_featureColor;
tile_main();
`);return e=`uniform float tile_colorBlend;
vec4 tile_diffuse = vec4(1.0);
${a}${r}
${e}
void tile_color(vec4 tile_featureColor)
{
${d}`,n&&(e+=c),e+=`}
`,e}wo.prototype.getFragmentShaderCallback=function(e,t,n){if(this.featuresLength!==0)return function(i){return i=Rde(i,t,!0),Lt.maximumVertexTextureImageUnits>0?(i+=`uniform sampler2D tile_pickTexture;
in vec2 tile_featureSt;
in vec4 tile_featureColor;
void main()
{
tile_color(tile_featureColor);
`,n&&(i+=` out_FragColor.rgb *= out_FragColor.a;
`),i+="}"):(e&&(i+=`uniform bool tile_translucentCommand;
`),i+=`uniform sampler2D tile_pickTexture;
uniform sampler2D tile_batchTexture;
in vec2 tile_featureSt;
void main()
{
vec4 featureProperties = texture(tile_batchTexture, tile_featureSt);
if (featureProperties.a == 0.0) {
discard;
}
`,e&&(i+=` bool isStyleTranslucent = (featureProperties.a != 1.0);
if (czm_pass == czm_passTranslucent)
{
if (!isStyleTranslucent && !tile_translucentCommand)
{
discard;
}
}
else
{
if (isStyleTranslucent)
{
discard;
}
}
`),i+=` tile_color(featureProperties);
`,n&&(i+=` out_FragColor.rgb *= out_FragColor.a;
`),i+=`}
`),i}};function JUe(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 Rt(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 JUe(e)},tile_pickTexture:function(){return e._batchTexture.pickTexture}})}};wo.prototype.getPickId=function(){return"texture(tile_pickTexture, tile_featureSt)"};var my={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=jUe(this);for(let d=t;d<i;++d){let u=n[d];if(u.pass===Le.COMPUTE)continue;let h=u.derivedCommands.tileset;(!l(h)||u.dirty)&&(h={},u.derivedCommands.tileset=h,h.originalCommand=QUe(u),u.dirty=!1);let p=h.originalCommand;c!==my.ALL_OPAQUE&&u.pass!==Le.TRANSLUCENT&&(l(h.translucent)||(h.translucent=qUe(p))),c!==my.ALL_TRANSLUCENT&&u.pass!==Le.TRANSLUCENT&&(l(h.opaque)||(h.opaque=$Ue(p)),a&&(r||(l(h.zback)||(h.zback=t5e(e.context,p)),s._backfaceCommands.push(h.zback)),(!l(h.stencil)||o._selectionDepth!==i5e(h.stencil))&&(u.renderState.depthMask?h.stencil=n5e(p,o._selectionDepth):h.stencil=h.opaque)));let b=a?h.stencil:h.opaque,f=h.translucent;u.pass!==Le.TRANSLUCENT?(c===my.ALL_OPAQUE&&(n[d]=b),c===my.ALL_TRANSLUCENT&&(n[d]=f),c===my.OPAQUE_AND_TRANSLUCENT&&(n[d]=b,n.push(f))):n[d]=p}};function jUe(e){let t=e._batchTexture.translucentFeaturesLength;return t===0?my.ALL_OPAQUE:t===e.featuresLength?my.ALL_TRANSLUCENT:my.OPAQUE_AND_TRANSLUCENT}function QUe(e){let t=et.shallowClone(e),n=t.pass===Le.TRANSLUCENT;return t.uniformMap=l(t.uniformMap)?t.uniformMap:{},t.uniformMap.tile_translucentCommand=function(){return n},t}function qUe(e){let t=et.shallowClone(e);return t.pass=Le.TRANSLUCENT,t.renderState=o5e(e.renderState),t}function $Ue(e){let t=et.shallowClone(e);return t.renderState=r5e(e.renderState),t}function e5e(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 t5e(e,t){let n=et.shallowClone(t),i=ze(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=Ot.setCesium3DTileBit(),i.stencilMask=Ot.CESIUM_3D_TILE_MASK,n.renderState=De.fromCache(i),n.castShadows=!1,n.receiveShadows=!1,n.uniformMap=ze(t.uniformMap);let o=new M(5,5);return n.uniformMap.u_polygonOffset=function(){return o},n.shaderProgram=e5e(e,t.shaderProgram),n}function n5e(e,t){let n=et.shallowClone(e),i=ze(n.renderState,!0);return i.stencilTest.enabled=!0,i.stencilTest.mask=Ot.SKIP_LOD_MASK,i.stencilTest.reference=Ot.CESIUM_3D_TILE_MASK|t<<Ot.SKIP_LOD_BIT_SHIFT,i.stencilTest.frontFunction=jn.GREATER_OR_EQUAL,i.stencilTest.frontOperation.zPass=Zt.REPLACE,i.stencilTest.backFunction=jn.GREATER_OR_EQUAL,i.stencilTest.backOperation.zPass=Zt.REPLACE,i.stencilMask=Ot.CESIUM_3D_TILE_MASK|Ot.SKIP_LOD_MASK,n.renderState=De.fromCache(i),n}function i5e(e){return(e.renderState.stencilTest.reference&Ot.SKIP_LOD_MASK)>>>Ot.SKIP_LOD_BIT_SHIFT}function o5e(e){let t=ze(e,!0);return t.cull.enabled=!1,t.depthTest.enabled=!0,t.depthMask=!1,t.blending=tn.ALPHA_BLEND,t.stencilTest=Ot.setCesium3DTileBit(),t.stencilMask=Ot.CESIUM_3D_TILE_MASK,De.fromCache(t)}function r5e(e){let t=ze(e,!0);return t.stencilTest=Ot.setCesium3DTileBit(),t.stencilMask=Ot.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(),me(this)};var Oh=wo;var dyn=x(T(),1);var egn=x(T(),1);function s5e(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var bp=s5e;var qgn=x(T(),1);var ngn=x(T(),1),YZ=`in vec3 position;
in float a_batchId;
uniform mat4 u_modifiedModelViewProjection;
void main()
{
gl_Position = czm_depthClamp(u_modifiedModelViewProjection * vec4(position, 1.0));
}
`;var sgn=x(T(),1);var jJ=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)}},Bs=jJ;var Sgn=x(T(),1);var lgn=x(T(),1),QJ=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)})}},qJ=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)})}},Vd=class e{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+e.version}static addUnaryOp(t){return e.max_unop_len=Math.max(t.length,e.max_unop_len),e.unary_ops[t]=1,e}static addBinaryOp(t,n,i){return e.max_binop_len=Math.max(t.length,e.max_binop_len),e.binary_ops[t]=n,i?e.right_associative.add(t):e.right_associative.delete(t),e}static addIdentifierChar(t){return e.additional_identifier_chars.add(t),e}static addLiteral(t,n){return e.literals[t]=n,e}static removeUnaryOp(t){return delete e.unary_ops[t],t.length===e.max_unop_len&&(e.max_unop_len=e.getMaxKeyLen(e.unary_ops)),e}static removeAllUnaryOps(){return e.unary_ops={},e.max_unop_len=0,e}static removeIdentifierChar(t){return e.additional_identifier_chars.delete(t),e}static removeBinaryOp(t){return delete e.binary_ops[t],t.length===e.max_binop_len&&(e.max_binop_len=e.getMaxKeyLen(e.binary_ops)),e.right_associative.delete(t),e}static removeAllBinaryOps(){return e.binary_ops={},e.max_binop_len=0,e}static removeLiteral(t){return delete e.literals[t],e}static removeAllLiterals(){return e.literals={},e}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new e(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(n=>n.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return e.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!e.binary_ops[String.fromCharCode(t)]||e.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return e.isIdentifierStart(t)||e.isDecimalDigit(t)}throwError(t){let n=new Error(t+" at character "+this.index);throw n.index=this.index,n.description=t,n}runHook(t,n){if(e.hooks[t]){let i={context:this,node:n};return e.hooks.run(t,i),i.node}return n}searchHook(t){if(e.hooks[t]){let n={context:this};return e.hooks[t].find(function(i){return i.call(n.context,n),n.node}),n.node}}gobbleSpaces(){let t=this.code;for(;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let t=this.gobbleExpressions(),n=t.length===1?t[0]:{type:e.COMPOUND,body:t};return this.runHook("after-all",n)}gobbleExpressions(t){let n=[],i,o;for(;this.index<this.expr.length;)if(i=this.code,i===e.SEMCOL_CODE||i===e.COMMA_CODE)this.index++;else if(o=this.gobbleExpression())n.push(o);else if(this.index<this.expr.length){if(i===t)break;this.throwError('Unexpected "'+this.char+'"')}return n}gobbleExpression(){let t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,e.max_binop_len),n=t.length;for(;n>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=n,t;t=t.substr(0,--n)}return!1}gobbleBinaryExpression(){let t,n,i,o,r,s,a,c,d;if(s=this.gobbleToken(),!s||(n=this.gobbleBinaryOp(),!n))return s;for(r={value:n,prec:e.binaryPrecedence(n),right_a:e.right_associative.has(n)},a=this.gobbleToken(),a||this.throwError("Expected expression after "+n),o=[s,r,a];n=this.gobbleBinaryOp();){if(i=e.binaryPrecedence(n),i===0){this.index-=n.length;break}r={value:n,prec:i,right_a:e.right_associative.has(n)},d=n;let u=h=>r.right_a&&h.right_a?i>h.prec:i<=h.prec;for(;o.length>2&&u(o[o.length-2]);)a=o.pop(),n=o.pop().value,s=o.pop(),t={type:e.BINARY_EXP,operator:n,left:s,right:a},o.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+d),o.push(r,t)}for(c=o.length-1,t=o[c];c>1;)t={type:e.BINARY_EXP,operator:o[c-1].value,left:o[c-2],right:t},c-=2;return t}gobbleToken(){let t,n,i,o;if(this.gobbleSpaces(),o=this.searchHook("gobble-token"),o)return this.runHook("after-token",o);if(t=this.code,e.isDecimalDigit(t)||t===e.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===e.SQUOTE_CODE||t===e.DQUOTE_CODE)o=this.gobbleStringLiteral();else if(t===e.OBRACK_CODE)o=this.gobbleArray();else{for(n=this.expr.substr(this.index,e.max_unop_len),i=n.length;i>0;){if(e.unary_ops.hasOwnProperty(n)&&(!e.isIdentifierStart(this.code)||this.index+n.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+n.length)))){this.index+=i;let r=this.gobbleToken();return r||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:e.UNARY_EXP,operator:n,argument:r,prefix:!0})}n=n.substr(0,--i)}e.isIdentifierStart(t)?(o=this.gobbleIdentifier(),e.literals.hasOwnProperty(o.name)?o={type:e.LITERAL,value:e.literals[o.name],raw:o.name}:o.name===e.this_str&&(o={type:e.THIS_EXP})):t===e.OPAREN_CODE&&(o=this.gobbleGroup())}return o?(o=this.gobbleTokenProperty(o),this.runHook("after-token",o)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let n=this.code;for(;n===e.PERIOD_CODE||n===e.OBRACK_CODE||n===e.OPAREN_CODE||n===e.QUMARK_CODE;){let i;if(n===e.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==e.PERIOD_CODE)break;i=!0,this.index+=2,this.gobbleSpaces(),n=this.code}this.index++,n===e.OBRACK_CODE?(t={type:e.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),n=this.code,n!==e.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):n===e.OPAREN_CODE?t={type:e.CALL_EXP,arguments:this.gobbleArguments(e.CPAREN_CODE),callee:t}:(n===e.PERIOD_CODE||i)&&(i&&this.index--,this.gobbleSpaces(),t={type:e.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),i&&(t.optional=!0),this.gobbleSpaces(),n=this.code}return t}gobbleNumericLiteral(){let t="",n,i;for(;e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===e.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(n=this.char,n==="e"||n==="E"){for(t+=this.expr.charAt(this.index++),n=this.char,(n==="+"||n==="-")&&(t+=this.expr.charAt(this.index++));e.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return i=this.code,e.isIdentifierStart(i)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(i===e.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===e.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:e.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="",n=this.index,i=this.expr.charAt(this.index++),o=!1;for(;this.index<this.expr.length;){let r=this.expr.charAt(this.index++);if(r===i){o=!0;break}else if(r==="\\")switch(r=this.expr.charAt(this.index++),r){case"n":t+=`
`;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=r}else t+=r}return o||this.throwError('Unclosed quote after "'+t+'"'),{type:e.LITERAL,value:t,raw:this.expr.substring(n,this.index)}}gobbleIdentifier(){let t=this.code,n=this.index;for(e.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,e.isIdentifierPart(t));)this.index++;return{type:e.IDENTIFIER,name:this.expr.slice(n,this.index)}}gobbleArguments(t){let n=[],i=!1,o=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let r=this.code;if(r===t){i=!0,this.index++,t===e.CPAREN_CODE&&o&&o>=n.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(r===e.COMMA_CODE){if(this.index++,o++,o!==n.length){if(t===e.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===e.CBRACK_CODE)for(let s=n.length;s<o;s++)n.push(null)}}else if(n.length!==o&&o!==0)this.throwError("Expected comma");else{let s=this.gobbleExpression();(!s||s.type===e.COMPOUND)&&this.throwError("Expected comma"),n.push(s)}}return i||this.throwError("Expected "+String.fromCharCode(t)),n}gobbleGroup(){this.index++;let t=this.gobbleExpressions(e.CPAREN_CODE);if(this.code===e.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:e.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:e.ARRAY_EXP,elements:this.gobbleArguments(e.CBRACK_CODE)}}},a5e=new QJ;Object.assign(Vd,{hooks:a5e,plugins:new qJ(Vd),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"});Vd.max_unop_len=Vd.getMaxKeyLen(Vd.unary_ops);Vd.max_binop_len=Vd.getMaxKeyLen(Vd.binary_ops);var hy=e=>new Vd(e).parse(),c5e=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(Vd).filter(e=>!c5e.includes(e)&&hy[e]===void 0).forEach(e=>{hy[e]=Vd[e]});hy.Jsep=Vd;var l5e="ConditionalExpression",d5e={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:l5e,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 :")}})}};hy.plugins.register(d5e);var ugn=x(T(),1),Ede={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(Ede);var Ct=Ede;function Bh(e,t){this._expression=e,e=A5e(e,t),e=C5e(Z5e(e)),hy.addBinaryOp("=~",0),hy.addBinaryOp("!~",0);let n;try{n=hy(e)}catch(i){throw new le(i)}this._runtimeAst=wi(this,n)}Object.defineProperties(Bh.prototype,{expression:{get:function(){return this._expression}}});var Xn={arrayIndex:0,arrayArray:[[]],cartesian2Index:0,cartesian3Index:0,cartesian4Index:0,cartesian2Array:[new M],cartesian3Array:[new m],cartesian4Array:[new se],reset:function(){this.arrayIndex=0,this.cartesian2Index=0,this.cartesian3Index=0,this.cartesian4Index=0},getArray:function(){this.arrayIndex>=this.arrayArray.length&&this.arrayArray.push([]);let e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new M),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new m),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new se),this.cartesian4Array[this.cartesian4Index++]}};Bh.prototype.evaluate=function(e,t){Xn.reset();let n=this._runtimeAst.evaluate(e);return t instanceof U&&n instanceof se?U.fromCartesian4(n,t):n instanceof M||n instanceof m||n instanceof se?n.clone(t):n};Bh.prototype.evaluateColor=function(e,t){Xn.reset();let n=this._runtimeAst.evaluate(e);return U.fromCartesian4(n,t)};Bh.prototype.getShaderFunction=function(e,t,n,i){let o=this.getShaderExpression(t,n);return o=`${i} ${e}
{
return ${o};
}
`,o};Bh.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)};Bh.prototype.getVariables=function(){let e=[];return this._runtimeAst.getVariables(e),e=e.filter(function(t,n,i){return i.indexOf(t)===n}),e};var u5e=["!","-","+"],Gde=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],vv=/\${(.*?)}/g,m5e=/\\/g,h5e="@#%",f5e=/@#%/g,C5=new U,V5={abs:Wa(Math.abs),sqrt:Wa(Math.sqrt),cos:Wa(Math.cos),sin:Wa(Math.sin),tan:Wa(Math.tan),acos:Wa(Math.acos),asin:Wa(Math.asin),atan:Wa(Math.atan),radians:Wa(W.toRadians),degrees:Wa(W.toDegrees),sign:Wa(W.sign),floor:Wa(Math.floor),ceil:Wa(Math.ceil),round:Wa(Math.round),exp:Wa(Math.exp),exp2:Wa(b5e),log:Wa(Math.log),log2:Wa(g5e),fract:Wa(p5e),length:y5e,normalize:x5e},R5={atan2:A5(Math.atan2,!1),pow:A5(Math.pow,!1),min:A5(Math.min,!0),max:A5(Math.max,!0),distance:T5e,dot:_5e,cross:S5e},tj={clamp:Lde(W.clamp,!0),mix:Lde(W.lerp,!0)};function p5e(e){return e-Math.floor(e)}function b5e(e){return Math.pow(2,e)}function g5e(e){return W.log2(e)}function Wa(e){return function(t,n){if(typeof n=="number")return e(n);if(n instanceof M)return M.fromElements(e(n.x),e(n.y),Xn.getCartesian2());if(n instanceof m)return m.fromElements(e(n.x),e(n.y),e(n.z),Xn.getCartesian3());if(n instanceof se)return se.fromElements(e(n.x),e(n.y),e(n.z),e(n.w),Xn.getCartesian4());throw new le(`Function "${t}" requires a vector or number argument. Argument is ${n}.`)}}function A5(e,t){return function(n,i,o){if(t&&typeof o=="number"){if(typeof i=="number")return e(i,o);if(i instanceof M)return M.fromElements(e(i.x,o),e(i.y,o),Xn.getCartesian2());if(i instanceof m)return m.fromElements(e(i.x,o),e(i.y,o),e(i.z,o),Xn.getCartesian3());if(i instanceof se)return se.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 M&&o instanceof M)return M.fromElements(e(i.x,o.x),e(i.y,o.y),Xn.getCartesian2());if(i instanceof m&&o instanceof m)return m.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),Xn.getCartesian3());if(i instanceof se&&o instanceof se)return se.fromElements(e(i.x,o.x),e(i.y,o.y),e(i.z,o.z),e(i.w,o.w),Xn.getCartesian4());throw new le(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i} and ${o}.`)}}function Lde(e,t){return function(n,i,o,r){if(t&&typeof r=="number"){if(typeof i=="number"&&typeof o=="number")return e(i,o,r);if(i instanceof M&&o instanceof M)return M.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),Xn.getCartesian2());if(i instanceof m&&o instanceof m)return m.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),Xn.getCartesian3());if(i instanceof se&&o instanceof se)return se.fromElements(e(i.x,o.x,r),e(i.y,o.y,r),e(i.z,o.z,r),e(i.w,o.w,r),Xn.getCartesian4())}if(typeof i=="number"&&typeof o=="number"&&typeof r=="number")return e(i,o,r);if(i instanceof M&&o instanceof M&&r instanceof M)return M.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),Xn.getCartesian2());if(i instanceof m&&o instanceof m&&r instanceof m)return m.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),Xn.getCartesian3());if(i instanceof se&&o instanceof se&&r instanceof se)return se.fromElements(e(i.x,o.x,r.x),e(i.y,o.y,r.y),e(i.z,o.z,r.z),e(i.w,o.w,r.w),Xn.getCartesian4());throw new le(`Function "${n}" requires vector or number arguments of matching types. Arguments are ${i}, ${o}, and ${r}.`)}}function y5e(e,t){if(typeof t=="number")return Math.abs(t);if(t instanceof M)return M.magnitude(t);if(t instanceof m)return m.magnitude(t);if(t instanceof se)return se.magnitude(t);throw new le(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function x5e(e,t){if(typeof t=="number")return 1;if(t instanceof M)return M.normalize(t,Xn.getCartesian2());if(t instanceof m)return m.normalize(t,Xn.getCartesian3());if(t instanceof se)return se.normalize(t,Xn.getCartesian4());throw new le(`Function "${e}" requires a vector or number argument. Argument is ${t}.`)}function T5e(e,t,n){if(typeof t=="number"&&typeof n=="number")return Math.abs(t-n);if(t instanceof M&&n instanceof M)return M.distance(t,n);if(t instanceof m&&n instanceof m)return m.distance(t,n);if(t instanceof se&&n instanceof se)return se.distance(t,n);throw new le(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function _5e(e,t,n){if(typeof t=="number"&&typeof n=="number")return t*n;if(t instanceof M&&n instanceof M)return M.dot(t,n);if(t instanceof m&&n instanceof m)return m.dot(t,n);if(t instanceof se&&n instanceof se)return se.dot(t,n);throw new le(`Function "${e}" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)}function S5e(e,t,n){if(t instanceof m&&n instanceof m)return m.cross(t,n,Xn.getCartesian3());throw new le(`Function "${e}" requires vec3 arguments. Arguments are ${t} and ${n}.`)}function vt(e,t,n,i,o){this._type=e,this._value=t,this._left=n,this._right=i,this._test=o,this.evaluate=void 0,P5e(this)}function A5e(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 Z5e(e){return e.replace(m5e,h5e)}function ej(e){return e.replace(f5e,"\\")}function C5e(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 le("Unmatched {.");n+=`czm_${t.substr(i+2,a-(i+2))}`,t=t.substr(a+1),i=t.indexOf("${")}}return n+=t,n}function V5e(e){let t=typeof e.value;if(e.value===null)return new vt(Ct.LITERAL_NULL,null);if(t==="boolean")return new vt(Ct.LITERAL_BOOLEAN,e.value);if(t==="number")return new vt(Ct.LITERAL_NUMBER,e.value);if(t==="string")return e.value.indexOf("${")>=0?new vt(Ct.VARIABLE_IN_STRING,e.value):new vt(Ct.LITERAL_STRING,ej(e.value))}function R5e(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 le(`${o} is not a function.`);return i===0?o==="test"?new vt(Ct.LITERAL_BOOLEAN,!1):new vt(Ct.LITERAL_NULL,null):(s=wi(e,c),a=wi(e,n[0]),new vt(Ct.FUNCTION_CALL,o,s,a))}else if(o==="toString")return r=wi(e,c),new vt(Ct.FUNCTION_CALL,o,r);throw new le(`Unexpected function call "${o}".`)}if(o=t.callee.name,o==="color"){if(i===0)return new vt(Ct.LITERAL_COLOR,o);if(r=wi(e,n[0]),l(n[1])){let c=wi(e,n[1]);return new vt(Ct.LITERAL_COLOR,o,[r,c])}return new vt(Ct.LITERAL_COLOR,o,[r])}else if(o==="rgb"||o==="hsl"){if(i<3)throw new le(`${o} requires three arguments.`);return r=[wi(e,n[0]),wi(e,n[1]),wi(e,n[2])],new vt(Ct.LITERAL_COLOR,o,r)}else if(o==="rgba"||o==="hsla"){if(i<4)throw new le(`${o} requires four arguments.`);return r=[wi(e,n[0]),wi(e,n[1]),wi(e,n[2]),wi(e,n[3])],new vt(Ct.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]=wi(e,n[c]);return new vt(Ct.LITERAL_VECTOR,o,r)}else{if(o==="isNaN"||o==="isFinite")return i===0?o==="isNaN"?new vt(Ct.LITERAL_BOOLEAN,!0):new vt(Ct.LITERAL_BOOLEAN,!1):(r=wi(e,n[0]),new vt(Ct.UNARY,o,r));if(o==="isExactClass"||o==="isClass"){if(i<1||i>1)throw new le(`${o} requires exactly one argument.`);return r=wi(e,n[0]),new vt(Ct.UNARY,o,r)}else if(o==="getExactClassName"){if(i>0)throw new le(`${o} does not take any argument.`);return new vt(Ct.UNARY,o)}else if(l(V5[o])){if(i!==1)throw new le(`${o} requires exactly one argument.`);return r=wi(e,n[0]),new vt(Ct.UNARY,o,r)}else if(l(R5[o])){if(i!==2)throw new le(`${o} requires exactly two arguments.`);return s=wi(e,n[0]),a=wi(e,n[1]),new vt(Ct.BINARY,o,s,a)}else if(l(tj[o])){if(i!==3)throw new le(`${o} requires exactly three arguments.`);s=wi(e,n[0]),a=wi(e,n[1]);let c=wi(e,n[2]);return new vt(Ct.TERNARY,o,s,a,c)}else{if(o==="Boolean")return i===0?new vt(Ct.LITERAL_BOOLEAN,!1):(r=wi(e,n[0]),new vt(Ct.UNARY,o,r));if(o==="Number")return i===0?new vt(Ct.LITERAL_NUMBER,0):(r=wi(e,n[0]),new vt(Ct.UNARY,o,r));if(o==="String")return i===0?new vt(Ct.LITERAL_STRING,""):(r=wi(e,n[0]),new vt(Ct.UNARY,o,r));if(o==="regExp")return E5e(e,t)}}throw new le(`Unexpected function call "${o}".`)}function E5e(e,t){let n=t.arguments;if(n.length===0)return new vt(Ct.LITERAL_REGEX,new RegExp);let i=wi(e,n[0]),o;if(n.length>1){let r=wi(e,n[1]);if($J(i)&&$J(r)){try{o=new RegExp(ej(String(i._value)),r._value)}catch(s){throw new le(s)}return new vt(Ct.LITERAL_REGEX,o)}return new vt(Ct.REGEX,i,r)}if($J(i)){try{o=new RegExp(ej(String(i._value)))}catch(r){throw new le(r)}return new vt(Ct.LITERAL_REGEX,o)}return new vt(Ct.REGEX,i)}function G5e(e){if(F5e(e.name)){let t=I5e(e.name);return t.substr(0,8)==="tiles3d_"?new vt(Ct.BUILTIN_VARIABLE,t):new vt(Ct.VARIABLE,t)}else{if(e.name==="NaN")return new vt(Ct.LITERAL_NUMBER,NaN);if(e.name==="Infinity")return new vt(Ct.LITERAL_NUMBER,1/0);if(e.name==="undefined")return new vt(Ct.LITERAL_UNDEFINED,void 0)}throw new le(`${e.name} is not defined.`)}function L5e(e){let t=e.property.name;if(t==="PI")return new vt(Ct.LITERAL_NUMBER,Math.PI);if(t==="E")return new vt(Ct.LITERAL_NUMBER,Math.E)}function W5e(e){if(e.property.name==="POSITIVE_INFINITY")return new vt(Ct.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}function v5e(e,t){if(t.object.name==="Math")return L5e(t);if(t.object.name==="Number")return W5e(t);let n,i=wi(e,t.object);return t.computed?(n=wi(e,t.property),new vt(Ct.MEMBER,"brackets",i,n)):(n=new vt(Ct.LITERAL_STRING,t.property.name),new vt(Ct.MEMBER,"dot",i,n))}function $J(e){return e._type>=Ct.LITERAL_NULL}function F5e(e){return e.substr(0,4)==="czm_"}function I5e(e){return e.substr(4)}function wi(e,t){let n,i,o,r;if(t.type==="Literal")n=V5e(t);else if(t.type==="CallExpression")n=R5e(e,t);else if(t.type==="Identifier")n=G5e(t);else if(t.type==="UnaryExpression"){i=t.operator;let s=wi(e,t.argument);if(u5e.indexOf(i)>-1)n=new vt(Ct.UNARY,i,s);else throw new le(`Unexpected operator "${i}".`)}else if(t.type==="BinaryExpression")if(i=t.operator,o=wi(e,t.left),r=wi(e,t.right),Gde.indexOf(i)>-1)n=new vt(Ct.BINARY,i,o,r);else throw new le(`Unexpected operator "${i}".`);else if(t.type==="LogicalExpression")i=t.operator,o=wi(e,t.left),r=wi(e,t.right),Gde.indexOf(i)>-1&&(n=new vt(Ct.BINARY,i,o,r));else if(t.type==="ConditionalExpression"){let s=wi(e,t.test);o=wi(e,t.consequent),r=wi(e,t.alternate),n=new vt(Ct.CONDITIONAL,"?",o,r,s)}else if(t.type==="MemberExpression")n=v5e(e,t);else if(t.type==="ArrayExpression"){let s=[];for(let a=0;a<t.elements.length;a++)s[a]=wi(e,t.elements[a]);n=new vt(Ct.ARRAY,s)}else throw t.type==="Compound"?new le("Provide exactly one expression."):new le("Cannot parse expression.");return n}function P5e(e){e._type===Ct.CONDITIONAL?e.evaluate=e._evaluateConditional:e._type===Ct.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===Ct.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(V5[e._value])&&(e.evaluate=N5e(e._value)):e._type===Ct.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(R5[e._value])&&(e.evaluate=Y5e(e._value)):e._type===Ct.TERNARY?e.evaluate=w5e(e._value):e._type===Ct.MEMBER?e._value==="brackets"?e.evaluate=e._evaluateMemberBrackets:e.evaluate=e._evaluateMemberDot:e._type===Ct.ARRAY?e.evaluate=e._evaluateArray:e._type===Ct.VARIABLE?e.evaluate=e._evaluateVariable:e._type===Ct.VARIABLE_IN_STRING?e.evaluate=e._evaluateVariableString:e._type===Ct.LITERAL_COLOR?e.evaluate=e._evaluateLiteralColor:e._type===Ct.LITERAL_VECTOR?e.evaluate=e._evaluateLiteralVector:e._type===Ct.LITERAL_STRING?e.evaluate=e._evaluateLiteralString:e._type===Ct.REGEX?e.evaluate=e._evaluateRegExp:e._type===Ct.BUILTIN_VARIABLE?e._value==="tiles3d_tileset_time"&&(e.evaluate=X5e):e.evaluate=e._evaluateLiteral}function X5e(e){return l(e)?e.content.tileset.timeSinceLoad:0}function N5e(e){let t=V5[e];return function(n){let i=this._left.evaluate(n);return t(e,i)}}function Y5e(e){let t=R5[e];return function(n){let i=this._left.evaluate(n),o=this._right.evaluate(n);return t(e,i,o)}}function w5e(e){let t=tj[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 E5(e,t){if(l(e))return e.getPropertyInherited(t)}vt.prototype._evaluateLiteral=function(){return this._value};vt.prototype._evaluateLiteralColor=function(e){let t=C5,n=this._left;if(this._value==="color")l(n)?n.length>1?(U.fromCssColorString(n[0].evaluate(e),t),t.alpha=n[1].evaluate(e)):U.fromCssColorString(n[0].evaluate(e),t):U.fromBytes(255,255,255,255,t);else if(this._value==="rgb")U.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),255,t);else if(this._value==="rgba"){let i=n[3].evaluate(e)*255;U.fromBytes(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),i,t)}else this._value==="hsl"?U.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),1,t):this._value==="hsla"&&U.fromHsl(n[0].evaluate(e),n[1].evaluate(e),n[2].evaluate(e),n[3].evaluate(e),t);return se.fromColor(t,Xn.getCartesian4())};vt.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 M)t.push(c.x,c.y);else if(c instanceof m)t.push(c.x,c.y,c.z);else if(c instanceof se)t.push(c.x,c.y,c.z,c.w);else throw new le(`${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 le(`Invalid ${n} constructor. No valid arguments.`);if(r<s&&r>1)throw new le(`Invalid ${n} constructor. Not enough arguments.`);if(r>s&&o>1)throw new le(`Invalid ${n} constructor. Too many arguments.`);if(r===1){let a=t[0];t.push(a,a,a)}if(n==="vec2")return M.fromArray(t,0,Xn.getCartesian2());if(n==="vec3")return m.fromArray(t,0,Xn.getCartesian3());if(n==="vec4")return se.fromArray(t,0,Xn.getCartesian4())};vt.prototype._evaluateLiteralString=function(){return this._value};vt.prototype._evaluateVariableString=function(e){let t=this._value,n=vv.exec(t);for(;n!==null;){let i=n[0],o=n[1],r=E5(e,o);l(r)||(r=""),t=t.replace(i,r),vv.lastIndex+=r.length-i.length,n=vv.exec(t)}return t};vt.prototype._evaluateVariable=function(e){return E5(e,this._value)};function t_(e){return e._value==="feature"}vt.prototype._evaluateMemberDot=function(e){if(t_(this._left))return E5(e,this._right.evaluate(e));let t=this._left.evaluate(e);if(!l(t))return;let n=this._right.evaluate(e);if(t instanceof M||t instanceof m||t instanceof se){if(n==="r")return t.x;if(n==="g")return t.y;if(n==="b")return t.z;if(n==="a")return t.w}return t[n]};vt.prototype._evaluateMemberBrackets=function(e){if(t_(this._left))return E5(e,this._right.evaluate(e));let t=this._left.evaluate(e);if(!l(t))return;let n=this._right.evaluate(e);if(t instanceof M||t instanceof m||t instanceof se){if(n===0||n==="r")return t.x;if(n===1||n==="g")return t.y;if(n===2||n==="b")return t.z;if(n===3||n==="a")return t.w}return t[n]};vt.prototype._evaluateArray=function(e){let t=[];for(let n=0;n<this._value.length;n++)t[n]=this._value[n].evaluate(e);return t};vt.prototype._evaluateNot=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new le(`Operator "!" requires a boolean argument. Argument is ${t}.`);return!t};vt.prototype._evaluateNegative=function(e){let t=this._left.evaluate(e);if(t instanceof M)return M.negate(t,Xn.getCartesian2());if(t instanceof m)return m.negate(t,Xn.getCartesian3());if(t instanceof se)return se.negate(t,Xn.getCartesian4());if(typeof t=="number")return-t;throw new le(`Operator "-" requires a vector or number argument. Argument is ${t}.`)};vt.prototype._evaluatePositive=function(e){let t=this._left.evaluate(e);if(!(t instanceof M||t instanceof m||t instanceof se||typeof t=="number"))throw new le(`Operator "+" requires a vector or number argument. Argument is ${t}.`);return t};vt.prototype._evaluateLessThan=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new le(`Operator "<" requires number arguments. Arguments are ${t} and ${n}.`);return t<n};vt.prototype._evaluateLessThanOrEquals=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new le(`Operator "<=" requires number arguments. Arguments are ${t} and ${n}.`);return t<=n};vt.prototype._evaluateGreaterThan=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new le(`Operator ">" requires number arguments. Arguments are ${t} and ${n}.`);return t>n};vt.prototype._evaluateGreaterThanOrEquals=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(typeof t!="number"||typeof n!="number")throw new le(`Operator ">=" requires number arguments. Arguments are ${t} and ${n}.`);return t>=n};vt.prototype._evaluateOr=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new le(`Operator "||" requires boolean arguments. First argument is ${t}.`);if(t)return!0;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new le(`Operator "||" requires boolean arguments. Second argument is ${n}.`);return t||n};vt.prototype._evaluateAnd=function(e){let t=this._left.evaluate(e);if(typeof t!="boolean")throw new le(`Operator "&&" requires boolean arguments. First argument is ${t}.`);if(!t)return!1;let n=this._right.evaluate(e);if(typeof n!="boolean")throw new le(`Operator "&&" requires boolean arguments. Second argument is ${n}.`);return t&&n};vt.prototype._evaluatePlus=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof M&&t instanceof M)return M.add(t,n,Xn.getCartesian2());if(n instanceof m&&t instanceof m)return m.add(t,n,Xn.getCartesian3());if(n instanceof se&&t instanceof se)return se.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 le(`Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are ${t} and ${n}.`)};vt.prototype._evaluateMinus=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof M&&t instanceof M)return M.subtract(t,n,Xn.getCartesian2());if(n instanceof m&&t instanceof m)return m.subtract(t,n,Xn.getCartesian3());if(n instanceof se&&t instanceof se)return se.subtract(t,n,Xn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t-n;throw new le(`Operator "-" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};vt.prototype._evaluateTimes=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof M&&t instanceof M)return M.multiplyComponents(t,n,Xn.getCartesian2());if(n instanceof M&&typeof t=="number")return M.multiplyByScalar(n,t,Xn.getCartesian2());if(t instanceof M&&typeof n=="number")return M.multiplyByScalar(t,n,Xn.getCartesian2());if(n instanceof m&&t instanceof m)return m.multiplyComponents(t,n,Xn.getCartesian3());if(n instanceof m&&typeof t=="number")return m.multiplyByScalar(n,t,Xn.getCartesian3());if(t instanceof m&&typeof n=="number")return m.multiplyByScalar(t,n,Xn.getCartesian3());if(n instanceof se&&t instanceof se)return se.multiplyComponents(t,n,Xn.getCartesian4());if(n instanceof se&&typeof t=="number")return se.multiplyByScalar(n,t,Xn.getCartesian4());if(t instanceof se&&typeof n=="number")return se.multiplyByScalar(t,n,Xn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t*n;throw new le(`Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are ${t} and ${n}.`)};vt.prototype._evaluateDivide=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof M&&t instanceof M)return M.divideComponents(t,n,Xn.getCartesian2());if(t instanceof M&&typeof n=="number")return M.divideByScalar(t,n,Xn.getCartesian2());if(n instanceof m&&t instanceof m)return m.divideComponents(t,n,Xn.getCartesian3());if(t instanceof m&&typeof n=="number")return m.divideByScalar(t,n,Xn.getCartesian3());if(n instanceof se&&t instanceof se)return se.divideComponents(t,n,Xn.getCartesian4());if(t instanceof se&&typeof n=="number")return se.divideByScalar(t,n,Xn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t/n;throw new le(`Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are ${t} and ${n}.`)};vt.prototype._evaluateMod=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(n instanceof M&&t instanceof M)return M.fromElements(t.x%n.x,t.y%n.y,Xn.getCartesian2());if(n instanceof m&&t instanceof m)return m.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,Xn.getCartesian3());if(n instanceof se&&t instanceof se)return se.fromElements(t.x%n.x,t.y%n.y,t.z%n.z,t.w%n.w,Xn.getCartesian4());if(typeof t=="number"&&typeof n=="number")return t%n;throw new le(`Operator "%" requires vector or number arguments of matching types. Arguments are ${t} and ${n}.`)};vt.prototype._evaluateEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof M&&t instanceof M||n instanceof m&&t instanceof m||n instanceof se&&t instanceof se?t.equals(n):t===n};vt.prototype._evaluateNotEqualsStrict=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);return n instanceof M&&t instanceof M||n instanceof m&&t instanceof m||n instanceof se&&t instanceof se?!t.equals(n):t!==n};vt.prototype._evaluateConditional=function(e){let t=this._test.evaluate(e);if(typeof t!="boolean")throw new le(`Conditional argument of conditional expression must be a boolean. Argument is ${t}.`);return t?this._left.evaluate(e):this._right.evaluate(e)};vt.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))};vt.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))};vt.prototype._evaluateIsExactClass=function(e){return l(e)?e.isExactClass(this._left.evaluate(e)):!1};vt.prototype._evaluateIsClass=function(e){return l(e)?e.isClass(this._left.evaluate(e)):!1};vt.prototype._evaluateGetExactClassName=function(e){if(l(e))return e.getExactClassName()};vt.prototype._evaluateBooleanConversion=function(e){return!!this._left.evaluate(e)};vt.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))};vt.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))};vt.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 le(o)}return i};vt.prototype._evaluateRegExpTest=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new le(`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)};vt.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 le(`Operator "=~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};vt.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 le(`Operator "!~" requires one RegExp argument and one string argument. Arguments are ${t} and ${n}.`)};vt.prototype._evaluateRegExpExec=function(e){let t=this._left.evaluate(e),n=this._right.evaluate(e);if(!(t instanceof RegExp&&typeof n=="string"))throw new le(`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};vt.prototype._evaluateToString=function(e){let t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof M||t instanceof m||t instanceof se)return String(t);throw new le(`Unexpected function call "${this._value}".`)};function Wde(e){let t=e._left,n=t.length;for(let a=0;a<n;++a)if(t[a]._type!==Ct.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,C5)}function vde(e){let t=e._left,n=t.length;for(let o=0;o<n;++o)if(t[o]._type!==Ct.LITERAL_NUMBER)return;let i=C5;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 fy(e){return e%1===0?e.toFixed(1):e.toString()}function M5e(e){let t=fy(e.red),n=fy(e.green),i=fy(e.blue);return`vec3(${t}, ${n}, ${i})`}function Z5(e){let t=fy(e.red),n=fy(e.green),i=fy(e.blue),o=fy(e.alpha);return`vec4(${t}, ${n}, ${i}, ${o})`}function Fde(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 Ide(e,t){return l(t[e])?t[e]:Bh.NULL_SENTINEL}Bh.NULL_SENTINEL="czm_infinity";vt.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=Fde(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=Fde(this._value,e,t,this));let d,u,h;switch(a){case Ct.VARIABLE:return t_(this)?void 0:Ide(c,e);case Ct.UNARY:if(c==="Boolean")return`bool(${o})`;if(c==="Number")return`float(${o})`;if(c==="round")return`floor(${o} + 0.5)`;if(l(V5[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 le(`Error generating style shader: "${c}" is not supported.`);return c+o;case Ct.BINARY:return c==="%"?`mod(${o}, ${r})`:c==="==="?`(${o} == ${r})`:c==="!=="?`(${o} != ${r})`:c==="atan2"?`atan(${o}, ${r})`:l(R5[c])?`${c}(${o}, ${r})`:`(${o} ${c} ${r})`;case Ct.TERNARY:if(l(tj[c]))return`${c}(${o}, ${r}, ${s})`;break;case Ct.CONDITIONAL:return`(${s} ? ${o} : ${r})`;case Ct.MEMBER:return t_(this._left)?Ide(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 Ct.FUNCTION_CALL:throw new le(`Error generating style shader: "${c}" is not supported.`);case Ct.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 le("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case Ct.REGEX:throw new le("Error generating style shader: Regular expressions are not supported.");case Ct.VARIABLE_IN_STRING:throw new le("Error generating style shader: Converting a variable to a string is not supported.");case Ct.LITERAL_NULL:return Bh.NULL_SENTINEL;case Ct.LITERAL_BOOLEAN:return c?"true":"false";case Ct.LITERAL_NUMBER:return fy(c);case Ct.LITERAL_STRING:if(l(n)&&n._type===Ct.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,C5),l(i))return M5e(i);throw new le("Error generating style shader: String literals are not supported.");case Ct.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=vde(this),l(i)?Z5(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=vde(this),l(i)?Z5(i):`vec4(${d[0]} / 255.0, ${d[1]} / 255.0, ${d[2]} / 255.0, ${d[3]})`;if(c==="hsl")return i=Wde(this),l(i)?Z5(i):`vec4(czm_HSLToRGB(vec3(${d[0]}, ${d[1]}, ${d[2]})), 1.0)`;if(c==="hsla")return i=Wde(this),l(i)?(i.alpha!==1&&(t.translucent=!0),Z5(i)):(d[3]!=="1.0"&&(t.translucent=!0),`vec4(czm_HSLToRGB(vec3(${d[0]}, ${d[1]}, ${d[2]})), ${d[3]})`)}break;case Ct.LITERAL_VECTOR:u=o.length,h=`${c}(`;for(let p=0;p<u;++p)h+=o[p],p<u-1&&(h+=", ");return h+=")",h;case Ct.LITERAL_REGEX:throw new le("Error generating style shader: Regular expressions are not supported.");case Ct.LITERAL_UNDEFINED:return Bh.NULL_SENTINEL;case Ct.BUILTIN_VARIABLE:if(c==="tiles3d_tileset_time")return c}};vt.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 Ct.VARIABLE:t_(this)||e.push(s);break;case Ct.VARIABLE_IN_STRING:for(a=vv.exec(s);a!==null;)e.push(a[1]),a=vv.exec(s);break;case Ct.LITERAL_STRING:l(t)&&t._type===Ct.MEMBER&&t_(t._left)&&e.push(s);break}};var _m=Bh;function nb(e){e=e??B.EMPTY_OBJECT,this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._vertexBatchIds=e.vertexBatchIds,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=e.indexOffsets,this._batchedIndices=e.batchedIndices,this._boundingVolume=e.boundingVolume,this._boundingVolumes=e.boundingVolumes,this._center=e.center??m.ZERO,this._va=void 0,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._uniformMap=void 0,this._vaSwap=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._rsWireframe=void 0,this._commands=[],this._commandsIgnoreShow=[],this._pickCommands=[],this._constantColor=U.clone(U.WHITE),this._highlightColor=this._constantColor,this._batchDirty=!0,this._pickCommandsDirty=!0,this._framesSinceLastRebatch=0,this._updatingAllCommands=!1,this._trianglesLength=this._indices.length/3,this._geometryByteLength=this._indices.byteLength+this._positions.byteLength+this._vertexBatchIds.byteLength,this.debugWireframe=!1,this._debugWireframe=this.debugWireframe,this._wireframeDirty=!1,this.forceRebatch=!1,this.classificationType=e.classificationType??Jn.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(nb.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}}});var k5e={position:0,a_batchId:1};function U5e(e,t){if(l(e._va))return;let n=qe.createVertexBuffer({context:t,typedArray:e._positions,usage:Fe.STATIC_DRAW}),i=qe.createVertexBuffer({context:t,typedArray:e._vertexBatchIds,usage:Fe.STATIC_DRAW}),o=qe.createIndexBuffer({context:t,typedArray:e._indices,usage:Fe.DYNAMIC_DRAW,indexDatatype:e._indices.BYTES_PER_ELEMENT===2?Me.UNSIGNED_SHORT:Me.UNSIGNED_INT}),r=[{index:0,vertexBuffer:n,componentDatatype:K.fromTypedArray(e._positions),componentsPerAttribute:3},{index:1,vertexBuffer:i,componentDatatype:K.fromTypedArray(e._vertexBatchIds),componentsPerAttribute:1}];e._va=new Mn({context:t,attributes:r,indexBuffer:o}),t.webgl2&&(e._vaSwap=new Mn({context:t,attributes:r,indexBuffer:qe.createIndexBuffer({context:t,sizeInBytes:o.sizeInBytes,usage:Fe.DYNAMIC_DRAW,indexDatatype:o.indexDatatype})})),e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0}function D5e(e,t){if(l(e._sp))return;let n=e._batchTable,i=e._attributeLocations??k5e,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=Be.replaceMain(s,"czm_non_pick_main"),s=`${s}void main()
{
czm_non_pick_main();
out_FragColor = ${o};
}
`,e._spPick=qt.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:i});return}let a=n.getVertexShaderCallback(!1,"a_batchId",void 0)(YZ),c=n.getFragmentShaderCallback(!1,void 0,!0)(sy);o=n.getPickId();let d=new Be({sources:[a]}),u=new Be({defines:["VECTOR_TILE"],sources:[c]});e._sp=qt.fromCache({context:t,vertexShaderSource:d,fragmentShaderSource:u,attributeLocations:i}),d=new Be({sources:[YZ]}),u=new Be({defines:["VECTOR_TILE"],sources:[sy]}),e._spStencil=qt.fromCache({context:t,vertexShaderSource:d,fragmentShaderSource:u,attributeLocations:i}),c=Be.replaceMain(c,"czm_non_pick_main"),c=`${c}
void main()
{
czm_non_pick_main();
out_FragColor = ${o};
}
`;let h=new Be({sources:[a]}),p=new Be({defines:["VECTOR_TILE"],sources:[c]});e._spPick=qt.fromCache({context:t,vertexShaderSource:h,fragmentShaderSource:p,attributeLocations:i})}function Pde(e){let t=e?jn.EQUAL:jn.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:t,frontOperation:{fail:Zt.KEEP,zFail:Zt.DECREMENT_WRAP,zPass:Zt.KEEP},backFunction:t,backOperation:{fail:Zt.KEEP,zFail:Zt.INCREMENT_WRAP,zPass:Zt.KEEP},reference:Ot.CESIUM_3D_TILE_MASK,mask:Ot.CESIUM_3D_TILE_MASK},stencilMask:Ot.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:qa.LESS_OR_EQUAL},depthMask:!1}}var O5e={stencilTest:{enabled:!0,frontFunction:jn.NOT_EQUAL,frontOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},backFunction:jn.NOT_EQUAL,backOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},reference:0,mask:Ot.CLASSIFICATION_MASK},stencilMask:Ot.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:tn.PRE_MULTIPLIED_ALPHA_BLEND},B5e={stencilTest:{enabled:!0,frontFunction:jn.NOT_EQUAL,frontOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},backFunction:jn.NOT_EQUAL,backOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},reference:0,mask:Ot.CLASSIFICATION_MASK},stencilMask:Ot.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function z5e(e){l(e._rsStencilDepthPass)||(e._rsStencilDepthPass=De.fromCache(Pde(!1)),e._rsStencilDepthPass3DTiles=De.fromCache(Pde(!0)),e._rsColorPass=De.fromCache(O5e),e._rsPickPass=De.fromCache(B5e))}var n_=new F,Xde=new m;function H5e(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,Xde),F.setTranslation(n_,Xde,n_),F.multiply(o,n_,n_),n_},u_highlightColor:function(){return e._highlightColor}};e._uniformMap=e._batchTable.getUniformMapCallback()(n)}function nj(e,t,n,i,o,r,s){let a=e.constructor.BYTES_PER_ELEMENT,c=r.length;for(let d=0;d<c;++d){let u=r[d],h=s[u],p=i[h],b=o[h],f=new e.constructor(e.buffer,a*p,b);t.set(f,n),i[h]=n,n+=b}return n}function K5e(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=nj(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=nj(n,s,d,i,o,u.batchIds,r),a.batchIds=a.batchIds.concat(u.batchIds),a.count=d-a.offset;else{let h=d;d=nj(n,s,d,i,o,u.batchIds,r),u.offset=h,u.count=d-h,c.push(u),a=u}}e._va.indexBuffer.copyFromArrayView(s),e._indices=s,e._batchedIndices=c}function ij(e,t,n,i,o,r,s){let a=e.bytesPerIndex,c=r.length;for(let d=0;d<c;++d){let u=r[d],h=s[u],p=i[h],b=o[h];t.copyFromBuffer(e,p*a,n*a,b*a),i[h]=n,n+=b}return n}function J5e(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=ij(a,c,0,n,i,r.batchIds,o);for(r.offset=0,r.count=d;t.length>0;){let h=t.pop();if(U.equals(h.color,r.color))d=ij(a,c,d,n,i,h.batchIds,o),r.batchIds=r.batchIds.concat(h.batchIds),r.count=d-r.offset;else{let p=d;d=ij(a,c,d,n,i,h.batchIds,o),h.offset=p,h.count=d-p,s.push(h),r=h}}let u=e._va;e._va=e._vaSwap,e._vaSwap=u,e._batchedIndices=s}function j5e(e,t){return t.color.toRgba()-e.color.toRgba()}function Q5e(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(j5e),t.webgl2?J5e(e,n):K5e(e,n),e._framesSinceLastRebatch=0,e._batchDirty=!1,e._pickCommandsDirty=!0,e._wireframeDirty=!0,!0}function q5e(e,t){let n=Q5e(e,t),i=e._commands,o=e._batchedIndices,r=o.length,s=r*2;if(l(i)&&!n&&i.length===s)return;i.length=s;let a=e._va,c=e._sp,d=e._modelMatrix??F.IDENTITY,u=e._uniformMap,h=e._boundingVolume;for(let p=0;p<r;++p){let b=o[p].offset,f=o[p].count,y=i[p*2];l(y)||(y=i[p*2]=new et({owner:e})),y.vertexArray=a,y.modelMatrix=d,y.offset=b,y.count=f,y.renderState=e._rsStencilDepthPass,y.shaderProgram=c,y.uniformMap=u,y.boundingVolume=h,y.cull=!1,y.pass=Le.TERRAIN_CLASSIFICATION;let _=et.shallowClone(y,y.derivedCommands.tileset);_.renderState=e._rsStencilDepthPass3DTiles,_.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,y.derivedCommands.tileset=_;let S=i[p*2+1];l(S)||(S=i[p*2+1]=new et({owner:e})),S.vertexArray=a,S.modelMatrix=d,S.offset=b,S.count=f,S.renderState=e._rsColorPass,S.shaderProgram=c,S.uniformMap=u,S.boundingVolume=h,S.cull=!1,S.pass=Le.TERRAIN_CLASSIFICATION;let A=et.shallowClone(S,S.derivedCommands.tileset);A.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,S.derivedCommands.tileset=A}e._commandsDirty=!0}function $5e(e,t){if(e.classificationType===Jn.TERRAIN||!t.invertClassification||l(e._commandsIgnoreShow)&&!e._commandsDirty)return;let n=e._commands,i=e._commandsIgnoreShow,o=e._spStencil,r=n.length,s=i.length=r/2,a=0;for(let c=0;c<s;++c){let d=i[c]=et.shallowClone(n[a],i[c]);d.shaderProgram=o,d.pass=Le.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,a+=2}e._commandsDirty=!1}function eDe(e){if(!e._pickCommandsDirty)return;let t=e._indexOffsets.length,n=e._pickCommands;n.length=t*2;let i=e._va,o=e._spStencil,r=e._spPick,s=e._modelMatrix??F.IDENTITY,a=e._uniformMap;for(let c=0;c<t;++c){let d=e._indexOffsets[c],u=e._indexCounts[c],h=l(e._boundingVolumes)?e._boundingVolumes[c]:e.boundingVolume,p=n[c*2];l(p)||(p=n[c*2]=new et({owner:e,pickOnly:!0})),p.vertexArray=i,p.modelMatrix=s,p.offset=d,p.count=u,p.renderState=e._rsStencilDepthPass,p.shaderProgram=o,p.uniformMap=a,p.boundingVolume=h,p.pass=Le.TERRAIN_CLASSIFICATION;let b=et.shallowClone(p,p.derivedCommands.tileset);b.renderState=e._rsStencilDepthPass3DTiles,b.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,p.derivedCommands.tileset=b;let f=n[c*2+1];l(f)||(f=n[c*2+1]=new et({owner:e,pickOnly:!0})),f.vertexArray=i,f.modelMatrix=s,f.offset=d,f.count=u,f.renderState=e._rsPickPass,f.shaderProgram=r,f.uniformMap=a,f.boundingVolume=h,f.pass=Le.TERRAIN_CLASSIFICATION;let y=et.shallowClone(f,f.derivedCommands.tileset);y.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,f.derivedCommands.tileset=y}e._pickCommandsDirty=!1}nb.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 Bs(e,r)}};nb.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function tDe(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 nDe=new U,iDe=U.WHITE,oDe=!0,rDe=/\$/;nb.prototype.applyStyle=function(e,t){if(!l(e)){tDe(this,t);return}let n=e.color,i=n instanceof _m&&!rDe.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,nDe):iDe,c.show=l(e.show)?e.show.evaluate(c):oDe}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}};nb.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 bp({color:U.clone(t),offset:s,count:a,batchIds:[e]}));let h=[],p=[],b=c[u].batchIds,f=b.length;for(let y=0;y<f;++y){let _=b[y];if(_===e)continue;let S=n[_];o[S]<s?h.push(_):p.push(_)}p.length!==0&&c.push(new bp({color:U.clone(c[u].color),offset:s+a,count:c[u].offset+c[u].count-(s+a),batchIds:p})),h.length!==0?(c[u].count=s-c[u].offset,c[u].batchIds=h):c.splice(u,1),this._batchDirty=!0};function Nde(e,t,n,i){let o=e.classificationType,r=o!==Jn.CESIUM_3D_TILE,s=o!==Jn.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 sDe(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 aDe(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=ve.LINES):(n=e._rsColorPass,i=ve.TRIANGLES);let o=e._commands,r=o.length;for(let s=0;s<r;s+=2){let a=o[s+1];a.renderState=n,a.primitiveType=i}e._debugWireframe=e.debugWireframe,e._wireframeDirty=!1}nb.prototype.update=function(e){let t=e.context;U5e(this,t),D5e(this,t),z5e(this),H5e(this,t);let n=e.passes;n.render&&(q5e(this,t),$5e(this,e),aDe(this),this._debugWireframe?sDe(e,this._commands):Nde(this,e,this._commands,this._commandsIgnoreShow)),n.pick&&(eDe(this),Nde(this,e,this._pickCommands))};nb.prototype.isDestroyed=function(){return!1};nb.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(),me(this)};var i_=nb;function du(e){this._boxes=e.boxes,this._boxBatchIds=e.boxBatchIds,this._cylinders=e.cylinders,this._cylinderBatchIds=e.cylinderBatchIds,this._ellipsoids=e.ellipsoids,this._ellipsoidBatchIds=e.ellipsoidBatchIds,this._spheres=e.spheres,this._sphereBatchIds=e.sphereBatchIds,this._modelMatrix=e.modelMatrix,this._batchTable=e.batchTable,this._boundingVolume=e.boundingVolume,this._center=e.center,l(this._center)||(l(this._boundingVolume)?this._center=m.clone(this._boundingVolume.center):this._center=m.clone(m.ZERO)),this._boundingVolumes=void 0,this._batchedIndices=void 0,this._indices=void 0,this._indexOffsets=void 0,this._indexCounts=void 0,this._positions=void 0,this._vertexBatchIds=void 0,this._batchIds=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._ready=!1,this._promise=void 0,this._error=void 0,this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=Jn.BOTH}Object.defineProperties(du.prototype,{trianglesLength:{get:function(){return l(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return l(this._primitive)?this._primitive.geometryByteLength:0}},ready:{get:function(){return this._ready}}});du.packedBoxLength=F.packedLength+m.packedLength;du.packedCylinderLength=F.packedLength+2;du.packedEllipsoidLength=F.packedLength+m.packedLength;du.packedSphereLength=m.packedLength+1;function cDe(e){let t=new Float64Array(F.packedLength+m.packedLength),n=0;return m.pack(e._center,t,n),n+=m.packedLength,F.pack(e._modelMatrix,t,n),t}function lDe(e,t){let n=0,i=t[n++],o=t[n++],r=e._boundingVolumes=new Array(o);for(let c=0;c<o;++c)r[c]=de.unpack(t,n),n+=de.packedLength;let s=t[n++],a=e._batchedIndices=new Array(s);for(let c=0;c<s;++c){let d=U.unpack(t,n);n+=U.packedLength;let u=t[n++],h=t[n++],p=t[n++],b=new Array(p);for(let f=0;f<p;++f)b[f]=t[n++];a[c]=new bp({color:d,offset:u,count:h,batchIds:b})}return i}var dDe=new Hn("createVectorTileGeometries",5),uDe=new U;function mDe(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(_,uDe);d[_]=S.toRgba()}u=e._packedBuffer=cDe(e)}let h=[];l(t)&&h.push(t.buffer,n.buffer),l(i)&&h.push(i.buffer,o.buffer),l(r)&&h.push(r.buffer,s.buffer),l(a)&&h.push(a.buffer,c.buffer),h.push(d.buffer,u.buffer);let p={boxes:l(t)?t.buffer:void 0,boxBatchIds:l(t)?n.buffer:void 0,cylinders:l(i)?i.buffer:void 0,cylinderBatchIds:l(i)?o.buffer:void 0,ellipsoids:l(r)?r.buffer:void 0,ellipsoidBatchIds:l(r)?s.buffer:void 0,spheres:l(a)?a.buffer:void 0,sphereBatchIds:l(a)?c.buffer:void 0,batchTableColors:d.buffer,packedBuffer:u.buffer},b=e._verticesPromise=dDe.scheduleTask(p,h);return l(b)?b.then(function(f){if(e.isDestroyed())return;let y=new Float64Array(f.packedBuffer);lDe(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),hDe(e),e._ready=!0}).catch(f=>{e.isDestroyed()||(e._error=f)}):void 0}}function hDe(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)}du.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};du.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};du.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};du.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};du.prototype.update=function(e){if(!this._ready){if(l(this._promise)||(this._promise=mDe(this)),l(this._error)){let t=this._error;throw this._error=void 0,t}return}this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e)};du.prototype.isDestroyed=function(){return!1};du.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),me(this)};var ib=du;function gp(e,t,n,i,o){this._tileset=e,this._tile=t,this._resource=n,this._geometries=void 0,this._metadata=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._group=void 0,this._ready=!1,bDe(this,i,o)}Object.defineProperties(gp.prototype,{featuresLength:{get:function(){return l(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return l(this._geometries)?this._geometries.trianglesLength:0}},geometryByteLength:{get:function(){return l(this._geometries)?this._geometries.geometryByteLength:0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return l(this._batchTable)?this._batchTable.batchTableByteLength:0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},batchTable:{get:function(){return this._batchTable}},group:{get:function(){return this._group},set:function(e){this._group=e}}});function fDe(e){return function(t,n){l(e._geometries)&&e._geometries.updateCommands(t,n)}}function pDe(e,t){let n,i,o,r,s,a=e.BOXES_LENGTH??0,c=e.CYLINDERS_LENGTH??0,d=e.ELLIPSOIDS_LENGTH??0,u=e.SPHERES_LENGTH??0;if(a>0&&l(e.BOX_BATCH_IDS)){let f=t.byteOffset+e.BOX_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,f,a)}if(c>0&&l(e.CYLINDER_BATCH_IDS)){let f=t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,f,c)}if(d>0&&l(e.ELLIPSOID_BATCH_IDS)){let f=t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,f,d)}if(u>0&&l(e.SPHERE_BATCH_IDS)){let f=t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset;r=new Uint16Array(t.buffer,f,u)}let h=l(n)||l(i)||l(o)||l(r),p=a>0&&!l(n)||c>0&&!l(i)||d>0&&!l(o)||u>0&&!l(r);if(h&&p)throw new le("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 bDe(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 le(`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 le("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 h=xr(i,n,a);n+=a;let p=new Uint8Array(t,n,c);n+=c;let b,f;d>0&&(b=xr(i,n,d),n+=d,u>0&&(f=new Uint8Array(t,n,u),f=new Uint8Array(f)));let y=h.BOXES_LENGTH??0,_=h.CYLINDERS_LENGTH??0,S=h.ELLIPSOIDS_LENGTH??0,A=h.SPHERES_LENGTH??0,Z=y+_+S+A,V=new Oh(e,Z,b,f,fDe(e));if(e._batchTable=V,Z===0)return;let E=e.tile.computedTransform,L;l(h.RTC_CENTER)&&(L=m.unpack(h.RTC_CENTER),F.multiplyByPoint(E,L,L));let v=pDe(h,p);if(y>0||_>0||S>0||A>0){let I,X,N,g;if(y>0){let C=p.byteOffset+h.BOXES.byteOffset;I=new Float32Array(p.buffer,C,ib.packedBoxLength*y)}if(_>0){let C=p.byteOffset+h.CYLINDERS.byteOffset;X=new Float32Array(p.buffer,C,ib.packedCylinderLength*_)}if(S>0){let C=p.byteOffset+h.ELLIPSOIDS.byteOffset;N=new Float32Array(p.buffer,C,ib.packedEllipsoidLength*S)}if(A>0){let C=p.byteOffset+h.SPHERES.byteOffset;g=new Float32Array(p.buffer,C,ib.packedSphereLength*A)}return e._geometries=new ib({boxes:I,boxBatchIds:v.boxes,cylinders:X,cylinderBatchIds:v.cylinders,ellipsoids:N,ellipsoidBatchIds:v.ellipsoids,spheres:g,sphereBatchIds:v.spheres,center:L,modelMatrix:E,batchTable:V,boundingVolume:e.tile.boundingVolume.boundingVolume}),e}return Promise.resolve(e)}function Yde(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}}gp.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)};gp.prototype.getFeature=function(e){return Yde(this),this._features[e]};gp.prototype.applyDebugSettings=function(e,t){l(this._geometries)&&this._geometries.applyDebugSettings(e,t)};gp.prototype.applyStyle=function(e){Yde(this),l(this._geometries)&&this._geometries.applyStyle(e,this._features)};gp.prototype.update=function(e,t){l(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(t)),l(this._batchTable)&&this._geometries.ready&&(this._batchTable.update(e,t),this._ready=!0)};gp.prototype.pick=function(e,t,n){};gp.prototype.isDestroyed=function(){return!1};gp.prototype.destroy=function(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),me(this)};var Fv=gp;var mRn=x(T(),1);var Syn=x(T(),1);var oj={};oj.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),wde(i,o,r,s);return c};oj.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)),wde(s,i,o,r),i.x+=s*o,i.y+=s*r,a/=BigInt(4);return[i.x,i.y]};function wde(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 wZ=oj;var Gyn=x(T(),1);var r_=30,gDe=1<<r_,yDe=1<<r_+1>>>0,rj=2*r_+1,py=4,Ude=[],Dde=[],xDe=[[0,1,3,2],[0,2,3,1],[3,2,0,1],[3,1,0,2]],by=1,MZ=2,G5=[by,0,0,by|MZ];function Ls(e){if(!an.supportsBigInt())throw new le("S2 required BigInt support");this._cellId=e,this._level=Ls.getLevel(e)}Ls.fromToken=function(e){return new Ls(Ls.getIdFromToken(e))};Ls.isValidId=function(e){return!(e<=0||e>>BigInt(rj)>5||!(e&~e+BigInt(1)&BigInt("0x1555555555555555")))};Ls.isValidToken=function(e){return/^[0-9a-fA-F]{1,16}$/.test(e)?Ls.isValidId(Ls.getIdFromToken(e)):!1};Ls.getIdFromToken=function(e){return BigInt("0x"+e+"0".repeat(16-e.length))};Ls.getTokenFromId=function(e){let t=Math.floor(GDe(e)/4),n=e.toString(16).replace(/0*$/,"");return Array(17-t-n.length).join("0")+n};Ls.getLevel=function(e){let t=0;for(;e!==BigInt(0)&&!(e&BigInt(1));)t++,e=e>>BigInt(1);return r_-(t>>1)};Ls.prototype.getChild=function(e){let t=zde(this._cellId)>>BigInt(2),n=this._cellId+BigInt(2*e+1-4)*t;return new Ls(n)};Ls.prototype.getParent=function(){let e=zde(this._cellId)<<BigInt(2);return new Ls(this._cellId&~e+BigInt(1)|e)};Ls.prototype.getParentAtLevel=function(e){let t=RDe(e);return new Ls(this._cellId&-t|t)};Ls.prototype.getCenter=function(e){e=e??ie.WGS84;let t=TDe(this._cellId,this._level);t=m.normalize(t,t);let n=pe.fromCartesian(t,ie.UNIT_SPHERE);return pe.toCartesian(n,e,new m)};Ls.prototype.getVertex=function(e,t){t=t??ie.WGS84;let n=_De(this._cellId,this._level,e);n=m.normalize(n,n);let i=pe.fromCartesian(n,ie.UNIT_SPHERE);return pe.toCartesian(i,t,new m)};Ls.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(rj-2*n).join("0"),a=BigInt(`0b${i}${r}${o}1${s}`);return new Ls(a)};function TDe(e,t){let n=SDe(e,t);return ADe(n[0],n[1],n[2])}function _De(e,t,n){let i=Ode(e,t),o=ZDe([i[1],i[2]],t),r=n>>1&1;return Bde(i[0],o[0][r^n&1],o[1][r])}function SDe(e,t){let n=Ode(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 Ode(e){Ude.length===0&&VDe();let t=Number(e>>BigInt(rj)),n=t&by,i=(1<<py)-1,o=0,r=0;for(let s=7;s>=0;s--){let c=(1<<2*(s===7?r_-7*py:py))-1;n+=Number(e>>BigInt(s*2*py+1)&BigInt(c))<<2,n=Dde[n];let d=s*py;o+=n>>py+2<<d,r+=(n>>2&i)<<d,n&=by|MZ}return[t,o,r]}function ADe(e,t,n){let i=Mde(t),o=Mde(n),r=L5(i),s=L5(o);return Bde(e,r,s)}function Bde(e,t,n){switch(e){case 0:return new m(1,t,n);case 1:return new m(-t,1,n);case 2:return new m(-t,-n,1);case 3:return new m(-1,-n,-t);case 4:return new m(n,-1,-t);default:return new m(n,t,-1)}}function L5(e){return e>=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function Mde(e){return 1/yDe*e}function ZDe(e,t){let n=[[],[]],i=CDe(t);for(let o=0;o<2;++o){let r=e[o]&-i,s=r+i;n[o][0]=L5(kde(r)),n[o][1]=L5(kde(s))}return n}function CDe(e){return 1<<r_-e>>>0}function kde(e){return 1/gDe*e}function gy(e,t,n,i,o,r){if(e===py){let s=(t<<py)+n;Ude[(s<<2)+i]=(o<<2)+r,Dde[(o<<2)+i]=(s<<2)+r}else{e++,t<<=1,n<<=1,o<<=2;let s=xDe[r];gy(e,t+(s[0]>>1),n+(s[0]&1),i,o,r^G5[0]),gy(e,t+(s[1]>>1),n+(s[1]&1),i,o+1,r^G5[1]),gy(e,t+(s[2]>>1),n+(s[2]&1),i,o+2,r^G5[2]),gy(e,t+(s[3]>>1),n+(s[3]&1),i,o+3,r^G5[3])}}function VDe(){gy(0,0,0,0,0,0),gy(0,0,0,by,0,by),gy(0,0,0,MZ,0,MZ),gy(0,0,0,by|MZ,0,by|MZ)}function zde(e){return e&~e+BigInt(1)}function RDe(e){return BigInt(1)<<BigInt(2*(r_-e))}var EDe=[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 GDe(e){return EDe[(-e&e)%BigInt(67)]}var ob=Ls;var BVn=x(T(),1);var vyn=x(T(),1);function LDe(e,t){return l(e)&&l(e.extensions)&&l(e.extensions[t])}var _i=LDe;var Xyn=x(T(),1);function sj(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 le(`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=WDe(o,t))}this._lengthBits=t,this._availableCount=n,this._constant=i,this._bitstream=o}function WDe(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(sj.prototype,{lengthBits:{get:function(){return this._lengthBits}},availableCount:{get:function(){return this._availableCount}}});sj.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 kZ=sj;var wyn=x(T(),1);function rb(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(rb.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});rb.prototype.hasProperty=function(e){return this._metadataTable.hasProperty(e)};rb.prototype.hasPropertyBySemantic=function(e){return this._metadataTable.hasPropertyBySemantic(e)};rb.prototype.getPropertyIds=function(e){return this._metadataTable.getPropertyIds(e)};rb.prototype.getProperty=function(e){return this._metadataTable.getProperty(this._entityId,e)};rb.prototype.setProperty=function(e,t){return this._metadataTable.setProperty(this._entityId,e,t)};rb.prototype.getPropertyBySemantic=function(e){return this._metadataTable.getPropertyBySemantic(this._entityId,e)};rb.prototype.setPropertyBySemantic=function(e,t){return this._metadataTable.setPropertyBySemantic(this._entityId,e,t)};var UZ=rb;var kyn=x(T(),1);var Iv={QUADTREE:"QUADTREE",OCTREE:"OCTREE"};Iv.getBranchingFactor=function(e){switch(e){case Iv.OCTREE:return 8;case Iv.QUADTREE:return 4}};Object.freeze(Iv);var Ws=Iv;var Qyn=x(T(),1);var zyn=x(T(),1);function ec(){}Object.defineProperties(ec.prototype,{class:{get:function(){he.throwInstantiationError()}}});ec.prototype.hasProperty=function(e){he.throwInstantiationError()};ec.prototype.hasPropertyBySemantic=function(e){he.throwInstantiationError()};ec.prototype.getPropertyIds=function(e){he.throwInstantiationError()};ec.prototype.getProperty=function(e){he.throwInstantiationError()};ec.prototype.setProperty=function(e,t){he.throwInstantiationError()};ec.prototype.getPropertyBySemantic=function(e){he.throwInstantiationError()};ec.prototype.setPropertyBySemantic=function(e,t){he.throwInstantiationError()};ec.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))};ec.hasPropertyBySemantic=function(e,t,n){let i=n.propertiesBySemantic;if(!l(i))return!1;let o=i[e];return l(o)};ec.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};ec.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=ze(i.default,!0),i.unpackVectorAndMatrixTypes(o,r);if(l(o))return o=i.normalize(o),o=i.applyValueTransform(o),i.unpackVectorAndMatrixTypes(o,r)};ec.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};ec.getPropertyBySemantic=function(e,t,n){let i=n.propertiesBySemantic;if(!l(i))return;let o=i[e];if(l(o))return ec.getProperty(o.id,t,n)};ec.setPropertyBySemantic=function(e,t,n,i){let o=i.propertiesBySemantic;if(!l(o))return!1;let r=i.propertiesBySemantic[e];return l(r)?ec.setProperty(r.id,t,n,i):!1};var On=ec;function sb(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(sb.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});sb.prototype.hasProperty=function(e){return On.hasProperty(e,this._properties,this._class)};sb.prototype.hasPropertyBySemantic=function(e){return On.hasPropertyBySemantic(e,this._properties,this._class)};sb.prototype.getPropertyIds=function(e){return On.getPropertyIds(this._properties,this._class,e)};sb.prototype.getProperty=function(e){return On.getProperty(e,this._properties,this._class)};sb.prototype.setProperty=function(e,t){return On.setProperty(e,t,this._properties,this._class)};sb.prototype.getPropertyBySemantic=function(e){return On.getPropertyBySemantic(e,this._properties,this._class)};sb.prototype.setPropertyBySemantic=function(e,t){return On.setPropertyBySemantic(e,t,this._properties,this._class)};var Pv=sb;var Oxn=x(T(),1);var Nxn=x(T(),1);var ixn=x(T(),1);var sn={INT8:"INT8",UINT8:"UINT8",INT16:"INT16",UINT16:"UINT16",INT32:"INT32",UINT32:"UINT32",INT64:"INT64",UINT64:"UINT64",FLOAT32:"FLOAT32",FLOAT64:"FLOAT64"},Kc={INTEGER:"int",UNSIGNED_INTEGER:"uint",FLOAT:"float"};sn.typeInfo={INT8:{vectorCompatible:!0,size:1,maximumValue:127,minimumValue:-128,category:Kc.INTEGER},UINT8:{vectorCompatible:!0,size:1,maximumValue:255,minimumValue:0,category:Kc.UNSIGNED_INTEGER},INT16:{vectorCompatible:!0,size:2,maximumValue:32767,minimumValue:-32768,category:Kc.INTEGER},UINT16:{vectorCompatible:!0,size:2,maximumValue:65535,minimumValue:0,category:Kc.UNSIGNED_INTEGER},INT32:{vectorCompatible:!0,size:4,maximumValue:2147483647,minimumValue:-2147483648,category:Kc.INTEGER},UINT32:{vectorCompatible:!0,size:4,maximumValue:4294967295,minimumValue:0,category:Kc.UNSIGNED_INTEGER},INT64:{vectorCompatible:!1,size:8,maximumValue:BigInt("9223372036854775807"),minimumValue:BigInt("-9223372036854775808"),category:Kc.INTEGER,downcastFunction:e=>sn.clampToLimits(e,sn.INT32)},UINT64:{vectorCompatible:!1,size:8,maximumValue:BigInt("18446744073709551615"),minimumValue:BigInt(0),category:Kc.UNSIGNED_INTEGER,downcastFunction:e=>sn.clampToLimits(e,sn.UINT32)},FLOAT32:{vectorCompatible:!0,size:4,maximumValue:34028234663852886e22,minimumValue:-34028234663852886e22,category:Kc.FLOAT},FLOAT64:{vectorCompatible:!0,size:8,maximumValue:Number.MAX_VALUE,minimumValue:-Number.MAX_VALUE,category:Kc.FLOAT,downcastFunction:e=>Math.fround(e)}};sn.getMinimum=function(e){return sn.typeInfo[e].minimumValue};sn.getMaximum=function(e){return sn.typeInfo[e].maximumValue};sn.isIntegerType=function(e){return sn.typeInfo[e].category!==Kc.FLOAT};sn.isUnsignedIntegerType=function(e){return sn.typeInfo[e].category===Kc.UNSIGNED_INTEGER};sn.isVectorCompatible=function(e){return sn.typeInfo[e].vectorCompatible};sn.category=function(e){return sn.typeInfo[e].category};sn.gpuComponentType=function(e){switch(e){case sn.INT64:return"INT32";case sn.UINT64:return"UINT32";case sn.FLOAT64:return"FLOAT32";default:return e}};sn.normalize=function(e,t){return Math.max(Number(e)/Number(sn.getMaximum(t)),-1)};sn.unnormalize=function(e,t){let n=sn.getMaximum(t),i=sn.isUnsignedIntegerType(t)?0:-n;return e=W.sign(e)*Math.round(Math.abs(e)*Number(n)),(t===sn.INT64||t===sn.UINT64)&&an.supportsBigInt()&&(e=BigInt(e)),e>n?n:e<i?i:e};sn.applyValueTransform=function(e,t,n){return n*e+t};sn.unapplyValueTransform=function(e,t,n){return n===0?0:(e-t)/n};sn.getSizeInBytes=function(e){return sn.typeInfo[e].size};sn.clampToLimits=function(e,t){let n=sn.getMinimum(t),i=sn.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))};sn.downcastFunction=function(e){let n=sn.typeInfo[e].downcastFunction;return l(n)?n:i=>i};sn.fromComponentDatatype=function(e){switch(e){case K.BYTE:return sn.INT8;case K.UNSIGNED_BYTE:return sn.UINT8;case K.SHORT:return sn.INT16;case K.UNSIGNED_SHORT:return sn.UINT16;case K.INT:return sn.INT32;case K.UNSIGNED_INT:return sn.UINT32;case K.FLOAT:return sn.FLOAT32;case K.DOUBLE:return sn.FLOAT64}};sn.toComponentDatatype=function(e){switch(e){case sn.INT8:return K.BYTE;case sn.UINT8:return K.UNSIGNED_BYTE;case sn.INT16:return K.SHORT;case sn.UINT16:return K.UNSIGNED_SHORT;case sn.INT32:return K.INT;case sn.UINT32:return K.UNSIGNED_INT;case sn.FLOAT32:return K.FLOAT;case sn.FLOAT64:return K.DOUBLE}};sn.getDataViewAccessors=function(e,t){return{[sn.UINT8]:{get:e.getUint8.bind(e),set:e.setUint8.bind(e)},[sn.INT8]:{get:e.getInt8.bind(e),set:e.setInt8.bind(e)},[sn.UINT16]:{get:i=>e.getUint16(i,!0),set:(i,o)=>e.setUint16(i,o,!0)},[sn.INT16]:{get:i=>e.getInt16(i,!0),set:(i,o)=>e.setInt16(i,o,!0)},[sn.UINT32]:{get:i=>e.getUint32(i,!0),set:(i,o)=>e.setUint32(i,o,!0)},[sn.INT32]:{get:i=>e.getInt32(i,!0),set:(i,o)=>e.setInt32(i,o,!0)},[sn.FLOAT32]:{get:i=>e.getFloat32(i,!0),set:(i,o)=>e.setFloat32(i,o,!0)},[sn.FLOAT64]:{get:i=>e.getFloat64(i,!0),set:(i,o)=>e.setFloat64(i,o,!0)},[sn.UINT64]:{get:i=>e.getBigUint64(i,!0),set:(i,o)=>e.setBigUint64(i,BigInt(o),!0)},[sn.INT64]:{get:i=>e.getBigInt64(i,!0),set:(i,o)=>e.setBigInt64(i,BigInt(o),!0)}}[t]};Object.freeze(sn);var Pt=sn;var Zxn=x(T(),1);var uxn=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 M;case qo.VEC3:return m;case qo.VEC4:return se;case qo.MAT2:return Oi;case qo.MAT3:return q;case qo.MAT4:return F;default:return}};Object.freeze(qo);var gt=qo;function Jr(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)&&Pt.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=ze(e.min,!0),this._max=ze(e.max,!0),this._normalized=r;let s=ze(e.offset,!0),a=ze(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=ze(e.noData,!0),this._default=ze(e.default,!0),this._required=e.required??!0,this._extras=ze(e.extras,!0),this._extensions=ze(e.extensions,!0)}Jr.fromJson=function(e){e=e??B.EMPTY_OBJECT;let t=e.id,n=e.property,i=vDe(n),o=FDe(n,e.enums),r;return l(i)?i?r=l(n.optional)?!n.optional:!0:r=n.required??!1:r=!1,new Jr({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(Jr.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 vDe(e){if(e.type==="ARRAY")return!0;let t=e.type;if(t===gt.SCALAR||gt.isMatrixType(t)||gt.isVectorType(t))return!1;if(l(Pt[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 FDe(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===gt.ENUM)return{type:n,componentType:void 0,enumType:c,valueType:c.valueType,isArray:r,isVariableLengthArray:a,arrayLength:s};if(o&&i===gt.ENUM)return{type:i,componentType:void 0,enumType:c,valueType:c.valueType,isArray:r,isVariableLengthArray:a,arrayLength:s};if(n===gt.SCALAR||gt.isMatrixType(n)||gt.isVectorType(n))return{type:n,componentType:i,enumType:void 0,valueType:i,isArray:r,isVariableLengthArray:a,arrayLength:s};if(n===gt.BOOLEAN||n===gt.STRING)return{type:n,componentType:void 0,enumType:void 0,valueType:void 0,isArray:r,isVariableLengthArray:a,arrayLength:s};if(o&&(i===gt.BOOLEAN||i===gt.STRING))return{type:i,componentType:void 0,enumType:void 0,valueType:void 0,isArray:r,isVariableLengthArray:a,arrayLength:s};if(l(i)&&l(Pt[i]))return{type:gt.SCALAR,componentType:i,enumType:void 0,valueType:i,isArray:r,isVariableLengthArray:a,arrayLength:s};if(l(Pt[n]))return{type:gt.SCALAR,componentType:n,enumType:void 0,valueType:n,isArray:r,isVariableLengthArray:a,arrayLength:s}}Jr.prototype.normalize=function(e){return this._normalized?aj(e,this._valueType,Pt.normalize):e};Jr.prototype.unnormalize=function(e){return this._normalized?aj(e,this._valueType,Pt.unnormalize):e};Jr.prototype.applyValueTransform=function(e){return!this._hasValueTransform||this._isVariableLengthArray?e:Jr.valueTransformInPlace(e,this._offset,this._scale,Pt.applyValueTransform)};Jr.prototype.unapplyValueTransform=function(e){return!this._hasValueTransform||this._isVariableLengthArray?e:Jr.valueTransformInPlace(e,this._offset,this._scale,Pt.unapplyValueTransform)};Jr.prototype.expandConstant=function(e,t){t=t??!1;let n=this._isArray,i=this._arrayLength,o=gt.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)};Jr.prototype.handleNoData=function(e){let t=this._noData;if(!l(t))return e;if(!jde(e,t))return e};function jde(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(!jde(e[n],t[n]))return!1;return!0}Jr.prototype.unpackVectorAndMatrixTypes=function(e,t){t=t??!1;let n=gt.getMathType(this._type),i=this._isArray,o=gt.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};Jr.prototype.packVectorAndMatrixTypes=function(e,t){t=t??!1;let n=gt.getMathType(this._type),i=this._isArray,o=gt.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};Jr.prototype.validate=function(e){if(!(!l(e)&&l(this._default)))return this._required&&!l(e)?"required property must have a value":this._isArray?IDe(this,e):Qde(this,e)};function IDe(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=Qde(e,t[i]);if(l(o))return o}}function Qde(e,t){let n=e._type,i=e._componentType,o=e._enumType,r=e._normalized;return gt.isVectorType(n)?PDe(t,n,i):gt.isMatrixType(n)?XDe(t,n,i):n===gt.STRING?NDe(t):n===gt.BOOLEAN?YDe(t):n===gt.ENUM?wDe(t,o):MDe(t,i,r)}function PDe(e,t,n){if(!Pt.isVectorCompatible(n))return`componentType ${n} is incompatible with vector type ${t}`;if(t===gt.VEC2&&!(e instanceof M))return`vector value ${e} must be a Cartesian2`;if(t===gt.VEC3&&!(e instanceof m))return`vector value ${e} must be a Cartesian3`;if(t===gt.VEC4&&!(e instanceof se))return`vector value ${e} must be a Cartesian4`}function XDe(e,t,n){if(!Pt.isVectorCompatible(n))return`componentType ${n} is incompatible with matrix type ${t}`;if(t===gt.MAT2&&!(e instanceof Oi))return`matrix value ${e} must be a Matrix2`;if(t===gt.MAT3&&!(e instanceof q))return`matrix value ${e} must be a Matrix3`;if(t===gt.MAT4&&!(e instanceof F))return`matrix value ${e} must be a Matrix4`}function NDe(e){if(typeof e!="string")return W5(e,gt.STRING)}function YDe(e){if(typeof e!="boolean")return W5(e,gt.BOOLEAN)}function wDe(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 MDe(e,t,n){let i=typeof e;switch(t){case Pt.INT8:case Pt.UINT8:case Pt.INT16:case Pt.UINT16:case Pt.INT32:case Pt.UINT32:case Pt.FLOAT32:case Pt.FLOAT64:return i!=="number"?W5(e,t):isFinite(e)?Kde(e,t,n):Jde(e,t);case Pt.INT64:case Pt.UINT64:return i!=="number"&&i!=="bigint"?W5(e,t):i==="number"&&!isFinite(e)?Jde(e,t):Kde(e,t,n)}}function W5(e,t){return`value ${e} does not match type ${t}`}function Hde(e,t,n){let i=`value ${e} is out of range for type ${t}`;return n&&(i+=" (normalized)"),i}function Kde(e,t,n){if(n){let i=Pt.isUnsignedIntegerType(t)?0:-1;return e<i||e>1?Hde(e,t,n):void 0}if(e<Pt.getMinimum(t)||e>Pt.getMaximum(t))return Hde(e,t,n)}function Jde(e,t){return`value ${e} of type ${t} must be finite`}function aj(e,t,n){if(!Array.isArray(e))return n(e,t);for(let i=0;i<e.length;i++)e[i]=aj(e[i],t,n);return e}Jr.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]=Jr.valueTransformInPlace(e[o],t[o],n[o],i);return e};Jr.prototype.cpuBytesPerElement=function(){return qde(this,this.valueType)};Jr.prototype.gpuBytesPerElement=function(){let e=Pt.gpuComponentType(this.valueType);return qde(this,e)};function qde(e,t){let n=e.type,i=gt.getComponentCount(n),o=e.isArray?e.arrayLength:1,r=Pt.getSizeInBytes(t);return i*o*r}Jr.prototype.isGpuCompatible=function(e){let t=this.type;return!(this.isVariableLengthArray||t===gt.STRING||t===gt.BOOLEAN||this.gpuBytesPerElement()>e)};var cj=[void 0,"float","vec2","vec3","vec4"],$de=[void 0,"int","ivec2","ivec3","ivec4"],kDe=[void 0,"uint","uvec2","uvec3","uvec4"],UDe={[Kc.FLOAT]:"uintBitsToFloat",[Kc.INTEGER]:"int",[Kc.UNSIGNED_INTEGER]:""};Jr.prototype.getGlslTypeWebGL1=function(){let e=gt.getComponentCount(this.type);return this.isArray&&(e=this.arrayLength),this.normalized?cj[e]:$de[e]};Jr.prototype.getGlslType=function(){let e=this.valueType,t=gt.getComponentCount(this.type),n=this.isArray?this.arrayLength:1;return t*=n,!Pt.isIntegerType(e)||this.normalized?cj[t]:Pt.isUnsignedIntegerType(e)?kDe[t]:$de[t]};Jr.prototype.unpackTextureInShader=function(e,t,n,i){let o=this.getGlslType(),r=Pt.gpuComponentType(this.valueType),s=t.length,a=this.type,c=gt.getComponentCount(a)*(this.isArray?this.arrayLength:1),d=Math.floor(s/c),u=`${n}_rawChannels`,h=`${n}_rawBits`,p=`${n}_unpackedValue`,b=`${o} ${p};`,f=`uint ${h};`;i.push(b),i.push(f);let y=`${cj[s]} ${u} = ${e};`;i.push(y);let _=UDe[Pt.category(r)],S=c>1;for(let A=0;A<c;A++){let Z="rgba".slice(A*d,(A+1)*d),V=s>1?`.${Z}`:"",E=`${h} = czm_unpackTexture(${u}${V});`,L="";S&&(L=`[${A}]`);let v="",I="";if(this.normalized){let N=Pt.getMaximum(r);v=` * ${1/Number(N)}`,I="float"}let X=`${p}${L} = ${I}(${_}(${h}))${v};`;i.push(E),i.push(X)}return p};Jr.prototype.unpackTextureInShaderWebGL1=function(e){return this.normalized?e:`${this.getGlslTypeWebGL1()}(255.0 * ${e})`};var yp=Jr;function Xv(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===gt.STRING,h=r===gt.BOOLEAN,p=0,b;if(a){let g=n.arrayOffsetType??n.offsetType;g=Pt[g]??Pt.UINT32;let C=n.arrayOffsets??n.arrayOffsetBufferView;b=new lj(o[C],g,t+1),p+=b.typedArray.byteLength}let f=gt.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=Pt[g]??Pt.UINT32;let C=n.stringOffsets??n.stringOffsetBufferView;S=new lj(o[C],g,_+1),p+=S.typedArray.byteLength}(u||h)&&(c=Pt.UINT8);let A;u?A=S.get(_)-S.get(0):h?A=Math.ceil(_/8):A=_;let Z=n.values??n.bufferView,V=new lj(o[Z],c,A);p+=V.typedArray.byteLength;let E=n.offset,L=n.scale,v=i.hasValueTransform||l(E)||l(L);E=E??i.offset,L=L??i.scale,E=eue(E),L=eue(L);let I,X,N=this;u?I=function(g){return BDe(g,N._values,N._stringOffsets)}:h?(I=function(g){return zDe(g,N._values)},X=function(g,C){HDe(g,N._values,C)}):l(d)?(I=function(g){let C=N._values.get(g);return d.namesByValue[C]},X=function(g,C){let R=d.valuesByName[C];N._values.set(g,R)}):(I=function(g){return N._values.get(g)},X=function(g,C){N._values.set(g,C)}),this._arrayOffsets=b,this._stringOffsets=S,this._values=V,this._classProperty=i,this._count=t,this._vectorComponentCount=f,this._min=n.min,this._max=n.max,this._offset=E,this._scale=L,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(Xv.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}}});Xv.prototype.get=function(e){let t=DDe(this,e);return t=this._classProperty.handleNoData(t),l(t)?(t=this._classProperty.normalize(t),t=tOe(this,t),this._classProperty.unpackVectorAndMatrixTypes(t)):(t=this._classProperty.default,this._classProperty.unpackVectorAndMatrixTypes(t))};Xv.prototype.set=function(e,t){let n=this._classProperty;t=n.packVectorAndMatrixTypes(t),t=nOe(this,t),t=n.unnormalize(t),ODe(this,e,t)};Xv.prototype.getTypedArray=function(){if(l(this._values))return this._values.typedArray};function eue(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 DDe(e,t){nue(e)&&iue(e);let n=e._classProperty,i=n.isArray,o=n.type,r=gt.getComponentCount(o);if(l(e._unpackedValues)){let s=e._unpackedValues[t];return i?ze(s,!0):s}return!i&&r===1?e._getValue(t):tue(e,n,t)}function tue(e,t,n){let i,o;if(t.isVariableLengthArray){i=e._arrayOffsets.get(n),o=e._arrayOffsets.get(n+1)-i;let s=gt.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 ODe(e,t,n){$De(e,t,n)&&iue(e);let i=e._classProperty,o=i.isArray,r=i.type,s=gt.getComponentCount(r);if(l(e._unpackedValues)){i.isArray&&(n=ze(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 BDe(e,t,n){let i=n.get(e),o=n.get(e+1)-i;return Zd(t.typedArray,i,o)}function zDe(e,t){let n=e>>3,i=e%8;return(t.typedArray[n]>>i&1)===1}function HDe(e,t,n){let i=e>>3,o=e%8;n?t.typedArray[i]|=1<<o:t.typedArray[i]&=~(1<<o)}function KDe(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 JDe(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 jDe(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 QDe(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 qDe(e){switch(e){case Pt.INT8:return K.BYTE;case Pt.UINT8:return K.UNSIGNED_BYTE;case Pt.INT16:return K.SHORT;case Pt.UINT16:return K.UNSIGNED_SHORT;case Pt.INT32:return K.INT;case Pt.UINT32:return K.UNSIGNED_INT;case Pt.FLOAT32:return K.FLOAT;case Pt.FLOAT64:return K.DOUBLE}}function nue(e){if(l(e._unpackedValues))return!1;let t=e._classProperty,n=t.type,i=t.valueType;return n===gt.STRING||i===Pt.INT64&&!an.supportsBigInt64Array()||i===Pt.UINT64&&!an.supportsBigUint64Array()}function $De(e,t,n){if(nue(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 iue(e){e._unpackedValues=eOe(e),e._arrayOffsets=void 0,e._stringOffsets=void 0,e._values=void 0}function eOe(e){let t=e._count,n=new Array(t),i=e._classProperty,o=i.isArray,r=i.type,s=gt.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]=tue(e,i,a);return n}function tOe(e,t){let i=e._classProperty.isVariableLengthArray;return!e._hasValueTransform||i?t:yp.valueTransformInPlace(t,e._offset,e._scale,Pt.applyValueTransform)}function nOe(e,t){let i=e._classProperty.isVariableLengthArray;return!e._hasValueTransform||i?t:yp.valueTransformInPlace(t,e._offset,e._scale,Pt.unapplyValueTransform)}function lj(e,t,n){let i=this,o,r,s;if(t===Pt.INT64)an.supportsBigInt()?an.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 JDe(a,i)}):(Tt("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 KDe(a,i)});else if(t===Pt.UINT64)an.supportsBigInt()?an.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 QDe(a,i)}):(Tt("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 jDe(a,i)});else{let a=qDe(t);o=K.createArrayBufferView(a,e.buffer,e.byteOffset,n),s=function(c,d){i.typedArray[c]=d}}l(r)||(r=function(a){return i.typedArray[a]}),this.typedArray=o,this.dataView=new DataView(o.buffer,o.byteOffset),this.get=r,this.set=s,this._componentType=t}var Nv=Xv;function zh(e){e=e??B.EMPTY_OBJECT;let t=e.count,n=e.class,i=0,o={};if(l(e.properties)){for(let r in e.properties)if(e.properties.hasOwnProperty(r)){let s=new Nv({count:t,property:e.properties[r],classProperty:n.properties[r],bufferViews:e.bufferViews});o[r]=s,i+=s.byteLength}}this._count=t,this._class=n,this._properties=o,this._byteLength=i}Object.defineProperties(zh.prototype,{count:{get:function(){return this._count}},class:{get:function(){return this._class}},byteLength:{get:function(){return this._byteLength}},properties:{get:function(){return this._properties}}});zh.prototype.hasProperty=function(e){return On.hasProperty(e,this._properties,this._class)};zh.prototype.hasPropertyBySemantic=function(e){return On.hasPropertyBySemantic(e,this._properties,this._class)};zh.prototype.getPropertyIds=function(e){return On.getPropertyIds(this._properties,this._class,e)};zh.prototype.getProperty=function(e,t){let n=this._properties[t],i;return l(n)?i=n.get(e):i=iOe(this._class,t),i};zh.prototype.setProperty=function(e,t,n){let i=this._properties[t];return l(i)?(i.set(e,n),!0):!1};zh.prototype.getPropertyBySemantic=function(e,t){let n,i=this._class.propertiesBySemantic;if(l(i)&&(n=i[t]),l(n))return this.getProperty(e,n.id)};zh.prototype.setPropertyBySemantic=function(e,t,n){let i,o=this._class.propertiesBySemantic;return l(o)&&(i=o[t]),l(i)?this.setProperty(e,i.id,n):!1};zh.prototype.getPropertyTypedArray=function(e){let t=this._properties[e];if(l(t))return t.getTypedArray()};zh.prototype.getPropertyTypedArrayBySemantic=function(e){let t,n=this._class.propertiesBySemantic;if(l(n)&&(t=n[e]),l(t))return this.getPropertyTypedArray(t.id)};function iOe(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=ze(o,!0)),o=i.normalize(o),i.unpackVectorAndMatrixTypes(o)}}var Sm=zh;var vVn=x(T(),1);var oTn=x(T(),1);var jxn=x(T(),1);var dj=class{get cacheKey(){he.throwInstantiationError()}load(){he.throwInstantiationError()}unload(){}process(t){return!1}getError(t,n){l(n)&&l(n.message)&&(t+=`
${n.message}`);let i=new le(t);return l(n)&&(i.stack=`Original stack:
${n.stack}
Handler stack:
${i.stack}`),i}isDestroyed(){return!1}destroy(){return this.unload(),me(this)}},Hi=dj;var qxn=x(T(),1),oue={UNLOADED:0,LOADING:1,LOADED:2,PROCESSING:3,READY:4,FAILED:5};Object.freeze(oue);var ut=oue;var v5=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=ut.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=oOe(this),this._promise)}static _fetchArrayBuffer(t){return t.fetchArrayBuffer()}unload(){this._typedArray=void 0}};async function oOe(e){let t=e._resource;e._state=ut.LOADING;try{let n=await v5._fetchArrayBuffer(t);return e.isDestroyed()?void 0:(e._typedArray=new Uint8Array(n),e._state=ut.READY,e)}catch(n){if(e.isDestroyed())return;e._state=ut.FAILED;let i=`Failed to load external buffer: ${t.url}`;throw e.getError(i,n)}}var s_=v5;var GTn=x(T(),1);var gTn=x(T(),1);var aTn=x(T(),1),rTn=(function(){var e="b9H79Tebbbe9ok9Geueu9Geub9Gbb9Gruuuuuuueu9Gvuuuuueu9Gduueu9Gluuuueu9Gvuuuuub9Gouuuuuub9Gluuuub9GiuuueuiE8AdilveoveovrrwrrrDDoDrbqqbelve9Weiiviebeoweuecj:Gdkr:PlCo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8F9TW79O9V9Wt9FW9U9J9V9KW9wWV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;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),Z=S(y*4),V=new Uint8Array(n.exports.memory.buffer),E=s(f);V.set(E,A),_&&_(A,A,f.length,y);var L=b(Z,A,f.length,y);V=new Uint8Array(n.exports.memory.buffer);var v=new Uint32Array(y);new Uint8Array(v.buffer).set(V.subarray(Z,Z+y*4)),E.set(V.subarray(A,A+f.length*4)),S(A-S(0));for(var I=0;I<f.length;++I)f[I]=v[f[I]];return[v,L]}function c(b,f,y,_){var S=n.exports.sbrk,A=S(y*4),Z=S(y*_),V=new Uint8Array(n.exports.memory.buffer);V.set(s(f),Z),b(A,Z,y,_),V=new Uint8Array(n.exports.memory.buffer);var E=new Uint32Array(y);return new Uint8Array(E.buffer).set(V.subarray(A,A+y*4)),S(A-S(0)),E}function d(b,f,y,_,S,A,Z){var V=n.exports.sbrk,E=V(f),L=V(_*S),v=new Uint8Array(n.exports.memory.buffer);v.set(s(y),L);var I=b(E,f,L,_,S,A,Z),X=new Uint8Array(I);return X.set(v.subarray(E,E+I)),V(E-V(0)),X}function u(b){for(var f=0,y=0;y<b.length;++y){var _=b[y];f=f<_?_:f}return f}function h(b,f){if(r(f==2||f==4),f==4)return new Uint32Array(b.buffer,b.byteOffset,b.byteLength/4);var y=new Uint16Array(b.buffer,b.byteOffset,b.byteLength/2);return new Uint32Array(y)}function p(b,f,y,_,S,A,Z){var V=n.exports.sbrk,E=V(y*_),L=V(y*A),v=new Uint8Array(n.exports.memory.buffer);v.set(s(f),L),b(E,y,_,S,L,Z);var I=new Uint8Array(y*_);return I.set(v.subarray(E,E+y*_)),V(E-V(0)),I}return{ready:i,supported:!0,reorderMesh:function(b,f,y){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 _=h(b,y),S=n.exports.meshopt_encodeIndexBufferBound(f,u(_)+1);return d(n.exports.meshopt_encodeIndexBuffer,S,_,f,4)},encodeIndexSequence:function(b,f,y){r(y==2||y==4);var _=h(b,y),S=n.exports.meshopt_encodeIndexSequenceBound(f,u(_)+1);return d(n.exports.meshopt_encodeIndexSequence,S,_,f,4)},encodeGltfBuffer:function(b,f,y,_,S){var A={ATTRIBUTES:this.encodeVertexBufferLevel,TRIANGLES:this.encodeIndexBuffer,INDICES:this.encodeIndexSequence};return r(A[_]),A[_](b,f,y,2,S===void 0?0:S)},encodeFilterOct:function(b,f,y,_){return r(y==4||y==8),r(_>=2&&_<=16),p(n.exports.meshopt_encodeFilterOct,b,f,y,_,16)},encodeFilterQuat:function(b,f,y,_){return r(y==8),r(_>=4&&_<=16),p(n.exports.meshopt_encodeFilterQuat,b,f,y,_,16)},encodeFilterExp:function(b,f,y,_,S){r(y>0&&y%4==0),r(_>=1&&_<=24);var A={Separate:0,SharedVector:1,SharedComponent:2,Clamped:3};return 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 lTn=x(T(),1),yy=(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:mea8FpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogapxiiiiiiiiiiiiiiiip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9Abbbaradfgraaa8Fa8FpmxmPsxmPsxmPsxmPsp9rgap9Abbbaradfgraaa8Ja8KpmwKDYq8AkEx3m5P8Es8Fg8Ja8Ma8NpmwKDYq8AkEx3m5P8Es8Fg8KpmbezHdiOAlvCXorQLg8Faip:Rea8Falp:Tep9qg8Fp9rgap9Abbbaradfgraaa8Fa8Fpmlvorlvorlvorlvorp9rgap9Abbbaradfgraaa8Fa8FpmwDqkwDqkwDqkwDqkp9rgap9Abbbaradfgraaa8Fa8FpmxmPsxmPsxmPsxmPsp9rgap9Abbbaradfgraaa8Ja8KpmwDKYqk8AExm35Ps8E8Fg8Faip:Rea8Falp:Tep9qg8Fp9rgap9Abbbaradfgraaa8Fa8Fpmlvorlvorlvorlvorp9rgap9Abbbaradfgraaa8Fa8FpmwDqkwDqkwDqkwDqkp9rgap9Abbbaradfgraaa8Fa8FpmxmPsxmPsxmPsxmPsp9rgap9AbbbaradfhraoczfgoaQ6mbkka8Aclfg8Aad6mbkdnaCad2goTmbaOavcjdfao;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),Z=0;Z<S.length;++Z){var V=S.charCodeAt(Z);A[Z]=V>96?V-97:V>64?V-39:V+4}for(var E=0,Z=0;Z<S.length;++Z)A[E++]=A[Z]<60?i[A[Z]]:(A[Z]-60)*64+A[++Z];return A.buffer.slice(0,E)}function c(S,A,Z,V,E,L,v){var I=S.exports.sbrk,X=V+3&-4,N=I(X*E),g=I(L.length),C=new Uint8Array(S.exports.memory.buffer);C.set(L,g);var R=A(N,V,E,g,L.length);if(R==0&&v&&v(N,X,E),Z.set(C.subarray(N,N+V*E)),I(N-I(0)),R!=0)throw new Error("Malformed buffer data: "+R)}var d={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp",COLOR:"meshopt_decodeFilterColor"},u={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},h=[],p=0;function b(S){var A={object:new Worker(S),pending:0,requests:{}};return A.object.onmessage=function(Z){var V=Z.data;A.pending-=V.count,A.requests[V.id][V.action](V.value),delete A.requests[V.id]},A}function f(S){for(var A="self.ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(o)+"]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = "+_.name+";"+c.toString()+_.toString(),Z=new Blob([A],{type:"text/javascript"}),V=URL.createObjectURL(Z),E=h.length;E<S;++E)h[E]=b(V);for(var E=S;E<h.length;++E)h[E].object.postMessage({});h.length=S,URL.revokeObjectURL(V)}function y(S,A,Z,V,E){for(var L=h[0],v=1;v<h.length;++v)h[v].pending<L.pending&&(L=h[v]);return new Promise(function(I,X){var N=new Uint8Array(Z),g=++p;L.pending+=S,L.requests[g]={resolve:I,reject:X},L.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(Z){if(!A.id)return self.close();try{var V=new Uint8Array(A.count*A.size);c(Z,Z.exports[A.mode],V,A.count,A.size,A.source,Z.exports[A.filter]),self.postMessage({id:A.id,count:A.count,action:"resolve",value:V},[V.buffer])}catch(E){self.postMessage({id:A.id,count:A.count,action:"reject",value:E})}})}return{ready:s,supported:!0,useWorkers:function(S){f(S)},decodeVertexBuffer:function(S,A,Z,V,E){c(r,r.exports.meshopt_decodeVertexBuffer,S,A,Z,V,r.exports[d[E]])},decodeIndexBuffer:function(S,A,Z,V){c(r,r.exports.meshopt_decodeIndexBuffer,S,A,Z,V)},decodeIndexSequence:function(S,A,Z,V){c(r,r.exports.meshopt_decodeIndexSequence,S,A,Z,V)},decodeGltfBuffer:function(S,A,Z,V,E,L){c(r,r.exports[u[E]],S,A,Z,V,r.exports[d[L]])},decodeGltfBufferAsync:function(S,A,Z,V,E){return h.length>0?y(S,A,Z,u[V],d[E]):s.then(function(){var L=new Uint8Array(S*A);return c(r,r.exports[u[V]],L,S,A,Z,r.exports[d[E]]),L})}}})();var mTn=x(T(),1),dTn=(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;8ealTmbdnaCmbcbhCxekarcd4hgdnazTmbaCcdthhcbh8Fa8Phainaoaza8Fcdtfydbag2cdtfhKasheaahHaChAinaHaKaeydbcdtgXfIdbawaXfIdbNUdbaeclfheaHclfhHaAcufgAmbkaaahfhaa8Fcefg8Fal9hmbxdkkaCcdthhcbh8Fa8Phainaoa8Fag2cdtfhKasheaahHaChAinaHaKaeydbcdtgXfIdbawaXfIdbNUdbaeclfheaHclfhHaAcufgAmbkaaahfhaa8Fcefg8Fal9hmbkkcualc8S2gHalc;D;O;f8U0EgXcbyd1:H:cjbHjjjjbbheasc:Cefasyd;8egAcdtfaeBdbasaAcefBd;8eaecbaHz:tjjjbhIcbh8RcbhgdnaCTmbcbh8MaXcbyd1:H:cjbHjjjjbbhgasc:Cefasyd;8egecdtfagBdbasaecefBd;8eagcbaHz:tjjjb8AcuaCal2gecltgHaecFFFFb0Ecbyd1:H:cjbHjjjjbbh8Rasc:Cefasyd;8egecdtfa8RBdbasaecefBd;8ea8RcbaHz:tjjjb8AamcjjjjdGTmbcualcltgealcFFFFb0Ecbyd1:H:cjbHjjjjbbh8Masc:Cefasyd;8egHcdtfa8MBdbasaHcefBd;8ea8Mcbaez:tjjjb8AkdnadTmbcbhKabhHina8NaHclfyd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ea8SaeIdxMUdxaea8UaeIdzMUdzaea8ZaeIdCMUdCaea83aeIdKMUdKaea85aeId3MUd3aea87aeIdaMUdaaeaUaeId8KMUd8KaeaRaeIdyMUdya8Ra8Jcltfh8FcbhHaChXina8FaHfgeascjdfaHfgAIdbaeIdbMUdbaeclfgKaAclfIdbaKIdbMUdbaecwfgKaAcwfIdbaKIdbMUdbaecxfgeaAcxfIdbaeIdbMUdbaHczfhHaXcufgXmbka8Ra8Kcltfh8FcbhHaChXina8FaHfgeascjdfaHfgAIdbaeIdbMUdbaeclfgKaAclfIdbaKIdbMUdbaecwfgKaAcwfIdbaKIdbMUdbaecxfgeaAcxfIdbaeIdbMUdbaHczfhHaXcufgXmbka8RaDcltfh8FcbhHaChXina8FaHfgeascjdfaHfgAIdbaeIdbMUdbaeclfgKaAclfIdbaKIdbMUdbaecwfgKaAcwfIdbaKIdbMUdbaecxfgeaAcxfIdbaeIdbMUdbaHczfhHaXcufgXmbkaacifgaad6mbkkcbhAdndnamcwGgTmbJbbbbh8ScbhScbh9hcbh9ixekcbhSa3cbyd1: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:cjbHjjjjbbh9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a8WNaAId3MgRaRMMa8YNaAIdba8XNaAIdxa8YNaAIdKMgRaRMMa8XNaAId8KMMMhRa8Pa8FaC2gacdtfhHa8RaKaC2g8JcltfheaAIdyh81aChAinaHIdbg8Va8Va81NaecxfIdba8WaecwfIdbNa8XaeIdbNa8YaeclfIdbNMMMg8Va8VM:tNaRMhRaHclfhHaeczfheaAcufgAmbkdndnaDmbJbbbbh8Vxekaga8Fc8S2fgAIdwa8NaKcx2fgeIdwg8XNaAIdzaeIdbg8YNaAIdaMg8Va8VMMa8XNaAIdlaeIdlg81NaAIdCa8XNaAId3Mg8Va8VMMa81NaAIdba8YNaAIdxa81NaAIdKMg8Va8VMMa8YNaAId8KMMMh8Va8Pa8JcdtfhHa8RaacltfheaAIdyh80aChAinaHIdbg8Wa8Wa80NaecxfIdba8XaecwfIdbNa8YaeIdbNa81aeclfIdbNMMMg8Wa8WM:tNa8VMh8VaHclfhHaeczfheaAcufgAmbka8V:lh8VkaBaR:lMhBa86a8VMh86dndndnaYaKfRbbc9:fPddbekaQaXfydbgXaKSmbaOa8Fcdtfydbh8Jindndna5aXcdtgafydbgecuSmbaOaecdtfydba8JSmekdna8EaafydbgecuSmbaOaecdtfydba8JSmeka8FhekagaXc8S2fgAIdwa8Naecx2fgHIdwg8WNaAIdzaHIdbg8XNaAIdaMgRaRMMa8WNaAIdlaHIdlg8YNaAIdCa8WNaAId3MgRaRMMa8YNaAIdba8XNaAIdxa8YNaAIdKMgRaRMMa8XNaAId8KMMMhRa8PaeaC2cdtfhHa8RaXaC2cltfheaAIdyh81aChAinaHIdbg8Va8Va81NaecxfIdba8WaecwfIdbNa8XaeIdbNa8YaeclfIdbNMMMg8Va8VM:tNaRMhRaHclfhHaeczfheaAcufgAmbkaBaR:lMhBaQaafydbgXaK9hmbkkaYa8FfRbbci9hmeaDTmeaQa8FcdtfydbgXa8FSmeindndna5aXcdtgafydbgecuSmbaOaecdtfydba8ASmekdna8EaafydbgecuSmbaOaecdtfydba8ASmekaKhekaga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a9phea9qhHinascjdfaeydbcA4cF8FGgAcFAaAcFA6EcdtfgAaAydbcefBdbaecxfheaHcufgHmbkcbhecbhHinascjdfaefgAydbhXaAaHBdbaXaHfhHaeclfgecj;qb9hmbkcbhea9phHinascjdfaHydbcA4cF8FGgAcFAaAcFA6EcdtfgAaAydbgAcefBdba0aAcdtfaeBdbaHcxfhHa9qaecefge9hmbkadak9RgAci9Uh9sdnalTmbcbhea9mhHinaHaeBdbaHclfhHalaecefge9hmbkkcbh9ta9ncbalz:tjjjbh3aAcO9Uh9ua9sce4h9rcbh8Lcbh8Kdnina9ka0a8Kcdtfydbcx2fg8JIdwgRa879Emea8La9s9pmeJFFuuh8Vdna9ra9q9pmba9ka0a9rcdtfydbcx2fIdwJbb;aZNh8VkdnaRa8V9ETmbaRaU9ETmba8La9u0mdkdna3aOa8JydlgDcdtg9vfg8AydbgAfg9wRbba3aOa8Jydbghcdtg9xfydbgefg9yRbbVmbaYahfRbbh9zdndnaLaecdtfgHclfydbgXaHydbgHSmbaXaH9RhXa8NaAcx2fh8Fa8Naecx2fhaaEaHcitfheindna9maeydbcdtfydbgHaASmba9maeclfydbcdtfydbgKaASmbaHaKSmba8NaKcx2fgKIdba8NaHcx2fgHIdbg8W:tgRaaIdlaHIdlg8X:tg80NaKIdla8X:tg8VaaIdba8W:tgBN:tg8YaRa8FIdla8X:tg86Na8Va8FIdba8W:tg8UN:tg8XNa8VaaIdwaHIdwg81:tg8ZNaKIdwa81:tg8Wa80N:tg80a8Va8FIdwa81:tg83Na8Wa86N:tg8VNa8WaBNaRa8ZN:tg81a8Wa8UNaRa83N:tgRNMMa8Ya8YNa80a80Na81a81NMMa8Xa8XNa8Va8VNaRaRNMMN:rJbbj8:N9FmikaecwfheaXcufgXmbkkdndndndna9zc9:fPdebdkahheina8AydbhAdndna5aecdtgHfydbgecuSmbaOaecdtfydbaASmekdna8EaHfydbgecuSmbaOaecdtfydbaASmekaDheka9maHfaeBdbaQaHfydbgeah9hmbxikkdna8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ahcefghal9hmbkcbhHa5heindnaeydbgAcuSmbdnaHa9maAcdtgXfydbgA9hmbcuhAa5aXfydbgXcuSmba9maXcdtfydbhAkaeaABdbkaeclfhealaHcefgH9hmbkcbhHa8EheindnaeydbgAcuSmbdnaHa9maAcdtgXfydbgA9hmbcuhAa8EaXfydbgXcuSmba9maXcdtfydbhAkaeaABdbkaeclfhealaHcefgH9hmbkka85aUaCEh85cbhHabhecbhAindnaOa9maeydbcdtfydbg8FcdtfydbgXaOa9maeclfydbcdtfydbgacdtfydbgKSmbaXaOa9maecwfydbcdtfydbg8AcdtfydbghSmbaKahSmbabaHcdtfgXa8FBdbaXcwfa8ABdbaXclfaaBdbaHcifhHkaecxfheaAcifgAad6mbkdndnaTmbaHhdxekdnaHak0mbaHhdxekdna8Sa859FmbaHhdxekJFFuuh8ScbhdabhecbhAindna9ha9iaeydbgXcdtfydbcdtfIdbgRa859ETmbaeclf8Pdbh9AabadcdtfgKaXBdbaKclfa9A83dbaRa8Sa8SaR9EEh8SadcifhdkaecxfheaAcifgAaH6mbkkadak0mbxdkkascNefabadalaOz:cjjjbkdndnadak0mbadhaxekdnaTmbadhaxekdna8Sa879FmbadhaxekcehKina8SJbb;aZNgRa87aRa879DEh8WJbbbbhRdnaSTmba9hheaShHinaeIdbg8VaRa8Va8W9FEaRa8VaR9EEhRaeclfheaHcufgHmbkkJFFuuh8ScbhaabhecbhHindna9ha9iaeydbgAcdtfydbcdtfIdbg8Va8W9ETmbaeclf8Pdbh9AabaacdtfgXaABdbaXclfa9A83dba8Va8Sa8Sa8V9EEh8SaacifhakaecxfheaHcifgHad6mbkdnaKaaad9hVceGmbadhaxdkaRaUaUaR9DEhUaaak9nmecbhKaahda8Sa879FmbkkdnamcjjjjdGTmba9ncbalz:tjjjbh8AdnaaTmbabheaahHina8AaeydbgAfce86bba8AaOaAcdtfydbfce86bbaeclfheaHcufgHmbkkascNefabaaalaOz:cjjjbdndnalTmbcbhXindna8AaXfRbbTmbdnaYaXfRbbgec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bbci9hmbaXhLa8JydbgeaXSmba8PaEcdtgHfhKaDaHfIdbhRaXhLinaLhHcuhLdnaKaeaC2cdtfIdbaR9CmbaHcuSmbaHhLagaec8S2fIdyagaHc8S2fIdy9ETmbaehLkaQaecdtfydbgeaX9hmbkka8PaEcdtfhKa8RaEcltfh8FaXheinaKaeaC2cdtfJbbbbJbbjZagaeaLaLcuSEgHc8S2fIdygR:vaRJbbbb9BEa8FaHaC2cltfgHIdwaAIdwNaHIdbaAIdbNaHIdlaAIdlNMMaHIdxMNUdbaQaecdtfydbgeaX9hmbkaEcefgEaC9hmbkkaXcefgXal9hmbxdkkaCmbcbhCkaiavaoarawaCala8Na8Pazasayasc1efaYa8Aaqz:hjjjbkdnamcjjjjlGTmbazmbaaTmbabhecbhLinaYaeydbgAfRbbc3thQaecwfgXydbhHcjjjj94hCdna5aAcdtgEfydbaeclfgKydbgOSmbcjjjj94cba8EaOcdtfydbaASEhCkaeaQaCVaAVBdbaYaOfRbbc3th8Fcjjjj94hCcjjjj94hQdna5aOcdtfydbaHSmbcjjjj94cba8EaHcdtfydbaOSEhQkaKa8FaQVaOVBdbaYaHfRbbc3thOdna5aHcdtfydbaASmbcjjjj94cba8EaEfydbaHSEhCkaXaOaCVaHVBdbaecxfheaLcifgLaa6mbkkdnazTmbaaTmbaaheinabazabydbcdtfydbBdbabclfhbaecufgembkkdnaPTmbaPaZaU: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:OhXxekcjjjj94hXkaAaXcCtVhAkaHaABdbaHclfhHavcxfhvalaOcefgO9hmbxdkkaxhvaihOalhHindndnavIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhAxekcjjjj94hAkaAcCthAdndnavclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaXcqtaAVhAdndnavcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaOaAaXVBdbavcxfhvaOclfhOaHcufgHmbkkcbhOdnadTmbaehvcbhHinaOaiavclfydbcdtfydbgAaiavcwfydbcdtfydbgX9haiavydbcdtfydbgraA9haraX9hGGfhOavcxfhvaHcifgHad6mbkkdnas:ZgCaL:taY:Ygwaz:Y:tg8ANak:ZgEaO:Zg3:tNaEaL:tawaP:Y:tg5Na3aC:tNMg8EJbbbb9BmbaCaE:ta5a8Aa3aL:tNNNa8E:vawMhwkdndnaOaQ0mbaOhkaYhPxekaOhsaYhzkdndnaKcl0mbdnawJbbbZMgw:lJbbb9p9DTmbaw:Ohvxdkcjjjj94hvxekaPazfcd9ThvkaKcefgKcs9hmbkkdndndnakmbJbbjZhwcbhOcdhvaDmexdkalcd4alfhHcehOinaOgvcethOavaH6mbkcbhOaqcuavcdtgYavcFFFFi0Ecbyd1:H:cjbHjjjjbbgKBdCaqciBd2aqamcbyd1:H:cjbHjjjjbbgzBdKaqclBd2dndndndnalTmbaPcuf:YhwaoTmecbhOaihAaxhHindndnaoaOfRbbceGTmbaOcjjjjlVhXxekdndnaHclfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaXcqthXdndnaHcwfIdbawNJbbbZMgC:lJbbb9p9DTmbaC:Ohrxekcjjjj94hrkaXarVhXdndnaHIdbawNJbbbZMgC:lJbbb9p9DTmbaC:Ohrxekcjjjj94hrkaXarcCtVhXkaAaXBdbaAclfhAaHcxfhHalaOcefgO9hmbxikkaKcFeaYz:tjjjb8AcbhPcbhvxdkaxhOaihHalhAindndnaOIdbawNJbbbZMgC:lJbbb9p9DTmbaC:OhXxekcjjjj94hXkaXcCthXdndnaOclfIdbawNJbbbZMgC: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:gjjjbaxcifhkdnadTmbaoaoNhocbhwabhlcbheindnaqaialydbgvcdtfydbcdtfIdbao9ETmbalclf8PdbhPabawcdtfgDavBdbaDclfaP83dbawcifhwkalcxfhlaecifgead6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bbbZMgO:lJbbb9p9DTmbaO:Ohexdkcjjjj94hexekaPaCfcd9Theka3aQaiEhQaLcefgLcs9hmekkdndnaXmbcihicbhDxekcbhiawakcbyd1:H:cjbHjjjjbbg5BdKawclBd2aPcuf:YhKdndnadTmbaqhiaxheadhmindndnaiIdbaKNJbbbZMgO:lJbbb9p9DTmbaO:OhYxekcjjjj94hYkaYcCthYdndnaiclfIdbaKNJbbbZMgO:lJbbb9p9DTmbaO:Oh8Axekcjjjj94h8Aka8AcqtaYVhYdndnaicwfIdbaKNJbbbZMgO:lJbbb9p9DTmbaO:Oh8Axekcjjjj94h8AkaeaYa8AVBdbaicxfhiaeclfheamcufgmmbkazcFeasz:tjjjbhEcbhDcbh3indndndnaEaxa3cdtgCfydbgYcm4aY7c:v;t;h;Ev2gics4ai7aAGgmcdtfg8AydbgecuSmbcehiinaxaecdtgefydbaYSmdamaifheaicefhiaEaeaAGgmcdtfg8Aydbgecu9hmbkka8Aa3BdbaDhiaDcefhDxeka5aefydbhika5aCfaiBdba3cefg3ad9hmbkcuaDc32giaDc;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 Z=new Uint8Array(A.length),V=0;V<A.length;++V){var E=A.charCodeAt(V);Z[V]=E>96?E-97:E>64?E-39:E+4}for(var L=0,V=0;V<A.length;++V)Z[L++]=Z[V]<60?t[Z[V]]:(Z[V]-60)*64+Z[++V];return Z.buffer.slice(0,L)}function r(A){if(!A)throw new Error("Assertion failed")}function s(A){return new Uint8Array(A.buffer,A.byteOffset,A.byteLength)}function a(A,Z,V,E){var L=n.exports.sbrk,v=L(V*4),I=L(V*E*4),X=new Uint8Array(n.exports.memory.buffer);X.set(s(Z),I),A(v,I,V,E*4),X=new Uint8Array(n.exports.memory.buffer);var N=new Uint32Array(V);return new Uint8Array(N.buffer).set(X.subarray(v,v+V*4)),L(v-L(0)),N}function c(A,Z,V){var E=n.exports.sbrk,L=E(Z.length*4),v=E(V*4),I=new Uint8Array(n.exports.memory.buffer),X=s(Z);I.set(X,L);var N=A(v,L,Z.length,V);I=new Uint8Array(n.exports.memory.buffer);var g=new Uint32Array(V);new Uint8Array(g.buffer).set(I.subarray(v,v+V*4)),E(L-E(0));for(var C=0;C<Z.length;++C)Z[C]=g[Z[C]];return[g,N]}function d(A){for(var Z=0,V=0;V<A.length;++V){var E=A[V];Z=Z<E?E:Z}return Z}function u(A,Z,V,E,L,v,I,X,N){var g=n.exports.sbrk,C=g(4),R=g(V*4),G=g(L*v),P=g(V*4),Y=new Uint8Array(n.exports.memory.buffer);Y.set(s(E),G),Y.set(s(Z),P);var O=A(R,P,V,G,L,v,I,X,N,C);Y=new Uint8Array(n.exports.memory.buffer);var k=new Uint32Array(O);s(k).set(Y.subarray(R,R+O*4));var D=new Float32Array(1);return s(D).set(Y.subarray(C,C+4)),g(C-g(0)),[k,D[0]]}function h(A,Z,V,E,L,v,I,X,N,g,C,R,G){var P=n.exports.sbrk,Y=P(4),O=P(V*4),k=P(L*v),D=P(L*X),w=P(N.length*4),z=P(V*4),J=g?P(L):0,ee=new Uint8Array(n.exports.memory.buffer);ee.set(s(E),k),ee.set(s(I),D),ee.set(s(N),w),ee.set(s(Z),z),g&&ee.set(s(g),J);var H=A(O,z,V,k,L,v,D,X,w,N.length,J,C,R,G,Y);ee=new Uint8Array(n.exports.memory.buffer);var te=new Uint32Array(H);s(te).set(ee.subarray(O,O+H*4));var $=new Float32Array(1);return s($).set(ee.subarray(Y,Y+4)),P(Y-P(0)),[te,$[0]]}function p(A,Z,V,E,L,v,I,X,N,g,C,R,G){var P=n.exports.sbrk,Y=P(4),O=P(L*v),k=P(L*X),D=P(N.length*4),w=P(V*4),z=g?P(L):0,J=new Uint8Array(n.exports.memory.buffer);J.set(s(E),O),J.set(s(I),k),J.set(s(N),D),J.set(s(Z),w),g&&J.set(s(g),z);var ee=A(w,V,O,L,v,k,X,D,N.length,z,C,R,G,Y);J=new Uint8Array(n.exports.memory.buffer),s(Z).set(J.subarray(w,w+ee*4)),s(E).set(J.subarray(O,O+L*v)),s(I).set(J.subarray(k,k+L*X));var H=new Float32Array(1);return s(H).set(J.subarray(Y,Y+4)),P(Y-P(0)),[ee,H[0]]}function b(A,Z,V,E){var L=n.exports.sbrk,v=L(V*E),I=new Uint8Array(n.exports.memory.buffer);I.set(s(Z),v);var X=A(v,V,E);return L(v-L(0)),X}function f(A,Z,V,E,L,v,I,X){var N=n.exports.sbrk,g=N(X*4),C=N(V*E),R=L?N(V*v):0,G=new Uint8Array(n.exports.memory.buffer);G.set(s(Z),C),L&&G.set(s(L),R);var P=A(g,C,V,E,R,v,I,X);G=new Uint8Array(n.exports.memory.buffer);var Y=new Uint32Array(P);return s(Y).set(G.subarray(g,g+P*4)),N(g-N(0)),Y}function y(A,Z,V,E,L,v,I,X,N){var g=n.exports.sbrk,C=g(4),R=g(V*4),G=g(L*v),P=g(V*4),Y=I?g(L):0,O=new Uint8Array(n.exports.memory.buffer);O.set(s(E),G),O.set(s(Z),P),I&&O.set(s(I),Y);var k=A(R,P,V,G,L,v,Y,X,N,C);O=new Uint8Array(n.exports.memory.buffer);var D=new Uint32Array(k);s(D).set(O.subarray(R,R+k*4));var w=new Float32Array(1);return s(w).set(O.subarray(C,C+4)),g(C-g(0)),[D,w[0]]}function _(A,Z,V,E,L,v,I){var X=n.exports.sbrk,N=X(V*4),g=X(L*v),C=X(V*4),R=new Uint8Array(n.exports.memory.buffer);R.set(s(E),g),R.set(s(Z),C);var G=A(N,C,V,g,L,v,I);R=new Uint8Array(n.exports.memory.buffer);var P=new Uint32Array(G);return s(P).set(R.subarray(N,N+G*4)),X(N-X(0)),P}var S={LockBorder:1,Sparse:2,ErrorAbsolute:4,Prune:8,Regularize:16,Permissive:32,_InternalDebug:1<<30};return{ready:i,supported:!0,compactMesh:function(A){r(A instanceof Uint32Array||A instanceof Int32Array||A instanceof Uint16Array||A instanceof Int16Array),r(A.length%3==0);var Z=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A),V=c(n.exports.meshopt_optimizeVertexFetchRemap,Z,d(A)+1);if(A!==Z)for(var E=0;E<Z.length;++E)A[E]=Z[E];return V},generatePositionRemap:function(A,Z){return r(A instanceof Float32Array),r(A.length%Z==0),r(Z>=3),a(n.exports.meshopt_generatePositionRemap,A,A.length/Z,Z)},simplify:function(A,Z,V,E,L,v){r(A instanceof Uint32Array||A instanceof Int32Array||A instanceof Uint16Array||A instanceof Int16Array),r(A.length%3==0),r(Z instanceof Float32Array),r(Z.length%V==0),r(V>=3),r(E>=0&&E<=A.length),r(E%3==0),r(L>=0);for(var I=0,X=0;X<(v?v.length:0);++X)r(v[X]in S),I|=S[v[X]];var N=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A),g=u(n.exports.meshopt_simplify,N,A.length,Z,Z.length/V,V*4,E,L,I);return g[0]=A instanceof Uint32Array?g[0]:new A.constructor(g[0]),g},simplifyWithAttributes:function(A,Z,V,E,L,v,I,X,N,g){r(A instanceof Uint32Array||A instanceof Int32Array||A instanceof Uint16Array||A instanceof Int16Array),r(A.length%3==0),r(Z instanceof Float32Array),r(Z.length%V==0),r(V>=3),r(E instanceof Float32Array),r(E.length==L*(Z.length/V)),r(L>=0),r(I==null||I instanceof Uint8Array),r(I==null||I.length==Z.length/V),r(X>=0&&X<=A.length),r(X%3==0),r(N>=0),r(Array.isArray(v)),r(L>=v.length),r(v.length<=32);for(var C=0;C<v.length;++C)r(v[C]>=0);for(var R=0,C=0;C<(g?g.length:0);++C)r(g[C]in S),R|=S[g[C]];var G=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A),P=h(n.exports.meshopt_simplifyWithAttributes,G,A.length,Z,Z.length/V,V*4,E,L*4,new Float32Array(v),I,X,N,R);return P[0]=A instanceof Uint32Array?P[0]:new A.constructor(P[0]),P},simplifyWithUpdate:function(A,Z,V,E,L,v,I,X,N,g){r(A instanceof Uint32Array||A instanceof Int32Array||A instanceof Uint16Array||A instanceof Int16Array),r(A.length%3==0),r(Z instanceof Float32Array),r(Z.length%V==0),r(V>=3),r(E instanceof Float32Array),r(E.length==L*(Z.length/V)),r(L>=0),r(I==null||I instanceof Uint8Array),r(I==null||I.length==Z.length/V),r(X>=0&&X<=A.length),r(X%3==0),r(N>=0),r(Array.isArray(v)),r(L>=v.length),r(v.length<=32);for(var C=0;C<v.length;++C)r(v[C]>=0);for(var R=0,C=0;C<(g?g.length:0);++C)r(g[C]in S),R|=S[g[C]];var G=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A),P=p(n.exports.meshopt_simplifyWithUpdate,G,A.length,Z,Z.length/V,V*4,E,L*4,new Float32Array(v),I,X,N,R);if(A!==G)for(var C=0;C<P[0];++C)A[C]=G[C];return P},getScale:function(A,Z){return r(A instanceof Float32Array),r(A.length%Z==0),r(Z>=3),b(n.exports.meshopt_simplifyScale,A,A.length/Z,Z*4)},simplifyPoints:function(A,Z,V,E,L,v){return r(A instanceof Float32Array),r(A.length%Z==0),r(Z>=3),r(V>=0&&V<=A.length/Z),E?(r(E instanceof Float32Array),r(E.length%L==0),r(L>=3),r(A.length/Z==E.length/L),f(n.exports.meshopt_simplifyPoints,A,A.length/Z,Z*4,E,L*4,v||0,V)):f(n.exports.meshopt_simplifyPoints,A,A.length/Z,Z*4,void 0,0,0,V)},simplifySloppy:function(A,Z,V,E,L,v){r(A instanceof Uint32Array||A instanceof Int32Array||A instanceof Uint16Array||A instanceof Int16Array),r(A.length%3==0),r(Z instanceof Float32Array),r(Z.length%V==0),r(V>=3),r(E==null||E instanceof Uint8Array),r(E==null||E.length==Z.length/V),r(L>=0&&L<=A.length),r(L%3==0),r(v>=0);var I=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A),X=y(n.exports.meshopt_simplifySloppy,I,A.length,Z,Z.length/V,V*4,E,L,v);return X[0]=A instanceof Uint32Array?X[0]:new A.constructor(X[0]),X},simplifyPrune:function(A,Z,V,E){r(A instanceof Uint32Array||A instanceof Int32Array||A instanceof Uint16Array||A instanceof Int16Array),r(A.length%3==0),r(Z instanceof Float32Array),r(Z.length%V==0),r(V>=3),r(E>=0);var L=A.BYTES_PER_ELEMENT==4?A:new Uint32Array(A),v=_(n.exports.meshopt_simplifyPrune,L,A.length,Z,Z.length/V,V*4,E);return v=A instanceof Uint32Array?v:new A.constructor(v),v}}})();var pTn=x(T(),1),hTn=(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:tg8Za8XNa8Za8YNMMUdbaXcefgXav9hmbkcbh85dnaHmbcbhAaQhza8JhCavhXinawaDazydbcx2fgOcwfydbcetfgL8Vebh8WawaOclfydbcetfg858Vebh86awaOydbcetfgO8Vebh87aLce87eba85ce87ebaOce87ebaCaAa86cs4a87cs4fa8Wcs4ffgABdbazclfhzaCclfhCaXcufgXmbkavhCinawaDaQydbcx2fgzcwfydbcetfcFFi87ebawazclfydbcetfcFFi87ebawazydbcetfcFFi87ebaQclfhQaCcufgCmbka8Jh85kdndndndndndndndndndndnava8E6mba8Eax9nmeavavaK9UgzaK29Raza320mda5aE9pmqa85Th87ceh8WaEhQxwka5ag9pmDa8Eax9nmixokavaK6mea5aE9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bcbhAaeaYcdtfgzhCa8WhXinawaDaCydbcx2fgOcwfydbcetfgQ8VebhbawaOclfydbcetfgL8VebhrawaOydbcetfgO8VebhKaQce87ebaLce87ebaOce87ebaAarcs4aKcs4fabcs4ffhAaCclfhCaXcufgXmbka8WhOinawaDazydbcx2fgCcwfydbcetfcFFi87ebawaCclfydbcetfcFFi87ebawaCydbcetfcFFi87ebazclfhzaOcufgOmbkaAaq0mekalaYfgzce86bbazcefcba8Wcufz: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 Z=0,S=0;S<y.length;++S)_[Z++]=_[S]<60?t[_[S]]:(_[S]-60)*64+_[++S];return _.buffer.slice(0,Z)}function r(y){if(!y)throw new Error("Assertion failed")}function s(y){return new Uint8Array(y.buffer,y.byteOffset,y.byteLength)}var a=48,c=16;function d(y,_){var S=y.meshlets[_*4+0],A=y.meshlets[_*4+1],Z=y.meshlets[_*4+2],V=y.meshlets[_*4+3];return{vertices:y.vertices.subarray(S,S+Z),triangles:y.triangles.subarray(A,A+V*3)}}function u(y,_,S,A,Z,V,E,L,v,I){var X=n.exports.sbrk,N=n.exports.meshopt_buildMeshletsBound(_.length,V,E),g=X(N*c),C=X(_.length*4),R=X(_.length),G=X(_.byteLength),P=X(S.byteLength),Y=new Uint8Array(n.exports.memory.buffer);Y.set(s(_),G),Y.set(s(S),P);var O=y(g,C,R,G,_.length,P,A,Z,V,E,L,v,I);Y=new Uint8Array(n.exports.memory.buffer);for(var k=Y.subarray(g,g+O*c),D=new Uint32Array(k.buffer,k.byteOffset,k.byteLength/4).slice(),w=0;w<O;++w){var z=D[w*4+0],J=D[w*4+1],A=D[w*4+2],ee=D[w*4+3];n.exports.meshopt_optimizeMeshlet(C+z*4,R+J,ee,A)}var H=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,$={meshlets:D,vertices:new Uint32Array(Y.buffer,C,H).slice(),triangles:new Uint8Array(Y.buffer,R,te).slice(),meshletCount:O};return X(g-X(0)),$}function h(y){var _=new Float32Array(n.exports.memory.buffer,y,a/4);return{centerX:_[0],centerY:_[1],centerZ:_[2],radius:_[3],coneApexX:_[4],coneApexY:_[5],coneApexZ:_[6],coneAxisX:_[7],coneAxisY:_[8],coneAxisZ:_[9],coneCutoff:_[10]}}function p(y,_,S,A){var Z=n.exports.sbrk,V=[],E=Z(_.byteLength),L=Z(y.vertices.byteLength),v=Z(y.triangles.byteLength),I=Z(a),X=new Uint8Array(n.exports.memory.buffer);X.set(s(_),E),X.set(s(y.vertices),L),X.set(s(y.triangles),v);for(var N=0;N<y.meshletCount;++N){var g=y.meshlets[N*4+0],C=y.meshlets[N*4+1],R=y.meshlets[N*4+3];n.exports.meshopt_computeMeshletBounds(I,L+g*4,v+C,R,E,S,A),V.push(h(I))}return Z(E-Z(0)),V}function b(y,_,S,A){var Z=n.exports.sbrk,V=Z(a),E=Z(y.byteLength),L=Z(_.byteLength),v=new Uint8Array(n.exports.memory.buffer);v.set(s(y),E),v.set(s(_),L),n.exports.meshopt_computeClusterBounds(V,E,y.length,L,S,A);var I=h(V);return Z(V-Z(0)),I}function f(y,_,S,A,Z){var V=n.exports.sbrk,E=V(a),L=V(y.byteLength),v=A?V(A.byteLength):0,I=new Uint8Array(n.exports.memory.buffer);I.set(s(y),L),A&&I.set(s(A),v),n.exports.meshopt_computeSphereBounds(E,L,_,S,v,A?Z:0);var X=h(E);return V(E-V(0)),X}return{ready:i,supported:!0,buildMeshlets:function(y,_,S,A,Z,V){r(y.length%3==0),r(_ instanceof Float32Array),r(_.length%S==0),r(S>=3),r(A>=3&&A<=256),r(Z>=1&&Z<=512),V=V||0;var E=y.BYTES_PER_ELEMENT==4?y:new Uint32Array(y);return u(n.exports.meshopt_buildMeshletsFlex,E,_,_.length/S,S*4,A,Z,Z,V,0)},buildMeshletsFlex:function(y,_,S,A,Z,V,E,L){r(y.length%3==0),r(_ instanceof Float32Array),r(_.length%S==0),r(S>=3),r(A>=3&&A<=256),r(Z>=1&&V<=512),r(Z<=V),E=E||0,L=L||0;var v=y.BYTES_PER_ELEMENT==4?y:new Uint32Array(y);return u(n.exports.meshopt_buildMeshletsFlex,v,_,_.length/S,S*4,A,Z,V,E,L)},buildMeshletsSpatial:function(y,_,S,A,Z,V,E){r(y.length%3==0),r(_ instanceof Float32Array),r(_.length%S==0),r(S>=3),r(A>=3&&A<=256),r(Z>=1&&V<=512),r(Z<=V),E=E||0;var L=y.BYTES_PER_ELEMENT==4?y:new Uint32Array(y);return u(n.exports.meshopt_buildMeshletsSpatial,L,_,_.length/S,S*4,A,Z,V,E)},extractMeshlet:function(y,_){return r(_>=0&&_<y.meshletCount),d(y,_)},computeClusterBounds:function(y,_,S){r(y.length%3==0),r(y.length/3<=512),r(_ instanceof Float32Array),r(_.length%S==0),r(S>=3);var A=y.BYTES_PER_ELEMENT==4?y:new Uint32Array(y);return b(A,_,_.length/S,S*4)},computeMeshletBounds:function(y,_,S){return r(_ 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 uj=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,h=c.byteLength,p=!1,b,f,y,_;if(_i(c,"EXT_meshopt_compression")){let A=c.extensions.EXT_meshopt_compression;d=A.buffer,u=A.byteOffset??0,h=A.byteLength,p=!0,b=A.byteStride,f=A.count,y=A.mode,_=A.filter??"NONE"}let S=i.buffers[d];this._hasMeshopt=p,this._meshoptByteStride=b,this._meshoptCount=f,this._meshoptMode=y,this._meshoptFilter=_,this._resourceCache=n,this._gltfResource=r,this._baseResource=s,this._buffer=S,this._bufferId=d,this._byteOffset=u,this._byteLength=h,this._cacheKey=a,this._bufferLoader=void 0,this._typedArray=void 0,this._state=ut.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=ut.LOADING,this._promise=rOe(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 rOe(e){try{let t=sOe(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);yy.decodeGltfBuffer(s,o,r,e._typedArray,e._meshoptMode,e._meshoptFilter),e._typedArray=s}return e._state=ut.READY,e}catch(t){if(e.isDestroyed())return;throw e.unload(),e._state=ut.FAILED,e.getError("Failed to load buffer view",t)}}function sOe(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 DZ=uj;var HTn=x(T(),1);var PTn=x(T(),1);var a_=class e{static _getDecoderTaskProcessor(){if(!l(e._decoderTaskProcessor)){let t=new Hn("decodeDraco",e._maxDecodingConcurrency);t.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}).then(function(n){n?e._taskProcessorReady=!0:e._error=new le("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(an.hardwareConcurrency-1,1);a_._decoderTaskProcessor=void 0;a_._taskProcessorReady=!1;a_._error=void 0;var ab=a_;var YTn=x(T(),1);var Wn={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 aOe(e){switch(e){case Wn.POSITION:return"positionMC";case Wn.NORMAL:return"normalMC";case Wn.TANGENT:return"tangentMC";case Wn.TEXCOORD:return"texCoord";case Wn.COLOR:return"color";case Wn.JOINTS:return"joints";case Wn.WEIGHTS:return"weights";case Wn.FEATURE_ID:return"featureId";case Wn.SCALE:return"scale";case Wn.ROTATION:return"rotation";case Wn.CUMULATIVE_DISTANCE:return"cumulativeDistance"}}Wn.hasSetIndex=function(e){switch(e){case Wn.POSITION:case Wn.NORMAL:case Wn.TANGENT:case Wn.CUMULATIVE_DISTANCE:return!1;case Wn.TEXCOORD:case Wn.COLOR:case Wn.JOINTS:case Wn.WEIGHTS:case Wn.FEATURE_ID:case Wn.SCALE:case Wn.ROTATION:return!0}};Wn.fromGltfSemantic=function(e){let t=e,i=/^(\w+)_\d+$/.exec(e);switch(i!==null&&(t=i[1]),t){case"POSITION":return Wn.POSITION;case"NORMAL":return Wn.NORMAL;case"TANGENT":return Wn.TANGENT;case"TEXCOORD":return Wn.TEXCOORD;case"COLOR":return Wn.COLOR;case"JOINTS":return Wn.JOINTS;case"WEIGHTS":return Wn.WEIGHTS;case"_FEATURE_ID":return Wn.FEATURE_ID;case"KHR_gaussian_splatting:SCALE":case"_SCALE":return Wn.SCALE;case"KHR_gaussian_splatting:ROTATION":case"_ROTATION":return Wn.ROTATION;case"BENTLEY_materials_line_style:CUMULATIVE_DISTANCE":return Wn.CUMULATIVE_DISTANCE}};Wn.fromPntsSemantic=function(e){switch(e){case"POSITION":case"POSITION_QUANTIZED":return Wn.POSITION;case"RGBA":case"RGB":case"RGB565":return Wn.COLOR;case"NORMAL":case"NORMAL_OCT16P":return Wn.NORMAL;case"BATCH_ID":return Wn.FEATURE_ID}};Wn.getGlslType=function(e){switch(e){case Wn.POSITION:case Wn.NORMAL:case Wn.TANGENT:return"vec3";case Wn.TEXCOORD:return"vec2";case Wn.COLOR:return"vec4";case Wn.JOINTS:return"ivec4";case Wn.WEIGHTS:return"vec4";case Wn.FEATURE_ID:return"int";case Wn.SCALE:return"vec3";case Wn.ROTATION:return"vec4";case Wn.CUMULATIVE_DISTANCE:return"float";case Wn.OPACITY:return"float"}};Wn.getVariableName=function(e,t){let n=aOe(e);return l(t)&&(n+=`_${t}`),n};Object.freeze(Wn);var nt=Wn;var mj=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=ut.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=ut.LOADING,this._promise=cOe(this),this._promise)}process(t){if(this._state===ut.READY)return!0;if(this._state!==ut.PROCESSING||(l(this._dracoError)&&rue(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=dOe(p);l(b)&&o.accessors[i.attributes[p]].componentType===K.FLOAT&&(d.includes(b)||d.push(b))}let u={array:new Uint8Array(this._bufferViewTypedArray),bufferView:a,compressedAttributes:c,dequantizeInShader:!0,attributesToSkipTransform:d},h=ab.decodeBufferView(u);if(!l(h))return!1;this._decodePromise=lOe(this,h)}unload(){l(this._bufferViewLoader)&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodedData=void 0,this._gltf=void 0,this._primitive=void 0}};async function cOe(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=ut.PROCESSING,e)}catch(n){if(e.isDestroyed())return;rue(e,n)}}function rue(e,t){throw e.unload(),e._state=ut.FAILED,e.getError("Failed to load Draco",t)}async function lOe(e,t){try{let n=await t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={indices:n.indexArray,vertexAttributes:n.attributeData},e._state=ut.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._dracoError=n}}var c_={};c_[nt.POSITION]="POSITION";c_[nt.NORMAL]="NORMAL";c_[nt.COLOR]="COLOR";c_[nt.TEXCOORD]="TEX_COORD";function dOe(e){for(let t in c_)if(c_.hasOwnProperty(t)&&e.startsWith(t))return c_[t]}var OZ=mj;var s_n=x(T(),1);var QTn=x(T(),1);function uOe(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 cb=uOe;var Yv=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=ut.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=mOe(this),this._promise):(this._promise=hOe(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 sue(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 mOe(e){e._state=ut.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 pOe(i);if(e.isDestroyed())return;let r=sue(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=ut.READY,e}catch(n){return e.isDestroyed()?void 0:aue(e,n,"Failed to load embedded image")}}async function hOe(e){e._state=ut.LOADING;let t=e._baseResource,n=e._uri,i=t.getDerivedResource({url:n});try{let o=await gOe(i);if(e.isDestroyed())return;let r=sue(o);return e.unload(),e._image=r.image,e._mipLevels=r.mipLevels,e._state=ut.READY,e}catch(o){return e.isDestroyed()?void 0:aue(e,o,`Failed to load image: ${n}`)}}function aue(e,t,n){return e.unload(),e._state=ut.FAILED,Promise.reject(e.getError(n,t))}function fOe(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 le("Image format is not recognized")}async function pOe(e){let t=fOe(e);if(t==="image/ktx2"){let n=new Uint8Array(e);return yd(n)}return Yv._loadImageFromTypedArray({uint8Array:e,format:t,flipY:!1,skipColorSpaceConversion:!0})}var bOe=/(^data:image\/ktx2)|(\.ktx2$)/i;function gOe(e){let t=e.getUrlComponent(!1,!0);return bOe.test(t)?yd(e):e.fetchImage({skipColorSpaceConversion:!0,preferImageBitmap:!0})}Yv._loadImageFromTypedArray=cb;var BZ=Yv;var T_n=x(T(),1);var c_n=x(T(),1),cue={TEXTURE:0,PROGRAM:1,BUFFER:2,NUMBER_OF_JOB_TYPES:3};Object.freeze(cue);var Cc=cue;var hj=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,h=t.loadBuffer??!1,p=t.loadTypedArray??!1,b=i.accessors[o].componentType;this._resourceCache=n,this._gltfResource=r,this._baseResource=s,this._gltf=i,this._accessorId=o,this._indexDatatype=b,this._primitive=a,this._draco=c,this._cacheKey=d,this._asynchronous=u,this._loadBuffer=h,this._loadTypedArray=p,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=ut.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=xOe(this),this._promise):(this._promise=TOe(this),this._promise)}process(t){if(this._state===ut.READY)return!0;if(this._state!==ut.LOADED&&this._state!==ut.PROCESSING)return!1;let n=this._typedArray,i=this._indexDatatype;if(l(this._dracoLoader))try{this._dracoLoader.process(t)&&(n=this._dracoLoader.decodedData.indices.typedArray,this._typedArray=n,i=K.fromTypedArray(n),this._indexDatatype=i)}catch(r){pj(this,r)}if(!l(n))return!1;let o;if(this._loadBuffer&&this._asynchronous){let r=yOe;if(r.set(n,i,t.context),!t.jobScheduler.execute(r,Cc.BUFFER))return!1;o=r.buffer}else this._loadBuffer&&(o=lue(n,i,t.context));return this.unload(),this._buffer=o,this._typedArray=this._loadTypedArray?n:void 0,this._state=ut.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}},fj=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=lue(this.typedArray,this.indexDatatype,this.context)}};function lue(e,t,n){let i=qe.createIndexBuffer({typedArray:e,context:n,usage:Fe.STATIC_DRAW,indexDatatype:t});return i.vertexArrayDestroyable=!1,i}var yOe=new fj;async function xOe(e){e._state=ut.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=ut.LOADED,e)}catch(n){if(e.isDestroyed())return;pj(e,n)}}async function TOe(e){let t=e._gltf,n=e._accessorId,o=t.accessors[n].bufferView;e._state=ut.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=_Oe(e,a),e._state=ut.PROCESSING,e}catch(s){if(e.isDestroyed())return;pj(e,s)}}function _Oe(e,t){let n=e._gltf,i=e._accessorId,o=n.accessors[i],r=o.count,s=o.componentType,a=Me.getSizeInBytes(s),c=t.buffer,d=t.byteOffset+o.byteOffset;if(d%a!==0){let h=r*a,p=new Uint8Array(c,d,h);c=new Uint8Array(p).buffer,d=0,La("index-buffer-unaligned",`The index array is not aligned to a ${a}-byte boundary.`)}let u;return s===Me.UNSIGNED_BYTE?u=new Uint8Array(c,d,r):s===Me.UNSIGNED_SHORT?u=new Uint16Array(c,d,r):s===Me.UNSIGNED_INT&&(u=new Uint32Array(c,d,r)),u}function pj(e,t){throw e.unload(),e._state=ut.FAILED,e.getError("Failed to load index buffer",t)}var zZ=hj;var SZn=x(T(),1);var D_n=x(T(),1);var S_n=x(T(),1);function SOe(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 ca=SOe;var G_n=x(T(),1);var C_n=x(T(),1);function AOe(e,t){return l(e.extensionsUsed)&&e.extensionsUsed.indexOf(t)>=0}var Gr=AOe;function en(){}en.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}}};en.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}}};en.topLevel=function(e,t,n){let i=e[t];return l(i)&&!Array.isArray(i)?en.objectLegacy(i,n):en.object(i,n)};en.accessor=function(e,t){return en.topLevel(e,"accessors",t)};en.accessorWithSemantic=function(e,t,n){let i={};return en.mesh(e,function(o){return en.meshPrimitive(o,function(r){let s=en.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:en.meshPrimitiveTarget(r,function(a){return en.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}})})})})};en.accessorContainingVertexAttributeData=function(e,t){let n={};return en.mesh(e,function(i){return en.meshPrimitive(i,function(o){let r=en.meshPrimitiveAttribute(o,function(s){if(!l(n[s])){n[s]=!0;let a=t(s);if(l(a))return a}});return l(r)?r:en.meshPrimitiveTarget(o,function(s){return en.meshPrimitiveTargetAttribute(s,function(a){if(!l(n[a])){n[a]=!0;let c=t(a);if(l(c))return c}})})})})};en.accessorContainingIndexData=function(e,t){let n={};return en.mesh(e,function(i){return en.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}})})};en.animation=function(e,t){return en.topLevel(e,"animations",t)};en.animationChannel=function(e,t){let n=e.channels;return en.object(n,t)};en.animationSampler=function(e,t){let n=e.samplers;return en.object(n,t)};en.buffer=function(e,t){return en.topLevel(e,"buffers",t)};en.bufferView=function(e,t){return en.topLevel(e,"bufferViews",t)};en.camera=function(e,t){return en.topLevel(e,"cameras",t)};en.image=function(e,t){return en.topLevel(e,"images",t)};en.material=function(e,t){return en.topLevel(e,"materials",t)};en.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}};en.mesh=function(e,t){return en.topLevel(e,"meshes",t)};en.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}}};en.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}};en.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}}};en.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}};en.node=function(e,t){return en.topLevel(e,"nodes",t)};en.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=en.nodeInTree(e,d,n),l(c)))return c}}}};en.nodeInScene=function(e,t,n){let i=t.nodes;if(l(i))return en.nodeInTree(e,i,n)};en.program=function(e,t){return Gr(e,"KHR_techniques_webgl")?en.object(e.extensions.KHR_techniques_webgl.programs,t):en.topLevel(e,"programs",t)};en.sampler=function(e,t){return en.topLevel(e,"samplers",t)};en.scene=function(e,t){return en.topLevel(e,"scenes",t)};en.shader=function(e,t){return Gr(e,"KHR_techniques_webgl")?en.object(e.extensions.KHR_techniques_webgl.shaders,t):en.topLevel(e,"shaders",t)};en.skin=function(e,t){return en.topLevel(e,"skins",t)};en.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}}};en.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}};en.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}};en.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}};en.technique=function(e,t){return Gr(e,"KHR_techniques_webgl")?en.object(e.extensions.KHR_techniques_webgl.techniques,t):en.topLevel(e,"techniques",t)};en.texture=function(e,t){return en.topLevel(e,"textures",t)};var Ne=en;var X_n=x(T(),1);var W_n=x(T(),1);function ZOe(e){switch(e){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}}var uu=ZOe;function COe(e,t){let n=t.bufferView;if(l(n)){let i=e.bufferViews[n];if(l(i.byteStride)&&i.byteStride>0)return i.byteStride}return K.getSizeInBytes(t.componentType)*uu(t.type)}var Rd=COe;function VOe(e){Ne.accessor(e,function(n){l(n.bufferView)&&(n.byteOffset=n.byteOffset??0)}),Ne.bufferView(e,function(n){l(n.buffer)&&(n.byteOffset=n.byteOffset??0)}),Ne.mesh(e,function(n){Ne.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=ca(e.materials,o)}})}),Ne.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=Rd(e,i),r.target=ne.ARRAY_BUFFER}}),Ne.accessorContainingIndexData(e,function(n){let o=e.accessors[n].bufferView;if(l(o)){let r=e.bufferViews[o];r.target=ne.ELEMENT_ARRAY_BUFFER}}),Ne.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)&&Ne.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))}),Ne.animation(e,function(n){Ne.animationSampler(n,function(i){i.interpolation=i.interpolation??"LINEAR"})});let t=ROe(e);return Ne.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]}),Ne.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 ROe(e){let t={};return Ne.animation(e,function(n){Ne.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 wv=VOe;var H_n=x(T(),1);function EOe(e){return Ne.shader(e,function(t){F5(t)}),Ne.buffer(e,function(t){F5(t)}),Ne.image(e,function(t){F5(t)}),F5(e),e}function F5(e){e.extras=l(e.extras)?e.extras:{},e.extras._pipeline=l(e.extras._pipeline)?e.extras._pipeline:{}}var xy=EOe;var cSn=x(T(),1);var eSn=x(T(),1);var j_n=x(T(),1);function GOe(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 Mv=GOe;function LOe(e,t){let n=e.extensionsUsed;if(l(n)){let i=n.indexOf(t);i>=0&&n.splice(i,1),Mv(e,t),n.length===0&&delete e.extensionsUsed}}var d_=LOe;var WOe=4;function vOe(e){if(Dh(e)!=="glTF")throw new le("File is not valid binary glTF");let n=due(e,0,5),i=n[1];if(i!==1&&i!==2)throw new le("Binary glTF version is not 1 or 2");return i===1?FOe(e,n):IOe(e,n)}function due(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*WOe,!0);return o}function FOe(e,t){let n=t[2],i=t[3];if(t[4]!==0)throw new le("Binary glTF scene format is not JSON");let r=20,s=r+i,a=Zd(e,r,i),c=JSON.parse(a);xy(c);let d=e.subarray(s,n),u=c.buffers;if(l(u)&&Object.keys(u).length>0){let h=u.binary_glTF??u.KHR_binary_glTF;l(h)&&(h.extras._pipeline.source=d,delete h.uri)}return d_(c,"KHR_binary_glTF"),c}function IOe(e,t){let n=t[2],i=12,o,r;for(;i<n;){let s=due(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=Zd(d);o=JSON.parse(u),xy(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_=vOe;var mSn=x(T(),1);function POe(e){return Ne.shader(e,function(t){I5(t)}),Ne.buffer(e,function(t){I5(t)}),Ne.image(e,function(t){I5(t)}),I5(e),e}function I5(e){l(e.extras)&&(l(e.extras._pipeline)&&delete e.extras._pipeline,Object.keys(e.extras).length===0&&delete e.extras)}var kv=POe;var OAn=x(T(),1);var bSn=x(T(),1);function XOe(e,t){let n=e.extensionsUsed;l(n)||(n=[],e.extensionsUsed=n),ca(n,t,!0)}var Am=XOe;var VSn=x(T(),1);var xSn=x(T(),1);function NOe(e){switch(e){case K.BYTE:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getInt8(n+s*o)};case K.UNSIGNED_BYTE:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getUint8(n+s*o)};case K.SHORT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getInt16(n+s*o,!0)};case K.UNSIGNED_SHORT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getUint16(n+s*o,!0)};case K.INT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getInt32(n+s*o,!0)};case K.UNSIGNED_INT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getUint32(n+s*o,!0)};case K.FLOAT:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getFloat32(n+s*o,!0)};case K.DOUBLE:return function(t,n,i,o,r){for(let s=0;s<i;++s)r[s]=t.getFloat64(n+s*o,!0)}}}var lb=NOe;function YOe(e,t){let n=e.bufferViews,i=e.buffers,o=t.bufferView,r=uu(t.type);if(!l(t.bufferView))return{min:new Array(r).fill(0),max:new Array(r).fill(0)};let s=new Array(r).fill(Number.POSITIVE_INFINITY),a=new Array(r).fill(Number.NEGATIVE_INFINITY),c=n[o],d=c.buffer,h=i[d].extras._pipeline.source,p=t.count,b=Rd(e,t),f=t.byteOffset+c.byteOffset+h.byteOffset,y=t.componentType,_=K.getSizeInBytes(y),S=new DataView(h.buffer),A=new Array(r),Z=lb(y);for(let V=0;V<p;V++){Z(S,f,r,_,A);for(let E=0;E<r;E++){let L=A[E];s[E]=Math.min(s[E],L),a[E]=Math.max(a[E],L)}f+=b}return{min:s,max:a}}var m_=YOe;var vSn=x(T(),1);var wOe=[ne.FUNC_ADD,ne.FUNC_ADD],MOe=[ne.ONE,ne.ZERO,ne.ONE,ne.ZERO];function uue(e,t){let n=e.enable;return l(n)?n.indexOf(t)>-1:!1}var kOe=[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 UOe(e,t){if(!l(e))return t;for(let n=0;n<4;n++)if(kOe.indexOf(e[n])===-1)return t;return e}function DOe(e){let t={},n={},i=e.techniques;return l(i)&&(Ne.technique(e,function(o,r){let s=o.states;if(l(s)){let a=n[r]={};if(uue(s,ne.BLEND)){a.alphaMode="BLEND";let c=s.functions;l(c)&&(l(c.blendEquationSeparate)||l(c.blendFuncSeparate))&&(t[r]={blendEquation:c.blendEquationSeparate??wOe,blendFactors:UOe(c.blendFuncSeparate,MOe)})}uue(s,ne.CULL_FACE)||(a.doubleSided=!0),delete o.states}}),Object.keys(t).length>0&&(l(e.extensions)||(e.extensions={}),Am(e,"KHR_blend")),Ne.material(e,function(o){if(l(o.technique)){let r=n[o.technique];Ne.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 Uv=DOe;var OSn=x(T(),1);var NSn=x(T(),1);function OOe(e,t){let n=e.extensionsRequired;l(n)||(n=[],e.extensionsRequired=n),ca(n,t,!0),Am(e,t)}var Dv=OOe;function BOe(e){let t=e.techniques,n={},i={},o={};if(l(t)){let r={programs:[],shaders:[],techniques:[]},s=e.glExtensionsUsed;delete e.glExtensionsUsed,Ne.technique(e,function(a,c){let d={name:a.name,program:void 0,attributes:{},uniforms:{}},u;if(Ne.techniqueAttribute(a,function(h,p){u=a.parameters[h],d.attributes[p]={semantic:u.semantic}}),Ne.techniqueUniform(a,function(h,p){u=a.parameters[h],d.uniforms[p]={count:u.count,node:u.node,type:u.type,semantic:u.semantic,value:u.value},l(n[c])||(n[c]={}),n[c][h]=p}),l(o[a.program]))d.program=o[a.program];else{let h=e.programs[a.program],p={name:h.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:s},b=e.shaders[h.fragmentShader];p.fragmentShader=ca(r.shaders,b,!0);let f=e.shaders[h.vertexShader];p.vertexShader=ca(r.shaders,f,!0),d.program=ca(r.programs,p),o[a.program]=d.program}i[c]=ca(r.techniques,d)}),r.techniques.length>0&&(l(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=r,Am(e,"KHR_techniques_webgl"),Dv(e,"KHR_techniques_webgl"))}return Ne.material(e,function(r){if(l(r.technique)){let s={technique:i[r.technique]};Ne.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 Ov=BOe;var tAn=x(T(),1);var JSn=x(T(),1);function zOe(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:h}=a.values;if(l(c)&&l(c.index)){let p=t(c.index,c);if(l(p))return p}if(l(d)&&l(d.index)){let p=t(d.index,d);if(l(p))return p}if(l(u)&&l(u.index)){let p=t(u.index,u);if(l(p))return p}if(l(h)&&l(h.index)){let p=t(h.index,h);if(l(p))return p}}}let o=Ne.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 HZ=zOe;var mue=["mesh","node","material","accessor","bufferView","buffer","texture","sampler","image"];function HOe(e,t){return t=t??mue,mue.forEach(function(n){t.indexOf(n)>-1&&JOe(e,n)}),e}var KOe={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",image:"images",node:"nodes",material:"materials",mesh:"meshes",sampler:"samplers",texture:"textures"};function JOe(e,t){let n=KOe[t],i=e[n];if(l(i)){let o=0,r=Tp[t](e),s=i.length;for(let a=0;a<s;++a)r[a]||(xp[t](e,a-o),o++)}}function xp(){}xp.accessor=function(e,t){e.accessors.splice(t,1),Ne.mesh(e,function(i){Ne.meshPrimitive(i,function(o){Ne.meshPrimitiveAttribute(o,function(a,c){a>t&&o.attributes[c]--}),Ne.meshPrimitiveTarget(o,function(a){Ne.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})}),Ne.skin(e,function(i){l(i.inverseBindMatrices)&&i.inverseBindMatrices>t&&i.inverseBindMatrices--}),Ne.animation(e,function(i){Ne.animationSampler(i,function(o){l(o.input)&&o.input>t&&o.input--,l(o.output)&&o.output>t&&o.output--})})};xp.buffer=function(e,t){e.buffers.splice(t,1),Ne.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--})};xp.bufferView=function(e,t){if(e.bufferViews.splice(t,1),Ne.accessor(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Ne.shader(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Ne.image(e,function(i){l(i.bufferView)&&i.bufferView>t&&i.bufferView--}),Gr(e,"KHR_draco_mesh_compression")&&Ne.mesh(e,function(i){Ne.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--})}),Gr(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(Gr(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--}}}}};xp.image=function(e,t){e.images.splice(t,1),Ne.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})};xp.mesh=function(e,t){e.meshes.splice(t,1),Ne.node(e,function(i){l(i.mesh)&&(i.mesh>t?i.mesh--:i.mesh===t&&delete i.mesh)})};xp.node=function(e,t){e.nodes.splice(t,1),Ne.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})}),Ne.animation(e,function(i){Ne.animationChannel(i,function(o){l(o.target)&&l(o.target.node)&&o.target.node>t&&o.target.node--})}),Ne.technique(e,function(i){Ne.techniqueUniform(i,function(o){l(o.node)&&o.node>t&&o.node--})}),Ne.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}))}),Ne.scene(e,function(i){i.nodes=i.nodes.filter(function(o){return o!==t}).map(function(o){return o>t?o-1:o})})};xp.material=function(e,t){e.materials.splice(t,1),Ne.mesh(e,function(i){Ne.meshPrimitive(i,function(o){l(o.material)&&o.material>t&&o.material--})})};xp.sampler=function(e,t){e.samplers.splice(t,1),Ne.texture(e,function(i){l(i.sampler)&&i.sampler>t&&--i.sampler})};xp.texture=function(e,t){if(e.textures.splice(t,1),Ne.material(e,function(i){HZ(i,function(o,r){r.index>t&&--r.index})}),Gr(e,"EXT_feature_metadata")){Ne.mesh(e,function(r){Ne.meshPrimitive(r,function(s){let a=s.extensions;if(l(a)&&l(a.EXT_feature_metadata)){let d=a.EXT_feature_metadata.featureIdTextures;if(l(d)){let u=d.length;for(let h=0;h<u;++h){let b=d[h].featureIds.texture;b.index>t&&--b.index}}}})});let o=e.extensions.EXT_feature_metadata.featureTextures;for(let r in o)if(o.hasOwnProperty(r)){let a=o[r].properties;if(l(a)){for(let c in a)if(a.hasOwnProperty(c)){let u=a[c].texture;u.index>t&&--u.index}}}}if(Gr(e,"EXT_mesh_features")&&Ne.mesh(e,function(i){Ne.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}}}})}),Gr(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 Tp(){}Tp.accessor=function(e){let t={};return Ne.mesh(e,function(n){Ne.meshPrimitive(n,function(i){Ne.meshPrimitiveAttribute(i,function(r){t[r]=!0}),Ne.meshPrimitiveTarget(i,function(r){Ne.meshPrimitiveTargetAttribute(r,function(s){t[s]=!0})});let o=i.indices;l(o)&&(t[o]=!0)})}),Ne.skin(e,function(n){l(n.inverseBindMatrices)&&(t[n.inverseBindMatrices]=!0)}),Ne.animation(e,function(n){Ne.animationSampler(n,function(i){l(i.input)&&(t[i.input]=!0),l(i.output)&&(t[i.output]=!0)})}),Gr(e,"EXT_mesh_gpu_instancing")&&Ne.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})}),Gr(e,"CESIUM_primitive_outline")&&Ne.mesh(e,function(n){Ne.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};Tp.buffer=function(e){let t={};return Ne.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};Tp.bufferView=function(e){let t={};if(Ne.accessor(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Ne.shader(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Ne.image(e,function(n){l(n.bufferView)&&(t[n.bufferView]=!0)}),Gr(e,"KHR_draco_mesh_compression")&&Ne.mesh(e,function(n){Ne.meshPrimitive(n,function(i){l(i.extensions)&&l(i.extensions.KHR_draco_mesh_compression)&&(t[i.extensions.KHR_draco_mesh_compression.bufferView]=!0)})}),Gr(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(Gr(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};Tp.image=function(e){let t={};return Ne.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};Tp.mesh=function(e){let t={};return Ne.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 hue(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!hue(e,o,n)}).length===0}Tp.node=function(e){let t={};return Ne.skin(e,function(n){l(n.skeleton)&&(t[n.skeleton]=!0),Ne.skinJoint(n,function(i){t[i]=!0})}),Ne.animation(e,function(n){Ne.animationChannel(n,function(i){l(i.target)&&l(i.target.node)&&(t[i.target.node]=!0)})}),Ne.technique(e,function(n){Ne.techniqueUniform(n,function(i){l(i.node)&&(t[i.node]=!0)})}),Ne.node(e,function(n,i){hue(e,i,t)||(t[i]=!0)}),t};Tp.material=function(e){let t={};return Ne.mesh(e,function(n){Ne.meshPrimitive(n,function(i){l(i.material)&&(t[i.material]=!0)})}),t};Tp.texture=function(e){let t={};if(Ne.material(e,function(n){HZ(n,function(i){t[i]=!0})}),Gr(e,"EXT_feature_metadata")){Ne.mesh(e,function(o){Ne.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(Gr(e,"EXT_mesh_features")&&Ne.mesh(e,function(n){Ne.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)}}}})}),Gr(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};Tp.sampler=function(e){let t={};return Ne.texture(e,function(n){l(n.sampler)&&(t[n.sampler]=!0)}),t};var Bv=HOe;var yAn=x(T(),1);var oAn=x(T(),1);function jOe(e,t){let n={byteLength:t.length,extras:{_pipeline:{source:t}}},o={buffer:ca(e.buffers,n),byteOffset:0,byteLength:t.length};return ca(e.bufferViews,o)}var zv=jOe;var uAn=x(T(),1);function QOe(e,t){let n=Rd(e,t),i=K.getSizeInBytes(t.componentType),o=uu(t.type),r=t.count,s=new Array(o*r);if(!l(t.bufferView))return s.fill(0);let a=e.bufferViews[t.bufferView],c=e.buffers[a.buffer].extras._pipeline.source,d=t.byteOffset+a.byteOffset+c.byteOffset,u=new DataView(c.buffer),h=new Array(o),p=lb(t.componentType);for(let b=0;b<r;++b){p(u,d,o,i,h);for(let f=0;f<o;++f)s[b*o+f]=h[f];d+=n}return s}var Hv=QOe;function qOe(e){let t;return Ne.accessorWithSemantic(e,"JOINTS_0",function(n){let i=e.accessors[n];t=i.componentType,t===ne.BYTE?P5(e,i,K.UNSIGNED_BYTE):t!==ne.UNSIGNED_BYTE&&t!==ne.UNSIGNED_SHORT&&P5(e,i,K.UNSIGNED_SHORT)}),Ne.accessorWithSemantic(e,"WEIGHTS_0",function(n){let i=e.accessors[n];t=i.componentType,t===ne.BYTE?P5(e,i,K.UNSIGNED_BYTE):t===ne.SHORT&&P5(e,i,K.UNSIGNED_SHORT)}),e}function P5(e,t,n){let i=K.createTypedArray(n,Hv(e,t)),o=new Uint8Array(i.buffer);t.bufferView=zv(e,o),t.componentType=n,t.byteOffset=0}var Kv=qOe;var AAn=x(T(),1);function $Oe(e,t){return d_(e,t),t==="CESIUM_RTC"&&eBe(e),bj(e,t)}function eBe(e){Ne.technique(e,function(t){Ne.techniqueUniform(t,function(n){n.semantic==="CESIUM_RTC_MODELVIEW"&&(n.semantic="MODELVIEW")})})}function bj(e,t){if(Array.isArray(e)){let n=e.length;for(let i=0;i<n;++i)bj(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)&&bj(e[o],t);return i}}var h_=$Oe;var X5={.8:sBe,"1.0":RBe,"2.0":void 0};function tBe(e,t){t=t??{};let n=t.targetVersion,i=e.version;e.asset=e.asset??{version:"1.0"},e.asset.version=e.asset.version??"1.0",i=(i??e.asset.version).toString(),Object.prototype.hasOwnProperty.call(X5,i)||(l(i)&&(i=i.substring(0,3)),Object.prototype.hasOwnProperty.call(X5,i)||(i="1.0"));let o=X5[i];for(;l(o)&&i!==n;)o(e,t),i=e.asset.version,o=X5[i];return t.keepLegacyExtensions||(LBe(e,t),WBe(e)),e}function bue(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 nBe(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 iBe(e){let t=e.nodes,n=new m,i=new Pe;for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){let r=t[o];if(l(r.rotation)){let a=r.rotation;m.fromArray(a,0,n),Pe.fromAxisAngle(n,a[3],i),r.rotation=[i.x,i.y,i.z,i.w]}let s=r.instanceSkin;l(s)&&(r.skeletons=s.skeletons,r.skin=s.skin,r.meshes=s.meshes,delete r.instanceSkin)}}function oBe(e){let t=e.animations,n=e.accessors,i=e.bufferViews,o=e.buffers,r={},s=new m,a=new Pe;for(let c in t)if(Object.prototype.hasOwnProperty.call(t,c)){let d=t[c],u=d.channels,h=d.parameters,p=d.samplers;if(l(u)){let b=u.length;for(let f=0;f<b;++f){let y=u[f];if(y.target.path==="rotation"){let _=h[p[y.sampler].output];if(l(r[_]))continue;r[_]=!0;let S=n[_],A=i[S.bufferView],V=o[A.buffer].extras._pipeline.source,E=V.byteOffset+A.byteOffset+S.byteOffset,L=S.componentType,v=S.count,I=uu(S.type),X=S.count*I,N=K.createArrayBufferView(L,V.buffer,E,X);for(let g=0;g<v;g++){let C=g*I;m.unpack(N,C,s);let R=N[C+3];Pe.fromAxisAngle(s,R,a),Pe.pack(a,N,C)}}}}}}function rBe(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 sBe(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,bue(e),nBe(e),iBe(e),oBe(e),rBe(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,Am(e,"KHR_materials_common")}}function aBe(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 fue(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 cBe(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]=fue(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]),Ne.bufferView(e,function(s){l(s.buffer)&&(s.buffer=n.buffers[s.buffer])}),Ne.accessor(e,function(s){l(s.bufferView)&&(s.bufferView=n.bufferViews[s.bufferView])}),Ne.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}}),Ne.program(e,function(s){l(s.vertexShader)&&(s.vertexShader=n.shaders[s.vertexShader]),l(s.fragmentShader)&&(s.fragmentShader=n.shaders[s.fragmentShader])}),Ne.technique(e,function(s){l(s.program)&&(s.program=n.programs[s.program]),Ne.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]})})}),Ne.mesh(e,function(s){Ne.meshPrimitive(s,function(a){l(a.indices)&&(a.indices=n.accessors[a.indices]),Ne.meshPrimitiveAttribute(a,function(c,d){a.attributes[d]=n.accessors[c]}),l(a.material)&&(a.material=n.materials[a.material])})}),Ne.node(e,function(s){let a=s.children;if(l(a)){let c=a.length;for(t=0;t<c;++t)a[t]=n.nodes[a[t]]}if(l(s.meshes)){let c=s.meshes,d=c.length;if(d>0)for(s.mesh=n.meshes[c[0]],t=1;t<d;++t){let u={mesh:n.meshes[c[t]]},h=ca(e.nodes,u);l(a)||(a=[],s.children=a),a.push(h)}delete s.meshes}if(l(s.camera)&&(s.camera=n.cameras[s.camera]),l(s.skin)&&(s.skin=n.skins[s.skin]),l(s.skeletons)){let c=s.skeletons;if(c.length>0&&l(s.skin)){let u=e.skins[s.skin];u.skeleton=n.nodes[c[0]]}delete s.skeletons}l(s.jointName)&&delete s.jointName}),Ne.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}}),Ne.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]]}}),Ne.animation(e,function(s){let a={};s.samplers=fue(s.samplers,a),Ne.animationSampler(s,function(c){c.input=n.accessors[c.input],c.output=n.accessors[c.output]}),Ne.animationChannel(s,function(c){c.sampler=a[c.sampler];let d=c.target;l(d)&&(d.node=n.nodes[d.id],delete d.id)})}),Ne.material(e,function(s){l(s.technique)&&(s.technique=n.techniques[s.technique]),Ne.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)&&Ne.materialValue(c,function(d,u){typeof d=="string"&&(c.values[u]={index:n.textures[d]})})}}),Ne.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}}),Ne.texture(e,function(s){l(s.sampler)&&(s.sampler=n.samplers[s.sampler]),l(s.source)&&(s.source=n.images[s.source])})}function lBe(e){Ne.animation(e,function(t){Ne.animationSampler(t,function(n){delete n.name})})}function dBe(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]}Ne.node(e,function(t){l(t.children)&&t.children.length===0&&delete t.children})}function uBe(e){let t=e.asset;delete t.profile,delete t.premultipliedAlpha}var mBe={CESIUM_RTC:!0,KHR_materials_common:!0,WEB3D_quantized_attributes:!0};function hBe(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(mBe[o])&&e.extensionsRequired.push(o)}}}function fBe(e){Ne.buffer(e,function(t){delete t.type})}function pBe(e){Ne.texture(e,function(t){delete t.format,delete t.internalFormat,delete t.target,delete t.type})}function bBe(e){Ne.mesh(e,function(t){Ne.meshPrimitive(t,function(n){Ne.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})}),Ne.technique(e,function(t){Ne.techniqueParameter(t,function(n){let i=n.semantic;l(i)&&(i==="TEXCOORD"?n.semantic="TEXCOORD_0":i==="COLOR"&&(n.semantic="COLOR_0"))})})}var gBe={POSITION:!0,NORMAL:!0,TANGENT:!0},yBe={COLOR:"COLOR",JOINT:"JOINTS",JOINTS:"JOINTS",TEXCOORD:"TEXCOORD",WEIGHT:"WEIGHTS",WEIGHTS:"WEIGHTS"};function xBe(e){let t={};Ne.mesh(e,function(n){Ne.meshPrimitive(n,function(i){Ne.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=yBe[a];l(u)?(d=u+c,t[r]=d):l(gBe[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)}})}),Ne.technique(e,function(n){Ne.techniqueParameter(n,function(i){let o=t[i.semantic];l(o)&&(i.semantic=o)})})}function TBe(e){Ne.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 yj(e,t){return l(t.byteStride)&&t.byteStride!==0?t.byteStride:Rd(e,t)}function _Be(e){Ne.buffer(e,function(t){l(t.byteLength)||(t.byteLength=t.extras._pipeline.source.length)}),Ne.accessor(e,function(t){let n=t.bufferView;if(l(n)){let i=e.bufferViews[n],o=yj(e,t),r=t.byteOffset+t.count*o;i.byteLength=Math.max(i.byteLength??0,r)}})}function SBe(e){let t,n,i,o=e.bufferViews,r={};Ne.accessorContainingVertexAttributeData(e,function(a){let c=e.accessors[a];l(c.bufferView)&&(r[c.bufferView]=!0)});let s={};Ne.accessor(e,function(a){l(a.bufferView)&&(s[a.bufferView]=s[a.bufferView]??[],s[a.bufferView].push(a))});for(let a in s)if(Object.prototype.hasOwnProperty.call(s,a)){i=o[a];let c=s[a];c.sort(function(p,b){return p.byteOffset-b.byteOffset});let d=0,u=0,h=c.length;for(t=0;t<h;++t){let p=c[t],b=yj(e,p),f=p.byteOffset,y=p.count*b;delete p.byteStride;let _=t<h-1,S=_?yj(e,c[t+1]):void 0;if(b!==S){let A=ze(i,!0);r[a]&&(A.byteStride=b),A.byteOffset+=d,A.byteLength=f+y-d;let Z=ca(o,A);for(n=u;n<=t;++n)p=c[n],p.bufferView=Z,p.byteOffset=p.byteOffset-d;d=_?c[t+1].byteOffset:void 0,u=t+1}}}Bv(e,["accessor","bufferView","buffer"])}function ABe(e){Ne.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 gue(e){return(!l(e.children)||e.children.length===0)&&(!l(e.meshes)||e.meshes.length===0)&&!l(e.camera)&&!l(e.skin)&&!l(e.skeletons)&&!l(e.jointName)&&(!l(e.translation)||m.fromArray(e.translation).equals(m.ZERO))&&(!l(e.scale)||m.fromArray(e.scale).equals(new m(1,1,1)))&&(!l(e.rotation)||se.fromArray(e.rotation).equals(new se(0,0,0,1)))&&(!l(e.matrix)||F.fromColumnMajorArray(e.matrix).equals(F.IDENTITY))&&!l(e.extensions)&&!l(e.extras)}function yue(e,t){Ne.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}}}),Ne.node(e,function(n,i){if(l(n.children)){let o=n.children.indexOf(t);o>-1&&(n.children.splice(o,1),gue(n)&&yue(e,i))}}),delete e.nodes[t]}function ZBe(e){return Ne.node(e,function(t,n){gue(t)&&yue(e,n)}),e}function CBe(e){Ne.animation(e,function(t){Ne.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 VBe(e){Ne.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 RBe(e){e.asset=e.asset??{},e.asset.version="2.0",bue(e),aBe(e),ZBe(e),cBe(e),lBe(e),uBe(e),hBe(e),_Be(e),SBe(e),ABe(e),CBe(e),VBe(e),fBe(e),pBe(e),bBe(e),xBe(e),Kv(e),TBe(e),Uv(e),Ov(e),dBe(e)}var EBe=["u_tex","u_diffuse","u_emission","u_diffuse_tex"],GBe=["u_diffuse","u_diffuse_mat"];function xj(e){e.pbrMetallicRoughness=l(e.pbrMetallicRoughness)?e.pbrMetallicRoughness:{},e.pbrMetallicRoughness.roughnessFactor=1,e.pbrMetallicRoughness.metallicFactor=0}function Tj(e){return l(e.index)}function _j(e){return Array.isArray(e)&&e.length===4}function xue(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 LBe(e,t){t=t??{};let n=t.baseColorTextureNames??EBe,i=t.baseColorFactorNames??GBe;Ne.material(e,function(o){Ne.materialValue(o,function(r,s){n.indexOf(s)!==-1&&Tj(r)?(xj(o),o.pbrMetallicRoughness.baseColorTexture=r):i.indexOf(s)!==-1&&_j(r)&&(xj(o),o.pbrMetallicRoughness.baseColorFactor=xue(r))})}),h_(e,"KHR_techniques_webgl"),h_(e,"KHR_blend")}function gj(e,t){l(t)&&(_j(t)?e.pbrMetallicRoughness.baseColorFactor=xue(t):Tj(t)&&(e.pbrMetallicRoughness.baseColorTexture=t))}function pue(e,t){l(t)&&(_j(t)?e.emissiveFactor=t.slice(0,3):Tj(t)&&(e.emissiveTexture=t))}function WBe(e){Ne.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;xj(t),n.technique==="CONSTANT"?(Am(e,"KHR_materials_unlit"),t.extensions=l(t.extensions)?t.extensions:{},t.extensions.KHR_materials_unlit={},gj(t,s),gj(t,o)):(gj(t,r),pue(t,o),pue(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 Jv=tBe;var iZn=x(T(),1);function Jc(){}Jc.getError=function(e,t,n){let i=`Failed to load ${e}: ${t}`;l(n)&&l(n.message)&&(i+=`
${n.message}`);let o=new le(i);return l(n)&&(o.stack=`Original stack:
${n.stack}
Handler stack:
${o.stack}`),o};Jc.getNodeTransform=function(e){return l(e.matrix)?e.matrix:F.fromTranslationQuaternionRotationScale(l(e.translation)?e.translation:m.ZERO,l(e.rotation)?e.rotation:Pe.IDENTITY,l(e.scale)?e.scale:m.ONE)};Jc.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}};Jc.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}};Jc.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}};Jc.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};Jc.getAttributeInfo=function(e){let t=e.semantic,n=e.setIndex,i,o=!1;l(t)?(i=nt.getVariableName(t,n),o=!0):(i=e.name,i=i.replace(/^_/,""),i=i.toLowerCase());let r=/^color_\d+$/.test(i),s=e.type,a=Nt.getGlslType(s);r&&(a="vec4");let c=l(e.quantization),d;return c&&(d=r?"vec4":Nt.getGlslType(e.quantization.type)),{attribute:e,isQuantized:c,variableName:i,hasSemantic:o,glslType:a,quantizedGlslType:d}};var vBe=new m,FBe=new m;Jc.getPositionMinMax=function(e,t,n){let i=Jc.getAttributeBySemantic(e,"POSITION"),o=i.max,r=i.min;return l(n)&&l(t)&&(r=m.add(r,t,FBe),o=m.add(o,n,vBe)),{min:r,max:o}};Jc.getAxisCorrectionMatrix=function(e,t,n){return n=F.clone(F.IDENTITY,n),e===to.Y?n=F.clone(to.Y_UP_TO_Z_UP,n):e===to.X&&(n=F.clone(to.X_UP_TO_Z_UP,n)),t===to.Z&&(n=F.multiplyTransformation(n,to.Z_UP_TO_X_UP,n)),n};var IBe=new q;Jc.getCullFace=function(e,t){if(!ve.isTriangles(t))return Pi.BACK;let n=F.getMatrix3(e,IBe);return q.determinant(n)<0?Pi.FRONT:Pi.BACK};Jc.sanitizeGlslIdentifier=function(e){let t=e.replaceAll(/[^A-Za-z0-9]+/g,"_");return t=t.replace(/^gl_/,""),/^\d/.test(t)&&(t=`_${t}`),t};Jc.supportedExtensions={AGI_articulations:!0,CESIUM_primitive_outline:!0,CESIUM_RTC:!0,EXT_feature_metadata:!0,EXT_implicit_cylinder_region:!0,EXT_implicit_ellipsoid_region:!0,EXT_instance_features:!0,EXT_mesh_features:!0,EXT_mesh_gpu_instancing:!0,EXT_meshopt_compression:!0,EXT_primitive_voxels:!0,EXT_structural_metadata:!0,EXT_texture_webp:!0,KHR_blend:!0,KHR_draco_mesh_compression:!0,KHR_implicit_shapes:!0,KHR_materials_common:!0,KHR_materials_pbrSpecularGlossiness:!0,KHR_materials_specular:!0,KHR_materials_anisotropy:!0,KHR_materials_clearcoat:!0,KHR_materials_unlit:!0,KHR_mesh_quantization:!0,KHR_techniques_webgl:!0,KHR_texture_basisu:!0,KHR_texture_transform:!0,KHR_gaussian_splatting:!0,KHR_gaussian_splatting_compression_spz_2:!0,WEB3D_quantized_attributes:!0};Jc.checkSupportedExtensions=function(e){let t=e.length;for(let n=0;n<t;n++){let i=e[n];if(!Jc.supportedExtensions[i])throw new le(`Unsupported glTF Extension: ${i}`)}};var mt=Jc;var Sj=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=ut.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=ut.LOADING,l(this._gltfJson)?(this._promise=Tue(this,this._gltfJson),this._promise):l(this._typedArray)?(this._promise=_ue(this,this._typedArray),this._promise):(this._promise=PBe(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 PBe(e){let t;try{let n=await e._fetchGltf();if(e.isDestroyed())return;t=new Uint8Array(n)}catch(n){if(e.isDestroyed())return;Aj(e,n)}return _ue(e,t)}function Aj(e,t){e.unload(),e._state=ut.FAILED;let n=`Failed to load glTF: ${e._gltfResource.url}`;throw e.getError(n,t)}async function XBe(e,t){if(l(t.asset)&&t.asset.version==="2.0"&&!Gr(t,"KHR_techniques_webgl")&&!Gr(t,"KHR_materials_common"))return Promise.resolve();let n=[];Ne.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),Jv(t)}function NBe(e){let t=[];return Ne.buffer(e,function(n){let i=n.uri;!l(n.extras._pipeline.source)&&l(i)&&Zh(i)&&(delete n.uri,t.push(We.fetchArrayBuffer(i).then(function(o){n.extras._pipeline.source=new Uint8Array(o)})))}),Promise.all(t)}function YBe(e,t){let n=[];return Ne.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 Tue(e,t){try{xy(t),await NBe(t),await XBe(e,t),wv(t),await YBe(e,t),kv(t);let n=t.asset.version;if(n!=="1.0"&&n!=="2.0")throw new le(`Unsupported glTF version: ${n}`);let i=t.extensionsRequired;return l(i)&&mt.checkSupportedExtensions(i),e._gltf=t,e._state=ut.READY,e}catch(n){if(e.isDestroyed())return;Aj(e,n)}}async function _ue(e,t){let n;try{Dh(t)==="glTF"?n=u_(t):n=xr(t)}catch(i){if(e.isDestroyed())return;Aj(e,i)}return Tue(e,n)}var KZ=Sj;var sCn=x(T(),1);var DZn=x(T(),1);var WZn=x(T(),1);var ZZn=x(T(),1),Sue={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};Object.freeze(Sue);var _p=Sue;var Wo={},Zj=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}},Cj=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}},Vj=class{constructor(){this.indexDatatype=void 0,this.count=void 0,this.buffer=void 0,this.typedArray=void 0}},Rj=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}},Ej=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}},Gj=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}},Lj=class{constructor(){this.attributes=[]}},Wj=class{constructor(){this.attributes=[],this.morphTargets=[],this.indices=void 0,this.material=void 0,this.primitiveType=void 0,this.vector=void 0,this.featureIds=[],this.propertyTextureIds=[],this.propertyAttributeIds=[],this.outlineCoordinates=void 0,this.modelPrimitiveImagery=void 0,this.edgeVisibility=void 0}},vj=class{constructor(){this.attributes=[],this.featureIds=[],this.transformInWorldSpace=!1}},Fj=class{constructor(){this.index=void 0,this.joints=[],this.inverseBindMatrices=[]}},Ij=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}},Pj=class{constructor(){this.nodes=[]}},wBe={TRANSLATION:"translation",ROTATION:"rotation",SCALE:"scale",WEIGHTS:"weights"},Xj=class{constructor(){this.input=[],this.interpolation=void 0,this.output=[]}},Nj=class{constructor(){this.node=void 0,this.path=void 0}},Yj=class{constructor(){this.sampler=void 0,this.target=void 0}},wj=class{constructor(){this.name=void 0,this.samplers=[],this.channels=[]}},Mj=class{constructor(){this.name=void 0,this.type=void 0,this.minimumValue=void 0,this.maximumValue=void 0,this.initialValue=void 0}},kj=class{constructor(){this.name=void 0,this.stages=[]}},N5=class{constructor(){this.credits=[]}},Uj=class{constructor(){this.asset=new N5,this.scene=void 0,this.nodes=[],this.skins=[],this.animations=[],this.articulations=[],this.structuralMetadata=void 0,this.upAxis=void 0,this.forwardAxis=void 0,this.transform=F.clone(F.IDENTITY),this.extensions={}}},Dj=class{constructor(){this.texture=void 0,this.index=void 0,this.texCoord=0,this.transform=q.clone(q.IDENTITY),this.scale=1,this.channels=void 0,this.constantLod=void 0}},Ty=class Ty{constructor(){this.baseColorTexture=void 0,this.metallicRoughnessTexture=void 0,this.baseColorFactor=se.clone(Ty.DEFAULT_BASE_COLOR_FACTOR),this.metallicFactor=Ty.DEFAULT_METALLIC_FACTOR,this.roughnessFactor=Ty.DEFAULT_ROUGHNESS_FACTOR}};Qt(Ty,"DEFAULT_BASE_COLOR_FACTOR",se.ONE),Qt(Ty,"DEFAULT_METALLIC_FACTOR",1),Qt(Ty,"DEFAULT_ROUGHNESS_FACTOR",1);var Y5=Ty,_y=class _y{constructor(){this.diffuseTexture=void 0,this.specularGlossinessTexture=void 0,this.diffuseFactor=se.clone(_y.DEFAULT_DIFFUSE_FACTOR),this.specularFactor=m.clone(_y.DEFAULT_SPECULAR_FACTOR),this.glossinessFactor=_y.DEFAULT_GLOSSINESS_FACTOR}};Qt(_y,"DEFAULT_DIFFUSE_FACTOR",se.ONE),Qt(_y,"DEFAULT_SPECULAR_FACTOR",m.ONE),Qt(_y,"DEFAULT_GLOSSINESS_FACTOR",1);var Oj=_y,JZ=class JZ{constructor(){this.specularFactor=JZ.DEFAULT_SPECULAR_FACTOR,this.specularTexture=void 0,this.specularColorFactor=m.clone(JZ.DEFAULT_SPECULAR_COLOR_FACTOR),this.specularColorTexture=void 0}};Qt(JZ,"DEFAULT_SPECULAR_FACTOR",1),Qt(JZ,"DEFAULT_SPECULAR_COLOR_FACTOR",m.ONE);var Bj=JZ,jZ=class jZ{constructor(){this.anisotropyStrength=jZ.DEFAULT_ANISOTROPY_STRENGTH,this.anisotropyRotation=jZ.DEFAULT_ANISOTROPY_ROTATION,this.anisotropyTexture=void 0}};Qt(jZ,"DEFAULT_ANISOTROPY_STRENGTH",0),Qt(jZ,"DEFAULT_ANISOTROPY_ROTATION",0);var zj=jZ,QZ=class QZ{constructor(){this.clearcoatFactor=QZ.DEFAULT_CLEARCOAT_FACTOR,this.clearcoatTexture=void 0,this.clearcoatRoughnessFactor=QZ.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,this.clearcoatRoughnessTexture=void 0,this.clearcoatNormalTexture=void 0}};Qt(QZ,"DEFAULT_CLEARCOAT_FACTOR",0),Qt(QZ,"DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR",0);var Hj=QZ,Kj=class{constructor(){Qt(this,"width");Qt(this,"pattern")}},w5=class w5{constructor(){this.metallicRoughness=new Y5,this.specularGlossiness=void 0,this.specular=void 0,this.anisotropy=void 0,this.clearcoat=void 0,this.emissiveTexture=void 0,this.normalTexture=void 0,this.occlusionTexture=void 0,this.emissiveFactor=m.clone(w5.DEFAULT_EMISSIVE_FACTOR),this.alphaMode=_p.OPAQUE,this.alphaCutoff=.5,this.doubleSided=!1,this.unlit=!1,this.pointDiameter=void 0,this.lineStyle=void 0}};Qt(w5,"DEFAULT_EMISSIVE_FACTOR",m.ZERO);var Jj=w5,jj=class{constructor(){Qt(this,"vector",!0);Qt(this,"count",0);Qt(this,"polygonAttributeOffsets");Qt(this,"polygonHoleCounts");Qt(this,"polygonHoleOffsets");Qt(this,"polygonIndicesOffsets")}};Wo.Quantization=Zj;Wo.Attribute=Cj;Wo.Indices=Vj;Wo.FeatureIdAttribute=Rj;Wo.FeatureIdTexture=Gj;Wo.FeatureIdImplicitRange=Ej;Wo.MorphTarget=Lj;Wo.Primitive=Wj;Wo.Instances=vj;Wo.Skin=Fj;Wo.Node=Ij;Wo.Scene=Pj;Wo.AnimatedPropertyType=Object.freeze(wBe);Wo.AnimationSampler=Xj;Wo.AnimationTarget=Nj;Wo.AnimationChannel=Yj;Wo.Animation=wj;Wo.ArticulationStage=Mj;Wo.Articulation=kj;Wo.Asset=N5;Wo.Components=Uj;Wo.TextureReader=Dj;Wo.MetallicRoughness=Y5;Wo.SpecularGlossiness=Oj;Wo.Specular=Bj;Wo.Anisotropy=zj;Wo.Clearcoat=Hj;Wo.LineStyle=Kj;Wo.Material=Jj;Wo.Vector=jj;var yn=Wo;var M5={};M5.getImageIdFromTexture=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,textureId:n,supportedImageFormats:i}=e,o=t.textures[n],r=o.extensions;if(l(r)){if(i.webp&&l(r.EXT_texture_webp))return r.EXT_texture_webp.source;if(i.basis&&l(r.KHR_texture_basisu))return r.KHR_texture_basisu.source}return o.source};M5.createSampler=function(e){e=e??B.EMPTY_OBJECT;let{gltf:t,textureInfo:n,compressedTextureNoMipmap:i=!1}=e,o=un.REPEAT,r=un.REPEAT,s=kt.LINEAR,a=ni.LINEAR,c=n.index,u=t.textures[c].sampler;if(l(u)){let h=t.samplers[u];o=h.wrapS??o,r=h.wrapT??r,s=h.minFilter??s,a=h.magFilter??a}return i&&s!==kt.LINEAR&&s!==kt.NEAREST&&(s===kt.NEAREST_MIPMAP_NEAREST||s===kt.NEAREST_MIPMAP_LINEAR?s=kt.NEAREST:s=kt.LINEAR),new Ut({wrapS:o,wrapT:r,minificationFilter:s,magnificationFilter:a})};var MBe=new M(1,1);M5.createModelTextureReader=function(e){e=e??B.EMPTY_OBJECT;let{textureInfo:t,channels:n,texture:i}=e,o=t.texCoord??0,r,s=t.extensions?.KHR_texture_transform;if(l(s)){o=s.texCoord??o;let d=l(s.offset)?M.unpack(s.offset):M.ZERO,u=s.rotation??0,h=l(s.scale)?M.unpack(s.scale):MBe;u=-u,r=new q(Math.cos(u)*h.x,-Math.sin(u)*h.y,d.x,Math.sin(u)*h.x,Math.cos(u)*h.y,d.y,0,0,1)}let a=new yn.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)?M.unpack(c.offset):M.ZERO,minClampDistance:c.minClampDistance??1,maxClampDistance:c.maxClampDistance??4294967296}),a};var Ed=M5;var zZn=x(T(),1);function kBe(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 Sy=kBe;var Qj=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,h=Ed.getImageIdFromTexture({gltf:i,textureId:u,supportedImageFormats:a});this._resourceCache=n,this._gltf=i,this._textureInfo=o,this._imageId=h,this._gltfResource=r,this._baseResource=s,this._cacheKey=c,this._asynchronous=d,this._imageLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._texture=void 0,this._state=ut.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=ut.LOADING,this._promise=DBe(this),this._promise)}process(t){if(this._state===ut.READY)return!0;if(this._state!==ut.LOADED&&this._state!==ut.PROCESSING||l(this._texture)||!l(this._image))return!1;this._state=ut.PROCESSING;let n;if(this._asynchronous){let i=UBe;if(i.set(this._gltf,this._textureInfo,this._cacheKey,this._image,this._mipLevels,t.context),!t.jobScheduler.execute(i,Cc.TEXTURE))return!1;n=i.texture}else n=Aue(this._gltf,this._textureInfo,this._cacheKey,this._image,this._mipLevels,t.context);return this.unload(),this._texture=n,this._state=ut.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}},qj=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=Aue(this.gltf,this.textureInfo,this.textureId,this.image,this.mipLevels,this.context)}};function Aue(e,t,n,i,o,r){let s=i.internalFormat,a=!1;Ke.isCompressedFormat(s)&&!l(o)&&(a=!0);let c=Ed.createSampler({gltf:e,textureInfo:t,compressedTextureNoMipmap:a}),d=c.minificationFilter,u=c.wrapS,h=c.wrapT,p=d===kt.NEAREST_MIPMAP_NEAREST||d===kt.NEAREST_MIPMAP_LINEAR||d===kt.LINEAR_MIPMAP_NEAREST||d===kt.LINEAR_MIPMAP_LINEAR,b=!l(s)&&p,f=b||u===un.REPEAT||u===un.MIRRORED_REPEAT||h===un.REPEAT||h===un.MIRRORED_REPEAT,y=!W.isPowerOfTwo(i.width)||!W.isPowerOfTwo(i.height),_=f&&y,S;return l(s)?(!r.webgl2&&Ke.isCompressedFormat(s)&&y&&f&&console.warn("Compressed texture uses REPEAT or MIRRORED_REPEAT texture wrap mode and dimensions are not powers of two. The texture may be rendered incorrectly."),S=Et.create({id:n,context:r,source:{arrayBufferView:i.bufferView,mipLevels:o},width:i.width,height:i.height,pixelFormat:i.internalFormat,sampler:c})):(_&&(i=Sy(i)),S=Et.create({id:n,context:r,source:i,sampler:c,flipY:!1,skipColorSpaceConversion:!0})),b&&S.generateMipmap(),S}var UBe=new qj;async function DBe(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=ut.LOADED,e)}catch(n){if(e.isDestroyed())return;throw e.unload(),e._state=ut.FAILED,e.getError("Failed to load texture",n)}}var qZ=Qj;var yCn=x(T(),1);var $j=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,h=t.cacheKey,p=t.spz,b=t.asynchronous??!0,f=t.loadBuffer??!1,y=t.loadTypedArray??!1;this._resourceCache=n,this._gltfResource=o,this._baseResource=r,this._gltf=i,this._bufferViewId=s,this._primitive=a,this._draco=c,this._spz=p,this._attributeSemantic=d,this._accessorId=u,this._cacheKey=h,this._asynchronous=b,this._loadBuffer=f,this._loadTypedArray=y,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._quantization=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=ut.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=zBe(this),this._promise):OBe(this._draco,this._attributeSemantic)?(this._promise=jBe(this),this._promise):(this._promise=qBe(this),this._promise)}process(t){if(this._state===ut.READY)return!0;if(this._state!==ut.LOADED&&this._state!==ut.PROCESSING)return!1;if(l(this._dracoLoader)){try{if(!this._dracoLoader.process(t))return!1}catch(o){k5(this,o)}QBe(this)}if(l(this._spzLoader)){try{if(!this._spzLoader.process(t))return!1}catch(o){k5(this,o)}JBe(this)}let n,i=this._typedArray;if(this._loadBuffer&&this._asynchronous){let o=$Be;if(o.set(i,t.context),!t.jobScheduler.execute(o,Cc.BUFFER))return!1;n=o.buffer}else this._loadBuffer&&(n=Zue(i,t.context));return this.unload(),this._buffer=n,this._typedArray=this._loadTypedArray?i:void 0,this._state=ut.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 OBe(e,t){return l(e)&&l(e.attributes)&&l(e.attributes[t])}function BBe(e,t,n,i){let r=(1<<e.quantizationBits)-1,s=1/r,a=new yn.Quantization;if(a.componentDatatype=t,a.octEncoded=e.octEncoded,a.octEncodedZXY=!0,a.type=i,a.octEncoded)a.type=Nt.VEC2,a.normalizationRange=r;else{let c=Nt.getMathType(i);if(c===Number){let d=e.range;a.quantizedVolumeOffset=e.minValues[0],a.quantizedVolumeDimensions=d,a.normalizationRange=r,a.quantizedVolumeStepSize=d*s}else{a.quantizedVolumeOffset=c.unpack(e.minValues),a.normalizationRange=c.unpack(new Array(n).fill(r));let d=new Array(n).fill(e.range);a.quantizedVolumeDimensions=c.unpack(d);let u=d.map(function(h){return h*s});a.quantizedVolumeStepSize=c.unpack(u)}}return a}async function zBe(e){e._state=ut.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=ut.LOADED,e)}catch{if(e.isDestroyed())return}}function HBe(e){return`${e.startsWith("KHR_gaussian_splatting:")?"KHR_gaussian_splatting:":"_"}SH_DEGREE_`}function KBe(e){let t=HBe(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 JBe(e){e._state=ut.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}=KBe(e._attributeSemantic),r=n.shDegree,s=0,a=[0,9,24];switch(r){case 1:s=9;break;case 2:s=24;break;case 3:s=45;break}let c=n.numPoints,d=n.sh;e._typedArray=new Float32Array(c*3);for(let u=0;u<c;u++){let h=u*s+a[i-1]+o*3;e._typedArray[u*3]=d[h],e._typedArray[u*3+1]=d[h+1],e._typedArray[u*3+2]=d[h+2]}}}async function jBe(e){e._state=ut.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=ut.LOADED,e)}catch{if(e.isDestroyed())return;k5(e)}}function QBe(e){e._state=ut.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=BBe(d,o.data.componentDatatype,o.data.componentsPerAttribute,a)),e._typedArray=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)}async function qBe(e){e._state=ut.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=ut.PROCESSING,e)}catch(n){if(e.isDestroyed())return;k5(e,n)}}function k5(e,t){throw e.unload(),e._state=ut.FAILED,e.getError("Failed to load vertex buffer",t)}var e4=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=Zue(this.typedArray,this.context)}};function Zue(e,t){let n=qe.createVertexBuffer({typedArray:e,context:t,usage:Fe.STATIC_DRAW});return n.vertexArrayDestroyable=!1,n}var $Be=new e4,$Z=$j;var LCn=x(T(),1);var TCn=x(T(),1),Cue={};async function e3e(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:ue}=await Promise.resolve().then(()=>r3e);var d=ue(Cue.url)}var u="./this.program",h=Cue.url;if(c)d("node:fs"),h.startsWith("file:")&&d("node:path").dirname(d("node:url").fileURLToPath(h)),1<process.argv.length&&(u=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2);else if(s||a)try{new URL(".",h)}catch{}var p=console.log.bind(console),b=console.error.bind(console),f=!1;function y(ue){for(var oe=0,Se=ue.length,Re=new Uint8Array(Se),He;oe<Se;++oe)He=ue.charCodeAt(oe),Re[oe]=~He>>8&He;return Re}var _,S,A,Z,V,E,L,v,I,X,N,g,C=!1;function R(){var ue=sU.buffer;A=new Int8Array(ue),V=new Int16Array(ue),r.HEAPU8=Z=new Uint8Array(ue),E=new Uint16Array(ue),L=new Int32Array(ue),v=new Uint32Array(ue),r.HEAPF32=I=new Float32Array(ue),X=new Float64Array(ue),N=new BigInt64Array(ue),g=new BigUint64Array(ue)}function G(ue){var oe;throw(oe=r.onAbort)==null||oe.call(r,ue),ue="Aborted("+ue+")",b(ue),f=!0,ue=new WebAssembly.RuntimeError(ue+". Build with -sASSERTIONS for more info."),S?.(ue),ue}var P;async function Y(ue){return ue}async function O(ue){var oe=P;try{var Se=await Y(oe);return await WebAssembly.instantiate(Se,ue)}catch(Re){b(`failed to asynchronously prepare wasm: ${Re}`),G(Re)}}async function k(ue){return O(ue)}var D=ue=>{for(;0<ue.length;)ue.shift()(r)},w=[],z=[],J=()=>{var ue=r.preRun.shift();z.push(ue)},ee={},H=ue=>{for(;ue.length;){var oe=ue.pop();ue.pop()(oe)}};function te(ue){return this.O(v[ue>>2])}var $={},be={},ye={},ce=class extends Error{constructor(ue){super(ue),this.name="InternalError"}},Ze=(ue,oe,Se)=>{function Re(At){if(At=Se(At),At.length!==ue.length)throw new ce("Mismatched type converter count");for(var _n=0;_n<ue.length;++_n)ke(ue[_n],At[_n])}ue.forEach(At=>ye[At]=oe);var He=Array(oe.length),_t=[],ct=0;for(let[At,_n]of oe.entries())be.hasOwnProperty(_n)?He[At]=be[_n]:(_t.push(_n),$.hasOwnProperty(_n)||($[_n]=[]),$[_n].push(()=>{He[At]=be[_n],++ct,ct===_t.length&&Re(He)}));_t.length===0&&Re(He)},xe=ue=>{for(var oe="";;){var Se=Z[ue++];if(!Se)return oe;oe+=String.fromCharCode(Se)}},Ge=class extends Error{constructor(ue){super(ue),this.name="BindingError"}},Ve=ue=>{throw new Ge(ue)};function Ye(ue,oe,Se={}){var Re=oe.name;if(!ue)throw new Ge(`type "${Re}" must have a positive integer typeid pointer`);if(be.hasOwnProperty(ue)){if(Se.Aa)return;throw new Ge(`Cannot register type '${Re}' twice`)}be[ue]=oe,delete ye[ue],$.hasOwnProperty(ue)&&(oe=$[ue],delete $[ue],oe.forEach(He=>He()))}function ke(ue,oe,Se={}){return Ye(ue,oe,Se)}var it=(ue,oe,Se)=>{switch(oe){case 1:return Se?Re=>A[Re]:Re=>Z[Re];case 2:return Se?Re=>V[Re>>1]:Re=>E[Re>>1];case 4:return Se?Re=>L[Re>>2]:Re=>v[Re>>2];case 8:return Se?Re=>N[Re>>3]:Re=>g[Re>>3];default:throw new TypeError(`invalid integer width (${oe}): ${ue}`)}},pt=ue=>{throw new Ge(ue.M.R.N.name+" instance already deleted")},Vt=!1,Ue=()=>{},St=ue=>globalThis.FinalizationRegistry?(Vt=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))}),St=oe=>{var Se=oe.M;return Se.V&&Vt.register(oe,{M:Se},oe),oe},Ue=oe=>{Vt.unregister(oe)},St(ue)):(St=oe=>oe,ue);function ht(){}var ot=(ue,oe)=>Object.defineProperty(oe,"name",{value:ue}),Jt={},jt=(ue,oe,Se)=>{if(ue[oe].U===void 0){var Re=ue[oe];ue[oe]=function(...He){if(!ue[oe].U.hasOwnProperty(He.length))throw new Ge(`Function '${Se}' called with an invalid number of arguments (${He.length}) - expects one of (${ue[oe].U})!`);return ue[oe].U[He.length].apply(this,He)},ue[oe].U=[],ue[oe].U[Re.$]=Re}},yt=(ue,oe,Se)=>{if(r.hasOwnProperty(ue)){if(Se===void 0||r[ue].U!==void 0&&r[ue].U[Se]!==void 0)throw new Ge(`Cannot register public name '${ue}' twice`);if(jt(r,ue,ue),r[ue].U.hasOwnProperty(Se))throw new Ge(`Cannot register multiple overloads of a function with the same number of arguments (${Se})!`);r[ue].U[Se]=oe}else r[ue]=oe,r[ue].$=Se},Gt=ue=>{ue=ue.replace(/[^a-zA-Z0-9_]/g,"$");var oe=ue.charCodeAt(0);return 48<=oe&&57>=oe?`_${ue}`:ue};function ln(ue,oe,Se,Re,He,_t,ct,At){this.name=ue,this.constructor=oe,this.ba=Se,this.Z=Re,this.W=He,this.va=_t,this.fa=ct,this.ta=At,this.Ca=[]}var st=(ue,oe,Se)=>{for(;oe!==Se;){if(!oe.fa)throw new Ge(`Expected null or instance of ${Se.name}, got an instance of ${oe.name}`);ue=oe.fa(ue),oe=oe.W}return ue},Nn=ue=>{if(ue===null)return"null";var oe=typeof ue;return oe==="object"||oe==="array"||oe==="function"?ue.toString():""+ue};function Zi(ue,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 "${Nn(oe)}" as a ${this.name}`);if(!oe.M.P)throw new Ge(`Cannot pass deleted object as a pointer of type ${this.name}`);return st(oe.M.P,oe.M.R.N,this.N)}function Ci(ue,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 ue!==null&&ue.push(this.Z,Se),Se}return 0}if(!oe||!oe.M)throw new Ge(`Cannot pass "${Nn(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=st(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 Re=oe.clone();Se=this.Da(Se,Go(()=>Re.delete())),ue!==null&&ue.push(this.Z,Se)}break;default:throw new Ge("Unsupported sharing policy")}}return Se}function Dt(ue,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 "${Nn(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 st(oe.M.P,oe.M.R.N,this.N)}var Ro=(ue,oe,Se)=>oe===Se?ue:Se.W===void 0?null:(ue=Ro(ue,oe,Se.W),ue===null?null:Se.ta(ue)),ki={},ri=(ue,oe)=>{if(oe===void 0)throw new Ge("ptr should not be undefined");for(;ue.W;)oe=ue.fa(oe),ue=ue.W;return ki[oe]},kn=(ue,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},St(Object.create(ue,{M:{value:oe,writable:!0}}))};function Yn(ue,oe,Se,Re,He,_t,ct,At,_n,ei,pn){this.name=ue,this.N=oe,this.ia=Se,this.ga=Re,this.ha=He,this.Ba=_t,this.Ha=ct,this.pa=At,this.ka=_n,this.Da=ei,this.Z=pn,He||oe.W!==void 0?this.S=Ci:(this.S=Re?Zi:Dt,this.T=null)}var Ui=(ue,oe,Se)=>{if(!r.hasOwnProperty(ue))throw new ce("Replacing nonexistent public symbol");r[ue].U!==void 0&&Se!==void 0?r[ue].U[Se]=oe:(r[ue]=oe,r[ue].$=Se)},Vi=(ue,oe)=>{ue=xe(ue);var Se=Jie.get(oe);if(typeof Se!="function")throw new Ge(`unknown function pointer with signature ${ue}: ${oe}`);return Se};class ir extends Error{}var wr=ue=>{ue=Z1(ue);var oe=xe(ue);return Ug(ue),oe},Ss=(ue,oe)=>{function Se(_t){He[_t]||be[_t]||(ye[_t]?ye[_t].forEach(Se):(Re.push(_t),He[_t]=!0))}var Re=[],He={};throw oe.forEach(Se),new ir(`${ue}: `+Re.map(wr).join([", "]))},Vr=(ue,oe)=>{for(var Se=[],Re=0;Re<ue;Re++)Se.push(v[oe+4*Re>>2]);return Se};function wn(ue){for(var oe=1;oe<ue.length;++oe)if(ue[oe]!==null&&ue[oe].T===void 0)return!0;return!1}function uo(ue,oe,Se,Re,He,_t){var ct=oe.length;if(2>ct)throw new Ge("argTypes array size mismatch! Must at least get return value and 'this' types!");var At=oe[1]!==null&&Se!==null,_n=wn(oe);Se=!oe[0].oa;var ei=oe[0],pn=oe[1];for(Re=[ue,Ve,Re,He,H,ei.O.bind(ei),pn?.S.bind(pn)],He=2;He<ct;++He)ei=oe[He],Re.push(ei.S.bind(ei));if(!_n)for(He=At?1:2;He<oe.length;++He)oe[He].T!==null&&Re.push(oe[He].T);for(_n=wn(oe),He=oe.length-2,pn=[],ei=["fn"],At&&ei.push("thisWired"),ct=0;ct<He;++ct)pn.push(`arg${ct}`),ei.push(`arg${ct}Wired`);pn=pn.join(","),ei=ei.join(","),pn=`return function (${pn}) {
`,_n&&(pn+=`var destructors = [];
`);var Mr=_n?"destructors":"null",kr="humanName throwBindingError invoker fn runDestructors fromRetWire toClassParamWire".split(" ");for(At&&(pn+=`var thisWired = toClassParamWire(${Mr}, this);
`),ct=0;ct<He;++ct){var Ca=`toArg${ct}Wire`;pn+=`var arg${ct}Wired = ${Ca}(${Mr}, arg${ct});
`,kr.push(Ca)}if(pn+=(Se||_t?"var rv = ":"")+`invoker(${ei});
`,_n)pn+=`runDestructors(destructors);
`;else for(ct=At?1:2;ct<oe.length;++ct)_t=ct===1?"thisWired":"arg"+(ct-2)+"Wired",oe[ct].T!==null&&(pn+=`${_t}_dtor(${_t});
`,kr.push(`${_t}_dtor`));return Se&&(pn+=`var ret = fromRetWire(rv);
return ret;
`),oe=new Function(kr,pn+`}
`)(...Re),ot(ue,oe)}var An=ue=>{ue=ue.trim();let oe=ue.indexOf("(");return oe===-1?ue:ue.slice(0,oe)},Uo=[],Eo=[0,1,,1,null,1,!0,1,!1,1],na=ue=>{9<ue&&--Eo[ue+1]===0&&(Eo[ue]=void 0,Uo.push(ue))},Wi=ue=>{if(!ue)throw new Ge(`Cannot use deleted val. handle = ${ue}`);return Eo[ue]},Go=ue=>{switch(ue){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let oe=Uo.pop()||Eo.length;return Eo[oe]=ue,Eo[oe+1]=1,oe}},gc={name:"emscripten::val",O:ue=>{var oe=Wi(ue);return na(ue),oe},S:(ue,oe)=>Go(oe),X:te,T:null},ws=(ue,oe,Se)=>{switch(oe){case 1:return Se?function(Re){return this.O(A[Re])}:function(Re){return this.O(Z[Re])};case 2:return Se?function(Re){return this.O(V[Re>>1])}:function(Re){return this.O(E[Re>>1])};case 4:return Se?function(Re){return this.O(L[Re>>2])}:function(Re){return this.O(v[Re>>2])};default:throw new TypeError(`invalid integer width (${oe}): ${ue}`)}},As=(ue,oe)=>{var Se=be[ue];if(Se===void 0)throw ue=`${oe} has unknown type ${wr(ue)}`,new Ge(ue);return Se},es=(ue,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}): ${ue}`)}},C0=(ue,oe,Se)=>{let Re=(He,_t)=>{let ct=0;return{next(){if(ct>=He)return{done:!0};let At=ct;return ct++,{value:_t(At),done:!1}},[Symbol.iterator](){return this}}};ue[Symbol.iterator]||(ue[Symbol.iterator]=function(){let He=this[oe]();return Re(He,_t=>this[Se](_t))})},Za=Object.assign({optional:!0},gc),Zs=(ue,oe,Se)=>{var Re=Z;if(!(0<Se))return 0;var He=oe;Se=oe+Se-1;for(var _t=0;_t<ue.length;++_t){var ct=ue.codePointAt(_t);if(127>=ct){if(oe>=Se)break;Re[oe++]=ct}else if(2047>=ct){if(oe+1>=Se)break;Re[oe++]=192|ct>>6,Re[oe++]=128|ct&63}else if(65535>=ct){if(oe+2>=Se)break;Re[oe++]=224|ct>>12,Re[oe++]=128|ct>>6&63,Re[oe++]=128|ct&63}else{if(oe+3>=Se)break;Re[oe++]=240|ct>>18,Re[oe++]=128|ct>>12&63,Re[oe++]=128|ct>>6&63,Re[oe++]=128|ct&63,_t++}}return Re[oe]=0,oe-He},nm=ue=>{for(var oe=0,Se=0;Se<ue.length;++Se){var Re=ue.charCodeAt(Se);127>=Re?oe++:2047>=Re?oe+=2:55296<=Re&&57343>=Re?(oe+=4,++Se):oe+=3}return oe},Lo=new TextDecoder,Ic=(ue,oe,Se,Re)=>{if(Se=oe+Se,Re)return Se;for(;ue[oe]&&!(oe>=Se);)++oe;return oe},ud=new TextDecoder("utf-16le"),$d=(ue,oe,Se)=>(ue>>=1,ud.decode(E.subarray(ue,Ic(E,ue,oe/2,Se)))),Xo=(ue,oe,Se)=>{if(Se??(Se=2147483647),2>Se)return 0;Se-=2;var Re=oe;Se=Se<2*ue.length?Se/2:ue.length;for(var He=0;He<Se;++He)V[oe>>1]=ue.charCodeAt(He),oe+=2;return V[oe>>1]=0,oe-Re},md=ue=>2*ue.length,kg=(ue,oe,Se)=>{var Re="";ue>>=2;for(var He=0;!(He>=oe/4);He++){var _t=v[ue+He];if(!_t&&!Se)break;Re+=String.fromCodePoint(_t)}return Re},vn=(ue,oe,Se)=>{if(Se??(Se=2147483647),4>Se)return 0;var Re=oe;Se=Re+Se-4;for(var He=0;He<ue.length;++He){var _t=ue.codePointAt(He);if(65535<_t&&He++,L[oe>>2]=_t,oe+=4,oe+4>Se)break}return L[oe>>2]=0,oe-Re},Ee=ue=>{for(var oe=0,Se=0;Se<ue.length;++Se)65535<ue.codePointAt(Se)&&Se++,oe+=4;return oe},at=[],fn=ue=>{var oe=at.length;return at.push(ue),oe},Jo=(ue,oe)=>{for(var Se=Array(ue),Re=0;Re<ue;++Re)Se[Re]=As(v[oe+4*Re>>2],`parameter ${Re}`);return Se},za=(ue,oe,Se)=>{var Re=[];return ue=ue(Re,Se),Re.length&&(v[oe>>2]=Go(Re)),ue},Cs={},Pc=ue=>{var oe=Cs[ue];return oe===void 0?xe(ue):oe},Xc={},hd=()=>{var ue;if(!iT){var oe={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(((ue=globalThis.navigator)==null?void 0:ue.language)??"C").replace("-","_")+".UTF-8",_:u||"./this.program"},Se;for(Se in Xc)Xc[Se]===void 0?delete oe[Se]:oe[Se]=Xc[Se];var Re=[];for(Se in oe)Re.push(`${Se}=${oe[Se]}`);iT=Re}return iT},iT,ia=[null,[],[]];if((()=>{let ue=ht.prototype;Object.assign(ue,{isAliasOf:function(Se){if(!(this instanceof ht&&Se instanceof ht))return!1;var Re=this.M.R.N,He=this.M.P;Se.M=Se.M;var _t=Se.M.R.N;for(Se=Se.M.P;Re.W;)He=Re.fa(He),Re=Re.W;for(;_t.W;)Se=_t.fa(Se),_t=_t.W;return Re===_t&&He===Se},clone:function(){if(this.M.P||pt(this),this.M.ea)return this.M.count.value+=1,this;var Se=St,Re=Object,He=Re.create,_t=Object.getPrototypeOf(this),ct=this.M;return Se=Se(He.call(Re,_t,{M:{value:{count:ct.count,da:ct.da,ea:ct.ea,P:ct.P,R:ct.R,V:ct.V,Y:ct.Y}}})),Se.M.count.value+=1,Se.M.da=!1,Se},delete(){if(this.M.P||pt(this),this.M.da&&!this.M.ea)throw new Ge("Object already scheduled for deletion");Ue(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||pt(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&&(ue[oe]=ue.delete)})(),Object.assign(Yn.prototype,{wa(ue){return this.pa&&(ue=this.pa(ue)),ue},ma(ue){var oe;(oe=this.Z)==null||oe.call(this,ue)},X:te,O:function(ue){function oe(){return this.ha?kn(this.N.ba,{R:this.Ba,P:Se,Y:this,V:ue}):kn(this.N.ba,{R:this,P:ue})}var Se=this.wa(ue);if(!Se)return this.ma(ue),null;var Re=ri(this.N,Se);if(Re!==void 0)return Re.M.count.value===0?(Re.M.P=Se,Re.M.V=ue,Re.clone()):(Re=Re.clone(),this.ma(ue),Re);if(Re=this.N.va(Se),Re=Jt[Re],!Re)return oe.call(this);Re=this.ga?Re.sa:Re.pointerType;var He=Ro(Se,this.N,Re.N);return He===null?oe.call(this):this.ha?kn(Re.N.ba,{R:Re,P:He,Y:this,V:ue}):kn(Re.N.ba,{R:Re,P:He})}}),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 Z1,JA,Ug,sU,Jie,RWe={y:()=>G(""),r:ue=>{var oe=ee[ue];delete ee[ue];var Se=oe.ka,Re=oe.Z,He=oe.na,_t=He.map(ct=>ct.za).concat(He.map(ct=>ct.Fa));Ze([ue],_t,ct=>{var At={},_n,ei;for([_n,ei]of He.entries()){let pn=ct[_n],Mr=ei.xa,kr=ei.ya,Ca=ct[_n+He.length],gl=ei.Ea,im=ei.Ga;At[ei.ua]={read:V0=>pn.O(Mr(kr,V0)),write:(V0,C1)=>{var eu=[];gl(im,V0,Ca.S(eu,C1)),H(eu)},optional:pn.optional}}return[{name:oe.name,O:pn=>{var Mr={},kr;for(kr in At)Mr[kr]=At[kr].read(pn);return Re(pn),Mr},S:(pn,Mr)=>{for(var kr in At)if(!(kr in Mr||At[kr].optional))throw new TypeError(`Missing field: "${kr}"`);var Ca=Se();for(kr in At)At[kr].write(Ca,Mr[kr]);return pn!==null&&pn.push(Re,Ca),Ca},X:te,T:Re}]})},o:(ue,oe,Se,Re,He)=>{oe=xe(oe),Re=Re===0n;let _t=ct=>ct;if(Re){let ct=8*Se;_t=At=>BigInt.asUintN(ct,At),He=_t(He)}ke(ue,{name:oe,O:_t,S:(ct,At)=>(typeof At=="number"&&(At=BigInt(At)),At),X:it(oe,Se,!Re),T:null})},C:(ue,oe,Se,Re)=>{oe=xe(oe),ke(ue,{name:oe,O:function(He){return!!He},S:function(He,_t){return _t?Se:Re},X:function(He){return this.O(Z[He])},T:null})},k:(ue,oe,Se,Re,He,_t,ct,At,_n,ei,pn,Mr,kr)=>{pn=xe(pn),_t=Vi(He,_t),At&&(At=Vi(ct,At)),ei&&(ei=Vi(_n,ei)),kr=Vi(Mr,kr);var Ca=Gt(pn);yt(Ca,function(){Ss(`Cannot construct ${pn} due to unbound types`,[Re])}),Ze([ue,oe,Se],Re?[Re]:[],gl=>{if(gl=gl[0],Re)var im=gl.N,V0=im.ba;else V0=ht.prototype;gl=ot(pn,function(...mH){if(Object.getPrototypeOf(this)!==C1)throw new Ge(`Use 'new' to construct ${pn}`);if(eu.aa===void 0)throw new Ge(`${pn} has no accessible constructor`);var jie=eu.aa[mH.length];if(jie===void 0)throw new Ge(`Tried to invoke ctor of ${pn} with invalid number of parameters (${mH.length}) - expected (${Object.keys(eu.aa).toString()}) parameters instead!`);return jie.apply(this,mH)});var C1=Object.create(V0,{constructor:{value:gl}});gl.prototype=C1;var eu=new ln(pn,gl,C1,kr,im,_t,At,ei);if(eu.W){var V1;(V1=eu.W).la??(V1.la=[]),eu.W.la.push(eu)}return im=new Yn(pn,eu,!0,!1,!1),V1=new Yn(pn+"*",eu,!1,!1,!1),V0=new Yn(pn+" const*",eu,!1,!0,!1),Jt[ue]={pointerType:V1,sa:V0},Ui(Ca,gl),[im,V1,V0]})},g:(ue,oe,Se,Re,He,_t)=>{var ct=Vr(oe,Se);He=Vi(Re,He),Ze([],[ue],At=>{At=At[0];var _n=`constructor ${At.name}`;if(At.N.aa===void 0&&(At.N.aa=[]),At.N.aa[oe-1]!==void 0)throw new Ge(`Cannot register multiple constructors with identical number of parameters (${oe-1}) for class '${At.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return At.N.aa[oe-1]=()=>{Ss(`Cannot construct ${At.name} due to unbound types`,ct)},Ze([],ct,ei=>(ei.splice(1,0,null),At.N.aa[oe-1]=uo(_n,ei,null,He,_t),[])),[]})},b:(ue,oe,Se,Re,He,_t,ct,At,_n)=>{var ei=Vr(Se,Re);oe=xe(oe),oe=An(oe),_t=Vi(He,_t),Ze([],[ue],pn=>{function Mr(){Ss(`Cannot call ${kr} due to unbound types`,ei)}pn=pn[0];var kr=`${pn.name}.${oe}`;oe.startsWith("@@")&&(oe=Symbol[oe.substring(2)]),At&&pn.N.Ca.push(oe);var Ca=pn.N.ba,gl=Ca[oe];return gl===void 0||gl.U===void 0&&gl.className!==pn.name&&gl.$===Se-2?(Mr.$=Se-2,Mr.className=pn.name,Ca[oe]=Mr):(jt(Ca,oe,kr),Ca[oe].U[Se-2]=Mr),Ze([],ei,im=>(im=uo(kr,im,pn,_t,ct,_n),Ca[oe].U===void 0?(im.$=Se-2,Ca[oe]=im):Ca[oe].U[Se-2]=im,[])),[]})},A:ue=>ke(ue,gc),s:(ue,oe,Se,Re,He)=>{switch(oe=xe(oe),He=He===0?"object":He===1?"number":"string",He){case"object":let ct=function(){};ct.values={},ke(ue,{name:oe,constructor:ct,valueType:He,O:function(At){return this.constructor.values[At]},S:(At,_n)=>_n.value,X:ws(oe,Se,Re),T:null}),yt(oe,ct);break;case"number":var _t={};ke(ue,{name:oe,ja:_t,valueType:He,O:At=>At,S:(At,_n)=>_n,X:ws(oe,Se,Re),T:null}),yt(oe,_t),delete r[oe].$;break;case"string":_t={},ke(ue,{name:oe,ra:{},qa:{},ja:_t,valueType:He,O:function(At){return this.qa[At]},S:function(At,_n){return this.ra[_n]},X:ws(oe,Se,Re),T:null}),yt(oe,_t),delete r[oe].$}},d:(ue,oe,Se)=>{var Re=As(ue,"enum");switch(oe=xe(oe),Re.valueType){case"object":ue=Re.constructor,Re=Object.create(Re.constructor.prototype,{value:{value:Se},constructor:{value:ot(`${Re.name}_${oe}`,function(){})}}),ue.values[Se]=Re,ue[oe]=Re;break;case"number":Re.ja[oe]=Se;break;case"string":Re.ra[oe]=Se,Re.qa[Se]=oe,Re.ja[oe]=oe}},n:(ue,oe,Se)=>{oe=xe(oe),ke(ue,{name:oe,O:Re=>Re,S:(Re,He)=>He,X:es(oe,Se),T:null})},m:(ue,oe,Se,Re,He,_t,ct)=>{var At=Vr(oe,Se);ue=xe(ue),ue=An(ue),He=Vi(Re,He),yt(ue,function(){Ss(`Cannot call ${ue} due to unbound types`,At)},oe-1),Ze([],At,_n=>(_n=[_n[0],null].concat(_n.slice(1)),Ui(ue,uo(ue,_n,null,He,_t,ct),oe-1),[]))},c:(ue,oe,Se,Re,He)=>{oe=xe(oe);let _t=At=>At;if(Re===0){var ct=32-8*Se;_t=At=>At<<ct>>>ct,He=_t(He)}ke(ue,{name:oe,O:_t,S:(At,_n)=>_n,X:it(oe,Se,Re!==0),T:null})},j:(ue,oe,Se,Re)=>{Se=xe(Se),Re=xe(Re),Ze([],[ue,oe],He=>(C0(He[0].N.ba,Se,Re),[]))},a:(ue,oe,Se)=>{function Re(_t){return new He(A.buffer,v[_t+4>>2],v[_t>>2])}var He=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][oe];Se=xe(Se),ke(ue,{name:Se,O:Re,X:Re},{Aa:!0})},h:ue=>{ke(ue,Za)},B:(ue,oe)=>{oe=xe(oe),ke(ue,{name:oe,O(Se){var Re=(Re=Se+4)?Lo.decode(Z.subarray(Re,Ic(Z,Re,v[Se>>2],!0))):"";return Ug(Se),Re},S(Se,Re){Re instanceof ArrayBuffer&&(Re=new Uint8Array(Re));var He=typeof Re=="string";if(!(He||ArrayBuffer.isView(Re)&&Re.BYTES_PER_ELEMENT==1))throw new Ge("Cannot pass non-string to std::string");var _t=He?nm(Re):Re.length,ct=JA(4+_t+1),At=ct+4;return v[ct>>2]=_t,He?Zs(Re,At,_t+1):Z.set(Re,At),Se!==null&&Se.push(Ug,ct),ct},X:te,T(Se){Ug(Se)}})},f:(ue,oe,Se)=>{if(Se=xe(Se),oe===2)var Re=$d,He=Xo,_t=md;else Re=kg,He=vn,_t=Ee;ke(ue,{name:Se,O:ct=>{var At=Re(ct+4,v[ct>>2]*oe,!0);return Ug(ct),At},S:(ct,At)=>{if(typeof At!="string")throw new Ge(`Cannot pass non-string to C++ string type ${Se}`);var _n=_t(At),ei=JA(4+_n+oe);return v[ei>>2]=_n/oe,He(At,ei+4,_n+oe),ct!==null&&ct.push(Ug,ei),ei},X:te,T(ct){Ug(ct)}})},i:(ue,oe,Se,Re,He,_t)=>{ee[ue]={name:xe(oe),ka:Vi(Se,Re),Z:Vi(He,_t),na:[]}},e:(ue,oe,Se,Re,He,_t,ct,At,_n,ei)=>{ee[ue].na.push({ua:xe(oe),za:Se,xa:Vi(Re,He),ya:_t,Fa:ct,Ea:Vi(At,_n),Ga:ei})},D:(ue,oe)=>{oe=xe(oe),ke(ue,{oa:!0,name:oe,O:()=>{},S:()=>{}})},q:(ue,oe,Se)=>{var[Re,...He]=Jo(ue,oe);oe=Re.S.bind(Re);var _t=He.map(_n=>_n.X.bind(_n));ue--;var ct={toValue:Wi};switch(ue=_t.map((_n,ei)=>{var pn=`argFromPtr${ei}`;return ct[pn]=_n,`${pn}(args${ei?"+"+8*ei:""})`}),Se){case 0:var At="toValue(handle)";break;case 2:At="new (toValue(handle))";break;case 3:At="";break;case 1:ct.getStringOrSymbol=Pc,At="toValue(handle)[getStringOrSymbol(methodName)]"}return At+=`(${ue})`,Re.oa||(ct.toReturnWire=oe,ct.emval_returnValue=za,At=`return emval_returnValue(toReturnWire, destructorsRef, ${At})`),At=`return function (handle, methodName, destructorsRef, args) {
${At}
}`,Se=new Function(Object.keys(ct),At)(...Object.values(ct)),At=`methodCaller<(${He.map(_n=>_n.name)}) => ${Re.name}>`,fn(ot(At,Se))},F:na,p:(ue,oe,Se,Re,He)=>at[ue](oe,Se,Re,He),E:ue=>{var oe=Wi(ue);H(oe),na(ue)},t:(ue,oe,Se,Re)=>{var He=new Date().getFullYear(),_t=new Date(He,0,1).getTimezoneOffset();He=new Date(He,6,1).getTimezoneOffset(),v[ue>>2]=60*Math.max(_t,He),L[oe>>2]=+(_t!=He),oe=ct=>{var At=Math.abs(ct);return`UTC${0<=ct?"-":"+"}${String(Math.floor(At/60)).padStart(2,"0")}${String(At%60).padStart(2,"0")}`},ue=oe(_t),oe=oe(He),He<_t?(Zs(ue,Se,17),Zs(oe,Re,17)):(Zs(ue,Re,17),Zs(oe,Se,17))},z:ue=>{var oe=Z.length;if(ue>>>=0,2147483648<ue)return!1;for(var Se=1;4>=Se;Se*=2){var Re=oe*(1+.2/Se);Re=Math.min(Re,ue+100663296);e:{Re=(Math.min(2147483648,65536*Math.ceil(Math.max(ue,Re)/65536))-sU.buffer.byteLength+65535)/65536|0;try{sU.grow(Re),R();var He=1;break e}catch{}He=void 0}if(He)return!0}return!1},u:(ue,oe)=>{var Se=0,Re=0,He;for(He of hd()){var _t=oe+Se;v[ue+Re>>2]=_t,Se+=Zs(He,_t,1/0)+1,Re+=4}return 0},v:(ue,oe)=>{var Se=hd();v[ue>>2]=Se.length,ue=0;for(var Re of Se)ue+=nm(Re)+1;return v[oe>>2]=ue,0},w:()=>52,x:function(){return 70},l:(ue,oe,Se,Re)=>{for(var He=0,_t=0;_t<Se;_t++){var ct=v[oe>>2],At=v[oe+4>>2];oe+=8;for(var _n=0;_n<At;_n++){var ei=ue,pn=Z[ct+_n],Mr=ia[ei];pn===0||pn===10?(ei=ei===1?p:b,pn=Ic(Mr,0),pn=Lo.decode(Mr.buffer?Mr.subarray(0,pn):new Uint8Array(Mr.slice(0,pn))),ei(pn),Mr.length=0):Mr.push(pn)}He+=At}return v[Re>>2]=He,0}},aU;return aU=await(async function(){function ue(Se){return Se=aU=Se.exports,Z1=Se.J,JA=r._malloc=Se.K,Ug=r._free=Se.L,sU=Se.G,Jie=Se.I,R(),aU}var oe={a:RWe};return r.instantiateWasm?new Promise(Se=>{r.instantiateWasm(oe,(Re,He)=>{Se(ue(Re))})}):(P??(P=y(`\0asm\0\0\0\xD79\`\x7F\x7F\`\x7F\x7F\0\`\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\`\x7F\0\`\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\0\`\x7F\x7F\x7F\x7F\0\`\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F\x7F\x7F\0\`\x7F\x7F\x7F\x7F\x7F\x7F\0\`\b\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\0\0\`\x07\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F~~~~\0\`\0\x7F\`
\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\x07\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\x7F\x7F\x7F\x7F~\x7F\`\b\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\x7F~~\x7F\0\`\x7F~\x7F~\`\x7F\x7F~\x7F\x7F\0\`
\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\f\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\`\x7F\x7F\x7F~\`\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\0\`\v\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F\x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6\0 \v\xCB
\x7F ~#\0A\xE0\0k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!
 \x85B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83!\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83"\fB \x88! B0\x88\xA7A\xFF\xFFq!\x07@@ B0\x88\xA7A\xFF\xFFq" A\xFF\xFFkA\x82\x80~O@ \x07A\xFF\xFFkA\x81\x80~K\r\v P B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"\rB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T \rB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\v\f\v P B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\v !\f\v  \rB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@  \x84P@B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0!\vB\0!\f\v \vB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\vB\0!\f\v  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@  \r\x84B\0!P@B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0!\v\f\v \vB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\v\f\v  \r\x84P@B\0!\f\v  \x84P@B\0!\f\v \rB\xFF\xFF\xFF\xFF\xFF\xFF?X@ A\xD0\0j  \f  \f \fP"\x1ByB\xC0\0B\0 \x1B|\xA7"Ak6A k! )X"\fB \x88! )P!\v B\xFF\xFF\xFF\xFF\xFF\xFF?V\r\0 A@k 

P"\b\x1ByB\xC0\0B\0 \b\x1B|\xA7"\bAk6  \bkAj! )H!
)@!\v \x07 j jA\xFF\xFF\0k!@
B\x86"B \x88B\x80\x80\x80\x80\b\x84" B \x88"~" B\x86"B \x88"
B\x80\x80\x84"\r~|" T\xAD  B1\x88 \x84B\xFF\xFF\xFF\xFF\x83" \fB\xFF\xFF\xFF\xFF\x83"\f~|" T\xAD|  \r~|   B\x80\x80\xFE\xFF\x83" \f~" 
~|" T\xAD    B\xFF\xFF\xFF\xFF\x83"~|"V\xAD||"V\xAD|  \r~"  \f~|" T\xADB \x86 B \x88\x84|   B \x86|"V\xAD|  \r ~"\r
\f~|"\f  ~|"  ~|"B \x88  V\xAD \f \rT\xAD  \fT\xAD||B \x86\x84|" T\xAD|    ~"\f 
~|"B \x88  \fT\xADB \x86\x84|"
T\xAD
B \x86|"
T\xAD||"
T\xAD|
 B \x86"  ~|" T\xAD|" T\xAD|"
T\xAD|"B\x80\x80\x80\x80\x80\x80\xC0\0\x83PE@ Aj!\f\v B?\x88 B\x86 B?\x88\x84! B\x86 B?\x88\x84! B\x86! B\x86\x84!\v A\xFF\xFFN@ \vB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\vB\0!\f\v~ A\0L@A k"\x07A\xFF\0M@ A0j   A\xFF\0j"6 A j   6 Aj   \x07g    \x07g )0 )8\x84B\0R\xAD ) )\x84\x84! )( )\x84! )\0! )\b\f\vB\0!\f\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 \xADB0\x86\x84\v \v\x84!\v P B\0Y B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FQ\x1BE@ \v B|"P\xAD|!\v\f\v  B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x85\x84PE@ !\f\v \v  B\x83|" T\xAD|!\v\v \0 7\0 \0 \v7\b A\xE0\0j$\0\v\0 \0!\vr\x7F#\0Ak"$\0  \x006 \0(\0A\x7FG@  Aj6\f  A\fj6\b A\bj!@ \0(\0AF\r\0\v \0(\0E@ \0A6\0 \xF2 \0A\x7F6\0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8(\0 F@A\x94\xD8 6\0A\x88\xD8A\x88\xD8(\0 \x07j"\x006\0  \0Ar6\f\vA\x90\xD8(\0 F@A\x90\xD8 6\0A\x84\xD8A\x84\xD8(\0 \x07j"\x006\0  \0Ar6 \0 j \x006\0\f\v ("\0AqAF@ \0Axq! (\f!@ \0A\xFFM@ (\b" F@A\xFC\xD7A\xFC\xD7(\0A~ \0Avwq6\0\f\v  6\f  6\b\f\v (!@  G@ (\b"\0 6\f  \x006\b\f\v@ ("\0\x7F Aj ("\0E\r Aj\v!@ ! \0"Aj! \0("\0\r\0 Aj! ("\0\r\0\v A\x006\0\f\vA\0!\v E\r\0@ ("\0At"(\xAC\xDA F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ \0wq6\0\f\v@  (F@  6\f\v  6\v E\r\v  6 ("\0@  \x006 \0 6\v ("\0E\r\0  \x006 \0 6\v \x07 j!\x07  j"(!\0\v  \0A~q6  \x07Ar6  \x07j \x076\0 \x07A\xFFM@ \x07A\xF8qA\xA4\xD8j!\0\x7FA\xFC\xD7(\0"A \x07Avt"qE@A\xFC\xD7  r6\0 \0\f\v \0(\b\v! \0 6\b  6\f  \x006\f  6\b\f\vA! \x07A\xFF\xFF\xFF\x07M@ \x07A& \x07A\bvg"\0kvAq \0AtrA>s!\v  6 B\x007 AtA\xAC\xDAj!\0@@A\x80\xD8(\0"A t"qE@A\x80\xD8  r6\0 \0 6\0\f\v \x07A AvkA\0 AG\x1Bt! \0(\0!@ "\0(Axq \x07F\r Av! At! \0 Aqj"("\r\0\v  6\v  \x006  6\f  6\b\f\v \0(\b" 6\f \0 6\b A\x006  \x006\f  6\b\v \bA\bj!\0\f\v@ \bE\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj \x006\0 \0\rA\x80\xD8 \x07A~ wq"\x076\0\f\v@  \b(F@ \b \x006\f\v \b \x006\v \0E\r\v \0 \b6 ("@ \0 6  \x006\v ("E\r\0 \0 6  \x006\v@ AM@   j"\0Ar6 \0 j"\0 \0(Ar6\f\v  Ar6  j" Ar6  j 6\0 A\xFFM@ A\xF8qA\xA4\xD8j!\0\x7FA\xFC\xD7(\0"A Avt"qE@A\xFC\xD7  r6\0 \0\f\v \0(\b\v! \0 6\b  6\f  \x006\f  6\b\f\vA!\0 A\xFF\xFF\xFF\x07M@ A& A\bvg"\0kvAq \0AtrA>s!\0\v  \x006 B\x007 \0AtA\xAC\xDAj!@@ \x07A \0t"qE@A\x80\xD8  \x07r6\0  6\0  6\f\v A \0AvkA\0 \0AG\x1Bt!\0 (\0!@ "(Axq F\r \0Av! \0At!\0  Aqj"\x07("\r\0\v \x07 6  6\v  6\f  6\b\f\v (\b"\0 6\f  6\b A\x006  6\f  \x006\b\v A\bj!\0\f\v@ E\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj \x006\0 \0\rA\x80\xD8 \vA~ wq6\0\f\v@  (F@ \x006\f\v \x006\v \0E\r\v \0 6 ("@ \0 6  \x006\v ("E\r\0 \0 6  \x006\v@ AM@   j"\0Ar6 \0 j"\0 \0(Ar6\f\v  Ar6  j" Ar6  j 6\0 \b@ \bAxqA\xA4\xD8j!\0A\x90\xD8(\0!\x7FA \bAvt"\x07 qE@A\xFC\xD7  \x07r6\0 \0\f\v \0(\b\v! \0 6\b  6\f  \x006\f  6\b\vA\x90\xD8 6\0A\x84\xD8 6\0\v A\bj!\0\v
Aj$\0 \0\v\0\x9C\0\v;\x7F#\0Ak"$\0  \x006\f (\f"\0(\0"@ \0 6 \0(\b !\v Aj$\0\vu~ \0  ~  ~| B \x88" B \x88"~| B\xFF\xFF\xFF\xFF\x83" B\xFF\xFF\xFF\xFF\x83"~"B \x88  ~|"B \x88|  ~ B\xFF\xFF\xFF\xFF\x83|"B \x88|7\b \0 B\xFF\xFF\xFF\xFF\x83 B \x86\x847\0\v\xC1\x7F \0-\0\0A qE@@ \0("\x7F  \0\xC9\r \0(\v \0("k I@ \0   \0($\0\f\v@@ E \0(PA\0Hr\r\0 !@  j"Ak-\0\0A
G@ Ak"\r\f\v\v \0   \0($\0 I\r  k! \0(!\f\v !\v   Y \0 \0( j6\v\v\v\x7FA9" \0(\x006\0 \v\xC0\x7F@  kAH\r\0 \0( \0,\0\v" A\0H\x1BE\r\0  \x8F \0(\0 \0 \0,\0\v"A\0H"\x1B" \0(  \x1Bj! Ak!\0@@@ -\0\0"Ak! \0 M\r\0 A\xFFqA\xFD\0M@ (\0 G\r\v Aj!   kAJj!\f\v\v A\xFFqA\xFD\0K\r \0(\0Ak I\r\v A6\0\v\vP~@ A\xC0\0q@  A@j\xAD\x86!B\0!\f\v E\r\0  \xAD"\x86 A\xC0\0 k\xAD\x88\x84!  \x86!\v \0 7\0 \0 7\b\vi\x7F#\0A\x80k"$\0 A\x80\xC0q  LrE@    k"A\x80 A\x80I"\x1B\xC6 E@@ \0 A\x803 A\x80k"A\xFFK\r\0\v\v \0  3\v A\x80j$\0\v\0A\0\v<\x7FA \0 \0AM\x1B!@@ /"\0\r\0A\xB4\xEC(\0"E\r\0 \r\0\f\v\v \0E@0\0\v \0\v \0 \0(\0C\v
\0 \0(\0A\xC0\v\xCD \x7F~#\0A\xF0\0k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83! @@ P" B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"
B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0}B\x80\x80\x80\x80\x80\x80\xC0\x80\x80\x7FT
P\x1BE@ B\0R B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0}"\vB\x80\x80\x80\x80\x80\x80\xC0\x80\x80\x7FV \vB\x80\x80\x80\x80\x80\x80\xC0\x80\x80\x7FQ\x1B\r\v 
B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T
B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84! !\f\v P B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\f\v 
B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0   \x85  \x85B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x85\x84P"\x1B!B\0  \x1B!\f\v  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P\r 
\x84P@  \x84B\0R\r  \x83!  \x83!\f\v  \x84PE\r\0 ! !\f\v    T
V
Q\x1B"\b\x1B!
  \b\x1B"\fB\xFF\xFF\xFF\xFF\xFF\xFF?\x83!   \b\x1B"\vB0\x88\xA7A\xFF\xFFq!\x07 \fB0\x88\xA7A\xFF\xFFq"E@ A\xE0\0j
P"\x1ByB\xC0\0B\0 \x1B|\xA7"Ak6 )h! )\`!
A k!\v   \b\x1B! \vB\xFF\xFF\xFF\xFF\xFF\xFF?\x83! \x07~  A\xD0\0j     P"\x07\x1ByB\xC0\0B\0 \x07\x1B|\xA7"\x07Ak6A \x07k!\x07 )P! )X\vB\x86 B=\x88\x84B\x80\x80\x80\x80\x80\x80\x80\x84! B\x86
B=\x88\x84  \x85!~ B\x86"  \x07F\r\0  \x07k"\x07A\xFF\0K@B\0!B\f\v A@k  A\x80 \x07k6 A0j   \x07g )8! )0 )@ )H\x84B\0R\xAD\x84\v! B\x80\x80\x80\x80\x80\x80\x80\x84!\v
B\x86!
@ B\0S@B\0!B\0!
\x85  \v\x85\x84P\r
}! \v }
V\xAD}"B\xFF\xFF\xFF\xFF\xFF\xFF\xFFV\r A j     P"\x07\x1ByB\xC0\0B\0 \x07\x1B\x84\xA7A\fk"\x076  \x07k! )(! ) !\f\v
|" T\xAD  \v||"B\x80\x80\x80\x80\x80\x80\x80\b\x83P\r\0 B\x83 B?\x86 B\x88\x84\x84! Aj! B\x88!\v \fB\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83! A\xFF\xFFN@ B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!B\0!\f\vA\0!\x07@ A\0J@ !\x07\f\v Aj   A\xFF\0j6   A kg )\0 ) )\x84B\0R\xAD\x84! )\b!\v B=\x86 B\x88\x84! B\x88B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 \x07\xADB0\x86\x84 \x84!@@ \xA7A\x07q"AG@    AK\xAD|"V\xAD|!\f\v    B\x83|"V\xAD|!\f\v E\r\v\v \0 7\0 \0 7\b A\xF0\0j$\0\v
\0 \0A\x9C\xE0^\v
\0 \0A\xA4\xE0^\v\x84\x7F~#\0Ak"$\0 \0~ E@B\0\f\v   Au"s k"\xADB\0 g"A\xD1\0j6 )\bB\x80\x80\x80\x80\x80\x80\xC0\0\x85A\x9E\x80 k\xADB0\x86|B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FB\0 A\0H\x1B\x84! )\0\v7\0 \0 7\b Aj$\0\v1\x7F \0(\f" \0(F@ \0 \0(\0((\0\0\v -\0\0 \0 Aj6\f\v'\x7F \0(\f" \0(F@ \0 \0(\0($\0\0\v -\0\0\v1\x7F \0(\f" \0(F@ \0 \0(\0((\0\0\v (\0 \0 Aj6\f\v'\x7F \0(\f" \0(F@ \0 \0(\0($\0\0\v (\0\v\xAA\f\b\x7F\x7FA\0 E\r\0 \0A\x7Fs! AO@@ AqE\r\0 -\0\0 sA\xFFqAt(\xE03 A\bvs! Ak"\0E Aj"AqErE@ -\0 sA\xFFqAt(\xE03 A\bvs! Ak"\0E Aj"AqErE@ -\0 sA\xFFqAt(\xE03 A\bvs! Ak"\0E Aj"AqErE@ -\0 sA\xFFqAt(\xE03 A\bvs! Aj! Ak!\f\v \0! !\f\v \0! !\f\v \0! !\v An"\bAll!
@ \bAk" E@A\0!\f\v !\0A\0!@ \0( \x07s"\x07AvA\xFC\x07q(\xE0S \x07AvA\xFC\x07q(\xE0K \x07AvA\xFC\x07q(\xE0C \x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s"\0A\bv -\0 \0sA\xFFqAt(\xE03s"\0A\bv -\0\x07 \0sA\xFFqAt(\xE03s! A\bj! A\bk"A\x07K\r\0\v\v@ E\r\0 -\0\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs! AF\r\0 -\0 sA\xFFqAt(\xE03 A\bvs!\v A\x7Fs\v\v\x97\x7F#\0A@j"$\0 \0 \0(\0"A\bk(\0"j!@ Ak(\0"( (F@A\0  \x1B!\0\f\v \0 N@ B\x007 A\x006  6\f  \x006\b  6 B\x007 B\x007$ B\x007, A\x006< B\x81\x80\x80\x80\x80\x80\x80\x8074  Aj  AA\0 (\0(\v\0 (\r\v B\x007 A\x006 A\x98\xC46\f  \x006\b  6 B\x007 B\x007$ B\x007, B\x007\x003 A\x006< A:\0;  Aj AA\0 (\0(
\0A\0!\0@@ ((\0\v (A\0 ($AF\x1BA\0 ( AF\x1BA\0 (,AF\x1B!\0\f\v (AG@ (,\r ( AG\r ($AG\r\v (!\0\v A@k$\0 \0\v\0 \0A\x006\b \0B\x007\0\vc\0 (A\xB0q"A F@ \v@ AG\r\0@@ \0-\0\0"A+k\0\0\v \0Aj\v A0G  \0kAHr\r\0 \0-\0A rA\xF8\0G\r\0 \0Aj!\0\v \0\v1\x7FA\xCC\xCF(\0! \0@A\xCC\xCFA\xD4\xCE \0 \0A\x7FF\x1B6\0\vA\x7F  A\xD4\xCEF\x1B\v\0 \0(\0"\0@ \0H\v\vA\x7F \0 7p \0 \0(, \0("k\xAC7x \0 P  \0(\b"\0 k\xACYr\x7F \0  \xA7j\v6h\vs\x7F \0A\x90\xFC\x006\0 \0(@ \0((!@ @A\0 \0 Ak"At" \0($j(\0 \0( j(\0\x07\0\f\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\x88B\xFF\x83"PE@ B\xFFR@ B\x88! B\x80\xF8\0|! B<\x86\f\v B\x88!B\xFF\xFF! B<\x86\f\v P@B\0!B\0\f\v  B\0 y\xA7"\x07A1j6 )\bB\x80\x80\x80\x80\x80\x80\xC0\0\x85!A\x8C\xF8\0 \x07k\xAD! )\0\v7\0 \0 B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83 B0\x86\x84 \x847\b Aj$\0\v\0 \0A\x80\x80\x80\x80O@A\xBFA\0\xDC\0\v \0At9\v\x85\x7F#\0Ak"\b$\0 \b 6\b \b 6\f \bAj" $ =! \b(# A\x006\0A\0!@@  \x07F r\r@ \bA\fj \bA\bj(\r\0@ (\0A\0 (\0(4\0A%F@ Aj \x07F\rA\0!\x7F@ (A\0 (\0(4\0"A\xC5\0F\r\0A!
A\xFFqA0F\r\0 \f\v A\bj \x07F\rA\b!
! (\bA\0 (\0(4\0\v! \b \0 \b(\f \b(\b      \0(\0($\f\x006\f 
jAj!\f\v A (\0 (\0(\f\0@@ \x07 Aj"G@ A (\0 (\0(\f\0\r\v\v@ \bA\fj \bA\bj(\r A \b(\fC (\0(\f\0E\r \b(\fB\f\0\v\0\v \b(\fC (\0(\0 (\0 (\0(\0F@ \b(\fB Aj!\f\v A6\0\v (\0!\f\v\v A6\0\v \bA\fj \bA\bj(@  (\0Ar6\0\v \b(\f \bAj$\0\v\xB1\x7F#\0Ak"\b$\0 \b 6\b \b 6\f \bAj" $ >! \b(# A\x006\0A\0!@@  \x07F r\r@ \bA\fj \bA\bj)\r\0@ ,\0\0A\0 (\0($\0A%F@ Aj \x07F\rA\0!\x7F@ ,\0A\0 (\0($\0"A\xC5\0F\r\0A!
A\xFFqA0F\r\0 \f\v Aj \x07F\rA!
! ,\0A\0 (\0($\0\v! \b \0 \b(\f \b(\b      \0(\0($\f\x006\f 
jAj!\f\v@ ,\0\0"A\0H\r\0 (\b" Atj-\0\0AqE\r\0@@ \x07 Aj"F@ \x07!\f\v ,\0\0"A\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\x90\xFC\v\0 A\x7F6L A\xE1\x006$ A\x7F6P  A\x9Fj6,  A\x94j6T \0A\0:\0\0   \xCB A\xA0j$\0\vJ\x7F@ \0-\0\0"E  -\0\0"Gr\r\0@ -\0! \0-\0"E\r Aj! \0Aj!\0  F\r\0\v\v  k\v\0\0\v\x8D\b\v\x7F \0E@ /\v A@O@A\xF8\xD7A06\0A\0\v\x7FA A\vjAxq A\vI\x1B! \0A\bk"(" Axq!\b@ AqE@ A\x80I\r Aj \bM@ ! \b kA\xDC\xDB(\0AtM\r\vA\0\f\v  \bj!\x07@  \bM@ \b k"AI\r   AqrAr6  j" Ar6 \x07 \x07(Ar6  \xC9\f\vA\x94\xD8(\0 \x07F@A\x88\xD8(\0 \bj"\b M\r   AqrAr6  j" \b k"Ar6A\x88\xD8 6\0A\x94\xD8 6\0\f\vA\x90\xD8(\0 \x07F@A\x84\xD8(\0 \bj" I\r@  k"AO@   AqrAr6  j"\b Ar6  j" 6\0  (A~q6\f\v  Aq rAr6  j" (Ar6A\0!\bA\0!\vA\x90\xD8 \b6\0A\x84\xD8 6\0\f\v \x07("Aq\r Axq \bj"\v I\r \v k!\f \x07(\f!@ A\xFFM@ \x07(\b" F@A\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v  6\f  6\b\f\v \x07(!
@  \x07G@ \x07(\b" 6\f  6\b\f\v@ \x07("\x7F \x07Aj \x07("E\r \x07Aj\v!\b@ \b! "Aj!\b ("\r\0 Aj!\b ("\r\0\v A\x006\0\f\vA\0!\v
E\r\0@ \x07("At"(\xAC\xDA \x07F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@ \x07
(F@
6\f\v
6\v E\r\v 
6 \x07("@  6  6\v \x07("E\r\0  6  6\v \fAM@  Aq \vrAr6  \vj" (Ar6\f\v   AqrAr6  j" \fAr6  \vj" (Ar6  \f\xC9\v !\v \v"@ A\bj\v /"E@A\0\v  \0A|Ax \0Ak(\0"Aq\x1B Axqj"   K\x1BY \0! \v\0 \0E@A\0\vA\xF8\xD7 \x006\0A\x7F\v}\x7F#\0Ak"$\0 A
:\0@@ \0("\x7F  \0\xC9\r \0(\v \0("F\r\0 \0(PA
F\r\0 \0 Aj6 A
:\0\0\f\v \0 AjA \0($\0AG\r\0 -\0\v Aj$\0\v\0\v\0A\v\xF4\x7F#\0A@j"\x07B\x007 \x07B\x007( \x07B\x0070 \x07B\x0078@@\x7F@\x7F @ Aq!@ AO@ A|q!@ \x07A j"\f  \bAtj"/\0Atj" /\0Aj;\0 /At \fj" /\0Aj;\0 /At \fj" /\0Aj;\0 /At \fj" /\0Aj;\0 \bAj!\b Aj" G\r\0\v E\r\v@ \x07A j  \bAtj/\0Atj" /\0Aj;\0 \bAj!\b
Aj"
G\r\0\v\v (\0"\b \x07/>"\rE\rA!\v\f\v (\0\v!\bA\0!\r \x07/<@A!\v\f\v \x07/:@A\r!\v\f\v \x07/8@A\f!\v\f\v \x07/6@A\v!\v\f\v \x07/4@A
!\v\f\v \x07/2@A !\v\f\v \x07/0@A\b!\v\f\v \x07/.@A\x07!\v\f\v \x07/,@A!\v\f\v \x07/*@A!\v\f\v \x07/(@A!\v\f\v \x07/&@A!\v\f\v \x07/$@A!\v\f\v \x07/"@A!\fA!\vA!\bA\0\f\v  (\0"\0Aj6\0 \0A\xC06\0  (\0"\0Aj6\0 \0A\xC06\0A!\f\f\v \b \v \b \vI\x1B!A!\b@@ \x07A j \bAtj/\0\r \bAj"\b \vG\r\0\v \v!\b\v  \b  \bK\x1B!\fA\v! A\x7F!
\x07/""AK\rA AtkA\xFE\xFFq \x07/$"k"A\0H\r At \x07/&"k"A\0H\r At \x07/("k"A\0H\r At \x07/*"k"A\0H\r At \x07/,"k"A\0H\r At \x07/."k"A\0H\r At \x07/0"k"A\0H\r At \x07/2"k"A\0H\r At \x07/4"k"A\0H\r At \x07/6"\x1Bk"A\0H\r At \x07/8"k"A\0H\r At \x07/:"k"A\0H\r At \x07/<"k"A\0H\r At" \rI  \rGA\0 \0E r\x1Br\rA\0!
\x07A\0; \x07 ; \x07  j"; \x07  j";\b \x07  j";
\x07  j";\f \x07  j"; \x07  j"; \x07  j"; \x07  j"; \x07  j"; \x07  \x1Bj"; \x07  j"; \x07  j"; \x07  j;@ E\r\0 AG@ Aq A~q!A\0! @ 
Atj/\0"@ \x07 Atj" /\0"Aj;\0  Atj
;\0\v 
Ar"Atj/\0"@ \x07 Atj" /\0"Aj;\0  Atj ;\0\v
Aj!
Aj" G\r\0\vE\r\v 
Atj/\0"E\r\0 \x07 Atj" /\0"Aj;\0  Atj
;\0\vA!A\0! "!A\0!@@@ \0\0\vA!
\fA K\rA\x81!A\xD0\xED\0!A\x90\xED\0!A!\f\v \0AF!A\0!A\xD0\xEE\0!A\x90\xEE\0! \0AG@\f\vA!
\fA K\r\vA \ft"Ak! (\0!A\0! \f! A\0!A\0!\rA\x7F!@A t!@@\x7FA\0   Atj/\0" AjK\r\0 I@A\0! A\xE0\0\f\v  kAt"\0j/\0! \0 j-\0\0\v!\0A\x7F \b k"t!\x1B  \r vAtj! !
@ 
\x1Bj"
Atj" ;  :\0  \0:\0\0
\r\0\vA \bAkt! @ "\0Av! \0 \rq\r\0\v \x07A j \bAtj" /\0Ak" ;\0 \0Ak \rq \0jA\0 \0\x1B!\r Aj! A\xFF\xFFqE@ \b \vF\r   Atj/\0Atj/\0!\b\v \b \fM\r\0 \r q"\0 F\r\0\vA \b  \f \x1B"k" t! \b \vI@ \v k! \b!
@@  \x07A j
Atj/\0k"A\0L\r At! Aj" j"
\vI\r\0\v ! \vA t!\vA!
  j"A\xD4Kq  A\xD0Kqr\r (\0" \0Atj"
\f:\0
:\0\0
 Atj" kAv; \0!\f\v\v \r@  \rAtj"\0A\0; \0 :\0 \0A\xC0\0:\0\0\v  (\0 Atj6\0\v  \f6\0A\0!
\v
\v\x9C\x7F ,\0\vA\0N@ \0 (\b6\b \0 )\x007\0\v (\0!@@@ ("A
M@ \0 :\0\v\f\v A\xF7\x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 \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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xDE-.A\x8C\xE0A:\0\0A\x88\xE0A\xEC\xDE6\0\vA\x90\xE0A\x88\xE0(\0"\x006\0 \0A\xEC\xDEG@ \0 \0(Aj6\vA\x94\xE0A:\0\0\vA\x90\xE0(\0"\x006\0 \0A\xEC\xDEG@ \0 \0(Aj6\v\v\xB1\x7F \0A\xC8\x876\0 \0A\bj!@ \0(\f \0(\b"kAu K@@  Atj(\0"E\r\0  ("Ak6 \r\0  (\0(\b\0\v Aj!\f\v\v \0A\x90j #\0Ak"$\0  6\f (\f"(\0"@  6 (\b A\fj \xE2\v Aj$\0 \0\v \0 \0A\x98\x906\0 \0(\b*G@ \0(\b\xA6\v \0\v\0A\x7F\v\x9D\x07 \x7F  \x006\0AA\0 \x07\x1B! A\x80q!@ AF@ \r( \r,\0\v" A\0H"\x1B"AK@ (\0! AtAk"@  \r(\0 \r \x1BAj \xFC
\0\0\v   j6\0\v A\xB0q"AG@  A F\x7F (\0 \0\v6\0\v@@@@@@ \b j-\0\0\0\v  (\x006\0\f\v  (\x006\0 A (\0(,\0!\x07  (\0"Aj6\0  \x076\0\f\v \r( \r,\0\v"\x07 \x07A\0H"\x07\x1BE\r \r(\0 \r \x07\x1B(\0!\x07  (\0"Aj6\0  \x076\0\f\v E\r \f( \f,\0\v"\x07 \x07A\0H"\x1B"E\r (\0!\x07 At"@ \x07 \f(\0 \f \x1B \xFC
\0\0\v  \x07 j6\0\f\v (\0  j"!\x07@@  \x07M\r\0 A\xC0\0 \x07(\0 (\0(\f\0E\r\0 \x07Aj!\x07\f\v\v A\0J@ (\0! !@ E  \x07OrE@ Ak! \x07Ak"\x07(\0!  Aj"6\0  6\0 !\f\v\v \x7F A0 (\0(,\0A\0\v! (\0!@ A\0LE@  Aj"6\0  6\0 Ak! !\f\v\v  (\0"Aj6\0  6\0\v@  \x07F@ A0 (\0(,\0!\x07  (\0"Aj6\0  \x076\0\f\v \v( \v,\0\v" A\0H"\x1B\x7F \v(\0 \v \x1B,\0\0A\x7F\v!A\0!A\0!@  \x07F\r@  G@ !\f\v  (\0"Aj6\0 
6\0A\0! Aj" \v( \v,\0\v" A\0H\x1BO@ !\f\vA\x7F! \v(\0" \v A\0H"\x1B j-\0\0A\xFF\0F\r\0  \v \x1B j,\0\0!\v \x07Ak"\x07(\0!  (\0"Aj6\0  6\0 Aj!\f\0\v\0\v (\0\x8F\v Aj!\f\v\v\v\x8A\x7F#\0Ak"
$\0@ \0@ \xFE!\f\v \xFD!\v@ @
Aj"\0  (\0(,\0 
(6\0\0 \0  (\0( \0\f\v
Aj"\0  (\0((\0 
(6\0\0 \0  (\0(\0\v \b \0| \0    (\0(\f\0\x006\0   (\0(\0\x006\0
Aj"\0  (\0(\0  \0X \0  \0  (\0(\0 \x07 \0| \0   (\0($\0\x006\0
Aj$\0\v\x7FA\f9"\0A\x006\b \0B\x007\0 \0\v\xF7 \x7F  \x006\0 A\x80q!@ AF@ \r( \r,\0\v" A\0H"\x1B"AK@ (\0! Ak"@  \r(\0 \r \x1BAj \xFC
\0\0\v   j6\0\v A\xB0q"AG@  A F\x7F (\0 \0\v6\0\v@@@@@@ \b j-\0\0\0\v  (\x006\0\f\v  (\x006\0 A (\0(\0!  (\0"Aj6\0  :\0\0\f\v \r( \r,\0\v" A\0H"\x1BE\r \r(\0 \r \x1B-\0\0!  (\0"Aj6\0  :\0\0\f\v E\r \f( \f,\0\v" A\0H"\x1B"E\r (\0! @  \f(\0 \f \x1B \xFC
\0\0\v   j6\0\f\v (\b! (\0  \x07j"!@@  M\r\0 ,\0\0"A\0H\r\0  Atj-\0\0A\xC0\0qE\r\0 Aj!\f\v\v "A\0J@@ E  OrE@ Ak! Ak"-\0\0!  (\0"Aj6\0  :\0\0\f\v\v \x7F A0 (\0(\0A\0\v!@  (\0"Aj6\0 A\0LE@  :\0\0 Ak!\f\v\v  :\0\0\v@  F@ A0 (\0(\0!  (\0"Aj6\0  :\0\0\f\v \v( \v,\0\v" A\0H"\x1B\x7F \v(\0 \v \x1B,\0\0A\x7F\v!A\0!A\0!@  F\r@  G@ !\f\v  (\0"Aj6\0 
:\0\0A\0! Aj" \v( \v,\0\v" A\0H\x1BO@ !\f\vA\x7F! \v(\0" \v A\0H"\x1B j-\0\0A\xFF\0F\r\0  \v \x1B j,\0\0!\v Ak"-\0\0!  (\0"Aj6\0  :\0\0 Aj!\f\0\v\0\v (\0c\v Aj!\f\v\v\v\x8A\x7F#\0Ak"
$\0@ \0@ \x83!\f\v \x82!\v@ @
Aj"\0  (\0(,\0 
(6\0\0 \0  (\0( \0\f\v
Aj"\0  (\0((\0 
(6\0\0 \0  (\0(\0\v \b \0X \0    (\0(\f\0\0:\0\0   (\0(\0\0:\0\0
Aj"\0  (\0(\0  \0X \0  \0  (\0(\0 \x07 \0X \0   (\0($\0\x006\0
Aj$\0\v
\0 \0A\xA4\xDE^\v
\0 \0A\xAC\xDE^\v\xD7\x7F@A\xF6\xFF\xFF\xFF k O@ \0,\0\vA\0H! \0(\0A\xF7\xFF\xFF\xFF! A\xF2\xFF\xFF\xFFM@  j" At"  K\x1BArAj!\v \0 \x1B! U!@ E\r\0 At"\x07E\r\0   \x07\xFC
\0\0\v@  F\r\0  kAt"\x07E\r\0 At" j  j \x07\xFC
\0\0\v AG@ !\v \0 6\0 \0 A\x80\x80\x80\x80xr6\b\f\v0\0\v \0 6\v\xD8\x7F#\0A\x90k"\v$\0 \v
6\x88 \v 6\x8C@ \0 \vA\x8Cj(@  (\0Ar6\0A\0!\0\f\v \vA\xE3\x006l \v \vA\xF0\0j"6h \v 6d \v \vA\x80j6\` \vA\x006P \vB\x007H \vA\x006@ \vB\x0078 \vA\x0060 \vB\x007( \vA\x006 \vB\x007 \vA\x006 \vB\x007\b \vA\xC8\0j \vA8j!\f \vA(j \vAj#\0Ak"
$\0@ @
Aj" \xFE" (\0(,\0\f\v
Aj" \xFD" (\0(,\0\v \v
(6\0\\   (\0( \0 |     (\0(\0 |   \v  (\0(\f\0\x006X \v  (\0(\0\x006T   (\0(\0 X     (\0(\0 \f |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@ E@ \0 6\0\f\v \0(\0! @   \xFC
\0\0\v \0 6\0 E\r\0  \0(\0 \0(\0!\v \0A\xE4\x006   \x07 kj6\0  \0(\0 \bj6\0\v0\0\v\xEE\x7F#\0A\x90k"\v$\0 \v
6\x88 \v 6\x8C@ \0 \vA\x8Cj)@  (\0Ar6\0A\0!\0\f\v \vA\xE3\x006l \v \vA\xF0\0j"6h \v 6d \v \vA\x80j6\` \vA\x006P \vB\x007H \vA\x006@ \vB\x0078 \vA\x0060 \vB\x007( \vA\x006 \vB\x007 \vA\x006 \vB\x007\b \vA\xC8\0j \vA8j! \vA(j \vAj#\0Ak"
$\0@ @
Aj" \x83" (\0(,\0\f\v
Aj" \x82" (\0(,\0\v \v
(6\0\\   (\0( \0 X     (\0(\0 X   \v  (\0(\f\0\0:\0[ \v  (\0(\0\0:\0Z   (\0(\0 X     (\0(\0  X   \v  (\0($\0\x006
Aj$\0 \b(\x006\0 A\x80q!A\0!A\0!
@@
!@@@@@@@\x7F@@@ AF\r\0 \0 \vA\x8Cj)\r\0A\0!@@@@@@ \vA\xDC\0j j"\f-\0\0\0\v AF\r\r \0;"A\0N@ \x07(\b Atj-\0\0Aq\r\x07\v  (\0Ar6\0A\0!\0\f\v AG\r\f\f\v@ \v(, \v,\x003" A\0H\x1BE\r\0 \0;A\xFFq \v(( \vA(j" \v,\x003"A\0H\x1B-\0\0G\r\0 \0S A\0:\0\0   \v(, \v,\x003" A\0H\x1BAK\x1B!
\f\v \v( \v,\0#"
A\0H\x1B@ \0;A\xFFq \v( \vAj \v,\0#"
A\0H\x1B-\0\0F\r \v-\x003!\v \v(
A\0H\x1B!@ \v(, A\xFFq \xC0A\0H\x1B"@ E\r  (\0Ar6\0A\0!\0\f\v E\r\f\v  A\0G:\0\0\f\v\v   AIrrE@A\0!
AF \v-\0_A\0GqE\r\r\v \v(8" \vA8j \v,\0C"\rA\0H"\x1B! E\r\b \fAk-\0\0AK\r\b  \v(< \r \x1Bj! \x07(\b!\f !
@ 
F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0\0A0G\r\0 -\0A rA\xF8\0G\r\0 A0 (\0(,\0!\x07  (\0"\bAj6\0 \b \x076\0 ,\0 (\0(,\0!\x07  (\0"\bAj6\0 \b \x076\0 Aj"\b!@  M\r ,\0\0*!\xB8E\r Aj!\f\0\v\0\v@  M\r ,\0\0*!\xB7E\r Aj!\f\0\v\0\v@
(\b
,\0"\x07 \x07A\0H\x1BE@ \b  (\0 (\0(0\0  (\0  \bkAtj6\0\f\v \b c \f \f(\0(\0\0! \b!\x07@  \x07M@  \b \0kAtj (\0\x8F@
("
Aj"
,\0A\0H"\x1B \rj,\0\0A\0L\r\0 \v   \x1B \rj,\0\0G\r\0  (\0"\vAj6\0 \v 6\0A\0!\v \r \r
(\b
,\0" A\0H\x1BAkIj!\r\v \x07,\0\0 (\0(,\0!  (\0"Aj6\0  6\0 \x07Aj!\x07 \vAj!\v\f\v\v\v@@@  M\r Aj!\x07 ,\0\0"A.G@  (\0(,\0!  (\0"\bAj6\0 \b 6\0 \x07!\f\v\v \f \f(\0(\f\0\0!  (\0"\bAj"\v6\0 \b 6\0\f\v (\0!\v !\x07\v \x07  \v (\0(0\0  (\0  \x07kAtj"6\0     \0kAtj  F\x1B6\0
Aj 
Aj$\0\v\xC4\x7F#\0A\x90k"$\0A\bAA
("A\xCA\0q"\x07A\bF\x1B \x07A\xC0\0F"\b\x1B! A\x83j!@ E A\x80qEr\r\0 \b@ A0:\0\x83 A\x84j!\f\v \x07A\bG\r\0 A0:\0\x83 A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0\x84 A\x85j!\v A\xF8\0j  A\x90j  \x94 (x!@ A\x88\x80qA\x88\x80G\r\0@  F\r  -\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 Aj!\f\0\v\0\v A\x83j"  G! Aj"\x07 $    Aj" A\fj A\bj \x07\x90 (# \0  (\f (\b  \\ A\x90j$\0\vC\x7F#\0Ak"$\0  6\fA\xB0 A\xF0\xC7A\xCB,A A\fj"4A\xF0\xC7A\x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6\v B\0JA\xF8\xD7A6\0\f\v A
G\r\0 \0A0k"A M@A\0!\0@ \0A
l j"\0A\x99\xB3\xE6\xCCI\x7F (" (hG@  Aj6 -\0\0\f\v %\vA0k"A Mq\r\0\v \0\xAD!\v A K\r B
~! \xAD!@@\x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A0k"A M  |"B\x9A\xB3\xE6\xCC\x99\xB3\xE6\xCCTqE@ A M\r\f\v B
~" \xAD"B\x7F\x85X\r\v\vA
!\f\v@@  Akq@  \0A\xF1\x81j-\0\0"K\r\f\v  \0A\xF1\x81j-\0\0"M\r AlAvA\x07q,\0\xF1\x83!@   t"r! \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0"M"E A\x80\x80\x80\xC0\0Iq\r\0\v \xAD! \rB\x7F \xAD"\x88" T\r@ \xADB\xFF\x83  \x86\x84! \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0"M\r  X\r\0\v\f\v@   lj! \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0"M"E A\xC7\xE3\xF18Iq\r\0\v \xAD! \r \xAD!@  ~" \xADB\xFF\x83"B\x7F\x85V\r  |! \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\v"\0A\xF1\x81j-\0\0"M\r \b B\0 B\02 \b)\bP\r\0\v\v\v  \0A\xF1\x81j-\0\0M\r\0@ \x7F ("\0 (hG@  \0Aj6 \0-\0\0\f\v %\vA\xF1\x81j-\0\0K\r\0\vA\xF8\xD7A\xC4\x006\0A\0!B\x7F!\v )pB\0Y@  (Ak6\v ArE B\x7FQq@A\xF8\xD7A\xC4\x006\0B~!\f\v  \xAC"\x85 }!\v \bAj$\0 )xB\0 ( (,k\xAC}Q\r \x07E \fA\xF0\0GrE@ \x07 >\0\f\v \x07  \xAA\f\v \x07  \xAB8\0\f\v \x07  \xC49\0\f\v \x07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x80\x80\bQ\x1BE@ Aj!\f\v \0 \x07B\x80\x80\x80\b\x85\x84B\0R\r\0 Aq j!\vA\0  A\xFF\xFF\xFFK"\x1B!A\x81\x81\x7FA\x80\x81\x7F \x1B j!\f\v \0 \x07\x84P \bB\xFF\xFFRrE@ \x07B\x88\xA7A\x80\x80\x80r!A\xFF!\f\v A\xFE\x80K@A\xFF!\f\vA\x80\xFF\0A\x81\xFF\0 \bP"\x1B" k"A\xF0\0J@A\0!A\0!\f\v \x07 \x07B\x80\x80\x80\x80\x80\x80\xC0\0\x84 \x1B!\x07A\0!  G@ Aj \0 \x07A\x80 k6 ) )\x84B\0R!\v  \0 \x07 g )\b"\0B\x88\xA7!@ )\0 \xAD\x84"\x07P \0B\xFF\xFF\xFF\x83"\0B\x80\x80\x80\bT \0B\x80\x80\x80\bQ\x1BE@ Aj!\f\v \x07 \0B\x80\x80\x80\b\x85\x84B\0R\r\0 Aq j!\v A\x80\x80\x80s  A\xFF\xFF\xFFK"\x1B!\v A j$\0 B \x88\xA7A\x80\x80\x80\x80xq Atr r\xBE\v\x89\x7F~@@\x7F@@\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\v"A+k\0\0\v A-F E\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\v"A:k"AuKr\r \0)pB\0S\r \0 \0(Ak6\f\v A:k! !A\0\v! AvI\r\0@ A0kA
O\r\0A\0!@  A
lj\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\v!A0k! A\xCC\x99\xB3\xE6\0H A0k"A Mq\r\0\v \xAC! A
O\r\0@ \xAD B
~|!\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\v"A0k"A M B0}"B\xAE\x8F\x85\xD7\xC7\xC2\xEB\xA3Sq\r\0\v A
O\r\0@\x7F \0(" \0(hG@ \0 Aj6 -\0\0\f\v \0%\vA0kA
I\r\0\v\v \0)pB\0Y@ \0 \0(Ak6\vB\0 }  \x1B!\f\vB\x80\x80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FF\xFF\0+ A\x80j )\x90 )\x98B\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xBF\xFF\xFF\0+ )\x80! )\x88\f\v A\xE2k\xAC W@ A\0N@@ A\xA0j  B\0B\x80\x80\x80\x80\x80\x80\xC0\xFF\xBF\x7F<  B\x80\x80\x80\x80\x80\x80\x80\xFF?\xB2! A\x90j   )\xA0  A\0N"\x1B )\xA8  \x1B<  At"r! B}! )\x98! )\x90! A\0N\r\0\v\v~ A k\xAD|"\xA7"A\0 A\0J\x1B   \xADS\x1B"A\xF1\0O@ A\x80j \b? )\x88! )\x80!B\0\f\v A\xE0jA\x90 k\xC8T A\xD0j \b? )\xD0! A\xF0j )\xE0 )\xE8 )\xD8"\xB1 )\xF8! )\xF0\v! A\xC0j AqE  B\0B\0dA\0G A Iqq"rr A\xB0j   )\xC0 )\xC8+ A\x90j )\xB0 )\xB8  < A\xA0j  B\0  \x1BB\0  \x1B+ A\x80j )\xA0 )\xA8 )\x90 )\x98< A\xF0j )\x80 )\x88  \xBC )\xF0" )\xF8"B\0B\0dE@A\xF8\xD7A\xC4\x006\0\v A\xE0j   \xA7\xB0 )\xE0! )\xE8\f\vA\xF8\xD7A\xC4\x006\0 A\xD0j \b? A\xC0j )\xD0 )\xD8B\0B\x80\x80\x80\x80\x80\x80\xC0\0+ A\xB0j )\xC0 )\xC8B\0B\x80\x80\x80\x80\x80\x80\xC0\0+ )\xB0! )\xB8\v! \r 7 \r 7 A\xB0j$\0 \r)! \r)!\f\v )pB\0S\r\0  (Ak6\v !\x07 ! \b!\f !\bA\0!#\0A\x90\xC6\0k"$\0A\0 k" k!@\x7F@@ A0G@ A.G\r \x07(" \x07(hF\r \x07 Aj6 -\0\0\f\v \x07(" \x07(hG@ \x07 Aj6 -\0\0! \x07%!\vA!\f\v\v \x07%\v"A0F@@ B}!\x7F \x07(" \x07(hG@ \x07 Aj6 -\0\0\f\v \x07%\v"A0F\r\0\vA!\vA!\v\v A\x006\x90~@@@@ A.F" A0k"A Mr@@@ Aq@ \vE@ !A!\v\f\v E!\f\v B|! A\xFCL@  \xA7 A0F\x1B! A\x90j Atj"
\x7F  (\0A
ljA0k \v6\0A!A\0
Aj" A F"\x1B!
 j! \f\v A0F\r\0  (\x80FAr6\x80FA\xDC\x8F!\v\x7F \x07(" \x07(hG@ \x07 Aj6 -\0\0\f\v \x07%\v"A.F" A0k"A
Ir\r\0\v\v   \v\x1B! E A_qA\xC5\0GrE@@ \x07 \b\xAC"B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7FR\r\0 \bE\rB\0! \x07)pB\0S\r\0 \x07 \x07(Ak6\v  |!\f\v E! A\0H\r\v \x07)pB\0S\r\0 \x07 \x07(Ak6\v E\rA\xF8\xD7A6\0\v \x07B\0JB\0!B\0\f\v (\x90"E@ D\0\0\0\0\0\0\0\0 \f\xB7\xA6T )\b! )\0\f\v  R B Ur AMA\0  v\x1BrE@ A0j \f? A j r Aj )0 )8 ) )(+ )! )\f\v Av\xAD S@A\xF8\xD7A\xC4\x006\0 A\xE0\0j \f? A\xD0\0j )\` )hB\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xBF\xFF\xFF\0+ A@k )P )XB\x7FB\xFF\xFF\xFF\xFF\xFF\xFF\xBF\xFF\xFF\0+ )H! )@\f\v A\xE2k\xAC U@A\xF8\xD7A\xC4\x006\0 A\x90j \f? A\x80j )\x90 )\x98B\0B\x80\x80\x80\x80\x80\x80\xC0\0+ A\xF0\0j )\x80 )\x88B\0B\x80\x80\x80\x80\x80\x80\xC0\0+ )x! )p\f\v
@
A\bL@ A\x90j Atj"(\0!@ A
l!
Aj"
A G\r\0\v  6\0\v Aj! \v@ A N BUr \xA7"
Hr\r\0 B Q@ A\xC0j \f? A\xB0j (\x90r A\xA0j )\xC0 )\xC8 )\xB0 )\xB8+ )\xA8! )\xA0\f\v B\bW@ A\x90j \f? A\x80j (\x90r A\xF0j )\x90 )\x98 )\x80 )\x88+ A\xE0jA\b
kAt(\xB0\x81? A\xD0j )\xF0 )\xF8 )\xE0 )\xE8\xAF )\xD8! )\xD0\f\v 
A}ljA\x1Bj"ALA\0 (\x90" v\x1B\r\0 A\xE0j \f? A\xD0j r A\xC0j )\xE0 )\xE8 )\xD0 )\xD8+ A\xB0j
AtA\x88\x81j(\0? A\xA0j )\xC0 )\xC8 )\xB0 )\xB8+ )\xA8! )\xA0\f\v@ "Ak! A\x90j Atj"Ak(\0E\r\0\vA\0!@
A o"E@A\0!\f\v A j  B\0S\x1B!@ E@A\0!A\0!\f\vA\x80\x94\xEB\xDCA\0 kAtA\xD0\x81j(\0"\vm!\x07A\0!A\0!A\0!@ A\x90j Atj"\b  \b(\0" \vn"\bj"6\0 AjA\xFFq  E  Fq"\x1B!
A k
\x1B!
\x07 \b \vlkl! Aj" G\r\0\v E\r\0  6\0 Aj!\v
kA j!
\v@ A\x90j Atj!
A$H!\x07@@ \x07E@
A$G\r (\0A\xD1\xE9\xF9O\r\v A\xFFj! A\0!@ !\b \xAD A\x90j A\xFFq"\vAtj"5\0B\x86|"B\x81\x94\xEB\xDCT\x7FA\0  B\x80\x94\xEB\xDC\x80"B\x80\x94\xEB\xDC~}! \xA7\v!  >\0 \b \b \b \v B\0R\x1B \v \bAkA\xFFq"G\x1B  \vF\x1B! \vAk!  \vG\r\0\v Ak! \b! E\r\0\v AkA\xFFq" F@ A\x90j"\b A\xFEjA\xFFqAtj" (\0 At \bj(\0r6\0 !\v
A j!
A\x90j Atj 6\0\f\v\v@@ AjA\xFFq!\b A\x90j AkA\xFFqAtj!@A A
A-J\x1B!@@ !A\0!@@@  jA\xFFq" F\r\0 A\x90j Atj(\0" At(\xA0\x81"I\r\0  I\r Aj"AG\r\v\v
A$G\r\0B\0!A\0!B\0!@   jA\xFFq"F@ AjA\xFFq"At jA\x006\x8C\v A\x80j A\x90j Atj(\0r A\xF0j  B\0B\x80\x80\x80\x80\xE5\x9A\xB7\x8E\xC0\0+ A\xE0j )\xF0 )\xF8 )\x80 )\x88< )\xE8! )\xE0! Aj"AG\r\0\v A\xD0j \f? A\xC0j   )\xD0 )\xD8+B\0! )\xC8! )\xC0! A\xF1\0j" k" A\0 A\0J\x1B  H"\b\x1B"\x07A\xF0\0M\r\f\v  j! !  F\r\0\vA\x80\x94\xEB\xDC v!\vA\x7F tA\x7Fs!A\0! !@ A\x90j"\x07 Atj"  (\0" vj"6\0 AjA\xFFq  E  Fq"\x1B!
A k
\x1B!
q \vl! AjA\xFFq" G\r\0\v E\r  \bG@ At \x07j 6\0 \b!\f\v  (\0Ar6\0\f\v\v\v A\x90jA\xE1 \x07k\xC8T A\xB0j )\x90 )\x98 \xB1 )\xB8! )\xB0! A\x80jA\xF1\0 \x07k\xC8T A\xA0j   )\x80 )\x88\xAE A\xF0j   )\xA0" )\xA8"\xBC A\xE0j   )\xF0 )\xF8< )\xE8! )\xE0!\v@ AjA\xFFq" F\r\0@ A\x90j Atj(\0"A\xFF\xC9\xB5\xEEM@ E AjA\xFFq Fq\r A\xF0j \f\xB7D\0\0\0\0\0\0\xD0?\xA2T A\xE0j   )\xF0 )\xF8< )\xE8! )\xE0!\f\v A\x80\xCA\xB5\xEEG@ A\xD0j \f\xB7D\0\0\0\0\0\0\xE8?\xA2T A\xC0j   )\xD0 )\xD8< )\xC8! )\xC0!\f\v \f\xB7!\x1B  AjA\xFFqF@ A\x90j \x1BD\0\0\0\0\0\0\xE0?\xA2T A\x80j   )\x90 )\x98< )\x88! )\x80!\f\v A\xB0j \x1BD\0\0\0\0\0\0\xE8?\xA2T A\xA0j   )\xB0 )\xB8< )\xA8! )\xA0!\v \x07A\xEF\0K\r\0 A\xD0j  B\0B\x80\x80\x80\x80\x80\x80\xC0\xFF?\xAE )\xD0 )\xD8B\0B\0d\r\0 A\xC0j  B\0B\x80\x80\x80\x80\x80\x80\xC0\xFF?< )\xC8! )\xC0!\v A\xB0j    < A\xA0j )\xB0 )\xB8  \xBC )\xA8! )\xA0!@ Ak A\xFF\xFF\xFF\xFF\x07qN\r\0  B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x837\x98  7\x90 A\x80j  B\0B\x80\x80\x80\x80\x80\x80\x80\xFF?+ )\x90 )\x98B\x80\x80\x80\x80\x80\x80\x80\xB8\xC0\0\xB2! )\x88  A\0N"\x1B! )\x80  \x1B! \b \x07 G A\0Hrq  B\0B\0dA\0GqE   j"A\xEE\0jNq\r\0A\xF8\xD7A\xC4\x006\0\v A\xF0j   \xB0 )\xF8! )\xF0\v! \r 7( \r 7 A\x90\xC6\0j$\0 \r)(! \r) !\f\vB\0!\f\vB\0!\v \0 7\0 \0 7\b \rA0j$\0\v\xC0\x7F~#\0A\x80k"$\0@@@  B\0B\0dE\r\0\x7F B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!
\x7F B0\x88\xA7A\xFF\xFFq"\x07A\xFF\xFFG@A \x07\rAA 
\x84P\x1B\f\v 
\x84P\v\vE\r\0 B0\x88\xA7"\bA\xFF\xFFq"A\xFF\xFFG\r\v Aj    +  )" )"  \xAF )\b! )\0!\f\v  B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"
 B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83" dA\0L@ 
 d@ !\f\v A\xF0\0j  B\0B\0+ )x! )p!\f\v B0\x88\xA7A\xFF\xFFq!\x07 ~  A\xE0\0j 
B\0B\x80\x80\x80\x80\x80\x80\xC0\xBB\xC0\0+ )h"
B0\x88\xA7A\xF8\0k! )\`\v! \x07E@ A\xD0\0j  B\0B\x80\x80\x80\x80\x80\x80\xC0\xBB\xC0\0+ )X" B0\x88\xA7A\xF8\0k!\x07 )P!\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83B\x80\x80\x80\x80\x80\x80\xC0\0\x84!\v
B\xFF\xFF\xFF\xFF\xFF\xFF?\x83B\x80\x80\x80\x80\x80\x80\xC0\0\x84!
 \x07J@@~
\v}  V\xAD}" B\0Y@  }"\x84P@ A j  B\0B\0+ )(! ) !\f\v B\x86 B?\x88\x84\f\v
B\x86 B?\x88\x84\v!
B\x86! Ak" \x07J\r\0\v \x07!\v@
\v}  V\xAD}" B\0S@
! \f\v  }"\x84B\0R\r\0 A0j  B\0B\0+ )8! )0!\f\v B\xFF\xFF\xFF\xFF\xFF\xFF?X@@ B?\x88 Ak! B\x86! B\x86\x84" B\x80\x80\x80\x80\x80\x80\xC0\0T\r\0\v\v \bA\x80\x80q!\x07 A\0L@ A@k  B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 A\xF8\0j \x07r\xADB0\x86\x84B\0B\x80\x80\x80\x80\x80\x80\xC0\xC3?+ )H! )@!\f\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83  \x07r\xADB0\x86\x84!\v \0 7\0 \0 7\b A\x80j$\0\v\x87\x7F~#\0A\xD0k"$\0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!\v B\xFF\xFF\xFF\xFF\xFF\xFF?\x83!
 \x85B\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7F\x83!\f B0\x88\xA7A\xFF\xFFq!\x07@@ B0\x88\xA7A\xFF\xFFq"\bA\xFF\xFFkA\x82\x80~O@ \x07A\xFF\xFFkA\x81\x80~K\r\v P B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\f\f\v P B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1BE@ B\x80\x80\x80\x80\x80\x80 \x84!\f !\f\v  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@B\0!B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0!\f\f\v \fB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\fB\0!\f\v  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x85\x84P@B\0!\f\v  \x84P@B\x80\x80\x80\x80\x80\x80\xE0\xFF\xFF\0 \f  \x84P\x1B!\fB\0!\f\v  \x84P@ \fB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\fB\0!\f\v B\xFF\xFF\xFF\xFF\xFF\xFF?X@ A\xC0j 

P"\x1ByB\xC0\0B\0 \x1B|\xA7"Ak6A k! )\xC8!
)\xC0!\v B\xFF\xFF\xFF\xFF\xFF\xFF?V\r\0 A\xB0j  \v  \v \vP" \x1ByB\xC0\0B\0 \x1B|\xA7" Ak6  jAk! )\xB8!\v )\xB0!\v A\xA0j \vB\x80\x80\x80\x80\x80\x80\xC0\0\x84"B\x86 B1\x88\x84"B\0B\x80\x80\x80\x80\xB0\xE6\xBC\x82\xF5\0 }"B\02 A\x90jB\0 )\xA8}B\0 B\02 A\x80j )\x98B\x86 )\x90B?\x88\x84"B\0 B\02 A\xF0j B\0B\0 )\x88}B\02 A\xE0j )\xF8B\x86 )\xF0B?\x88\x84"B\0 B\02 A\xD0j B\0B\0 )\xE8}B\02 A\xC0j )\xD8B\x86 )\xD0B?\x88\x84"B\0 B\02 A\xB0j B\0B\0 )\xC8}B\02 A\xA0j B\0 )\xB8B\x86 )\xB0B?\x88\x84B}"B\02 A\x90j B\x86B\0 B\02 A\xF0\0j B\0B\0 )\xA8 )\xA0" )\x98|" T\xAD| BV\xAD|}B\02 A\x80jB }B\0 B\02  \b \x07kj"\bA\xFF\xFF\0j!~ )p"B\x86"\r )\x88"B\x86 )\x80B?\x88\x84|"B\xE7\xEC\0}"B \x88"
B\x80\x80\x80\x80\x80\x80\xC0\0\x84"B\x86"B \x88"~" B\x86"B \x88"\v  V\xAD \r V\xAD )xB\x86 B?\x88\x84 B?\x88|||B}"B \x88"~|"\r T\xAD \r \r B\xFF\xFF\xFF\xFF\x83" B?\x88"
B\x86\x84B\xFF\xFF\xFF\xFF\x83"
~|"\rV\xAD|  ~|  ~"
~|" T\xADB \x86 B \x88\x84| \r B \x86|" \rT\xAD|   B\xFF\xFF\xFF\xFF\x83"
~"\r  \v~|" \rT\xAD    B\xFE\xFF\xFF\xFF\x83"\r~|"V\xAD||"V\xAD|   ~" \r ~|" 
~|"
\v ~|"B \x88
V\xAD  T\xAD 
V\xAD||B \x86\x84|" T\xAD|     \r~"
\v ~|"B \x88 
T\xADB \x86\x84|"
T\xAD
B \x86|"
V\xAD||"V\xAD|  
B \x86" \r ~| T\xADB\x7F\x85"V 
Rq\xAD|"V\xAD|"B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0X@  \x84! A\xD0\0j  B\x80\x80\x80\x80\x80\x80\xC0\0T"\x07\xAD"\v\x86"
 \v\x86 B\x88 \x07A?s\xAD\x88\x84"  2 \bA\xFE\xFF\0j  \x07\x1BAk! B1\x86 )X} )P"B\0R\xAD}!\vB\0 }\f\v A\xE0\0j B?\x86 B\x88\x84"
B\x88"  2 B0\x86 )h} )\`"B\0R\xAD}!\v !B\0 }\v! A\xFF\xFFN@ \fB\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x84!\fB\0!\f\v~ A\0J@ \vB\x86 B?\x88\x84! B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 \xADB0\x86\x84!\v B\x86\f\v A\x8F\x7FL@B\0!\f\v A@k
A kg A0j   A\xF0\0j6 A j   )@"
)H"\v2 )8 )(B\x86 ) "B?\x88\x84} )0" B\x86"T\xAD}!  }\v! Aj  BB\02   BB\02 \v

B\x83" |"T   T\xAD|" V  Q\x1B\xAD|"
T\xAD|"   B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T  )V  )"V  Q\x1Bq\xAD|"V\xAD|"  B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0T  )\0V  )\b"V  Q\x1Bq\xAD|" T\xAD| \f\x84!\f\v \0 7\0 \0 \f7\b A\xD0j$\0\v\xBF\x7F#\0A\xD0\0k"$\0@ A\x80\x80N@ A j  B\0B\x80\x80\x80\x80\x80\x80\x80\xFF\xFF\0+ )(! ) ! A\xFF\xFFI@ A\xFF\xFF\0k!\f\v Aj  B\0B\x80\x80\x80\x80\x80\x80\x80\xFF\xFF\0+A\xFD\xFF  A\xFD\xFFO\x1BA\xFE\xFFk! )! )!\f\v A\x81\x80\x7FJ\r\0 A@k  B\0B\x80\x80\x80\x80\x80\x80\x809+ )H! )@! A\xF4\x80~K@ A\x8D\xFF\0j!\f\v A0j  B\0B\x80\x80\x80\x80\x80\x80\x809+A\xE8\x81}  A\xE8\x81}M\x1BA\x9A\xFEj! )8! )0!\v   B\0 A\xFF\xFF\0j\xADB0\x86+ \0 )\b7\b \0 )\x007\0 A\xD0\0j$\0\v<\0 \0 7\0 \0 B\xFF\xFF\xFF\xFF\xFF\xFF?\x83 B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0\x83B0\x88\xA7 B0\x88\xA7A\x80\x80qr\xADB0\x86\x847\b\v\xC0\x7F~A\x7F!@ \0B\0R B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0V B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Q\x1B\r\0 B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0\x83"B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0V B\x80\x80\x80\x80\x80\x80\xC0\xFF\xFF\0Rq\r\0 \0  \x84\x84P@A\0\v  \x83B\0Y@  R  Sq\r \0  \x85\x84B\0R\v \0B\0R  U  Q\x1B\r\0 \0  \x85\x84B\0R!\v \v8\0 \0A\xD0k \0 \0A\x93\xF1\xFF\xFF\x07J\x1B"\0Aq@A\0\v \0A\xECj"\0A\xE4\0o@A\v \0A\x90oE\v\x85\x7F~#\0A\x80k"\b$\0 @\x7F@@\x7F@@@ -\0\0"A%G@ \r
\f\x07\vA\0!A! @ -\0"\x07A-k\0\v \x07A\xDF\0F\r \x07\r\v \0
j :\0\0
Aj\f\v \x07! -\0!\x07A! \vA\0!@\x7F  j \x07"A+Fj" ,\0\0A0kA M@ \bA\fjA
B\xFF\xFF\xFF\xFF\xBE\xA7! \b(\f\f\v \b 6\fA\0! \v"\x07-\0\0"A\xC3\0k"\vAKA \vtA\x99\x80\x80qEr\r\0 "\r\0 \x07 G!\v A\xCF\0F A\xC5\0Fr\x7F \x07-\0! \x07Aj \x07\v! \bAj!\x07 ! A\0!#\0A\xD0\0k"\v$\0A\x8A !\rA0!A\xA8\x80\b!\f@ \b\x7F@@@@@@@\x7F@@@@@@@@@~@@@@@@@@@@@@@@@@@@@@@@@@@@ \xC0"A%kV!---------------------------'-\x07\b
---\r---- ------\0&-\b-\v--\f--%-\x1B-\v ("AM\r"\f*\v ("AK\r) A\x87\x80\bj\f"\v ("A\vK\r( A\x8E\x80\bj\f!\v ("A\vK\r' A\x9A\x80\bj\f \v 4B\xEC|B\xE4\0\x7F!\f#\vA\xDF\0!\v 4\f!\f!\vA\xD2!\r\f\v 4"B\xEC|!@ ("AL@  B\xEB| \xBDAF\x1B!\f\v A\xE9I\r\0 B\xED|  \xBDAF\x1B!\v A\xE7\0F\r\f \v 4\b!\f\vA! (\b"E@B\f!\f \v \xAC"B\f}  A\fJ\x1B!\f\v (Aj\xAC!A!\f\v (Aj\xAC!\f\x1B\v 4!\f\v \bA6|A\xD4!\f\vA\xA7\x80\bA\xA6\x80\b (\bA\vJ\x1B\f\vA\xF7!\r\f\vA\0!\fA\0!#\0Ak"$\0 4!~ ("\rA\fO@ \r \rA\fm"A\flk"A\fj  A\0H\x1B!\r  Auj\xAC |!\v A\fj! B}B\x88X@ \xA7"\fA\xC4\0kAu!@ \x7F \fAqE@ Ak! E\rA\f\v E\rA\0\v6\0\v \fA\x80\xE7\x84l A\x80\xA3ljA\x80\xD6\xAF\xE3\x07j\xAC\f\v B\xE4\0}" B\x90\x7F"B\x90~}"B?\x87\xA7 \xA7j!@@@ \xA7"A\x90j  B\0S\x1B"\x7F\x7F A\xC8N@ A\xACO@A!\f A\xACk\f\vA!\f A\xC8k\f\v A\xE4\0k  A\xE3\0J"\f\x1B\v"\rA\0A\v! \r\f\v Av! AqE! E\r\v  6\0\v B\x80\xE7\x84~  \fAl A\xE1\0ljj k\xACB\x80\xA3~|B\x80\xAA\xBA\xC3|\v! \rAtA\x80\xFE\0j(\0"A\x80\xA3j  (\f\x1B  \rAJ\x1B! (\f! 4\b! 4! 4\0 Aj$\0  \xAC| Ak\xACB\x80\xA3~| B\x90~| B<~|| 4$}\f\b\v 4\0!\f\v \bA6|A\xD6!\f\vA\xE4!\r\f\v ("A\x07 \x1B\xAC\f\v ( (kA\x07jA\x07n\xAD!\f\v ( (AjA\x07pkA\x07jA\x07n\xAD!\f\v \xBD\xAD!\f\v 4\v!A!\f\vA\xA9\x80\b!\f\f
\vA\xAA\x80\b!\f\f \v 4B\xEC|B\xE4\0\x81" B?\x87"\x85 }!\f
\v 4"B\xEC|! B\xA4?S\r
\v 70 \b \x07A\x9B \vA0je6| \x07!\f\v ( A\0H@ \bA\x006|A\xD7!\f\v \v ($"A\x90m"A\xE4\0l  A\x90lk\xC1A<m\xC1j6@ \b \x07A\xA1 \vA@ke6| \x07!\f\r\v ( A\0H@ \bA\x006|A\xD7!\f\r\v ((A\xB4\xDC(\0E@A\xAC\xDCA\xB0\xDCA\xC0\xDCA\xE0\xDCA\xB8\xDCA\xE0\xDC6\0A\xB4\xDCA\xC0\xDC6\0\v\f\v\v \bA6|A\xEA!\f\v\v B\xE4\0\x81!\f\v A\x80\x80\br\v \xB5\f\x07\vA\xAB\x80\b!\f\v \f \xB5!\r\v \b \x07A\xE4\0 \r  \xB4"6| \x07A\0 \x1B!\f\vA!\f\vA!\v@  \x1B"A\xDF\0G@ A-G\r \v 7 \b \x07A\x9C \vAje6| \x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A\fj1\v|\x7F \0 \0(H"Ak r6H \0( \0(G@ \0A\0A\0 \0($\0\v \0A\x006 \0B\x007 \0(\0"Aq@ \0 A r6\0A\x7F\v \0 \0(, \0(0j"6\b \0 6 A\x1BtAu\v\xAD\v\x07\x7F \0 j!@@ \0("Aq\r\0 AqE\r \0(\0" j!@@@ \0 k"\0A\x90\xD8(\0G@ \0(\f! A\xFFM@  \0(\b"G\rA\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v \0(! \0 G@ \0(\b" 6\f  6\b\f\v \0("\x7F \0Aj \0("E\r \0Aj\v!@ !\x07 "Aj! ("\r\0 Aj! ("\r\0\v \x07A\x006\0\f\v ("AqAG\rA\x84\xD8 6\0  A~q6 \0 Ar6  6\0\v  6\f  6\b\f\vA\0!\v E\r\0@ \0("At"(\xAC\xDA \0F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@ \0 (F@  6\f\v  6\v E\r\v  6 \0("@  6  6\v \0("E\r\0  6  6\v@@@@ ("AqE@A\x94\xD8(\0 F@A\x94\xD8 \x006\0A\x88\xD8A\x88\xD8(\0 j"6\0 \0 Ar6 \0A\x90\xD8(\0G\rA\x84\xD8A\x006\0A\x90\xD8A\x006\0\vA\x90\xD8(\0"\b F@A\x90\xD8 \x006\0A\x84\xD8A\x84\xD8(\0 j"6\0 \0 Ar6 \0 j 6\0\v Axq j! (\f! A\xFFM@ (\b" F@A\xFC\xD7A\xFC\xD7(\0A~ Avwq6\0\f\v  6\f  6\b\f\v (!  G@ (\b" 6\f  6\b\f\v ("\x7F Aj ("E\r Aj\v!@ !\x07 "Aj! ("\r\0 Aj! ("\r\0\v \x07A\x006\0\f\v  A~q6 \0 Ar6 \0 j 6\0\f\vA\0!\v E\r\0@ ("At"(\xAC\xDA F@ A\xAC\xDAj 6\0 \rA\x80\xD8A\x80\xD8(\0A~ wq6\0\f\v@  (F@  6\f\v  6\v E\r\v  6 ("@  6  6\v ("E\r\0  6  6\v \0 Ar6 \0 j 6\0 \0 \bG\r\0A\x84\xD8 6\0\v A\xFFM@ A\xF8qA\xA4\xD8j!\x7FA\xFC\xD7(\0"A Avt"qE@A\xFC\xD7  r6\0 \f\v (\b\v!  \x006\b  \x006\f \0 6\f \0 6\b\vA! A\xFF\xFF\xFF\x07M@ A& A\bvg"kvAq AtrA>s!\v \0 6 \0B\x007 AtA\xAC\xDAj!@@A\x80\xD8(\0"A t"\x07qE@A\x80\xD8  \x07r6\0  \x006\0 \0 6\f\v A AvkA\0 AG\x1Bt! (\0!@ "(Axq F\r Av! At!  Aqj"\x07("\r\0\v \x07 \x006 \0 6\v \0 \x006\f \0 \x006\b\v (\b" \x006\f  \x006\b \0A\x006 \0 6\f \0 6\b\v\v\0 \0E@A\0\v \0 \xC5\v\0 \0  A4A5\xD0\v-\0 \0A\xCC\0j1 \0A@k1 \0A4j1 \0A(j1 \0Aj1 \0Aj1\v\xBC\0@@@@@@@@@@@ A k\0\b
\b 
\b \x07\v  (\0"Aj6\0 \0 (\x006\0\v  (\0"Aj6\0 \0 2\x007\0\v  (\0"Aj6\0 \0 3\x007\0\v  (\0"Aj6\0 \0 0\0\x007\0\v  (\0"Aj6\0 \0 1\0\x007\0\v  (\0A\x07jAxq"A\bj6\0 \0 +\x009\0\v \0  \0\v\v  (\0"Aj6\0 \0 4\x007\0\v  (\0"Aj6\0 \0 5\x007\0\v  (\0A\x07jAxq"A\bj6\0 \0 )\x007\0\vo\x7F \0(\0",\0\0A0k"A K@A\0\v@A\x7F! A\xCC\x99\xB3\xE6\0M@A\x7F  A
l"j  A\xFF\xFF\xFF\xFF\x07sK\x1B!\v \0 Aj"6\0 ,\0 ! !A0k"A
I\r\0\v \v\xF5\x7F~#\0A@j"\b$\0 \b 6< \bA)j! \bA'j! \bA(j!@@@@@A\0!\x07@ !\r \x07 A\xFF\xFF\xFF\xFF\x07sJ\r \x07 j!@@@@ "\x07-\0\0"\v@@@@ \vA\xFFq"E@ \x07!\f\v A%G\r \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xD8\0k! 
\0\v@ \x07A\xC1\0k\x07\v\0\v \x07A\xD3\0F\r\v\f\v \b)0!A\x93 \f\vA\0!\x07@@@@@@@ \b\0\v \b(0 6\0\f\x1B\v \b(0 6\0\f\v \b(0 \xAC7\0\f\v \b(0 ;\0\f\v \b(0 :\0\0\f\v \b(0 6\0\f\v \b(0 \xAC7\0\f\vA\b A\bM\x1B! \fA\br!\fA\xF8\0!\x07\v ! \x07A q!\r \b)0""\x1BPE@@ Ak" \x1B\xA7Aq-\0\x90u \rr:\0\0 \x1BB\x88"\x1BB\0R\r\0\v\v !\r \fA\bqE Pr\r \x07AvA\x93 j!A!\f\v ! \b)0""\x1BPE@@ Ak" \x1B\xA7A\x07qA0r:\0\0 \x1BB\x88"\x1BB\0R\r\0\v\v !\r \fA\bqE\r  k"  H\x1B! \f\v \b)0"B\0S@ \bB\0 }"70A!A\x93 \f\v \fA\x80q@A!A\x94 \f\vA\x95 A\x93 \fAq"\x1B\v!  x!\r\v  A\0Hq\r \fA\xFF\xFF{q \f \x1B!\f B\0R rE@ !\rA\0! \f\v P  \rkj"  H\x1B! \f\r\v \b-\x000!\x07\f\v\v \b(0"A\xC4 \x1B"\rA\0A\xFF\xFF\xFF\xFF\x07 A\xFF\xFF\xFF\xFF\x07O\x1B"\x07\xCA" \rk \x07 \x1B" \rj!
A\0N@ \v!\f ! \f\f\v \v!\f !
-\0\0\r\f\v\v \b)0"\x1BPE\rA\0!\x07\f \v @ \b(0\f\vA\0!\x07 \0A A\0 \f7\f\v \bA\x006\f \b \x1B>\b \b \bA\bj"\x0760A\x7F! \x07\v!\vA\0!\x07@@ \v(\0"\rE\r\0 \bAj \r\xCA"\rA\0H\r \r \x07kK\r\0 \vAj!\v \x07 \rj"\x07 I\r\v\vA=!
\x07A\0H\r\f \0A  \x07 \f7 \x07E@A\0!\x07\f\vA\0!
\b(0!\v@ \v(\0"\rE\r \bAj" \r\xCA"\r
j"
\x07K\r \0 \r3 \vAj!\v \x07
K\r\0\v\v \0A  \x07 \fA\x80\xC0\0s7  \x07 \x07 H\x1B!\x07\f\b\v  A\0Hq\r A=!
\0 \b+0  \f \x07 \0"\x07A\0N\r\x07\f
\v \x07-\0!\v \x07Aj!\x07\f\0\v\0\v \0\r E\rA!\x07@  \x07Atj(\0"\0@  \x07Atj \0  \xCDA! \x07Aj"\x07A
G\r\f\v\v\v \x07A
O@A!\f
\v@  \x07Atj(\0\rA! \x07Aj"\x07A
G\r\0\v\f \vA!
\f\v \b \x07:\0'A! !\r \v!\f\v
\rk"\v \vJ\x1B" A\xFF\xFF\xFF\xFF\x07sJ\rA=!
  j" H\x1B"\x07 K\r \0A \x07 \f7 \0  3 \0A0 \x07 \fA\x80\x80s7 \0A0  \vA\07 \0 \r \v3 \0A \x07 \fA\x80\xC0\0s7 \b(<!\f\v\v\vA\0!\f\vA=!
\vA\xF8\xD7
6\0\vA\x7F!\v \bA@k$\0 \v\xC2\x7F#\0A\xD0k"$\0  6\xCC A\xA0j"A\0A(\xFC\v\0  (\xCC6\xC8@A\0  A\xC8j A\xD0\0j   \xCFA\0H@A\x7F!\f\v \0(LA\0H \0 \0(\0"\bA_q6\0\x7F@@ \0(0E@ \0A\xD0\x0060 \0A\x006 \0B\x007 \0(,! \0 6,\f\v \0(\r\vA\x7F \0\xC9\r\v \0  A\xC8j A\xD0\0j A\xA0j  \xCF\v! @ \0A\0A\0 \0($\0 \0A\x0060 \0 6, \0A\x006 \0(! \0B\x007 A\x7F \x1B!\v \0 \0(\0"\0 \bA qr6\0A\x7F  \0A q\x1B!\r\0\v A\xD0j$\0 \v\x7F\x7F~ \0\xBD"B4\x88\xA7A\xFFq"A\xFFG| E@  \0D\0\0\0\0\0\0\0\0a\x7FA\0 \0D\0\0\0\0\0\0\xF0C\xA2 \xD1!\0 (\0A@j\v6\0 \0\v  A\xFE\x07k6\0 B\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x87\x80\x7F\x83B\x80\x80\x80\x80\x80\x80\x80\xF0?\x84\xBF \0\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FrE@   \xFC
\0\0\v \0  j6\f\v \0(\0"@ \0 6 \0(\b ! \0A\x006\b \0B\x007\0\v \0 \0 \x86\xA8 \0(!  k"E  FrE@   \xFC
\0\0\v \0  j6\v\v\v\0  \0(\0j!\0A\f9 \0b\v\0  \0(\0j :\0\0\v\r\0  \0(\0j-\0\0\v\x1B\0 \0 (\b M@    \xA7\v\v8\0 \0 (\b M@    \xA7\v \0(\b"\0      \0(\0(\v\0\v\x92\x7F \0 (\b M@    \xA7\v -\x005 \0(\f! A\0:\x005 -\x004 A\0:\x004 \0Aj"     \xA6 -\x004"
r!\b -\x005"\vr!\x07@ AI\r\0 Atj! \0Aj!@ -\x006\r@
Aq@ (AF\r \0-\0\bAq\r\f\v \vAqE\r\0 \0-\0\bAqE\r\v A\0;4      \xA6 -\x005"\v \x07rAq!\x07 -\x004"
\brAq!\b A\bj" I\r\0\v\v  \x07Aq:\x005  \bAq:\x004\v\xA4\0@ \0 (\b M@  (G\r (AF\r  6\v \0 (\0 ME\r\0@ ( G@  (G\r\v AG\r A6 \v  6  6  ((Aj6(@ ($AG\r\0 (AG\r\0 A:\x006\v A6,\v\v\x88\0@ \0 (\b M@  (G\r (AF\r  6\v \0 (\0 M@@ ( G@  (G\r\v AG\r A6 \v  6 @ (,AF\r\0 A\0;4 \0(\b"\0   A  \0(\0(\v\0 -\x005AF@ A6, -\x004E\r\f\v A6,\v  6  ((Aj6( ($AG\r (AG\r A:\x006\v \0(\b"\0     \0(\0(
\0\v\v\xC1\x7F@ \0 (\b M@  (G\r (AF\r  6\v@ \0 (\0 M@@ ( G@  (G\r\v AG\r A6 \v  6 (,AF\r \0Aj" \0(\fAtj!\x07A\0!@@@ \x7F@  \x07O\r\0 A\0;4    A \xA6 -\x006\r\0 -\x005AG\r -\x004AF@ (AF\rA!A! \0-\0\bAqE\r\f\vA! \0-\0\bAq\rA\f\vAA \x1B\v6, \r\f\v A6,\f\v A\bj!\f\0\v\0\v \0(\f! \0Aj"    \x88 AI\r  Atj! \0Aj!@ \0(\b"\0AqE@ ($AG\r\v@ -\x006\r     \x88 A\bj" I\r\0\v\f\v \0AqE@@ -\x006\r ($AF\r     \x88 A\bj" I\r\0\f\v\0\v@ -\x006\r ($AF@ (AF\r\v     \x88 A\bj" I\r\0\v\f\v  6  ((Aj6( ($AG\r\0 (AG\r\0 A:\x006\v\v\xCB\x7F#\0A@j"$\0@@@ (A\xA2\xC7F@ A\x006\0\f\v@ \0  \0-\0\bAq\x7FA E\r A\xF8\xC4E"E\r -\0\bAqA\0G\vM!\v @A! (\0"\0E\r  \0(\x006\0\f\v A\xA8\xC5E"E\rA\0! (\0"@  (\0"6\0\v (\b"\x07 \0(\b"A\x7FsqA\x07q \x07A\x7Fs qA\xE0\0qr\r \0(\f"\x07(" (\f"\0(G\r\vA!\f\v A\xA0\xC7F@ \0A\xD8\xC5EE!\f\vA\0! \x07A\xA8\xC5E"@ AqE\r\x7F !A\0!@@A\0 \0E\r \0A\xA8\xC5E"\0E\r \0(\b (\b"A\x7Fsq\rA (\f"( \0(\f"\0(F\r AqE\r A\xA8\xC5E"\r\0\v A\x8C\xC6E"E\r\0  \0\xD9!\v \v!\f\v \x07A\x8C\xC6E"@ AqE\r  \0\xD9!\f\v \x07A\xC8\xC4E"E\r\0 \0A\xC8\xC4E"\0E\r\0 A\bjA\0A8\xFC\v\0  A\0G:\0; A\x7F6  6\f  \x006 A64 \0 Aj A \0(\0(\b\0 ("\0AF@  (A\0 \x1B6\0\v \0AF!\v A@k$\0 \vr\x7F \0( (\b(F@   \xA8\v \0(\f! \0Aj"   \xDA@ AI\r\0  Atj! \0Aj!\0@ \0   \xDA -\x006\r \0A\bj"\0 I\r\0\v\v\v\0 \0@ \0\xC7\v \0!\v5\0 \0( (\b(F@   \xA8\v \0(\b"\0    \0(\0(\b\0\v\0 \0( (\b(F@   \xA8\v\v\xC4\x7F#\0A\xD0\0k"$\0@\x7FA \0( (F\r\0A\0 A\xC8\xC4E"E\r\0 (\0"E\r AjA\0A8\x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0@@\x7F@  F  Fr\r\0  )\x007\b \0(\b! #\0Ak"$\0  H6\f \b k!A\0!
#\0A\x90\bk"\f$\0 \f (\0" 6\f  \fAj \x1B!@@@ E  kAuA\x80 \x1B"\rErE@@ A\x83K Av"\v \rOrE@ !\v\f\v  \fA\fj \v \r \v \rI\x1B \xA4! \f(\f!\v A\x7FF@A\0!\rA\x7F!
\f\v \r A\0  \fAjG\x1B"k!\r  Atj! j \vkA\0 \v\x1B!
j!
\vE\r \v! \r\r\0\f\v\0\v !\v\v \vE\r\v \rE Er\r\0
! @@@  \v  \x98"
AjAM@@@
Aj\0\v \fA\x006\f\f\v A\x006\0\f\v \f \f(\f
j"\v6\f Aj! \rAk"\r\r\v !
\f\v Aj! 
k! !
\r\0\v\v @  \f(\f6\0\v \fA\x90\bj$\0 A\fjI Aj$\0@@@@
A\x7FF@@@ \x07 6\0  (\0F\r\0A!@@@   \b k A\bj \0(\b\xEE"Aj\b\0\v  6\0\f\v !\v  j! \x07(\0Aj!\f\v\v  6\0\f\v \x07 \x07(\0
Atj"6\0  F\r (\0!  \bF\r  A  \0(\b\xEEE\r\vA\f\v \x07 \x07(\0Aj"6\0  (\0Aj"6\0 !\b@  \bF\r \b-\0\0E\r \bAj!\b\f\0\v\0\v  6\0A\f\v (\0!\v  G\v Aj$\0\v !\b\f\0\v\0\v\x9F\v\x7F#\0Ak"$\0 !\b@@  \bF@ !\b\f\v \b(\0E\r\0 \bAj!\b\f\v\v \x07 6\0  6\0@@@@  F  Fr\x7F   )\x007\bA! \0(\b! #\0Ak"$\0  H6\f !  k!
A\0!\f#\0Ak"$\0@ (\0"\vE \b kAu"Er\r\0
A\0 \x1B!
@ A\fj
AI\x1B \v(\0\xC5"\rA\x7FF@A\x7F!\f\f\v \x7F
AM@
\rI\r A\fj \rY\v
\rk!
\rjA\0\v! \v(\0E@A\0!\v\f\v \f \rj!\f \vAj!\v Ak"\r\0\v\v @  \v6\0\v Aj$\0 A\fjI Aj$\0@@@@ \fAj\0\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\0@  k" \0(\b \0("kAuM@ \0(" Atj!@  F@ \0 6  *\x008\0 Aj!\f\v\v\f\v A\fj \0  \0(\0kAu j\x86 \0( \0(\0kAu \0\xB8"(\b" Atj!@  G@  *\x008\0 Aj!\f\v\v  6\b \0 \x96 \xB5\v A j$\0\f\v  I@ \0  Atj6\v\v\v7\0@@  F\r\0 (\0"\0A\xFF\0K\r\0 \0At(\x90\x88 qE\r\0 Aj!\f\v\v \v7\0@@  F\r\0 (\0"\0A\xFF\0M@ \0At(\x90\x88 q\r\v Aj!\f\v\v \vF\x7F@  FE@A\0!\0  (\0"A\xFF\0M\x7F At(\x90\x88A\0\v6\0 Aj! Aj!\f\v\v \v"\0A\0!\0 A\xFF\0M\x7F At(\x90\x88 qA\0GA\0\v\v\0 \0 \0(\0(\0\v \0 \0\xF5!\v\x95\x7F \0\x7F \0(" \0(\bI@  *\x008\0 Aj\f\v#\0A k"$\0 A\fj \0 \0( \0(\0kAuAj\x86 \0( \0(\0kAu \0\xB8"(\b" *\x008\0  Aj6\b \0 \x96 \0( \xB5 A j$\0\v6\v\xA1\0@ ,\0\vA\0N@ \0 (\b6\b \0 )\x007\0\f\v (\0!@@@ ("AM@ \0 :\0\v\f\v A\xF7\xFF\xFF\xFFO\r Ar"AjU! \0 A\xFF\xFF\xFF\xFF\x07k6\b \0 6\0 \0 6 !\0\v AtAj"@ \0  \xFC
\0\0\v\f\v0\0\v\v\v \0 \0 \xA3\v\x9F\x07\x7F#\0A\xF0k"$\0 A\xECj"\0 $ \0=!
( ,\0\v"\0 \0A\0H"\0\x1B@ (\0  \0\x1B(\0
A-
(\0(,\0F!\x07\v A\x006\xD8 B\x007\xD0 A\x006\xC8 B\x007\xC0 A\x006\xB8 B\x007\xB0  \x07 A\xECj A\xE8j A\xE4j A\xE0j A\xD0j A\xC0j A\xB0j A\xACj\xF9@\x7F\x7F ("\v ,\0\v"\b \bA\0H\x1B"\0 (\xAC" J@ \0 kAtj (\xB4 ,\0\xBB"\0 \0A\0H\x1Bj (\xC4 ,\0\xCB"\0 \0A\0H\x1BjAj\f\v (\xB4 ,\0\xBB"\0 \0A\0H\x1Bj (\xC4 ,\0\xCB"\0 \0A\0H\x1BjAj\v"\0A\xE5\0I@A\0! Aj\f\v \0At/"E\r -\0\v!\b (!\v \v"\0 A\fj A\bj ( (\0  \b\xC0A\0H"\x1B"\f \f \v \b \x1BAtj
\x07 A\xE8j (\xE4 (\xE0 A\xD0j" A\xC0j"\x07 A\xB0j"\b \xF8  \0 (\f (\b  \\ ! \b  \x07    (\xEC# A\xF0j$\0\v0\0\v\xE4\b\x7F#\0A\xA0\bk"\0$\0 \0 7 \0 7 \0 \0A\xB0\x07j"\x076\xAC\x07 \0A\x90j! @ \x07A\xE3 \0Aje"\x07A\xE4\0O@*!\x07 \0 7\0 \0 7\b \0A\xAC\x07j \x07A\xE3 \0P"\x07A\x7FF\r \0(\xAC\x07!\r \x07At/"\v! \vE\r\v \0A\x8Cj"\b $ \b=" \0(\xAC\x07"\b \x07 \bj (\0(0\0 \x07A\0J@ \0(\xAC\x07-\0\0A-F!
\v \0A\x006\xF8 \0B\x007\xF0 \0A\x006\xE8 \0B\x007\xE0 \0A\x006\xD8 \0B\x007\xD0 
\0A\x8Cj \0A\x88j \0A\x84j \0A\x80j \0A\xF0j \0A\xE0j \0A\xD0j \0A\xCCj\xF9@\x7F \0(\xCC"\b \x07H@ \b \x07 \bkAtj \0(\xD4 \0,\0\xDB" A\0H\x1Bj \0(\xE4 \0,\0\xEB" A\0H\x1BjAj\f\v \b \0(\xD4 \0,\0\xDB" A\0H\x1Bj \0(\xE4 \0,\0\xEB" A\0H\x1BjAj\v"A\xE5\0I@ \0A0j!\f\v At/"\f! \fE\r\v  \0A,j \0A(j ( \x07Atj 
\0A\x88j \0(\x84 \0(\x80 \0A\xF0j"
\0A\xE0j"\x07 \0A\xD0j" \b\xF8   \0(, \0((  \\ \f!   \x07 
  \0(\x8C# \v! \r! \0A\xA0\bj$\0\v0\0\v\x99\x07\x7F#\0A\xB0k"$\0 A\xACj"\0 $ \0>!
( ,\0\v"\0 \0A\0H"\0\x1B@ (\0  \0\x1B-\0\0
A-
(\0(\0A\xFFqF!\x07\v A\x006\xA0 B\x007\x98 A\x006\x90 B\x007\x88 A\x006\x80 B\x007x  \x07 A\xACj A\xA8j A\xA7j A\xA6j A\x98j A\x88j A\xF8\0j A\xF4\0j\xFC@\x7F\x7F ("\v ,\0\v"\b \bA\0H\x1B"\0 (t" J@ \0 kAtj (| ,\0\x83"\0 \0A\0H\x1Bj (\x8C ,\0\x93"\0 \0A\0H\x1BjAj\f\v (| ,\0\x83"\0 \0A\0H\x1Bj (\x8C ,\0\x93"\0 \0A\0H\x1BjAj\v"\0A\xE5\0I@A\0! Aj\f\v \0/"E\r -\0\v!\b (!\v \v"\0 A\fj A\bj ( (\0  \b\xC0A\0H"\x1B"\f \f \v \b \x1Bj
\x07 A\xA8j ,\0\xA7 ,\0\xA6 A\x98j" A\x88j"\x07 A\xF8\0j"\b \xFB  \0 (\f (\b  Z ! \b  \x07    (\xAC# A\xB0j$\0\v0\0\v\xDB\b\x7F#\0A\xB0k"\0$\0 \0 7 \0 7 \0 \0A\xC0j"\x076\xBC \0A\xD0j! @ \x07A\xE3 \0Aje"\x07A\xE4\0O@*!\x07 \0 7\0 \0 7\b \0A\xBCj \x07A\xE3 \0P"\x07A\x7FF\r \0(\xBC!\r \x07/"\v! \vE\r\v \0A\xCCj"\b $ \b>" \0(\xBC"\b \x07 \bj (\0( \0 \x07A\0J@ \0(\xBC-\0\0A-F!
\v \0A\x006\xC0 \0B\x007\xB8 \0A\x006\xB0 \0B\x007\xA8 \0A\x006\xA0 \0B\x007\x98 
\0A\xCCj \0A\xC8j \0A\xC7j \0A\xC6j \0A\xB8j \0A\xA8j \0A\x98j \0A\x94j\xFC@\x7F \0(\x94"\b \x07H@ \b \x07 \bkAtj \0(\x9C \0,\0\xA3" A\0H\x1Bj \0(\xAC \0,\0\xB3" A\0H\x1BjAj\f\v \b \0(\x9C \0,\0\xA3" A\0H\x1Bj \0(\xAC \0,\0\xB3" A\0H\x1BjAj\v"A\xE5\0I@ \0A0j!\f\v /"\f! \fE\r\v  \0A,j \0A(j ( \x07 j 
\0A\xC8j \0,\0\xC7 \0,\0\xC6 \0A\xB8j"
\0A\xA8j"\x07 \0A\x98j" \b\xFB   \0(, \0((  Z \f!   \x07 
  \0(\xCC# \v! \r! \0A\xB0j$\0\v0\0\v\xC0\x7F#\0A\xC0k"\0$\0 \0 6\xB8 \0 6\xBC \0A\xE3\x006 \0 \0A j6 \0Aj"\x07 $ \x07=! \0A\0:\0 \0A\xBCj   \x07 (  \0Aj  \0Aj \0Aj \0A\xB0j\x80@@ ,\0\vA\0H@ (\0A\x006\0 A\x006\f\v A\0:\0\v A\x006\0\v \0-\0AF@  A- (\0(,\0\xDD\v A0 (\0(,\0! \0("Ak! \0(!@@  O\r\0 (\0 G\r\0 Aj!\f\v\v#\0Ak"$\0@  F\r\0 ,\0\v! (\b!\b (!\x07  (\0  ,\0\v" A\0H"
\x1B"\vO  \v (
\x1BAtjAjIqE@ \x07  A\0H" \x1B"  k"Au"
j!\x07
\bA\xFF\xFF\xFF\xFF\x07qAkA \x1B"\b kK@  \b \x07 \bk  \xFF\v At (\0  ,\0\vA\0H\x1Bj! @   \xFC
\0\0\v  jA\x006\0 ,\0\vA\0H@  \x076\f\v  \x07A\xFF\0q:\0\v\f\v Aj"\x07  \xA2 ( \x07 ,\0"A\0H"
\x1B!@ (\b 
\x1B" (\bA\xFF\xFF\xFF\xFF\x07qAkA ,\0\v"\bA\0H"\x1B" ( \b \x1B"kM@ E\r (\0  \bA\0H\x1B!\b At" @ \b Atj  \xFC
\0\0\v  j!@ ,\0\vA\0H@  6\f\v  A\xFF\0q:\0\v\v \b AtjA\x006\0\f\v   j k  A\0  \xDE\v \x07 \v Aj$\0\v \0A\xBCj \0A\xB8j(@  (\0Ar6\0\v \0(\xBC \0(# \0(! \0A\x006 @  \0(\0\v \0A\xC0j$\0\v\xDD\x7F#\0A\xF0k"\x07$\0 \x07 6\xE8 \x07 6\xEC \x07A\xE3\x006\xCC \x07 \x07A\xD0j6\xC8 \x07A\xC0j" $ =!\0 \x07A\0:\0\xBF@ \x07A\xECj    (  \x07A\xBFj \0 \x07A\xC8j \x07A\xC4j \x07A\xE0j\x80E\r\0 \x07A\xEE\x1B(\0\x006\0\xB7 \x07A\xE7\x1B)\0\x007\xB0 \0 \x07A\xB0j \x07A\xBAj \x07A\x80j \0(\0(0\0 \x07Aj!\0@ \x07(\xC4" \x07(\xC8"k"A\x89N@ AvAj/"\0!\b \0E\r\v \0! \x07-\0\xBFAF@ \0A-:\0\0 \0Aj!\v \x07A\xA8j!@  M@@ A\0:\0\0 \x07 6\0 \0 \x07\xA7AG\r\0 \b!\f\v  \x07A\xB0j \x07A\x80j"  \xB1 kAuj-\0\0:\0\0 Aj! Aj! \x07(\xC4!\f\v\v0\0\v0\0\v \x07A\xECj \x07A\xE8j(@  (\0Ar6\0\v \x07(\xEC \x07(\xC0# \x07(\xC8!\0 \x07A\x006\xC8 \0@ \0 \x07(\xCC\0\v \x07A\xF0j$\0\v\xAE\x7F#\0A\x90k"\0$\0 \0 6\x88 \0 6\x8C \0A\xE3\x006 \0 \0A j6 \0Aj"\x07 $ \x07>! \0A\0:\0 \0A\x8Cj   \x07 (  \0Aj  \0Aj \0Aj \0A\x84j\x85@@ ,\0\vA\0H@ (\0A\0:\0\0 A\x006\f\v A\0:\0\v A\0:\0\0\v \0-\0AF@  A- (\0(\0\xAA\v A0 (\0(\0 \0("Ak! \0(!A\xFFq!@@  O\r\0 -\0\0 G\r\0 Aj!\f\v\v#\0Ak"$\0@  F\r\0 ,\0\v! (\b!\b (!\x07  (\0  ,\0\v" A\0H"
\x1B"\vO  \v (
\x1BjAjIqE@ \x07  A\0H" \x1B"  k"j!\x07  \bA\xFF\xFF\xFF\xFF\x07qAkA
\x1B"\b kK@  \b \x07 \bk  \xA4\v (\0  ,\0\vA\0H\x1B j! @   \xFC
\0\0\v  jA\0:\0\0 ,\0\vA\0H@  \x076\f\v  \x07A\xFF\0q:\0\v\f\v Aj"\x07  \xCE ( \x07 ,\0"A\0H"
\x1B!@ (\b 
\x1B" (\bA\xFF\xFF\xFF\xFF\x07qAkA
,\0\v"\bA\0H"\x1B" ( \b \x1B"kM@ E\r (\0  \bA\0H\x1B!\b @  \bj  \xFC
\0\0\v  j!@ ,\0\vA\0H@  6\f\v  A\xFF\0q:\0\v\v  \bjA\0:\0\0\f\v   j k  A\0  \x89\v \x07 \v Aj$\0\v \0A\x8Cj \0A\x88j)@  (\0Ar6\0\v \0(\x8C \0(# \0(! \0A\x006 @  \0(\0\v \0A\x90j$\0\v\xD1\x7F#\0A\x90k"\x07$\0 \x07 6\x88 \x07 6\x8C \x07A\xE3\x006\x9C \x07 \x07A\xA0j6\x98 \x07A\x90j" $ >!\0 \x07A\0:\0\x8F@ \x07A\x8Cj    (  \x07A\x8Fj \0 \x07A\x98j \x07A\x94j \x07A\x84j\x85E\r\0 \x07A\xEE\x1B(\0\x006\0\x87 \x07A\xE7\x1B)\0\x007\x80 \0 \x07A\x80j \x07A\x8Aj \x07A\xF6\0j \0(\0( \0 \x07Aj!\0@ \x07(\x94" \x07(\x98"k"A\xE3\0N@ Aj/"\0!\b \0E\r\v \0! \x07-\0\x8FAF@ \0A-:\0\0 \0Aj!\v \x07A\x80j!@  M@@ A\0:\0\0 \x07 6\0 \0 \x07\xA7AG\r\0 \b!\f\v  \x07A\xF6\0j  \xB4 \x07k \x07j-\0
:\0\0 Aj! Aj! \x07(\x94!\f\v\v0\0\v0\0\v \x07A\x8Cj \x07A\x88j)@  (\0Ar6\0\v \x07(\x8C \x07(\x90# \x07(\x98!\0 \x07A\x006\x98 \0@ \0 \x07(\x9C\0\v \x07A\x90j$\0\v\0A\xFC \v\xC7\x7F#\0A\xA0k"\b$\0 \b \bA\xA0j"6\f#\0A\x90k"\x07$\0 \x07 \x07A\x84j6 \0A\bj \x07A j" \x07Aj   \x88 \x07B\x007 \x07 6\f \b(\f \bAj"kAu! \0(\b!\0#\0Ak"$\0  \0H6\f  \x07A\fj  \x07Aj\xA4!\0 A\fjI Aj$\0 \0A\x7FF@0\0\v \b  \0Atj6\f \x07A\x90j$\0 \b(\f!\0#\0Ak"$\0#\0Ak"$\0#\0Ak"$\0  6\f@ \0 G@ A\fj (\0\xBE Aj!\f\v\v  6\b  (\f6\f Aj$\0  )\b7\b Aj$\0 (\f Aj$\0 $\0\v\xB8\0#\0A\x80k"$\0  A\xF4\0j6\f \0A\bj Aj" A\fj   \x88 (\f!\0#\0Ak"$\0#\0Ak"$\0#\0Ak"$\0  6\f@ \0 G@ A\fj ,\0\0\xC0 Aj!\f\v\v  6\b  (\f6\f Aj$\0  )\b7\b Aj$\0 (\f Aj$\0 A\x80j$\0\v\xB8\r\x7F#\0A0k"\x07$\0 \x07 6, A\x006\0 \x07 $ \x07=!\b \x07(\0#\x7F@@@@@@@@@@@@@@@@@@@@@@@@@@ A\xC1\0k9\0\x07
\0\b \v\f\r\v\v \0 Aj \x07A,j   \b\x8B\f\v \0 Aj \x07A,j   \b\x8A\f\v \0A\bj \0(\b(\f\0\0! \x07 \0 \x07(,     (\0  ,\0\v"\0A\0H"\x1B"  ( \0 \x1BAtjV6,\f\v \x07A,j   \bAN!\0@ (\0"Aq \0AkAKrE@  \x006\f\f\v  Ar6\0\v\f\v \x07A\xA8\x86)\x007 \x07A\xA0\x86)\x007 \x07A\x98\x86)\x007\b \x07A\x90\x86)\x007\0 \x07 \0      \x07 \x07A jV6,\f\v \x07A\xC8\x86)\x007 \x07A\xC0\x86)\x007 \x07A\xB8\x86)\x007\b \x07A\xB0\x86)\x007\0 \x07 \0      \x07 \x07A jV6,\f\v \x07A,j   \bAN!\0@ (\0"Aq \0AJrE@  \x006\b\f\v  Ar6\0\v\f\v \x07A,j   \bAN!\0@ (\0"Aq \0AkA\vKrE@  \x006\b\f\v  Ar6\0\v\f\v \x07A,j   \bAN!\0@ (\0"Aq \0A\xEDJrE@  \x006\f\v  Ar6\0\v\f\v \x07A,j   \bAN!\0@ (\0"Aq \0Ak"\0A\vKrE@  \x006\f\v  Ar6\0\v\f\v \x07A,j   \bAN!\0@ (\0"Aq \0A;JrE@  \x006\f\v  Ar6\0\v\f\v \x07A,j!\0#\0Ak"$\0  6\f@@ \0 A\fj(\r\0 \bA \0: \b(\0(\f\0E\r\0 \0Q\f\v\v \0 A\fj(@  (\0Ar6\0\v Aj$\0\f\r\v \x07A,j!@ \0A\bj \0(\b(\b\0\0"\0( \0,\0\v" A\0H\x1BA\0 \0( \0,\0" A\0H\x1BkF@  (\0Ar6\0\f\v   \0 \0Aj \b A\0\x95" \0G (\b"A\fGrE@ A\x006\b\f\v  \0kA\fG A\vJrE@  A\fj6\b\v\v\f\f\v \x07A\xD0\x86A,\xFC
\0\0 \x07 \0      \x07 \x07A,jV6,\f\v\v \x07A\x90\x87(\x006 \x07A\x88\x87)\x007\b \x07A\x80\x87)\x007\0 \x07 \0      \x07 \x07AjV6,\f
\v \x07A,j   \bAN!\0@ (\0"Aq \0A<JrE@  \x006\0\f\v  Ar6\0\v\f \v \x07A\xB8\x87)\x007 \x07A\xB0\x87)\x007 \x07A\xA8\x87)\x007\b \x07A\xA0\x87)\x007\0 \x07 \0      \x07 \x07A jV6,\f\b\v \x07A,j   \bAN!\0@ (\0"Aq \0AJrE@  \x006\f\v  Ar6\0\v\f\x07\v \0      \0(\0(\0\f\x07\v \0A\bj \0(\b(\0\0! \x07 \0 \x07(,     (\0  ,\0\v"\0A\0H"\x1B"  ( \0 \x1BAtjV6,\f\v Aj \x07A,j   \b\x89\f\v \x07A,j   \bAN!\0 -\0\0AqE@  \0A\xECk6\v\f\v A%F\r\v  (\0Ar6\0\f\v#\0Ak"\0$\0 \0 6\f@ \x7FA \x07A,j" \0A\fj"(\r\0A \b :A\0 \b(\0(4\0A%G\r\0 Q (E\rA\v (\0r6\0\v \0Aj$\0\v \x07(,\v \x07A0j$\0\v \0  \0\0\0\vK\x7F#\0Ak"$\0  6\f A\bj" $ =! (\b# Aj A\fj   \x89 (\f Aj$\0\vM\x7F#\0Ak"$\0  6\f A\bj" $ =! (\b# \0 Aj A\fj   \x8A (\f Aj$\0\vM\x7F#\0Ak"$\0  6\f A\bj" $ =! (\b# \0 Aj A\fj   \x8B (\f Aj$\0\vF\0 \0      \0A\bj \0(\b(\0\0"\0(\0 \0 \0,\0\v"A\0H"\x1B"  \0(  \x1BAtjV\vX\x7F#\0A k"$\0 A\xB8\x87)\x007 A\xB0\x87)\x007 A\xA8\x87)\x007\b A\xA0\x87)\x007\0 \0       A j"V $\0\v\xDB\f\x7F#\0Ak"\x07$\0 \x07 6\f A\x006\0 \x07 $ \x07>!\b \x07(\0#\x7F@@@@@@@@@@@@@@@@@@@@@@@@@@ A\xC1\0k9\0\x07
\0\b \v\f\r\v\v \0 Aj \x07A\fj   \b\x8E\f\v \0 Aj \x07A\fj   \b\x8D\f\v \0A\bj \0(\b(\f\0\0! \x07 \0 \x07(\f     (\0  ,\0\v"\0A\0H"\x1B"  ( \0 \x1BjW6\f\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0AkAKrE@  \x006\f\f\v  Ar6\0\v\f\v \x07B\xA5\xDA\xBD\xA9\xC2\xEC\xCB\x92\xF9\x007\0 \x07 \0      \x07 \x07A\bjW6\f\f\v \x07B\xA5\xB2\xB5\xA9\xD2\xAD\xCB\x92\xE4\x007\0 \x07 \0      \x07 \x07A\bjW6\f\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0AJrE@  \x006\b\f\v  Ar6\0\v\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0AkA\vKrE@  \x006\b\f\v  Ar6\0\v\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0A\xEDJrE@  \x006\f\v  Ar6\0\v\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0Ak"\0A\vKrE@  \x006\f\v  Ar6\0\v\f\v \x07A\fj   \bAO!\0@ (\0"Aq \0A;JrE@  \x006\f\v  Ar6\0\v\f\v \x07A\fj!\0#\0Ak"$\0  6\f@@ \0 A\fj)\r\0 \0;"A\0H\r\0 \b(\b Atj-\0\0AqE\r\0 \0S\f\v\v \0 A\fj)@  (\0Ar6\0\v Aj$\0\f\r\v \x07A\fj!@ \0A\bj \0(\b(\b\0\0"\0( \0,\0\v" A\0H\x1BA\0 \0( \0,\0" A\0H\x1BkF@  (\0Ar6\0\f\v   \0 \0Aj \b A\0\x97" \0G (\b"A\fGrE@ A\x006\b\f\v  \0kA\fG A\vJrE@  A\fj6\b\v\v\f\f\v \x07A\xF8\x85(\0\x006\0\x07 \x07A\xF1\x85)\0\x007\0 \x07 \0      \x07 \x07A\vjW6\f\f\v\v \x07A\x80\x86-\0\0:\0 \x07A\xFC\x85(\0\x006\0 \x07 \0      \x07 \x07AjW6\f\f
\v \x07A\fj   \bAO!\0@ (\0"Aq \0A<JrE@  \x006\0\f\v  Ar6\0\v\f \v \x07B\xA5\x90\xE9\xA9\xD2\xC9\xCE\x92\xD3\x007\0 \x07 \0      \x07 \x07A\bjW6\f\f\b\v \x07A\fj   \bAO!\0@ (\0"Aq \0AJrE@  \x006\f\v  Ar6\0\v\f\x07\v \0      \0(\0(\0\f\x07\v \0A\bj \0(\b(\0\0! \x07 \0 \x07(\f     (\0  ,\0\v"\0A\0H"\x1B"  ( \0 \x1BjW6\f\f\v Aj \x07A\fj   \b\x8C\f\v \x07A\fj   \bAO!\0 -\0\0AqE@  \0A\xECk6\v\f\v A%F\r\v  (\0Ar6\0\f\v#\0Ak"\0$\0 \0 6\f@ \x7FA \x07A\fj" \0A\fj")\r\0A \b ;A\0 \b(\0($\0A%G\r\0 S )E\rA\v (\0r6\0\v \0Aj$\0\v \x07(\f\v \x07Aj$\0\v\x9B\x7F#\0A\xE0\0k"$\0 A\fj"   (\0 \0\b\0A\xD4\09"\0 -\0\b:\0\b \0 )\x007\0 \0A\fj A\fjb \0Aj Ajb \0A$j A$jb \0A0j A0jb \0A<j A<jb \0A\xC8\0j A\xC8\0jb \xC7 A\xE0\0j$\0 \0\vK\x7F#\0Ak"$\0  6\f A\bj" $ >! (\b# Aj A\fj   \x8C (\f Aj$\0\vM\x7F#\0Ak"$\0  6\f A\bj" $ >! (\b# \0 Aj A\fj   \x8D (\f Aj$\0\vM\x7F#\0Ak"$\0  6\f A\bj" $ >! (\b# \0 Aj A\fj   \x8E (\f Aj$\0\vC\0 \0      \0A\bj \0(\b(\0\0"\0(\0 \0 \0,\0\v"A\0H"\x1B"  \0(  \x1BjW\v;\x7F#\0Ak"$\0 B\xA5\x90\xE9\xA9\xD2\xC9\xCE\x92\xD3\x007\b \0      A\bj Aj"W $\0\v+\x7F  ("A\xB5\xFB~qA\x88r6    \x91  6\v\xB7\x07\x7F\x7F#\0A\x90k"\0$\0 \0B%7\x88 \0A\x88j"\x07ArA\x82 (\x91!\b \0 \0A\xE0j" 6\xDC*!@\x7F@\x7F@ \b@ (\b!\b \0 70 \0 7( \0 \b6  \x07 \0A j]"AJ\r\f\v \0 7P \0 7X \0A\xE0j  \0A\x88j"\x07 \0A\xD0\0j]"AL\r*! \0 7@ \0 7H \0A\xDCj  \x07 \0A@kP\f\v*! (\b!\x07 \0 7 \0 7\b \0 \x076\0 \0A\xDCj  \0A\x88j \0P\v"A\x7FF\r \0(\xDC\f\vA\0\v \0(\xDC"\x07  \x07j"
G!\v@ \0A\xE0j \x07F@ \0A\xF0\0j!A\0!\b\f\v At/"\b! \bE\r\v \0A\xE4\0j"\f $ \x07 \v
 \0A\xEC\0j \0A\xE8\0j \f\x90 \0(d#   \0(l \0(h  \\! \b!! \0A\x90j$\0 \f\v0\0\v\v\x9A\x07\x7F\x7F#\0A\xF0k"\0$\0 \0B%7\xE8 \0A\xE8j"ArA\xD7 (\x91!\x07 \0 \0A\xC0j"\b6\xBC*!@\x7F@\x7F@ \x07@ (\b!\x07 \0 9 \0 \x076 \b   \0Aj]"AJ\r\f\v \0 90 \0A\xC0j  \0A\xE8j" \0A0j]"AL\r*! \0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0A@kP\f\v*! (\b!\x07 \0 7 \0 7\b \0 \x076\0 \0A\xACj  \0A\xD8j \0P\v"A\x7FF\r \0(\xAC\f\vA\0\v \0(\xAC"\x07  \x07j"
G!\v@ \0A\xB0j \x07F@ \0A\xF0\0j!A\0!\b\f\v At/"\b! \bE\r\v \0A\xE4\0j"\f $ \x07 \v
 \0A\xEC\0j \0A\xE8\0j \f\x93 \0(d#   \0(l \0(h  Z! \b!! \0A\xE0j$\0 \f\v0\0\v\v\x9A\x07\x7F\x7F#\0A\xC0k"\0$\0 \0B%7\xB8 \0A\xB8j"ArA\xD7 (\x91!\x07 \0 \0A\x90j"\b6\x8C*!@\x7F@\x7F@ \x07@ (\b!\x07 \0 9 \0 \x076 \b   \0Aj]"AJ\r\f\v \0 90 \0A\x90j  \0A\xB8j" \0A0j]"AL\r*! \0 9 \0A\x8Cj   \0A jP\f\v*! (\b! \0 9\b \0 6\0 \0A\x8Cj  \0A\xB8j \0P\v"A\x7FF\r \0(\x8C\f\vA\0\v \0(\x8C"  j" G!
@ \0A\x90j F@ \0A\xD0\0j!A\0!\x07\f\v At/"\x07! \x07E\r\v \0A\xC4\0j"\v $ 
 \0A\xCC\0j \0A\xC8\0j \v\x93 \0(D#   \0(L \0(H  Z! \x07!! \0A\xC0j$\0 \f\v0\0\v\v\xC3\x7F#\0A\xF0\0k"\0$\0A\bAA
("A\xCA\0q"\x07A\bF\x1B \x07A\xC0\0F"\b\x1B! \0A\xD0\0j!@ A\x80qE Pr\r\0 \b@ \0A0:\0P Ar!\f\v \x07A\bG\r\0 \0A0:\0P \0A\xD8\0A\xF8\0 A\x80\x80q\x1B:\0Q \0A\xD0\0jAr!\v \0A\xC8\0j  \0A\xE8\0j  \x92 \0(H!\x07@ A\x88\x80qA\x88\x80G\r\0@  \x07F\r  -\0\0"A k  A\xE1\0kA\xFFqAI\x1B:\0\0 Aj!\f\0\v\0\v \0A\xD0\0j" \x07 G! \0Aj"\b $   \x07 \0Aj" \0A\fj \0A\bj \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CC   \0A\xB4j \0A\bj \0(\xC4 \0A\xC4j \0Aj \0A\fj m\r\0 \0(\xCCB\f\v\v@ \0(\xC8 \0,\0\xCF" A\0H\x1BE\r\0 \0(\f" \0AjkA\x9FJ\r\0 \0 Aj6\f  \0(\b6\0\v   \0(\xB4  \xA16\0 \0A\xC4j \0Aj \0(\f 5 \0A\xCCj \0A\xC8j(@  (\0Ar6\0\v \0(\xCC \0A\xB8j  \0A\xC4j  \0A\xD0j$\0\v\x99\x8B.\x7F}|#\0Ak"$\0  6\f A\x006\b B\x007\0    j"  k\xC2#\0A\xE0\0k"%$\0 %A\bj! (\0"! ( k!#\0A\xC0k"$\0 A\x006\xA0 B\x007\x98 A\x006\xB0 B\x007\xA8 A\xB4j"A\x006\b B\x007\0 A\x80\xC0\0\xB6 A\x80\xC0\0\x96 A\fjA\0A0\xFC\v\0  6\b  6@\x7F Aj!\v\x7FAzA\x94-\0\0A1G\r\0A~ \vE\r \vA\x006 \v( "E@ \vA\x006( \vA/6 A/!\v \v($E@ \vA06$\vA| \v((AA\xD07 \0"E\r \v 6 A\x0068  \v6\0 A\xB4\xFE\x006A~!@ \vE\r\0 \v( E\r\0 \v($"E\r\0 \v("E\r\0 (\0 \vG\r\0 (A\xB4\xFE\0kAK\r\0@@ (8"@ ((AG\r\v A6( A6\f\f\v \v((  \0 A\x0068 \v( A6( A6\fE\r\v \v($E\r\0 \v("E\r\0 (\0 \vG\r\0 (A\xB4\xFE\0kAK\r\0A\0! A\x0064 B\x007, A\x006 \vA\x006\b \vB\x007 (\f"@ \v Aq60\v B\x007< A\x006$ A\x80\x806 B\x80\x80\x80\x80p7 B\xB4\xFE\x007 B\x81\x80\x80\x80p7\xC47  A\xB4
j"6p  6T  6P\vA\0 E\r\0 \v((  \v($\0 \vA\x006 \v\vE@ A\x006\xAC@@  (\0"6  ( k6A\0!\v#\0Ak"$\0A~!\x1B@ Aj"\rE\r\0 \r( E\r\0 \r($E\r\0 \r("\x07E\r\0 \x07(\0 \rG\r\0 \x07("A\xB4\xFE\0kAK\r\0 \r(\f"E\r\0 \r(\0"E@ \r(\r\v A\xBF\xFE\0F@ \x07A\xC0\xFE\x006A\xC0\xFE\0!\v \x07A\xDC\0j!- \x07A\xF2\0j!. \x07A\xF4j!" \x07A\xD8\0j!& \x07A\xF0\0j!# \x07A\xB4
j! \x07A\xF4\0j! \x07(@! \x07(<! \r("'! \r("!@@@@@@A}!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ A\xB4\xFE\0k\x07
\r9:;<%&(\0*@BCD\v \x07(L! \f(\v \x07(L! \f%\v \x07(l! \f!\v \x07(\f!\f9\v AO\r E\r< A\bj! Aj! Ak! -\0\0 t j! AM\r ! ! !\f\v A O\r E\r; Aj! Ak! -\0\0 t j! AM\r\r ! !\f\v AO\r E\r: A\bj! Aj! Ak! -\0\0 t j! A\x07M\r ! ! !\f\v \x07(\f"
E\r@ AO\r\0 E\r: A\bj! Aj! Ak! -\0\0 t j! A\x07K@ ! ! !\f\v E@ !A\0! ! \v!\f<\v Ar! Ak! -\0 t j! Aj!\v
AqE A\x9F\x96GrE@ \x07((E@ \x07A6(\vA\0! \x07A\0A\0A\0D"6 A\x9F\x96;\f  A\fjAD! \x07A\xB5\xFE\x006 \x07 6A\0! \x07(!\f7\v \x07($"@ A\x7F60\v A\btA\x80\xFEq A\bvjApE
AqqE@ \rA\xD96 \x07A\xD1\xFE\x006 \x07(!\f7\v AqA\bG@ \rA\xBA6 \x07A\xD1\xFE\x006 \x07(!\f7\v Av"Aq" A\bj!
A\x07M \x07(("\x7F  \x07
6(
\v
OqE@ Ak! \rA\xF46 \x07A\xD1\xFE\x006 ! \x07(!\f7\vA\0! \x07A\x006 \x07A\x80 t6 \x07A\0A\0A\0\x82"6 \r 60 \x07A\xBD\xFE\0A\xBF\xFE\0 A\x80\xC0\0q\x1B6A\0! \x07(!\f6\v E@ !A\0! ! \v!\f:\v Ar! Ak! -\0 t j! Aj!\v \x07 6 A\xFFqA\bG@ \rA\xBA6 \x07A\xD1\xFE\x006 \x07(!\f5\v A\x80\xC0q@ \rA\x90
6 \x07A\xD1\xFE\x006 \x07(!\f5\v \x07($"@  A\bvAq6\0\v@ A\x80qE\r\0 \x07-\0\fAqE\r\0 A\b:\0\f  A\bv:\0\r \x07 \x07( A\fjAD6\v \x07A\xB6\xFE\x006A\0!A\0!\f\v AK\r\v E\r5 Aj! Ak! -\0\0 t j! AK@ ! !\f\v A\bj! E@ !A\0! ! \v!\f7\v Aj! Ak! -\0 t j! AK@ ! !\f\v Aj! E@ !A\0! ! \v!\f7\v Aj! Ak! -\0 t j! A\x07K@ ! !\f\v Aj! E@ !\f6\v Ak! -\0 t j! Aj!\v \x07($"@  6\v@ \x07-\0AqE\r\0 \x07-\0\fAqE\r\0  6\f \x07 \x07( A\fjAD6\v \x07A\xB7\xFE\x006A\0!A\0!\f\v AK\r\v E\r2 Aj! Ak! -\0\0 t j! A\x07K@ ! !\f\v A\bj! E@ !\f3\v Ak! -\0 t j! Aj!\v \x07($"@  A\bv6\f  A\xFFq6\b\v@ \x07-\0AqE\r\0 \x07-\0\fAqE\r\0  ;\f \x07 \x07( A\fjAD6\v \x07A\xB8\xFE\x006A\0!A\0!A\0! \x07("A\x80\bq\r\f'\v \x07("A\x80\bqE@ !\f'\v ! AK\r\v E@A\0! ! \v!\f1\v Aj! Ak!
-\0\0 t j! A\x07K@ !
!\f\v A\bj!
E@ !\f0\v Ak! -\0 t j! Aj!\v \x07 6D \x07($"@  6\vA\0!@ A\x80qE\r\0 \x07-\0\fAqE\r\0  ;\f \x07 \x07( A\fjAD6\vA\0!\f%\v A\bj! E@ !A\0! ! \v!\f/\v Aj! Ak! -\0 t j! AK@ ! !\f\v Aj! E@ !A\0! ! \v!\f/\v Aj! Ak! -\0 t j! A\x07K@ ! !\f\v Aj! E@ !\f.\v Ak! -\0 t j! Aj!\v \x07 AxA\xFF\x81\xFC\x07q A\xFF\x81\xFC\x07qA\bxr"6 \r 60 \x07A\xBE\xFE\x006A\0!A\0!\v \x07(E@ \r 6 \r 6\f \r 6 \r 6\0 \x07 6@ \x07 6<A!\x1B\f/\v \x07A\0A\0A\0\x82"6 \r 60 \x07A\xBF\xFE\x006\v\x7F@ \x07(\bE@  AK\r \r\f-\v \x07A\xCE\xFE\x006  A\x07qv! Axq! \x07(!\f)\v Ak! -\0\0 t j! Aj! A\br\v \x07 Aq6\bA\xC1\xFE\0!@@@@@ AvAqAk\0\v \x07A\x90\xDC\x006P \x07B\x89\x80\x80\x80\xD0\x007X \x07A\x90\xEC\x006T \x07A\xC7\xFE\x006\f\vA\xC4\xFE\0!\f\v \rA\x976A\xD1\xFE\0!\v \x07 6\vAk! Av! \x07(!\f'\v  A\x07qv!\x7F Axq"\b AK\r\0 E@A\0! \b! \v!\f,\v \bA\bj! Aj! Ak! -\0\0 \bt j! AK@ ! ! \f\v E@ !A\0! ! \v!\f,\v \bAj!
Aj! Ak! -\0 t j! AK@ ! !
\f\v E@ !A\0!
! \v!\f,\v \bAj! Aj! Ak! -\0
t j! A\x07K@ ! ! \f\v E@ !A\0! ! \v!\f,\v Ak! -\0 t j! Aj!A \v! A\xFF\xFFq" A\x7FsAvG@ \rA\xC2\v6 \x07A\xD1\xFE\x006 \x07(!\f'\v \x07A\xC2\xFE\x006 \x07 6DA\0!A\0!\v \x07A\xC3\xFE\x006\v \x07(D"@    I\x1B"   I\x1B"E@ \v!\f*\v @   \xFC
\0\0\v \x07 \x07(D k6D  j!  k!  j!  k! \x07(!\f%\v \x07A\xBF\xFE\x006 \x07(!\f$\v E@ !A\0! ! \v!\f(\v Ar! Ak! -\0 t j! Aj!\v \x07 Aq"A\x81j6d \x07 AvAq"Aj6h \x07 A
vAqAj"
6\` Ak! Av! AI AMqE@ \rA\x9E\v6 \x07A\xD1\xFE\x006 \x07(!\f#\v \x07A\xC5\xFE\x006A\0! \x07A\x006l\f\v \x07(l" \x07(\`"
I\r\f\v E\r\r  \x07(D:\0\0 \x07A\xC8\xFE\x006 Ak! Aj! \x07(!\f \v \x07(\f"E@A\0!\f\v@ AK@ ! \f\v E\r# A\bj! Aj! Ak!
-\0\0 t j! AK@
! !\f\v
E@ !A\0! ! \v!\f%\v Aj!
Aj! Ak!\b -\0 t j! AK@ \b!
!\f\v \bE@ !A\0!
! \v!\f%\v Aj! Aj! Ak!\b -\0
t j! A\x07K@ \b! !\f\v \bE@ !A\0! ! \v!\f%\v A r! Aj! Ak! -\0 t j!\v \r  k"
\r(j6 \x07 \x07(
j6 Aq"E  Fr\x7F  
k! \x07(! \x07\x7F \x07(@  
D\f\v  
\x82\v"6 \r 60 \x07(\f"Aq\vE\r \x07(  AxA\xFF\x81\xFC\x07q A\xFF\x81\xFC\x07qA\bxr \x07(\x1BF\r \rA\x876 \x07A\xD1\xFE\x006 ! ! \x07(!\f\v \x07A\xC0\xFE\x006\f\v !A\0!A\0! !\v \x07A\xCF\xFE\x006\f\x1B\v@ AM@ E\r Ak! -\0\0 t j! A\br! Aj!\v \x07 Aj"6l  At/\xE0[Atj A\x07q;\0 Ak! Av! "
G\r\0\v
!\v AM@A\0! "Aq"\vAG@@  At/\xE0[AtjA\0;\0 Aj! \v Aj" sAG\r\0\v\v AM@@  At"A\xE0\xDB\0j/\0AtjA\0;\0  A\xE2\xDB\0j/\0AtjA\0;\0  A\xE4\xDB\0j/\0AtjA\0;\0  A\xE6\xDB\0j/\0AtjA\0;\0 Aj"AG\r\0\v\v \x07A6l\v \x07A\x076X \x07 6P \x07 6pA\0! A\0 A # & "\xA2"\v@ \rA\xF7 6 \x07A\xD1\xFE\x006 \x07(!\f\x1B\v \x07A\xC6\xFE\x006 \x07A\x006lA\0!\v\v \x07(d" \x07(hj" K@A\x7F \x07(XtA\x7Fs! \x07(P!@ !\f ! !@@@@@@   q"Atj-\0"\b M@ !
\f\v@ E\r -\0\0 \ft!\b Aj! Ak! \fA\bj"
!\f
  \bj" q"Atj-\0"\bI\r\0\v\v  Atj/"AM@ \x07 Aj"6l  Atj ;\0
\bk!  \bv! ! \f\v\x7F\x7F@@@ Ak\0\v \bAj"
K@@ E\r Ak! -\0\0
t j! Aj!
A\bj"
I\r\0\v\v
\bk!  \bv!
E@ \rA\xCD
6 \x07A\xD1\xFE\x006 ! !
! \x07(!\f%\v Ak!
Av!
AqAj!\b . Atj/\0\f\v \bAj"
K@@ E\r Ak! -\0\0
t j! Aj!
A\bj"
I\r\0\v\v
\bkAk!  \bv"Av! A\x07qAj\f\v \bA\x07j"
K@@ E\r Ak! -\0\0
t j! Aj!
A\bj"
I\r\0\v\v
\bkA\x07k!  \bv"A\x07v! A\xFF\0qA\vj\v!\bA\0\v!\f \b j K\rA\0!
\bAq"E\r \b!@  Atj \f;\0 Aj! Ak!
Aj"
G\r\0\v\f\v  j!  Atj!\f"\v \b!\f\v \rA\xCD
6 \x07A\xD1\xFE\x006 ! ! \x07(!\f\v \bAO@@  Atj" \f;\0  \f;  \f;  \f; Aj! Ak"\r\0\v\v \x07 6l\v ! ! I\r\0\v\v \x07/\xF4E@ \rA\xB46 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A 6X \x07 6P \x07 6pA   # & "\xA2"\v@ \rA\xDB 6 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A6\\ \x07 \x07(p6TA  \x07(dAtj \x07(h # - "\xA2"\v@ \rA\xA9
6 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A\xC7\xFE\x006A\0!\v\v \x07A\xC8\xFE\x006\v AI A\x82IrE@ \r 6 \r 6\f \r 6 \r 6\0 \x07 6@ \x07 6< \r("(4"\bA\x07q!( \b j!/ \b (,"0j!1 \r(\f" \r("j"$A\x81k!)   kj! \r(\0" \r(jAk!*A\x7F (\\tA\x7Fs!A\x7F (XtA\x7Fs! (T!+ (P!, (@! (<!\f (8!
(0!@ AM\x7F -\0\0 t \fj -\0 A\bjtj!\f Aj! Ar \v , \f qAtj"-\0"k! \f v!\f@@@@@ \x7F \r\x7F@@ -\0\0"E@  -\0:\0\0 Aj!\f\b\v Aq@ /!\x7F Aq"E@ ! \f\f\v\x7F  M@ ! \f\v A\bj! -\0\0 t \fj!\f Aj\v!  k! \fA\x7F tA\x7Fsq j! \f v\v! AM@ -\0\0 t j -\0 A\bjtj! Ar! Aj!\v  +  qAtj"-\0" k!  v!\f -\0\0"Aq\r@ A\xC0\0qE@  + /Atj \fA\x7F tA\x7FsqAtj"-\0"k! \f v!\f -\0\0"AqE\r\f\v\v ! A\x93\f\v A\xC0\0qE@  , /Atj \fA\x7F tA\x7FsqAtj"-\0"k! \f v!\f\f\v\vA\xBF\xFE\0 A q\rA\xF7\f\v /!\x7F Aq" M@ ! \f\v -\0\0 t \fj!\f Aj  A\bj"M\r\0 -\0 t \fj!\f Aj! Aj\v! \fA\x7F tA\x7Fsq!  k! \f v!\f  j"!  k"M\r ! k" M\r (\xC47E\rA\xA6\v6A\xD1\xFE\0\v6\f\v@@ \bE@
0 kj!  O@ !\f\vA\0! ! "A\x07q"@@  -\0\0:\0\0 Ak! Aj! Aj! Aj" G\r\0\v\v  $j jk jAxK\r@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\f\v  \bK@
1 kj!  \bk" O@ !\f\vA\0! ! "A\x07q"@@  -\0\0:\0\0 Ak! Aj! Aj! Aj" G\r\0\v\v / $j jk jAxM@@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\v \b  k"O@
!\f\vA\0! \b!
! (@@  -\0\0:\0\0 Ak! Aj! Aj! Aj" (G\r\0\v\v \bA\bO@@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\v  !k!  \bk!\f\v
\b kj!  O@ !\f\vA\0! ! "A\x07q"@@  -\0\0:\0\0 Ak! Aj! Aj! Aj" G\r\0\v\v  $j jk jAxK\r\0@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\v  !k!  k!\v@ AI\r\0A\0! Ak"AnAjAq"@@  -\0\0:\0\0  -\0:\0  -\0:\0 Ak! Aj! Aj! Aj" G\r\0\v\v A I\r\0@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07  -\0\b:\0\b  -\0 :\0  -\0
:\0
 -\0\v:\0\v A\fj! A\fj! A\fk"AK\r\0\v\v E@ !\f\v  -\0\0:\0\0 AF\r Aj!\f\v  !k!@ " "-\0\0:\0\0  -\0:\0  -\0:\0 Aj! Aj! Ak"AK\r\0\v E\r  -\0\0:\0 AG@ Aj!\f\v  -\0:\0 Aj!\f\v  -\0:\0 Aj!\v *O\r\0  )I\r\v\v \r 6\f \r Avk"6\0 \r ) kA\x81j6 \r * kAj6  A\x07q"6@  \fA\x7F tA\x7Fsq6< \x07(@! \x07(<! \r(! \r(\0! \r(! \r(\f! \x07(A\xBF\xFE\0G\r \x07A\x7F6\xC87 \x07(!\f\v \x07A\x006\xC87 ! ! !@ \x07(P" A\x7F \x07(XtA\x7Fs"qAtj"\b-\0"\f M@ !
\f\v@ E\r\r -\0\0 t!\b Aj! Ak! A\bj"
!
  \bj" qAtj"\b-\0"\fI\r\0\v\v \f! \b/!@ \b-\0\0"\bAkA\xFFqAK@A\0! ! !\f\v ! !@
"   Atj" A\x7F  \bjtA\x7Fs"q vAtj"-\0"\fjO@
!\b\f\v@ E\r\r -\0\0 t!\f Aj! Ak! A\bj"\b!    \fj" q vAtj"-\0"\fj \bK\r\0\v\v \b k!
 v! -\0\0!\b /!\v \x07 A\xFF\xFFq6D \x07  \fj6\xC87
\fk!  \fv! \bA\xFFq"E@ \x07A\xCD\xFE\x006 \x07(!\f\v A q@ \x07A\xBF\xFE\x006 \x07A\x7F6\xC87 \x07(!\f\v A\xC0\0q@ \rA\xF76 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A\xC9\xFE\x006 \x07 Aq" 6L\v !
!\b@ E@ \x07(D!\f\v ! !  I@@ E\r\v Ak! -\0\0 t j! Aj"! A\bj" I\r\0\v\v \x07 \x07(\xC87 j6\xC87 \x07 \x07(D A\x7F tA\x7Fsqj"6D  k!  v!\v \x07A\xCA\xFE\x006 \x07 6\xCC7\v ! ! !@ \x07(T" A\x7F \x07(\\tA\x7Fs"qAtj"\b-\0"\f M@ !
\f\v@ E\r\b -\0\0 t!\b Aj! Ak! A\bj"
!
  \bj" qAtj"\b-\0"\fI\r\0\v\v \b/! \x07\x7F \b-\0\0" AO@ ! ! \f!\b \x07(\xC87\f\v ! !@
" \f  Atj" A\x7F \fjtA\x7Fs"q \fvAtj"-\0"\bjO@ ! \f\v@ E\r\b -\0\0 t!\b Aj! Ak! A\bj" ! \f   \bj" q \fvAtj"-\0"\bj K\r\0\v\v \fk!
 \fv! -\0\0! /! \x07(\xC87 \fj\v \bj6\xC87
\bk!  \bv! A\xC0\0q@ \rA\x936 \x07A\xD1\xFE\x006 \x07(!\f\v \x07A\xCB\xFE\x006 \x07 Aq" 6L \x07 A\xFF\xFFq6H\v !
!\b @ ! !  I@@ E\r Ak! -\0\0 t j! Aj"! A\bj" I\r\0\v\v \x07 \x07(\xC87 j6\xC87 \x07 \x07(H A\x7F tA\x7Fsqj6H  v!  k!\v \x07A\xCC\xFE\x006\v \r\vA\0! \v!\f\v\x7F \x07(H"  k"K@@  k" \x07(0M\r\0 \x07(\xC47E\r\0 \rA\xA66 \x07A\xD1\xFE\x006 \x07(!\f\v\x7F \x07(4" I@ \x07(8 \x07(,  k"kj\f\v \x07(8  kj\v!  \x07(D"  I\x1B\f\v  k! \x07(D" \v! \x07    I\x1B"
k6D
Ak!\fA\0!
A\x07q"\bE\r
!@  -\0\0:\0\0 Ak! Aj! Aj! Aj" \bG\r\0\v\f\x07\v \b
j!  \bAtj!\f\v  j!
Atj!\f\v  j!  Atj!\f\v \b
j!  \bAtj!\f\v  j!
Atj!\f\v  j!  Atj!\f\v
!\v \fA\x07O@@  -\0\0:\0\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0:\0  -\0\x07:\0\x07 A\bj! A\bj! A\bk"\r\0\v\v 
k! \x07(D\r\0 \x07A\xC8\xFE\x006 \x07(!\f \v \x07(!\f\b\vA\0! !
! \v!\f\v\v \x07($"@ A\x006\v !\v \x07A\xB9\xFE\x006\v@ \x07(" A\x80\bqE\r\0 \x07(D"   K\x1B"\f@@ \x07($"\bE\r\0 \b("
E\r\0 \b(" \b( k"M\r\0  k \f  \fj K\x1B"@ 
j  \xFC
\0\0\v \x07(! \v@ A\x80qE\r\0 \x07-\0\fAqE\r\0 \x07 \x07(  \fD6\v \x07 \x07(D \fk"6D  \fk!  \fj!\v E\r\0 \v!\f \v \x07A\xBA\xFE\x006 \x07A\x006D\v@ \x07-\0A\bq@A\0! E\r\b@  j-\0\0!\b@ \x07($"
E\r\0
("E\r\0 \x07(D"
( O\r\0 \x07 Aj6D  j \b:\0\0\v \bA\0  Aj"K\x1B\r\0\v@ \x07-\0AqE\r\0 \x07-\0\fAqE\r\0 \x07 \x07(  D6\v  j!  k! \bE\r \v!\f \v \x07($"E\r\0 A\x006\v \x07A\xBB\xFE\x006 \x07A\x006D\v@ \x07-\0Aq@A\0! E\r\x07@  j-\0\0!\b@ \x07($"
E\r\0
($"E\r\0 \x07(D"
((O\r\0 \x07 Aj6D  j \b:\0\0\v \bA\0  Aj"K\x1B\r\0\v@ \x07-\0AqE\r\0 \x07-\0\fAqE\r\0 \x07 \x07(  D6\v  j!  k! \bE\r \v!\f\b\v \x07($"E\r\0 A\x006$\v \x07A\xBC\xFE\x006\v \x07("
A\x80q@@ AK@ !\f\v E\r A\bj! Aj! Ak! -\0\0 t j! A\x07K@ ! !\f\v E@ !A\0! ! \v!\f\b\v Ar! Aj! Ak! -\0 t j!\v@ \x07-\0\fAqE\r\0  \x07/F\r\0 \rA\xCB6 \x07A\xD1\xFE\x006 ! \x07(!\f\vA\0!A\0! !\v \x07($"@ A60 
A vAq6,\v \x07A\0A\0A\0D"6 \r 60 \x07A\xBF\xFE\x006 \x07(!\f\v E\r \x07(E\r@ AK@ !\f\v E\r A\bj! Aj! Ak!
-\0\0 t j! AK@
! !\f\v
E@ !A\0! ! \v!\f\v Aj!
Aj! Ak!\b -\0 t j! AK@ \b!
!\f\v \bE@ !A\0!
! \v!\f\v Aj! Aj! Ak!\b -\0
t j! A\x07K@ \b! !\f\v \bE@ !A\0! ! \v!\f\v A r! Aj! Ak! -\0 t j!\v@ AqE\r\0  \x07( F\r\0 \rA\xF06 \x07A\xD1\xFE\x006 ! \x07(!\f\v\v !A\0!A\0!\v \x07A\xD0\xFE\x006\vA!\f\vA\0! \v!\v \r 6 \r 6\f \r 6 \r 6\0 \x07 6@ \x07 6<@@ \x07(,E@  F\r \x07(A\xD0\xFE\0K\r\v\x7F  k! @@ \r("
(8"\vE@A!
\r((A
((tA \r( \0"\v68 \vE\r\v
(,"E@
B\x0070
A
((t"6,\v  M@ @ \v  k \xFC
\0\0\v
A\x0064\f\v 
(4"k"  I\x1B"@  \vj  k \xFC
\0\0\v  I@ k"@
(8  k \xFC
\0\0\v
64\f\vA\0!
(4 j"A\0 
(,"G\x1B64 
(0"M\r\0
 j60\v \f\v
(,60A\0\v\r \r(! \r(!\v \r \r(\b ' kj6\b \r  k" \r(j6 \x07 \x07( j6 \x07-\0\fAqE  FrE@ \r(\f k! \x07(! \x07\x7F \x07(@   D\f\v   \x82\v"6 \r 60\v \r \x07(@A\xC0\0A\0 \x07(\b\x1BjA\x80A\0 \x07("A\xBF\xFE\0F\x1BjA\x80A\x80A\0 A\xC2\xFE\0F\x1B A\xC7\xFE\0F\x1Bj6, A{ \x1B   F\x1B   'F\x1B!\x1B\f\v \x07A\xD2\xFE\x006\vA|!\x1B\v Aj$\0 \x1BAK\r A\xA8j!
(\xAC!\b (\0! ( (k!#\0A k"$\0@  k" A\0L\r\0
(\b
("\vk N@ \v \bk" H@   j"k"E  FrE@ \v  \xFC
\0\0\v
 \vj6 A\0L\r
\b \v \b j\xD1  \bj!@  \bF\r \b -\0\0:\0\0 Aj! \bAj!\b\f\0\v\0\v
\b \v \b j"\xD1@  \bF\r \b -\0\0:\0\0 Aj! \bAj!\b\f\0\v\0\v A\fj
(\0k \vj\x83 \b
(\0k
\x8C"\v(\b"j!@  G@  -\0\0:\0\0 Aj! Aj!\f\v\v \v 6\b \v(
( \bk"@ \v(\b \b \xFC
\0\0\v \v \v(\b
( \bkj6\b
\b6 \v(
(\0" \bkj! \b k"@   \xFC
\0\0\v \v 6
(\0"6
\v(6\0 \v 6
(!
\v(\b6 \v 6\b
(\b!
\v(\f6\b \v 6\f \v \v(6\0 \v\x87\v A j$\0 \x1BAG\r\0\v \r\xCB 1 A\x98j" (\xA8" (\xAC k\xE0
1 \rA\x006\\ \rA\xF8\xF9\x006@ \rA\xD0\xF9\x006\0 \rA\xE4\xF9\x006\b \rA\x88\xFA\0(\0"6\0 \r A\fk(\0jA\x8C\xFA\0(\x006\0 \rA\x006 \r \r(\0A\fk(\0j"A\x006  \rA\fj""6 A\x006\f B\x82\xA0\x80\x80\xE0\x007  E6 A jA\0A(\xFC\v\0 Aj\xF4 A\0:\0P B\x80\x80\x80\x80p7H \rA\x90\xFA\0(\0"6\b A\fk(\0 \rA\bjjA\x94\xFA\0(\x006\0 \rA\x84\xFA\0(\0"6\0 \r A\fk(\0jA\x98\xFA\0(\x006\0 \rA\x9C\xFA\0(\x006\b \r"A\xD0\xF9\x006\0 A\xE4\xF9\x006\b A\xF8\xF9\x006@ A\xA8\xF5\x006\0 Aj\xF4 B\x007 B\x007 B\x007\b B\x007 A\xE8\xF5\x006\0 B\x007( A60  A j"\vG@@ ,\0\v! \v,\0\vA\0H@ (\0  A\0H"\x1B!@ (  \x1B" \v(\bA\xFF\xFF\xFF\xFF\x07q"I@ \v 6 \v(\0! @   \xFC
\0\0\v  jA\0:\0\0\f\v \v Ak  kAj \v("A\0   \x89\v\f\v A\0H@ (\0!@ ("A
M@ \v :\0\v @ \v  \xFC
\0\0\v  \vjA\0:\0\0\f\v \vA
A
k \v-\0\vA\xFF\0q"A\0   \x89\v\f\v \v (\b6\b \v )\x007\0\v\v A\x006, ( A j" ,\0+"A\0H"\x1B!
($  \x1B! (0"A\bq@ 
6\f 
6\b 
j"6  6,\v@ AqE\r\0 
j6, A
((A\xFF\xFF\xFF\xFF\x07qAk A\0N\x1B" 
6 
6 
($ ,\0+" A\0H\x1Bj6 -\x000AqE\r\0@ A\0H@ 
A\xFF\xFF\xFF\xFF\x07j"
6 A\xFF\xFF\xFF\xFF\x07k! \f\v\v E\r\0 
j6\v#\0A\xC0k"\b$\0 \bB\x007\xB8 \bB\xCE\x8E\xCD\x8257\xB0  \bA\xB0jAf@@  (\0A\fk(\0j-\0AqE@ \b(\xB0A\xCE\x8E\xCD\x82F\r\vA\xD5\xBF B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \b(\xB4AkA|M@A\xD9 \bA\xB4j\xC7 B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \b(\xB8"A\x81\xAD\xE2O@A\xDB \bA\xB8j\xC7 B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \b-\0\xBC"AO@ \b 6\0A\x97 \ba\`A\xB0\xF1\0(\0L B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v \xCD! \b(\xB4! \bA:\0e \bA\xE8\0j"
A\0A\xC8\0\xFC\v\0 \b 6X \b \b-\0\xBC6\\ \b \b-\0\xBD6\` \b \b-\0\xBEAq:\0d
Al"AA AF\x1Blz \bA\xF4\0j"\v z \b AK":\0e \bA\x80j"AA \x1B lz \bA\x8Cj" z \bA\x98j" z \bA\xA4j"  lz  \b(h \bA\xCC\0j
u" ( (\0kf 1  \b(\x8C \bA@k u"( (\0kf 1  \b(\x98 \bA4j u"( (\0kf 1  \b(t \bA(j \vu"( (\0kf 1  \b(\x80 \bAj u"( (\0kf 1  \b(\xA4 \bAj u"( (\0kf 1@  (\0A\fk(\0j-\0Aq@A\xB6\f\xBF B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\f\v  \bA\xD8\0j")7  )\x007\0 Aj Ajt Aj Ajt A(j A(jt A4j A4jt A@k A@kt A\xCC\0j A\xCC\0jt\v \bA\xD8\0j\xCC\v \bA\xC0j$\0 \x81\f\v Aj\xCB\v 1 A\xA8j1 B\x007\0 B\x007\0 A:\0\r AjA\0A\xC8\0\xFC\v\0\v A\x98j  A\xC0j$\0#\0A\x90k"\b$\0 (\0! (\xCD!@@@ ( (k"\v Al"
AA \v (\0"Al"F\x1BlG@ \bA\xA568 \bA\xF8\x0064 \bA\x9F60A\xED\v \bA0ja\`A\xB0\xF1\0(\0L\f\v
( (kG@ \bA\xF9\x006< \bA<jA\xF5\xD0\f\v (, ((kAA -\0\r"Aq\x1B lG@ \bA\xCD6( \bA\xFA\x006$ \bA\x9F6 A\xED\v \bA ja\`A\xB0\xF1\0(\0L\f\v (8 (4kG@ \bA\x9E6 \bA\xFB\x006 \bA\x9F6A\xED\v \bAja\`A\xB0\xF1\0(\0L\f\v
(D (@kG@ \bA\xFC\x006< \bA<jA\xCB\xD0\f\v (P (Lk" 
lF\r \bA\x9F6\b \bA\xFD\x006 \bA\x9F6\0A\xED\v \ba\`A\xB0\xF1\0(\0L\v \0A\0:\0\b \0B\x007\0 \0A\fjA\0A\xC8\0\xFC\v\0\f\v \0A\fj"A\0A\xC8\0\xFC\v\0 \0 6\0 \0 (6 \0 -\0\f:\0\b 
w \0Aj
w \0A$j Atw \0A0j w \0A<j
w \0A\xC8\0j w@  \vF@ (\0! (!A\0!\f@
\fF\r  \fAtj}C\0\0\x80?C\0\0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x83\x80\x80\xC0?7D \bB\x80\x80\x80\xFC\x83\x80\x80\xC0?7< \vA\xD8A<\xFC
\0\0#\0Ak"$\0 \fAlj"-\0! -\0!  -\0\0\xB3C\x81\x80\0<\x94C\0\0\x80\xBF\x92 \b*H\x948  \xB3C\x81\x80\0<\x94C\0\0\x80\xBF\x92 \b*L\x948\b  \xB3C\x81\x80\0<\x94C\0\0\x80\xBF\x92 \b*P\x94"28\f \fAtj" 28\b  )7\0 C\0\0\x80? *\f *\f\x94 * *\x94 *\b *\b\x94\x92\x92\x93"2C\0\0\0\0 2C\0\0\0\0^\x1B\x918\f Aj$\0\v \fAj!\f\f\v\v!\f@ \fG@  \fAtj}C\0\0\0\0  \fj-\0\0\xB3C\0\0\x7FC\x95"2C\0\0\x80? 2\x93\x95"3\xBC"A\x80\x80\x80\xFCF\r\0@ A\x80\x80\x80\xFC\x07kA\xFF\xFF\xFF\x87xM@ At"E@#\0Ak"C\0\0\x80\xBF8\f *\fC\0\0\0\0\x95\f\v A\x80\x80\x80\xFC\x07F\r A\x80\x80\x80xI A\0NqE@ 3 3\x93"2 2\x95\f\v 3C\0\0\0K\x94\xBCA\x80\x80\x80\xDC\0k!\vA\x98\xF1\0+\0  A\x80\x80\xCC\xF9k"A\x80\x80\x80|qk\xBE\xBB AvA\xF0q"+\x90o\xA2D\0\0\0\0\0\0\xF0\xBF\xA0"7 7\xA2"8\xA2A\xA0\xF1\0+\0 7\xA2A\xA8\xF1\0+\0\xA0\xA0 8\xA2 Au\xB7A\x90\xF1\0+\0\xA2 +\x98o\xA0 7\xA0\xA0\xB6!3\v 3\v8\0 \fAj!\f\f\v\v \0(<! (@!A\0!\f@
\fF@ (P (L"k! \0(H!A\0!@  F@ (\f!A\0!#\0A\xE0\0k"\v$\0#\0Ak"$\0A!\x7FA!A A\0L\r\0 AkAs"A\x7FsAq! AqE! AqE\v!  :\0  :\0  :\0\r -\0! -\0! -\0\r! \vA\x80\x80\x80\xFC6@ \vA\x80\x80\x80\xFC68 \vC\0\0\x80?C\0\0\x80\xBF \x1B"68\\ \vC\0\0\x80?C\0\0\x80\xBF \x1B"58X \v 68T \v 58P \vC\0\0\x80?C\0\0\x80\xBF \x1B"48L \v 48D \v 68, \v 58( \v 48$ \v 58 \v 48 \v 68\f \v 6 5\x94"38< \v 4 5\x94"284 \v 6 4\x94"480 \v 48 \v 38 \v 28 \v 4 5\x948H Aj$\0 \0( \0(\f"kAu!@  M@ \0(( \0($"kAu!A\0!@  M@@ \0(L \0(H"kAuAn" \0(\0n! \vA$j!\0A\0!A\0!@A\0!\f  M\r@  \fM@  j!\f  Atj" \0 \fAtj*\0"2 *\0\x948\0  2 *\x948  2 *\b\x948\b Aj! \fAj!\f\f\v\0\v\0\v\0\v  Atj" \v* *\0\x948\0  \v* *\x948  \v* *\b\x948\b Aj!\f\v\v \vA\xE0\0j$\0  Atj" \v*\f *\0\x948\0  \v* *\x948  \v* *\b\x948\b Aj!\f\v\v  Atj  j-\0\0\xB3C\0\0\0\xC3\x92C\0\0\0<\x948\0 Aj!\f\v\v  \fAtj  \fj-\0\0\xB3C\0\0\x7FC\x95C\0\0\0\xBF\x92C\x9A\x99>\x958\0 \fAj!\f\f\v\v  \fAtj  \fj-\0\0\xB3C\0\0\x80=\x94C\0\0 \xC1\x928\0 \fAj!\f\f\v\v\v \bA\x90j$\0 \xCC %A\xE0\0j$\0 1 Aj$\0\v\x81\x7F#\0A k"$\0  6@ -\0AqE@ A\x7F6\0 \0      \0(\0(\0!@@@ (\0\0\v A\0:\0\0\f\v A:\0\0\f\v A:\0\0 A6\0\f\v  $ =! (\0#  $ n!\0 (\0#  \0 \0(\0(\0 A\fr \0 \0(\0(\0  Aj   Aj"  A\x95 F:\0\0 (!@ A\fk " G\r\0\v\v A j$\0 \v\xEE\x7F#\0A\x90k"\0$\0 \0 6\x88 \0 6\x8C \0A\x006\xD8 \0B\x007\xD0 \0Aj" $ >"A\xD0\x85A\xEA\x85 \0A\xE0j (\0( \0 \0(# \0A\x006\x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0A k"$\0  6@ -\0AqE@ A\x7F6\0 \0      \0(\0(\0!@@@ (\0\0\v A\0:\0\0\f\v A:\0\0\f\v A:\0\0 A6\0\f\v  $ >! (\0#  $ p!\0 (\0#  \0 \0(\0(\0 A\fr \0 \0(\0(\0  Aj   Aj"  A\x97 F:\0\0 (!@ A\fk " G\r\0\v\v A j$\0 \v@\x7FA\0!\0\x7F  F\x7F \0 (\0 \0Atj"\0A\x80\x80\x80\x80\x7Fq"Av r \0s!\0 Aj!\f\v\v\v\v\0 \0  \xA2\vT\x7F@@  G@A\x7F!\0  F\r (\0" (\0"H\r  J@A Aj! Aj!\f\v\0\v\v  G!\0\v \0\v@\x7FA\0!\0\x7F  F\x7F \0 ,\0\0 \0Atj"\0A\x80\x80\x80\x80\x7Fq"Av r \0s!\0 Aj!\f\v\v\v\v\0 \0  \xCE\v^\x7F   kj!@@  G@A\x7F!\0  F\r ,\0\0" ,\0\0"\x07H\r  \x07J@A Aj! Aj!\f\v\0\v\v  G!\0\v \0\vT\x7F  \0(T" A\0 A\x80j"\xCA" k  \x1B"   K\x1B"Y \0  j"6T \0 6\b \0  j6 \v\xA8\x7F \0(T"(\0! (" \0( \0("\x07k"  I\x1B"@  \x07 Y  (\0 j"6\0  ( k"6\v    K\x1B"@   Y  (\0 j"6\0  ( k6\v A\0:\0\0 \0 \0(,"6 \0 6 \v\b\0 \0K!\v\0 \0 \0(\0A\fk(\0j\xC0\v\0 \0 \0(\0A\fk(\0j\x81\v
\0 \0A\bk\xC0\v
\0 \0A\bk\x81\v\0 \0  )\bA\0  (\0(\0\v \0 \0\xB0!\v\x95\x7F~ (," ("I@  6, !\vB\x7F!
@ Aq"\x07E AF \x07AFqr\r\0 @  ( A j ,\0+A\0H\x1Bk\xAC! \v@@@ \0\v A\bq@ (\f (\bk\xAC!\b\f\v  (k\xAC!\b\f\v !\b\v  \b|"B\0S  Ur\r\0 A\bq!@ P\r\0 @ (\fE\r\v AqE\r\0 E\r\v @  6  (\b \xA7j6\f\v Aq@  ( \xA7j6\v !
\v \0
7\b \0B\x007\0\v\x99\b\x7F A\x7FF@A\0\v \0(\b! \0(\f! \0\x7F \0(" \0(G@ \0(,\f\v \0-\x000AqE@A\x7F\v \0(,!\x07 \0(! \0A j"A\0\xAA A
\0((A\xFF\xFF\xFF\xFF\x07qAk \0,\0+A\0N\x1B" \0 \0(  \0,\0+"\bA\0H" \x1B"6 \0  \0($ \b \x1Bj6 \0   kj"6  \x07 kj\v" Aj"  I\x1B"6, \0-\x000A\bq@ \0 6 \0 \0( \0A j \0,\0+A\0H\x1B"6\b \0   kj6\f\v \0 \xC0\xC3\v\x8E\x7F \0(," \0("I@ \0 6, !\v\x7FA\x7F \0(\f" \0(\bM\r\0 A\x7FF@ \0 6 \0 Ak6\fA\0\v \0-\x000AqE@A\x7F Ak-\0\0 A\xFFqG\r\v \0 6 \0 Ak"\x006\f \0 :\0\0 \v\v_\x7F \0(," \0("I@ \0 6, !\vA\x7F!@ \0-\x000A\bqE\r\0  \0("K\x7F \0 6  \v \0(\f"\0M\r\0 \0-\0\0!\v \v\0 \0 \0(\0A\fk(\0j\xC1\v
\0 \0A\bk\xC1\v \0 \0A\f\xA5\v\0 \0AjK \0A\bk\v\f\0 \0A\fjK \0\v\0 \0 \0(\0A\fk(\0j\xC1\v \0 \0A\xA5\v\f\0 \0AjK \0\v\0 \0 \0(\0A\fk(\0j\xC5\v \0 \0A\b\xA5\v\f\0 \0A\bjK \0\v\x96\x7F@@  L\r\0 \0(" \0("O@ \0 -\0\0 \0(\0(4\0A\x7FF\r Aj! Aj!\f \0  k"  k"  J\x1B"\x7F @   \xFC
\0\0\v \0( \v j6  j!  j!\f\v\0\v\v \v3\x7FA\x7F! \0 \0(\0($\0\0A\x7FG@ \0(\f"-\0\0! \0 Aj6\f\v \v\0A\x7F\v\x91\x7F@@  L\r\0@ \0(\f" \0("I@ \0  k"  k"  J\x1B"\x7F @   \xFC
\0\0\v \0(\f \v j6\f\f\v \0 \0(\0((\0\0"A\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\0A\xCC\xCFA\xD4\xCE6\0A\xA4\xCFA\x80\x806\0A\xA0\xCFA\xC0\xEC6\0A\x84\xCFA*6\0A\xA8\xCFA\xB0\xCB(\x006\0\v\v\xBF\xBE(\0A\x80\b\v\x940123456789abcdefghijklmnopqrstuvwxyz\0load_spz\0infinity\0February\0January\0July\0Thursday\0Tuesday\0Wednesday\0Saturday\0Sunday\0Monday\0Friday\0May\0%m/%d/%y\0-+ 0X0x\0-0X+0X 0X-0x+0x 0x\0Nov\0Thu\0August\0unsigned short\0unsigned int\0invalid literal/lengths set\0invalid code lengths set\0unknown header flags set\0invalid distances set\0get\0Oct\0float\0invalid bit length repeat\0Sat\0numPoints\0colors\0UnpackOptions\0positions\0rotations\0too many length or distance symbols\0invalid stored block lengths\0scales\0alphas\0[SPZ: ERROR] Check failed: %s:%d: %s\0vf32_ptr\0Apr\0vector\0money_get error\0[SPZ ERROR] deserializePackedGaussians: read error\0October\0November\0September\0December\0unsigned char\0Mar\0/emsdk/emscripten/system/lib/libcxxabi/src/private_typeinfo.cpp\0Sep\0%I:%M:%S %p\0Sun\0Jun\0Mon\0nan\0Jan\0coordinateSystem\0CoordinateSystem\0Jul\0bool\0April\0invalid code -- missing end-of-block\0incorrect header check\0incorrect length check\0incorrect data check\0push_back\0invalid distance too far back\0Fri\0sh\0header crc mismatch\0March\0Aug\0unsigned long long\0unsigned long\0std::wstring\0basic_string\0std::string\0std::u16string\0std::u32string\0inf\x000123456789abcdef\0%.0Lf\0%Lf\0resize\0invalid window size\0true\0Tue\0false\0invalid block type\0June\0double\0shDegree\0bad_array_new_length was thrown in -fno-exceptions mode\0invalid literal/length code\0invalid distance code\0RawGaussianCloud\0unknown compression method\0[SPZ ERROR] deserializePackedGaussians: header not found\0%0*lld\0%*lld\0+%lld\0%+.4ld\0void\0locale not supported\0antialiased\0Wed\0%Y-%m-%d\0[SPZ ERROR] deserializePackedGaussians: Too many points: %d\0[SPZ ERROR] deserializePackedGaussians: Unsupported SH degree: %d\0[SPZ ERROR] deserializePackedGaussians: version not supported: %d\0Dec\0./spz/src/cc/load-spz.cc\0Feb\0%a %b %d %H:%M:%S %Y\0POSIX\0VectorUInt8T\0%H:%M:%S\0NAN\0PM\0AM\0%H:%M\0LC_ALL\0ASCII\0LANG\0RUF\0LUF\0INF\0RDF\0LDF\0UNSPECIFIED\0C\0RUB\0LUB\0RDB\0LDB\0catching a class without an object?\0emscripten::memory_view<short>\0emscripten::memory_view<unsigned short>\0emscripten::memory_view<int>\0emscripten::memory_view<unsigned int>\0emscripten::memory_view<float>\0emscripten::memory_view<uint8_t>\0emscripten::memory_view<int8_t>\0emscripten::memory_view<uint16_t>\0emscripten::memory_view<int16_t>\0emscripten::memory_view<uint64_t>\0emscripten::memory_view<int64_t>\0emscripten::memory_view<uint32_t>\0emscripten::memory_view<int32_t>\0emscripten::memory_view<char>\0emscripten::memory_view<unsigned char>\0emscripten::memory_view<signed char>\0emscripten::memory_view<long>\0emscripten::memory_view<unsigned long>\0emscripten::memory_view<double>\x000123456789\0C.UTF-8\x0001234567\0VectorFloat32\x0001\x001.3.1\0.\0-\0(packed.alphas.size()) == (numPoints)\0(null)\0(packed.colors.size()) == (numPoints * 3)\0(packed.scales.size()) == (numPoints * 3)\0(packed.sh.size()) == (numPoints * shDim * 3)\0(packed.rotations.size()) == (numPoints * (packed.usesQuaternionSmallestThree ? 4 : 3))\0(packed.positions.size()) == (numPoints * 3 * (usesFloat16 ? 2 : 3))\0%\0length_error was thrown in -fno-exceptions mode with message "%s"\0[SPZ: ERROR] Unsupported SH degree: %d
\0 \0\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0\0\x80?\0A\xA0 \v\xB60\0\0\xF0c\0\0\xF0c\0\0P\0\0\xA4d\0\x008\0\0N3spz13GaussianCloudE\0\0\0\xA4d\0\0X\0\0N3spz13UnpackOptionsE\0ppiip\0\xF0c\0\0|\0\0\xA4d\0\0\x84\0\0NSt3__26vectorIfNS_9allocatorIfEEEE\0ipp\0(e\0\0\xD4\0\0\0\0\0\0\0\0\0\xEC\0\0\0\0\0\x008\0\0\0\0\0\0h\0\0\0\0\0\0NSt3__28optionalIfEE\0\0\0\0\xCCd\0\0\xF8\0\0(\0\0NSt3__227__optional_move_assign_baseIfLb1EEE\0\0\0\0\xCCd\0\x004\0\0d\0\0NSt3__227__optional_copy_assign_baseIfLb1EEE\0\0\0\0\xCCd\0\0p\0\0\x98\0\0NSt3__220__optional_move_baseIfLb1EEE\0\0\0\xCCd\0\0\xA4\0\0\xCC\0\0NSt3__220__optional_copy_baseIfLb1EEE\0\0\0\xCCd\0\0\xD8\0\0\0\0NSt3__223__optional_storage_baseIfLb0EEE\0\0\0\0\xA4d\0\0\f\0\0NSt3__224__optional_destruct_baseIfLb1EEE\0\0\0\xA4d\0\0@\0\0NSt3__218__sfinae_ctor_baseILb1ELb1EEE\0\0\xA4d\0\0p\0\0NSt3__220__sfinae_assign_baseILb1ELb1EEE\0\0\0\0\x84e\0\0\xAC\0\0\0\0\0\0|\0\0PNSt3__26vectorIfNS_9allocatorIfEEEE\0\0\0\0\x84e\0\0\xE4\0\0\0\0\0|\0\0PKNSt3__26vectorIfNS_9allocatorIfEEEE\0pp\0v\0vp\0\0\0\x9C\0\0pp\0\0\x98c\0\0|\0\x008d\0\0vppf\0\0\0\0\x98c\0\0|\0\0\xFCc\0\x008d\0\0vppif\0\0\0\xFCc\0\0|\0\0ipp\0\\\0\x008d\0\0\xA4d\0\0d\0\0N10emscripten3valE\0\0\xAC\0\0|\0\0\xFCc\0\0pppi\0\0\0\0\0\0\0\0\xA8c\0\0|\0\0\xFCc\0\x008d\0\0ippif\0\0\0(e\0\0\xD0\0\0\0\0\0\0\0\0\0\xE8\0\0\0\0\0\x008\0\0\0\0\0\0h\0\0\0\0\0\0NSt3__28optionalIhEE\0\0\0\0\xCCd\0\0\xF4\0\0$\0\0NSt3__227__optional_move_assign_baseIhLb1EEE\0\0\0\0\xCCd\0\x000\0\0\`\0\0NSt3__227__optional_copy_assign_baseIhLb1EEE\0\0\0\0\xCCd\0\0l\0\0\x94\0\0NSt3__220__optional_move_baseIhLb1EEE\0\0\0\xCCd\0\0\xA0\0\0\xC8\0\0NSt3__220__optional_copy_baseIhLb1EEE\0\0\0\xCCd\0\0\xD4\0\0\0\0\0NSt3__223__optional_storage_baseIhLb0EEE\0\0\0\0\xA4d\0\0\b\0\0NSt3__224__optional_destruct_baseIhLb1EEE\0\0\0\xA4d\0\0<\0\0NSt3__26vectorIhNS_9allocatorIhEEEE\0\x84e\0\0p\0\0\0\0\0\x004\0\0PNSt3__26vectorIhNS_9allocatorIhEEEE\0\0\0\0\x84e\0\0\xA8\0\0\0\0\x004\0\0PKNSt3__26vectorIhNS_9allocatorIhEEEE\0pp\0vp\0\`\0\0pp\0\0\x98c\0\x004\0\0\xC0c\0\0vppi\0\0\0\0\x98c\0\x004\0\0\xFCc\0\0\xC0c\0\0vppii\0\0\0\xFCc\0\x004\0\0ipp\0\\\0\0\xC0c\0\0\xA8\0\x004\0\0\xFCc\0\0pppi\0\0\0\0\xA8c\0\x004\0\0\xFCc\0\0\xC0c\0\0ippii\0p\0vp\0ipp\0vppi\0ipp\0vppi\0ppp\0vppp\0\0\0Xd\0\0p\0\0N3spz16CoordinateSystemE\0p\0vp\0ipp\0vppi\0\0\0\0\0\0\0\0\0\b\0\0\0\0\0\0\xA4d\0\0\xB0\0\0NSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE\0\0\xA4d\0\0\xF8\0\0NSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEE\0\0\xA4d\0\0@\0\0NSt3__212basic_stringIDsNS_11char_traitsIDsEENS_9allocatorIDsEEEE\0\0\0\xA4d\0\0\x8C\0\0NSt3__212basic_stringIDiNS_11char_traitsIDiEENS_9allocatorIDiEEEE\0\0\0\xA4d\0\0\xD8\0\0N10emscripten11memory_viewIcEE\0\0\xA4d\0\0\0\0\0N10emscripten11memory_viewIaEE\0\0\xA4d\0\0(\0\0N10emscripten11memory_viewIhEE\0\0\xA4d\0\0P\0\0N10emscripten11memory_viewIsEE\0\0\xA4d\0\0x\0\0N10emscripten11memory_viewItEE\0\0\xA4d\0\0\xA0\0\0N10emscripten11memory_viewIiEE\0\0\xA4d\0\0\xC8\0\0N10emscripten11memory_viewIjEE\0\0\xA4d\0\0\xF0\0\0N10emscripten11memory_viewIlEE\0\0\xA4d\0\0\0\0N10emscripten11memory_viewImEE\0\0\xA4d\0\0@\0\0N10emscripten11memory_viewIxEE\0\0\xA4d\0\0h\0\0N10emscripten11memory_viewIyEE\0\0\xA4d\0\0\x90\0\0N10emscripten11memory_viewIfEE\0\0\xA4d\0\0\xB8\0\0N10emscripten11memory_viewIdEE\0A\xE43\v\xA1(\x960\x07w,a\xEE\xBAQ \x99\xC4m\x07\x8F\xF4jp5\xA5c\xE9\xA3\x95d\x9E2\x88\xDB\xA4\xB8\xDCy\xE9\xD5\xE0\x88\xD9\xD2\x97+L\xB6 \xBD|\xB1~\x07-\xB8\xE7\x91\xBF\x90d\xB7\xF2 \xB0jHq\xB9\xF3\xDEA\xBE\x84}\xD4\xDA\xEB\xE4\xDDmQ\xB5\xD4\xF4\xC7\x85\xD3\x83V\x98l\xC0\xA8kdz\xF9b\xFD\xEC\xC9e\x8AO\\\xD9lcc=\xFA\xF5\r\b\x8D\xC8 n;^iL\xE4A\`\xD5rqg\xA2\xD1\xE4<G\xD4K\xFD\x85\r\xD2k\xB5
\xA5\xFA\xA8\xB55l\x98\xB2B\xD6\xC9\xBB\xDB@\xF9\xBC\xAC\xE3l\xD82u\\\xDFE\xCF\r\xD6\xDCY=\xD1\xAB\xAC0\xD9&:\0\xDEQ\x80Q\xD7\xC8a\xD0\xBF\xB5\xF4\xB4!#\xC4\xB3V\x99\x95\xBA\xCF\xA5\xBD\xB8\x9E\xB8(\b\x88_\xB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E\0\0\0\xA4d\0\0\`;\0\0NSt3__215basic_streambufIcNS_11char_traitsIcEEEE\0\0\0\0(e\0\0\xAC;\0\0\0\0\0\0\0\0\0 ;\0\0\xF4\xFF\xFFNSt3__213basic_istreamIcNS_11char_traitsIcEEEE\0\0(e\0\0\xF4;\0\0\0\0\0\0\0\0\0 ;\0\0\xF4\xFF\xFFNSt3__213basic_ostreamIcNS_11char_traitsIcEEEE\0\0(e\0\0D<\0\0\0\0\0\0\0\0\x94;\0\0\0\0\0\xDC;\0\0\b\0\0NSt3__214basic_iostreamIcNS_11char_traitsIcEEEE\0\xCCd\0\0\x80<\0\0X;\0\0NSt3__215basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEEE\0\0\0@\0\0\0\0\0\0\0\xB4=\0\0K\0\0\0L\0\0\x008\0\0\0\xF8\xFF\xFF\xFF\xB4=\0\0M\0\0\0N\0\0\0\xC0\xFF\xFF\xFF\xC0\xFF\xFF\xFF\xB4=\0\0O\0\0\0P\0\0\0\xD0<\0\x004=\0\0p=\0\0\x84=\0\0\x98=\0\0\xAC=\0\0\\=\0\0H=\0\0\xF8<\0\0\xE4<\0\0@\0\0\0\0\0\0\0$<\0\0Q\0\0\0R\0\0\x008\0\0\0\xF8\xFF\xFF\xFF$<\0\0S\0\0\0T\0\0\0\xC0\xFF\xFF\xFF\xC0\xFF\xFF\xFF$<\0\0U\0\0\0V\0\0\0@\0\0\0\0\0\0\0\x94;\0\0W\0\0\0X\0\0\0\xC0\xFF\xFF\xFF\xC0\xFF\xFF\xFF\x94;\0\0Y\0\0\0Z\0\0\x008\0\0\0\0\0\0\0\xDC;\0\0[\0\0\0\\\0\0\0\xC8\xFF\xFF\xFF\xC8\xFF\xFF\xFF\xDC;\0\0]\0\0\0^\0\0\0\xCCd\0\0\xC0=\0\0$<\0\0NSt3__218basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE\0\0\0\0\0\0\0\0>\0\0_\0\0\0\`\0\0\0\xA4d\0\0 >\0\0NSt3__28ios_baseE\0A\xC0\xFC\0\v#\xDE\x95\0\0\0\0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF@>\0\0\0\0\0C.UTF-8\0A\x90\xFD\0\vT>\0A\xB0\xFD\0\vGLC_CTYPE\0\0\0\0LC_NUMERIC\0\0LC_TIME\0\0\0\0\0LC_COLLATE\0\0LC_MONETARY\0LC_MESSAGES\0A\x84\xFE\0\v-\x80\xDE(\0\x80\xC8M\0\0\xA7v\0\x004\x9E\0\x80\xC7\0\x80\x9F\xEE\0\0~\x80\\@\x80\xE9g\0\xC8\x90\0U\xB8.\0A\xC0\xFE\0\v\xD2Sun\0Mon\0Tue\0Wed\0Thu\0Fri\0Sat\0Sunday\0Monday\0Tuesday\0Wednesday\0Thursday\0Friday\0Saturday\0Jan\0Feb\0Mar\0Apr\0May\0Jun\0Jul\0Aug\0Sep\0Oct\0Nov\0Dec\0January\0February\0March\0April\0May\0June\0July\0August\0September\0October\0November\0December\0AM\0PM\0%a %b %e %T %Y\0%m/%d/%y\0%H:%M:%S\0%I:%M:%S %p\0\0\0%m/%d/%y\x000123456789\0%a %b %e %T %Y\0%H:%M:%S\0\0\0\0\0^[yY]\0^[nN]\0yes\0no\0A\xA0\x81\v\xE1\xD1t\x9E\0W\x9D\xBD*\x80pR\xFF\xFF>'
\0\0\0d\0\0\0\xE8\0\0'\0\0\xA0\x86\0@B\0\x80\x96\x98\0\0\xE1\xF5\0\0\x005\0\0\0q\0\0\0k\xFF\xFF\xFF\xCE\xFB\xFF\xFF\x92\xBF\xFF\xFF\0\0\0\0\0\0\0\0\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x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\0\0\xDA\0\0\0\xDB\0\0\0\xDC\0\0\0\xDD\0\0\0\xDE\0\0\0\xDF\0\0\0\xE0\0\0\0\xE1\0\0\0\xE2\0\0\0\xE3\0\0\0\xE4\0\0\0(e\0\0\x80N\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xC4N\0\0\0\0\0\0NSt3__27num_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0(e\0\0\xDCN\0\0\0\0\0\0\0\0\0\xF4N\0\0\0\0\0\0NSt3__29__num_getIcEE\0\0\0\xA4d\0\0\xFCN\0\0NSt3__214__num_get_baseE\0\0\0\0\0\0\0\0XO\0\0\x98\0\0\0\xE5\0\0\0v\0\0\0\xE6\0\0\0\xE7\0\0\0\xE8\0\0\0\xE9\0\0\0\xEA\0\0\0\xEB\0\0\0\xEC\0\0\0\xED\0\0\0\xEE\0\0\0\xEF\0\0\0\xF0\0\0\0(e\0\0xO\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xBCO\0\0\0\0\0\0NSt3__27num_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0(e\0\0\xD4O\0\0\0\0\0\0\0\0\0\xF4N\0\0\0\0\0\0NSt3__29__num_getIwEE\0\0\0\0\0\0\0 P\0\0\x98\0\0\0\xF1\0\0\0v\0\0\0\xF2\0\0\0\xF3\0\0\0\xF4\0\0\0\xF5\0\0\0\xF6\0\0\0\xF7\0\0\0\xF8\0\0\0\xF9\0\0\0(e\0\0@P\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\x84P\0\0\0\0\0\0NSt3__27num_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0(e\0\0\x9CP\0\0\0\0\0\0\0\0\0\xB4P\0\0\0\0\0\0NSt3__29__num_putIcEE\0\0\0\xA4d\0\0\xBCP\0\0NSt3__214__num_put_baseE\0\0\0\0\0\0\0\0\fQ\0\0\x98\0\0\0\xFA\0\0\0v\0\0\0\xFB\0\0\0\xFC\0\0\0\xFD\0\0\0\xFE\0\0\0\xFF\0\0\0\0\0\0\0\0\0\0(e\0\0,Q\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0pQ\0\0\0\0\0\0NSt3__27num_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0(e\0\0\x88Q\0\0\0\0\0\0\0\0\0\xB4P\0\0\0\0\0\0NSt3__29__num_putIwEE\0\0\0\0\0\0\0\xF4Q\0\0\0\0\0\0v\0\0\0\0\0\0\0\x07\0\0\b\0\0 \0\0
\0\0\v\0\0\xF8\xFF\xFF\xFF\xF4Q\0\0\f\0\0\r\0\0\0\0\0\0\0\0\0\0\0\0(e\0\0R\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0dR\0\0\0\0\0\x80R\0\0\0\b\0\0NSt3__28time_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0\0\0\0\xA4d\0\0lR\0\0NSt3__29time_baseE\0\0\xA4d\0\0\x88R\0\0NSt3__220__time_get_c_storageIcEE\0\0\0\0\0\0\0\0S\0\0\0\0\0\0v\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1B\0\0\xF8\xFF\xFF\xFF\0S\0\0\0\0\0\0\0\0\0\0 \0\0!\0\0"\0\0(e\0\0(S\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0dR\0\0\0\0\0pS\0\0\0\b\0\0NSt3__28time_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0\0\0\0\xA4d\0\0xS\0\0NSt3__220__time_get_c_storageIwEE\0\0\0\0\0\0\0\xB4S\0\0#\0\0$\0\0v\0\0\0%\0\0(e\0\0\xD4S\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0T\0\0\0\b\0\0NSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0\0\0\0\xA4d\0\0$T\0\0NSt3__210__time_putE\0\0\0\0\0\0\0\0TT\0\0&\0\0'\0\0v\0\0\0(\0\0(e\0\0tT\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0T\0\0\0\b\0\0NSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0\0\0\0\0\0\0\0\xF4T\0\0\x98\0\0\0)\0\0v\0\0\0*\0\0+\0\0,\0\0-\0\0.\0\0/\0\x000\0\x001\0\x002\0\0(e\0\0U\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000U\0\0\0\0\0NSt3__210moneypunctIcLb0EEE\0\xA4d\0\x008U\0\0NSt3__210money_baseE\0\0\0\0\0\0\0\0\x88U\0\0\x98\0\0\x003\0\0v\0\0\x004\0\x005\0\x006\0\x007\0\x008\0\x009\0\0:\0\0;\0\0<\0\0(e\0\0\xA8U\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000U\0\0\0\0\0NSt3__210moneypunctIcLb1EEE\0\0\0\0\0\xFCU\0\0\x98\0\0\0=\0\0v\0\0\0>\0\0?\0\0@\0\0A\0\0B\0\0C\0\0D\0\0E\0\0F\0\0(e\0\0V\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000U\0\0\0\0\0NSt3__210moneypunctIwLb0EEE\0\0\0\0\0pV\0\0\x98\0\0\0G\0\0v\0\0\0H\0\0I\0\0J\0\0K\0\0L\0\0M\0\0N\0\0O\0\0P\0\0(e\0\0\x90V\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000U\0\0\0\0\0NSt3__210moneypunctIwLb1EEE\0\0\0\0\0\xC8V\0\0\x98\0\0\0Q\0\0v\0\0\0R\0\0S\0\0(e\0\0\xE8V\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\x000W\0\0\0\0\0\0NSt3__29money_getIcNS_19istreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0\0\0\xA4d\0\x008W\0\0NSt3__211__money_getIcEE\0\0\0\0\0\0\0\0pW\0\0\x98\0\0\0T\0\0v\0\0\0U\0\0V\0\0(e\0\0\x90W\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xD8W\0\0\0\0\0\0NSt3__29money_getIwNS_19istreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0\0\0\xA4d\0\0\xE0W\0\0NSt3__211__money_getIwEE\0\0\0\0\0\0\0\0X\0\0\x98\0\0\0W\0\0v\0\0\0X\0\0Y\0\0(e\0\x008X\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\x80X\0\0\0\0\0\0NSt3__29money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE\0\0\0\xA4d\0\0\x88X\0\0NSt3__211__money_putIcEE\0\0\0\0\0\0\0\0\xC0X\0\0\x98\0\0\0Z\0\0v\0\0\0[\0\0\\\0\0(e\0\0\xE0X\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0(Y\0\0\0\0\0\0NSt3__29money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE\0\0\0\xA4d\0\x000Y\0\0NSt3__211__money_putIwEE\0\0\0\0\0\0\0\0lY\0\0\x98\0\0\0]\0\0v\0\0\0^\0\0_\0\0\`\0\0(e\0\0\x8CY\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xA4Y\0\0\0\0\0NSt3__28messagesIcEE\0\0\0\0\xA4d\0\0\xACY\0\0NSt3__213messages_baseE\0\0\0\0\0\xE4Y\0\0\x98\0\0\0a\0\0v\0\0\0b\0\0c\0\0d\0\0(e\0\0Z\0\0\0\0\0\0\0\0\0\x9CI\0\0\0\0\0\xA4Y\0\0\0\0\0NSt3__28messagesIwEE\0\0\0\0S\0\0\0u\0\0\0n\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0M\0\0\0o\0\0\0n\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0T\0\0\0u\0\0\0e\0\0\0s\0\0\0d\0\0\0a\0\0\0y\0\0\0\0\0\0\0W\0\0\0e\0\0\0d\0\0\0n\0\0\0e\0\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\0\0\0\0\0J\0\0\0a\0\0\0n\0\0\0\0\0\0\0F\0\0\0e\0\0\0b\0\0\0\0\0\0\0M\0\0\0a\0\0\0r\0\0\0\0\0\0\0A\0\0\0p\0\0\0r\0\0\0\0\0\0\0J\0\0\0u\0\0\0n\0\0\0\0\0\0\0J\0\0\0u\0\0\0l\0\0\0\0\0\0\0A\0\0\0u\0\0\0g\0\0\0\0\0\0\0S\0\0\0e\0\0\0p\0\0\0\0\0\0\0O\0\0\0c\0\0\0t\0\0\0\0\0\0\0N\0\0\0o\0\0\0v\0\0\0\0\0\0\0D\0\0\0e\0\0\0c\0\0\0\0\0\0\0A\0\0\0M\0\0\0\0\0\0\0P\0\0\0M\0A\x94\xBB\v\x98
\0\0\0d\0\0\0\xE8\0\0'\0\0\xA0\x86\0@B\0\x80\x96\x98\0\0\xE1\xF5\0\xCA\x9A;\0\0\0\0\0\0\0\x0000010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899\0\0\0\0\0\0\0\x00000000010010001101000101011001111000100110101011110011011110111100010203040506071011121314151617202122232425262730313233343536374041424344454647505152535455565760616263646566677071727374757677000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff\0\0\0\0\0\0\0\0
\0\0\0\0\0\0\0d\0\0\0\0\0\0\0\xE8\0\0\0\0\0\0'\0\0\0\0\0\0\xA0\x86\0\0\0\0\0@B\0\0\0\0\0\x80\x96\x98\0\0\0\0\0\0\xE1\xF5\0\0\0\0\0\xCA\x9A;\0\0\0\0\0\xE4\vT\0\0\0\0\xE8vH\0\0\0\0\xA5\xD4\xE8\0\0\0\0\xA0rN \0\0\0@z\xF3Z\0\0\0\x80\xC6\xA4~\x8D\0\0\0\xC1o\xF2\x86#\0\0\0\x8A]xEc\0\0d\xA7\xB3\xB6\xE0\r\0\0\xE8\x89#\xC7\x8A\xA4d\0\0\xF8a\0\0NSt3__214__shared_countE\0\0\0\0hf\0\0\xCCd\0\0$b\0\0\x98e\0\0N10__cxxabiv116__shim_type_infoE\0\0\0\0\xCCd\0\0Tb\0\0b\0\0N10__cxxabiv117__class_type_infoE\0\0\0\xCCd\0\0\x84b\0\0b\0\0N10__cxxabiv117__pbase_type_infoE\0\0\0\xCCd\0\0\xB4b\0\0xb\0\0N10__cxxabiv119__pointer_type_infoE\0\xCCd\0\0\xE4b\0\0b\0\0N10__cxxabiv120__function_type_infoE\0\0\0\0\xCCd\0\0c\0\0xb\0\0N10__cxxabiv129__pointer_to_member_type_infoE\0\0\0\0\0\0\0dc\0\0g\0\0h\0\0i\0\0j\0\0k\0\0\xCCd\0\0pc\0\0b\0\0N10__cxxabiv123__fundamental_type_infoE\0Pc\0\0\xA0c\0\0v\0Dn\0\0\0\0Pc\0\0\xB0c\0\0b\0\0\0Pc\0\0\xBCc\0\0c\0\0\0Pc\0\0\xC8c\0\0h\0\0\0Pc\0\0\xD4c\0\0a\0\0\0Pc\0\0\xE0c\0\0s\0\0\0Pc\0\0\xECc\0\0t\0\0\0Pc\0\0\xF8c\0\0i\0\0\0Pc\0\0d\0\0j\0\0\0Pc\0\0d\0\0l\0\0\0Pc\0\0d\0\0m\0\0\0Pc\0\0(d\0\0x\0\0\0Pc\0\x004d\0\0y\0\0\0Pc\0\0@d\0\0f\0\0\0Pc\0\0Ld\0\0d\0\0\0\0\0\0\0ld\0\0g\0\0l\0\0i\0\0j\0\0m\0\0\xCCd\0\0xd\0\0b\0\0N10__cxxabiv116__enum_type_infoE\0\0\0\0\0\0\0\0Hb\0\0g\0\0n\0\0i\0\0j\0\0o\0\0p\0\0q\0\0r\0\0\0\0\0\0\xECd\0\0g\0\0s\0\0i\0\0j\0\0o\0\0t\0\0u\0\0v\0\0\xCCd\0\0\xF8d\0\0Hb\0\0N10__cxxabiv120__si_class_type_infoE\0\0\0\0\0\0\0\0He\0\0g\0\0w\0\0i\0\0j\0\0o\0\0x\0\0y\0\0z\0\0\xCCd\0\0Te\0\0Hb\0\0N10__cxxabiv121__vmi_class_type_infoE\0\0\0\0\0\0\0\xA8b\0\0g\0\0{\0\0i\0\0j\0\0|\0\0\xA4d\0\0\xA0e\0\0St9type_info\0A\xB1\xCB\v\b \0\0\0\0\0\0\0A\xC4\xCB\v1\0A\xDC\xCB\v2\0\0\x003\0\0\0\xF8g\0\0\0\0A\xF4\xCB\v\0A\x84\xCC\v\xFF\xFF\xFF\xFF
\0A\xC8\xCC\v!\xB8e\0\0@v\0%m/%d/%y\0\0\0\b%H:%M:%S\0\0\0\b\0A\xF4\xCC\ve\0A\x8C\xCD\v
2\0\0\0f\0\x004v\0A\xA4\xCD\v\0A\xB4\xCD\v\b\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\0A\xF8\xCD\vhf`)),ue((await k(oe)).instance))})(),(function(){function ue(){var oe;if(r.calledRun=!0,!f){if(C=!0,aU.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;)J();D(z),r.setStatus?(r.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>r.setStatus(""),1),ue()},1)):ue()})(),C?o=r:o=new Promise((ue,oe)=>{_=ue,S=oe}),o}var eC=(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},t3e=e=>1/(1+Math.exp(-e)),n3e=e=>t=>t*e+.5,i3e=(e,t,n)=>{let i=n?.colorScaleFactor??.282;return{numPoints:t.numPoints,shDegree:t.shDegree,antialiased:t.antialiased,positions:eC(e,t.positions),scales:eC(e,t.scales,Math.exp),rotations:eC(e,t.rotations),alphas:eC(e,t.alphas,t3e),colors:eC(e,t.colors,n3e(i)),sh:eC(e,t.sh)}},o3e=(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))},Vue=async(e,t)=>{var n;let i=await e3e(),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=i3e(i,a,t);return o3e(i,a),c}catch(s){throw s}finally{r!==null&&i._free(r)}};var r3e=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var s3e=[0,9,24,45],a3e=14,c3e=1.6*1024*1024*1024;function l3e(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 d3e(e,t){let n=a3e+(s3e[t]??0);return e*n*Float32Array.BYTES_PER_ELEMENT*2}var t4=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=ut.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=ut.LOADING,this._promise=u3e(this),this._promise)}process(t){if(this._state===ut.READY)return!0;if(this._state!==ut.PROCESSING||(l(this._spzError)&&n4(this,this._spzError),!l(this._bufferViewTypedArray))||l(this._decodePromise))return!1;let n=l3e(this._gltf,this._primitive);if(l(n)){let o=d3e(n.numPoints,n.shDegree);if(o>c3e){let r=Math.round(o/1048576);return n4(this,new le(`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=Vue(this._bufferViewTypedArray,{unpackOptions:{coordinateSystem:"UNSPECIFIED"}});if(!l(i))return!1;this._decodePromise=m3e(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 u3e(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=ut.PROCESSING,e)}catch(n){if(e.isDestroyed())return;n4(e,n)}}function n4(e,t){throw e.unload(),e._state=ut.FAILED,e.getError("Failed to load SPZ",t)}async function m3e(e,t){try{let n=await t;return e.isDestroyed()?void 0:(e.unload(),e._decodedData={gcloud:n},e._state=ut.READY,e._baseResource)}catch(n){if(e.isDestroyed())return;e._spzError=n}}var jv=t4;var sVn=x(T(),1);var $Cn=x(T(),1);var XCn=x(T(),1);function Qv(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=ze(e.extras,!0),this._extensions=ze(e.extensions,!0)}Qv.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=yp.fromJson({id:o,property:n.properties[o],enums:e.enums});i[o]=r}return new Qv({id:t,name:n.name,description:n.description,properties:i,extras:n.extras,extensions:n.extensions})};Object.defineProperties(Qv.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}}});Qv.BATCH_TABLE_CLASS_NAME="_batchTable";var Hh=Qv;var zCn=x(T(),1);var MCn=x(T(),1);function U5(e){e=e??B.EMPTY_OBJECT;let t=e.value,n=e.name;this._value=t,this._name=n,this._description=e.description,this._extras=ze(e.extras,!0),this._extensions=ze(e.extensions,!0)}U5.fromJson=function(e){return new U5({value:e.value,name:e.name,description:e.description,extras:e.extras,extensions:e.extensions})};Object.defineProperties(U5.prototype,{value:{get:function(){return this._value}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var qv=U5;function D5(e){e=e??B.EMPTY_OBJECT;let t=e.id,n=e.values,i={},o={},r=n.length;for(let a=0;a<r;++a){let c=n[a];i[c.value]=c.name,o[c.name]=c.value}let s=e.valueType??Pt.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=ze(e.extras,!0),this._extensions=ze(e.extensions,!0)}D5.fromJson=function(e){e=e??B.EMPTY_OBJECT;let t=e.id,n=e.enum,i=n.values.map(function(o){return qv.fromJson(o)});return new D5({id:t,values:i,valueType:Pt[n.valueType],name:n.name,description:n.description,extras:n.extras,extensions:n.extensions})};Object.defineProperties(D5.prototype,{values:{get:function(){return this._values}},namesByValue:{get:function(){return this._namesByValue}},valuesByName:{get:function(){return this._valuesByName}},valueType:{get:function(){return this._valueType}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var $v=D5;function O5(e){e=e??B.EMPTY_OBJECT;let t=e.classes??{},n=e.enums??{};this._classes=t,this._enums=n,this._id=e.id,this._name=e.name,this._description=e.description,this._version=e.version,this._extras=ze(e.extras,!0),this._extensions=ze(e.extensions,!0)}O5.fromJson=function(e){let t={};if(l(e.enums))for(let i in e.enums)e.enums.hasOwnProperty(i)&&(t[i]=$v.fromJson({id:i,enum:e.enums[i]}));let n={};if(l(e.classes))for(let i in e.classes)e.classes.hasOwnProperty(i)&&(n[i]=Hh.fromJson({id:i,class:e.classes[i],enums:t}));return new O5({id:e.id,name:e.name,description:e.description,version:e.version,classes:n,enums:t,extras:e.extras,extensions:e.extensions})};Object.defineProperties(O5.prototype,{classes:{get:function(){return this._classes}},enums:{get:function(){return this._enums}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},version:{get:function(){return this._version}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});var Ml=O5;var i4=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)?Ml.fromJson(n):void 0,this._resource=i,this._cacheKey=o,this._state=ut.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=h3e(this),this._promise)}unload(){this._schema=void 0}};async function h3e(e){let t=e._resource;e._state=ut.LOADING;try{let n=await t.fetchJson();return e.isDestroyed()?void 0:(e._schema=Ml.fromJson(n),e._state=ut.READY,e)}catch(n){if(e.isDestroyed())return;e._state=ut.FAILED;let i=`Failed to load schema: ${t.url}`;throw e.getError(i,n)}}var Ay=i4;var hVn=x(T(),1);var Zm={};function tC(e){return tp(e.url)}function eF(e){let{byteOffset:t,byteLength:n}=e;if(_i(e,"EXT_meshopt_compression")){let i=e.extensions.EXT_meshopt_compression;t=i.byteOffset??0,n=i.byteLength}return`${t}-${t+n}`}function f3e(e,t){let n=t.byteOffset+e.byteOffset,{componentType:i,type:o,count:r}=e;return`${n}-${i}-${o}-${r}`}function Rue(e,t){return`${tC(e)}-buffer-id-${t}`}function nC(e,t,n,i){if(l(e.uri)){let o=i.getDerivedResource({url:e.uri});return tC(o)}return Rue(n,t)}function o4(e,t,n,i){let o=t.bufferView,r=e.bufferViews[o],s=r.buffer,a=e.buffers[s],c=nC(a,s,n,i),d=eF(r);return`${c}-range-${d}`}function Eue(e,t,n,i){let r=e.bufferViews[0],s=r.buffer,a=e.buffers[s],c=nC(a,s,n,i),d=eF(r);return`${c}-range-${d}`}function Gue(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 tC(p)}let a=e.bufferViews[r],c=a.buffer,d=e.buffers[c],u=nC(d,c,n,i),h=eF(a);return`${u}-range-${h}`}function p3e(e,t){let n=Ed.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:${tC(n)}`};Zm.getExternalBufferCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{resource:t}=e;return`external-buffer:${tC(t)}`};Zm.getEmbeddedBufferCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{parentResource:t,bufferId:n}=e;return`embedded-buffer:${Rue(t,n)}`};Zm.getGltfCacheKey=function(e){e=e??B.EMPTY_OBJECT;let{gltfResource:t}=e;return`gltf:${tC(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];_i(r,"EXT_meshopt_compression")&&(s=r.extensions.EXT_meshopt_compression.buffer);let c=nC(a,s,i,o),d=eF(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:${o4(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:${Eue(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:h=!1}=e,p="";if(d&&(p+="-dequantize"),u&&(p+="-buffer",p+=`-context-${o.context.id}`),h&&(p+="-typed-array"),l(s))return`vertex-buffer:${o4(t,s,n,i)}-draco-${c}${p}`;if(a)return`vertex-buffer:${Eue(t,a,n,i)}-spz-${c}${p}`;let b=t.bufferViews[r],f=b.buffer,y=t.buffers[f],_=nC(y,f,n,i),S=eF(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:${o4(t,s,i,o)}-draco${d}`;let u=t.accessors[n],h=u.bufferView,p=t.bufferViews[h],b=p.buffer,f=t.buffers[b],y=nC(f,b,i,o),_=f3e(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:${Gue(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=Ed.getImageIdFromTexture({gltf:t,textureId:a,supportedImageFormats:r}),d=Gue(t,c,i,o),u=p3e(t,n);return`texture:${d}-sampler-${u}-context-${s.context.id}`};var kl=Zm;var bVn=x(T(),1);function tF(){this.geometryByteLength=0,this.texturesByteLength=0,this._geometrySizes={},this._textureSizes={}}tF.prototype.clear=function(){this.geometryByteLength=0,this.texturesByteLength=0,this._geometrySizes={},this._textureSizes={}};tF.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};tF.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};tF.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 nF=tF;function Fn(){}Fn.cacheEntries={};Fn.statistics=new nF;function b3e(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 b3e(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=kl.getSchemaCacheKey({schema:t,resource:n}),o=Fn.get(i);return l(o)?o:(o=new Ay({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=kl.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=kl.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=kl.getGltfCacheKey({gltfResource:t}),s=Fn.get(r);return l(s)?s:(s=new KZ({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=kl.getBufferViewCacheKey({gltf:t,bufferViewId:n,gltfResource:i,baseResource:o}),s=Fn.get(r);return l(s)?s:(s=new DZ({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=kl.getDracoCacheKey({gltf:t,draco:i,gltfResource:o,baseResource:r}),a=Fn.get(s);return l(a)?a:(a=new OZ({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=kl.getSpzCacheKey({gltf:t,primitive:n,gltfResource:o,baseResource:r}),a=Fn.get(s);return l(a)?a:(a=new jv({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:h=!0,dequantize:p=!1,loadBuffer:b=!1,loadTypedArray:f=!1}=e,y=kl.getVertexBufferCacheKey({gltf:t,gltfResource:n,baseResource:i,frameState:o,bufferViewId:r,draco:a,spz:c,attributeSemantic:d,dequantize:p,loadBuffer:b,loadTypedArray:f}),_=Fn.get(y);return l(_)?_:(_=new $Z({resourceCache:Fn,gltf:t,gltfResource:n,baseResource:i,bufferViewId:r,primitive:s,draco:a,spz:c,attributeSemantic:d,accessorId:u,cacheKey:y,asynchronous:h,dequantize:p,loadBuffer:b,loadTypedArray:f}),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,h=kl.getIndexBufferCacheKey({gltf:t,accessorId:n,gltfResource:i,baseResource:o,frameState:r,draco:a,loadBuffer:d,loadTypedArray:u}),p=Fn.get(h);return l(p)?p:(p=new zZ({resourceCache:Fn,gltf:t,accessorId:n,gltfResource:i,baseResource:o,primitive:s,draco:a,cacheKey:h,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=kl.getImageCacheKey({gltf:t,imageId:n,gltfResource:i,baseResource:o}),s=Fn.get(r);return l(s)?s:(s=new BZ({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=kl.getTextureCacheKey({gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,frameState:s}),d=Fn.get(c);return l(d)?d:(d=new qZ({resourceCache:Fn,gltf:t,textureInfo:n,gltfResource:i,baseResource:o,supportedImageFormats:r,cacheKey:c,asynchronous:a}),Fn.add(d))};Fn.clearForSpecs=function(){let e=[$Z,zZ,OZ,qZ,BZ,DZ,s_,Ay,KZ],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 vi=Fn;function tc(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(tc.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}}});tc.prototype.tileIsAvailableAtIndex=function(e){return this._tileAvailability.getBit(e)};tc.prototype.tileIsAvailableAtCoordinates=function(e){let t=this.getTileIndex(e);return this.tileIsAvailableAtIndex(t)};tc.prototype.contentIsAvailableAtIndex=function(e,t){return t=t??0,this._contentAvailabilityBitstreams[t].getBit(e)};tc.prototype.contentIsAvailableAtCoordinates=function(e,t){let n=this.getTileIndex(e);return this.contentIsAvailableAtIndex(n,t)};tc.prototype.childSubtreeIsAvailableAtIndex=function(e){return this._childSubtreeAvailability.getBit(e)};tc.prototype.childSubtreeIsAvailableAtCoordinates=function(e){let t=this.getChildSubtreeIndex(e);return this.childSubtreeIsAvailableAtIndex(t)};tc.prototype.getLevelOffset=function(e){let t=this._branchingFactor;return(Math.pow(t,e)-1)/(t-1)};tc.prototype.getParentMortonIndex=function(e){let t=2;return this._subdivisionScheme===Ws.OCTREE&&(t=3),e>>t};tc.fromSubtreeJson=async function(e,t,n,i,o){let r=new tc(e,i,o),s;l(t)?s={json:t,binary:void 0}:s=g3e(n);let a=s.json;r._subtreeJson=a;let c;if(_i(a,"3DTILES_metadata"))c=a.extensions["3DTILES_metadata"];else if(l(a.tileMetadata)){let A=a.tileMetadata;c=a.propertyTables[A]}let d=[];if(l(a.contentMetadata)){let A=a.contentMetadata.length;for(let Z=0;Z<A;Z++){let V=a.contentMetadata[Z];d.push(a.propertyTables[V])}}let u,h=i.metadataSchema,p=a.subtreeMetadata;if(l(p)){let A=p.class,Z=h.classes[A];u=new Pv({subtreeMetadata:p,class:Z})}r._metadata=u,r._tilePropertyTableJson=c,r._contentPropertyTableJsons=d;let b={constant:0};a.contentAvailabilityHeaders=[],_i(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=y3e(a.buffers),y=x3e(a.bufferViews,f);T3e(a,y),l(c)&&Lue(c,y);for(let A=0;A<d.length;A++){let Z=d[A];Lue(Z,y)}let _=await _3e(r,f,s.binary),S=A3e(y,_);return Z3e(r,a,i,S),l(c)&&(C3e(r,i,S),R3e(r)),V3e(r,i,S),E3e(r),r._ready=!0,r};function g3e(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=xr(e,i,o);i+=o;let a=e.subarray(i,i+r);return{json:s,binary:a}}function y3e(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 x3e(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 T3e(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 Lue(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 _3e(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=S3e(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 S3e(e,t){let i=e._resource.getDerivedResource({url:t.uri}),o=vi.getExternalBufferLoader({resource:i});e._bufferLoader=o;try{await o.load()}catch(r){if(o.isDestroyed())return;throw r}return o.typedArray}function A3e(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 Z3e(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=_i(t,"3DTILES_metadata"),d=l(e._tilePropertyTableJson),u=c||d;e._tileAvailability=r4(t.tileAvailability,i,s,u);let h=e._contentPropertyTableJsons.length>0;u=u||h;for(let p=0;p<t.contentAvailabilityHeaders.length;p++){let b=r4(t.contentAvailabilityHeaders[p],i,s,u);e._contentAvailabilityBitstreams.push(b)}e._childSubtreeAvailability=r4(t.childSubtreeAvailability,i,a)}function r4(e,t,n,i){if(l(e.constant))return new kZ({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 kZ({bitstream:o,lengthBits:n,availableCount:e.availableCount,computeAvailableCountEnabled:i})}function C3e(e,t,n){let i=e._tilePropertyTableJson,o=e._tileAvailability.availableCount,r=t.metadataSchema,s=i.class,a=r.classes[s];e._tileMetadataTable=new Sm({class:a,count:o,properties:i.properties,bufferViews:n})}function V3e(e,t,n){let i=e._contentPropertyTableJsons,o=e._contentAvailabilityBitstreams,r=t.metadataSchema,s=e._contentMetadataTables;for(let a=0;a<i.length;a++){let c=i[a],u=o[a].availableCount,h=c.class,p=r.classes[h],b=new Sm({class:p,count:u,properties:c.properties,bufferViews:n});s.push(b)}}function Wue(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 R3e(e){let t=Wue(e._tileAvailability);e._tileJumpBuffer=t}function E3e(e){let t=e._contentJumpBuffers,n=e._contentAvailabilityBitstreams;for(let i=0;i<n.length;i++){let o=n[i],r=Wue(o);t.push(r)}}tc.prototype.getTileIndex=function(e){let t=e.level-this._implicitCoordinates.level;if(t<0||this._subtreeLevels<=t)throw new le("level is out of bounds for this subtree");return e.getSubtreeCoordinates().getOffsetCoordinates(e).tileIndex};tc.prototype.getChildSubtreeIndex=function(e){if(e.level-this._implicitCoordinates.level!==this._implicitCoordinates.subtreeLevels)throw new le("level is out of bounds for this subtree");return e.getParentSubtreeCoordinates().getOffsetCoordinates(e).mortonIndex};function G3e(e,t){if(!l(e._tileMetadataTable))return;let n=e.getTileIndex(t);if(e._tileAvailability.getBit(n))return e._tileJumpBuffer[n]}function L3e(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]}tc.prototype.getTileMetadataView=function(e){let t=G3e(this,e);if(!l(t))return;let n=this._tileMetadataTable;return new UZ({class:n.class,metadataTable:n,entityId:t,propertyTableJson:this._tilePropertyTableJson})};tc.prototype.getContentMetadataView=function(e,t){let n=L3e(this,e,t);if(!l(n))return;let i=this._contentMetadataTables[t],o=this._contentPropertyTableJsons[t];return new UZ({class:i.class,metadataTable:i,entityId:n,contentIndex:t,propertyTableJson:o})};tc.prototype.isDestroyed=function(){return!1};tc.prototype.destroy=function(){return l(this._bufferLoader)&&vi.unload(this._bufferLoader),me(this)};var db=tc;var HVn=x(T(),1),vue={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(vue);var Cm=vue;var jVn=x(T(),1);var Zy={};Zy.parseAllBoundingVolumeSemantics=function(e,t){return{boundingVolume:Zy.parseBoundingVolumeSemantic(e,t),minimumHeight:Zy._parseMinimumHeight(e,t),maximumHeight:Zy._parseMaximumHeight(e,t)}};Zy.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}};Zy._parseMinimumHeight=function(e,t){let n=`${e}_MINIMUM_HEIGHT`;return t.getPropertyBySemantic(n)};Zy._parseMaximumHeight=function(e,t){let n=`${e}_MAXIMUM_HEIGHT`;return t.getPropertyBySemantic(n)};var Cy=Zy;function Ul(e,t,n){let i=t.implicitTileset,o=t.implicitCoordinates;this._implicitTileset=i,this._implicitCoordinates=o,this._implicitSubtree=void 0,this._tileset=e,this._tile=t,this._resource=n,this._metadata=void 0,this.featurePropertiesDirty=!1,this._group=void 0;let r=o.getTemplateValues(),s=i.subtreeUriTemplate.getDerivedResource({templateValues:r});this._url=s.getUrlComponent(!0),this._ready=!1}Object.defineProperties(Ul.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._url}},metadata:{get:function(){},set:function(){}},batchTable:{get:function(){}},group:{get:function(){return this._group},set:function(e){this._group=e}}});Ul.fromSubtreeJson=async function(e,t,n,i,o,r){r=r??0;let s;l(o)&&(s=new Uint8Array(o,r));let a=t.implicitTileset,c=t.implicitCoordinates,d=await db.fromSubtreeJson(n,i,s,a,c),u=new Ul(e,t,n);return u._implicitSubtree=d,W3e(u,d),u._ready=!0,u};function W3e(e,t){let n=e._tile,i=e._implicitCoordinates.childIndex,o=F3e(e,t,n,i),r=e._tileset.statistics;n.children.push(o.rootTile),r.numberOfTilesTotal++;let s=v3e(e,t,o.bottomRow);for(let a=0;a<s.length;a++){let c=s[a],d=c.tile,u=U3e(e,d,c.childIndex);d.children.push(u),r.numberOfTilesTotal++}}function v3e(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 F3e(e,t,n,i){let s=Fue(e,t,n,i,0,!0),a=e._tileset.statistics,c=[s],d=[],u=e._implicitTileset;for(let h=1;h<u.subtreeLevels;h++){let p=t.getLevelOffset(h),b=u.branchingFactor*c.length;for(let f=0;f<b;f++){let y=p+f;if(!t.tileIsAvailableAtIndex(y)){d.push(void 0);continue}let _=t.getParentMortonIndex(f),S=c[_],A=f%u.branchingFactor,Z=Fue(e,t,S,A,y);S.children.push(Z),a.numberOfTilesTotal++,d.push(Z)}c=d,d=[]}return{rootTile:s,bottomRow:c}}function Iue(e,t,n){let i=Cm.TILE_GEOMETRIC_ERROR;return l(e)&&e.hasPropertyBySemantic(i)?e.getPropertyBySemantic(i):t.geometricError/Math.pow(2,n.level)}function Fue(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 h=t.contentPropertyTableJsons.length,p=!1;for(let E=0;E<h;E++)if(t.contentIsAvailableAtCoordinates(a,E)){p=!0;break}let b=X3e(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=N3e(b,X);l(N)&&(I.boundingVolume=N),f.push(Rt(I,s.contentHeaders[E]))}let y=Iue(c,s,a),_={boundingVolume:b,geometricError:y,refine:s.refine,contents:f},S=!0,A=ze(s.tileHeader,S);delete A.boundingVolume,delete A.transform,delete A.metadata;let Z=Rt(_,A,S),V=wue(e,s.baseResource,Z,n);return V.implicitCoordinates=a,V.implicitSubtree=t,V.metadata=c,V.hasImplicitContentMetadata=p,V}function B5(e,t){return l(e)&&l(t)&&(l(t.minimumHeight)||l(t.maximumHeight))&&(_i(e,"3DTILES_bounding_volume_S2")||l(e.region))}function a4(e,t){l(t)&&(_i(e,"3DTILES_bounding_volume_S2")?P3e(e.extensions["3DTILES_bounding_volume_S2"],t.minimumHeight,t.maximumHeight):l(e.region)&&I3e(e.region,t.minimumHeight,t.maximumHeight))}function I3e(e,t,n){l(t)&&(e[4]=t),l(n)&&(e[5]=n)}function P3e(e,t,n){l(t)&&(e.minimumHeight=t),l(n)&&(e.maximumHeight=n)}function X3e(e,t,n,i,o,r){let s;return!l(r)||!l(r.boundingVolume)||!B5(r.boundingVolume,r)&&B5(e.boundingVolume,r)?s=Pue(e,t,n,i??!1,o):s=r.boundingVolume,a4(s,r),s}function N3e(e,t){let n;return l(t)&&(n=t.boundingVolume),B5(n,t)?a4(n,t):B5(e,t)&&(n=ze(e,!0),a4(n,t)),n}function Pue(e,t,n,i,o){let r=e.boundingVolume;return _i(r,"3DTILES_bounding_volume_S2")?Xue(i,o,n,t.level,t.x,t.y,t.z):l(r.region)?{region:Yue(r.region,t.level,t.x,t.y,t.z)}:{box:Nue(r.box,t.level,t.x,t.y,t.z)}}function Xue(e,t,n,i,o,r,s){let a=t._boundingVolume;if(e)return{extensions:{"3DTILES_bounding_volume_S2":{token:ob.getTokenFromId(a.s2Cell._cellId),minimumHeight:a.minimumHeight,maximumHeight:a.maximumHeight}}};let c=Number(t._boundingVolume.s2Cell._cellId>>BigInt(61)),d=c%2===0?wZ.encode2D(i,o,r):wZ.encode2D(i,r,o),u=ob.fromFacePositionLevel(c,BigInt(d),i),h,p;if(l(s)){let b=(a.maximumHeight+a.minimumHeight)/2;h=n<4?a.minimumHeight:b,p=n<4?b:a.maximumHeight}else h=a.minimumHeight,p=a.maximumHeight;return{extensions:{"3DTILES_bounding_volume_S2":{token:ob.getTokenFromId(u._cellId),minimumHeight:h,maximumHeight:p}}}}var Y3e=new m,w3e=new m,s4=new m,M3e=new q;function Nue(e,t,n,i,o){if(t===0)return e;let r=m.unpack(e,0,w3e),s=q.unpack(e,3,M3e),a=Math.pow(2,-t),c=-1+(2*n+1)*a,d=-1+(2*i+1)*a,u=0,h=m.fromElements(a,a,1,Y3e);l(o)&&(u=-1+(2*o+1)*a,h.z=a);let p=m.fromElements(c,d,u,s4);p=q.multiplyByVector(s,p,s4),p=m.add(p,r,s4);let b=q.clone(s);b=q.multiplyByScale(b,h,b);let f=new Array(12);return m.pack(p,f),q.pack(b,f,3),f}var k3e=new ae;function Yue(e,t,n,i,o){if(t===0)return e.slice();let r=ae.unpack(e,0,k3e),s=e[4],a=e[5],c=Math.pow(2,-t),d=c*r.width,u=W.negativePiToPi(r.west+n*d),h=W.negativePiToPi(u+d),p=c*r.height,b=W.negativePiToPi(r.south+i*p),f=W.negativePiToPi(b+p),y=s,_=a;if(l(o)){let S=c*(a-s);y+=o*S,_=y+S}return[u,b,h,f,y,_]}function U3e(e,t,n){let i=e._implicitTileset,o=t.implicitCoordinates.getChildCoordinates(n),r=Pue(i,o,n,!1,t),s=Iue(void 0,i,o),a=i.subtreeUriTemplate.getDerivedResource({templateValues:o.getTemplateValues()}).url,c={boundingVolume:r,geometricError:s,refine:i.refine,contents:[{uri:a}]},d=wue(e,i.baseResource,c,t);return d.implicitTileset=i,d.implicitCoordinates=o,d}function wue(e,t,n,i){let o=e._tile.constructor;return new o(e._tileset,t,n,i)}Ul.prototype.hasProperty=function(e,t){return!1};Ul.prototype.getFeature=function(e){};Ul.prototype.applyDebugSettings=function(e,t){};Ul.prototype.applyStyle=function(e){};Ul.prototype.update=function(e,t){};Ul.prototype.pick=function(e,t,n){};Ul.prototype.isDestroyed=function(){return!1};Ul.prototype.destroy=function(){return this._implicitSubtree=this._implicitSubtree&&this._implicitSubtree.destroy(),me(this)};Ul._deriveBoundingBox=Nue;Ul._deriveBoundingRegion=Yue;Ul._deriveBoundingVolumeS2=Xue;var iC=Ul;var c8n=x(T(),1);var fRn=x(T(),1),Mue={NONE:0,REPEAT:1,MIRRORED_REPEAT:2};Object.freeze(Mue);var Gd=Mue;var qQn=x(T(),1);var YRn=x(T(),1);var yRn=x(T(),1);function oC(e,t){this._distance=t,this._normal=new kue(e,this),this.onChangeCallback=void 0,this.index=-1}Object.defineProperties(oC.prototype,{distance:{get:function(){return this._distance},set:function(e){l(this.onChangeCallback)&&e!==this._distance&&this.onChangeCallback(this.index),this._distance=e}},normal:{get:function(){return this._normal},set:function(e){l(this.onChangeCallback)&&!m.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),m.clone(e,this._normal._cartesian3)}}});oC.fromPlane=function(e,t){return l(t)?(t.normal=e.normal,t.distance=e.distance):t=new oC(e.normal,e.distance),t};oC.clone=function(e,t){return l(t)?(t.normal=e.normal,t.distance=e.distance,t):new oC(e.normal,e.distance)};function kue(e,t){this._clippingPlane=t,this._cartesian3=m.clone(e)}Object.defineProperties(kue.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 zs=oC;function jc(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?zue:Hue,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 zue(e){return e===zt.OUTSIDE}function Hue(e){return e===zt.INSIDE}Object.defineProperties(jc.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?zue:Hue)}},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 Uue(e,t){e._multipleDirtyPlanes=e._multipleDirtyPlanes||e._dirtyIndex!==-1&&e._dirtyIndex!==t,e._dirtyIndex=t}jc.prototype.add=function(e){let t=this._planes.length,n=this;e.onChangeCallback=function(i){Uue(n,i)},e.index=t,Uue(this,t),this._planes.push(e),this.planeAdded.raiseEvent(e,t)};jc.prototype.get=function(e){return this._planes[e]};function Kue(e,t){let n=e.length;for(let i=0;i<n;++i)if(nn.equals(e[i],t))return i;return-1}jc.prototype.contains=function(e){return Kue(this._planes,e)!==-1};jc.prototype.remove=function(e){let t=this._planes,n=Kue(t,e);if(n===-1)return!1;e instanceof zs&&(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 zs&&(r.index=o)}return this._multipleDirtyPlanes=!0,t.length=i,this.planeRemoved.raiseEvent(e,n),!0};jc.prototype.removeAll=function(){let e=this._planes,t=e.length;for(let n=0;n<t;++n){let i=e[n];i instanceof zs&&(i.onChangeCallback=void 0,i.index=-1),this.planeRemoved.raiseEvent(i,n)}this._multipleDirtyPlanes=!0,this._planes=[]};var D3e=new se,O3e=new se;function Due(e,t,n){let i=e._uint8View,o=e._planes,r=0;for(let s=t;s<n;++s){let a=o[s],c=cn.octEncodeToCartesian4(a.normal,O3e);i[r]=c.x,i[r+1]=c.y,i[r+2]=c.z,i[r+3]=c.w;let d=se.packFloat(a.distance,D3e);i[r+4]=d.x,i[r+5]=d.y,i[r+6]=d.z,i[r+7]=d.w,r+=8}}function Oue(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 Jue(e,t){let n=Lt.maximumTextureSize;return t.x=Math.min(e,n),t.y=Math.ceil(e/t.x),t}var B3e=new M;jc.prototype.update=function(e){let t=this._clippingPlanesTexture,n=e.context,i=jc.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=Jue(o,B3e);s.y*=2,i?(t=new Et({context:n,width:s.x,height:s.y,pixelFormat:Ke.RGBA,pixelDatatype:Oe.FLOAT,sampler:Ut.NEAREST,flipY:!1}),this._float32View=new Float32Array(s.x*s.y*4)):(t=new Et({context:n,width:s.x,height:s.y,pixelFormat:Ke.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,sampler:Ut.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?(Oue(this,0,this._planes.length),t.copyFrom({source:{width:t.width,height:t.height,arrayBufferView:this._float32View}})):(Due(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),Oue(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),Due(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 z3e=new F,Bue=new nn(m.UNIT_X,0);jc.prototype.computeIntersectionWithBoundingVolume=function(e,t){let n=this._planes,i=n.length,o=this.modelMatrix;l(t)&&(o=F.multiply(t,o,z3e));let r=zt.INSIDE;!this.unionClippingRegions&&i>0&&(r=zt.OUTSIDE);for(let s=0;s<i;++s){let a=n[s];nn.transform(a,o,Bue);let c=e.intersectPlane(Bue);if(c===zt.INTERSECTING)r=c;else if(this._testIntersection(c))return c}return r};jc.setOwner=function(e,t,n){e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),l(e)&&(e._owner=t,t[n]=e))};jc.useFloatTexture=function(e){return e.floatingPointTexture};jc.getTextureResolution=function(e,t,n){let i=e.texture;if(l(i))return n.x=i.width,n.y=i.height,n;let o=jc.useFloatTexture(t)?e.length:e.length*2,r=Jue(o,n);return r.y*=2,r};jc.prototype.isDestroyed=function(){return!1};jc.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),me(this)};var as=jc;var KEn=x(T(),1);var AEn=x(T(),1);var fEn=x(T(),1);var G1n=x(T(),1);var t1n=x(T(),1);var MRn=x(T(),1);function d4(e,t,n=2){let i=t&&t.length,o=i?t[0]*n:e.length,r=Que(e,0,o,n,!0),s=[];if(!r||r.next===r.prev)return s;let a,c,d;if(i&&(r=Q3e(e,t,r,n)),e.length>80*n){a=e[0],c=e[1];let u=a,h=c;for(let p=n;p<o;p+=n){let b=e[p],f=e[p+1];b<a&&(a=b),f<c&&(c=f),b>u&&(u=b),f>h&&(h=f)}d=Math.max(u-a,h-c),d=d!==0?32767/d:0}return oF(r,s,n,a,c,d,0),s}function Que(e,t,n,i,o){let r;if(o===cze(e,t,n,i)>0)for(let s=t;s<n;s+=i)r=jue(s/i|0,e[s],e[s+1],r);else for(let s=n-i;s>=t;s-=i)r=jue(s/i|0,e[s],e[s+1],r);return r&&rC(r,r.next)&&(sF(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&&(rC(n,n.next)||cs(n.prev,n,n.next)===0)){if(sF(n),n=t=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==t);return t}function oF(e,t,n,i,o,r,s){if(!e)return;!s&&r&&nze(e,i,o,r);let a=e;for(;e.prev!==e.next;){let c=e.prev,d=e.next;if(r?K3e(e,i,o,r):H3e(e)){t.push(c.i,e.i,d.i),sF(e),e=d.next,a=d.next;continue}if(e=d,e===a){s?s===1?(e=J3e(f_(e),t),oF(e,t,n,i,o,r,2)):s===2&&j3e(e,t,n,i,o,r):oF(f_(e),t,n,i,o,r,1);break}}}function H3e(e){let t=e.prev,n=e,i=e.next;if(cs(t,n,i)>=0)return!1;let o=t.x,r=n.x,s=i.x,a=t.y,c=n.y,d=i.y,u=Math.min(o,r,s),h=Math.min(a,c,d),p=Math.max(o,r,s),b=Math.max(a,c,d),f=i.next;for(;f!==t;){if(f.x>=u&&f.x<=p&&f.y>=h&&f.y<=b&&iF(o,a,r,c,s,d,f.x,f.y)&&cs(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function K3e(e,t,n,i){let o=e.prev,r=e,s=e.next;if(cs(o,r,s)>=0)return!1;let a=o.x,c=r.x,d=s.x,u=o.y,h=r.y,p=s.y,b=Math.min(a,c,d),f=Math.min(u,h,p),y=Math.max(a,c,d),_=Math.max(u,h,p),S=c4(b,f,t,n,i),A=c4(y,_,t,n,i),Z=e.prevZ,V=e.nextZ;for(;Z&&Z.z>=S&&V&&V.z<=A;){if(Z.x>=b&&Z.x<=y&&Z.y>=f&&Z.y<=_&&Z!==o&&Z!==s&&iF(a,u,c,h,d,p,Z.x,Z.y)&&cs(Z.prev,Z,Z.next)>=0||(Z=Z.prevZ,V.x>=b&&V.x<=y&&V.y>=f&&V.y<=_&&V!==o&&V!==s&&iF(a,u,c,h,d,p,V.x,V.y)&&cs(V.prev,V,V.next)>=0))return!1;V=V.nextZ}for(;Z&&Z.z>=S;){if(Z.x>=b&&Z.x<=y&&Z.y>=f&&Z.y<=_&&Z!==o&&Z!==s&&iF(a,u,c,h,d,p,Z.x,Z.y)&&cs(Z.prev,Z,Z.next)>=0)return!1;Z=Z.prevZ}for(;V&&V.z<=A;){if(V.x>=b&&V.x<=y&&V.y>=f&&V.y<=_&&V!==o&&V!==s&&iF(a,u,c,h,d,p,V.x,V.y)&&cs(V.prev,V,V.next)>=0)return!1;V=V.nextZ}return!0}function J3e(e,t){let n=e;do{let i=n.prev,o=n.next.next;!rC(i,o)&&$ue(i,n,n.next,o)&&rF(i,o)&&rF(o,i)&&(t.push(i.i,n.i,o.i),sF(n),sF(n.next),n=e=o),n=n.next}while(n!==e);return f_(n)}function j3e(e,t,n,i,o,r){let s=e;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&rze(s,a)){let c=eme(s,a);s=f_(s,s.next),c=f_(c,c.next),oF(s,t,n,i,o,r,0),oF(c,t,n,i,o,r,0);return}a=a.next}s=s.next}while(s!==e)}function Q3e(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=Que(e,a,c,i,!1);d===d.next&&(d.steiner=!0),o.push(oze(d))}o.sort(q3e);for(let r=0;r<o.length;r++)n=$3e(o[r],n);return n}function q3e(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 $3e(e,t){let n=eze(e,t);if(!n)return t;let i=eme(n,e);return f_(i,i.next),f_(n,n.next)}function eze(e,t){let n=t,i=e.x,o=e.y,r=-1/0,s;if(rC(e,n))return n;do{if(rC(e,n.next))return n.next;if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){let h=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(h<=i&&h>r&&(r=h,s=n.x<n.next.x?n:n.next,h===i))return s}n=n.next}while(n!==t);if(!s)return null;let a=s,c=s.x,d=s.y,u=1/0;n=s;do{if(i>=n.x&&n.x>=c&&i!==n.x&&que(o<d?i:r,o,c,d,o<d?r:i,o,n.x,n.y)){let h=Math.abs(o-n.y)/(i-n.x);rF(n,e)&&(h<u||h===u&&(n.x>s.x||n.x===s.x&&tze(s,n)))&&(s=n,u=h)}n=n.next}while(n!==a);return s}function tze(e,t){return cs(e.prev,e,t.prev)<0&&cs(t.next,e,e.next)<0}function nze(e,t,n,i){let o=e;do o.z===0&&(o.z=c4(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,ize(o)}function ize(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 c4(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 oze(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 que(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 iF(e,t,n,i,o,r,s,a){return!(e===s&&t===a)&&que(e,t,n,i,o,r,s,a)}function rze(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!sze(e,t)&&(rF(e,t)&&rF(t,e)&&aze(e,t)&&(cs(e.prev,e,t.prev)||cs(e,t.prev,t))||rC(e,t)&&cs(e.prev,e,e.next)>0&&cs(t.prev,t,t.next)>0)}function cs(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function rC(e,t){return e.x===t.x&&e.y===t.y}function $ue(e,t,n,i){let o=H5(cs(e,t,n)),r=H5(cs(e,t,i)),s=H5(cs(n,i,e)),a=H5(cs(n,i,t));return!!(o!==r&&s!==a||o===0&&z5(e,n,t)||r===0&&z5(e,i,t)||s===0&&z5(n,e,i)||a===0&&z5(n,t,i))}function z5(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function H5(e){return e>0?1:e<0?-1:0}function sze(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&&$ue(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}function rF(e,t){return cs(e.prev,e,e.next)<0?cs(e,t,e.next)>=0&&cs(e,e.prev,t)>=0:cs(e,t,e.prev)<0||cs(e,e.next,t)<0}function aze(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 eme(e,t){let n=l4(e.i,e.x,e.y),i=l4(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 jue(e,t,n,i){let o=l4(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 sF(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 l4(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function cze(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 lze=new m,dze=new m,Vy={};Vy.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};Vy.computeWindingOrder2D=function(e){return Vy.computeArea2D(e)>0?Us.COUNTER_CLOCKWISE:Us.CLOCKWISE};Vy.triangulate=function(e,t){let n=M.packArray(e);return d4(n,t,2)};var ome=new m,rme=new m,sme=new m,tme=new m,nme=new m,ime=new m,ub=new m,ame=new M,cme=new M,lme=new M,sC=new M;Vy.computeSubdivision=function(e,t,n,i,o){o=o??W.RADIANS_PER_DEGREE;let r=l(i),s=n.slice(0),a,c=t.length,d=new Array(c*3),u=new Array(c*2),h=0,p=0;for(a=0;a<c;a++){let Z=t[a];if(d[h++]=Z.x,d[h++]=Z.y,d[h++]=Z.z,r){let V=i[a];u[p++]=V.x,u[p++]=V.y}}let b=[],f={},y=e.maximumRadius,_=W.chordLength(o,y),S=_*_;for(;s.length>0;){let Z=s.pop(),V=s.pop(),E=s.pop(),L=m.fromArray(d,E*3,ome),v=m.fromArray(d,V*3,rme),I=m.fromArray(d,Z*3,sme),X,N,g;r&&(X=M.fromArray(u,E*2,ame),N=M.fromArray(u,V*2,cme),g=M.fromArray(u,Z*2,lme));let C=m.multiplyByScalar(m.normalize(L,tme),y,tme),R=m.multiplyByScalar(m.normalize(v,nme),y,nme),G=m.multiplyByScalar(m.normalize(I,ime),y,ime),P=m.magnitudeSquared(m.subtract(C,R,ub)),Y=m.magnitudeSquared(m.subtract(R,G,ub)),O=m.magnitudeSquared(m.subtract(G,C,ub)),k=Math.max(P,Y,O),D,w,z;k>S?P===k?(D=`${Math.min(E,V)} ${Math.max(E,V)}`,a=f[D],l(a)||(w=m.add(L,v,ub),m.multiplyByScalar(w,.5,w),d.push(w.x,w.y,w.z),a=d.length/3-1,f[D]=a,r&&(z=M.add(X,N,sC),M.multiplyByScalar(z,.5,z),u.push(z.x,z.y))),s.push(E,a,Z),s.push(a,V,Z)):Y===k?(D=`${Math.min(V,Z)} ${Math.max(V,Z)}`,a=f[D],l(a)||(w=m.add(v,I,ub),m.multiplyByScalar(w,.5,w),d.push(w.x,w.y,w.z),a=d.length/3-1,f[D]=a,r&&(z=M.add(N,g,sC),M.multiplyByScalar(z,.5,z),u.push(z.x,z.y))),s.push(V,a,E),s.push(a,Z,E)):O===k&&(D=`${Math.min(Z,E)} ${Math.max(Z,E)}`,a=f[D],l(a)||(w=m.add(I,L,ub),m.multiplyByScalar(w,.5,w),d.push(w.x,w.y,w.z),a=d.length/3-1,f[D]=a,r&&(z=M.add(g,X,sC),M.multiplyByScalar(z,.5,z),u.push(z.x,z.y))),s.push(Z,a,V),s.push(a,E,V)):(b.push(E),b.push(V),b.push(Z))}let A={attributes:{position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:d})},indices:b,primitiveType:ve.TRIANGLES};return r&&(A.attributes.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:u})),new ft(A)};var uze=new pe,mze=new pe,hze=new pe,u4=new pe;Vy.computeRhumbLineSubdivision=function(e,t,n,i,o){o=o??W.RADIANS_PER_DEGREE;let r=l(i),s=n.slice(0),a,c=t.length,d=new Array(c*3),u=new Array(c*2),h=0,p=0;for(a=0;a<c;a++){let E=t[a];if(d[h++]=E.x,d[h++]=E.y,d[h++]=E.z,r){let L=i[a];u[p++]=L.x,u[p++]=L.y}}let b=[],f={},y=e.maximumRadius,_=W.chordLength(o,y),S=new Sc(void 0,void 0,e),A=new Sc(void 0,void 0,e),Z=new Sc(void 0,void 0,e);for(;s.length>0;){let E=s.pop(),L=s.pop(),v=s.pop(),I=m.fromArray(d,v*3,ome),X=m.fromArray(d,L*3,rme),N=m.fromArray(d,E*3,sme),g,C,R;r&&(g=M.fromArray(u,v*2,ame),C=M.fromArray(u,L*2,cme),R=M.fromArray(u,E*2,lme));let G=e.cartesianToCartographic(I,uze),P=e.cartesianToCartographic(X,mze),Y=e.cartesianToCartographic(N,hze);S.setEndPoints(G,P);let O=S.surfaceDistance;A.setEndPoints(P,Y);let k=A.surfaceDistance;Z.setEndPoints(Y,G);let D=Z.surfaceDistance,w=Math.max(O,k,D),z,J,ee,H,te;w>_?O===w?(z=`${Math.min(v,L)} ${Math.max(v,L)}`,a=f[z],l(a)||(J=S.interpolateUsingFraction(.5,u4),ee=(G.height+P.height)*.5,H=m.fromRadians(J.longitude,J.latitude,ee,e,ub),d.push(H.x,H.y,H.z),a=d.length/3-1,f[z]=a,r&&(te=M.add(g,C,sC),M.multiplyByScalar(te,.5,te),u.push(te.x,te.y))),s.push(v,a,E),s.push(a,L,E)):k===w?(z=`${Math.min(L,E)} ${Math.max(L,E)}`,a=f[z],l(a)||(J=A.interpolateUsingFraction(.5,u4),ee=(P.height+Y.height)*.5,H=m.fromRadians(J.longitude,J.latitude,ee,e,ub),d.push(H.x,H.y,H.z),a=d.length/3-1,f[z]=a,r&&(te=M.add(C,R,sC),M.multiplyByScalar(te,.5,te),u.push(te.x,te.y))),s.push(L,a,v),s.push(a,E,v)):D===w&&(z=`${Math.min(E,v)} ${Math.max(E,v)}`,a=f[z],l(a)||(J=Z.interpolateUsingFraction(.5,u4),ee=(Y.height+G.height)*.5,H=m.fromRadians(J.longitude,J.latitude,ee,e,ub),d.push(H.x,H.y,H.z),a=d.length/3-1,f[z]=a,r&&(te=M.add(R,g,sC),M.multiplyByScalar(te,.5,te),u.push(te.x,te.y))),s.push(E,a,L),s.push(a,v,L)):(b.push(v),b.push(L),b.push(E))}let V={attributes:{position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:d})},indices:b,primitiveType:ve.TRIANGLES};return r&&(V.attributes.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:u})),new ft(V)};Vy.scaleToGeodeticHeight=function(e,t,n,i){n=n??ie.default;let o=lze,r=dze;if(t=t??0,i=i??!0,l(e)){let s=e.length;for(let a=0;a<s;a+=3)m.fromArray(e,a,r),i&&(r=n.scaleToGeodeticSurface(r,r)),t!==0&&(o=n.geodeticSurfaceNormal(r,o),m.multiplyByScalar(o,t,o),m.add(r,o,r)),e[a]=r.x,e[a+1]=r.y,e[a+2]=r.z}return e};var Si=Vy;var i1n=x(T(),1);function Ry(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(Ry.prototype,{length:{get:function(){return this._length}}});Ry.prototype.enqueue=function(e){this._array.push(e),this._length++};Ry.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};Ry.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};Ry.prototype.contains=function(e){return this._array.indexOf(e)!==-1};Ry.prototype.clear=function(){this._array.length=this._offset=this._length=0};Ry.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)};var Ey=Ry;var Tr={};Tr.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};Tr.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};Tr.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]=Tr.unpackPolygonHierarchy(e,t,n),t=s[a].startingIndex,delete s[a].startingIndex;return{positions:r,holes:s,startingIndex:t}};var p_=new M;function mme(e,t,n,i){return M.subtract(t,e,p_),M.multiplyByScalar(p_,n/i,p_),M.add(e,p_,p_),[p_.x,p_.y]}var Gy=new m;function fze(e,t,n,i){return m.subtract(t,e,Gy),m.multiplyByScalar(Gy,n/i,Gy),m.add(e,Gy,Gy),[Gy.x,Gy.y,Gy.z]}Tr.subdivideLineCount=function(e,t,n){let o=m.distance(e,t)/n,r=Math.max(0,Math.ceil(W.log2(o)));return Math.pow(2,r)};var J5=new pe,j5=new pe,pze=new pe,bze=new m,K5=new Sc;Tr.subdivideRhumbLineCount=function(e,t,n,i){let o=e.cartesianToCartographic(t,J5),r=e.cartesianToCartographic(n,j5),a=new Sc(o,r,e).surfaceDistance/i,c=Math.max(0,Math.ceil(W.log2(a)));return Math.pow(2,c)};Tr.subdivideTexcoordLine=function(e,t,n,i,o,r){let s=Tr.subdivideLineCount(n,i,o),a=M.distance(e,t),c=a/s,d=r;d.length=s*2;let u=0;for(let h=0;h<s;h++){let p=mme(e,t,h*c,a);d[u++]=p[0],d[u++]=p[1]}return d};Tr.subdivideLine=function(e,t,n,i){let o=Tr.subdivideLineCount(e,t,n),r=m.distance(e,t),s=r/o;l(i)||(i=[]);let a=i;a.length=o*3;let c=0;for(let d=0;d<o;d++){let u=fze(e,t,d*s,r);a[c++]=u[0],a[c++]=u[1],a[c++]=u[2]}return a};Tr.subdivideTexcoordRhumbLine=function(e,t,n,i,o,r,s){let a=n.cartesianToCartographic(i,J5),c=n.cartesianToCartographic(o,j5);K5.setEndPoints(a,c);let d=K5.surfaceDistance/r,u=Math.max(0,Math.ceil(W.log2(d))),h=Math.pow(2,u),p=M.distance(e,t),b=p/h,f=s;f.length=h*2;let y=0;for(let _=0;_<h;_++){let S=mme(e,t,_*b,p);f[y++]=S[0],f[y++]=S[1]}return f};Tr.subdivideRhumbLine=function(e,t,n,i,o){let r=e.cartesianToCartographic(t,J5),s=e.cartesianToCartographic(n,j5),a=new Sc(r,s,e);if(l(o)||(o=[]),a.surfaceDistance<=i)return o.length=3,o[0]=t.x,o[1]=t.y,o[2]=t.z,o;let c=a.surfaceDistance/i,d=Math.max(0,Math.ceil(W.log2(c))),u=Math.pow(2,d),h=a.surfaceDistance/u,p=o;p.length=u*3;let b=0;for(let f=0;f<u;f++){let y=a.interpolateUsingSurfaceDistance(f*h,pze),_=e.cartographicToCartesian(y,bze);p[b++]=_.x,p[b++]=_.y,p[b++]=_.z}return p};var gze=new m,yze=new m,xze=new m,Tze=new m;Tr.scaleToGeodeticHeightExtruded=function(e,t,n,i,o){i=i??ie.default;let r=gze,s=yze,a=xze,c=Tze;if(l(e)&&l(e.attributes)&&l(e.attributes.position)){let d=e.attributes.position.values,u=d.length/2;for(let h=0;h<u;h+=3)m.fromArray(d,h,a),i.geodeticSurfaceNormal(a,r),c=i.scaleToGeodeticSurface(a,c),s=m.multiplyByScalar(r,n,s),s=m.add(c,s,s),d[h+u]=s.x,d[h+1+u]=s.y,d[h+2+u]=s.z,o&&(c=m.clone(a,c)),s=m.multiplyByScalar(r,t,s),s=m.add(c,s,s),d[h]=s.x,d[h+1]=s.y,d[h+2]=s.z}return e};Tr.polygonOutlinesFromHierarchy=function(e,t,n){let i=[],o=new Ey;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,m.equalsEpsilon,!0),d.length<3)continue;let u=c.holes?c.holes.length:0;for(r=0;r<u;r++){let h=c.holes[r],p=h.positions;if(t)for(a=p.length,s=0;s<a;++s)n.scaleToGeodeticSurface(p[s],p[s]);if(p=Yo(p,m.equalsEpsilon,!0),p.length<3)continue;i.push(p);let b=0;for(l(h.holes)&&(b=h.holes.length),s=0;s<b;s++)o.enqueue(h.holes[s])}i.push(d)}return i};var _ze=new pe;function Sze(e,t,n){let i=n.cartesianToCartographic(e,J5),o=n.cartesianToCartographic(t,j5);if(Math.sign(i.latitude)===Math.sign(o.latitude))return;K5.setEndPoints(i,o);let r=K5.findIntersectionWithLatitude(0,_ze);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 Aze(e,t,n,i){if(i===on.RHUMB)return Sze(e,t,n);let o=ai.lineSegmentPlane(e,t,nn.ORIGIN_XY_PLANE);if(l(o))return n.scaleToGeodeticSurface(o,o)}var Zze=new pe;function Cze(e,t,n){let i=[],o,r,s,a,c,d=0;for(;d<e.length;){o=e[d],r=e[(d+1)%e.length],s=W.sign(o.z),a=W.sign(r.z);let u=h=>t.cartesianToCartographic(h,Zze).longitude;if(s===0)i.push({position:d,type:s,visited:!1,next:a,theta:u(o)});else if(a!==0){if(c=Aze(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 hme(e,t,n,i,o,r,s){let a=[],c=r,d=h=>p=>p.position===h,u=[];do{let h=n[c];a.push(h);let p=i.findIndex(d(c)),b=i[p];if(!l(b)){++c;continue}let{visited:f,type:y,next:_}=b;if(b.visited=!0,y===0){if(_===0){let V=i[p-(s?1:-1)];if(V?.position===c+1)V.visited=!0;else{++c;continue}}if(!f&&s&&_>0||r===c&&!s&&_<0){++c;continue}}if(!(s?y>=0:y<=0)){++c;continue}f||u.push(c);let A=p+(s?1:-1),Z=i[A];if(!l(Z)){++c;continue}c=Z.position}while(c<n.length&&c>=0&&c!==r&&a.length<n.length);e.splice(t,o,a);for(let h of u)t=hme(e,++t,n,i,0,h,!s);return t}Tr.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=Cze(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=hme(i,o,s,a,1,0,c)}return i};Tr.polygonsFromHierarchy=function(e,t,n,i,o,r){let s=[],a=[],c=new Ey;c.enqueue(e);let d=l(r);for(;c.length!==0;){let u=c.dequeue(),h=u.positions,p=u.holes,b,f;if(i)for(f=h.length,b=0;b<f;b++)o.scaleToGeodeticSurface(h[b],h[b]);if(t||(h=Yo(h,m.equalsEpsilon,!0)),h.length<3)continue;let y=n(h);if(!l(y))continue;let _=[],S=Si.computeWindingOrder2D(y);if(S===Us.CLOCKWISE&&(y.reverse(),h=h.slice().reverse()),d){d=!1;let L=[h];if(L=r(L,L),L.length>1){for(let v of L)c.enqueue(new Ac(v,p));continue}}let A=h.slice(),Z=l(p)?p.length:0,V=[],E;for(b=0;b<Z;b++){let L=p[b],v=L.positions;if(i)for(f=v.length,E=0;E<f;++E)o.scaleToGeodeticSurface(v[E],v[E]);if(t||(v=Yo(v,m.equalsEpsilon,!0)),v.length<3)continue;let I=n(v);if(!l(I))continue;S=Si.computeWindingOrder2D(I),S===Us.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(L.holes)&&(X=L.holes.length),E=0;E<X;E++)c.enqueue(L.holes[E])}s.push({outerRing:h,holes:V}),a.push({positions:A,positions2D:y,holes:_})}return{hierarchy:s,polygons:a}};var Vze=new M,Rze=new m,Eze=new Pe,Gze=new q;Tr.computeBoundingRectangle=function(e,t,n,i,o){let r=Pe.fromAxisAngle(e,i,Eze),s=q.fromQuaternion(r,Gze),a=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,d=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,h=n.length;for(let p=0;p<h;++p){let b=m.clone(n[p],Rze);q.multiplyByVector(s,b,b);let f=t(b,Vze);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};Tr.createGeometryFromPositions=function(e,t,n,i,o,r,s){let a=Si.triangulate(t.positions2D,t.holes);a.length<3&&(a=[0,1,2]);let c=t.positions,d=l(n),u=d?n.positions:void 0;if(o){let h=c.length,p=new Array(h*3),b=0;for(let _=0;_<h;_++){let S=c[_];p[b++]=S.x,p[b++]=S.y,p[b++]=S.z}let f={attributes:{position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:p})},indices:a,primitiveType:ve.TRIANGLES};d&&(f.attributes.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:M.packArray(u)}));let y=new ft(f);return r.normal?Un.computeNormal(y):y}if(s===on.GEODESIC)return Si.computeSubdivision(e,c,a,u,i);if(s===on.RHUMB)return Si.computeRhumbLineSubdivision(e,c,a,u,i)};var dme=[],ume=[],Lze=new m,Wze=new m;Tr.computeWallGeometry=function(e,t,n,i,o,r){let s,a,c,d,u,h,p,b,f,y=e.length,_=0,S=0,A=l(t),Z=A?t.positions:void 0;if(o)for(a=y*3*2,s=new Array(a*2),A&&(f=y*2*2,b=new Array(f*2)),c=0;c<y;c++)d=e[c],u=e[(c+1)%y],s[_]=s[_+a]=d.x,++_,s[_]=s[_+a]=d.y,++_,s[_]=s[_+a]=d.z,++_,s[_]=s[_+a]=u.x,++_,s[_]=s[_+a]=u.y,++_,s[_]=s[_+a]=u.z,++_,A&&(h=Z[c],p=Z[(c+1)%y],b[S]=b[S+f]=h.x,++S,b[S]=b[S+f]=h.y,++S,b[S]=b[S+f]=p.x,++S,b[S]=b[S+f]=p.y,++S);else{let I=W.chordLength(i,n.maximumRadius),X=0;if(r===on.GEODESIC)for(c=0;c<y;c++)X+=Tr.subdivideLineCount(e[c],e[(c+1)%y],I);else if(r===on.RHUMB)for(c=0;c<y;c++)X+=Tr.subdivideRhumbLineCount(n,e[c],e[(c+1)%y],I);for(a=(X+y)*3,s=new Array(a*2),A&&(f=(X+y)*2,b=new Array(f*2)),c=0;c<y;c++){d=e[c],u=e[(c+1)%y];let N,g;A&&(h=Z[c],p=Z[(c+1)%y]),r===on.GEODESIC?(N=Tr.subdivideLine(d,u,I,ume),A&&(g=Tr.subdivideTexcoordLine(h,p,d,u,I,dme))):r===on.RHUMB&&(N=Tr.subdivideRhumbLine(n,d,u,I,ume),A&&(g=Tr.subdivideTexcoordRhumbLine(h,p,n,d,u,I,dme)));let C=N.length;for(let R=0;R<C;++R,++_)s[_]=N[R],s[_+a]=N[R];if(s[_]=u.x,s[_+a]=u.x,++_,s[_]=u.y,s[_+a]=u.y,++_,s[_]=u.z,s[_+a]=u.z,++_,A){let R=g.length;for(let G=0;G<R;++G,++S)b[S]=g[G],b[S+f]=g[G];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=Me.createTypedArray(y/3,y-e.length*6),E=0;for(y/=6,c=0;c<y;c++){let I=c,X=I+1,N=I+y,g=N+1;d=m.fromArray(s,I*3,Lze),u=m.fromArray(s,X*3,Wze),!m.equalsEpsilon(d,u,W.EPSILON10,W.EPSILON10)&&(V[E++]=I,V[E++]=N,V[E++]=X,V[E++]=X,V[E++]=N,V[E++]=g)}let L={attributes:new bn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})}),indices:V,primitiveType:ve.TRIANGLES};return A&&(L.attributes.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:b})),new ft(L)};var Qn=Tr;var M1n=x(T(),1);function ls(e,t){this.position=e,l(this.position)||(this.position=new M),this.tangentPlane=t,l(this.tangentPlane)||(this.tangentPlane=ls.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(ls.prototype,{ellipsoid:{get:function(){return this.tangentPlane.ellipsoid}},x:{get:function(){return this.position.x}},y:{get:function(){return this.position.y}},conformalLatitude:{get:function(){let e=M.magnitude(this.position),t=2*this.ellipsoid.maximumRadius;return this.tangentPlane.plane.normal.z*(W.PI_OVER_TWO-2*Math.atan2(e,t))}},longitude:{get:function(){let e=W.PI_OVER_TWO+Math.atan2(this.y,this.x);return e>Math.PI&&(e-=W.TWO_PI),e}}});var aC=new pe,vze=new m;ls.prototype.getLatitude=function(e){l(e)||(e=ie.default),aC.latitude=this.conformalLatitude,aC.longitude=this.longitude,aC.height=0;let t=this.ellipsoid.cartographicToCartesian(aC,vze);return e.cartesianToCartographic(t,aC),aC.latitude};var Fze=new gn,Ize=new m,Pze=new m;ls.fromCartesian=function(e,t){let n=W.signNotZero(e.z),i=ls.NORTH_POLE_TANGENT_PLANE,o=ls.SOUTH_POLE;n<0&&(i=ls.SOUTH_POLE_TANGENT_PLANE,o=ls.NORTH_POLE);let r=Fze;r.origin=i.ellipsoid.scaleToGeocentricSurface(e,r.origin),r.direction=m.subtract(r.origin,o,Ize),m.normalize(r.direction,r.direction);let s=ai.rayPlane(r,i.plane,Pze),a=m.subtract(s,o,s),c=m.dot(i.xAxis,a),d=n*m.dot(i.yAxis,a);return l(t)?(t.position=new M(c,d),t.tangentPlane=i,t):new ls(new M(c,d),i)};ls.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]=ls.fromCartesian(e[i],t[i]);return t};ls.clone=function(e,t){if(l(e))return l(t)?(t.position=e.position,t.tangentPlane=e.tangentPlane,t):new ls(e.position,e.tangentPlane)};ls.HALF_UNIT_SPHERE=Object.freeze(new ie(.5,.5,.5));ls.NORTH_POLE=Object.freeze(new m(0,0,.5));ls.SOUTH_POLE=Object.freeze(new m(0,0,-.5));ls.NORTH_POLE_TANGENT_PLANE=Object.freeze(new Rs(ls.NORTH_POLE,ls.HALF_UNIT_SPHERE));ls.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new Rs(ls.SOUTH_POLE,ls.HALF_UNIT_SPHERE));var Qc=ls;var Xze=new pe,fme=new pe;function Nze(e,t,n,i){let r=i.cartesianToCartographic(e,Xze).height,s=i.cartesianToCartographic(t,fme);s.height=r,i.cartographicToCartesian(s,t);let a=i.cartesianToCartographic(n,fme);a.height=r-100,i.cartographicToCartesian(a,n)}var pme=new Qe,Yze=new m,wze=new m,Mze=new m,kze=new m,Uze=new m,Dze=new m,Q5=new m,Sp=new m,cC=new m,Oze=new M,Bze=new M,zze=new m,bme=new Pe,Hze=new q,Kze=new q;function m4(e){let t=e.vertexFormat,n=e.geometry,i=e.shadowVolume,o=n.attributes.position.values,r=l(n.attributes.st)?n.attributes.st.values:void 0,s=o.length,a=e.wall,c=e.top||a,d=e.bottom||a;if(t.st||t.normal||t.tangent||t.bitangent||i){let u=e.boundingRectangle,h=e.rotationAxis,p=e.projectTo2d,b=e.ellipsoid,f=e.stRotation,y=e.perPositionHeight,_=Oze;_.x=u.x,_.y=u.y;let S=t.st?new Float32Array(2*(s/3)):void 0,A;t.normal&&(y&&c&&!a?A=n.attributes.normal.values:A=new Float32Array(s));let Z=t.tangent?new Float32Array(s):void 0,V=t.bitangent?new Float32Array(s):void 0,E=i?new Float32Array(s):void 0,L=0,v=0,I=wze,X=Mze,N=kze,g=!0,C=Hze,R=Kze;if(f!==0){let Y=Pe.fromAxisAngle(h,f,bme);C=q.fromQuaternion(Y,C),Y=Pe.fromAxisAngle(h,-f,bme),R=q.fromQuaternion(Y,R)}else C=q.clone(q.IDENTITY,C),R=q.clone(q.IDENTITY,R);let G=0,P=0;c&&d&&(G=s/2,P=s/3,s/=2);for(let Y=0;Y<s;Y+=3){let O=m.fromArray(o,Y,zze);if(t.st&&!l(r)){let k=q.multiplyByVector(C,O,Yze);k=b.scaleToGeodeticSurface(k,k);let D=p([k],Bze)[0];M.subtract(D,_,D);let w=W.clamp(D.x/u.width,0,1),z=W.clamp(D.y/u.height,0,1);d&&(S[L+P]=w,S[L+1+P]=z),c&&(S[L]=w,S[L+1]=z),L+=2}if(t.normal||t.tangent||t.bitangent||i){let k=v+1,D=v+2;if(a){if(Y+3<s){let w=m.fromArray(o,Y+3,Uze);if(g){let z=m.fromArray(o,Y+s,Dze);y&&Nze(O,w,z,b),m.subtract(w,O,w),m.subtract(z,O,z),I=m.normalize(m.cross(z,w,I),I),g=!1}m.equalsEpsilon(w,O,W.EPSILON10)&&(g=!0)}(t.tangent||t.bitangent)&&(N=b.geodeticSurfaceNormal(O,N),t.tangent&&(X=m.normalize(m.cross(N,I,X),X)))}else I=b.geodeticSurfaceNormal(O,I),(t.tangent||t.bitangent)&&(y&&(Q5=m.fromArray(A,v,Q5),Sp=m.cross(m.UNIT_Z,Q5,Sp),Sp=m.normalize(q.multiplyByVector(R,Sp,Sp),Sp),t.bitangent&&(cC=m.normalize(m.cross(Q5,Sp,cC),cC))),X=m.cross(m.UNIT_Z,I,X),X=m.normalize(q.multiplyByVector(R,X,X),X),t.bitangent&&(N=m.normalize(m.cross(I,X,N),N)));t.normal&&(e.wall?(A[v+G]=I.x,A[k+G]=I.y,A[D+G]=I.z):d&&(A[v+G]=-I.x,A[k+G]=-I.y,A[D+G]=-I.z),(c&&!y||a)&&(A[v]=I.x,A[k]=I.y,A[D]=I.z)),i&&(a&&(I=b.geodeticSurfaceNormal(O,I)),E[v+G]=-I.x,E[k+G]=-I.y,E[D+G]=-I.z),t.tangent&&(e.wall?(Z[v+G]=X.x,Z[k+G]=X.y,Z[D+G]=X.z):d&&(Z[v+G]=-X.x,Z[k+G]=-X.y,Z[D+G]=-X.z),c&&(y?(Z[v]=Sp.x,Z[k]=Sp.y,Z[D]=Sp.z):(Z[v]=X.x,Z[k]=X.y,Z[D]=X.z))),t.bitangent&&(d&&(V[v+G]=N.x,V[k+G]=N.y,V[D+G]=N.z),c&&(y?(V[v]=cC.x,V[k]=cC.y,V[D]=cC.z):(V[v]=N.x,V[k]=N.y,V[D]=N.z))),v+=3}}t.st&&!l(r)&&(n.attributes.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:S})),t.normal&&(n.attributes.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:A})),t.tangent&&(n.attributes.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:Z})),t.bitangent&&(n.attributes.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:V})),i&&(n.attributes.extrudeDirection=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:E}))}if(e.extrude&&l(e.offsetAttribute)){let u=o.length/3,h=new Uint8Array(u);if(e.offsetAttribute===dn.TOP)c&&d||a?h=h.fill(1,0,u/2):c&&(h=h.fill(1));else{let p=e.offsetAttribute===dn.NONE?0:1;h=h.fill(p)}n.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return n}var gme=[];function Jze(e,t,n,i,o,r,s,a,c,d){let u={walls:[]},h;if(s||a){let A=Qn.createGeometryFromPositions(e,t,n,i,r,c,d),Z=A.attributes.position.values,V=A.indices,E,L;if(s&&a){let v=Z.concat(Z);E=v.length/3,L=Me.createTypedArray(E,V.length*2),L.set(V);let I=V.length,X=E/2;for(h=0;h<I;h+=3){let N=L[h]+X,g=L[h+1]+X,C=L[h+2]+X;L[h+I]=C,L[h+1+I]=g,L[h+2+I]=N}if(A.attributes.position.values=v,r&&c.normal){let N=A.attributes.normal.values;A.attributes.normal.values=new Float32Array(v.length),A.attributes.normal.values.set(N)}if(c.st&&l(n)){let N=A.attributes.st.values;A.attributes.st.values=new Float32Array(E*2),A.attributes.st.values=N.concat(N)}A.indices=L}else if(a){for(E=Z.length/3,L=Me.createTypedArray(E,V.length),h=0;h<V.length;h+=3)L[h]=V[h+2],L[h+1]=V[h+1],L[h+2]=V[h];A.indices=L}u.topAndBottom=new Wt({geometry:A})}let p=o.outerRing,b=Rs.fromPoints(p,e),f=b.projectPointsOntoPlane(p,gme),y=Si.computeWindingOrder2D(f);y===Us.CLOCKWISE&&(p=p.slice().reverse());let _=Qn.computeWallGeometry(p,n,e,i,r,d);u.walls.push(new Wt({geometry:_}));let S=o.holes;for(h=0;h<S.length;h++){let A=S[h];f=b.projectPointsOntoPlane(A,gme),y=Si.computeWindingOrder2D(f),y===Us.COUNTER_CLOCKWISE&&(A=A.slice().reverse()),_=Qn.computeWallGeometry(A,n,e,i,r,d),u.walls.push(new Wt({geometry:_}))}return u}function Rm(e){let t=e.polygonHierarchy,n=e.vertexFormat??Xe.DEFAULT,i=e.ellipsoid??ie.default,o=e.granularity??W.RADIANS_PER_DEGREE,r=e.stRotation??0,s=e.textureCoordinates,a=e.perPositionHeight??!1,c=a&&l(e.extrudedHeight),d=e.height??0,u=e.extrudedHeight??d;if(!c){let h=Math.max(d,u);u=Math.min(d,u),d=h}this._vertexFormat=Xe.clone(n),this._ellipsoid=ie.clone(i),this._granularity=o,this._stRotation=r,this._height=d,this._extrudedHeight=u,this._closeTop=e.closeTop??!0,this._closeBottom=e.closeBottom??!0,this._polygonHierarchy=t,this._perPositionHeight=a,this._perPositionHeightExtrude=c,this._shadowVolume=e.shadowVolume??!1,this._workerName="createPolygonGeometry",this._offsetAttribute=e.offsetAttribute,this._arcType=e.arcType??on.GEODESIC,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=s,this.packedLength=Qn.computeHierarchyPackedLength(t,m)+ie.packedLength+Xe.packedLength+(s?Qn.computeHierarchyPackedLength(s,M):1)+12}Rm.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 Rm(t)};Rm.pack=function(e,t,n){return n=n??0,n=Qn.packPolygonHierarchy(e._polygonHierarchy,t,n,m),ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._stRotation,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._closeTop?1:0,t[n++]=e._closeBottom?1:0,t[n++]=e._shadowVolume?1:0,t[n++]=e._offsetAttribute??-1,t[n++]=e._arcType,l(e._textureCoordinates)?n=Qn.packPolygonHierarchy(e._textureCoordinates,t,n,M):t[n++]=-1,t[n++]=e.packedLength,t};var jze=ie.clone(ie.UNIT_SPHERE),Qze=new Xe,qze={polygonHierarchy:{}};Rm.unpack=function(e,t,n){t=t??0;let i=Qn.unpackPolygonHierarchy(e,t,m);t=i.startingIndex,delete i.startingIndex;let o=ie.unpack(e,t,jze);t+=ie.packedLength;let r=Xe.unpack(e,t,Qze);t+=Xe.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++]===1,h=e[t++]===1,p=e[t++]===1,b=e[t++]===1,f=e[t++]===1,y=e[t++],_=e[t++],S=e[t]===-1?void 0:Qn.unpackPolygonHierarchy(e,t,M);l(S)?(t=S.startingIndex,delete S.startingIndex):t++;let A=e[t++];return l(n)||(n=new Rm(qze)),n._polygonHierarchy=i,n._ellipsoid=ie.clone(o,n._ellipsoid),n._vertexFormat=Xe.clone(r,n._vertexFormat),n._height=s,n._extrudedHeight=a,n._granularity=c,n._stRotation=d,n._perPositionHeightExtrude=u,n._perPositionHeight=h,n._closeTop=p,n._closeBottom=b,n._shadowVolume=f,n._offsetAttribute=y===-1?void 0:y,n._arcType=_,n._textureCoordinates=S,n.packedLength=A,n};var $ze=new M,eHe=new M,tHe=new Qc;function yme(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!==on.RHUMB){let p=M.subtract(t.position,e.position,$ze),b=M.dot(t.position,p)/M.dot(p,p);if(b>0&&b<1){let f=M.add(t.position,M.multiplyByScalar(p,-b,p),eHe),y=Qc.clone(t,tHe);y.position=f;let _=y.getLatitude(n);r.south=Math.min(r.south,_),r.north=Math.max(r.north,_),Math.abs(c)>Math.abs(_)&&(d=_)}}let u=t.x*e.y-e.x*t.y,h=Math.sign(u);h!==0&&(h*=M.angleBetween(t.position,e.position)),d>=0&&(o.northAngle+=h),d<=0&&(o.southAngle+=h)}var xme=new Qc,nHe=new Qc,Vm={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};Rm.computeRectangleFromPositions=function(e,t,n,i){if(l(i)||(i=new ae),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,Vm.northAngle=0,Vm.southAngle=0,Vm.westOverIdl=Number.POSITIVE_INFINITY,Vm.eastOverIdl=Number.NEGATIVE_INFINITY;let o=e.length,r=Qc.fromCartesian(e[0],nHe);for(let s=1;s<o;s++){let a=Qc.fromCartesian(e[s],xme);yme(a,r,t,n,Vm,i),r=Qc.clone(a,r)}return yme(Qc.fromCartesian(e[0],xme),r,t,n,Vm,i),i.east-i.west>Vm.eastOverIdl-Vm.westOverIdl&&(i.west=Vm.westOverIdl,i.east=Vm.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(Vm.northAngle),W.TWO_PI,W.EPSILON10)&&(i.north=W.PI_OVER_TWO,i.east=W.PI,i.west=-W.PI),W.equalsEpsilon(Math.abs(Vm.southAngle),W.TWO_PI,W.EPSILON10)&&(i.south=-W.PI_OVER_TWO,i.east=W.PI,i.west=-W.PI),i};var iHe=new Qc;function oHe(e,t,n){return e.height>=W.PI||e.width>=W.PI?Qc.fromCartesian(t[0],iHe).tangentPlane:Rs.fromPoints(t,n)}var Tme=new pe;function rHe(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],Tme);o[s]=new M(a.longitude/W.PI,a.latitude/W.PI_OVER_TWO)}return o.length=i.length,o}return Qc.fromCartesianArray(i,o)}return Rs.fromPoints(t,n).projectPointsOntoPlane(i,o)}}function sHe(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,Tme);return l(r)||(r=new M),r.x=s.longitude/W.PI,r.y=s.latitude/W.PI_OVER_TWO,r}return Qc.fromCartesian(o,r)};let i=Rs.fromPoints(t,n);return(o,r)=>i.projectPointsOntoPlane(o,r)}function aHe(e,t,n,i){return(o,r)=>!i&&(e.height>=W.PI_OVER_TWO||e.width>=2*W.PI_OVER_THREE)?Qn.splitPolygonsOnEquator(o,t,n,r):o}function cHe(e,t,n,i){if(t.height>=W.PI||t.width>=W.PI)return Qe.fromRectangle(t,void 0,pme);let o=e,r=Rs.fromPoints(o,n);return Qn.computeBoundingRectangle(r.plane.normal,r.projectPointOntoPlane.bind(r),o,i,pme)}Rm.createGeometry=function(e){let t=e._vertexFormat,n=e._ellipsoid,i=e._granularity,o=e._stRotation,r=e._polygonHierarchy,s=e._perPositionHeight,a=e._closeTop,c=e._closeBottom,d=e._arcType,u=e._textureCoordinates,h=l(u),p=r.positions;if(p.length<3)return;let b=e.rectangle,f=Qn.polygonsFromHierarchy(r,h,rHe(b,p,n),!s,n,aHe(b,n,d,s)),y=f.hierarchy,_=f.polygons,S=function(G){return G},A=h?Qn.polygonsFromHierarchy(u,!0,S,!1,n).polygons:void 0;if(y.length===0)return;let Z=y[0].outerRing,V=cHe(Z,b,n,o),E=[],L=e._height,v=e._extrudedHeight,I=e._perPositionHeightExtrude||!W.equalsEpsilon(L,v,0,W.EPSILON2),X={perPositionHeight:s,vertexFormat:t,geometry:void 0,rotationAxis:oHe(b,Z,n).plane.normal,projectTo2d:sHe(b,Z,n),boundingRectangle:V,ellipsoid:n,stRotation:o,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:d},N;if(I)for(X.extrude=!0,X.top=a,X.bottom=c,X.shadowVolume=e._shadowVolume,X.offsetAttribute=e._offsetAttribute,N=0;N<_.length;N++){let G=Jze(n,_[N],h?A[N]:void 0,i,y[N],s,a,c,t,d),P;a&&c?(P=G.topAndBottom,X.geometry=Qn.scaleToGeodeticHeightExtruded(P.geometry,L,v,n,s)):a?(P=G.topAndBottom,P.geometry.attributes.position.values=Si.scaleToGeodeticHeight(P.geometry.attributes.position.values,L,n,!s),X.geometry=P.geometry):c&&(P=G.topAndBottom,P.geometry.attributes.position.values=Si.scaleToGeodeticHeight(P.geometry.attributes.position.values,v,n,!0),X.geometry=P.geometry),(a||c)&&(X.wall=!1,P.geometry=m4(X),E.push(P));let Y=G.walls;X.wall=!0;for(let O=0;O<Y.length;O++){let k=Y[O];X.geometry=Qn.scaleToGeodeticHeightExtruded(k.geometry,L,v,n,s),k.geometry=m4(X),E.push(k)}}else for(N=0;N<_.length;N++){let G=new Wt({geometry:Qn.createGeometryFromPositions(n,_[N],h?A[N]:void 0,i,s,t,d)});if(G.geometry.attributes.position.values=Si.scaleToGeodeticHeight(G.geometry.attributes.position.values,L,n,!s),X.geometry=G.geometry,G.geometry=m4(X),l(e._offsetAttribute)){let P=G.geometry.attributes.position.values.length,Y=e._offsetAttribute===dn.NONE?0:1,O=new Uint8Array(P/3).fill(Y);G.geometry.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})}E.push(G)}let g=Un.combineInstances(E)[0];g.attributes.position.values=new Float64Array(g.attributes.position.values),g.indices=Me.createTypedArray(g.attributes.position.values.length/3,g.indices);let C=g.attributes,R=de.fromVertices(C.position.values);return t.position||delete C.position,new ft({attributes:C,indices:g.indices,primitiveType:g.primitiveType,boundingSphere:R,offsetAttribute:e._offsetAttribute})};Rm.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Rm({polygonHierarchy:e._polygonHierarchy,ellipsoid:o,stRotation:e._stRotation,granularity:i,perPositionHeight:!1,extrudedHeight:r,height:s,vertexFormat:Xe.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})};function lHe(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 ft._textureCoordinateRotationPoints(i,t,n,o)}Object.defineProperties(Rm.prototype,{rectangle:{get:function(){if(!l(this._rectangle)){let e=this._polygonHierarchy.positions;this._rectangle=Rm.computeRectangleFromPositions(e,this._ellipsoid,this._arcType)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=lHe(this)),this._textureCoordinateRotationPoints}}});var mb=Rm;function b_(e){this._ellipsoid=e.ellipsoid??ie.default,this._positions=Sme(e.positions),this._cachedPositions=void 0,this._cachedRectangle=void 0}function Sme(e){if(!l(e))return;let t=e.length,n=Array(t);for(let i=0;i<t;i++)n[i]=m.clone(e[i]);return n}function dHe(e,t){if(!l(e)&&!l(t))return!0;if(l(e)!==l(t)||e.length!==t.length)return!1;let n=e.length;for(let i=0;i<n;i++){let o=e[i],r=t[i];if(!m.equals(o,r))return!1}return!0}Object.defineProperties(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(dHe(this._positions,this._cachedPositions))return ae.clone(this._cachedRectangle,e);let t=mb.computeRectangleFromPositions(this.positions,this.ellipsoid,void 0,e);return this._cachedPositions=Sme(this._positions),this._cachedRectangle=ae.clone(t),t};var uHe=new ae,_me=new m;b_.prototype.computeSphericalExtents=function(e){l(e)||(e=new ae);let t=this.computeRectangle(uHe),n=pe.toCartesian(ae.southwest(t),this.ellipsoid,_me),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=pe.toCartesian(ae.northeast(t),this.ellipsoid,_me),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 lC=b_;var CEn=x(T(),1),aF=`in vec2 v_textureCoordinates;
uniform int u_polygonsLength;
uniform int u_extentsLength;
uniform highp sampler2D u_polygonTexture;
uniform highp sampler2D u_extentsTexture;
int getPolygonIndex(float dimension, vec2 coord) {
vec2 uv = coord.xy * dimension;
return int(floor(uv.y) * dimension + floor(uv.x));
}
vec2 getLookupUv(ivec2 dimensions, int i) {
int pixY = i / dimensions.x;
int pixX = i - (pixY * dimensions.x);
float pixelWidth = 1.0 / float(dimensions.x);
float pixelHeight = 1.0 / float(dimensions.y);
float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
float v = (float(pixY) + 0.5) * pixelHeight;
return vec2(u, v);
}
vec4 getExtents(int i) {
return texture(u_extentsTexture, getLookupUv(textureSize(u_extentsTexture, 0), i));
}
ivec2 getPositionsLengthAndExtentsIndex(int i) {
vec2 uv = getLookupUv(textureSize(u_polygonTexture, 0), i);
vec4 value = texture(u_polygonTexture, uv);
return ivec2(int(value.x), int(value.y));
}
vec2 getPolygonPosition(int i) {
vec2 uv = getLookupUv(textureSize(u_polygonTexture, 0), i);
return texture(u_polygonTexture, uv).xy;
}
vec2 getCoordinates(vec2 textureCoordinates, vec4 extents) {
float latitude = mix(extents.x, extents.x + 1.0 / extents.z, textureCoordinates.y);
float longitude = mix(extents.y, extents.y + 1.0 / extents.w, textureCoordinates.x);
return vec2(latitude, longitude);
}
void main() {
int lastPolygonIndex = 0;
out_FragColor = vec4(1.0);
// Get the relevant region of the texture
float dimension = float(u_extentsLength);
if (u_extentsLength > 2) {
dimension = ceil(log2(float(u_extentsLength)));
}
int regionIndex = getPolygonIndex(dimension, v_textureCoordinates);
if (regionIndex >= u_extentsLength) {
return; // done (no polygons in this region)
}
for (int polygonIndex = 0; polygonIndex < u_polygonsLength; polygonIndex++) {
ivec2 positionsLengthAndExtents = getPositionsLengthAndExtentsIndex(lastPolygonIndex);
int positionsLength = positionsLengthAndExtents.x;
int polygonExtentsIndex = positionsLengthAndExtents.y;
lastPolygonIndex += 1;
// Read the individual polygon extent (2 pixels: south/west, latRange/lonRange)
vec2 extentsSouthWest = getPolygonPosition(lastPolygonIndex);
vec2 extentsRange = getPolygonPosition(lastPolygonIndex + 1);
vec4 polygonExtent = vec4(extentsSouthWest, extentsRange);
lastPolygonIndex += 2;
if (polygonExtentsIndex < regionIndex) {
lastPolygonIndex += positionsLength;
continue; // skip to next (TODO: could optimize further if we knew how many polygons to skip)
} else if (polygonExtentsIndex > regionIndex) {
break; // done (we know polygons are sorted by regionIndex)
}
// Only compute signed distance for the relevant part of the atlas
float clipAmount = czm_infinity;
vec4 extents = getExtents(polygonExtentsIndex);
vec2 textureOffset = vec2(mod(float(polygonExtentsIndex), dimension), floor(float(polygonExtentsIndex) / dimension)) / dimension;
vec2 p = getCoordinates((v_textureCoordinates - textureOffset) * dimension, extents); // current pixel position
// Only consider polygons whos boundingbox includes current pixel (with a slight padding)
float padding = 0.05; // 5% of polygon extents
float polygonNorth = polygonExtent.x + polygonExtent.z;
float polygonEast = polygonExtent.y + polygonExtent.w;
float latPadding = padding * polygonExtent.z; // padding as fraction of latitude range
float lonPadding = padding * polygonExtent.w; // padding as fraction of longitude range
if (p.x < polygonExtent.x - latPadding || p.x > polygonNorth + latPadding ||
p.y < polygonExtent.y - lonPadding || p.y > polygonEast + lonPadding) {
lastPolygonIndex += positionsLength;
continue; // skip to next
}
float s = 1.0;
// Check each edge for absolute distance.
// Cache the previous vertex to halve the texture reads per iteration.
vec2 prev = getPolygonPosition(lastPolygonIndex + positionsLength - 1);
for (int i = 0; i < positionsLength; i++) {
vec2 a = getPolygonPosition(lastPolygonIndex + i);
vec2 b = prev;
prev = a;
vec2 ab = b - a;
vec2 pa = p - a;
float t = dot(pa, ab) / dot(ab, ab);
t = clamp(t, 0.0, 1.0);
vec2 pq = pa - t * ab;
float d = length(pq);
// Inside / outside computation to determine sign
bvec3 cond = bvec3(p.y >= a.y,
p.y < b.y,
ab.x * pa.y > ab.y * pa.x);
if (all(cond) || all(not(cond))) s = -s;
if (abs(d) < abs(clipAmount)) {
clipAmount = d;
}
}
// Normalize the range to [0,1]
vec4 result = (s * vec4(clipAmount * length(extents.zw))) / 2.0 + 0.5;
// In the case where we've iterated through multiple polygons, take the minimum
out_FragColor = min(out_FragColor, result);
lastPolygonIndex += positionsLength;
}
}`;function vs(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(vs.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}}});vs.prototype.add=function(e){let t=this._polygons.length;return this._polygons.push(e),this.polygonAdded.raiseEvent(e,t),e};vs.prototype.get=function(e){return this._polygons[e]};vs.prototype.contains=function(e){return this._polygons.some(t=>lC.equals(t,e))};vs.prototype.remove=function(e){let t=this._polygons,n=t.findIndex(i=>lC.equals(i,e));return n===-1?!1:(t.splice(n,1),this.polygonRemoved.raiseEvent(e,n),!0)};function mHe(e,t,n){let i=Math.max(e.height*t,0),o=Math.max(e.width*t,0),r=ae.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 hHe(e,t){let i=[],o=e.length;for(let a=0;a<o;++a){let c=mHe(t[a],2.5),d=-1;for(let u=0;u<i.length;++u)if(l(ae.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),ae.union(u.extent,c,u.extent);for(let h=0;h<i.length;++h)h!==d&&l(ae.simpleIntersection(i[h].extent,u.extent))&&(u.polygonIndices.push(...i[h].polygonIndices),ae.union(u.extent,i[h].extent,u.extent),i.splice(h,1),h<d&&d--,h=-1)}}let r=i.map(a=>a.extent),s=new Map;return i.forEach((a,c)=>a.polygonIndices.forEach(d=>s.set(d,c))),{extentsList:r,extentsIndexByPolygon:s}}vs.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 fHe(e){let t=e._float32View,n=e._extentsFloat32View,i=e._polygons,o=i.map(u=>u.computeSphericalExtents()),{extentsList:r,extentsIndexByPolygon:s}=hHe(i,o),a=Array.from(i.keys()).sort((u,h)=>s.get(u)-s.get(h)),c=0;for(let u of a){let h=i[u],p=h.length;t[c++]=p,t[c++]=s.get(u);let b=o[u];t[c++]=b.south,t[c++]=b.west,t[c++]=b.north-b.south,t[c++]=b.east-b.west;for(let f=0;f<p;++f){let y=h.positions[f],_=Math.hypot(y.x,y.y),S=W.fastApproximateAtan2(_,y.z),A=W.fastApproximateAtan2(y.x,y.y);t[c++]=S,t[c++]=A}}let d=0;for(let u of r){let h=1/(u.east-u.west),p=1/(u.north-u.south);n[d++]=u.south,n[d++]=u.west,n[d++]=p,n[d++]=h}e._extentsCount=r.length}var h4=new M;vs.prototype.update=function(e){let t=e.context;if(!vs.isSupported(e))throw new le("ClippingPolygonCollections are only supported for WebGL 2.");this.debugShowDistanceTexture&&l(this._signedDistanceTexture)&&(l(this.debugCommand)||(this.debugCommand=pHe(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=vs.getTextureResolution(i,this.pixelsNeededForPolygonPositions,h4);i=new Et({context:t,width:s.x,height:s.y,pixelFormat:Ke.RG,pixelDatatype:Oe.FLOAT,sampler:Ut.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=vs.getTextureResolution(o,this.pixelsNeededForExtents,h4);o=new Et({context:t,width:s.x,height:s.y,pixelFormat:Ke.RGBA,pixelDatatype:Oe.FLOAT,sampler:Ut.NEAREST,flipY:!1}),this._extentsFloat32View=new Float32Array(s.x*s.y*4),this._extentsTexture=o}if(fHe(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=vs.getClippingDistanceTextureResolution(this,h4);r=new Et({context:t,width:s.x,height:s.y,pixelFormat:t.webgl2?Ke.RED:Ke.LUMINANCE,pixelDatatype:Oe.FLOAT,sampler:new Ut({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:kt.LINEAR,magnificationFilter:ni.LINEAR}),flipY:!1}),this._signedDistanceTexture=r}this._signedDistanceComputeCommand=bHe(this)};function pHe(e,t){let i=t.createViewportQuadCommand(`uniform highp sampler2D billboard_texture;
in vec2 v_textureCoordinates;
float getSignedDistance(vec2 uv, highp sampler2D clippingDistance) {
float signedDistance = texture(clippingDistance, uv).r;
return (signedDistance - 0.5) * 2.0;
}
void main()
{
float dist = texture(billboard_texture, v_textureCoordinates).r;
if (dist > 0.5) {
out_FragColor = vec4(dist, 0.0, 0.0, 1.0);
} else {
out_FragColor = vec4(0.0, dist, 0.0, 1.0);
}
}
`,{uniformMap:{billboard_texture:function(){return e}}});return i.pass=Le.OVERLAY,i}vs.prototype.queueCommands=function(e){l(this._signedDistanceComputeCommand)&&e.commandList.push(this._signedDistanceComputeCommand)};function bHe(e){let t=e._polygonsTexture,n=e._extentsTexture;return new xl({fragmentShaderSource:aF,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 Ame=new ae,gHe=new ae,yHe=new ae;vs.prototype.computeIntersectionWithBoundingVolume=function(e,t){let n=this._polygons,i=n.length,o=zt.OUTSIDE;this.inverse&&(o=zt.INSIDE);let r=e.rectangle;if(!l(r)&&l(e.boundingVolume?.computeCorners)){let s=e.boundingVolume.computeCorners();r=ae.fromCartesianArray(s,t,Ame)}l(r)||(r=ae.fromBoundingSphere(e.boundingSphere,t,Ame));for(let s=0;s<i;++s){let c=n[s].computeRectangle(yHe),d=ae.simpleIntersection(r,c,gHe);if(l(d))return zt.INTERSECTING}return o};vs.setOwner=function(e,t,n){e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),l(e)&&(e._owner=t,t[n]=e))};vs.isSupported=function(e){return e?.context.webgl2};vs.getTextureResolution=function(e,t,n){if(l(e))return n.x=e.width,n.y=e.height,n;let i=Lt.maximumTextureSize;return n.x=Math.min(t,i),n.y=Math.ceil(t/n.x),n.y*=2,n};vs.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(Lt.maximumTextureSize,o),t.y=Math.min(Lt.maximumTextureSize,o),t};vs.getClippingExtentsTextureResolution=function(e,t){let n=e.extentsTexture;return l(n)?(t.x=n.width,t.y=n.height,t):vs.getTextureResolution(n,e.pixelsNeededForExtents,t)};vs.prototype.isDestroyed=function(){return!1};vs.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(),me(this)};var Kh=vs;var UGn=x(T(),1);var tGn=x(T(),1);var jEn=x(T(),1),dC={NONE:0,SCENE_LIGHT:1,SUNLIGHT:2};dC.fromGlobeFlags=function(e){return e.enableLighting&&e.dynamicAtmosphereLighting?e.dynamicAtmosphereLightingFromSun?dC.SUNLIGHT:dC.SCENE_LIGHT:dC.NONE};Object.freeze(dC);var hb=dC;function Zme(){this.lightIntensity=10,this.rayleighCoefficient=new m(55e-7,13e-6,284e-7),this.mieCoefficient=new m(21e-6,21e-6,21e-6),this.rayleighScaleHeight=1e4,this.mieScaleHeight=3200,this.mieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.dynamicLighting=hb.NONE}Zme.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_=Zme;var iGn=x(T(),1),Jh=`uniform vec3 u_radiiAndDynamicAtmosphereColor;
uniform float u_atmosphereLightIntensity;
uniform float u_atmosphereRayleighScaleHeight;
uniform float u_atmosphereMieScaleHeight;
uniform float u_atmosphereMieAnisotropy;
uniform vec3 u_atmosphereRayleighCoefficient;
uniform vec3 u_atmosphereMieCoefficient;
const float ATMOSPHERE_THICKNESS = 111e3; // The thickness of the atmosphere in meters.
const int PRIMARY_STEPS_MAX = 16; // Maximum number of times the ray from the camera to the world position (primary ray) is sampled.
const int LIGHT_STEPS_MAX = 4; // Maximum number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.
/**
* This function computes the colors contributed by Rayliegh and Mie scattering on a given ray, as well as
* the transmittance value for the ray.
*
* @param {czm_ray} primaryRay The ray from the camera to the position.
* @param {float} primaryRayLength The length of the primary ray.
* @param {vec3} lightDirection The direction of the light to calculate the scattering from.
* @param {vec3} rayleighColor The variable the Rayleigh scattering will be written to.
* @param {vec3} mieColor The variable the Mie scattering will be written to.
* @param {float} opacity The variable the transmittance will be written to.
* @glslFunction
*/
void computeScattering(
czm_ray primaryRay,
float primaryRayLength,
vec3 lightDirection,
float atmosphereInnerRadius,
out vec3 rayleighColor,
out vec3 mieColor,
out float opacity
) {
// Initialize the default scattering amounts to 0.
rayleighColor = vec3(0.0);
mieColor = vec3(0.0);
opacity = 0.0;
float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;
vec3 origin = vec3(0.0);
// Calculate intersection from the camera to the outer ring of the atmosphere.
czm_raySegment primaryRayAtmosphereIntersect = czm_raySphereIntersectionInterval(primaryRay, origin, atmosphereOuterRadius);
// Return empty colors if no intersection with the atmosphere geometry.
if (primaryRayAtmosphereIntersect == czm_emptyRaySegment) {
return;
}
// To deal with smaller values of PRIMARY_STEPS (e.g. 4)
// we implement a split strategy: sky or horizon.
// For performance reasons, instead of a if/else branch
// a soft choice is implemented through a weight 0.0 <= w_stop_gt_lprl <= 1.0
float x = 1e-7 * primaryRayAtmosphereIntersect.stop / length(primaryRayLength);
// Value close to 0.0: close to the horizon
// Value close to 1.0: above in the sky
float w_stop_gt_lprl = 0.5 * (1.0 + czm_approximateTanh(x));
// The ray should start from the first intersection with the outer atmopshere, or from the camera position, if it is inside the atmosphere.
float start_0 = primaryRayAtmosphereIntersect.start;
primaryRayAtmosphereIntersect.start = max(primaryRayAtmosphereIntersect.start, 0.0);
// The ray should end at the exit from the atmosphere or at the distance to the vertex, whichever is smaller.
primaryRayAtmosphereIntersect.stop = min(primaryRayAtmosphereIntersect.stop, length(primaryRayLength));
// For the number of ray steps, distinguish inside or outside atmosphere (outer space)
// (1) from outer space we have to use more ray steps to get a realistic rendering
// (2) within atmosphere we need fewer steps for faster rendering
float x_o_a = start_0 - ATMOSPHERE_THICKNESS; // ATMOSPHERE_THICKNESS used as an ad-hoc constant, no precise meaning here, only the order of magnitude matters
float w_inside_atmosphere = 1.0 - 0.5 * (1.0 + czm_approximateTanh(x_o_a));
int PRIMARY_STEPS = PRIMARY_STEPS_MAX - int(w_inside_atmosphere * 12.0); // Number of times the ray from the camera to the world position (primary ray) is sampled.
int LIGHT_STEPS = LIGHT_STEPS_MAX - int(w_inside_atmosphere * 2.0); // Number of times the light is sampled from the light source's intersection with the atmosphere to a sample position on the primary ray.
// Setup for sampling positions along the ray - starting from the intersection with the outer ring of the atmosphere.
float rayPositionLength = primaryRayAtmosphereIntersect.start;
// (1) Outside the atmosphere: constant rayStepLength
// (2) Inside atmosphere: variable rayStepLength to compensate the rough rendering of the smaller number of ray steps
float totalRayLength = primaryRayAtmosphereIntersect.stop - rayPositionLength;
float rayStepLengthIncrease = w_inside_atmosphere * ((1.0 - w_stop_gt_lprl) * totalRayLength / (float(PRIMARY_STEPS * (PRIMARY_STEPS + 1)) / 2.0));
float rayStepLength = max(1.0 - w_inside_atmosphere, w_stop_gt_lprl) * totalRayLength / max(7.0 * w_inside_atmosphere, float(PRIMARY_STEPS));
vec3 rayleighAccumulation = vec3(0.0);
vec3 mieAccumulation = vec3(0.0);
vec2 opticalDepth = vec2(0.0);
vec2 heightScale = vec2(u_atmosphereRayleighScaleHeight, u_atmosphereMieScaleHeight);
// Sample positions on the primary ray.
for (int i = 0; i < PRIMARY_STEPS_MAX; ++i) {
// The loop should be: for (int i = 0; i < PRIMARY_STEPS; ++i) {...} but WebGL1 cannot
// loop with non-constant condition, so it has to break early instead
if (i >= PRIMARY_STEPS) {
break;
}
// Calculate sample position along viewpoint ray.
vec3 samplePosition = primaryRay.origin + primaryRay.direction * (rayPositionLength + rayStepLength);
// Calculate height of sample position above ellipsoid.
float sampleHeight = length(samplePosition) - atmosphereInnerRadius;
// Calculate and accumulate density of particles at the sample position.
vec2 sampleDensity = exp(-sampleHeight / heightScale) * rayStepLength;
opticalDepth += sampleDensity;
// Generate ray from the sample position segment to the light source, up to the outer ring of the atmosphere.
czm_ray lightRay = czm_ray(samplePosition, lightDirection);
czm_raySegment lightRayAtmosphereIntersect = czm_raySphereIntersectionInterval(lightRay, origin, atmosphereOuterRadius);
float lightStepLength = lightRayAtmosphereIntersect.stop / float(LIGHT_STEPS);
float lightPositionLength = 0.0;
vec2 lightOpticalDepth = vec2(0.0);
// Sample positions along the light ray, to accumulate incidence of light on the latest sample segment.
for (int j = 0; j < LIGHT_STEPS_MAX; ++j) {
// The loop should be: for (int j = 0; i < LIGHT_STEPS; ++j) {...} but WebGL1 cannot
// loop with non-constant condition, so it has to break early instead
if (j >= LIGHT_STEPS) {
break;
}
// Calculate sample position along light ray.
vec3 lightPosition = samplePosition + lightDirection * (lightPositionLength + lightStepLength * 0.5);
// Calculate height of the light sample position above ellipsoid.
float lightHeight = length(lightPosition) - atmosphereInnerRadius;
// Calculate density of photons at the light sample position.
lightOpticalDepth += exp(-lightHeight / heightScale) * lightStepLength;
// Increment distance on light ray.
lightPositionLength += lightStepLength;
}
// Compute attenuation via the primary ray and the light ray.
vec3 attenuation = exp(-((u_atmosphereMieCoefficient * (opticalDepth.y + lightOpticalDepth.y)) + (u_atmosphereRayleighCoefficient * (opticalDepth.x + lightOpticalDepth.x))));
// Accumulate the scattering.
rayleighAccumulation += sampleDensity.x * attenuation;
mieAccumulation += sampleDensity.y * attenuation;
// Increment distance on primary ray.
rayPositionLength += (rayStepLength += rayStepLengthIncrease);
}
// Compute the scattering amount.
rayleighColor = u_atmosphereRayleighCoefficient * rayleighAccumulation;
mieColor = u_atmosphereMieCoefficient * mieAccumulation;
// Compute the transmittance i.e. how much light is passing through the atmosphere.
opacity = length(exp(-((u_atmosphereMieCoefficient * opticalDepth.y) + (u_atmosphereRayleighCoefficient * opticalDepth.x))));
}
vec4 computeAtmosphereColor(
vec3 positionWC,
vec3 lightDirection,
vec3 rayleighColor,
vec3 mieColor,
float opacity
) {
// Setup the primary ray: from the camera position to the vertex position.
vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
float cosAngle = dot(cameraToPositionWCDirection, lightDirection);
float cosAngleSq = cosAngle * cosAngle;
float G = u_atmosphereMieAnisotropy;
float GSq = G * G;
// The Rayleigh phase function.
float rayleighPhase = 3.0 / (50.2654824574) * (1.0 + cosAngleSq);
// The Mie phase function.
float miePhase = 3.0 / (25.1327412287) * ((1.0 - GSq) * (cosAngleSq + 1.0)) / (pow(1.0 + GSq - 2.0 * cosAngle * G, 1.5) * (2.0 + GSq));
// The final color is generated by combining the effects of the Rayleigh and Mie scattering.
vec3 rayleigh = rayleighPhase * rayleighColor;
vec3 mie = miePhase * mieColor;
vec3 color = (rayleigh + mie) * u_atmosphereLightIntensity;
return vec4(color, opacity);
}
`;var rGn=x(T(),1),cF=`uniform samplerCube u_radianceMap;
in vec2 v_textureCoordinates;
const float twoSqrtPi = 2.0 * sqrt(czm_pi);
// Coutesy of https://www.ppsloan.org/publications/StupidSH36.pdf
float computeShBasis(int index, vec3 s) {
if (index == 0) { // l = 0, m = 0
return 1.0 / twoSqrtPi;
}
if (index == 1) { // l = 1, m = -1
return -sqrt(3.0) * s.y / twoSqrtPi;
}
if (index == 2) { // l = 1, m = 0
return sqrt(3.0) * s.z / twoSqrtPi;
}
if (index == 3) { // l = 1, m = 1
return -sqrt(3.0) * s.x / twoSqrtPi;
}
if (index == 4) { // l = 2, m = -2
return sqrt(15.0) * s.y * s.x / twoSqrtPi;
}
if (index == 5) { // l = 2, m = -1
return -sqrt(15.0) * s.y * s.z / twoSqrtPi;
}
if (index == 6) { // l = 2, m = 0
return sqrt(5.0) * (3.0 * s.z * s.z - 1.0) / 2.0 / twoSqrtPi;
}
if (index == 7) { // l = 2, m = 1
return -sqrt(15.0) * s.x * s.z / twoSqrtPi;
}
if (index == 8) { // l = 2, m = 2
return sqrt(15.0) * (s.x * s.x - s.y * s.y) / 2.0 / twoSqrtPi;
}
return 0.0;
}
float vdcRadicalInverse(int i)
{
float r;
float base = 2.0;
float value = 0.0;
float invBase = 1.0 / base;
float invBi = invBase;
for (int x = 0; x < 100; x++)
{
if (i <= 0)
{
break;
}
r = mod(float(i), base);
value += r * invBi;
invBi *= invBase;
i = int(float(i) * invBase);
}
return value;
}
vec2 hammersley2D(int i, int N)
{
return vec2(float(i) / float(N), vdcRadicalInverse(i));
}
// Sample count is relatively low for the sake of performance, but should still be enough to capture directionality needed for third-order harmonics
const int samples = 256;
const float solidAngle = 1.0 / float(samples);
void main() {
// Get the current coefficient based on the uv
vec2 uv = v_textureCoordinates.xy * 3.0;
int coefficientIndex = int(floor(uv.y) * 3.0 + floor(uv.x));
for (int i = 0; i < samples; ++i) {
vec2 xi = hammersley2D(i, samples);
float phi = czm_twoPi * xi.x;
float cosTheta = 1.0 - 2.0 * sqrt(1.0 - xi.y * xi.y);
float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
vec3 direction = normalize(vec3(sinTheta * cos(phi), cosTheta, sinTheta * sin(phi)));
// Generate the spherical harmonics basis from the direction
float Ylm = computeShBasis(coefficientIndex, direction);
vec3 lookupDirection = -direction.xyz;
lookupDirection.z = -lookupDirection.z;
vec4 color = czm_textureCube(u_radianceMap, lookupDirection, 0.0);
// Use the relevant function for this coefficient
out_FragColor += Ylm * color * solidAngle * sinTheta;
}
}
`;var aGn=x(T(),1),lF=`precision highp float;
in vec2 v_textureCoordinates;
uniform vec3 u_faceDirection; // Current cubemap face
uniform vec3 u_positionWC;
uniform mat4 u_enuToFixedFrame;
uniform vec4 u_brightnessSaturationGammaIntensity;
uniform vec4 u_groundColor; // alpha component represent albedo
vec4 getCubeMapDirection(vec2 uv, vec3 faceDir) {
vec2 scaledUV = uv * 2.0 - 1.0;
if (faceDir.x != 0.0) {
return vec4(faceDir.x, scaledUV.x * faceDir.x, -scaledUV.y, 0.0);
} else if (faceDir.y != 0.0) {
return vec4(scaledUV.x, -scaledUV.y * faceDir.y, faceDir.y, 0.0);
} else {
return vec4(scaledUV.x * faceDir.z, -faceDir.z, -scaledUV.y, 0.0);
}
}
void main() {
float height = length(u_positionWC);
float atmosphereInnerRadius = u_radiiAndDynamicAtmosphereColor.y;
float ellipsoidHeight = max(height - atmosphereInnerRadius, 0.0);
// Scale the position to ensure the sky color is present, even when underground.
vec3 positionWC = u_positionWC / height * (ellipsoidHeight + atmosphereInnerRadius);
float atmosphereOuterRadius = u_radiiAndDynamicAtmosphereColor.x;
float atmosphereHeight = atmosphereOuterRadius - atmosphereInnerRadius;
vec3 direction = (u_enuToFixedFrame * getCubeMapDirection(v_textureCoordinates, u_faceDirection)).xyz;
vec3 normalizedDirection = normalize(direction);
czm_ray ray = czm_ray(positionWC, normalizedDirection);
czm_raySegment intersection = czm_raySphereIntersectionInterval(ray, vec3(0.0), atmosphereInnerRadius);
if (!czm_isEmpty(intersection)) {
intersection = czm_rayEllipsoidIntersectionInterval(ray, vec3(0.0), czm_ellipsoidInverseRadii);
}
bool onEllipsoid = intersection.start >= 0.0;
float rayLength = czm_branchFreeTernary(onEllipsoid, intersection.start, atmosphereOuterRadius);
// Compute sky color for each position on a sphere at radius centered around the provided position's origin
vec3 skyPositionWC = positionWC + normalizedDirection * rayLength;
float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
vec3 lightDirectionWC = normalize(czm_getDynamicAtmosphereLightDirection(skyPositionWC, lightEnum));
vec3 mieColor;
vec3 rayleighColor;
float opacity;
czm_computeScattering(
ray,
rayLength,
lightDirectionWC,
atmosphereInnerRadius,
rayleighColor,
mieColor,
opacity
);
vec4 atmopshereColor = czm_computeAtmosphereColor(ray, lightDirectionWC, rayleighColor, mieColor, opacity);
#ifdef ATMOSPHERE_COLOR_CORRECT
const bool ignoreBlackPixels = true;
atmopshereColor.rgb = czm_applyHSBShift(atmopshereColor.rgb, czm_atmosphereHsbShift, ignoreBlackPixels);
#endif
vec3 lookupDirection = -normalizedDirection;
// Flipping the X vector is a cheap way to get the inverse of czm_temeToPseudoFixed, since that's a rotation about Z.
lookupDirection.x = -lookupDirection.x;
lookupDirection = -normalize(czm_temeToPseudoFixed * lookupDirection);
lookupDirection.x = -lookupDirection.x;
// Values outside the atmopshere are rendered as black, when they should be treated as transparent
float skyAlpha = clamp((1.0 - ellipsoidHeight / atmosphereHeight) * atmopshereColor.a, 0.0, 1.0);
skyAlpha = czm_branchFreeTernary(length(atmopshereColor.rgb) <= czm_epsilon7, 0.0, skyAlpha); // Treat black as transparent
// Blend starmap with atmopshere scattering
float intensity = u_brightnessSaturationGammaIntensity.w;
vec4 sceneSkyBoxColor = czm_textureCube(czm_environmentMap, lookupDirection);
vec3 skyBackgroundColor = mix(czm_backgroundColor.rgb, sceneSkyBoxColor.rgb, sceneSkyBoxColor.a);
vec4 combinedSkyColor = vec4(mix(skyBackgroundColor, atmopshereColor.rgb * intensity, skyAlpha), 1.0);
// Compute ground color based on amount of reflected light, then blend it with ground atmosphere based on height
vec3 up = normalize(positionWC);
float occlusion = max(dot(lightDirectionWC, up), 0.05);
vec4 groundColor = vec4(u_groundColor.rgb * u_groundColor.a * (vec3(intensity * occlusion) + atmopshereColor.rgb), 1.0);
vec4 blendedGroundColor = mix(groundColor, atmopshereColor, clamp(ellipsoidHeight / atmosphereHeight, 0.0, 1.0));
vec4 color = czm_branchFreeTernary(onEllipsoid, blendedGroundColor, combinedSkyColor);
float brightness = u_brightnessSaturationGammaIntensity.x;
float saturation = u_brightnessSaturationGammaIntensity.y;
float gamma = u_brightnessSaturationGammaIntensity.z;
#ifdef ENVIRONMENT_COLOR_CORRECT
color.rgb = mix(vec3(0.0), color.rgb, brightness);
color.rgb = czm_saturation(color.rgb, saturation);
#endif
color.rgb = pow(color.rgb, vec3(gamma)); // Normally this would be in the ifdef above, but there is a precision issue with the atmopshere scattering transmittance (alpha). Having this line is a workaround for that issue, even when gamma is 1.0.
color.rgb = czm_gammaCorrect(color.rgb);
out_FragColor = color;
}
`;var lGn=x(T(),1),dF=`precision highp float;
in vec3 v_textureCoordinates;
uniform float u_roughness;
uniform samplerCube u_radianceTexture;
uniform vec3 u_faceDirection;
float vdcRadicalInverse(int i)
{
float r;
float base = 2.0;
float value = 0.0;
float invBase = 1.0 / base;
float invBi = invBase;
for (int x = 0; x < 100; x++)
{
if (i <= 0)
{
break;
}
r = mod(float(i), base);
value += r * invBi;
invBi *= invBase;
i = int(float(i) * invBase);
}
return value;
}
vec2 hammersley2D(int i, int N)
{
return vec2(float(i) / float(N), vdcRadicalInverse(i));
}
vec3 importanceSampleGGX(vec2 xi, float alphaRoughness, vec3 N)
{
float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
float phi = czm_twoPi * xi.x;
float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (alphaRoughnessSquared - 1.0) * xi.y));
float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);
vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
vec3 tangentX = normalize(cross(upVector, N));
vec3 tangentY = cross(N, tangentX);
return tangentX * H.x + tangentY * H.y + N * H.z;
}
// Sample count is relatively low for the sake of performance, but should still be enough to prevent artifacting in lower roughnesses
const int samples = 128;
void main() {
vec3 normal = u_faceDirection;
vec3 V = normalize(v_textureCoordinates);
float roughness = u_roughness;
vec4 color = vec4(0.0);
float weight = 0.0;
for (int i = 0; i < samples; ++i) {
vec2 xi = hammersley2D(i, samples);
vec3 H = importanceSampleGGX(xi, roughness, V);
vec3 L = 2.0 * dot(V, H) * H - V; // reflected vector
float NdotL = max(dot(V, L), 0.0);
if (NdotL > 0.0) {
color += vec4(czm_textureCube(u_radianceTexture, L).rgb, 1.0) * NdotL;
weight += NdotL;
}
}
out_FragColor = color / weight;
}
`;var uGn=x(T(),1),uF=`in vec3 position;
out vec3 v_textureCoordinates;
uniform vec3 u_faceDirection;
vec3 getCubeMapDirection(vec2 uv, vec3 faceDir) {
vec2 scaledUV = uv;
if (faceDir.x != 0.0) {
return vec3(faceDir.x, scaledUV.y, scaledUV.x * faceDir.x);
} else if (faceDir.y != 0.0) {
return vec3(scaledUV.x, -faceDir.y, -scaledUV.y * faceDir.y);
} else {
return vec3(scaledUV.x * faceDir.z, scaledUV.y, -faceDir.z);
}
}
void main()
{
v_textureCoordinates = getCubeMapDirection(position.xy, u_faceDirection);
v_textureCoordinates.y = -v_textureCoordinates.y;
v_textureCoordinates.z = -v_textureCoordinates.z;
gl_Position = vec4(position, 1.0);
}
`;function hi(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(Lt.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=hi.DEFAULT_SPHERICAL_HARMONIC_COEFFICIENTS.slice(),this._lastTime=new Q;let i=Math.max(Math.pow(2,t-1),1);this._textureDimensions=new M(i,i),this._radiiAndDynamicAtmosphereColor=new m,this._sceneEnvironmentMap=void 0,this._backgroundColor=void 0,this._owner=void 0,this.enabled=e.enabled??!0,this.shouldUpdate=!0,this.maximumSecondsDifference=e.maximumSecondsDifference??3600,this.maximumPositionEpsilon=e.maximumPositionEpsilon??1e3,this.atmosphereScatteringIntensity=e.atmosphereScatteringIntensity??2,this.gamma=e.gamma??1,this.brightness=e.brightness??1,this.saturation=e.saturation??1,this.groundColor=e.groundColor??hi.AVERAGE_EARTH_GROUND_COLOR,this.groundAlbedo=e.groundAlbedo??.31}Object.defineProperties(hi.prototype,{owner:{get:function(){return this._owner}},shouldRegenerateShaders:{get:function(){return this._shouldRegenerateShaders}},position:{get:function(){return this._position},set:function(e){m.equalsEpsilon(e,this._position,0,this.maximumPositionEpsilon)||(this._position=m.clone(e,this._position),this._shouldReset=!0)}},radianceCubeMap:{get:function(){return this._radianceCubeMap}},maximumMipmapLevel:{get:function(){return this._mipmapLevels}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}}});hi._maximumComputeCommandCount=8;hi._activeComputeCommandCount=0;hi._nextFrameCommandQueue=[];hi._queueCommand=(e,t)=>{if(hi._activeComputeCommandCount>=hi._maximumComputeCommandCount){hi._nextFrameCommandQueue.push(e);return}t.commandList.push(e),hi._activeComputeCommandCount++};hi._updateCommandQueue=e=>{if(hi._maximumComputeCommandCount=Math.log2(Lt.maximumCubeMapSize),hi._nextFrameCommandQueue.length>0&&hi._activeComputeCommandCount<hi._maximumComputeCommandCount){let t=hi._nextFrameCommandQueue.shift();for(;l(t)&&hi._activeComputeCommandCount<hi._maximumComputeCommandCount;){if(t.owner.isDestroyed()||t.canceled){t=hi._nextFrameCommandQueue.shift();continue}e.commandList.push(t),hi._activeComputeCommandCount++,t=hi._nextFrameCommandQueue.shift()}l(t)&&hi._nextFrameCommandQueue.push(t)}};hi.setOwner=function(e,t,n){e!==t[n]&&(t[n]=t[n]&&t[n].destroy(),l(e)&&(e._owner=t,t[n]=e))};hi.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 xHe=new m,THe=new m;function _He(e,t){let n=e._position,i=t.atmosphere,o=t.mapProjection.ellipsoid,r=o.scaleToGeodeticSurface(n,THe),s=1.025,a=xHe,c=l(r)?m.magnitude(r):o.maximumRadius;return a.x=c*s,a.y=c,a.z=i.dynamicLighting,!m.equalsEpsilon(e._radiiAndDynamicAtmosphereColor,a)||t.environmentMap!==e._sceneEnvironmentMap||t.backgroundColor!==e._backgroundColor?(m.clone(a,e._radiiAndDynamicAtmosphereColor),e._sceneEnvironmentMap=t.environmentMap,e._backgroundColor=t.backgroundColor,!0):!1}var Cme=new m,SHe=new F,AHe=new se,ZHe=new U;function CHe(e,t){let n=t.context,i=e._textureDimensions;if(l(e._radianceCubeMap)||(e._radianceCubeMap=new Br({context:n,width:i.x,height:i.y,pixelDatatype:Oe.UNSIGNED_BYTE,pixelFormat:Ke.RGBA})),e._radianceCommandsDirty){let o=e._radianceMapFS;l(o)||(o=new Be({sources:[Jh,lF]}),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=dt.eastNorthUpToFixedFrame(r,a,SHe),d=AHe;d.x=e.brightness,d.y=e.saturation,d.z=e.gamma,d.w=e.atmosphereScatteringIntensity,(e.brightness!==1||e.saturation!==1||e.gamma!==1)&&o.defines.push("ENVIRONMENT_COLOR_CORRECT");let u=0;for(let h of Br.faceNames()){let p=e._radianceMapTextures[u];l(p)&&!p.isDestroyed()&&p.destroy(),p=new Et({context:n,width:i.x,height:i.y,pixelDatatype:Oe.UNSIGNED_BYTE,pixelFormat:Ke.RGBA}),e._radianceMapTextures[u]=p;let b=u,f=new xl({fragmentShaderSource:o,outputTexture:p,uniformMap:{u_radiiAndDynamicAtmosphereColor:()=>s,u_enuToFixedFrame:()=>c,u_faceDirection:()=>Br.getDirection(h,Cme),u_positionWC:()=>r,u_brightnessSaturationGammaIntensity:()=>d,u_groundColor:()=>e.groundColor.withAlpha(e.groundAlbedo,ZHe)},owner:e});f.postExecute=()=>{if(e.isDestroyed()||f.canceled){hi._activeComputeCommandCount--;return}let y=e._radianceMapComputeCommands;y[b]=void 0;let _=new os({context:n,colorTextures:[e._radianceMapTextures[b]]});_._bind(),e._radianceCubeMap[h].copyFromFramebuffer(),_._unBind(),_.destroy(),hi._activeComputeCommandCount--,y.some(l)||(e._convolutionsCommandsDirty=!0,e._shouldRegenerateShaders=!0)},e._radianceMapComputeCommands[u]=f,hi._queueCommand(f,t),u++}e._radianceCommandsDirty=!1}}function VHe(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 Ut({minificationFilter:kt.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){hi._activeComputeCommandCount--;return}let S=e._convolutionComputeCommands;S[b]=void 0,n.copyFace(t,f,y,_),c++,hi._activeComputeCommandCount--,f.destroy(),e._specularMapTextures[b]=void 0,d()},h=0;for(let p=1;p<i;++p){for(let b of Br.faceNames()){l(e._specularMapTextures[h])&&e._specularMapTextures[h].destroy();let f=e._specularMapTextures[h]=new Et({context:a,width:r,height:s,pixelDatatype:Oe.UNSIGNED_BYTE,pixelFormat:Ke.RGBA}),y=e._va;l(y)||(y=Br.createVertexArray(a,b),e._va=y);let _=e._convolveSP;l(_)||(_=qt.fromCache({context:a,vertexShaderSource:uF,fragmentShaderSource:dF,attributeLocations:{positions:0}}),e._convolveSP=_);let S=new xl({shaderProgram:_,vertexArray:y,outputTexture:f,persists:!0,owner:e,uniformMap:{u_roughness:()=>p/(i-1),u_radianceTexture:()=>n??a.defaultTexture,u_faceDirection:()=>Br.getDirection(b,Cme)}});S.postExecute=u(S,h,f,b,p),e._convolutionComputeCommands[h]=S,hi._queueCommand(S,t),++h}r/=2,s/=2}d()}var Vme=new M(3,3);function RHe(e,t){let n=t.context,i=Vme,o=e._irradianceMapTexture;l(o)&&!o.isDestroyed()&&o.destroy(),o=new Et({context:n,width:i.x,height:i.y,pixelDatatype:Oe.FLOAT,pixelFormat:Ke.RGBA}),e._irradianceMapTexture=o;let r=e._irradianceMapFS;l(r)||(r=new Be({sources:[cF]}),e._irradianceMapFS=r);let s=new xl({fragmentShaderSource:r,outputTexture:o,owner:e,uniformMap:{u_radianceMap:()=>e._radianceCubeMap??n.defaultTexture}});s.postExecute=()=>{if(e.isDestroyed()||s.canceled){hi._activeComputeCommandCount--;return}e._irradianceTextureDirty=!1,e._irradianceComputeCommand=void 0,e._sphericalHarmonicCoefficientsDirty=!0,e._irradianceMapFS=void 0,hi._activeComputeCommandCount--},e._irradianceComputeCommand=s,hi._queueCommand(s,t),e._irradianceTextureDirty=!0}function EHe(e,t){let n=t.context;if(!l(e._irradianceMapTexture))return;let i=new os({context:n,colorTextures:[e._irradianceMapTexture],destroyAttachments:!1}),o=Vme,r=n.readPixels({x:0,y:0,width:o.x,height:o.y,framebuffer:i});for(let s=0;s<9;++s)e._sphericalHarmonicCoefficients[s]=m.unpack(r,s*4),m.multiplyByScalar(e._sphericalHarmonicCoefficients[s],e.atmosphereScatteringIntensity,e._sphericalHarmonicCoefficients[s]);i.destroy(),e._irradianceMapTexture.destroy(),e._irradianceMapTexture=void 0,e._shouldRegenerateShaders=!0}hi.prototype.update=function(e){let t=e.mode;if(!(hi.isDynamicUpdateSupported(e)&&this._mipmapLevels>=1)||!this.enabled||!this.shouldUpdate||!l(this._position)||t===re.MORPHING){this._shouldRegenerateShaders=!1;return}hi._updateCommandQueue(e);let i=e.atmosphere.dynamicLighting,o=_He(this,e)||i===hb.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&&(CHe(this,e),this._radianceMapDirty=!1),this._convolutionsCommandsDirty&&(VHe(this,e),this._convolutionsCommandsDirty=!1),this._irradianceCommandDirty&&(RHe(this,e),this._irradianceCommandDirty=!1),this._irradianceTextureDirty){this._shouldRegenerateShaders=!1;return}if(this._sphericalHarmonicCoefficientsDirty){EHe(this,e),this._sphericalHarmonicCoefficientsDirty=!1;return}this._shouldRegenerateShaders=!1};hi.prototype.isDestroyed=function(){return!1};hi.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(),me(this)};hi.isDynamicUpdateSupported=function(e){let t=e.context;return t.halfFloatingPointTexture||t.colorBufferFloat};hi.AVERAGE_EARTH_GROUND_COLOR=Object.freeze(U.fromCssColorString("#717145"));hi.DEFAULT_SPHERICAL_HARMONIC_COEFFICIENTS=Object.freeze([Object.freeze(new m(.35449,.35449,.35449)),m.ZERO,m.ZERO,m.ZERO,m.ZERO,m.ZERO,m.ZERO,m.ZERO,m.ZERO]);var fb=hi;var BGn=x(T(),1);var uC={HIGHLIGHT:0,REPLACE:1,MIX:2};uC.getColorBlend=function(e,t){if(e===uC.HIGHLIGHT)return 0;if(e===uC.REPLACE)return 1;if(e===uC.MIX)return W.clamp(t,W.EPSILON4,1)};Object.freeze(uC);var qc=uC;var xFn=x(T(),1);var HGn=x(T(),1),Rme={XTRANSLATE:"xTranslate",YTRANSLATE:"yTranslate",ZTRANSLATE:"zTranslate",XROTATE:"xRotate",YROTATE:"yRotate",ZROTATE:"zRotate",XSCALE:"xScale",YSCALE:"yScale",ZSCALE:"zScale",UNIFORMSCALE:"uniformScale"};Object.freeze(Rme);var $c=Rme;var JGn=x(T(),1),Eme={STEP:0,LINEAR:1,CUBICSPLINE:2};Object.freeze(Eme);var jh=Eme;var bWn=x(T(),1);var qLn=x(T(),1);var aLn=x(T(),1);var eLn=x(T(),1);var Gme={};function mF(e){this._count=e.count,this._properties=ze(e.properties,!0)}mF.prototype.hasProperty=function(e){return On.hasProperty(e,this._properties,Gme)};mF.prototype.getPropertyIds=function(e){return On.getPropertyIds(this._properties,Gme,e)};mF.prototype.getProperty=function(e,t){let n=this._properties[t];if(l(n))return ze(n[e],!0)};mF.prototype.setProperty=function(e,t,n){let i=this._properties[t];l(i)||(i=new Array(this._count),this._properties[t]=i),i[e]=ze(n,!0)};var pb=mF;function Vc(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(Vc.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}}});Vc.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))};Vc.prototype.hasPropertyBySemantic=function(e,t){return l(this._metadataTable)?this._metadataTable.hasPropertyBySemantic(t):!1};Vc.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))};Vc.prototype.propertyExistsBySemantic=function(e){return l(this._metadataTable)?this._metadataTable.hasPropertyBySemantic(e):!1};var f4=[];Vc.prototype.getPropertyIds=function(e,t){if(t=l(t)?t:[],t.length=0,l(this._metadataTable)){let n=this._metadataTable.getPropertyIds(f4);qn(t,n)}if(l(this._batchTableHierarchy)){let n=this._batchTableHierarchy.getPropertyIds(e,f4);qn(t,n)}if(l(this._jsonMetadataTable)){let n=this._jsonMetadataTable.getPropertyIds(f4);qn(t,n)}return t};Vc.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};Vc.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 pb({count:this._count,properties:{}})),this._jsonMetadataTable.setProperty(e,t,n))};Vc.prototype.getPropertyBySemantic=function(e,t){if(l(this._metadataTable))return this._metadataTable.getPropertyBySemantic(e,t)};Vc.prototype.setPropertyBySemantic=function(e,t,n){return l(this._metadataTable)?this._metadataTable.setPropertyBySemantic(e,t,n):!1};Vc.prototype.getPropertyTypedArray=function(e){if(l(this._metadataTable))return this._metadataTable.getPropertyTypedArray(e)};Vc.prototype.getPropertyTypedArrayBySemantic=function(e){if(l(this._metadataTable))return this._metadataTable.getPropertyTypedArrayBySemantic(e)};Vc.prototype.isClass=function(e,t){let n=this._batchTableHierarchy;return l(n)?n.isClass(e,t):!1};Vc.prototype.isExactClass=function(e,t){return this.getExactClassName(e)===t};Vc.prototype.getExactClassName=function(e){let t=this._batchTableHierarchy;if(l(t))return t.getClassName(e)};Vc.prototype.destroy=function(){return this._texture=this._texture&&this._texture.destroy(),me(this)};var Dl=Vc;var gLn=x(T(),1);var mLn=x(T(),1);function Lme(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=Ed.createModelTextureReader({textureInfo:r,channels:GHe(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(Lme.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 GHe(e){return e.map(function(t){return"rgba".charAt(t)}).join("")}var hF=Lme;function p4(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 hF({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(p4.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}}});p4.prototype.getProperty=function(e){return this._properties[e]};var bb=p4;var VLn=x(T(),1);var _Ln=x(T(),1);function Wme(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(Wme.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 fF=Wme;function b4(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 fF({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(b4.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}}});b4.prototype.getProperty=function(e){return this._properties[e]};var y_=b4;var WLn=x(T(),1);function mC(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(mC.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}}});mC.prototype.getPropertyTable=function(e){return this._propertyTables[e]};mC.prototype.getPropertyTexture=function(e){return this._propertyTextures[e]};mC.prototype.getPropertyAttribute=function(e){return this._propertyAttributes[e]};mC.prototype.destroy=function(){let e=this._propertyTables;for(let t=0;t<e.length;t++)e[t]=e[t]&&e[t].destroy();return me(this)};var va=mC;function LHe(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=WHe(a,e.bufferViews,c,e.context),u=new Sm({count:a.count,properties:a.properties,class:c,bufferViews:e.bufferViews});i.push(new Dl({id:s,name:a.name,count:a.count,metadataTable:u,extras:a.extras,extensions:a.extensions,texture:d}))}let o=[];if(l(t.propertyTextures))for(let s=0;s<t.propertyTextures.length;s++){let a=t.propertyTextures[s];o.push(new bb({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 va({schema:n,propertyTables:i,propertyTextures:o,propertyAttributes:r,statistics:t.statistics,extras:t.extras,extensions:t.extensions})}var pF=4;function WHe(e,t,n,i){let o=e.properties;if(!l(o))return;let r=e.count,s;try{s=vHe(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>Lt.maximumTextureSize||a>Lt.maximumTextureSize){Tt("PropertyTableTextureExceedsMaximumSize",`Cannot create a texture for the property table "${e.name}" because it exceeds the maximum texture size of ${Lt.maximumTextureSize}.`);return}let c=IHe(s,r),d=new Ut({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:kt.NEAREST,magnificationFilter:ni.NEAREST});return Et.create({context:i,pixelFormat:Ke.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,sampler:d,flipY:!1,source:{width:r,height:a,arrayBufferView:c}})}function vHe(e,t,n,i){let o=[],r=n.properties;for(let[s,a]of Object.entries(r)){if(!a.isGpuCompatible(pF))continue;let c=e[s],d=l(c)?t[c.values]:FHe(a,i),u=d.length,h=a.cpuBytesPerElement(),p=u/h;if(p!==i)throw new le(`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 FHe(e,t){let n=e.noData,i=gt.getComponentCount(e.type),o=e.isArray?e.arrayLength:1;e.type===gt.ENUM&&(n=e.enumType.valuesByName[n]),i===1&&(n=[n]),o===1&&(n=[n]);let r=e.cpuBytesPerElement(),s=Pt.getSizeInBytes(e.valueType),a=new ArrayBuffer(r*t),c=new DataView(a),d=Pt.getDataViewAccessors(c,e.valueType);for(let u=0;u<t;u++)for(let h=0;h<o;h++)for(let p=0;p<i;p++){let b=h*i+p;d.set(r*u+b*s,n[h][p])}return new Uint8Array(a)}function IHe(e,t){let n=e.length,i=new Uint8Array(n*t*pF),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*pF,d=a.valueType,u=Pt.gpuComponentType(d);if(d!==u){XHe(s,o,c);continue}PHe(s,i,c)}return i}function PHe(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*pF;t.set(i.subarray(a,a+o),c)}}function XHe(e,t,n){let i=e.classProperty,o=e.view,r=i.valueType,s=Pt.gpuComponentType(r),a=i.cpuBytesPerElement(),c=o.length/a,d=new DataView(o.buffer,o.byteOffset,o.byteLength),u=Pt.getDataViewAccessors(d,r),h=Pt.getDataViewAccessors(t,s),p=Pt.downcastFunction(r);for(let b=0;b<c;b++){let f=b*a,y=n+b*pF,_=u.get(f);h.set(y,p(_))}}var bF=LHe;var aWn=x(T(),1);function NHe(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 Sm({count:c.count,properties:c.properties,class:d,bufferViews:e.bufferViews});o.push(new Dl({id:a,count:c.count,metadataTable:u,extras:c.extras,extensions:c.extensions}))}let s=[];if(l(t.featureTextures))for(r=Object.keys(t.featureTextures).sort(),i=0;i<r.length;i++){let a=r[i],c=t.featureTextures[a];s.push(new bb({id:a,propertyTexture:YHe(c),class:n.classes[c.class],textures:e.textures}))}return new va({schema:n,propertyTables:o,propertyTextures:s,statistics:t.statistics,extras:t.extras,extensions:t.extensions})}function YHe(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:wHe(o.channels),extras:o.extras,extensions:o.extensions};t.properties[i]=Rt(o.texture,r,!0)}return t}function wHe(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 gF=NHe;var g4=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=ut.UNLOADED,this._promise=void 0}get cacheKey(){return this._cacheKey}get structuralMetadata(){return this._structuralMetadata}load(){return l(this._promise)?this._promise:(this._state=ut.LOADING,this._promise=MHe(this),this._promise)}process(t){if(this._state===ut.READY)return!0;if(this._state!==ut.LOADED)return!1;let n=this._textureLoaders,i=n.length,o=!0;for(let c=0;c<i;++c){let u=n[c].process(t);o=o&&u}if(!o)return!1;let r=this._schemaLoader.schema,s={};for(let c=0;c<this._bufferViewIds.length;++c){let d=this._bufferViewIds[c],u=this._bufferViewLoaders[c];if(!u.isDestroyed()){let h=new Uint8Array(u.typedArray);s[d]=h}}let a={};for(let c=0;c<this._textureIds.length;++c){let d=this._textureIds[c],u=n[c];u.isDestroyed()||(a[d]=u.texture)}return l(this._extension)?this._structuralMetadata=bF({extension:this._extension,schema:r,bufferViews:s,textures:a,context:t.context}):this._structuralMetadata=gF({extension:this._extensionLegacy,schema:r,bufferViews:s,textures:a}),vme(this),this._state=ut.READY,!0}unload(){vme(this),qHe(this),l(this._schemaLoader)&&vi.unload(this._schemaLoader),this._schemaLoader=void 0,l(this._structuralMetadata)&&this._structuralMetadata.destroy(),this._structuralMetadata=void 0}};async function MHe(e){try{let t=BHe(e),n=jHe(e),i=QHe(e);return await Promise.all([t,n,i]),e.isDestroyed()?void 0:(e._gltf=void 0,e._state=ut.LOADED,e)}catch(t){if(e.isDestroyed())return;throw e.unload(),e._state=ut.FAILED,e.getError("Failed to load structural metadata",t)}}function kHe(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 UHe(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 DHe(e){let t=e.propertyTables,n={};if(l(t))for(let i=0;i<t.length;i++){let o=t[i];kHe(o.properties,n)}return n}function OHe(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)&&UHe(r,n)}}return n}async function BHe(e){let t;l(e._extension)?t=DHe(e._extension):t=OHe(e._extensionLegacy);let n=[];for(let i in t)if(t.hasOwnProperty(i)){let o=vi.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 zHe(e){let t={},n=e.propertyTextures;if(l(n))for(let i=0;i<n.length;i++){let r=n[i].properties;l(r)&&HHe(r,t)}return t}function HHe(e,t){for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];t[i.index]=i}}function KHe(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)&&JHe(r,t)}}return t}function JHe(e,t){for(let n in e)if(e.hasOwnProperty(n)){let o=e[n].texture;t[o.index]=o}}function jHe(e){let t;l(e._extension)?t=zHe(e._extension):t=KHe(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=vi.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 QHe(e){let t=e._extension??e._extensionLegacy,n;if(l(t.schemaUri)){let i=e._baseResource.getDerivedResource({url:t.schemaUri});n=vi.getSchemaLoader({resource:i})}else n=vi.getSchemaLoader({schema:t.schema});if(e._schemaLoader=n,await n.load(),!n.isDestroyed())return n.schema}function vme(e){let t=e._bufferViewLoaders,n=t.length;for(let i=0;i<n;++i)vi.unload(t[i]);e._bufferViewLoaders.length=0,e._bufferViewIds.length=0}function qHe(e){let t=e._textureLoaders,n=t.length;for(let i=0;i<n;++i)vi.unload(t[i]);e._textureLoaders.length=0,e._textureIds.length=0}var yF=g4;var yWn=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 _r=x_;var wWn=x(T(),1);var GWn=x(T(),1);var $He=65534,eKe=255;function q5(e){e=e??B.EMPTY_OBJECT;let t=e.triangleIndices,n=e.outlineIndices,i=e.originalVertexCount;this._triangleIndices=t,this._originalVertexCount=i,this._edges=new Pme(n,i),this._outlineCoordinatesTypedArray=void 0,this._extraVertices=[],tKe(this)}Object.defineProperties(q5.prototype,{updatedTriangleIndices:{get:function(){return this._triangleIndices}},outlineCoordinates:{get:function(){return this._outlineCoordinatesTypedArray}}});function tKe(e){let t=e._triangleIndices,n=e._edges,i=[],o=e._extraVertices,r=e._originalVertexCount,s={};for(let a=0;a<t.length;a+=3){let c=t[a],d=t[a+1],u=t[a+2],h=!1,p=h||n.hasEdge(c,d),b=h||n.hasEdge(d,u),f=h||n.hasEdge(u,c),y=Fme(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]=_}_>$He&&(t instanceof Uint16Array||t instanceof Uint8Array)?t=new Uint32Array(t):_>eKe&&t instanceof Uint8Array&&(t=new Uint16Array(t)),y===c?(c=_,t[a]=_):y===d?(d=_,t[a+1]=_):(u=_,t[a+2]=_),y=Fme(i,c,d,u,p,b,f)}}e._triangleIndices=t,e._outlineCoordinatesTypedArray=new Float32Array(i)}function Fme(e,t,n,i,o,r,s){let a=s?1:0,c=o?1:0,d=0,u=y4(e,t,a,c,d);if(u===0)return t;let h=0,p=o?1:0,b=r?1:0,f=y4(e,n,h,p,b);if(f===0)return n;let y=s?1:0,_=0,S=r?1:0,A=y4(e,i,y,_,S);if(A===0)return i;let Z=u&f&A,V,E,L;if(Z&1)V=0,E=1,L=2;else if(Z&2)V=0,L=1,E=2;else if(Z&4)E=0,V=1,L=2;else if(Z&8)E=0,L=1,V=2;else if(Z&16)L=0,V=1,E=2;else if(Z&32)L=0,E=1,V=2;else{let N=x4(u),g=x4(f),C=x4(A);return N<g&&N<C?t:g<C?n:i}let v=t*3;e[v+V]=a,e[v+E]=c,e[v+L]=d;let I=n*3;e[I+V]=h,e[I+E]=p,e[I+L]=b;let X=i*3;e[X+V]=y,e[X+E]=_,e[X+L]=S}function y4(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 x4(e){return(e&1)+(e>>1&1)+(e>>2&1)+(e>>3&1)+(e>>4&1)+(e>>5&1)}q5.prototype.updateAttribute=function(e){let t=this._extraVertices,n=e.length,i=n/this._originalVertexCount,o=t.length,r=e.constructor,s=new r(e.length+o*i);s.set(e);for(let a=0;a<o;a++){let c=t[a]*i,d=n+a*i;for(let u=0;u<i;u++)s[d+u]=s[c+u]}return s};q5.createTexture=function(e){let t=e.cache.modelOutliningCache;if(l(t)||(t=e.cache.modelOutliningCache={}),l(t.outlineTexture))return t.outlineTexture;let n=Math.min(4096,Lt.maximumTextureSize),i=n,o=Ime(i),r=[];for(;i>1;)i>>=1,r.push(Ime(i));let s=new Et({context:e,source:{arrayBufferView:o,mipLevels:r},width:n,height:1,pixelFormat:Ke.LUMINANCE,sampler:new Ut({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:kt.LINEAR_MIPMAP_LINEAR,magnificationFilter:ni.LINEAR})});return t.outlineTexture=s,s};function Ime(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 Pme(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)}}Pme.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_=q5;function Xme(e){this.attribute=e,this.loadBuffer=!1,this.loadTypedArray=!1}function nKe(e){this.indices=e,this.loadBuffer=!1,this.loadTypedArray=!1}function $5(e){this.primitive=e,this.attributePlans=[],this.indicesPlan=void 0,this.needsOutlines=!1,this.outlineIndices=void 0,this.needsGaussianSplats=!1}$5.prototype.postProcess=function(e){this.needsOutlines&&(iKe(this),sKe(this,e)),this.needsGaussianSplats&&rKe(this,e)};function iKe(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=Me.fromTypedArray(n.typedArray);let r=oKe(o.outlineCoordinates),s=new Xme(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 oKe(e){let t=new yn.Attribute;return t.name="_OUTLINE_COORDINATES",t.typedArray=e,t.componentDatatype=K.FLOAT,t.type=Nt.VEC3,t.normalized=!1,t.count=e.length/3,t}function rKe(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 sKe(e,t){aKe(e.attributePlans,t),l(e.indicesPlan)&&cKe(e.indicesPlan,t)}function aKe(e,t){let n=e.length;for(let i=0;i<n;i++){let o=e[i],r=o.attribute,s=r.typedArray;if(o.loadBuffer){let a=qe.createVertexBuffer({typedArray:s,context:t,usage:Fe.STATIC_DRAW});a.vertexArrayDestroyable=!1,r.buffer=a}o.loadTypedArray||(r.typedArray=void 0)}}function cKe(e,t){let n=e.indices;if(e.loadBuffer){let i=qe.createIndexBuffer({typedArray:n.typedArray,context:t,usage:Fe.STATIC_DRAW,indexDatatype:n.indexDatatype});n.buffer=i,i.vertexArrayDestroyable=!1}e.loadTypedArray||(n.typedArray=void 0)}$5.AttributeLoadPlan=Xme;$5.IndicesLoadPlan=nKe;var __=$5;var UWn=x(T(),1);function lKe(e){e=e??B.EMPTY_OBJECT,this.webp=e.webp??!1,this.basis=e.basis??!1}var xF=lKe;var uvn=x(T(),1);var OWn=x(T(),1);function Nme(e){this._position=e.position,this._adjustmentParams=e.adjustmentParams}Object.defineProperties(Nme.prototype,{position:{get:function(){return this._position}},adjustmentParams:{get:function(){return this._adjustmentParams}}});var TF=Nme;var zWn=x(T(),1);function Yme(e){this._position=e.position,this._adjustmentParams=e.adjustmentParams,this._covarianceMatrix=e.covarianceMatrix}Object.defineProperties(Yme.prototype,{position:{get:function(){return this._position}},adjustmentParams:{get:function(){return this._adjustmentParams}},covarianceMatrix:{get:function(){return this._covarianceMatrix}}});var _F=Yme;var KWn=x(T(),1);function wme(e){this._groupFlags=e.groupFlags,this._rotationThetas=e.rotationThetas,this._params=e.params}Object.defineProperties(wme.prototype,{groupFlags:{get:function(){return this._groupFlags}},rotationThetas:{get:function(){return this._rotationThetas}},params:{get:function(){return this._params}}});var SF=wme;var qWn=x(T(),1);var jWn=x(T(),1),Mme={Direct:"Direct",Indirect:"Indirect"};Object.freeze(Mme);var Ly=Mme;function kme(e){this._storageType=e.storageType,this._anchorPointsIndirect=e.anchorPointsIndirect,this._anchorPointsDirect=e.anchorPointsDirect,this._intraTileCorrelationGroups=e.intraTileCorrelationGroups,this._covarianceDirect=e.covarianceDirect}Object.defineProperties(kme.prototype,{storageType:{get:function(){return this._storageType}},anchorPointsIndirect:{get:function(){return this._anchorPointsIndirect}},anchorPointsDirect:{get:function(){return this._anchorPointsDirect}},intraTileCorrelationGroups:{get:function(){return this._intraTileCorrelationGroups}},covarianceDirect:{get:function(){return this._covarianceDirect}}});var hC=kme;var evn=x(T(),1);function Ume(e){this._A=e.A,this._alpha=e.alpha,this._beta=e.beta,this._T=e.T}Object.defineProperties(Ume.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 AF=Ume;function fC(){}function Dme(e){return new q(e[0],e[1],e[3],e[1],e[2],e[4],e[3],e[4],e[5])}function dKe(e){let t=m.fromArray(e.position,0,new m),n=m.fromArray(e.adjustmentParams,0,new m);return new TF({position:t,adjustmentParams:n})}function uKe(e){let t=m.fromArray(e.position,0,new m),n=m.fromArray(e.adjustmentParams,0,new m),i=Dme(e.covarianceMatrix);return new _F({position:t,adjustmentParams:n,covarianceMatrix:i})}function mKe(e){let t=e.groupFlags,n=m.fromArray(e.rotationThetas,0,new m),i=[];for(let r of e.params){let s=new AF({A:r.A,alpha:r.alpha,beta:r.beta,T:r.T});i.push(s)}return new SF({groupFlags:t,rotationThetas:n,params:i})}fC.load=function(e){let t=e.storageType;if(t===Ly.Direct)return fC.loadDirect(e);if(t===Ly.Indirect)return fC.loadIndirect(e);throw new le(`Invalid storage type in NGA_gpm_local - expected 'Direct' or 'Indirect', but found ${t}`)};fC.loadDirect=function(e){let t=[],n=e.anchorPointsDirect;for(let r of n){let s=dKe(r);t.push(s)}let i=Dme(e.covarianceDirectUpperTriangle);return new hC({storageType:Ly.Direct,anchorPointsDirect:t,covarianceDirect:i})};fC.loadIndirect=function(e){let t=[],n=e.anchorPointsIndirect;for(let s of n){let a=uKe(s);t.push(a)}let i=e.intraTileCorrelationGroups,o=[];for(let s of i){let a=mKe(s);o.push(a)}return new hC({storageType:Ly.Indirect,anchorPointsIndirect:t,intraTileCorrelationGroups:o})};var ZF=fC;var Lvn=x(T(),1);var hvn=x(T(),1);function Ome(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(Ome.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 CF=Ome;var pvn=x(T(),1);function Bme(e){this._min=e.min,this._max=e.max,this._source=e.source}Object.defineProperties(Bme.prototype,{min:{get:function(){return this._min}},max:{get:function(){return this._max}},source:{get:function(){return this._source}}});var VF=Bme;var gvn=x(T(),1);function zme(e){this._ppeTextures=e}Object.defineProperties(zme.prototype,{ppeTextures:{get:function(){return this._ppeTextures}}});var RF=zme;function jr(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=ut.UNLOADED,this._promise=void 0}l(Object.create)&&(jr.prototype=Object.create(Hi.prototype),jr.prototype.constructor=jr);Object.defineProperties(jr.prototype,{cacheKey:{get:function(){return this._cacheKey}},meshPrimitiveGpmLocal:{get:function(){return this._meshPrimitiveGpmLocal}},structuralMetadata:{get:function(){return this._structuralMetadata}}});jr.prototype._loadResources=async function(){try{return await this._loadTextures(),this.isDestroyed()?void 0:(this._gltf=void 0,this._state=ut.LOADED,this)}catch(e){if(this.isDestroyed())return;throw this.unload(),this._state=ut.FAILED,this.getError("Failed to load GPM data",e)}};jr.prototype.load=function(){return l(this._promise)?this._promise:(this._state=ut.LOADING,this._promise=this._loadResources(this),this._promise)};function hKe(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}jr.prototype._loadTextures=function(){let e;l(this._extension)&&(e=hKe(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=vi.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)};jr.ppeTexturesMetadataSchemaCache=new Map;jr._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}}}};jr._obtainPpeTexturesMetadataSchema=function(e){let n=jr._collectPpeTexturePropertyIdentifiers(e).toString(),i=jr.ppeTexturesMetadataSchemaCache.get(n);if(l(i))return i;let r={id:`PPE_TEXTURE_SCHEMA_${jr.ppeTexturesMetadataSchemaCache.size}`,classes:{}},s=e.ppeTextures;for(let a=0;a<s.length;a++){let c=s[a],d=`ppeTexture_${a}`,u=jr._createPpeTextureClassJson(c,a);r.classes[d]=u}return i=Ml.fromJson(r),jr.ppeTexturesMetadataSchemaCache.set(n,i),i};jr._collectPpeTexturePropertyIdentifiers=function(e){let t=[],n=e.ppeTextures;for(let i=0;i<n.length;i++){let o=n[i],r=jr._createPpeTextureClassJson(o,i),s=JSON.stringify(r);t.push(s)}return t};jr._convertToStructuralMetadata=function(e,t){let n=[],i=jr._obtainPpeTexturesMetadataSchema(e),o=e.ppeTextures;for(let s=0;s<o.length;s++){let a=o[s],c=`ppeTexture_${s}`,u=a.traits.source,h=i.classes[c],p={class:c,properties:{[u]:{index:a.index,texCoord:a.texCoord}}};n.push(new bb({id:s,name:a.name,propertyTexture:p,class:h,textures:t}))}return new va({schema:i,propertyTables:[],propertyTextures:n,propertyAttributes:[]})};jr.prototype.process=function(e){if(this._state===ut.READY)return!0;if(this._state!==ut.LOADED)return!1;let t=this._textureLoaders,n=t.length,i=!0;for(let d=0;d<n;++d){let h=t[d].process(e);i=i&&h}if(!i)return!1;let o={};for(let d=0;d<this._textureIds.length;++d){let u=this._textureIds[d],h=t[d];h.isDestroyed()||(o[u]=h.texture)}let r=[],s=this._extension;if(l(s.ppeTextures)){let d=s.ppeTextures;for(let u of d){let h=u.traits,p=new VF({min:h.min,max:h.max,source:h.source}),b=new CF({traits:p,noData:u.noData,offset:u.offset,scale:u.scale,index:u.index,texCoord:u.texCoord});r.push(b)}}let a=new RF(r);this._meshPrimitiveGpmLocal=a;let c=jr._convertToStructuralMetadata(a,o);return this._structuralMetadata=c,this._state=ut.READY,!0};jr.prototype._unloadTextures=function(){let e=this._textureLoaders,t=e.length;for(let n=0;n<t;++n)vi.unload(e[n]);this._textureLoaders.length=0,this._textureIds.length=0};jr.prototype.unload=function(){this._unloadTextures(),this._gltf=void 0,this._extension=void 0,this._structuralMetadata=void 0};var EF=jr;var Xvn=x(T(),1);function fKe(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 GF=fKe;var{Attribute:pKe,Indices:bKe,FeatureIdAttribute:Kme,FeatureIdTexture:Jme,FeatureIdImplicitRange:jme,MorphTarget:gKe,Primitive:yKe,Instances:xKe,Skin:TKe,Node:_Ke,AnimatedPropertyType:SKe,AnimationSampler:AKe,AnimationTarget:ZKe,AnimationChannel:CKe,Animation:VKe,ArticulationStage:RKe,Articulation:EKe,Asset:GKe,Scene:LKe,Components:WKe,MetallicRoughness:vKe,SpecularGlossiness:FKe,Specular:IKe,Anisotropy:T4,Clearcoat:_4,LineStyle:PKe,Material:XKe,Vector:NKe}=yn,$o={NOT_LOADED:0,LOADING:1,LOADED:2,PROCESSING:3,POST_PROCESSING:4,PROCESSED:5,READY:6,FAILED:7,UNLOADED:8},S4=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=to.Y,forwardAxis:c=to.Z,loadAttributesAsTypedArray:d=!1,loadAttributesFor2D:u=!1,enablePick:h=!1,loadIndicesForWireframe:p=!1,loadPrimitiveOutline:b=!0,loadForClassification:f=!1,renameBatchIdSemantic:y=!1}=t,{baseResource:_=n.clone()}=t;this._gltfJson=t.gltfJson,this._gltfResource=n,this._baseResource=_,this._typedArray=i,this._releaseGltfJson=o,this._asynchronous=r,this._incrementallyLoadTextures=s,this._upAxis=a,this._forwardAxis=c,this._loadAttributesAsTypedArray=d,this._loadAttributesFor2D=u,this._enablePick=h,this._loadIndicesForWireframe=p,this._loadPrimitiveOutline=b,this._loadForClassification=f,this._renameBatchIdSemantic=y,this._sortedPropertyTableIds=void 0,this._sortedFeatureTextureIds=void 0,this._gltfJsonLoader=void 0,this._state=$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=YKe(this),this._promise)}_process(t){return this._state===$o.READY?!0:(this._state===$o.PROCESSING&&MKe(this,t),this._resourcesLoaded&&this._state===$o.POST_PROCESSING&&(kKe(this,t.context),this._state=$o.PROCESSED),this._resourcesLoaded&&this._state===$o.PROCESSED?(Hme(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=wKe(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,eD(this,r)}let n=this._textureErrors.pop();if(l(n)){let r=this.getError("Failed to load glTF texture",n);throw r.name="TextureError",r}if(this._state===$o.FAILED)return!1;let i=!1;try{i=this._process(t)}catch(r){this._state=$o.FAILED,eD(this,r)}let o=!1;try{o=this._processTextures(t)}catch(r){this._textureState=$o.FAILED,eD(this,r)}return this._incrementallyLoadTextures?i:i&&o}isUnloaded(){return this._state===$o.UNLOADED}unload(){l(this._gltfJsonLoader)&&!this._gltfJsonLoader.isDestroyed()&&vi.unload(this._gltfJsonLoader),this._gltfJsonLoader=void 0,QJe(this),Hme(this),qJe(this),$Je(this),eje(this),tje(this),this._components=void 0,this._typedArray=void 0,this._state=$o.UNLOADED}};async function YKe(e){e._state=$o.LOADING,e._textureState=$o.LOADING;try{let t=vi.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,eD(e,t)}}async function wKe(e,t){an.supportsWebP.initialized||await an.supportsWebP.initialize(),e._supportedImageFormats=new xF({webp:an.supportsWebP(),basis:t.context.supportsBasis});let n=jJe(e,t);return e._state=$o.PROCESSING,e._textureState=$o.PROCESSING,l(e._gltfJsonLoader)&&e._releaseGltfJson&&(vi.unload(e._gltfJsonLoader),e._gltfJsonLoader=void 0),n}function eD(e,t){throw e.unload(),e.getError("Failed to load glTF",t)}function MKe(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)&&Tt("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 kKe(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)&&UKe(e,o)}}function UKe(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 DKe(e,t,n,i,o,r,s,a,c){let d=e.gltfJson,h=d.accessors[t].bufferView;return vi.getVertexBufferLoader({gltf:d,gltfResource:e._gltfResource,baseResource:e._baseResource,frameState:c,bufferViewId:h,primitive:i,draco:o,spz:r,attributeSemantic:n,accessorId:t,asynchronous:e._asynchronous,loadBuffer:s,loadTypedArray:a})}function OKe(e,t,n,i,o,r,s){return vi.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 BKe(e,t){let n=vi.getBufferViewLoader({gltf:e.gltfJson,bufferViewId:t,gltfResource:e._gltfResource,baseResource:e._baseResource});return e._bufferViewLoaders.push(n),n}function Qme(e,t,n){let i=t.byteOffset,o=Rd(e,t),r=t.count,s=uu(t.type),a=t.componentType,c=K.getSizeInBytes(a),d=c*s,u=r*s;if(o===d)return n=new Uint8Array(n),K.createArrayBufferView(a,n.buffer,n.byteOffset+i,u);let h=K.createTypedArray(a,u),p=new DataView(n.buffer),b=new Array(s),f=lb(t.componentType);i=n.byteOffset+i;for(let y=0;y<r;++y){f(p,i,s,c,b);for(let _=0;_<s;++_)h[y*s+_]=b[_];i+=o}return h}function zKe(e,t){let n=e.type;if(n===Nt.SCALAR)return t.fill(0);let i=Nt.getMathType(n);return t.fill(i.clone(i.ZERO))}function HKe(e,t,n,i){let o=e.type,r=e.count;if(o===Nt.SCALAR)for(let s=0;s<r;s++)n[s]=t[s];else if(o===Nt.VEC4&&i)for(let s=0;s<r;s++)n[s]=Pe.unpack(t,s*4);else{let s=Nt.getMathType(o),a=Nt.getNumberOfComponents(o);for(let c=0;c<r;c++)n[c]=s.unpack(t,c*a)}return n}async function KKe(e,t,n,i,o){let{gltfJson:r}=e;if(await t.load(),e.isDestroyed())return;let s=Qme(r,n,t.typedArray);i=i??!1,HKe(n,s,o,i)}function Wy(e,t,n){let i=new Array(t.count),o=t.bufferView;if(l(o)){let r=BKe(e,o),s=KKe(e,r,t,n,i);return e._loaderPromises.push(s),i}return zKe(t,i)}function Ld(e,t){if(l(t))return e===Number?t[0]:e.unpack(t)}function JKe(e){return e===Number?0:new e}function jKe(e){switch(e){case K.BYTE:return 127;case K.UNSIGNED_BYTE:return 255;case K.SHORT:return 32767;case K.UNSIGNED_SHORT:return 65535;default:return 1}}var QKe={VEC2:new M(-1,-1),VEC3:new m(-1,-1,-1),VEC4:new se(-1,-1,-1,-1)};function qKe(e,t){let n=jKe(e.componentDatatype),i=QKe[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 $Ke(e,t,n){let i=e.decodeMatrix,o=Ld(n,e.decodedMin),r=Ld(n,e.decodedMax);l(o)&&l(r)&&(t.min=o,t.max=r);let s=new yn.Quantization;s.componentDatatype=t.componentDatatype,s.type=t.type,i.length===4?(s.quantizedVolumeOffset=i[2],s.quantizedVolumeStepSize=i[0]):i.length===9?(s.quantizedVolumeOffset=new M(i[6],i[7]),s.quantizedVolumeStepSize=new M(i[0],i[4])):i.length===16?(s.quantizedVolumeOffset=new m(i[12],i[13],i[14]),s.quantizedVolumeStepSize=new m(i[0],i[5],i[10])):i.length===25&&(s.quantizedVolumeOffset=new se(i[20],i[21],i[22],i[23]),s.quantizedVolumeStepSize=new se(i[0],i[6],i[12],i[18])),t.quantization=s}function eJe(e,t,n,i,o){let r=e.accessors[t],s=Nt.getMathType(r.type),a=r.normalized??!1,c=new pKe;c.name=n,c.semantic=i,c.setIndex=o,c.constant=JKe(s),c.componentDatatype=r.componentType,c.normalized=a,c.count=r.count,c.type=r.type,c.min=Ld(s,r.min),c.max=Ld(s,r.max),c.byteOffset=r.byteOffset,c.byteStride=Rd(e,r),_i(r,"WEB3D_quantized_attributes")&&$Ke(r.extensions.WEB3D_quantized_attributes,c,s);let d=c.semantic===nt.POSITION||c.semantic===nt.NORMAL||c.semantic===nt.TANGENT||c.semantic===nt.TEXCOORD||c.semantic===nt.FEATURE_ID||c.semantic===nt.SCALE||c.semantic===nt.ROTATION;return e.extensionsRequired?.includes("KHR_mesh_quantization")&&a&&d&&qKe(c,s),c}function qme(e){let n=/^\w+_(\d+)$/.exec(e);if(n!==null)return parseInt(n[1])}var tJe={gltfSemantic:void 0,renamedSemantic:void 0,modelSemantic:void 0};function A4(e,t,n){let i=n;e._renameBatchIdSemantic&&(n==="_BATCHID"||n==="BATCHID")&&(i="_FEATURE_ID_0");let o=t.fromGltfSemantic(i),r=tJe;return r.gltfSemantic=n,r.renamedSemantic=i,r.modelSemantic=o,r}function nJe(e){let t=e===nt.POSITION,n=e===nt.FEATURE_ID,i=e===nt.TEXCOORD;return t||n||i}function iJe(e,t,n,i){if(e.byteOffset=0,e.byteStride=void 0,e.quantization=t.quantization,n&&(e.buffer=t.buffer),i){let o=l(t.quantization)?t.quantization.componentDatatype:e.componentDatatype;e.typedArray=K.createArrayBufferView(o,t.typedArray.buffer)}}function oJe(e,t,n,i){if(e.byteOffset=0,e.byteStride=void 0,n&&(e.buffer=t.buffer),i&&l(t.typedArray)&&(e.typedArray=K.createArrayBufferView(e.componentDatatype,t.typedArray.buffer)),e.semantic===nt.POSITION){let o=s=>{let a=1/0,c=-1/0,d=1/0,u=-1/0,h=1/0,p=-1/0;for(let b=0;b<s.length;b+=3){let f=s[b],y=s[b+1],_=s[b+2];a=Math.min(a,f),c=Math.max(c,f),d=Math.min(d,y),u=Math.max(u,y),h=Math.min(h,_),p=Math.max(p,_)}return[new m(a,d,h),new m(c,u,p)]},r=e.typedArray;[e.min,e.max]=o(r)}}function rJe(e,t,n,i,o,r){if(o&&(n.buffer=i.buffer),r){let s=i.typedArray;n.typedArray=Qme(e,t,s),o||(n.byteOffset=0,n.byteStride=void 0)}}function $me(e,t,n,i,o,r,s,a,c){let d=e.gltfJson,u=d.accessors[t],h=u.bufferView,p=n.gltfSemantic,b=n.renamedSemantic,f=n.modelSemantic,y=l(f)?qme(b):void 0,S=eJe(d,t,p,f,y);if(!l(o)&&!l(h)&&!l(r))return S;let A=DKe(e,t,p,i,o,r,s,a,c),Z=e._geometryLoaders.length;e._geometryLoaders.push(A);let V=A.load();return e._loaderPromises.push(V),e._geometryCallbacks[Z]=()=>{l(o)&&l(o.attributes)&&l(o.attributes[p])?iJe(S,A,s,a):l(r)?oJe(S,A,s,a):rJe(d,u,S,A,s,a)},S}function ehe(e,t,n,i,o,r,s,a,c){let d=n.modelSemantic,u=d===nt.POSITION,h=d===nt.FEATURE_ID,p=u&&!s&&e._loadAttributesFor2D&&!c.scene3DOnly,b=u&&e._enablePick&&!c.context.webgl2,f=e._loadForClassification&&h,y=e._loadAttributesAsTypedArray,_=!y,S=y||p||b||f,V=$me(e,t,n,i,o,r,a?!1:_,a?!0:S,c),E=new __.AttributeLoadPlan(V);return E.loadBuffer=_,E.loadTypedArray=S,E}function sJe(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=A4(e,_r,i),d=c.modelSemantic,u=d===_r.TRANSLATION||d===_r.ROTATION||d===_r.SCALE,h=d===_r.TRANSLATION,p=e._loadAttributesAsTypedArray||s&&u||!o.context.instancedArrays,b=e._enablePick&&!o.context.webgl2,f=!p,y=e._loadAttributesFor2D&&!o.scene3DOnly;return $me(e,t,c,void 0,void 0,void 0,f,p||h&&(!a||y||b),o)}function aJe(e,t,n,i,o,r){let s=e.gltfJson.accessors[t],a=s.bufferView,c=n.extensions??B.EMPTY_OBJECT,d=c.KHR_draco_mesh_compression,u=l(c.EXT_mesh_primitive_edge_visibility);if(!l(d)&&!l(a))return;let h=new bKe;h.count=s.count;let p=e._loadAttributesAsTypedArray,b=(e._loadIndicesForWireframe||e._enablePick)&&!r.context.webgl2,f=e._loadForClassification&&i,_=!p,S=p||b||f||u,V=OKe(e,t,n,d,o?!1:_,o?!0:S,r),E=e._geometryLoaders.length;e._geometryLoaders.push(V);let L=V.load();e._loaderPromises.push(L),e._geometryCallbacks[E]=()=>{h.indexDatatype=V.indexDatatype,h.buffer=V.buffer,h.typedArray=V.typedArray};let v=new __.IndicesLoadPlan(h);return v.loadBuffer=_,v.loadTypedArray=S,v}function Ol(e,t,n,i){let o=e.gltfJson,r=Ed.getImageIdFromTexture({gltf:o,textureId:t.index,supportedImageFormats:e._supportedImageFormats});if(!l(r))return;let s=vi.getTextureLoader({gltf:o,textureInfo:t,gltfResource:e._gltfResource,baseResource:e._baseResource,supportedImageFormats:e._supportedImageFormats,frameState:n,asynchronous:e._asynchronous}),a=Ed.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 cJe(e,t,n){let{diffuseTexture:i,specularGlossinessTexture:o,diffuseFactor:r,specularFactor:s,glossinessFactor:a}=t,c=new FKe;return l(i)&&(c.diffuseTexture=Ol(e,i,n)),l(o)&&(c.specularGlossinessTexture=Ol(e,o,n)),c.diffuseFactor=Ld(se,r),c.specularFactor=Ld(m,s),c.glossinessFactor=a,c}function lJe(e,t,n){let{baseColorTexture:i,metallicRoughnessTexture:o,baseColorFactor:r,metallicFactor:s,roughnessFactor:a}=t,c=new vKe;return l(i)&&(c.baseColorTexture=Ol(e,i,n)),l(o)&&(c.metallicRoughnessTexture=Ol(e,o,n)),c.baseColorFactor=Ld(se,r),c.metallicFactor=s,c.roughnessFactor=a,c}function dJe(e,t,n){let{specularFactor:i,specularTexture:o,specularColorFactor:r,specularColorTexture:s}=t,a=new IKe;return l(o)&&(a.specularTexture=Ol(e,o,n)),l(s)&&(a.specularColorTexture=Ol(e,s,n)),a.specularFactor=i,a.specularColorFactor=Ld(m,r),a}function uJe(e,t,n){let{anisotropyStrength:i=T4.DEFAULT_ANISOTROPY_STRENGTH,anisotropyRotation:o=T4.DEFAULT_ANISOTROPY_ROTATION,anisotropyTexture:r}=t,s=new T4;return l(r)&&(s.anisotropyTexture=Ol(e,r,n)),s.anisotropyStrength=i,s.anisotropyRotation=o,s}function mJe(e,t,n){let{clearcoatFactor:i=_4.DEFAULT_CLEARCOAT_FACTOR,clearcoatTexture:o,clearcoatRoughnessFactor:r=_4.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR,clearcoatRoughnessTexture:s,clearcoatNormalTexture:a}=t,c=new _4;return l(o)&&(c.clearcoatTexture=Ol(e,o,n)),l(s)&&(c.clearcoatRoughnessTexture=Ol(e,s,n)),l(a)&&(c.clearcoatNormalTexture=Ol(e,a,n)),c.clearcoatFactor=i,c.clearcoatRoughnessFactor=r,c}function hJe(e){if(!l(e))return;let t=new PKe;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 fJe(e,t,n){let i=new XKe,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=cJe(e,r,n):(l(d)&&(i.metallicRoughness=lJe(e,d,n)),l(s)&&!i.unlit&&(i.specular=dJe(e,s,n)),l(a)&&!i.unlit&&(i.anisotropy=uJe(e,a,n)),l(c)&&!i.unlit&&(i.clearcoat=mJe(e,c,n))),l(t.emissiveTexture)&&(i.emissiveTexture=Ol(e,t.emissiveTexture,n)),l(t.normalTexture)&&!e._loadForClassification&&(i.normalTexture=Ol(e,t.normalTexture,n)),l(t.occlusionTexture)&&(i.occlusionTexture=Ol(e,t.occlusionTexture,n)),i.emissiveFactor=Ld(m,t.emissiveFactor),i.alphaMode=t.alphaMode,i.alphaCutoff=t.alphaCutoff,i.doubleSided=t.doubleSided;let u=o.BENTLEY_materials_point_style;if(l(u)&&l(u.diameter)){let h=u.diameter;h>=1&&(i.pointDiameter=Math.floor(h))}return i.lineStyle=hJe(o.BENTLEY_materials_line_style),i}function the(e,t){let n=new Kme;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 nhe(e,t,n,i){let o=new Kme,r=e.featureIds;return o.featureCount=n,o.propertyTableId=t,o.setIndex=qme(r.attribute),o.positionalLabel=i,o}function ihe(e,t){let n=new jme;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 jme,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 pJe(e,t,n,i){let o=new Jme;o.featureCount=t.featureCount,o.nullFeatureId=t.nullFeatureId,o.propertyTableId=t.propertyTable,o.label=t.label,o.positionalLabel=i;let r=t.texture;o.textureReader=Ol(e,r,n,Ut.NEAREST);let a=(l(r.channels)?r.channels:[0]).map(function(c){return"rgba".charAt(c)}).join("");return o.textureReader.channels=a,o}function bJe(e,t,n,i,o,r){let s=new Jme,a=t.featureIds,c=a.texture;return s.featureCount=o,s.propertyTableId=n,s.textureReader=Ol(e,c,i,Ut.NEAREST),s.textureReader.channels=a.channels,s.positionalLabel=r,s}function gJe(e,t,n,i,o){let r=new gKe,s=void 0,a=void 0,c=void 0,d=!1;for(let u in t){if(!t.hasOwnProperty(u))continue;let h=t[u],p=A4(e,nt,u),b=ehe(e,h,p,s,a,c,d,n,o);r.attributes.push(b.attribute),i.attributePlans.push(b)}return r}function yJe(e){let i=e?.KHR_gaussian_splatting?.extensions?.KHR_gaussian_splatting_compression_spz_2;if(l(i))return i}function rhe(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=Ld(se,o.baseColorFactor);return l(r)?r:new se(1,1,1,1)}function xJe(e){switch(e){case K.UNSIGNED_BYTE:return 255;case K.UNSIGNED_SHORT:return 65535;case K.UNSIGNED_INT:return 4294967295;default:throw new le("EXT_mesh_primitive_edge_visibility line strings indices must use unsigned scalar component types.")}}function TJe(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 le("Edge visibility line string accessor not found!");let c=Wy(e,a),d=xJe(a.componentType),u=l(r.material)?r.material:n;i[o]={indices:c,restartIndex:d,componentType:a.componentType,materialColor:rhe(e,u)}}return i}function _Je(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 le("Edge visibility accessor not found!");n.visibility=Wy(e,o)}if(n.materialColor=rhe(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=TJe(e,t.lineStrings,t.material)),n}function SJe(e,t,n,i){let o=new yKe,r=new __(o);e._primitiveLoadPlans.push(r);let s=t.material;l(s)&&(o.material=fJe(e,e.gltfJson.materials[s],i));let a=t.extensions??B.EMPTY_OBJECT,c=a.CESIUM_mesh_vector;l(c)&&(o.vector=ZJe(e,c));let d=!1,u=a.CESIUM_primitive_outline;e._loadPrimitiveOutline&&l(u)&&(d=!0,r.needsOutlines=!0,r.outlineIndices=AJe(e,u,r)),o.edgeVisibility=_Je(e,a.EXT_mesh_primitive_edge_visibility);let h=yJe(a);l(h)&&(d=!0,r.needsGaussianSplats=!0);let p=e._loadForClassification,b=a.KHR_draco_mesh_compression,f=!1,y=t.attributes;if(l(y))for(let I in y){if(!y.hasOwnProperty(I))continue;let X=y[I],N=A4(e,nt,I),g=N.modelSemantic;if(p&&!nJe(g))continue;g===nt.FEATURE_ID&&(f=!0);let C=ehe(e,X,N,t,b,h,n,d,i);r.attributePlans.push(C),o.attributes.push(C.attribute)}let _=t.targets;if(l(_)&&!p)for(let I=0;I<_.length;++I)o.morphTargets.push(gJe(e,_[I],d,r,i));let S=t.indices;if(l(S)){let I=aJe(e,S,t,f,d,i);l(I)&&(r.indicesPlan=I,o.indices=I.indices)}let A=a.EXT_structural_metadata,Z=a.EXT_mesh_features,V=a.EXT_feature_metadata,E=l(V),L=a.NGA_gpm_local;l(Z)?CJe(e,o,Z,i):E&&VJe(e,o,V,i),l(A)?RJe(o,A):E&&EJe(e,o,V),l(L)&&GJe(o,L);let v=t.mode;if(p&&v!==ve.TRIANGLES)throw new le("Only triangle meshes can be used for classification.");return o.primitiveType=v,o}function AJe(e,t){let n=t.indices,i=e.gltfJson.accessors[n];return Wy(e,i,!1)}function ZJe(e,t){if(!l(t))return;let n=new NKe;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 CJe(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=pJe(e,s,i,a):l(s.attribute)?c=the(s,a):c=ihe(s,a),t.featureIds.push(c)}}function VJe(e,t,n,i){let{featureTables:o}=e.gltfJson.extensions.EXT_feature_metadata,r=0,s=n.featureIdAttributes;if(l(s))for(let c=0;c<s.length;++c){let d=s[c],u=d.featureTable,h=e._sortedPropertyTableIds.indexOf(u),p=o[u].count,b=`featureId_${r}`;r++;let f;l(d.featureIds.attribute)?f=nhe(d,h,p,b):f=ohe(d,h,p,b),t.featureIds.push(f)}let a=n.featureIdTextures;if(l(a))for(let c=0;c<a.length;++c){let d=a[c],u=d.featureTable,h=e._sortedPropertyTableIds.indexOf(u),p=o[u].count,b=`featureId_${r}`;r++;let f=bJe(e,d,h,i,p,b);t.featureIds.push(f)}}function RJe(e,t){if(!l(t))return;let{propertyTextures:n,propertyAttributes:i}=t;l(n)&&(e.propertyTextureIds=n),l(i)&&(e.propertyAttributeIds=i)}function EJe(e,t,n){l(n.featureTextures)&&(t.propertyTextureIds=n.featureTextures.map(function(i){return e._sortedFeatureTextureIds.indexOf(i)}))}function GJe(e,t){let n=t.ppeTextures??[];for(let i=0;i<n.length;i++)e.propertyTextureIds.push(i)}function LJe(e,t,n){let i=t.EXT_mesh_gpu_instancing,o=new xKe,r=i.attributes;if(l(r))for(let d in r){if(!r.hasOwnProperty(d))continue;let u=r[d];o.attributes.push(sJe(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)?WJe(o,a):l(c)&&vJe(e.gltfJson,o,c,e._sortedPropertyTableIds),o}function WJe(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=the(o,r):s=ihe(o,r),e.featureIds.push(s)}}function vJe(e,t,n,i){let o=e.extensions.EXT_feature_metadata.featureTables,r=n.featureIdAttributes;if(l(r))for(let s=0;s<r.length;++s){let a=r[s],c=a.featureTable,d=i.indexOf(c),u=o[c].count,h=`instanceFeatureId_${s}`,p;l(a.featureIds.attribute)?p=nhe(a,d,u,h):p=ohe(a,d,u,h),t.featureIds.push(p)}}function FJe(e,t,n){let i=new _Ke;i.name=t.name,i.matrix=Ld(F,t.matrix),i.translation=Ld(m,t.translation),i.rotation=Ld(Pe,t.rotation),i.scale=Ld(m,t.scale);let o=t.extensions??B.EMPTY_OBJECT,r=o.EXT_mesh_gpu_instancing,s=o.AGI_articulations,a=o.CESIUM_mesh_vector;if(l(r)){if(e._loadForClassification)throw new le("Models with the EXT_mesh_gpu_instancing extension cannot be used for classification.");i.instances=LJe(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=GF(d);for(let b=0;b<u.length;++b)i.primitives.push(SJe(e,u[b],l(i.instances),n));let h=t.weights??d.weights,p=i.primitives[0].morphTargets;i.morphWeights=l(h)?h.slice():new Array(p.length).fill(0)}return i}function IJe(e,t){let n=e.gltfJson.nodes;if(!l(n))return[];let i=n.map(function(o,r){let s=FJe(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 PJe(e,t,n){let i=new TKe,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 XJe(e,t){let n=e.gltfJson.skins;if(e._loadForClassification||!l(n))return[];let i=n.map(function(r,s){let a=PJe(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 NJe(e,t,n,i){let o=new yF({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 YJe(e,t,n,i){let o=new EF({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 wJe(e,t){let n=new AKe,i=e.gltfJson.accessors,o=i[t.input];n.input=Wy(e,o);let r=t.interpolation;n.interpolation=jh[r]??jh.LINEAR;let s=i[t.output];return n.output=Wy(e,s,!0),n}function MJe(e,t){let n=new ZKe,i=e.node;if(!l(i))return;n.node=t[i];let o=e.path.toUpperCase();return n.path=SKe[o],n}function kJe(e,t,n){let i=new CKe,o=e.sampler;return i.sampler=t[o],i.target=MJe(e.target,n),i}function UJe(e,t,n){let i=new VKe;i.name=t.name;let o=t.samplers.map(function(s,a){let c=wJe(e,s);return c.index=a,c}),r=t.channels.map(function(s){return kJe(s,o,n)});return i.samplers=o,i.channels=r,i}function DJe(e,t){let n=e.gltfJson.animations;return e._loadForClassification||!l(n)?[]:n.map(function(o,r){let s=UJe(e,o,t);return s.index=r,s})}function OJe(e){let t=new RKe;t.name=e.name;let n=e.type.toUpperCase();return t.type=$c[n],t.minimumValue=e.minimumValue,t.maximumValue=e.maximumValue,t.initialValue=e.initialValue,t}function BJe(e){let t=new EKe;return t.name=e.name,t.stages=e.stages.map(OJe),t}function zJe(e){let n=(e.extensions??B.EMPTY_OBJECT).AGI_articulations?.articulations;return l(n)?n.map(BJe):[]}function HJe(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 KJe(e,t){let n=new LKe,i=HJe(e);return n.nodes=i.map(function(o){return t[o]}),n}var JJe=new m;function jJe(e,t){let n=e.gltfJson,i=n.extensions??B.EMPTY_OBJECT,o=i.EXT_structural_metadata,r=i.EXT_feature_metadata,s=i.CESIUM_RTC;if(l(r)){let A=r.featureTables,Z=r.featureTextures,V=l(A)?A:[],E=l(Z)?Z:[];e._sortedPropertyTableIds=Object.keys(V).sort(),e._sortedFeatureTextureIds=Object.keys(E).sort()}let a=IJe(e,t),c=XJe(e,a),d=DJe(e,a),u=zJe(n),h=KJe(n,a),p=new WKe,b=new GKe,f=n.asset.copyright;if(l(f)){let A=f.split(";").map(function(Z){return new bt(Z.trim())});b.credits=A}if(p.asset=b,p.scene=h,p.nodes=a,p.skins=c,p.animations=d,p.articulations=u,p.upAxis=e._upAxis,p.forwardAxis=e._forwardAxis,l(s)){let A=m.fromArray(s.center,0,JJe);p.transform=F.fromTranslation(A,p.transform)}if(e._components=p,l(o)||l(r)){let A=NJe(e,o,r,t);e._loaderPromises.push(A)}let y=i.NGA_gpm_local;if(l(y)){let A=ZF.load(y);e._components.extensions.NGA_gpm_local=A}let _=n.meshes;if(l(_))for(let A of _){let Z=A.primitives;if(l(Z))for(let V of Z){let E=V.extensions;if(l(E)){let L=E.NGA_gpm_local;if(l(L)){let v=YJe(e,n,L,t);e._loaderPromises.push(v)}}}}let S=[];return qn(S,e._loaderPromises),e._incrementallyLoadTextures||qn(S,e._texturesPromises),Promise.all(S)}function QJe(e){let t=e._textureLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&vi.unload(t[n]);e._textureLoaders.length=0}function Hme(e){let t=e._bufferViewLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&vi.unload(t[n]);e._bufferViewLoaders.length=0}function qJe(e){let t=e._geometryLoaders;for(let n=0;n<t.length;++n)t[n]=!t[n].isDestroyed()&&vi.unload(t[n]);e._geometryLoaders.length=0}function $Je(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 eje(e){l(e._structuralMetadataLoader)&&!e._structuralMetadataLoader.isDestroyed()&&(e._structuralMetadataLoader.destroy(),e._structuralMetadataLoader=void 0)}function tje(e){l(e._meshPrimitiveGpmLoader)&&!e._meshPrimitiveGpmLoader.isDestroyed()&&(e._meshPrimitiveGpmLoader.destroy(),e._meshPrimitiveGpmLoader=void 0)}var mu=S4;var MFn=x(T(),1);var NFn=x(T(),1);var _Fn=x(T(),1),LF=`uniform sampler2D u_pointCloud_colorGBuffer;
uniform sampler2D u_pointCloud_depthGBuffer;
uniform vec2 u_distanceAndEdlStrength;
in vec2 v_textureCoordinates;
vec2 neighborContribution(float log2Depth, vec2 offset)
{
float dist = u_distanceAndEdlStrength.x;
vec2 texCoordOrig = v_textureCoordinates + offset * dist;
vec2 texCoord0 = v_textureCoordinates + offset * floor(dist);
vec2 texCoord1 = v_textureCoordinates + offset * ceil(dist);
float depthOrLogDepth0 = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, texCoord0));
float depthOrLogDepth1 = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, texCoord1));
// ignore depth values that are the clear depth
if (depthOrLogDepth0 == 0.0 || depthOrLogDepth1 == 0.0) {
return vec2(0.0);
}
// interpolate the two adjacent depth values
float depthMix = mix(depthOrLogDepth0, depthOrLogDepth1, fract(dist));
vec4 eyeCoordinate = czm_windowToEyeCoordinates(texCoordOrig, depthMix);
return vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);
}
void main()
{
float depthOrLogDepth = czm_unpackDepth(texture(u_pointCloud_depthGBuffer, v_textureCoordinates));
vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);
eyeCoordinate /= eyeCoordinate.w;
float log2Depth = log2(-eyeCoordinate.z);
if (depthOrLogDepth == 0.0) // 0.0 is the clear value for the gbuffer
{
discard;
}
vec4 color = texture(u_pointCloud_colorGBuffer, v_textureCoordinates);
// sample from neighbors left, right, down, up
vec2 texelSize = 1.0 / czm_viewport.zw;
vec2 responseAndCount = vec2(0.0);
responseAndCount += neighborContribution(log2Depth, vec2(-texelSize.x, 0.0));
responseAndCount += neighborContribution(log2Depth, vec2(+texelSize.x, 0.0));
responseAndCount += neighborContribution(log2Depth, vec2(0.0, -texelSize.y));
responseAndCount += neighborContribution(log2Depth, vec2(0.0, +texelSize.y));
float response = responseAndCount.x / responseAndCount.y;
float strength = u_distanceAndEdlStrength.y;
float shade = exp(-response * 300.0 * strength);
color.rgb *= shade;
out_FragColor = vec4(color);
// Input and output depth are the same.
gl_FragDepth = depthOrLogDepth;
}
`;function pC(){this._framebuffer=new yi({colorAttachmentsLength:2,depth:!0,supportsDepthTexture:!0}),this._drawCommand=void 0,this._clearCommand=void 0,this._strength=1,this._radius=1}Object.defineProperties(pC.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}},colorGBuffer:{get:function(){return this._framebuffer.getColorTexture(0)}},depthGBuffer:{get:function(){return this._framebuffer.getColorTexture(1)}}});function nje(e){e._framebuffer.destroy(),e._drawCommand=void 0,e._clearCommand=void 0}var Z4=new M;function ije(e,t){let n=new Be({defines:["LOG_DEPTH_WRITE"],sources:[LF]}),i={u_pointCloud_colorGBuffer:function(){return e.colorGBuffer},u_pointCloud_depthGBuffer:function(){return e.depthGBuffer},u_distanceAndEdlStrength:function(){return Z4.x=e._radius,Z4.y=e._strength,Z4}},o=De.fromCache({blending:tn.ALPHA_BLEND,depthMask:!0,depthTest:{enabled:!0},stencilTest:Ot.setCesium3DTileBit(),stencilMask:Ot.CESIUM_3D_TILE_MASK});e._drawCommand=t.createViewportQuadCommand(n,{uniformMap:i,renderState:o,pass:Le.CESIUM_3D_TILE,owner:e}),e._clearCommand=new si({framebuffer:e.framebuffer,color:new U(0,0,0,0),depth:1,renderState:De.fromCache(),pass:Le.CESIUM_3D_TILE,owner:e})}function oje(e,t){let n=t.drawingBufferWidth,i=t.drawingBufferHeight;e._framebuffer.update(t,n,i),ije(e,t)}function she(e){return e.drawBuffers&&e.fragmentDepth}pC.isSupported=she;function rje(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"EC");if(!l(n)){let i=t._attributeLocations,o=t.fragmentShaderSource.clone();o.sources.splice(0,0,`layout (location = 0) out vec4 out_FragData_0;
layout (location = 1) out vec4 out_FragData_1;`),o.sources=o.sources.map(function(r){return r=Be.replaceMain(r,"czm_point_cloud_post_process_main"),r=r.replaceAll(/out_FragColor/g,"out_FragData_0"),r}),o.sources.push(`void main()
{
czm_point_cloud_post_process_main();
#ifdef LOG_DEPTH
czm_writeLogDepth();
out_FragData_1 = czm_packDepth(gl_FragDepth);
#else
out_FragData_1 = czm_packDepth(gl_FragCoord.z);
#endif
}`),n=e.shaderCache.createDerivedShaderProgram(t,"EC",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:o,attributeLocations:i})}return n}pC.prototype.update=function(e,t,n,i){if(!she(e.context))return;this._strength=n.eyeDomeLightingStrength,this._radius=n.eyeDomeLightingRadius*e.pixelRatio,oje(this,e.context);let o,r=e.commandList,s=r.length;for(o=t;o<s;++o){let d=r[o];if(d.primitiveType!==ve.POINTS||d.pass===Le.TRANSLUCENT)continue;let u,h,p=d.derivedCommands.pointCloudProcessor;l(p)&&(u=p.command,h=p.originalShaderProgram),(!l(u)||d.dirty||h!==d.shaderProgram||u.framebuffer!==this.framebuffer)&&(u=et.shallowClone(d,u),u.framebuffer=this.framebuffer,u.shaderProgram=rje(e.context,d.shaderProgram),u.castShadows=!1,u.receiveShadows=!1,l(p)||(p={command:u,originalShaderProgram:d.shaderProgram},d.derivedCommands.pointCloudProcessor=p),p.originalShaderProgram=d.shaderProgram),r[o]=u}let a=this._clearCommand,c=this._drawCommand;c.boundingVolume=i,r.push(c),r.push(a)};pC.prototype.isDestroyed=function(){return!1};pC.prototype.destroy=function(){return nje(this),me(this)};var gb=pC;function ahe(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}ahe.isSupported=function(e){return gb.isSupported(e.context)};var Ap=ahe;var e2n=x(T(),1);var Rc={},sje=new se(0,0,0,1),el=new se,aje=new Qe,C4=new M,V4=new M;Rc.worldToWindowCoordinates=function(e,t,n){return Rc.worldWithEyeOffsetToWindowCoordinates(e,t,m.ZERO,n)};var che=new se,lhe=new m;function WF(e,t,n,i){let o=n.viewMatrix,r=F.multiplyByVector(o,se.fromElements(e.x,e.y,e.z,1,che),che),s=m.multiplyComponents(t,m.normalize(r,lhe),lhe);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 cje=new pe(Math.PI,W.PI_OVER_TWO),lje=new m,dje=new m;Rc.worldWithEyeOffsetToWindowCoordinates=function(e,t,n,i){let o=e.frameState,r=Rc.computeActualEllipsoidPosition(o,t,sje);if(!l(r))return;let s=e.canvas,a=aje;a.x=0,a.y=0,a.width=s.clientWidth,a.height=s.clientHeight;let c=e.camera,d=!1;if(o.mode===re.SCENE2D){let u=e.mapProjection,h=cje,p=u.project(h,lje),b=m.clone(c.position,dje),f=c.frustum.clone(),y=F.computeViewportTransformation(a,0,1,new F),_=c.frustum.projectionMatrix,S=c.positionWC.y,A=m.fromElements(W.sign(S)*p.x-S,0,-c.positionWC.x),Z=dt.pointToGLWindowCoordinates(_,y,A);if(S===0||Z.x<=0||Z.x>=s.clientWidth)d=!0;else{if(Z.x>s.clientWidth*.5){a.width=Z.x,c.frustum.right=p.x-S,el=WF(r,n,c,el),Rc.clipToGLWindowCoordinates(a,el,C4),a.x+=Z.x,c.position.x=-c.position.x;let V=c.frustum.right;c.frustum.right=-c.frustum.left,c.frustum.left=-V,el=WF(r,n,c,el),Rc.clipToGLWindowCoordinates(a,el,V4)}else{a.x+=Z.x,a.width-=Z.x,c.frustum.left=-p.x-S,el=WF(r,n,c,el),Rc.clipToGLWindowCoordinates(a,el,C4),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,el=WF(r,n,c,el),Rc.clipToGLWindowCoordinates(a,el,V4)}m.clone(b,c.position),c.frustum=f.clone(),i=M.clone(C4,i),(i.x<0||i.x>s.clientWidth)&&(i.x=V4.x)}}if(o.mode!==re.SCENE2D||d){if(el=WF(r,n,c,el),el.z<0&&!(c.frustum instanceof mn)&&!(c.frustum instanceof rs))return;i=Rc.clipToGLWindowCoordinates(a,el,i)}return i.y=s.clientHeight-i.y,i};Rc.worldToDrawingBufferCoordinates=function(e,t,n){if(n=Rc.worldToWindowCoordinates(e,t,n),!!l(n))return Rc.transformWindowToDrawingBuffer(e,n,n)};var yb=new m,uje=new pe;Rc.computeActualEllipsoidPosition=function(e,t,n){let i=e.mode;if(i===re.SCENE3D)return m.clone(t,n);let o=e.mapProjection,r=o.ellipsoid.cartesianToCartographic(t,uje);if(!l(r))return;if(o.project(r,yb),i===re.COLUMBUS_VIEW)return m.fromElements(yb.z,yb.x,yb.y,n);if(i===re.SCENE2D)return m.fromElements(0,yb.x,yb.y,n);let s=e.morphTime;return m.fromElements(W.lerp(yb.z,t.x,s),W.lerp(yb.x,t.y,s),W.lerp(yb.y,t.z,s),n)};var dhe=new m,uhe=new m,mhe=new F;Rc.clipToGLWindowCoordinates=function(e,t,n){return m.divideByScalar(t,t.w,dhe),F.computeViewportTransformation(e,0,1,mhe),F.multiplyByPoint(mhe,dhe,uhe),M.fromCartesian3(uhe,n)};Rc.transformWindowToDrawingBuffer=function(e,t,n){let i=e.canvas,o=e.drawingBufferWidth/i.clientWidth,r=e.drawingBufferHeight/i.clientHeight;return M.fromElements(t.x*o,t.y*r,n)};var mje=new se,hhe=new se;Rc.drawingBufferToWorldCoordinates=function(e,t,n,i){let r=e.context.uniformState,s=r.currentFrustum,a=s.x,c=s.y;if(e.frameState.useLogDepth){let b=n*r.log2FarDepthFromNearPlusOne,f=Math.pow(2,b)-1;n=c*(1-a/(f+a))/(c-a)}let d=e.view.passState.viewport,u=se.clone(se.UNIT_W,mje);u.x=(t.x-d.x)/d.width*2-1,u.y=(t.y-d.y)/d.height*2-1,u.z=n*2-1,u.w=1;let h,p=e.camera.frustum;if(l(p.fovy)){h=F.multiplyByVector(r.inverseViewProjection,u,hhe);let b=1/h.w;m.multiplyByScalar(h,b,h)}else{let b=p.offCenterFrustum;l(b)&&(p=b),h=hhe,h.x=(u.x*(p.right-p.left)+p.left+p.right)*.5,h.y=(u.y*(p.top-p.bottom)+p.bottom+p.top)*.5,h.z=(u.z*(a-c)-a-c)*.5,h.w=1,h=F.multiplyByVector(r.inverseView,h,h)}return m.fromCartesian4(h,i)};var no=Rc;var z2n=x(T(),1);var r2n=x(T(),1);var bC={};bC._deprecationWarning=La;var xb=Uint32Array.BYTES_PER_ELEMENT;bC.parse=function(e,t){let n=t??0;t=n;let i=new Uint8Array(e),o=new DataView(e);t+=xb;let r=o.getUint32(t,!0);if(r!==1)throw new le(`Only Batched 3D Model version 1 is supported. Version ${r} is not.`);t+=xb;let s=o.getUint32(t,!0);t+=xb;let a=o.getUint32(t,!0);t+=xb;let c=o.getUint32(t,!0);t+=xb;let d=o.getUint32(t,!0);t+=xb;let u=o.getUint32(t,!0);t+=xb;let h;d>=570425344?(t-=xb*2,h=a,d=c,u=0,a=0,c=0,bC._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchLength] [batchTableByteLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel.")):u>=570425344&&(t-=xb,h=d,d=a,u=c,a=0,c=0,bC._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel."));let p;a===0?p={BATCH_LENGTH:h??0}:(p=xr(i,t,a),t+=a);let b=new Uint8Array(e,t,c);t+=c;let f,y;d>0&&(f=xr(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 le("glTF byte length must be greater than 0.");let S;return t%4===0?S=new Uint8Array(e,t,_):(bC._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),S=new Uint8Array(i.subarray(t,t+_))),{batchLength:h,featureTableJson:p,featureTableBinary:b,batchTableJson:f,batchTableBinary:y,gltf:S}};var vF=bC;var l2n=x(T(),1);function FF(e,t){this.json=e,this.buffer=t,this._cachedTypedArrays={},this.featuresLength=0}function fhe(e,t,n,i,o,r){let s=e._cachedTypedArrays,a=s[t];return l(a)||(a=K.createArrayBufferView(n,e.buffer.buffer,e.buffer.byteOffset+r,o*i),s[t]=a),a}function hje(e,t,n,i){let o=e._cachedTypedArrays,r=o[t];return l(r)||(r=K.createTypedArray(n,i),o[t]=r),r}FF.prototype.getGlobalProperty=function(e,t,n){let i=this.json[e];if(l(i))return l(i.byteOffset)?(t=t??K.UNSIGNED_INT,n=n??1,fhe(this,e,t,n,1,i.byteOffset)):i};FF.prototype.hasProperty=function(e){return l(this.json[e])};FF.prototype.getPropertyArray=function(e,t,n){let i=this.json[e];if(l(i))return l(i.byteOffset)?(l(i.componentType)&&(t=K.fromName(i.componentType)),fhe(this,e,t,n,this.featuresLength,i.byteOffset)):hje(this,e,t,i)};FF.prototype.getProperty=function(e,t,n,i,o){let r=this.json[e];if(!l(r))return;let s=this.getPropertyArray(e,t,n);if(n===1)return s[i];for(let a=0;a<n;++a)o[a]=s[n*i+a];return o};var Qh=FF;var R2n=x(T(),1);function IF(e){let t=e.count,n=e.batchTable,i=e.binaryBody,o=e.parseAsPropertyAttributes??!1,r=e.customAttributeOutput,s=fje(n),a;l(s.jsonProperties)&&(a=new pb({count:t,properties:s.jsonProperties}));let c;l(s.hierarchy)&&(c=new e_({extension:s.hierarchy,binaryBody:i}));let d=Hh.BATCH_TABLE_CLASS_NAME,u=s.binaryProperties,h,p,b;if(o){let _=bje(t,d,u,i,r);b=_.transcodedSchema,p=[new y_({propertyAttribute:_.propertyAttributeJson,class:_.transcodedClass})]}else{let _=pje(t,d,u,i);b=_.transcodedSchema;let S=_.featureTableJson;h=new Sm({count:S.count,properties:S.properties,class:_.transcodedClass,bufferViews:_.bufferViewsTypedArrays}),p=[]}let f=[];if(l(h)||l(a)||l(c)){let _=new Dl({id:0,name:"Batch Table",count:t,metadataTable:h,jsonMetadataTable:a,batchTableHierarchy:c});f.push(_)}let y={schema:b,propertyTables:f,propertyAttributes:p,extensions:s.extensions,extras:s.extras};return new va(y)}function fje(e){let t=e.HIERARCHY,n=e.extras,i=e.extensions,o;l(t)?(IF._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 pje(e,t,n,i){let o={},r={},s={},a=0;for(let h in n){if(!n.hasOwnProperty(h))continue;if(!l(i))throw new le(`Property ${h} requires a batch table binary.`);let p=n[h],b=Tm(p);r[h]={bufferView:a},o[h]=phe(p),s[a]=b.createArrayBufferView(i.buffer,i.byteOffset+p.byteOffset,e),a++}let c={classes:{}};c.classes[t]={properties:o};let d=Ml.fromJson(c);return{featureTableJson:{class:t,count:e,properties:r},bufferViewsTypedArrays:s,transcodedSchema:d,transcodedClass:d.classes[t]}}function bje(e,t,n,i,o){let r={},s={},a=0;for(let h in n){if(!n.hasOwnProperty(h))continue;let p=n[h];if(!l(i)&&!l(p.typedArray))throw new le(`Property ${h} requires a batch table binary.`);let b=mt.sanitizeGlslIdentifier(h);(b===""||r.hasOwnProperty(b))&&(b=`property_${a}`,a++);let f=phe(p);f.name=h,r[b]=f;let y=b.toUpperCase();y.startsWith("_")||(y=`_${y}`);let _=p.typedArray;l(_)||(_=Tm(p).createArrayBufferView(i.buffer,i.byteOffset+p.byteOffset,e));let S=new yn.Attribute;S.name=y,S.count=e,S.type=p.type;let A=K.fromTypedArray(_);(A===K.INT||A===K.UNSIGNED_INT||A===K.DOUBLE)&&(IF._oneTimeWarning("Cast pnts property to floats",`Point cloud property "${y}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`),_=new Float32Array(_)),S.componentDatatype=K.fromTypedArray(_),S.typedArray=_,o.push(S),s[b]={attribute:y}}let c={classes:{}};c.classes[t]={properties:r};let d=Ml.fromJson(c);return{class:t,propertyAttributeJson:{properties:s},transcodedSchema:d,transcodedClass:d.classes[t]}}function phe(e){let t=gje(e.componentType);return{type:e.type,componentType:t}}function gje(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"}}IF._deprecationWarning=La;IF._oneTimeWarning=Tt;var Tb=IF;var S_={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,FAILED:4},yje=yn.FeatureIdAttribute,R4=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??to.Y,u=t.forwardAxis??to.X,h=t.loadAttributesAsTypedArray??!1,p=t.loadAttributesFor2D??!1,b=t.enablePick??!1,f=t.loadIndicesForWireframe??!1,y=t.loadPrimitiveOutline??!0,_=t.loadForClassification??!1;i=l(i)?i:n.clone(),this._b3dmResource=n,this._baseResource=i,this._arrayBuffer=o,this._byteOffset=r,this._releaseGltfJson=s,this._asynchronous=a,this._incrementallyLoadTextures=c,this._upAxis=d,this._forwardAxis=u,this._loadAttributesAsTypedArray=h,this._loadAttributesFor2D=p,this._enablePick=b,this._loadIndicesForWireframe=f,this._loadPrimitiveOutline=y,this._loadForClassification=_,this._state=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=vF.parse(this._arrayBuffer,this._byteOffset),n=t.batchLength,i=t.featureTableJson,o=t.featureTableBinary,r=t.batchTableJson,s=t.batchTableBinary,a=new Qh(i,o);n=a.getGlobalProperty("BATCH_LENGTH"),this._batchLength=n;let c=a.getGlobalProperty("RTC_CENTER",K.FLOAT,3);l(c)&&(this._transform=F.fromTranslation(m.fromArray(c))),this._batchTable={json:r,binary:s};let d=new mu({typedArray:t.gltf,upAxis:this._upAxis,forwardAxis:this._forwardAxis,gltfResource:this._b3dmResource,baseResource:this._baseResource,releaseGltfJson:this._releaseGltfJson,incrementallyLoadTextures:this._incrementallyLoadTextures,loadAttributesAsTypedArray:this._loadAttributesAsTypedArray,loadAttributesFor2D:this._loadAttributesFor2D,enablePick:this._enablePick,loadIndicesForWireframe:this._loadIndicesForWireframe,loadPrimitiveOutline:this._loadPrimitiveOutline,loadForClassification:this._loadForClassification,renameBatchIdSemantic:!0});this._gltfLoader=d,this._state=S_.LOADING;let u=this;return this._promise=d.load().then(function(){if(!u.isDestroyed())return u._state=S_.PROCESSING,u}).catch(function(h){if(!u.isDestroyed())return xje(u,h)}),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),Tje(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 xje(e,t){return e.unload(),e._state=S_.FAILED,t=e.getError("Failed to load b3dm",t),Promise.reject(t)}function Tje(e,t){let n=e._batchTable,i=e._batchLength;if(i===0)return;let o;if(l(n.json))o=Tb({count:i,batchTable:n.json,binaryBody:n.binary});else{let a=new Dl({name:Hh.BATCH_TABLE_CLASS_NAME,count:i});o=new va({schema:{},propertyTables:[a]})}let r=t.scene.nodes,s=r.length;for(let a=0;a<s;a++)bhe(r[a]);t.structuralMetadata=o}function bhe(e){let t=e.children.length;for(let i=0;i<t;i++)bhe(e.children[i]);let n=e.primitives.length;for(let i=0;i<n;i++){let o=e.primitives[i],r=mt.getAttributeBySemantic(o,nt.FEATURE_ID);if(l(r)){r.setIndex=0;let s=new yje;s.propertyTableId=0,s.setIndex=0,s.positionalLabel="featureId_0",o.featureIds.push(s)}}}var PF=R4;var pIn=x(T(),1);var E4=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=Fje(this._geoJson,t),this._geoJson=void 0),!0}unload(){this._components=void 0}};function _je(){this.lines=void 0,this.points=void 0,this.properties=void 0}function Sje(){this.features=[]}function G4(e){let t=e[0],n=e[1],i=e[2]??0;return new m(t,n,i)}function L4(e){let t=e.length,n=new Array(t);for(let o=0;o<t;o++)n[o]=G4(e[o]);return[n]}function Aje(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=L4(e[i])[0];return n}function ghe(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=L4(e[i])[0];return n}function Zje(e){let t=e.length,n=[];for(let i=0;i<t;i++){let o=ghe(e[i]);qn(n,o)}return n}function Cje(e){return[G4(e)]}function Vje(e){let t=e.length,n=new Array(t);for(let i=0;i<t;i++)n[i]=G4(e[i]);return n}var Rje={LineString:L4,MultiLineString:Aje,MultiPolygon:Zje,Polygon:ghe,MultiPoint:Vje,Point:Cje},Eje={LineString:ve.LINES,MultiLineString:ve.LINES,MultiPolygon:ve.LINES,Polygon:ve.LINES,MultiPoint:ve.POINTS,Point:ve.POINTS};function yhe(e,t){if(!l(e.geometry))return;let n=e.geometry.type,i=Rje[n],o=Eje[n],r=e.geometry.coordinates;if(!l(i)||!l(r))return;let s=new _je;o===ve.LINES?s.lines=i(r):o===ve.POINTS&&(s.points=i(r)),s.properties=e.properties,t.features.push(s)}function Gje(e,t){let n=e.features,i=n.length;for(let o=0;o<i;o++)yhe(n[o],t)}var Lje={FeatureCollection:Gje,Feature:yhe},tD=new m;function Wje(e,t,n){let i=0,o=0,r=e.length;for(let X=0;X<r;X++){let N=e[X];if(l(N.lines)){let g=N.lines.length;for(let C=0;C<g;C++){let R=N.lines[C];i+=R.length,o+=(R.length-1)*2}}}let s=new Float32Array(i*3),a=new Float32Array(i),c=Me.createTypedArray(i,o),d=Me.fromTypedArray(c),u=new m(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),h=new m(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),p=0,b=0;for(let X=0;X<r;X++){let N=e[X];if(!l(N.lines))continue;let g=N.lines.length;for(let C=0;C<g;C++){let R=N.lines[C],G=R.length;for(let P=0;P<G;P++){let Y=R[P],O=m.fromDegrees(Y.x,Y.y,Y.z,ie.WGS84,tD),k=F.multiplyByPoint(t,O,tD);m.minimumByComponent(u,k,u),m.maximumByComponent(h,k,h),m.pack(k,s,p*3),a[p]=X,P<G-1&&(c[b*2]=p,c[b*2+1]=p+1,b++),p++}}}let f=qe.createVertexBuffer({typedArray:s,context:n.context,usage:Fe.STATIC_DRAW});f.vertexArrayDestroyable=!1;let y=qe.createVertexBuffer({typedArray:a,context:n.context,usage:Fe.STATIC_DRAW});y.vertexArrayDestroyable=!1;let _=qe.createIndexBuffer({typedArray:c,context:n.context,usage:Fe.STATIC_DRAW,indexDatatype:d});_.vertexArrayDestroyable=!1;let S=new yn.Attribute;S.semantic=nt.POSITION,S.componentDatatype=K.FLOAT,S.type=Nt.VEC3,S.count=i,S.min=u,S.max=h,S.buffer=f;let A=new yn.Attribute;A.semantic=nt.FEATURE_ID,A.setIndex=0,A.componentDatatype=K.FLOAT,A.type=Nt.SCALAR,A.count=i,A.buffer=y;let Z=[S,A],V=new yn.Material;V.unlit=!0;let E=new yn.Indices;E.indexDatatype=d,E.count=c.length,E.buffer=_;let L=new yn.FeatureIdAttribute;L.featureCount=r,L.propertyTableId=0,L.setIndex=0,L.positionalLabel="featureId_0";let v=[L],I=new yn.Primitive;return I.attributes=Z,I.indices=E,I.featureIds=v,I.primitiveType=ve.LINES,I.material=V,I}function vje(e,t,n){let i=0,o=e.length;for(let Z=0;Z<o;Z++){let V=e[Z];l(V.points)&&(i+=V.points.length)}let r=new Float32Array(i*3),s=new Float32Array(i),a=new m(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),c=new m(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),d=0;for(let Z=0;Z<o;Z++){let V=e[Z];if(!l(V.points))continue;let E=V.points.length;for(let L=0;L<E;L++){let v=V.points[L],I=m.fromDegrees(v.x,v.y,v.z,ie.WGS84,tD),X=F.multiplyByPoint(t,I,tD);m.minimumByComponent(a,X,a),m.maximumByComponent(c,X,c),m.pack(X,r,d*3),s[d]=Z,d++}}let u=qe.createVertexBuffer({typedArray:r,context:n.context,usage:Fe.STATIC_DRAW});u.vertexArrayDestroyable=!1;let h=qe.createVertexBuffer({typedArray:s,context:n.context,usage:Fe.STATIC_DRAW});h.vertexArrayDestroyable=!1;let p=new yn.Attribute;p.semantic=nt.POSITION,p.componentDatatype=K.FLOAT,p.type=Nt.VEC3,p.count=i,p.min=a,p.max=c,p.buffer=u;let b=new yn.Attribute;b.semantic=nt.FEATURE_ID,b.setIndex=0,b.componentDatatype=K.FLOAT,b.type=Nt.SCALAR,b.count=i,b.buffer=h;let f=[p,b],y=new yn.Material;y.unlit=!0;let _=new yn.FeatureIdAttribute;_.featureCount=o,_.propertyTableId=0,_.setIndex=0,_.positionalLabel="featureId_0";let S=[_],A=new yn.Primitive;return A.attributes=f,A.featureIds=S,A.primitiveType=ve.POINTS,A.material=y,A}function Fje(e,t){let n=new Sje,i=Lje[e.type];l(i)&&i(e,n);let o=n.features,r=o.length;if(r===0)throw new le("GeoJSON must have at least one feature");let s={};for(let X=0;X<r;X++){let g=o[X].properties??B.EMPTY_OBJECT;for(let C in g)g.hasOwnProperty(C)&&(l(s[C])||(s[C]=new Array(r)))}for(let X=0;X<r;X++){let N=o[X];for(let g in s)if(s.hasOwnProperty(g)){let C=N.properties[g]??"";s[g][X]=C}}let a=new pb({count:r,properties:s}),d=[new Dl({id:0,count:r,jsonMetadataTable:a})],u=Ml.fromJson({}),h=new va({schema:u,propertyTables:d}),p=new m(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),b=new m(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY),f=!1,y=!1;for(let X=0;X<r;X++){let N=o[X];if(l(N.lines)){f=!0;let g=N.lines.length;for(let C=0;C<g;C++){let R=N.lines[C],G=R.length;for(let P=0;P<G;P++)m.minimumByComponent(p,R[P],p),m.maximumByComponent(b,R[P],b)}}if(l(N.points)){y=!0;let g=N.points.length;for(let C=0;C<g;C++){let R=N.points[C];m.minimumByComponent(p,R,p),m.maximumByComponent(b,R,b)}}}let _=m.midpoint(p,b,new m),S=m.fromDegrees(_.x,_.y,_.z,ie.WGS84,new m),A=dt.eastNorthUpToFixedFrame(S,ie.WGS84,new F),Z=F.inverseTransformation(A,new F),V=[];f&&V.push(Wje(o,Z,t)),y&&V.push(vje(o,Z,t));let E=new yn.Node;E.index=0,E.primitives=V;let L=[E],v=new yn.Scene;v.nodes=L;let I=new yn.Components;return I.scene=v,I.nodes=L,I.transform=A,I.structuralMetadata=h,I}var XF=E4;var jIn=x(T(),1);var TIn=x(T(),1);var nD={};nD._deprecationWarning=La;var vy=Uint32Array.BYTES_PER_ELEMENT;nD.parse=function(e,t){let n=t??0;t=n;let i=new Uint8Array(e),o=new DataView(e);t+=vy;let r=o.getUint32(t,!0);if(r!==1)throw new le(`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 le("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 h=o.getUint32(t,!0);if(h!==1&&h!==0)throw new le(`Only glTF format 0 (uri) or 1 (embedded) are supported. Format ${h} is not.`);t+=vy;let p=xr(i,t,a);t+=a;let b=new Uint8Array(e,t,c);t+=c;let f,y;d>0&&(f=xr(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 le("glTF byte length must be greater than 0.");let S;return t%4===0?S=new Uint8Array(e,t,_):(nD._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),S=new Uint8Array(i.subarray(t,t+_))),{gltfFormat:h,featureTableJson:p,featureTableBinary:b,batchTableJson:f,batchTableBinary:y,gltf:S}};var NF=nD;var _b={NOT_LOADED:0,LOADING:1,PROCESSING:2,POST_PROCESSING:3,READY:4,FAILED:5,UNLOADED:6},iD=yn.Attribute,Ije=yn.FeatureIdAttribute,The=yn.Instances,W4=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??to.Y,u=t.forwardAxis??to.X,h=t.loadAttributesAsTypedArray??!1,p=t.loadIndicesForWireframe??!1,b=t.loadPrimitiveOutline??!0,f=t.enablePick??!1;o=l(o)?o:n.clone(),this._i3dmResource=n,this._baseResource=o,this._arrayBuffer=i,this._byteOffset=r,this._releaseGltfJson=s,this._asynchronous=a,this._incrementallyLoadTextures=c,this._upAxis=d,this._forwardAxis=u,this._loadAttributesAsTypedArray=h,this._loadIndicesForWireframe=p,this._loadPrimitiveOutline=b,this._enablePick=f,this._state=_b.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=NF.parse(this._arrayBuffer,this._byteOffset),n=t.featureTableJson,i=t.featureTableBinary,o=t.batchTableJson,r=t.batchTableBinary,s=t.gltfFormat,a=new Qh(n,i);this._featureTable=a;let c=a.getGlobalProperty("INSTANCES_LENGTH");if(a.featuresLength=c,!l(c))throw new le("Feature table global property: INSTANCES_LENGTH must be defined");this._instancesLength=c;let d=a.getGlobalProperty("RTC_CENTER",K.FLOAT,3);l(d)&&(this._transform=F.fromTranslation(m.fromArray(d))),this._batchTable={json:o,binary:r};let u={upAxis:this._upAxis,forwardAxis:this._forwardAxis,releaseGltfJson:this._releaseGltfJson,incrementallyLoadTextures:this._incrementallyLoadTextures,loadAttributesAsTypedArray:this._loadAttributesAsTypedArray,enablePick:this._enablePick,loadIndicesForWireframe:this._loadIndicesForWireframe,loadPrimitiveOutline:this._loadPrimitiveOutline};if(s===0){let p=Zd(t.gltf);p=p.replace(/[\s\0]+$/,"");let b=this._baseResource.getDerivedResource({url:p});u.gltfResource=b,u.baseResource=b}else u.gltfResource=this._i3dmResource,u.typedArray=t.gltf;let h=new mu(u);return this._gltfLoader=h,this._state=_b.LOADING,this._promise=h.load().then(()=>{if(!this.isDestroyed())return this._state=_b.PROCESSING,this}).catch(p=>{if(!this.isDestroyed())throw Pje(this,p)}),this._promise}process(t){if(this._state===_b.READY)return!0;let n=this._gltfLoader,i=!1;if(this._state===_b.PROCESSING&&(i=n.process(t)),!i)return!1;let o=n.components;return o.transform=F.multiplyTransformation(this._transform,o.transform,o.transform),Yje(this,o,t),Xje(this,o),this._components=o,this._arrayBuffer=void 0,this._state=_b.READY,!0}isUnloaded(){return this._state===_b.UNLOADED}unload(){l(this._gltfLoader)&&!this._gltfLoader.isDestroyed()&&this._gltfLoader.unload(),Dje(this),this._components=void 0,this._arrayBuffer=void 0,this._state=_b.UNLOADED}};function Pje(e,t){return e.unload(),e._state=_b.FAILED,e.getError("Failed to load i3dm",t)}function Xje(e,t){let n=e._batchTable,i=e._instancesLength;if(i===0)return;let o;if(l(n.json))o=Tb({count:i,batchTable:n.json,binaryBody:n.binary});else{let r=new Dl({name:Hh.BATCH_TABLE_CLASS_NAME,count:i});o=new va({schema:{},propertyTables:[r]})}t.structuralMetadata=o}var oD=new m,v4=new Array(4),Nje=new F;function Yje(e,t,n){let i,o=e._featureTable,r=e._instancesLength;if(r===0)return;let s=o.getGlobalProperty("RTC_CENTER",K.FLOAT,3),a=o.getGlobalProperty("EAST_NORTH_UP"),c=o.hasProperty("NORMAL_UP")||o.hasProperty("NORMAL_UP_OCT32P")||a,d=o.hasProperty("SCALE")||o.hasProperty("SCALE_NON_UNIFORM"),u=Mje(o,r),h;c&&(h=new Float32Array(4*r));let p;d&&(p=new Float32Array(3*r));let b=new Float32Array(r),f=m.unpackArray(u),y=new m,_=new m,S=new m,A=new m,Z=new q,V=new Pe,E=new Array(4),L=new m,v=new Array(3),I=new F;if(!l(s)||m.equals(m.unpack(s),m.ZERO)){let k=de.fromPoints(f);for(i=0;i<f.length;i++)m.subtract(f[i],k.center,oD),u[3*i+0]=oD.x,u[3*i+1]=oD.y,u[3*i+2]=oD.z;let D=F.fromTranslation(k.center,Nje);t.transform=F.multiplyTransformation(D,t.transform,t.transform)}for(i=0;i<r;i++){y=m.clone(f[i]),l(s)&&m.add(y,m.unpack(s),y),c&&(kje(o,a,i,V,y,S,_,A,Z,I),Pe.pack(V,E,0),h[4*i+0]=E[0],h[4*i+1]=E[1],h[4*i+2]=E[2],h[4*i+3]=E[3]),d&&(Uje(o,i,L),m.pack(L,v,0),p[3*i+0]=v[0],p[3*i+1]=v[1],p[3*i+2]=v[2]);let k=o.getProperty("BATCH_ID",K.UNSIGNED_SHORT,1,i);l(k)||(k=i),b[i]=k}let X=new The;X.transformInWorldSpace=!0;let N=e._buffers,g=new iD;if(g.name="Instance Translation",g.semantic=_r.TRANSLATION,g.componentDatatype=K.FLOAT,g.type=Nt.VEC3,g.count=r,g.typedArray=u,!c){let k=qe.createVertexBuffer({context:n.context,typedArray:u,usage:Fe.STATIC_DRAW});k.vertexArrayDestroyable=!1,N.push(k),g.buffer=k}if(X.attributes.push(g),c){let k=new iD;k.name="Instance Rotation",k.semantic=_r.ROTATION,k.componentDatatype=K.FLOAT,k.type=Nt.VEC4,k.count=r,k.typedArray=h,X.attributes.push(k)}if(d){let k=new iD;if(k.name="Instance Scale",k.semantic=_r.SCALE,k.componentDatatype=K.FLOAT,k.type=Nt.VEC3,k.count=r,c)k.typedArray=p;else{let D=qe.createVertexBuffer({context:n.context,typedArray:p,usage:Fe.STATIC_DRAW});D.vertexArrayDestroyable=!1,N.push(D),k.buffer=D}X.attributes.push(k)}let C=new iD;C.name="Instance Feature ID",C.setIndex=0,C.semantic=_r.FEATURE_ID,C.componentDatatype=K.FLOAT,C.type=Nt.SCALAR,C.count=r;let R=qe.createVertexBuffer({context:n.context,typedArray:b,usage:Fe.STATIC_DRAW});R.vertexArrayDestroyable=!1,N.push(R),C.buffer=R,X.attributes.push(C);let G=new Ije;G.propertyTableId=0,G.setIndex=0,G.positionalLabel="instanceFeatureId_0",X.featureIds.push(G);let P=t.nodes,Y=P.length,O=!1;for(i=0;i<Y;i++){let k=P[i];k.primitives.length>0&&(k.instances=O?wje(X):X,O=!0)}}function wje(e){let t=new The;t.transformInWorldSpace=e.transformInWorldSpace;let n=e.attributes,i=n.length;for(let o=0;o<i;o++){let r=ze(n[o],!1);t.attributes.push(r)}return t.featureIds=e.featureIds,t}function Mje(e,t){if(e.hasProperty("POSITION"))return e.getPropertyArray("POSITION",K.FLOAT,3);if(e.hasProperty("POSITION_QUANTIZED")){let n=e.getPropertyArray("POSITION_QUANTIZED",K.UNSIGNED_SHORT,3),i=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",K.FLOAT,3);if(!l(i))throw new le("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");let o=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",K.FLOAT,3);if(!l(o))throw new le("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 le("Either POSITION or POSITION_QUANTIZED must be defined for each instance.")}var xhe=new Array(4);function kje(e,t,n,i,o,r,s,a,c,d){let u=e.getProperty("NORMAL_UP",K.FLOAT,3,n,v4),h=e.getProperty("NORMAL_RIGHT",K.FLOAT,3,n,xhe),p=!1;if(l(u)){if(!l(h))throw new le("To define a custom orientation, both NORMAL_UP and NORMAL_RIGHT must be defined.");m.unpack(u,0,r),m.unpack(h,0,s),p=!0}else{let b=e.getProperty("NORMAL_UP_OCT32P",K.UNSIGNED_SHORT,2,n,v4),f=e.getProperty("NORMAL_RIGHT_OCT32P",K.UNSIGNED_SHORT,2,n,xhe);if(l(b)){if(!l(f))throw new le("To define a custom orientation with oct-encoded vectors, both NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P must be defined.");cn.octDecodeInRange(b[0],b[1],65535,r),cn.octDecodeInRange(f[0],f[1],65535,s),p=!0}else t?(dt.eastNorthUpToFixedFrame(o,ie.WGS84,d),F.getMatrix3(d,c)):q.clone(q.IDENTITY,c)}p&&(m.cross(s,r,a),m.normalize(a,a),q.setColumn(c,0,s,c),q.setColumn(c,1,r,c),q.setColumn(c,2,a,c)),Pe.fromRotationMatrix(c,i)}function Uje(e,t,n){n=m.fromElements(1,1,1,n);let i=e.getProperty("SCALE",K.FLOAT,1,t);l(i)&&m.multiplyByScalar(n,i,n);let o=e.getProperty("SCALE_NON_UNIFORM",K.FLOAT,3,t,v4);l(o)&&(n.x*=o[0],n.y*=o[1],n.z*=o[2])}function Dje(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 YF=W4;var fXn=x(T(),1);var oXn=x(T(),1);var qIn=x(T(),1),_he={STOPPED:0,ANIMATING:1};Object.freeze(_he);var qh=_he;var jPn=x(T(),1);var aPn=x(T(),1);var oPn=x(T(),1);function gC(){this.times=void 0,this.points=void 0,he.throwInstantiationError()}gC.getPointType=function(e){if(typeof e=="number")return Number;if(e instanceof m)return m;if(e instanceof Pe)return Pe};gC.prototype.evaluate=he.throwInstantiationError;gC.prototype.findTimeInterval=function(e,t){let n=this.times,i=n.length;if(t=t??0,e>=n[t]){if(t+1<i&&e<n[t+1])return t;if(t+2<i&&e<n[t+2])return t+1}else if(t-1>=0&&e>=n[t-1])return t-1;let o;if(e>n[t])for(o=t;o<i-1&&!(e>=n[o]&&e<n[o+1]);++o);else for(o=t-1;o>=0&&!(e>=n[o]&&e<n[o+1]);--o);return o===i-1&&(o=i-2),o};gC.prototype.wrapTime=function(e){let t=this.times,n=t[t.length-1],i=t[0],o=n-i,r;return e<i&&(r=Math.floor((i-e)/o)+1,e+=r*o),e>n&&(r=Math.floor((e-n)/o)+1,e-=r*o),e};gC.prototype.clampTime=function(e){let t=this.times;return W.clamp(e,t[0],t[t.length-1])};var xo=gC;function yC(e){this._value=e,this._valueType=xo.getPointType(e)}Object.defineProperties(yC.prototype,{value:{get:function(){return this._value}}});yC.prototype.findTimeInterval=function(e){};yC.prototype.wrapTime=function(e){return 0};yC.prototype.clampTime=function(e){return 0};yC.prototype.evaluate=function(e,t){let n=this._value,i=this._valueType;return i===Number?n:i.clone(n,t)};var wF=yC;var VPn=x(T(),1);var hPn=x(T(),1);function xC(e){e=e??B.EMPTY_OBJECT;let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=xo.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(xC.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});xC.prototype.findTimeInterval=xo.prototype.findTimeInterval;xC.prototype.wrapTime=xo.prototype.wrapTime;xC.prototype.clampTime=xo.prototype.clampTime;xC.prototype.evaluate=function(e,t){let n=this.points,i=this.times,o=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),r=(e-i[o])/(i[o+1]-i[o]);return this._pointType===Number?(1-r)*n[o]+r*n[o+1]:(l(t)||(t=new m),m.lerp(n[o],n[o+1],r,t))};var Fy=xC;var bPn=x(T(),1);var She={};She.solve=function(e,t,n,i){let o=new Array(n.length),r=new Array(i.length),s=new Array(i.length),a;for(a=0;a<r.length;a++)r[a]=new m,s[a]=new m;o[0]=n[0]/t[0],r[0]=m.multiplyByScalar(i[0],1/t[0],r[0]);let c;for(a=1;a<o.length;++a)c=1/(t[a]-o[a-1]*e[a-1]),o[a]=n[a]*c,r[a]=m.subtract(i[a],m.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=m.multiplyByScalar(r[a],c,r[a]);for(c=1/(t[a]-o[a-1]*e[a-1]),r[a]=m.subtract(i[a],m.multiplyByScalar(r[a-1],e[a-1],r[a]),r[a]),r[a]=m.multiplyByScalar(r[a],c,r[a]),s[s.length-1]=r[r.length-1],a=s.length-2;a>=0;--a)s[a]=m.subtract(r[a],m.multiplyByScalar(s[a+1],o[a],s[a]),s[a]);return s};var TC=She;var Ahe=[],Zhe=[],Che=[],Vhe=[];function Oje(e,t,n){let i=Ahe,o=Che,r=Zhe,s=Vhe;i.length=o.length=e.length-1,r.length=s.length=e.length;let a;i[0]=r[0]=1,o[0]=0;let c=s[0];for(l(c)||(c=s[0]=new m),m.clone(t,c),a=1;a<i.length-1;++a)i[a]=o[a]=1,r[a]=4,c=s[a],l(c)||(c=s[a]=new m),m.subtract(e[a+1],e[a-1],c),m.multiplyByScalar(c,3,c);return i[a]=0,o[a]=1,r[a]=4,c=s[a],l(c)||(c=s[a]=new m),m.subtract(e[a+1],e[a-1],c),m.multiplyByScalar(c,3,c),r[a+1]=1,c=s[a+1],l(c)||(c=s[a+1]=new m),m.clone(n,c),TC.solve(i,r,o,s)}function Bje(e){let t=Ahe,n=Che,i=Zhe,o=Vhe;t.length=n.length=e.length-1,i.length=o.length=e.length;let r;t[0]=n[0]=1,i[0]=2;let s=o[0];for(l(s)||(s=o[0]=new m),m.subtract(e[1],e[0],s),m.multiplyByScalar(s,3,s),r=1;r<t.length;++r)t[r]=n[r]=1,i[r]=4,s=o[r],l(s)||(s=o[r]=new m),m.subtract(e[r+1],e[r-1],s),m.multiplyByScalar(s,3,s);return i[r]=2,s=o[r],l(s)||(s=o[r]=new m),m.subtract(e[r],e[r-1],s),m.multiplyByScalar(s,3,s),TC.solve(t,i,n,o)}function Wd(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=xo.getPointType(t[0]),this._inTangents=i,this._outTangents=o,this._lastTimeIndex=0}Object.defineProperties(Wd.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}}});Wd.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 Wd({times:t,points:n,inTangents:r,outTangents:o})};Wd.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=Bje(n),o=i.slice(0,i.length-1),r=i.slice(1,i.length);return new Wd({times:t,points:n,inTangents:r,outTangents:o})};Wd.createClampedCubic=function(e){e=e??B.EMPTY_OBJECT;let t=e.times,n=e.points,i=e.firstTangent,o=e.lastTangent,r=xo.getPointType(n[0]);if(n.length<3)return new Fy({points:n,times:t});let s=Oje(n,i,o),a=s.slice(0,s.length-1),c=s.slice(1,s.length);return new Wd({times:t,points:n,inTangents:c,outTangents:a})};Wd.hermiteCoefficientMatrix=new F(2,-3,0,1,-2,3,0,0,1,-2,1,0,1,-1,0,0);Wd.prototype.findTimeInterval=xo.prototype.findTimeInterval;var zje=new se,_C=new m;Wd.prototype.wrapTime=xo.prototype.wrapTime;Wd.prototype.clampTime=xo.prototype.clampTime;Wd.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=zje;d.z=c,d.y=c*c,d.x=d.y*c,d.w=1;let u=F.multiplyByVector(Wd.hermiteCoefficientMatrix,d,d);u.z*=a,u.w*=a;let h=this._pointType;return h===Number?n[s]*u.x+n[s+1]*u.y+r[s]*u.z+o[s]*u.w:(l(t)||(t=new h),t=h.multiplyByScalar(n[s],u.x,t),h.multiplyByScalar(n[s+1],u.y,_C),h.add(t,_C,t),h.multiplyByScalar(r[s],u.z,_C),h.add(t,_C,t),h.multiplyByScalar(o[s],u.w,_C),h.add(t,_C,t))};var Iy=Wd;var WPn=x(T(),1);function SC(e){e=e??B.EMPTY_OBJECT;let t=e.points,n=e.times;this._times=n,this._points=t,this._pointType=xo.getPointType(t[0]),this._lastTimeIndex=0}Object.defineProperties(SC.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});SC.prototype.findTimeInterval=xo.prototype.findTimeInterval;SC.prototype.wrapTime=xo.prototype.wrapTime;SC.prototype.clampTime=xo.prototype.clampTime;SC.prototype.evaluate=function(e,t){let n=this.points;this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex);let i=this._lastTimeIndex,o=this._pointType;return o===Number?n[i]:(l(t)||(t=new o),o.clone(n[i],t))};var MF=SC;var NPn=x(T(),1);function Hje(e){let t=e.points,n=e.times;return function(i,o){l(o)||(o=new Pe);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[r])/(n[r+1]-n[r]),a=t[r],c=t[r+1];return Pe.fastSlerp(a,c,s,o)}}function AC(e){e=e??B.EMPTY_OBJECT;let t=e.points,n=e.times;this._times=n,this._points=t,this._evaluateFunction=Hje(this),this._lastTimeIndex=0}Object.defineProperties(AC.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}});AC.prototype.findTimeInterval=xo.prototype.findTimeInterval;AC.prototype.wrapTime=xo.prototype.wrapTime;AC.prototype.clampTime=xo.prototype.clampTime;AC.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var kF=AC;var ZC=yn.AnimatedPropertyType;function F4(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,qje(this)}Object.defineProperties(F4.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 Kje(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 Rhe(e,t,n,i){if(e.length===1&&t.length===1)return new wF(t[0]);switch(n){case jh.STEP:return new MF({times:e,points:t});case jh.CUBICSPLINE:return Kje(e,t);case jh.LINEAR:return i===ZC.ROTATION?new kF({times:e,points:t}):new Fy({times:e,points:t})}}function Jje(e,t,n,i,o){let r=[];if(i===ZC.WEIGHTS){let a=t.length/o,c,d;for(c=0;c<o;c++){let u=new Array(a),h=c;if(n===jh.CUBICSPLINE)for(d=0;d<a;d+=3)u[d]=t[h],u[d+1]=t[h+o],u[d+2]=t[h+2*o],h+=o*3;else for(d=0;d<a;d++)u[d]=t[h],h+=o;r.push(Rhe(e,u,n,i))}}else r.push(Rhe(e,t,n,i));return r}var jje=new m,Qje=new Pe;function qje(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=Jje(i,o,r,a,d);e._splines=u,e._path=a}F4.prototype.animate=function(e){let t=this._splines,n=this._path,i=this._runtimeAnimation.model,o=this._runtimeNode;if(n===ZC.WEIGHTS){let r=o.morphWeights,s=r.length;for(let a=0;a<s;a++){let c=t[a],d=i.clampAnimations?c.clampTime(e):c.wrapTime(e);r[a]=c.evaluate(d)}}else{if(o.userAnimated)return;{let r=t[0],s=i.clampAnimations?r.clampTime(e):r.wrapTime(e);n===ZC.TRANSLATION||n===ZC.SCALE?o[n]=r.evaluate(s,jje):n===ZC.ROTATION&&(o[n]=r.evaluate(s,Qje))}}};var UF=F4;function I4(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??Gd.NONE,this._animationTime=n.animationTime,this._prevAnimationDelta=void 0,this.start=new _e,this.update=new _e,this.stop=new _e,this._state=qh.STOPPED,this._computedStartTime=void 0,this._duration=void 0;let i=this;this._raiseStartEvent=function(){i.start.raiseEvent(e,i)},this._updateEventTime=0,this._raiseUpdateEvent=function(){i.update.raiseEvent(e,i,i._updateEventTime)},this._raiseStopEvent=function(){i.stop.raiseEvent(e,i)},this._model=e,this._localStartTime=void 0,this._localStopTime=void 0,$je(this)}Object.defineProperties(I4.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 $je(e){let t=Number.MAX_VALUE,n=-Number.MAX_VALUE,i=e._model.sceneGraph,r=e._animation.channels,s=r.length,a=[];for(let c=0;c<s;c++){let d=r[c],u=d.target;if(!l(u))continue;let h=u.node.index,p=i._runtimeNodes[h],b=new UF({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}I4.prototype.animate=function(e){let t=this._runtimeChannels,n=t.length;for(let i=0;i<n;i++)t[i].animate(e)};var DF=I4;function Sb(e){this.animationAdded=new _e,this.animationRemoved=new _e,this.animateWhilePaused=!1,this._model=e,this._runtimeAnimations=[],this._previousTime=void 0}Object.defineProperties(Sb.prototype,{length:{get:function(){return this._runtimeAnimations.length}},model:{get:function(){return this._model}}});function P4(e,t,n){let i=e._model,o=new DF(i,t,n);return e._runtimeAnimations.push(o),e.animationAdded.raiseEvent(i,o),o}Sb.prototype.add=function(e){e=e??B.EMPTY_OBJECT;let n=this._model.sceneGraph.components.animations,i=e.index;if(l(i))return P4(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 P4(this,n[i],e)};Sb.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=P4(this,n[r],e);i.push(s)}return i};Sb.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};Sb.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])};Sb.prototype.contains=function(e){return l(e)?this._runtimeAnimations.indexOf(e)!==-1:!1};Sb.prototype.get=function(e){return this._runtimeAnimations[e]};var rD=[];function e4e(e,t,n){return function(){e.animationRemoved.raiseEvent(t,n)}}Sb.prototype.update=function(e){let t=this._runtimeAnimations,n=t.length;if(n===0)return this._previousTime=void 0,!1;if(!this.animateWhilePaused&&Q.equals(e.time,this._previousTime))return!1;this._previousTime=Q.clone(e.time,this._previousTime);let i=!1,o=e.time,r=this._model;for(let s=0;s<n;++s){let a=t[s];l(a._computedStartTime)||(a._computedStartTime=Q.addSeconds(a.startTime??o,a.delay,new Q)),l(a._duration)||(a._duration=a.localStopTime*(1/a.multiplier));let c=a._computedStartTime,d=a._duration,u=a.stopTime,h=Q.lessThanOrEquals(c,o),p=l(u)&&Q.greaterThan(o,u),b=0;if(d!==0){let _=Q.secondsDifference(p?u:o,c);b=l(a._animationTime)?a._animationTime(d,_):_/d}let f=a.loop===Gd.REPEAT||a.loop===Gd.MIRRORED_REPEAT,y=(h||f&&!l(a.startTime))&&(b<=1||f)&&!p;if(b===a._prevAnimationDelta){let _=a._state===qh.STOPPED;if(y!==_)continue}if(a._prevAnimationDelta=b,y||a._state===qh.ANIMATING){if(y&&a._state===qh.STOPPED&&(a._state=qh.ANIMATING,a.start.numberOfListeners>0&&e.afterRender.push(a._raiseStartEvent)),a.loop===Gd.REPEAT)b=b-Math.floor(b);else if(a.loop===Gd.MIRRORED_REPEAT){let S=Math.floor(b),A=b-S;b=S%2===1?1-A:A}a.reverse&&(b=1-b);let _=b*d*a.multiplier;_=W.clamp(_,a.localStartTime,a.localStopTime),a.animate(_),a.update.numberOfListeners>0&&(a._updateEventTime=_,e.afterRender.push(a._raiseUpdateEvent)),i=!0,y||(a._state=qh.STOPPED,a.stop.numberOfListeners>0&&e.afterRender.push(a._raiseStopEvent),a.removeOnStop&&rD.push(a))}}n=rD.length;for(let s=0;s<n;++s){let a=rD[s];t.splice(t.indexOf(a),1),e.afterRender.push(e4e(this,r,a))}return rD.length=0,i};var OF=Sb;var vXn=x(T(),1);var yXn=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 BF=A_;var TXn=x(T(),1),CC={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};CC.getStyleCommandsNeeded=function(e,t){return t===0?CC.ALL_OPAQUE:t===e?CC.ALL_TRANSLUCENT:CC.OPAQUE_AND_TRANSLUCENT};Object.freeze(CC);var $h=CC;var SXn=x(T(),1);var Ab={GLTF:"GLTF",TILE_GLTF:"TILE_GLTF",TILE_B3DM:"B3DM",TILE_I3DM:"I3DM",TILE_PNTS:"PNTS",TILE_GEOJSON:"TILE_GEOJSON"};Ab.is3DTiles=function(e){switch(e){case Ab.TILE_GLTF:case Ab.TILE_B3DM:case Ab.TILE_I3DM:case Ab.TILE_PNTS:case Ab.TILE_GEOJSON:return!0;case Ab.GLTF:return!1}};Object.freeze(Ab);var Lr=Ab;function ds(e){let t=e.model,n=e.propertyTable;this._propertyTable=n,this._model=t,this._features=void 0,this._featuresLength=0,this._batchTexture=void 0,this._styleCommandsNeededDirty=!1,this._styleCommandsNeeded=$h.ALL_OPAQUE,t4e(this)}Object.defineProperties(ds.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 t4e(e){let t=e._model,n=Lr.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 Bs(s,o)}else for(o=0;o<i;o++)r[o]=new BF({model:t,featureId:o,featureTable:e});e._features=r,e._featuresLength=i,e._batchTexture=new wl({featuresLength:i,owner:e,statistics:n?t.content.tileset.statistics:void 0})}ds.prototype.update=function(e){this._styleCommandsNeededDirty=!1,this._batchTexture.update(void 0,e);let t=$h.getStyleCommandsNeeded(this._featuresLength,this._batchTexture.translucentFeaturesLength);this._styleCommandsNeeded!==t&&(this._styleCommandsNeededDirty=!0,this._styleCommandsNeeded=t)};ds.prototype.setShow=function(e,t){this._batchTexture.setShow(e,t)};ds.prototype.setAllShow=function(e){this._batchTexture.setAllShow(e)};ds.prototype.getShow=function(e){return this._batchTexture.getShow(e)};ds.prototype.setColor=function(e,t){this._batchTexture.setColor(e,t)};ds.prototype.setAllColor=function(e){this._batchTexture.setAllColor(e)};ds.prototype.getColor=function(e,t){return this._batchTexture.getColor(e,t)};ds.prototype.getPickColor=function(e){return this._batchTexture.getPickColor(e)};ds.prototype.getFeature=function(e){return this._features[e]};ds.prototype.hasProperty=function(e,t){return this._propertyTable.hasProperty(e,t)};ds.prototype.hasPropertyBySemantic=function(e,t){return this._propertyTable.hasPropertyBySemantic(e,t)};ds.prototype.getProperty=function(e,t){return this._propertyTable.getProperty(e,t)};ds.prototype.getPropertyBySemantic=function(e,t){return this._propertyTable.getPropertyBySemantic(e,t)};ds.prototype.getPropertyIds=function(e){return this._propertyTable.getPropertyIds(e)};ds.prototype.setProperty=function(e,t,n){return this._propertyTable.setProperty(e,t,n)};ds.prototype.isClass=function(e,t){return this._propertyTable.isClass(e,t)};ds.prototype.isExactClass=function(e,t){return this._propertyTable.isExactClass(e,t)};ds.prototype.getExactClassName=function(e){return this._propertyTable.getExactClassName(e)};var n4e=new U;ds.prototype.applyStyle=function(e){if(!l(e)){this.setAllColor(wl.DEFAULT_COLOR_VALUE),this.setAllShow(wl.DEFAULT_SHOW_VALUE);return}for(let t=0;t<this._featuresLength;t++){let n=this.getFeature(t),i=l(e.color)?e.color.evaluateColor(n,n4e)??wl.DEFAULT_COLOR_VALUE:wl.DEFAULT_COLOR_VALUE,o=l(e.show)?e.show.evaluate(n)??wl.DEFAULT_SHOW_VALUE:wl.DEFAULT_SHOW_VALUE;this.setColor(t,i),this.setShow(t,o)}};ds.prototype.isDestroyed=function(){return!1};ds.prototype.destroy=function(e){this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),me(this)};var zF=ds;var Qjn=x(T(),1);var YXn=x(T(),1);var Ehe={name:"TilesetPipelineStage"};Ehe.process=function(e,t,n){if(t.hasSkipLevelOfDetail(n)){e.shaderBuilder.addDefine("POLYGON_OFFSET",void 0,fe.FRAGMENT);let r={u_polygonOffset:function(){return M.ZERO}};e.uniformMap=Rt(r,e.uniformMap),e.hasSkipLevelOfDetail=!0}let i=e.renderStateOptions;i.stencilTest=Ot.setCesium3DTileBit(),i.stencilMask=Ot.CESIUM_3D_TILE_MASK};var HF=Ehe;var JXn=x(T(),1);var MXn=x(T(),1),KF=`// robust iterative solution without trig functions
// https://github.com/0xfaded/ellipse_demo/issues/1
// https://stackoverflow.com/questions/22959698/distance-from-given-point-to-given-ellipse
//
// This version uses only a single iteration for best performance. For fog
// rendering, the difference is negligible.
vec2 nearestPointOnEllipseFast(vec2 pos, vec2 radii) {
vec2 p = abs(pos);
vec2 inverseRadii = 1.0 / radii;
vec2 evoluteScale = (radii.x * radii.x - radii.y * radii.y) * vec2(1.0, -1.0) * inverseRadii;
// We describe the ellipse parametrically: v = radii * vec2(cos(t), sin(t))
// but store the cos and sin of t in a vec2 for efficiency.
// Initial guess: t = cos(pi/4)
vec2 tTrigs = vec2(0.70710678118);
vec2 v = radii * tTrigs;
// Find the evolute of the ellipse (center of curvature) at v.
vec2 evolute = evoluteScale * tTrigs * tTrigs * tTrigs;
// Find the (approximate) intersection of p - evolute with the ellipsoid.
vec2 q = normalize(p - evolute) * length(v - evolute);
// Update the estimate of t.
tTrigs = (q + evolute) * inverseRadii;
tTrigs = normalize(clamp(tTrigs, 0.0, 1.0));
v = radii * tTrigs;
return v * sign(pos);
}
vec3 computeEllipsoidPositionWC(vec3 positionMC) {
// Get the world-space position and project onto a meridian plane of
// the ellipsoid
vec3 positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;
vec2 positionEllipse = vec2(length(positionWC.xy), positionWC.z);
vec2 nearestPoint = nearestPointOnEllipseFast(positionEllipse, czm_ellipsoidRadii.xz);
// Reconstruct a 3D point in world space
return vec3(nearestPoint.x * normalize(positionWC.xy), nearestPoint.y);
}
void applyFog(inout vec4 color, vec4 groundAtmosphereColor, vec3 lightDirection, float distanceToCamera) {
vec3 fogColor = groundAtmosphereColor.rgb;
// If there is dynamic lighting, apply that to the fog.
const float NONE = 0.0;
if (czm_atmosphereDynamicLighting != NONE) {
float darken = clamp(dot(normalize(czm_viewerPositionWC), lightDirection), czm_fogMinimumBrightness, 1.0);
fogColor *= darken;
}
// Tonemap if HDR rendering is disabled
#ifndef HDR
fogColor.rgb = czm_pbrNeutralTonemapping(fogColor.rgb);
fogColor.rgb = czm_inverseGamma(fogColor.rgb);
#endif
vec3 withFog = czm_fog(distanceToCamera, color.rgb, fogColor, czm_fogVisualDensityScalar);
color = vec4(withFog, color.a);
}
void atmosphereStage(inout vec4 color, in ProcessedAttributes attributes) {
vec3 rayleighColor;
vec3 mieColor;
float opacity;
vec3 positionWC;
vec3 lightDirection;
// When the camera is in space, compute the position per-fragment for
// more accurate ground atmosphere. All other cases will use
//
// The if condition will be added in https://github.com/CesiumGS/cesium/issues/11717
if (false) {
positionWC = computeEllipsoidPositionWC(attributes.positionMC);
lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC, czm_atmosphereDynamicLighting);
// The fog color is derived from the ground atmosphere color
czm_computeGroundAtmosphereScattering(
positionWC,
lightDirection,
rayleighColor,
mieColor,
opacity
);
} else {
positionWC = attributes.positionWC;
lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC, czm_atmosphereDynamicLighting);
rayleighColor = v_atmosphereRayleighColor;
mieColor = v_atmosphereMieColor;
opacity = v_atmosphereOpacity;
}
//color correct rayleigh and mie colors
const bool ignoreBlackPixels = true;
rayleighColor = czm_applyHSBShift(rayleighColor, czm_atmosphereHsbShift, ignoreBlackPixels);
mieColor = czm_applyHSBShift(mieColor, czm_atmosphereHsbShift, ignoreBlackPixels);
vec4 groundAtmosphereColor = czm_computeAtmosphereColor(positionWC, lightDirection, rayleighColor, mieColor, opacity);
if (u_isInFog) {
float distanceToCamera = length(attributes.positionEC);
applyFog(color, groundAtmosphereColor, lightDirection, distanceToCamera);
} else {
// Ground atmosphere
}
}
`;var UXn=x(T(),1),JF=`void atmosphereStage(ProcessedAttributes attributes) {
vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(v_positionWC, czm_atmosphereDynamicLighting);
czm_computeGroundAtmosphereScattering(
// This assumes the geometry stage came before this.
v_positionWC,
lightDirection,
v_atmosphereRayleighColor,
v_atmosphereMieColor,
v_atmosphereOpacity
);
}
`;var Ghe={name:"AtmospherePipelineStage"};Ghe.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_ATMOSPHERE",void 0,fe.BOTH),i.addDefine("COMPUTE_POSITION_WC_ATMOSPHERE",void 0,fe.BOTH),i.addVarying("vec3","v_atmosphereRayleighColor"),i.addVarying("vec3","v_atmosphereMieColor"),i.addVarying("float","v_atmosphereOpacity"),i.addVertexLines([JF]),i.addFragmentLines([KF]),i.addUniform("bool","u_isInFog",fe.FRAGMENT),e.uniformMap.u_isInFog=function(){let o=m.distance(n.camera.positionWC,t.boundingSphere.center);return W.fog(o,n.fog.density)>W.EPSILON3}};var jF=Ghe;var rNn=x(T(),1);var QXn=x(T(),1),QF=`#ifdef DIFFUSE_IBL
vec3 sampleDiffuseEnvironment(vec3 cubeDir)
{
#ifdef CUSTOM_SPHERICAL_HARMONICS
return czm_sphericalHarmonics(cubeDir, model_sphericalHarmonicCoefficients);
#else
return czm_sphericalHarmonics(cubeDir, czm_sphericalHarmonicCoefficients);
#endif
}
#endif
#ifdef SPECULAR_IBL
vec3 sampleSpecularEnvironment(vec3 cubeDir, float roughness)
{
#ifdef CUSTOM_SPECULAR_IBL
float lod = roughness * model_specularEnvironmentMapsMaximumLOD;
return czm_textureCube(model_specularEnvironmentMaps, cubeDir, lod).rgb;
#else
float lod = roughness * czm_specularEnvironmentMapsMaximumLOD;
return czm_textureCube(czm_specularEnvironmentMaps, cubeDir, lod).rgb;
#endif
}
vec3 computeSpecularIBL(vec3 cubeDir, float NdotV, vec3 f0, float roughness)
{
// see https://bruop.github.io/ibl/ at Single Scattering Results
// Roughness dependent fresnel, from Fdez-Aguera
vec3 f90 = max(vec3(1.0 - roughness), f0);
vec3 F = fresnelSchlick2(f0, f90, NdotV);
vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
vec3 specularSample = sampleSpecularEnvironment(cubeDir, roughness);
return specularSample * (F * brdfLut.x + brdfLut.y);
}
#endif
#if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL)
/**
* Compute the light contributions from environment maps and spherical harmonic coefficients.
* See Fdez-Aguera, https://www.jcgt.org/published/0008/01/03/paper.pdf, for explanation
* of the single- and multi-scattering terms.
*
* @param {vec3} viewDirectionEC Unit vector pointing from the fragment to the eye position.
* @param {vec3} normalEC The surface normal in eye coordinates.
* @param {czm_modelMaterial} The material properties.
* @return {vec3} The computed HDR color.
*/
vec3 textureIBL(vec3 viewDirectionEC, vec3 normalEC, czm_modelMaterial material) {
vec3 f0 = material.specular;
float roughness = material.roughness;
float specularWeight = 1.0;
#ifdef USE_SPECULAR
specularWeight = material.specularWeight;
#endif
float NdotV = clamp(dot(normalEC, viewDirectionEC), 0.0, 1.0);
// see https://bruop.github.io/ibl/ at Single Scattering Results
// Roughness dependent fresnel, from Fdez-Aguera
vec3 f90 = max(vec3(1.0 - roughness), f0);
vec3 singleScatterFresnel = fresnelSchlick2(f0, f90, NdotV);
vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;
vec3 FssEss = specularWeight * (singleScatterFresnel * brdfLut.x + brdfLut.y);
#ifdef DIFFUSE_IBL
vec3 normalMC = normalize(model_iblReferenceFrameMatrix * normalEC);
vec3 irradiance = sampleDiffuseEnvironment(normalMC);
vec3 averageFresnel = f0 + (1.0 - f0) / 21.0;
float Ems = specularWeight * (1.0 - brdfLut.x - brdfLut.y);
vec3 FmsEms = FssEss * averageFresnel * Ems / (1.0 - averageFresnel * Ems);
vec3 dielectricScattering = (1.0 - FssEss - FmsEms) * material.diffuse;
vec3 diffuseContribution = irradiance * (FmsEms + dielectricScattering) * model_iblFactor.x;
#else
vec3 diffuseContribution = vec3(0.0);
#endif
#ifdef USE_ANISOTROPY
// Bend normal to account for anisotropic distortion of specular reflection
vec3 anisotropyDirection = material.anisotropicB;
vec3 anisotropicTangent = cross(anisotropyDirection, viewDirectionEC);
vec3 anisotropicNormal = cross(anisotropicTangent, anisotropyDirection);
float bendFactor = 1.0 - material.anisotropyStrength * (1.0 - roughness);
float bendFactorPow4 = bendFactor * bendFactor * bendFactor * bendFactor;
vec3 bentNormal = normalize(mix(anisotropicNormal, normalEC, bendFactorPow4));
vec3 reflectEC = reflect(-viewDirectionEC, bentNormal);
#else
vec3 reflectEC = reflect(-viewDirectionEC, normalEC);
#endif
#ifdef SPECULAR_IBL
vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflectEC);
vec3 radiance = sampleSpecularEnvironment(reflectMC, roughness);
vec3 specularContribution = radiance * FssEss * model_iblFactor.y;
#else
vec3 specularContribution = vec3(0.0);
#endif
return diffuseContribution + specularContribution;
}
#endif
`;var Lhe={name:"ImageBasedLightingPipelineStage"},i4e=new M;Lhe.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,fe.FRAGMENT),r.addUniform("vec2","model_iblFactor",fe.FRAGMENT),kh.isSupported(n.context)&&((i.useSphericalHarmonics||i.useSpecularEnvironmentMaps||i.enabled)&&r.addUniform("mat3","model_iblReferenceFrameMatrix",fe.FRAGMENT),l(s)&&r.addDefine("COMPUTE_POSITION_WC_ATMOSPHERE",void 0,fe.BOTH),l(a)&&l(a[0])?(r.addDefine("DIFFUSE_IBL",void 0,fe.FRAGMENT),r.addDefine("CUSTOM_SPHERICAL_HARMONICS",void 0,fe.FRAGMENT),r.addUniform("vec3","model_sphericalHarmonicCoefficients[9]",fe.FRAGMENT)):i.useDefaultSphericalHarmonics&&r.addDefine("DIFFUSE_IBL",void 0,fe.FRAGMENT),l(i.specularEnvironmentCubeMap)&&i.specularEnvironmentCubeMap.ready||l(s)?(r.addDefine("SPECULAR_IBL",void 0,fe.FRAGMENT),r.addDefine("CUSTOM_SPECULAR_IBL",void 0,fe.FRAGMENT),r.addUniform("samplerCube","model_specularEnvironmentMaps",fe.FRAGMENT),r.addUniform("float","model_specularEnvironmentMapsMaximumLOD",fe.FRAGMENT)):t.useDefaultSpecularMaps&&r.addDefine("SPECULAR_IBL",void 0,fe.FRAGMENT)),r.addFragmentLines(QF);let c={model_iblFactor:function(){return M.multiplyByScalar(i.imageBasedLightingFactor,o?.intensity||1,i4e)},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=Rt(c,e.uniformMap)};var qF=Lhe;var xNn=x(T(),1);var hNn=x(T(),1);var o4e=W.EPSILON16;function N4(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(N4.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,o4e)||(this._currentValue=e,this.runtimeArticulation._dirty=!0)}}});var r4e=new m,X4=new q;N4.prototype.applyStageToMatrix=function(e){let t=this.type,n=this.currentValue,i=r4e,o;switch(t){case $c.XROTATE:o=q.fromRotationX(W.toRadians(n),X4),e=F.multiplyByMatrix3(e,o,e);break;case $c.YROTATE:o=q.fromRotationY(W.toRadians(n),X4),e=F.multiplyByMatrix3(e,o,e);break;case $c.ZROTATE:o=q.fromRotationZ(W.toRadians(n),X4),e=F.multiplyByMatrix3(e,o,e);break;case $c.XTRANSLATE:i.x=n,i.y=0,i.z=0,e=F.multiplyByTranslation(e,i,e);break;case $c.YTRANSLATE:i.x=0,i.y=n,i.z=0,e=F.multiplyByTranslation(e,i,e);break;case $c.ZTRANSLATE:i.x=0,i.y=0,i.z=n,e=F.multiplyByTranslation(e,i,e);break;case $c.XSCALE:i.x=n,i.y=1,i.z=1,e=F.multiplyByScale(e,i,e);break;case $c.YSCALE:i.x=1,i.y=n,i.z=1,e=F.multiplyByScale(e,i,e);break;case $c.ZSCALE:i.x=1,i.y=1,i.z=n,e=F.multiplyByScale(e,i,e);break;case $c.UNIFORMSCALE:e=F.multiplyByUniformScale(e,n,e);break;default:break}return e};var $F=N4;function sD(e){e=e??B.EMPTY_OBJECT;let t=e.articulation,n=e.sceneGraph;this._articulation=t,this._sceneGraph=n,this._name=t.name,this._runtimeStages=[],this._runtimeStagesByName={},this._runtimeNodes=[],this._dirty=!0,s4e(this)}Object.defineProperties(sD.prototype,{articulation:{get:function(){return this._articulation}},sceneGraph:{get:function(){return this._sceneGraph}},name:{get:function(){return this._name}},runtimeStages:{get:function(){return this._runtimeStages}},runtimeNodes:{get:function(){return this._runtimeNodes}}});function s4e(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 $F({stage:a,runtimeArticulation:e});o.push(c);let d=a.name;r[d]=c}}sD.prototype.setArticulationStage=function(e,t){let n=this._runtimeStagesByName[e];l(n)&&(n.currentValue=t)};var a4e=new F,c4e=new F;sD.prototype.apply=function(){if(!this._dirty)return;this._dirty=!1;let e=F.clone(F.IDENTITY,a4e),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,c4e);s.transform=a}};var e2=sD;var ENn=x(T(),1);var _Nn=x(T(),1),t2=`void modelColorStage(inout czm_modelMaterial material)
{
material.diffuse = mix(material.diffuse, model_color.rgb, model_colorBlend);
float highlight = ceil(model_colorBlend);
material.diffuse *= mix(model_color.rgb, vec3(1.0), highlight);
material.alpha *= model_color.a;
}
`;var VC={name:"ModelColorPipelineStage",COLOR_UNIFORM_NAME:"model_color",COLOR_BLEND_UNIFORM_NAME:"model_colorBlend"};VC.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_MODEL_COLOR",void 0,fe.FRAGMENT),i.addFragmentLines(t2);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",VC.COLOR_UNIFORM_NAME,fe.FRAGMENT),o[VC.COLOR_UNIFORM_NAME]=function(){return t.color},i.addUniform("float",VC.COLOR_BLEND_UNIFORM_NAME,fe.FRAGMENT),o[VC.COLOR_BLEND_UNIFORM_NAME]=function(){return qc.getColorBlend(t.colorBlendMode,t.colorBlendAmount)},e.uniformMap=Rt(o,e.uniformMap)};var Py=VC;var YNn=x(T(),1);var LNn=x(T(),1),n2=`#ifdef USE_CLIPPING_PLANES_FLOAT_TEXTURE
vec4 getClippingPlane(
highp sampler2D packedClippingPlanes,
int clippingPlaneNumber,
mat4 transform
) {
int pixY = clippingPlaneNumber / CLIPPING_PLANES_TEXTURE_WIDTH;
int pixX = clippingPlaneNumber - (pixY * CLIPPING_PLANES_TEXTURE_WIDTH);
float pixelWidth = 1.0 / float(CLIPPING_PLANES_TEXTURE_WIDTH);
float pixelHeight = 1.0 / float(CLIPPING_PLANES_TEXTURE_HEIGHT);
float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
float v = (float(pixY) + 0.5) * pixelHeight;
vec4 plane = texture(packedClippingPlanes, vec2(u, v));
return czm_transformPlane(plane, transform);
}
#else
// Handle uint8 clipping texture instead
vec4 getClippingPlane(
highp sampler2D packedClippingPlanes,
int clippingPlaneNumber,
mat4 transform
) {
int clippingPlaneStartIndex = clippingPlaneNumber * 2; // clipping planes are two pixels each
int pixY = clippingPlaneStartIndex / CLIPPING_PLANES_TEXTURE_WIDTH;
int pixX = clippingPlaneStartIndex - (pixY * CLIPPING_PLANES_TEXTURE_WIDTH);
float pixelWidth = 1.0 / float(CLIPPING_PLANES_TEXTURE_WIDTH);
float pixelHeight = 1.0 / float(CLIPPING_PLANES_TEXTURE_HEIGHT);
float u = (float(pixX) + 0.5) * pixelWidth; // sample from center of pixel
float v = (float(pixY) + 0.5) * pixelHeight;
vec4 oct32 = texture(packedClippingPlanes, vec2(u, v)) * 255.0;
vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);
vec4 plane;
plane.xyz = czm_octDecode(oct, 65535.0);
plane.w = czm_unpackFloat(texture(packedClippingPlanes, vec2(u + pixelWidth, v)));
return czm_transformPlane(plane, transform);
}
#endif
float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix) {
vec4 position = czm_windowToEyeCoordinates(fragCoord);
vec3 clipNormal = vec3(0.0);
vec3 clipPosition = vec3(0.0);
float pixelWidth = czm_metersPerPixel(position);
#ifdef UNION_CLIPPING_REGIONS
float clipAmount; // For union planes, we want to get the min distance. So we set the initial value to the first plane distance in the loop below.
#else
float clipAmount = 0.0;
bool clipped = true;
#endif
for (int i = 0; i < CLIPPING_PLANES_LENGTH; ++i) {
vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
clipNormal = clippingPlane.xyz;
clipPosition = -clippingPlane.w * clipNormal;
float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
#ifdef UNION_CLIPPING_REGIONS
clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));
if (amount <= 0.0) {
discard;
}
#else
clipAmount = max(amount, clipAmount);
clipped = clipped && (amount <= 0.0);
#endif
}
#ifndef UNION_CLIPPING_REGIONS
if (clipped) {
discard;
}
#endif
return clipAmount;
}
void modelClippingPlanesStage(inout vec4 color)
{
float clipDistance = clip(gl_FragCoord, model_clippingPlanes, model_clippingPlanesMatrix);
vec4 clippingPlanesEdgeColor = vec4(1.0);
clippingPlanesEdgeColor.rgb = model_clippingPlanesEdgeStyle.rgb;
float clippingPlanesEdgeWidth = model_clippingPlanesEdgeStyle.a;
if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth) {
color = clippingPlanesEdgeColor;
}
}
`;var Whe={name:"ModelClippingPlanesPipelineStage"},l4e=new M;Whe.process=function(e,t,n){let i=t.clippingPlanes,o=n.context,r=e.shaderBuilder;r.addDefine("HAS_CLIPPING_PLANES",void 0,fe.FRAGMENT),r.addDefine("CLIPPING_PLANES_LENGTH",i.length,fe.FRAGMENT),i.unionClippingRegions&&r.addDefine("UNION_CLIPPING_REGIONS",void 0,fe.FRAGMENT),as.useFloatTexture(o)&&r.addDefine("USE_CLIPPING_PLANES_FLOAT_TEXTURE",void 0,fe.FRAGMENT);let s=as.getTextureResolution(i,o,l4e);r.addDefine("CLIPPING_PLANES_TEXTURE_WIDTH",s.x,fe.FRAGMENT),r.addDefine("CLIPPING_PLANES_TEXTURE_HEIGHT",s.y,fe.FRAGMENT),r.addUniform("sampler2D","model_clippingPlanes",fe.FRAGMENT),r.addUniform("vec4","model_clippingPlanesEdgeStyle",fe.FRAGMENT),r.addUniform("mat4","model_clippingPlanesMatrix",fe.FRAGMENT),r.addFragmentLines(n2);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=Rt(a,e.uniformMap)};var i2=Whe;var KNn=x(T(),1);var MNn=x(T(),1),o2=`void modelClippingPolygonsStage(ProcessedAttributes attributes)
{
vec2 sphericalLatLong = czm_approximateSphericalCoordinates(v_positionWC);
sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
vec2 minDistance = vec2(czm_infinity);
v_regionIndex = -1;
v_clippingPosition = vec2(czm_infinity);
for (int regionIndex = 0; regionIndex < CLIPPING_POLYGON_REGIONS_LENGTH; regionIndex++) {
vec4 extents = czm_unpackClippingExtents(model_clippingExtents, regionIndex);
vec2 rectUv = (sphericalLatLong.yx - extents.yx) * extents.wz;
vec2 clamped = clamp(rectUv, vec2(0.0), vec2(1.0));
vec2 distance = abs(rectUv - clamped) * extents.wz;
if (minDistance.x > distance.x || minDistance.y > distance.y) {
minDistance = distance;
v_clippingPosition = rectUv;
}
float threshold = 0.01;
if (rectUv.x > threshold && rectUv.y > threshold && rectUv.x < 1.0 - threshold && rectUv.y < 1.0 - threshold) {
v_regionIndex = regionIndex;
}
}
}
`;var UNn=x(T(),1),r2=`void modelClippingPolygonsStage()
{
vec2 clippingPosition = v_clippingPosition;
int regionIndex = v_regionIndex;
czm_clipPolygons(model_clippingDistance, CLIPPING_POLYGON_REGIONS_LENGTH, clippingPosition, regionIndex);
}
`;var vhe={name:"ModelClippingPolygonsPipelineStage"};vhe.process=function(e,t,n){let i=t.clippingPolygons,o=e.shaderBuilder;o.addDefine("ENABLE_CLIPPING_POLYGONS",void 0,fe.BOTH),i.inverse&&o.addDefine("CLIPPING_INVERSE",void 0,fe.FRAGMENT),o.addDefine("CLIPPING_POLYGON_REGIONS_LENGTH",i.extentsCount,fe.BOTH),o.addUniform("sampler2D","model_clippingDistance",fe.FRAGMENT),o.addUniform("sampler2D","model_clippingExtents",fe.VERTEX),o.addVarying("vec2","v_clippingPosition"),o.addVarying("int","v_regionIndex","flat"),o.addVertexLines(o2),o.addFragmentLines(r2);let r={model_clippingDistance:function(){return i.clippingTexture??n.context.defaultTexture},model_clippingExtents:function(){return i.extentsTexture??n.context.defaultTexture}};e.uniformMap=Rt(r,e.uniformMap)};var s2=vhe;var QNn=x(T(),1);function Fhe(e,t){this._model=e,this._runtimeNode=t}Object.defineProperties(Fhe.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 a2=Fhe;var BYn=x(T(),1);var VYn=x(T(),1);var $Nn=x(T(),1),c2=`mat4 getInstancingTransform()
{
mat4 instancingTransform;
#ifdef HAS_INSTANCE_MATRICES
instancingTransform = mat4(
a_instancingTransformRow0.x, a_instancingTransformRow1.x, a_instancingTransformRow2.x, 0.0, // Column 1
a_instancingTransformRow0.y, a_instancingTransformRow1.y, a_instancingTransformRow2.y, 0.0, // Column 2
a_instancingTransformRow0.z, a_instancingTransformRow1.z, a_instancingTransformRow2.z, 0.0, // Column 3
a_instancingTransformRow0.w, a_instancingTransformRow1.w, a_instancingTransformRow2.w, 1.0 // Column 4
);
#else
vec3 translation = vec3(0.0, 0.0, 0.0);
vec3 scale = vec3(1.0, 1.0, 1.0);
#ifdef HAS_INSTANCE_TRANSLATION
translation = a_instanceTranslation;
#endif
#ifdef HAS_INSTANCE_SCALE
scale = a_instanceScale;
#endif
instancingTransform = mat4(
scale.x, 0.0, 0.0, 0.0,
0.0, scale.y, 0.0, 0.0,
0.0, 0.0, scale.z, 0.0,
translation.x, translation.y, translation.z, 1.0
);
#endif
return instancingTransform;
}
#ifdef USE_2D_INSTANCING
mat4 getInstancingTransform2D()
{
mat4 instancingTransform2D;
#ifdef HAS_INSTANCE_MATRICES
instancingTransform2D = mat4(
a_instancingTransform2DRow0.x, a_instancingTransform2DRow1.x, a_instancingTransform2DRow2.x, 0.0, // Column 1
a_instancingTransform2DRow0.y, a_instancingTransform2DRow1.y, a_instancingTransform2DRow2.y, 0.0, // Column 2
a_instancingTransform2DRow0.z, a_instancingTransform2DRow1.z, a_instancingTransform2DRow2.z, 0.0, // Column 3
a_instancingTransform2DRow0.w, a_instancingTransform2DRow1.w, a_instancingTransform2DRow2.w, 1.0 // Column 4
);
#else
vec3 translation2D = vec3(0.0, 0.0, 0.0);
vec3 scale = vec3(1.0, 1.0, 1.0);
#ifdef HAS_INSTANCE_TRANSLATION
translation2D = a_instanceTranslation2D;
#endif
#ifdef HAS_INSTANCE_SCALE
scale = a_instanceScale;
#endif
instancingTransform2D = mat4(
scale.x, 0.0, 0.0, 0.0,
0.0, scale.y, 0.0, 0.0,
0.0, 0.0, scale.z, 0.0,
translation2D.x, translation2D.y, translation2D.z, 1.0
);
#endif
return instancingTransform2D;
}
#endif
`;var tYn=x(T(),1),l2=`void instancingStage(inout ProcessedAttributes attributes)
{
vec3 positionMC = attributes.positionMC;
mat4 instancingTransform = getInstancingTransform();
attributes.positionMC = (instancingTransform * vec4(positionMC, 1.0)).xyz;
#ifdef HAS_NORMALS
vec3 normalMC = attributes.normalMC;
attributes.normalMC = (instancingTransform * vec4(normalMC, 0.0)).xyz;
#endif
#ifdef USE_2D_INSTANCING
mat4 instancingTransform2D = getInstancingTransform2D();
attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz;
#endif
}
`;var iYn=x(T(),1),d2=`void legacyInstancingStage(
inout ProcessedAttributes attributes,
out mat4 instanceModelView,
out mat3 instanceModelViewInverseTranspose)
{
vec3 positionMC = attributes.positionMC;
mat4 instancingTransform = getInstancingTransform();
mat4 instanceModel = instancingTransform * u_instance_nodeTransform;
instanceModelView = u_instance_modifiedModelView;
instanceModelViewInverseTranspose = mat3(u_instance_modifiedModelView * instanceModel);
attributes.positionMC = (instanceModel * vec4(positionMC, 1.0)).xyz;
#ifdef USE_2D_INSTANCING
mat4 instancingTransform2D = getInstancingTransform2D();
attributes.position2D = (instancingTransform2D * vec4(positionMC, 1.0)).xyz;
#endif
}
`;var aD=new F,d4e=new F,u4e=new F,Phe={name:"InstancingPipelineStage",_getInstanceTransformsAsMatrices:Mhe,_transformsToTypedArray:w4};Phe.process=function(e,t,n){let i=t.instances,o=i.attributes[0].count,r=e.shaderBuilder;r.addDefine("HAS_INSTANCING"),r.addVertexLines(c2);let s=e.model,a=s.sceneGraph,c=e.runtimeNode,d=n.mode!==re.SCENE3D&&!n.scene3DOnly&&s._projectTo2D,u=s._enablePick&&!n.context.webgl2,h=[];V4e(e,n,i,h,d,u),G4e(e,n,i,h);let p={};if(i.transformInWorldSpace?(r.addDefine("USE_LEGACY_INSTANCING",void 0,fe.VERTEX),r.addUniform("mat4","u_instance_modifiedModelView",fe.VERTEX),r.addUniform("mat4","u_instance_nodeTransform",fe.VERTEX),p.u_instance_modifiedModelView=function(){let b=F.multiplyTransformation(s.modelMatrix,a.components.transform,aD);return d?F.multiplyTransformation(n.context.uniformState.view3D,b,aD):(n.mode!==re.SCENE3D&&(b=dt.basisTo2D(n.mapProjection,b,aD)),F.multiplyTransformation(n.context.uniformState.view,b,aD))},p.u_instance_nodeTransform=function(){return F.multiplyTransformation(a.axisCorrectionMatrix,c.computedTransform,d4e)},r.addVertexLines(d2)):r.addVertexLines(l2),d){r.addDefine("USE_2D_INSTANCING",void 0,fe.VERTEX),r.addUniform("mat4","u_modelView2D",fe.VERTEX);let b=n.context,f=F.fromTranslation(c.instancingReferencePoint2D,new F);p.u_modelView2D=function(){return F.multiplyTransformation(b.uniformState.view,f,u4e)}}e.uniformMap=Rt(p,e.uniformMap),e.instanceCount=o,qn(e.attributes,h)};var u2=new F,m4e=new m;function h4e(e,t,n,i,o){let r=F.multiplyTransformation(t,e,u2);return r=F.multiplyTransformation(r,n,u2),o=dt.basisTo2D(i.mapProjection,r,o),o}function f4e(e,t,n,i,o){let r=F.fromTranslation(e,u2),s=F.multiplyTransformation(t,r,u2);s=F.multiplyTransformation(s,n,u2);let a=F.getTranslation(s,m4e);return o=no.computeActualEllipsoidPosition(i,a,o),o}function Xhe(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 Nhe=new F,Yhe=new F,p4e=new F,b4e=new m;function g4e(e,t,n,i){let o=Nhe,r=Yhe;Xhe(t,o,r);let a=t.runtimeNode.instancingReferencePoint2D,c=e.length;for(let d=0;d<c;d++){let u=e[d],h=h4e(u,o,r,n,p4e),p=F.getTranslation(h,b4e),b=m.subtract(p,a,p);i[d]=F.setTranslation(h,b,i[d])}return i}function y4e(e,t,n,i){let o=Nhe,r=Yhe;Xhe(t,o,r);let a=t.runtimeNode.instancingReferencePoint2D,c=e.length;for(let d=0;d<c;d++){let u=e[d],h=f4e(u,o,r,n,u);i[d]=m.subtract(h,a,i[d])}return i}var x4e=new m,T4e=new m;function whe(e,t){let n=e.runtimeNode,i=e.model.sceneGraph.computedModelMatrix,o=F.multiplyByPoint(i,n.instancingTranslationMin,x4e),r=no.computeActualEllipsoidPosition(t,o,o),s=F.multiplyByPoint(i,n.instancingTranslationMax,T4e),a=no.computeActualEllipsoidPosition(t,s,s);n.instancingReferencePoint2D=m.lerp(r,a,.5,new m)}function w4(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 _4e(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 S4e=new m,A4e=new Pe,Z4e=new m;function Mhe(e,t,n){let i=new Array(t),o=mt.getAttributeBySemantic(e,_r.TRANSLATION),r=mt.getAttributeBySemantic(e,_r.ROTATION),s=mt.getAttributeBySemantic(e,_r.SCALE),a=new m(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),c=new m(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),d=l(o),u=l(r),h=l(s),p=d?o.typedArray:new Float32Array(t*3),b=u?r.typedArray:new Float32Array(t*4);u&&r.normalized&&(b=cn.dequantize(b,r.componentDatatype,r.type,t));let f;h?f=s.typedArray:(f=new Float32Array(t*3),f.fill(1));for(let _=0;_<t;_++){let S=new m(p[_*3],p[_*3+1],p[_*3+2],S4e);m.maximumByComponent(a,S,a),m.minimumByComponent(c,S,c);let A=new Pe(b[_*4],b[_*4+1],b[_*4+2],u?b[_*4+3]:1,A4e),Z=new m(f[_*3],f[_*3+1],f[_*3+2],Z4e),V=F.fromTranslationQuaternionRotationScale(S,A,Z,new F);i[_]=V}let y=n.runtimeNode;return y.instancingTranslationMin=c,y.instancingTranslationMax=a,d&&(o.typedArray=void 0),u&&(r.typedArray=void 0),h&&(s.typedArray=void 0),i}function C4e(e,t,n){let i=new Array(t),o=e.typedArray,r=new m(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),s=new m(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let c=0;c<t;c++){let d=new m(o[c*3],o[c*3+1],o[c*3+2]);i[c]=d,m.minimumByComponent(r,d,r),m.maximumByComponent(s,d,s)}let a=n.runtimeNode;return a.instancingTranslationMin=r,a.instancingTranslationMax=s,e.typedArray=void 0,i}function M4(e,t){let n=qe.createVertexBuffer({context:t.context,typedArray:e,usage:Fe.STATIC_DRAW});return n.vertexArrayDestroyable=!1,n}function V4e(e,t,n,i,o,r){let s=mt.getAttributeBySemantic(n,_r.ROTATION);l(s)||r?R4e(e,n,i,t,o,r):E4e(e,n,i,t,o)}function R4e(e,t,n,i,o,r){let s=e.shaderBuilder,a=t.attributes[0].count,c=e.model,d=e.runtimeNode;s.addDefine("HAS_INSTANCE_MATRICES");let u="Transform",h,p=d.instancingTransformsBuffer;if(!l(p)){h=Mhe(t,a,e);let _=w4(h);p=M4(_,i),c._modelResources.push(p),r&&(d.transformsTypedArray=_),d.instancingTransformsBuffer=p}if(Ihe(e,p,n,u),!o)return;let b=ze(i);b.mode=re.COLUMBUS_VIEW,whe(e,b);let f=d.instancingTransformsBuffer2D;if(!l(f)){let _=g4e(h,e,b,h),S=w4(_);f=M4(S,i),c._modelResources.push(f),d.instancingTransformsBuffer2D=f}Ihe(e,f,n,"Transform2D")}function E4e(e,t,n,i,o,r){let s=e.shaderBuilder,a=e.runtimeNode,c=mt.getAttributeBySemantic(t,_r.TRANSLATION),d=mt.getAttributeBySemantic(t,_r.SCALE);if(l(d)&&(s.addDefine("HAS_INSTANCE_SCALE"),Y4(e,d.buffer,d.byteOffset,d.byteStride,n,"Scale")),!l(c))return;let u,h=c.typedArray;if(l(h)?u=C4e(c,c.count,e):l(a.instancingTranslationMin)||(a.instancingTranslationMin=c.min,a.instancingTranslationMax=c.max),s.addDefine("HAS_INSTANCE_TRANSLATION"),Y4(e,c.buffer,c.byteOffset,c.byteStride,n,"Translation"),!o&&!r)return;let b=ze(i);b.mode=re.COLUMBUS_VIEW,whe(e,b);let f=a.instancingTranslationBuffer2D;if(!l(f)){let A=y4e(u,e,b,u),Z=_4e(A);r&&(a.transformsTypedArray=Z),f=M4(Z,i),e.model._modelResources.push(f),a.instancingTranslationBuffer2D=f}if(!o)return;Y4(e,f,0,void 0,n,"Translation2D")}function Ihe(e,t,n,i){let r=K.getSizeInBytes(K.FLOAT),s=r*12,a=[{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:K.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:s,instanceDivisor:1},{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:K.FLOAT,normalize:!1,offsetInBytes:r*4,strideInBytes:s,instanceDivisor:1},{index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:4,componentDatatype:K.FLOAT,normalize:!1,offsetInBytes:r*8,strideInBytes:s,instanceDivisor:1}],c=e.shaderBuilder;c.addAttribute("vec4",`a_instancing${i}Row0`),c.addAttribute("vec4",`a_instancing${i}Row1`),c.addAttribute("vec4",`a_instancing${i}Row2`),qn(n,a)}function Y4(e,t,n,i,o,r){o.push({index:e.attributeIndex++,vertexBuffer:t,componentsPerAttribute:3,componentDatatype:K.FLOAT,normalize:!1,offsetInBytes:n,strideInBytes:i,instanceDivisor:1}),e.shaderBuilder.addAttribute("vec3",`a_instance${r}`)}function G4e(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===_r.FEATURE_ID&&(a.setIndex>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=a.setIndex+1),i.push({index:e.attributeIndex++,vertexBuffer:a.buffer,componentsPerAttribute:Nt.getNumberOfComponents(a.type),componentDatatype:a.componentDatatype,normalize:!1,offsetInBytes:a.byteOffset,strideInBytes:a.byteStride,instanceDivisor:1}),r.addAttribute("float",`a_instanceFeatureId_${a.setIndex}`))}}var m2=Phe;var WYn=x(T(),1);var k4={};k4.name="ModelMatrixUpdateStage";k4.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;khe(e,t,o,e.transformToRoot),e._transformDirty=!1}};function L4e(e,t,n){e.modelMatrix=F.multiplyTransformation(t,n,e.modelMatrix),e.cullFace=mt.getCullFace(e.modelMatrix,e.primitiveType)}function khe(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];L4e(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),khe(a,t,n,i),a._transformDirty=!1}}var h2=k4;var IYn=x(T(),1);var Uhe={name:"NodeStatisticsPipelineStage",_countInstancingAttributes:Dhe,_countGeneratedBuffers:Ohe};Uhe.process=function(e,t,n){let i=e.model.statistics,o=t.instances,r=e.runtimeNode;Dhe(i,o),Ohe(i,r)};function Dhe(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 Ohe(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 f2=Uhe;function RC(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,W4e(this)}Object.defineProperties(RC.prototype,{node:{get:function(){return this._node}},sceneGraph:{get:function(){return this._sceneGraph}},children:{get:function(){return this._children}},transform:{get:function(){return this._transform},set:function(e){this._transformDirty=!0,this._transform=F.clone(e,this._transform)}},transformToRoot:{get:function(){return this._transformToRoot}},computedTransform:{get:function(){return this._computedTransform}},originalTransform:{get:function(){return this._originalTransform}},translation:{get:function(){return l(this._transformParameters)?this._transformParameters.translation:void 0},set:function(e){let t=this._transformParameters,n=t.translation;m.equals(n,e)||(t.translation=m.clone(e,t.translation),U4(this,t))}},rotation:{get:function(){return l(this._transformParameters)?this._transformParameters.rotation:void 0},set:function(e){let t=this._transformParameters,n=t.rotation;Pe.equals(n,e)||(t.rotation=Pe.clone(e,t.rotation),U4(this,t))}},scale:{get:function(){return l(this._transformParameters)?this._transformParameters.scale:void 0},set:function(e){let t=this._transformParameters,n=t.scale;m.equals(n,e)||(t.scale=m.clone(e,t.scale),U4(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 W4e(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 dy(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 U4(e,t){e._transformDirty=!0,e._transform=F.fromTranslationRotationScale(t,e._transform)}RC.prototype.getChild=function(e){return this.sceneGraph._runtimeNodes[this.children[e]]};RC.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(m2),t.push(f2),n.push(h2)};RC.prototype.updateComputedTransform=function(){this._computedTransform=F.multiply(this._transformToRoot,this._transform,this._computedTransform)};RC.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 p2=RC;var EKn=x(T(),1);var QYn=x(T(),1);var Bhe={name:"AlphaPipelineStage"};Bhe.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=tn.ALPHA_BLEND);let s=e.shaderBuilder,a=e.uniformMap;l(i.alphaCutoff)&&(s.addDefine("ALPHA_MODE_MASK",void 0,fe.FRAGMENT),s.addUniform("float","u_alphaCutoff",fe.FRAGMENT),a.u_alphaCutoff=function(){return i.alphaCutoff})};var b2=Bhe;var ewn=x(T(),1);var zhe={name:"BatchTexturePipelineStage"};zhe.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=Rt(o,e.uniformMap)};var g2=zhe;var awn=x(T(),1);var Hhe={name:"ClassificationPipelineStage"};Hhe.process=function(e,t,n){e.shaderBuilder.addDefine("HAS_CLASSIFICATION",void 0,fe.BOTH);let o=e.runtimePrimitive;l(o.batchLengths)||v4e(t,o)};function v4e(e,t){let n=mt.getAttributeBySemantic(e,nt.POSITION);if(!l(n))throw new le("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=mt.getAttributeBySemantic(e,nt.FEATURE_ID,0);if(!l(a)){t.batchLengths=[s],t.batchOffsets=[0];return}let c=a.typedArray;a.typedArray=void 0;let d=[],u=[0],h=r?i[0]:0,p=c[h],b=0;for(let y=1;y<s;y++){let _=r?i[y]:y,S=c[_];if(S!==p){let A=y-b,Z=y;d.push(A),u.push(Z),b=Z,p=S}}let f=s-b;d.push(f),t.batchLengths=d,t.batchOffsets=u}var y2=Hhe;var Twn=x(T(),1);var lwn=x(T(),1),x2=`void filterByPassType(inout vec3 positionMC, vec4 featureColor)
{
bool styleTranslucent = (featureColor.a != 1.0);
// Only render translucent features in the translucent pass (if the style or the original command has translucency).
if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent)
{
// If the model has a translucent silhouette, it needs to render during the silhouette color command,
// (i.e. the command where model_silhouettePass = true), even if the model isn't translucent.
#ifdef HAS_SILHOUETTE
positionMC *= float(model_silhouettePass);
#else
positionMC *= 0.0;
#endif
}
// If the current pass is not the translucent pass and the style is not translucent, don't render the feature.
else if (czm_pass != czm_passTranslucent && styleTranslucent)
{
positionMC *= 0.0;
}
}
void cpuStylingStage(inout vec3 positionMC, inout SelectedFeature feature)
{
float show = ceil(feature.color.a);
positionMC *= show;
#if defined(HAS_SELECTED_FEATURE_ID_ATTRIBUTE) && !defined(HAS_CLASSIFICATION)
filterByPassType(positionMC, feature.color);
#endif
}
`;var uwn=x(T(),1),T2=`void filterByPassType(vec4 featureColor)
{
bool styleTranslucent = (featureColor.a != 1.0);
// Only render translucent features in the translucent pass (if the style or the original command has translucency).
if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent)
{
// If the model has a translucent silhouette, it needs to render during the silhouette color command,
// (i.e. the command where model_silhouettePass = true), even if the model isn't translucent.
#ifdef HAS_SILHOUETTE
if(!model_silhouettePass) {
discard;
}
#else
discard;
#endif
}
// If the current pass is not the translucent pass and the style is not translucent, don't render the feature.
else if (czm_pass != czm_passTranslucent && styleTranslucent)
{
discard;
}
}
void cpuStylingStage(inout czm_modelMaterial material, SelectedFeature feature)
{
vec4 featureColor = feature.color;
if (featureColor.a == 0.0)
{
discard;
}
// If a feature ID vertex attribute is used, the pass type filter is applied in the vertex shader.
// So, we only apply in in the fragment shader if the feature ID texture is used.
#if defined(HAS_SELECTED_FEATURE_ID_TEXTURE) && !defined(HAS_CLASSIFICATION)
filterByPassType(featureColor);
#endif
featureColor = czm_gammaCorrect(featureColor);
// Classification models compute the diffuse differently.
#ifdef HAS_CLASSIFICATION
material.diffuse = featureColor.rgb * featureColor.a;
#else
float highlight = ceil(model_colorBlend);
material.diffuse *= mix(featureColor.rgb, vec3(1.0), highlight);
#endif
material.alpha *= featureColor.a;
}
`;var Khe={name:"CPUStylingPipelineStage"};Khe.process=function(e,t,n){let i=e.model,o=e.shaderBuilder;o.addVertexLines(x2),o.addFragmentLines(T2),o.addDefine("USE_CPU_STYLING",void 0,fe.BOTH),l(i.color)||(o.addUniform("float",Py.COLOR_BLEND_UNIFORM_NAME,fe.FRAGMENT),e.uniformMap[Py.COLOR_BLEND_UNIFORM_NAME]=function(){return qc.getColorBlend(i.colorBlendMode,i.colorBlendAmount)}),o.addUniform("bool","model_commandTranslucent",fe.BOTH),e.uniformMap.model_commandTranslucent=function(){return e.alphaOptions.pass===Le.TRANSLUCENT}};var _2=Khe;var Swn=x(T(),1),D4={MODIFY_MATERIAL:"MODIFY_MATERIAL",REPLACE_MATERIAL:"REPLACE_MATERIAL"};D4.getDefineName=function(e){return`CUSTOM_SHADER_${e}`};Object.freeze(D4);var Zb=D4;var TMn=x(T(),1);var Zwn=x(T(),1),S2=`void customShaderStage(
inout czm_modelVertexOutput vsOutput,
inout ProcessedAttributes attributes,
FeatureIds featureIds,
Metadata metadata,
MetadataClass metadataClass,
MetadataStatistics metadataStatistics
) {
// VertexInput and initializeInputStruct() are dynamically generated in JS,
// see CustomShaderPipelineStage.js
VertexInput vsInput;
initializeInputStruct(vsInput, attributes);
vsInput.featureIds = featureIds;
vsInput.metadata = metadata;
vsInput.metadataClass = metadataClass;
vsInput.metadataStatistics = metadataStatistics;
vertexMain(vsInput, vsOutput);
attributes.positionMC = vsOutput.positionMC;
}
`;var Vwn=x(T(),1),A2=`void customShaderStage(
inout czm_modelMaterial material,
ProcessedAttributes attributes,
FeatureIds featureIds,
Metadata metadata,
MetadataClass metadataClass,
MetadataStatistics metadataStatistics
) {
// FragmentInput and initializeInputStruct() are dynamically generated in JS,
// see CustomShaderPipelineStage.js
FragmentInput fsInput;
initializeInputStruct(fsInput, attributes);
fsInput.featureIds = featureIds;
fsInput.metadata = metadata;
fsInput.metadataClass = metadataClass;
fsInput.metadataStatistics = metadataStatistics;
fragmentMain(fsInput, material);
}
`;var Dwn=x(T(),1);var Ewn=x(T(),1),Z2=`void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes) {
initializeFeatureIds(featureIds, attributes);
initializeFeatureIdAliases(featureIds);
}
`;var Lwn=x(T(),1),C2=`void featureIdStage(out FeatureIds featureIds, ProcessedAttributes attributes)
{
initializeFeatureIds(featureIds, attributes);
initializeFeatureIdAliases(featureIds);
setFeatureIdVaryings();
}
`;var io={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()"};io.process=function(e,t,n){let i=e.shaderBuilder;F4e(i);let o=e.runtimeNode.node.instances;l(o)&&I4e(e,o,n),P4e(e,t,n),i.addVertexLines(C2),i.addFragmentLines(Z2)};function F4e(e){e.addStruct(io.STRUCT_ID_FEATURE_IDS_VS,io.STRUCT_NAME_FEATURE_IDS,fe.VERTEX),e.addStruct(io.STRUCT_ID_FEATURE_IDS_FS,io.STRUCT_NAME_FEATURE_IDS,fe.FRAGMENT),e.addFunction(io.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,io.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,fe.VERTEX),e.addFunction(io.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,io.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_IDS,fe.FRAGMENT),e.addFunction(io.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,io.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,fe.VERTEX),e.addFunction(io.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS,io.FUNCTION_SIGNATURE_INITIALIZE_FEATURE_ID_ALIASES,fe.FRAGMENT),e.addFunction(io.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,io.FUNCTION_SIGNATURE_SET_FEATURE_ID_VARYINGS,fe.VERTEX)}function I4e(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 yn.FeatureIdAttribute?X4e(e,s,a):Jhe(e,s,a,o,1,n);let c=s.label;l(c)&&jhe(e,a,c,fe.BOTH)}}function P4e(e,t,n){let i=t.featureIds,r=mt.getAttributeBySemantic(t,nt.POSITION).count;for(let s=0;s<i.length;s++){let a=i[s],c=a.positionalLabel,d=fe.BOTH;a instanceof yn.FeatureIdAttribute?N4e(e,a,c):a instanceof yn.FeatureIdImplicitRange?Jhe(e,a,c,r,void 0,n):(Y4e(e,a,c,s,n),d=fe.FRAGMENT);let u=a.label;l(u)&&jhe(e,c,u,d)}}function X4e(e,t,n){let i=e.shaderBuilder;i.addStructField(io.STRUCT_ID_FEATURE_IDS_VS,"int",n),i.addStructField(io.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(io.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,[c]),i.addFunctionLines(io.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[d]),i.addVarying("float",a),i.addFunctionLines(io.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,[`${a} = ${s};`])}function N4e(e,t,n){let i=e.shaderBuilder;i.addStructField(io.STRUCT_ID_FEATURE_IDS_VS,"int",n),i.addStructField(io.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(io.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,s),i.addFunctionLines(io.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,s)}function Jhe(e,t,n,i,o,r){w4e(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(io.STRUCT_ID_FEATURE_IDS_VS,"int",n),s.addStructField(io.STRUCT_ID_FEATURE_IDS_FS,"int",n),s.addFunctionLines(io.FUNCTION_ID_SET_FEATURE_ID_VARYINGS,[`${c} = ${a};`]),s.addFunctionLines(io.FUNCTION_ID_INITIALIZE_FEATURE_IDS_VS,[`featureIds.${n} = int(czm_round(${a}));`]),s.addFunctionLines(io.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[`featureIds.${n} = int(czm_round(${c}));`])}function Y4e(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(io.STRUCT_ID_FEATURE_IDS_FS,"int",n),d.addUniform("sampler2D",r,fe.FRAGMENT);let h=`v_texCoord_${a.texCoord}`,p=h,b=a.transform;if(l(b)&&!q.equals(b,q.IDENTITY)){let _=`${r}Transform`;d.addUniform("mat3",_,fe.FRAGMENT),s[_]=function(){return b},p=`vec2(${_} * vec3(${h}, 1.0))`}let f=`texture(${r}, ${p}).${c}`,y=`featureIds.${n} = czm_unpackUint(${f});`;d.addFunctionLines(io.FUNCTION_ID_INITIALIZE_FEATURE_IDS_FS,[y])}function jhe(e,t,n,i){let o=e.shaderBuilder,r=fe.includesVertexShader(i);r&&o.addStructField(io.STRUCT_ID_FEATURE_IDS_VS,"int",n),o.addStructField(io.STRUCT_ID_FEATURE_IDS_FS,"int",n);let s=[`featureIds.${n} = featureIds.${t};`];r&&o.addFunctionLines(io.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_VS,s),o.addFunctionLines(io.FUNCTION_ID_INITIALIZE_FEATURE_ID_ALIASES_FS,s)}function w4e(e,t,n,i,o){let r=e.model,s,a;if(l(t.repeat)){let d=M4e(t,n);s=qe.createVertexBuffer({context:o.context,typedArray:d,usage:Fe.STATIC_DRAW}),s.vertexArrayDestroyable=!1,r._pipelineResources.push(s),r.statistics.addBuffer(s,!1)}else a=[t.offset];let c={index:e.attributeIndex++,instanceDivisor:i,value:a,vertexBuffer:s,normalize:!1,componentsPerAttribute:1,componentDatatype:K.FLOAT,strideInBytes:K.getSizeInBytes(K.FLOAT),offsetInBytes:0};e.attributes.push(c)}function M4e(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=io;var oMn=x(T(),1);var Bwn=x(T(),1),V2=`void metadataStage(
FeatureIds featureIds,
out Metadata metadata,
out MetadataClass metadataClass,
out MetadataStatistics metadataStatistics,
ProcessedAttributes attributes
)
{
initializeMetadata(featureIds, metadata, metadataClass, metadataStatistics, attributes);
}
`;var Hwn=x(T(),1),R2=`void metadataStage(
FeatureIds featureIds,
out Metadata metadata,
out MetadataClass metadataClass,
out MetadataStatistics metadataStatistics,
ProcessedAttributes attributes
)
{
initializeMetadata(featureIds, metadata, metadataClass, metadataStatistics, attributes);
setMetadataVaryings();
}
`;var Ai={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"}]};Ai.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=rQe(o,t),u=k4e(r.propertyAttributes,t,a),h=D4e(r.propertyTextures,a),p=z4e(r.propertyTables,t,e,a,d),b=u.concat(h).concat(p);J4e(i,b),q4e(i),i.addVertexLines(R2),i.addFragmentLines(V2);for(let f=0;f<u.length;f++){let y=u[f];$4e(e,y)}for(let f=0;f<h.length;f++){let y=h[f];tQe(e,y,c)}for(let f=0;f<p.length;f++){let y=p[f];iQe(e,y,c)}};function k4e(e,t,n){return l(e)?e.flatMap(i=>U4e(i,t,n)):[]}function U4e(e,t,n){let{getAttributeByName:i,getAttributeInfo:o,sanitizeGlslIdentifier:r}=mt,s=e.class.id,a=n?.classes[s],c=Object.entries(e.properties),d=new Array(c.length);for(let u=0;u<c.length;u++){let[h,p]=c[u],b=i(t,p.attribute),{glslType:f,variableName:y}=o(b);d[u]={metadataVariable:r(h),property:p,classProperty:p.classProperty,type:p.classProperty.type,glslType:f,variableName:y,propertyStatistics:a?.properties[h],shaderDestination:fe.BOTH}}return d}function D4e(e,t){return l(e)?e.flatMap(n=>O4e(n,t)):[]}function O4e(e,t){let{sanitizeGlslIdentifier:n}=mt,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:fe.FRAGMENT}}return s}var B4e=4;function z4e(e,t,n,i,o){if(!l(e))return[];let r=K4e(n,t);return e.filter(s=>l(s.class)&&r.has(String(s.id))).flatMap(s=>H4e(s,r,i,o))}function H4e(e,t,n,i){let{sanitizeGlslIdentifier:o}=mt,r=e.class,s=n?.classes[r.id],a=t.get(String(e.id))??{},c=a.shaderDestination??fe.BOTH,d=e.properties,u=r.properties,h=[],p=0;for(let[b,f]of Object.entries(u)){if(!f.isGpuCompatible(B4e))continue;let y=d[b],_=fe.intersection(cQe(b,i),c);if(_===fe.NONE){p++;continue}h.push({metadataVariable:o(b),property:y,classProperty:f,type:f.type,glslType:f.getGlslType(),propertyStatistics:s?.properties[b],shaderDestination:_,propertyTable:e,featureIdVariableName:a.variableName,propertyInfoIndex:p}),p++}return h}function K4e(e,t){let n=new Map;function i(a,c){let d=a?.propertyTableId;if(!l(d))return;let u=String(d),h={variableName:a.positionalLabel,shaderDestination:c},p=n.get(u);l(p)&&console.warn(`Multiple feature ID sets reference the same property table ${d} in primitive. Only one will be used.`),n.set(u,h)}let o=t?.featureIds??[];for(let a=0;a<o.length;a++){let c=o[a],d=l(c?.textureReader);i(c,d?fe.FRAGMENT:fe.BOTH)}let s=e.runtimeNode?.node?.instances?.featureIds??[];for(let a=0;a<s.length;a++){let c=s[a];i(c,fe.BOTH)}return n}function J4e(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!==gt.ENUM&&i.add(d)}let o=Ai.METADATA_CLASS_FIELDS;for(let a of n){let c=`${a}MetadataClass`;s(c,a,o)}let r=Ai.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,fe.BOTH);for(let u=0;u<d.length;u++){let{shaderName:h}=d[u],p=d[u].type==="float"?Q4e(c):c;e.addStructField(a,p,h)}}}var j4e={int:"float",ivec2:"vec2",ivec3:"vec3",ivec4:"vec4"};function Q4e(e){let t=j4e[e];return l(t)?t:e}function q4e(e){e.addStruct(Ai.STRUCT_ID_METADATA_VS,Ai.STRUCT_NAME_METADATA,fe.VERTEX),e.addStruct(Ai.STRUCT_ID_METADATA_FS,Ai.STRUCT_NAME_METADATA,fe.FRAGMENT),e.addStruct(Ai.STRUCT_ID_METADATA_CLASS_VS,Ai.STRUCT_NAME_METADATA_CLASS,fe.VERTEX),e.addStruct(Ai.STRUCT_ID_METADATA_CLASS_FS,Ai.STRUCT_NAME_METADATA_CLASS,fe.FRAGMENT),e.addStruct(Ai.STRUCT_ID_METADATA_STATISTICS_VS,Ai.STRUCT_NAME_METADATA_STATISTICS,fe.VERTEX),e.addStruct(Ai.STRUCT_ID_METADATA_STATISTICS_FS,Ai.STRUCT_NAME_METADATA_STATISTICS,fe.FRAGMENT),e.addFunction(Ai.FUNCTION_ID_INITIALIZE_METADATA_VS,Ai.FUNCTION_SIGNATURE_INITIALIZE_METADATA,fe.VERTEX),e.addFunction(Ai.FUNCTION_ID_INITIALIZE_METADATA_FS,Ai.FUNCTION_SIGNATURE_INITIALIZE_METADATA,fe.FRAGMENT),e.addFunction(Ai.FUNCTION_ID_SET_METADATA_VARYINGS,Ai.FUNCTION_SIGNATURE_SET_METADATA_VARYINGS,fe.VERTEX)}function $4e(e,t){eQe(e,t),O4(e.shaderBuilder,t),B4(e.shaderBuilder,t)}function eQe(e,t){let{shaderBuilder:n}=e,{metadataVariable:i,property:o,glslType:r}=t,s=z4({valueExpression:`attributes.${t.variableName}`,renderResources:e,glslType:r,metadataVariable:i,shaderDestination:fe.BOTH,property:o});n.addStructField(Ai.STRUCT_ID_METADATA_VS,r,i),n.addStructField(Ai.STRUCT_ID_METADATA_FS,r,i);let a=`metadata.${i} = ${s};`;n.addFunctionLines(Ai.FUNCTION_ID_INITIALIZE_METADATA_VS,[a]),n.addFunctionLines(Ai.FUNCTION_ID_INITIALIZE_METADATA_FS,[a])}function tQe(e,t,n){nQe(e,t,n),O4(e.shaderBuilder,t),B4(e.shaderBuilder,t)}function nQe(e,t,n){let{shaderBuilder:i,uniformMap:o}=e,{metadataVariable:r,glslType:s,property:a}=t,{texCoord:c,channels:d,index:u,texture:h,transform:p}=a.textureReader,b=`u_propertyTexture_${u}`,f=[];o.hasOwnProperty(b)||(i.addUniform("sampler2D",b,fe.FRAGMENT),o[b]=()=>h),i.addStructField(Ai.STRUCT_ID_METADATA_FS,s,r);let y=`attributes.texCoord_${c}`,_=y;if(l(p)&&!q.equals(p,q.IDENTITY)){let L=`${b}Transform`;i.addUniform("mat3",L,fe.FRAGMENT),o[L]=function(){return p},_=`vec2(${L} * vec3(${y}, 1.0))`}let S=`texture(${b}, ${_}).${d}`,A=a.classProperty,Z;n?Z=A.unpackTextureInShader(S,d,r,f):Z=A.unpackTextureInShaderWebGL1(S);let V=z4({valueExpression:Z,renderResources:e,glslType:s,metadataVariable:r,shaderDestination:fe.FRAGMENT,property:a}),E=`metadata.${r} = ${V};`;f.push(E),i.addFunctionLines(Ai.FUNCTION_ID_INITIALIZE_METADATA_FS,f)}function O4(e,t){let n=t.classProperty,{metadataVariable:i,glslType:o,shaderDestination:r}=t,s=Qhe(Ai.METADATA_CLASS_FIELDS,n,`metadataClass.${i}`,o),a=`${o}MetadataClass`;e.addStructField(Ai.STRUCT_ID_METADATA_CLASS_FS,a,i),e.addFunctionLines(Ai.FUNCTION_ID_INITIALIZE_METADATA_FS,s),fe.includesVertexShader(r)&&(e.addStructField(Ai.STRUCT_ID_METADATA_CLASS_VS,a,i),e.addFunctionLines(Ai.FUNCTION_ID_INITIALIZE_METADATA_VS,s))}function B4(e,t){let{propertyStatistics:n}=t;if(!l(n))return;let{metadataVariable:i,type:o,glslType:r}=t;if(o===gt.ENUM)return;let s=Ai.METADATA_STATISTICS_FIELDS,a=`metadataStatistics.${i}`,c=Qhe(s,n,a,r),d=`${r}MetadataStatistics`;e.addStructField(Ai.STRUCT_ID_METADATA_STATISTICS_FS,d,i),e.addFunctionLines(Ai.FUNCTION_ID_INITIALIZE_METADATA_FS,c),fe.includesVertexShader(t.shaderDestination)&&(e.addStructField(Ai.STRUCT_ID_METADATA_STATISTICS_VS,d,i),e.addFunctionLines(Ai.FUNCTION_ID_INITIALIZE_METADATA_VS,c))}function iQe(e,t,n){oQe(e,t,n),O4(e.shaderBuilder,t),B4(e.shaderBuilder,t)}function oQe(e,t,n){let{shaderBuilder:i,uniformMap:o}=e,{metadataVariable:r,glslType:s,property:a,featureIdVariableName:c,propertyTable:d,propertyInfoIndex:u}=t;if(!n){Tt("PropertyTableCustomShader","Property table support for custom shaders requires WebGL2.");return}if(!l(c)||!l(d.texture))return;let h=`u_propertyTableTexture_${d.id}`,p=[];o.hasOwnProperty(h)||(i.addUniform("sampler2D",h,fe.BOTH),o[h]=()=>d.texture);let b=t.shaderDestination;fe.includesVertexShader(b)&&i.addStructField(Ai.STRUCT_ID_METADATA_VS,s,r),fe.includesFragmentShader(b)&&i.addStructField(Ai.STRUCT_ID_METADATA_FS,s,r);let y=`ivec2(${`featureIds.${c}`}, ${u})`,_=`texelFetch(${h}, ${y}, 0)`,S=t.classProperty,A=S.unpackTextureInShader(_,"rgba",r,p),Z=z4({valueExpression:A,renderResources:e,glslType:s,metadataVariable:r,shaderDestination:b,property:a??S}),V=`metadata.${r} = ${Z};`;p.push(V),fe.includesVertexShader(b)&&i.addFunctionLines(Ai.FUNCTION_ID_INITIALIZE_METADATA_VS,p),fe.includesFragmentShader(b)&&i.addFunctionLines(Ai.FUNCTION_ID_INITIALIZE_METADATA_FS,p)}function Qhe(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 z4(e){let{valueExpression:t,property:n}=e;if(!n.hasValueTransform)return t;let i=e.metadataVariable,o=`u_${i}_offset`,r=`u_${i}_scale`,{shaderBuilder:s,uniformMap:a}=e.renderResources,{glslType:c,shaderDestination:d}=e;s.addUniform(c,o,d),s.addUniform(c,r,d);let{offset:u,scale:h}=n;return a[o]=()=>u,a[r]=()=>h,`czm_valueTransform(${o}, ${r}, ${t})`}function rQe(e,t){let n=new Set,i=new Set;return sQe(e,n,i),aQe(e,t,n,i),{usedInVertex:n,usedInFragment:i}}function sQe(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 aQe(e,t,n,i){let o=e.style;if(!(l(o)&&t.primitiveType===ve.POINTS))return;let s=o.color?.getVariables?.()??[];for(let d of s)n.add(d),i.add(d);let a=o.show?.getVariables?.()??[];for(let d of a)n.add(d),i.add(d);let c=o.pointSize?.getVariables?.()??[];for(let d of c)n.add(d)}function cQe(e,t){let n=t.usedInFragment.has(e)?fe.FRAGMENT:fe.NONE,i=t.usedInVertex.has(e)?fe.VERTEX:fe.NONE;return fe.union(n,i)}var Em=Ai;var sMn=x(T(),1),qhe={INHERIT:0,OPAQUE:1,TRANSLUCENT:2};Object.freeze(qhe);var Ny=qhe;var Fa={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:Tt};Fa.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=bQe(s,t,e);if(!d.customShaderEnabled)return;if(TQe(i,s,d),d.shouldComputePositionWC&&i.addDefine("COMPUTE_POSITION_WC_CUSTOM_SHADER",void 0,fe.BOTH),l(s.vertexShaderText)&&i.addDefine("HAS_CUSTOM_VERTEX_SHADER",void 0,fe.VERTEX),l(s.fragmentShaderText)){i.addDefine("HAS_CUSTOM_FRAGMENT_SHADER",void 0,fe.FRAGMENT);let p=Zb.getDefineName(s.mode);i.addDefine(p,void 0,fe.FRAGMENT)}let u=s.uniforms;for(let p in u)if(u.hasOwnProperty(p)){let b=u[p];i.addUniform(b.type,p)}let h=s.varyings;for(let p in h)if(h.hasOwnProperty(p)){let b=h[p];i.addVarying(b,p)}e.uniformMap=Rt(e.uniformMap,s.uniformMap)};function lQe(e){let t={};for(let n=0;n<e.length;n++){let i=mt.getAttributeInfo(e[n]);t[i.variableName]=i}return t}var dQe={position:"vec3",normal:"vec3",tangent:"vec3",bitangent:"vec3",texCoord:"vec2",color:"vec4",joints:"ivec4",weights:"vec4"},uQe={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 $he(e){let t=e.replace(/_[0-9]+$/,"");t=t.replace(/(MC|EC)$/,"");let n=dQe[t],i=uQe[t];if(l(n))return{attributeField:[n,e],value:i}}function mQe(e,t,n){if(!l(e.vertexShaderText))return{enabled:!1};let i=e.usedVariablesVertex;if(!nfe(i.metadataSet,n))return{enabled:!1};let o=i.attributeSet,r=efe(t,o,!1),s=tfe(t,o,!1),a,c=[],d=[];for(let u in r){if(!r.hasOwnProperty(u))continue;let p=[r[u].glslType,u];c.push(p),a=`vsInput.attributes.${u} = attributes.${u};`,d.push(a)}for(let u=0;u<s.length;u++){let h=s[u],p=$he(h);if(!l(p))return Fa._oneTimeWarning("CustomShaderPipelineStage.incompatiblePrimitiveVS",`Primitive is missing attribute ${h}, disabling custom vertex shader`),{enabled:!1};c.push(p.attributeField),a=`vsInput.attributes.${h} = ${p.value};`,d.push(a)}return{enabled:!0,attributeFields:c,initializationLines:d}}function hQe(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 fQe(e,t,n){if(!l(e.fragmentShaderText))return{enabled:!1};let i=e.usedVariablesFragment;if(!nfe(i.metadataSet,n))return{enabled:!1};let o=i.attributeSet,r=efe(t,o,!0),s=tfe(t,o,!0),a,c=[],d=[];for(let h in r){if(!r.hasOwnProperty(h))continue;let b=[r[h].glslType,h];c.push(b),a=`fsInput.attributes.${h} = attributes.${h};`,d.push(a)}for(let h=0;h<s.length;h++){let p=s[h],b=$he(p);if(!l(b))return Fa._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=hQe(e);return{enabled:!0,attributeFields:c.concat(u.attributeFields),initializationLines:u.initializationLines.concat(d)}}var pQe={positionWC:!0,positionEC:!0};function efe(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 tfe(e,t,n){let i=[];for(let o in t){if(!t.hasOwnProperty(o)||pQe.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 bQe(e,t,n){let i=lQe(t.attributes),o=_Qe(t,n.model.structuralMetadata),r=mQe(e,i,o),s=fQe(e,i,o),c=e.usedVariablesFragment.attributeSet.hasOwnProperty("positionWC")&&s.enabled;return{vertexLines:r,fragmentLines:s,customShaderEnabled:r.enabled||s.enabled,shouldComputePositionWC:c}}function gQe(e,t){let n=Fa.STRUCT_ID_ATTRIBUTES_VS;e.addStruct(n,Fa.STRUCT_NAME_ATTRIBUTES,fe.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=Fa.STRUCT_ID_VERTEX_INPUT,e.addStruct(n,Fa.STRUCT_NAME_VERTEX_INPUT,fe.VERTEX),e.addStructField(n,Fa.STRUCT_NAME_ATTRIBUTES,"attributes"),e.addStructField(n,Xy.STRUCT_NAME_FEATURE_IDS,"featureIds"),e.addStructField(n,Em.STRUCT_NAME_METADATA,"metadata"),e.addStructField(n,Em.STRUCT_NAME_METADATA_CLASS,"metadataClass"),e.addStructField(n,Em.STRUCT_NAME_METADATA_STATISTICS,"metadataStatistics");let r=Fa.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS;e.addFunction(r,Fa.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS,fe.VERTEX),e.addFunctionLines(r,o)}function yQe(e,t){let n=Fa.STRUCT_ID_ATTRIBUTES_FS;e.addStruct(n,Fa.STRUCT_NAME_ATTRIBUTES,fe.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=Fa.STRUCT_ID_FRAGMENT_INPUT,e.addStruct(n,Fa.STRUCT_NAME_FRAGMENT_INPUT,fe.FRAGMENT),e.addStructField(n,Fa.STRUCT_NAME_ATTRIBUTES,"attributes"),e.addStructField(n,Xy.STRUCT_NAME_FEATURE_IDS,"featureIds"),e.addStructField(n,Em.STRUCT_NAME_METADATA,"metadata"),e.addStructField(n,Em.STRUCT_NAME_METADATA_CLASS,"metadataClass"),e.addStructField(n,Em.STRUCT_NAME_METADATA_STATISTICS,"metadataStatistics");let r=Fa.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS;e.addFunction(r,Fa.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS,fe.FRAGMENT),e.addFunctionLines(r,o)}var xQe=[];function TQe(e,t,n){let{vertexLines:i,fragmentLines:o}=n,r=xQe;i.enabled&&(gQe(e,i),r.length=0,r.push("#line 0",t.vertexShaderText,S2),e.addVertexLines(r)),o.enabled&&(yQe(e,o),r.length=0,r.push("#line 0",t.fragmentShaderText,A2),e.addFragmentLines(r))}function _Qe(e,t){if(!l(t))return new Set;let n=e.propertyTextureIds,i=e.propertyAttributeIds,o=l(e.featureIds)?e.featureIds.map(a=>a.propertyTableId):[],r=new Set;function s(a,c){for(let d of a){let h=c[d].class.properties;Object.keys(h).forEach(p=>r.add(p))}}return s(n,t.propertyTextures),s(i,t.propertyAttributes),s(o,t.propertyTables),r}function nfe(e,t){for(let n in e)if(e.hasOwnProperty(n)&&!t.has(n))return Fa._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 E2=Fa;var RMn=x(T(),1);var G2={name:"DequantizationPipelineStage",FUNCTION_ID_DEQUANTIZATION_STAGE_VS:"dequantizationStage",FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS:"void dequantizationStage(inout ProcessedAttributes attributes)"};G2.process=function(e,t,n){let i=e.shaderBuilder,o=e.model,r=l(o.classificationType);i.addDefine("USE_DEQUANTIZATION",void 0,fe.VERTEX),i.addFunction(G2.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,G2.FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS,fe.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===nt.POSITION,h=c.semantic===nt.TEXCOORD;if(r&&!u&&!h)continue;let p=mt.getAttributeInfo(c);AQe(i,p),SQe(e,p)}};function SQe(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,fe.VERTEX),i[s]=function(){return r.normalizationRange}}else{let s=`model_quantizedVolumeOffset_${o}`,a=`model_quantizedVolumeStepSize_${o}`,c=t.glslType;n.addUniform(c,s,fe.VERTEX),n.addUniform(c,a,fe.VERTEX);let d=r.quantizedVolumeOffset,u=r.quantizedVolumeStepSize;/^color_\d+$/.test(o)&&(d=ife(d,0),u=ife(u,1)),i[s]=function(){return d},i[a]=function(){return u}}}function ife(e,t){return e instanceof se?e:new se(e.x,e.y,e.z,t)}function AQe(e,t){let n=t.variableName,i=t.attribute.quantization,o;i.octEncoded?o=ZQe(n,i):o=CQe(n),e.addFunctionLines(G2.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,[o])}function ZQe(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 CQe(e){let t=`attributes.${e}`,n=`a_quantized_${e}`,i=`model_quantizedVolumeOffset_${e}`,o=`model_quantizedVolumeStepSize_${e}`;return`${t} = ${i} + ${n} * ${o};`}var L2=G2;var vMn=x(T(),1);var GMn=x(T(),1),W2=`void edgeDetectionStage(inout vec4 color, inout FeatureIds featureIds) {
if (u_isEdgePass) {
return;
}
vec2 screenCoord = gl_FragCoord.xy / czm_viewport.zw;
vec4 edgeColor = texture(czm_edgeColorTexture, screenCoord);
vec4 edgeId = texture(czm_edgeIdTexture, screenCoord);
// Packed window-space depth from edge pass (0..1)
float edgeDepthWin = czm_unpackDepth(texture(czm_edgeDepthTexture, screenCoord));
// Near / far for current frustum
float n = czm_currentFrustum.x;
float f = czm_currentFrustum.y;
// geometry depth in eye coordinate
vec4 geomEC = czm_windowToEyeCoordinates(gl_FragCoord);
float geomDepthLinear = -geomEC.z;
// Convert edge depth to linear depth
float z_ndc_edge = edgeDepthWin * 2.0 - 1.0;
float edgeDepthLinear = (2.0 * n * f) / (f + n - z_ndc_edge * (f - n));
float d = abs(edgeDepthLinear - geomDepthLinear);
// Adaptive epsilon using linear depth fwidth for robustness
float pixelStepLinear = fwidth(geomDepthLinear);
float rel = geomDepthLinear * 0.0005;
float eps = max(n * 1e-4, max(pixelStepLinear * 1.5, rel));
// If Edge isn't behind any geometry and the pixel has edge data
if (d < eps && edgeId.r > 0.0) {
#ifdef HAS_EDGE_FEATURE_ID
float edgeFeatureId = edgeId.g;
float currentFeatureId = float(featureIds.featureId_0);
#endif
float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, screenCoord));
// Background / sky / globe: always show edge
bool isBackground = geomDepthLinear > globeDepth;
bool drawEdge = isBackground;
#ifdef HAS_EDGE_FEATURE_ID
bool hasEdgeFeature = edgeFeatureId > 0.0;
bool hasCurrentFeature = currentFeatureId > 0.0;
bool featuresMatch = edgeFeatureId == currentFeatureId;
drawEdge = drawEdge || !hasEdgeFeature || !hasCurrentFeature || featuresMatch;
#else
drawEdge = true;
#endif
if (drawEdge) {
color = edgeColor;
}
}
}
`;var ofe={name:"EdgeDetectionPipelineStage"};ofe.process=function(e){e.shaderBuilder.addFragmentLines([W2])};var v2=ofe;var y9n=x(T(),1);var IMn=x(T(),1),F2=`// CESIUM_REDIRECTED_COLOR_OUTPUT flag is used to avoid color attachment conflicts
// when shaders are processed by different rendering pipelines (e.g., OIT).
// Only declare MRT outputs when not in a derived shader context.
#if defined(HAS_EDGE_VISIBILITY_MRT) && !defined(CESIUM_REDIRECTED_COLOR_OUTPUT)
layout(location = 1) out vec4 out_id; // edge id / metadata
layout(location = 2) out vec4 out_edgeDepth; // packed depth
#endif
void edgeVisibilityStage(inout vec4 color, inout FeatureIds featureIds)
{
#ifdef HAS_EDGE_VISIBILITY
if (!u_isEdgePass) {
return;
}
float edgeTypeInt = v_edgeType * 255.0;
if (edgeTypeInt < 0.5) {
discard;
}
if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) { // silhouette candidate
// Silhouette check done in vertex shader
// v_shouldDiscard will be > 0.5 if this edge should be discarded
if (v_shouldDiscard > 0.5) {
discard;
}
}
vec4 finalColor = color;
#ifdef HAS_EDGE_COLOR_ATTRIBUTE
if (v_edgeColor.a >= 0.0) {
finalColor = v_edgeColor;
}
#endif
#ifdef HAS_LINE_PATTERN
// Pattern is 16-bit, each bit represents visibility at that position
const float maskLength = 16.0;
// Get the relative position within the dash from 0 to 1
float dashPosition = fract(v_lineCoord / maskLength);
// Figure out the mask index
float maskIndex = floor(dashPosition * maskLength);
// Test the bit mask
float maskTest = floor(u_linePattern / pow(2.0, maskIndex));
// If bit is 0 (gap), discard the fragment (use < 1.0 for better numerical stability)
if (mod(maskTest, 2.0) < 1.0) {
discard;
}
#endif
color = finalColor;
#if defined(HAS_EDGE_VISIBILITY_MRT) && !defined(CESIUM_REDIRECTED_COLOR_OUTPUT)
// Write edge metadata
out_id = vec4(0.0);
out_id.r = edgeTypeInt; // Edge type (0-3)
#ifdef HAS_EDGE_FEATURE_ID
out_id.g = float(featureIds.featureId_0); // Feature ID if available
#else
out_id.g = 0.0;
#endif
// Pack depth into separate MRT attachment
out_edgeDepth = czm_packDepth(gl_FragCoord.z);
#endif
#endif
}`;var XMn=x(T(),1),I2=`#ifdef HAS_EDGE_VISIBILITY
void edgeVisibilityStageVS() {
if (!u_isEdgePass) {
return;
}
v_edgeType = a_edgeType;
v_silhouetteNormalView = czm_normal * a_silhouetteNormal;
v_faceNormalAView = czm_normal * a_faceNormalA;
v_faceNormalBView = czm_normal * a_faceNormalB;
v_edgeOffset = a_edgeOffset;
// Silhouette detection: check both endpoints of the edge
v_shouldDiscard = 0.0;
float edgeTypeInt = a_edgeType * 255.0;
if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) {
vec3 normalA = normalize(v_faceNormalAView);
vec3 normalB = normalize(v_faceNormalBView);
const float perpTol = 2.5e-4;
// Check at current vertex (first endpoint)
vec4 currentPosEC = czm_modelView * vec4(v_positionMC, 1.0);
vec3 toEye1 = normalize(-currentPosEC.xyz);
float dotA1 = dot(normalA, toEye1);
float dotB1 = dot(normalB, toEye1);
// Check at other vertex (second endpoint)
vec4 otherPosEC = czm_modelView * vec4(a_edgeOtherPos, 1.0);
vec3 toEye2 = normalize(-otherPosEC.xyz);
float dotA2 = dot(normalA, toEye2);
float dotB2 = dot(normalB, toEye2);
// Discard if EITHER endpoint is non-silhouette
if (dotA1 * dotB1 > perpTol || dotA2 * dotB2 > perpTol) {
v_shouldDiscard = 1.0;
}
}
#ifdef HAS_EDGE_FEATURE_ID
v_featureId_0 = a_edgeFeatureId;
#endif
#ifdef HAS_EDGE_COLOR_ATTRIBUTE
v_edgeColor = a_edgeColor;
#endif
#ifdef HAS_LINE_PATTERN
#ifdef HAS_EDGE_CUMULATIVE_DISTANCE
v_lineCoord = a_edgeCumulativeDistance * u_pixelsPerWorld;
#else
vec4 currentClip = czm_modelViewProjection * vec4(v_positionMC, 1.0);
vec2 currentScreen = ((currentClip.xy / currentClip.w) * 0.5 + 0.5) * czm_viewport.zw;
vec4 otherClip = czm_modelViewProjection * vec4(a_edgeOtherPos, 1.0);
vec2 otherScreen = ((otherClip.xy / otherClip.w) * 0.5 + 0.5) * czm_viewport.zw;
vec2 windowDir = otherScreen - currentScreen;
const float textureCoordinateBase = 8192.0;
if (abs(windowDir.x) > abs(windowDir.y)) {
v_lineCoord = textureCoordinateBase + currentScreen.x;
} else {
v_lineCoord = textureCoordinateBase + currentScreen.y;
}
#endif
#endif
// Expand vertex to form quad
vec4 posClip = gl_Position;
if (length(a_edgeOtherPos) > 0.0 && abs(a_edgeOffset) > 0.0) {
vec4 currentClip = posClip;
vec4 otherClip = czm_modelViewProjection * vec4(a_edgeOtherPos, 1.0);
vec2 currentNDC = currentClip.xy / currentClip.w;
vec2 otherNDC = otherClip.xy / otherClip.w;
vec2 edgeDirNDC = otherNDC - currentNDC;
// Ensure consistent edge direction
if (edgeDirNDC.x < 0.0 || (abs(edgeDirNDC.x) < 0.001 && edgeDirNDC.y < 0.0)) {
edgeDirNDC = -edgeDirNDC;
}
edgeDirNDC = normalize(edgeDirNDC);
vec2 perpNDC = vec2(-edgeDirNDC.y, edgeDirNDC.x);
// Convert line width from pixels to clip space
float lineWidthPixels = u_lineWidth;
vec2 viewportSize = czm_viewport.zw;
vec2 clipPerPixel = (2.0 / viewportSize) * currentClip.w;
vec2 offsetClip = perpNDC * lineWidthPixels * clipPerPixel * 0.5 * a_edgeOffset;
posClip.xy += offsetClip;
}
gl_Position = posClip;
}
#endif
`;var e9n=x(T(),1);var H4=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=cn.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=Nt.getNumberOfComponents(n),r=i*o,s=t.componentDatatype,a=t.quantization;l(a)&&(s=a.componentDatatype);let c=t.buffer,d=t.byteOffset,u=t.byteStride,h=K.getSizeInBytes(s),p=o*h,b=!l(u)||u===p;if(l(t.typedArray))return t.typedArray;if(b){let E=K.createTypedArray(s,r);return c.getBufferData(E,d),E}let y=new Uint8Array(c.sizeInBytes);c.getBufferData(y);let _=K.createTypedArray(s,r),S=u??p,A=new DataView(y.buffer,y.byteOffset,y.byteLength),Z=new Array(o),V=e.createComponentsReader(s);for(let E=0;E<i;++E){let L=d+E*S;V(A,L,o,Z);for(let v=0;v<o;++v)_[E*o+v]=Z[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===Nt.SCALAR)return e.dequantize1D(t,n,r,s,void 0);if(i===Nt.VEC2)return e.dequantize2D(t,n,r,s,void 0);if(i===Nt.VEC3)return e.dequantize3D(t,n,r,s,void 0);if(i===Nt.VEC4)return e.dequantize4D(t,n,r,s,void 0);throw new he(`Element type for dequantization must be SCALAR, VEC2, VEC3, or VEC4, but is ${i}`)}static octDecode(t,n,i,o){l(o)||(o=new Float32Array(t.length));let r=new m;for(let s=0;s<n;s++)m.unpack(t,s*3,r),cn.octDecodeInRange(r.x,r.y,i,r),m.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 M;for(let a=0;a<n;a++)M.unpack(t,a*2,s),M.multiplyComponents(s,i,s),M.add(s,o,s),M.pack(s,r,a*2);return r}static dequantize3D(t,n,i,o,r){l(r)||(r=new Float32Array(t.length));let s=new m;for(let a=0;a<n;a++)m.unpack(t,a*3,s),m.multiplyComponents(s,i,s),m.add(s,o,s),m.pack(s,r,a*3);return r}static dequantize4D(t,n,i,o,r){l(r)||(r=new Float32Array(t.length));let s=new se;for(let a=0;a<n;a++)se.unpack(t,a*4,s),se.multiplyComponents(s,i,s),se.add(s,o,s),se.pack(s,r,a*4);return r}static createComponentsReader(t){let n=e.createComponentReader(t),i=K.getSizeInBytes(t);return function(o,r,s,a){let c=r;for(let d=0;d<s;++d)a[d]=n(o,c),c+=i}}static createComponentReader(t){switch(t){case K.BYTE:return function(n,i){return n.getInt8(i)};case K.UNSIGNED_BYTE:return function(n,i){return n.getUint8(i)};case K.SHORT:return function(n,i){return n.getInt16(i,!0)};case K.UNSIGNED_SHORT:return function(n,i){return n.getUint16(i,!0)};case K.INT:return function(n,i){return n.getInt32(i,!0)};case K.UNSIGNED_INT:return function(n,i){return n.getUint32(i,!0)};case K.FLOAT:return function(n,i){return n.getFloat32(i,!0)};case K.DOUBLE:return function(n,i){return n.getFloat64(i,!0)}}throw new he(`The componentType must be a valid ComponentDatatype, but is ${t}`)}static transform3D(t,n,i){l(i)||(i=new Float32Array(t.length));let o=new m,r=t.length/3;for(let s=0;s<r;s++)m.unpack(t,s*3,o),F.multiplyByPoint(n,o,o),m.pack(o,i,s*3);return i}static 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===ve.TRIANGLES)return i;if(n===ve.TRIANGLE_STRIP)return e.convertTriangleStripToTriangleIndices(i);if(n===ve.TRIANGLE_FAN)return e.convertTriangleFanToTriangleIndices(i);throw new he(`The primitiveType must be TRIANGLES (${ve.TRIANGLES}, TRIANGLE_STRIP (${ve.TRIANGLE_STRIP}, or TRIANGLE_FAN (${ve.TRIANGLE_FAN}, but is ${n}`)}static convertTriangleStripToTriangleIndices(t){let n=t.constructor((t.length-2)*3);for(let i=0;i<t.length-2;i++)i%2===1?(n[i*3+0]=t[i+0],n[i*3+1]=t[i+2],n[i*3+2]=t[i+1]):(n[i*3+0]=t[i+0],n[i*3+1]=t[i+1],n[i*3+2]=t[i+2]);return n}static convertTriangleFanToTriangleIndices(t){let n=t.constructor((t.length-2)*3);for(let i=0;i<t.length-2;i++)n[i*3+0]=t[i+0],n[i*3+1]=t[i+1],n[i*3+2]=t[i+2];return n}static createIndexTypedArray(t,n){switch(t){case Me.UNSIGNED_BYTE:return new Uint8Array(n);case Me.UNSIGNED_SHORT:return new Uint16Array(n);case Me.UNSIGNED_INT:return new Uint32Array(n)}throw new he(`The indexDatatype must be UNSIGNED_BYTE (${Me.UNSIGNED_BYTE}, UNSIGNED_SHORT (${Me.UNSIGNED_SHORT}, or UNSIGNED_INT (${Me.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 h=c[u],p=e.computeNodeTransforms(h,s,t,a),b=p.computedModelMatrix;l(o)&&(b=dt.basisTo2D(o,b,b));let f=e.computeInstanceTransforms(h,b,p.nodeComputedTransform,p.modelMatrix),y=l(r)?e.computeInstanceFeatureIds(h,r):void 0,_=[];for(let A=0;A<f.length;A++)_.push({transform:f[A],featureId:l(y)?y[A]:void 0});let S=h.runtimePrimitives.length;for(let A=0;A<S;A++){let Z=h.runtimePrimitives[A];i(Z,Z.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,h=t.transformsTypedArray;if(!l(h)){let p=t.instancingTransformsBuffer;l(p)&&(h=K.createTypedArray(d,c*u),p.getBufferData(h))}l(h)?e.computeInstanceTransformsFromTypedArray(h,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=mt.getFeatureIdsByLabel(o.featureIds,n);if(!l(r))return;let s;if("setIndex"in r){let c=mt.getAttributeBySemantic(o,nt.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=mt.getAttributeBySemantic(t,_r.TRANSLATION),r=mt.getAttributeBySemantic(t,_r.ROTATION),s=mt.getAttributeBySemantic(t,_r.SCALE),a=l(o),c=l(r),d=l(s);if(!a&&!c&&!d)return;let u,h,p;a&&(u=e.readAttributeAsRawCompactTypedArray(o)),c&&(h=e.readAttributeAsRawCompactTypedArray(r)),d&&(p=e.readAttributeAsRawCompactTypedArray(s));for(let b=0;b<n;b++){let f=a?new m(u[b*3],u[b*3+1],u[b*3+2]):m.ZERO,y=c?new Pe(h[b*4],h[b*4+1],h[b*4+2],h[b*4+3]):Pe.IDENTITY,_=d?new m(p[b*3],p[b*3+1],p[b*3+2]):m.ONE,S=F.fromTranslationQuaternionRotationScale(f,y,_,new F);i.push(S)}}},la=H4;var rfe={name:"EdgeVisibilityPipelineStage"};rfe.process=function(e,t,n){if(!l(t.edgeVisibility))return;n.edgeVisibilityRequested=!0;let i=e.shaderBuilder;i.addDefine("HAS_EDGE_VISIBILITY",void 0,fe.BOTH),i.addDefine("HAS_EDGE_VISIBILITY_MRT",void 0,fe.FRAGMENT),i.addFragmentLines(F2),i.addVertexLines(I2),i.addUniform("bool","u_isEdgePass",fe.BOTH);let o=t.material,r=l(o)?o.lineStyle:void 0;(!l(r)||!l(r.width))&&i.addUniform("float","u_lineWidth",fe.VERTEX);let s=i.addAttribute("float","a_edgeType");i.addVarying("float","v_edgeType","flat");let a=i.addAttribute("float","a_edgeFeatureId"),c=i.addAttribute("vec3","a_silhouetteNormal");i.addVarying("vec3","v_silhouetteNormalView","flat");let d=i.addAttribute("vec3","a_faceNormalA"),u=i.addAttribute("vec3","a_faceNormalB");i.addVarying("vec3","v_faceNormalAView","flat"),i.addVarying("vec3","v_faceNormalBView","flat"),i.addVarying("float","v_shouldDiscard","flat");let h=i.addAttribute("vec3","a_edgeOtherPos"),p=i.addAttribute("float","a_edgeOffset");i.addVarying("float","v_edgeOffset");let b=VQe(t),f=EQe(t);if(!l(f)||!l(f.edgeIndices)||f.edgeIndices.length===0)return;let y=e.runtimePrimitive.primitive,_=GQe(y),A=f.edgeData.some(function(N){return l(N.color)})||l(_),Z;A&&(Z=i.addAttribute("vec4","a_edgeColor"),i.addVarying("vec4","v_edgeColor","flat"),i.addDefine("HAS_EDGE_COLOR_ATTRIBUTE",void 0,fe.BOTH));let V,E,L=mt.getAttributeBySemantic(t,"BENTLEY_materials_line_style:CUMULATIVE_DISTANCE");l(L)&&(V=L,E=i.addAttribute("float","a_edgeCumulativeDistance"),i.addDefine("HAS_EDGE_CUMULATIVE_DISTANCE",void 0,fe.VERTEX));let v=RQe(b,f.edgeIndices,f.edgeData,t.edgeVisibility),I=LQe(f.edgeIndices,f.edgeData,e,n.context,s,c,d,u,a,Z,h,p,_,t.edgeVisibility,v,V,E);if(!l(I))return;I.hasEdgeFeatureIds&&i.addDefine("HAS_EDGE_FEATURE_ID",void 0,fe.BOTH),e.uniformMap.u_isEdgePass=function(){return!1},l(e.uniformMap.u_lineWidth)||(e.uniformMap.u_lineWidth=function(){return 1}),l(V)&&(l(e.uniformMap.u_pixelsPerWorld)||(e.uniformMap.u_pixelsPerWorld=function(){return 1}));let X=l(r)&&l(r.width)?r.width*n.pixelRatio:void 0;e.edgeGeometry={vertexArray:I.vertexArray,indexCount:I.indexCount,primitiveType:ve.TRIANGLES,pass:Le.CESIUM_3D_TILE_EDGES,lineWidth:X}};function VQe(e){let t=e.indices;if(!l(t))return{edgeMap:new Map,faceNormals:new Float32Array(0),triangleCount:0};let n=t.typedArray,i=Math.floor(n.length/3),o=mt.getAttributeBySemantic(e,nt.POSITION),r=l(o.typedArray)?o.typedArray:la.readAttributeAsTypedArray(o),s=o.quantization;if(l(s)&&!s.octEncoded){let _=r.length,S=new Float32Array(_),A=s.quantizedVolumeOffset,Z=s.quantizedVolumeStepSize;for(let V=0;V<_;V+=3)S[V]=A.x+r[V]*Z.x,S[V+1]=A.y+r[V+1]*Z.y,S[V+2]=A.z+r[V+2]*Z.z;r=S}let a=new Map,c=new Float32Array(i*3),d=new m,u=new m,h=new m,p=new m,b=new m,f=new m;function y(_,S,A){let Z=`${_<S?_:S},${_<S?S:_}`,V=a.get(Z);l(V)||(V=[],a.set(Z,V)),V.length<2&&V.push(A)}for(let _=0;_<i;_++){let S=_*3,A=n[S],Z=n[S+1],V=n[S+2],E=A*3,L=Z*3,v=V*3;d.x=r[E],d.y=r[E+1],d.z=r[E+2],u.x=r[L],u.y=r[L+1],u.z=r[L+2],h.x=r[v],h.y=r[v+1],h.z=r[v+2],m.subtract(u,d,p),m.subtract(h,d,b),m.cross(p,b,f);let I=m.magnitudeSquared(f);I===0||!Number.isFinite(I)||(m.multiplyByScalar(f,1/Math.sqrt(I),f),c[S]=f.x,c[S+1]=f.y,c[S+2]=f.z,y(A,Z,_),y(Z,V,_),y(V,A,_))}return{edgeMap:a,faceNormals:c,triangleCount:i}}function RQe(e,t,n,i){let{edgeMap:o,faceNormals:r}=e,s=t.length/2,a=new Float32Array(s*6),c=l(i)&&l(i.silhouetteNormals),d=null;if(c){let u=i.silhouetteNormals;d=new Float32Array(u.length*3);let h=new m;for(let p=0;p<u.length;p++){let b=u[p];h.x=2*((b.x+128)/255)-1,h.y=2*((b.y+128)/255)-1,h.z=2*((b.z+128)/255)-1,m.magnitudeSquared(h)>0?m.normalize(h,h):(h.x=0,h.y=0,h.z=1),d[p*3]=h.x,d[p*3+1]=h.y,d[p*3+2]=h.z}}for(let u=0;u<s;u++){let h=t[u*2],p=t[u*2+1],b=`${h<p?h:p},${h<p?p:h}`,f=o.get(b),{edgeType:y,mateVertexIndex:_}=n[u],S,A,Z,V,E,L,v=!1;if(c&&d&&y===1&&_>=0){let X=_*2;if((X+1)*3+2<d.length){let N=X*3,g=(X+1)*3;S=d[N],A=d[N+1],Z=d[N+2],V=d[g],E=d[g+1],L=d[g+2],v=!0}}if(!v){if(!l(f)||f.length===0)continue;let N=f[0]*3;if(S=r[N],A=r[N+1],Z=r[N+2],f.length>1){let R=f[1]*3;V=r[R],E=r[R+1],L=r[R+2]}else V=-S,E=-A,L=-Z}let I=u*6;a[I]=S,a[I+1]=A,a[I+2]=Z,a[I+3]=V,a[I+4]=E,a[I+5]=L}return a}function EQe(e){let t=e.edgeVisibility;if(!l(t))return[];let n=t.visibility,i=e.indices,o=t.lineStrings,r=e.attributes,s=l(r)&&r.length>0?r[0].count:0,a=l(n)&&l(i)&&l(i.typedArray)&&i.typedArray.length>0,c=l(o)&&o.length>0;if(!a&&!c)return[];let d=a?i.typedArray:void 0,u=[],h=[],p=new Set,b=0,f=t.materialColor;if(a){let y=0,_=d.length,S=n;for(let A=0;A+2<_;A+=3){let Z=d[A],V=d[A+1],E=d[A+2];for(let L=0;L<3;L++){let v,I;L===0?(v=Z,I=V):L===1?(v=V,I=E):(v=E,I=Z);let X=Math.floor(y/4),N=y%4*2;if(y++,X>=S.length)break;let C=S[X]>>N&3;if(C===0)continue;let R=Math.min(v,I),G=Math.max(v,I),P=`${R},${G}`;if(p.has(P))continue;p.add(P),u.push(v,I);let Y=-1;C===1&&(Y=b,b++),h.push({edgeType:C,triangleIndex:Math.floor(A/3),edgeIndex:L,mateVertexIndex:Y,currentTriangleVertices:[Z,V,E],color:f})}}}if(c)for(let y=0;y<o.length;y++){let _=o[y];if(!l(_)||!l(_.indices))continue;let S=_.indices;if(!l(S)||S.length<2)continue;let A=_.restartIndex,Z=l(_.materialColor)?_.materialColor:f,V;for(let E=0;E<S.length;E++){let L=S[E];if(l(A)&&L===A){V=void 0;continue}if(!l(V)){V=L;continue}let v=V,I=L;if(V=L,v===I||s>0&&(v<0||v>=s||I<0||I>=s))continue;let X=Math.min(v,I),N=Math.max(v,I),g=`${X},${N}`;p.has(g)||(p.add(g),u.push(v,I),h.push({edgeType:2,triangleIndex:-1,edgeIndex:-1,mateVertexIndex:-1,currentTriangleVertices:void 0,color:l(Z)?Z:void 0}))}}return{edgeIndices:u,edgeData:h,silhouetteEdgeCount:b}}function GQe(e){if(!l(e))return;let t=mt.getAttributeBySemantic(e,nt.COLOR);if(!l(t))return;let n=Nt.getNumberOfComponents(t.type);if(n!==3&&n!==4)return;let i=t.typedArray;if(l(i)||(i=la.readAttributeAsTypedArray(t)),!l(i))return;let o=t.count;if(!l(o)||o===0||i.length<o*n)return;let r=i instanceof Float32Array||i instanceof Float64Array,s=i instanceof Uint8Array,a=i instanceof Uint16Array;if(!r&&!s&&!a)return;let c=new Float32Array(o*4),d=function(u){let h;return r?h=u:s?h=u/255:a&&(h=u/65535),Math.min(Math.max(h,0),1)};for(let u=0;u<o;u++){let h=u*n,p=u*4;c[p]=d(i[h]),c[p+1]=d(i[h+1]),c[p+2]=d(i[h+2]),n===4?c[p+3]=d(i[h+3]):c[p+3]=1}return{colors:c,count:o}}function LQe(e,t,n,i,o,r,s,a,c,d,u,h,p,b,f,y,_){if(!l(e)||e.length===0)return;let S=t.length,Z=S*4,V=0,E=mt.getAttributeBySemantic(n.runtimePrimitive.primitive,nt.POSITION),L=l(E.typedArray)?E.typedArray:la.readAttributeAsTypedArray(E),v=new Float32Array(Z*3),I=new Float32Array(Z),X=new Float32Array(Z*3),N=new Float32Array(Z*3),g=new Float32Array(Z*3),C=new Float32Array(Z*3),R=new Float32Array(Z),G=l(y),P=G?new Float32Array(Z):void 0,Y;G&&(Y=l(y.typedArray)?y.typedArray:la.readAttributeAsTypedArray(y));let O=l(d),k=O?new Float32Array(Z*4):void 0,D=l(p)?p.colors:void 0,w=l(p)?p.count:0;function z(ht){if(!O)return;let ot=ht*4;k[ot]=0,k[ot+1]=0,k[ot+2]=0,k[ot+3]=-1}function J(ht,ot){if(!O)return;let Jt=ht*4,jt=l(ot.x)?ot.x:ot[0],yt=l(ot.y)?ot.y:ot[1],Gt=l(ot.z)?ot.z:ot[2],ln=l(ot.w)?ot.w:l(ot[3])?ot[3]:1;k[Jt]=jt,k[Jt+1]=yt,k[Jt+2]=Gt,k[Jt+3]=ln}function ee(ht,ot){if(!O)return;if(ot>=w){z(ht);return}let Jt=ot*4,jt=ht*4;k[jt]=D[Jt],k[jt+1]=D[Jt+1],k[jt+2]=D[Jt+2],k[jt+3]=D[Jt+3]}for(let ht=0;ht<S;ht++){let ot=e[ht*2],Jt=e[ht*2+1],jt=t[ht].edgeType,yt=jt/255,Gt=L[ot*3],ln=L[ot*3+1],st=L[ot*3+2],Nn=L[Jt*3],Zi=L[Jt*3+1],Ci=L[Jt*3+2],Dt=ht*4;v[Dt*3]=Gt,v[Dt*3+1]=ln,v[Dt*3+2]=st,C[Dt*3]=Nn,C[Dt*3+1]=Zi,C[Dt*3+2]=Ci,R[Dt]=-1,I[Dt]=yt,v[(Dt+1)*3]=Gt,v[(Dt+1)*3+1]=ln,v[(Dt+1)*3+2]=st,C[(Dt+1)*3]=Nn,C[(Dt+1)*3+1]=Zi,C[(Dt+1)*3+2]=Ci,R[Dt+1]=1,I[Dt+1]=yt,v[(Dt+2)*3]=Nn,v[(Dt+2)*3+1]=Zi,v[(Dt+2)*3+2]=Ci,C[(Dt+2)*3]=Gt,C[(Dt+2)*3+1]=ln,C[(Dt+2)*3+2]=st,R[Dt+2]=1,I[Dt+2]=yt,v[(Dt+3)*3]=Nn,v[(Dt+3)*3+1]=Zi,v[(Dt+3)*3+2]=Ci,C[(Dt+3)*3]=Gt,C[(Dt+3)*3+1]=ln,C[(Dt+3)*3+2]=st,R[Dt+3]=-1,I[Dt+3]=yt;let Ro=t[ht].color;if(l(Ro))for(let wn=0;wn<4;wn++)J(Dt+wn,Ro);else if(l(D))for(let wn=0;wn<4;wn++)ee(Dt+wn,ot);else for(let wn=0;wn<4;wn++)z(Dt+wn);if(G){let wn=Y[ot],uo=Y[Jt];P[Dt]=wn,P[Dt+1]=wn,P[Dt+2]=uo,P[Dt+3]=uo}let ki=0,ri=0,kn=1;if(jt===1&&l(b.silhouetteNormals)){let wn=t[ht].mateVertexIndex;if(wn>=0&&wn<b.silhouetteNormals.length){let uo=b.silhouetteNormals[wn];l(uo)&&(ki=uo.x,ri=uo.y,kn=uo.z)}}for(let wn=0;wn<4;wn++)X[(Dt+wn)*3]=ki,X[(Dt+wn)*3+1]=ri,X[(Dt+wn)*3+2]=kn;let Yn=ht*6,Ui=f[Yn],Vi=f[Yn+1],ir=f[Yn+2],wr=f[Yn+3],Ss=f[Yn+4],Vr=f[Yn+5];for(let wn=0;wn<4;wn++)N[(Dt+wn)*3]=Ui,N[(Dt+wn)*3+1]=Vi,N[(Dt+wn)*3+2]=ir,g[(Dt+wn)*3]=wr,g[(Dt+wn)*3+1]=Ss,g[(Dt+wn)*3+2]=Vr}let H=qe.createVertexBuffer({context:i,typedArray:v,usage:Fe.STATIC_DRAW}),te=qe.createVertexBuffer({context:i,typedArray:I,usage:Fe.STATIC_DRAW}),$=qe.createVertexBuffer({context:i,typedArray:X,usage:Fe.STATIC_DRAW}),be=qe.createVertexBuffer({context:i,typedArray:N,usage:Fe.STATIC_DRAW}),ye=qe.createVertexBuffer({context:i,typedArray:g,usage:Fe.STATIC_DRAW}),ce=qe.createVertexBuffer({context:i,typedArray:C,usage:Fe.STATIC_DRAW}),Ze=qe.createVertexBuffer({context:i,typedArray:R,usage:Fe.STATIC_DRAW}),xe=O?qe.createVertexBuffer({context:i,typedArray:k,usage:Fe.STATIC_DRAW}):void 0,Ge=G?qe.createVertexBuffer({context:i,typedArray:P,usage:Fe.STATIC_DRAW}):void 0,Ye=S*2*3,ke=Z>65534,it=ke?new Uint32Array(Ye):new Uint16Array(Ye);for(let ht=0;ht<S;ht++){let ot=ht*4,Jt=ht*6;it[Jt]=ot,it[Jt+1]=ot+1,it[Jt+2]=ot+2,it[Jt+3]=ot,it[Jt+4]=ot+2,it[Jt+5]=ot+3}let pt=qe.createIndexBuffer({context:i,typedArray:it,usage:Fe.STATIC_DRAW,indexDatatype:ke?Me.UNSIGNED_INT:Me.UNSIGNED_SHORT}),Vt=[{index:V,vertexBuffer:H,componentsPerAttribute:3,componentDatatype:K.FLOAT,normalize:!1},{index:o,vertexBuffer:te,componentsPerAttribute:1,componentDatatype:K.FLOAT,normalize:!1},{index:r,vertexBuffer:$,componentsPerAttribute:3,componentDatatype:K.FLOAT,normalize:!1},{index:s,vertexBuffer:be,componentsPerAttribute:3,componentDatatype:K.FLOAT,normalize:!1},{index:a,vertexBuffer:ye,componentsPerAttribute:3,componentDatatype:K.FLOAT,normalize:!1},{index:u,vertexBuffer:ce,componentsPerAttribute:3,componentDatatype:K.FLOAT,normalize:!1},{index:h,vertexBuffer:Ze,componentsPerAttribute:1,componentDatatype:K.FLOAT,normalize:!1}];O&&Vt.push({index:d,vertexBuffer:xe,componentsPerAttribute:4,componentDatatype:K.FLOAT,normalize:!1}),G&&Vt.push({index:_,vertexBuffer:Ge,componentsPerAttribute:1,componentDatatype:K.FLOAT,normalize:!1});let Ue=n.runtimePrimitive.primitive;if(l(Ue.featureIds)&&Ue.featureIds.length>0){let ht=Ue.featureIds[0];if(l(ht.setIndex)){let ot=Ue.attributes.find(Jt=>Jt.semantic===nt.FEATURE_ID&&Jt.setIndex===ht.setIndex);if(l(ot)){let Jt=l(ot.typedArray)?ot.typedArray:la.readAttributeAsTypedArray(ot),jt=new Float32Array(Z);for(let Gt=0;Gt<S;Gt++){let ln=e[Gt*2],st=ln<Jt.length?Jt[ln]:0;for(let Nn=0;Nn<4;Nn++)jt[Gt*4+Nn]=st}let yt=qe.createVertexBuffer({context:i,typedArray:jt,usage:Fe.STATIC_DRAW});Vt.push({index:c,vertexBuffer:yt,componentsPerAttribute:1,componentDatatype:K.FLOAT,normalize:!1})}}}return{vertexArray:new Mn({context:i,attributes:Vt,indexBuffer:pt}),indexCount:Ye,hasEdgeFeatureIds:l(Ue.featureIds)&&Ue.featureIds.length>0}}var P2=rfe;var B9n=x(T(),1);var T9n=x(T(),1),X2=`void geometryStage(out ProcessedAttributes attributes)
{
attributes.positionMC = v_positionMC;
attributes.positionEC = v_positionEC;
#if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE)
attributes.positionWC = v_positionWC;
#endif
#ifdef HAS_NORMALS
// renormalize after interpolation
attributes.normalEC = normalize(v_normalEC);
#endif
#ifdef HAS_TANGENTS
attributes.tangentEC = normalize(v_tangentEC);
#endif
#ifdef HAS_BITANGENTS
attributes.bitangentEC = normalize(v_bitangentEC);
#endif
// Everything else is dynamically generated in GeometryPipelineStage
setDynamicVaryings(attributes);
}
`;var S9n=x(T(),1),N2=`vec4 geometryStage(inout ProcessedAttributes attributes, mat4 modelView, mat3 normal)
{
vec4 computedPosition;
// Compute positions in different coordinate systems
vec3 positionMC = attributes.positionMC;
v_positionMC = positionMC;
v_positionEC = (modelView * vec4(positionMC, 1.0)).xyz;
#if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)
vec3 position2D = attributes.position2D;
vec3 positionEC = (u_modelView2D * vec4(position2D, 1.0)).xyz;
computedPosition = czm_projection * vec4(positionEC, 1.0);
#else
computedPosition = czm_projection * vec4(v_positionEC, 1.0);
#endif
// Sometimes the custom shader and/or style needs this
#if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE) || defined(ENABLE_CLIPPING_POLYGONS)
// Note that this is a 32-bit position which may result in jitter on small
// scales.
v_positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;
#endif
#ifdef HAS_NORMALS
v_normalEC = normalize(normal * attributes.normalMC);
#endif
#ifdef HAS_TANGENTS
v_tangentEC = normalize(normal * attributes.tangentMC);
#endif
#ifdef HAS_BITANGENTS
v_bitangentEC = normalize(normal * attributes.bitangentMC);
#endif
// All other varyings need to be dynamically generated in
// GeometryPipelineStage
setDynamicVaryings(attributes);
return computedPosition;
}
`;var W9n=x(T(),1);var Z9n=x(T(),1),EC=`vec2 computeSt(float featureId)
{
float stepX = model_textureStep.x;
float centerX = model_textureStep.y;
#ifdef MULTILINE_BATCH_TEXTURE
float stepY = model_textureStep.z;
float centerY = model_textureStep.w;
float xId = mod(featureId, model_textureDimensions.x);
float yId = floor(featureId / model_textureDimensions.x);
return vec2(centerX + (xId * stepX), centerY + (yId * stepY));
#else
return vec2(centerX + (featureId * stepX), 0.5);
#endif
}
void selectedFeatureIdStage(out SelectedFeature feature, FeatureIds featureIds)
{
int featureId = featureIds.SELECTED_FEATURE_ID;
if (featureId < model_featuresLength)
{
vec2 featureSt = computeSt(float(featureId));
feature.id = featureId;
feature.st = featureSt;
feature.color = texture(model_batchTexture, featureSt);
}
// Floating point comparisons can be unreliable in GLSL, so we
// increment the feature ID to make sure it's always greater
// then the model_featuresLength - a condition we check for in the
// pick ID, to avoid sampling the pick texture if the feature ID is
// greater than the number of features.
else
{
feature.id = model_featuresLength + 1;
feature.st = vec2(0.0);
feature.color = vec4(1.0);
}
#ifdef HAS_NULL_FEATURE_ID
if (featureId == model_nullFeatureId) {
feature.id = featureId;
feature.st = vec2(0.0);
feature.color = vec4(1.0);
}
#endif
}
`;var Y2={name:"SelectedFeatureIdPipelineStage",STRUCT_ID_SELECTED_FEATURE:"SelectedFeature",STRUCT_NAME_SELECTED_FEATURE:"SelectedFeature"};Y2.process=function(e,t,n){let i=e.shaderBuilder;e.hasPropertyTable=!0;let o=e.model,r=e.runtimeNode.node,s=WQe(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),vQe(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===fe.BOTH&&i.addVertexLines(EC),i.addFragmentLines(EC)};function sfe(e){return e instanceof yn.FeatureIdTexture?"HAS_SELECTED_FEATURE_ID_TEXTURE":"HAS_SELECTED_FEATURE_ID_ATTRIBUTE"}function afe(e){return e instanceof yn.FeatureIdTexture?fe.FRAGMENT:fe.BOTH}function WQe(e,t,n){let i,o;return l(t.instances)&&(o=mt.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),l(o))?(i=o.label??o.positionalLabel,{featureIds:o,variableName:i,shaderDestination:afe(o),featureIdDefine:sfe(o)}):(o=mt.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),i=o.label??o.positionalLabel,{featureIds:o,variableName:i,shaderDestination:afe(o),featureIdDefine:sfe(o)})}function vQe(e){e.addStructField(Y2.STRUCT_ID_SELECTED_FEATURE,"int","id"),e.addStructField(Y2.STRUCT_ID_SELECTED_FEATURE,"vec2","st"),e.addStructField(Y2.STRUCT_ID_SELECTED_FEATURE,"vec4","color")}var Yy=Y2;var Ia={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)"};Ia.process=function(e,t,n){let{shaderBuilder:i,model:o}=e;i.addStruct(Ia.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"ProcessedAttributes",fe.VERTEX),i.addStruct(Ia.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"ProcessedAttributes",fe.FRAGMENT),i.addStruct(Yy.STRUCT_ID_SELECTED_FEATURE,Yy.STRUCT_NAME_SELECTED_FEATURE,fe.BOTH),i.addFunction(Ia.FUNCTION_ID_INITIALIZE_ATTRIBUTES,Ia.FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES,fe.VERTEX),i.addVarying("vec3","v_positionWC"),i.addVarying("vec3","v_positionEC"),i.addStructField(Ia.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionWC"),i.addStructField(Ia.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionEC"),i.addFunction(Ia.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,Ia.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,fe.VERTEX),i.addFunction(Ia.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,Ia.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,fe.FRAGMENT),o.type===Lr.TILE_PNTS&&i.addDefine("HAS_SRGB_COLOR",void 0,fe.FRAGMENT);let r=n.mode!==re.SCENE3D&&!n.scene3DOnly&&o._projectTo2D,s=l(e.runtimeNode.node.instances),a=r&&!s,c=t.attributes.length;for(let d=0;d<c;d++){let u=t.attributes[d],h=Nt.getAttributeLocationCount(u.type),p=u.semantic===nt.POSITION,b;h>1?(b=e.attributeIndex,e.attributeIndex+=h):p&&!a?b=0:b=e.attributeIndex++;let f=!p&&t.primitiveType===ve.POINTS&&n.context.webgl2?"flat":void 0;FQe(e,u,b,h,r,s,f)}UQe(i,t.attributes),t.primitiveType===ve.POINTS&&i.addDefine("PRIMITIVE_TYPE_POINTS"),i.addVertexLines(N2),i.addFragmentLines(X2)};function FQe(e,t,n,i,o,r,s){let a=e.shaderBuilder,c=mt.getAttributeInfo(t),d=o&&!r;i>1?XQe(e,t,n,i):PQe(e,t,n,d),YQe(a,c,d),NQe(a,c,s),l(t.semantic)&&IQe(a,t),wQe(a,c,o),MQe(a,c,d),kQe(a,c)}function IQe(e,t){let{semantic:n,setIndex:i}=t;switch(n){case nt.NORMAL:e.addDefine("HAS_NORMALS");break;case nt.TANGENT:e.addDefine("HAS_TANGENTS");break;case nt.FEATURE_ID:e.addDefine(`HAS${n}_${i}`);break;case nt.TEXCOORD:case nt.COLOR:e.addDefine(`HAS_${n}_${i}`)}}function PQe(e,t,n,i){let{quantization:o,semantic:r,setIndex:s}=t,{type:a,componentDatatype:c}=l(o)?o:t;r===nt.FEATURE_ID&&s>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=s+1);let d=r===nt.POSITION,u=d?0:n,h=Nt.getNumberOfComponents(a),p={index:u,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,count:t.count,componentsPerAttribute:h,componentDatatype:c,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};if(e.attributes.push(p),!d||!i)return;let b=e.runtimePrimitive.positionBuffer2D,f={index:n,vertexBuffer:b,count:t.count,componentsPerAttribute:h,componentDatatype:K.FLOAT,offsetInBytes:0,strideInBytes:void 0,normalize:t.normalized};e.attributes.push(f)}function XQe(e,t,n,i){let{quantization:o,normalized:r}=t,{type:s,componentDatatype:a}=l(o)?o:t,d=Nt.getNumberOfComponents(s)/i,u=K.getSizeInBytes(a),h=d*u,p=t.byteStride;for(let b=0;b<i;b++){let f=t.byteOffset+b*h,y={index:n+b,vertexBuffer:t.buffer,componentsPerAttribute:d,componentDatatype:a,offsetInBytes:f,strideInBytes:p,normalize:r};e.attributes.push(y)}}function NQe(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 YQe(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===nt.POSITION;a?e.setPositionAttribute(s,r):e.addAttribute(s,r),a&&n&&e.addAttribute("vec3","a_position2D")}function wQe(e,t,n){let i=Ia.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,o=Ia.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 MQe(e,t,n){let i=Ia.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 kQe(e,t){let{semantic:n,setIndex:i}=t.attribute;if(l(n)&&!l(i))return;let o=Ia.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,r=t.variableName,s=`v_${r} = attributes.${r};`;e.addFunctionLines(o,[s]),o=Ia.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,s=`attributes.${r} = v_${r};`,e.addFunctionLines(o,[s])}function UQe(e,t){let n=!1,i=!1;for(let o=0;o<t.length;o++){let r=t[o];r.semantic===nt.NORMAL?n=!0:r.semantic===nt.TANGENT&&(i=!0)}!n||!i||(e.addDefine("HAS_BITANGENTS"),e.addVarying("vec3","v_bitangentEC"),e.addStructField(Ia.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"vec3","bitangentMC"),e.addStructField(Ia.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","bitangentEC"))}var w2=Ia;var h3n=x(T(),1);var pBn=x(T(),1);var cOn=x(T(),1);var tOn=x(T(),1);var zDn=x(T(),1);var zkn=x(T(),1);var tkn=x(T(),1);var K4=new pe,J4=new pe,cfe=new m,lfe=new m,j4=class{constructor(t){Qt(this,"_rectangleSouthwestInMeters");Qt(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 li(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 M(-o,-o),this._rectangleNortheastInMeters=new M(o,o)}let{x:n,y:i}=this._rectangleSouthwestInMeters;m.fromElements(n,i,0,cfe),this._projection.unproject(cfe,K4),{x:n,y:i}=this._rectangleNortheastInMeters,m.fromElements(n,i,0,lfe),this._projection.unproject(lfe,J4),this._rectangle=new ae(K4.longitude,K4.latitude,J4.longitude,J4.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(ae.southwest(t)),r=i.project(ae.northeast(t));return l(n)?(n.west=o.x,n.south=o.y,n.east=r.x,n.north=r.y,n):new ae(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,h=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=h,o):new ae(c,p,d,h)}tileXYToRectangle(t,n,i,o){let r=this.tileXYToNativeRectangle(t,n,i,o),s=this._projection,a=s.unproject(new m(r.west,r.south)),c=s.unproject(new m(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(!ae.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 M(y,_)}},Fs=j4;var akn=x(T(),1);var Q4,dfe="AAPTarorp_WgBbyDABMqDfNsSWg..ykf3buvvbFduVL73NrRrnqBR8lO4ndPrO94nF7-3rfUWF5n3sbUe2Xe0d4rhAGa-sOTDpE-AI5kom4O4ixK3QFkTnjaGpFtDOxyrPXZUj1vRmsZAaIMZlzC5TWfBDr-RYeD9NCRMq8JwaP2Fp9blpXTqYVCWpENJLiCJ3pUlQ7XSrnJYNlPwph4B3k1FAK_j3DTlLDd2xbHwcMRbVYq8iJqt7vGuWHw3otSkmltdnNAgMaVQ366Rf0YUAT1_Hbd2aXK9",GC={};GC.defaultAccessToken=dfe;GC.defaultWorldImageryServer=new We({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"});GC.defaultWorldHillshadeServer=new We({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"});GC.defaultWorldOceanServer=new We({url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"});GC.getDefaultTokenCredit=function(e){if(e===dfe){if(!l(Q4)){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>';Q4=new bt(t,!0)}return Q4}};var hu=GC;var hkn=x(T(),1);function q4(e){e=e??B.EMPTY_OBJECT,this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;let t=We.createIfNeeded(e.missingImageUrl),n=this;function i(r){l(r.blob)&&(n._missingImageByteLength=r.blob.size);let s=Ah(r);if(e.disableCheckIfAllPixelsAreTransparent){let a=!0,c=r.width,d=e.pixelsToCheck;for(let u=0,h=d.length;a&&u<h;++u){let p=d[u],b=p.x*4+p.y*c;s[b+3]>0&&(a=!1)}a&&(s=void 0)}n._missingImagePixels=s,n._isReady=!0}function o(){n._missingImagePixels=void 0,n._isReady=!0}t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then(i).catch(o)}q4.prototype.isReady=function(){return this._isReady};q4.prototype.shouldDiscardImage=function(e){let t=this._pixelsToCheck,n=this._missingImagePixels;if(!l(n)||l(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;let i=Ah(e),o=e.width;for(let r=0,s=t.length;r<s;++r){let a=t[r],c=a.x*4+a.y*o;for(let d=0;d<4;++d){let u=c+d;if(i[u]!==n[u])return!1}}return!0};var M2=q4;var bkn=x(T(),1);function $4(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}$4.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])};$4.prototype.configureDescriptionFromProperties=function(e){function t(n){let i='<table class="cesium-infoBox-defaultTable">';for(let o in n)if(n.hasOwnProperty(o)){let r=n[o];l(r)&&(typeof r=="object"?i+=`<tr><td>${o}</td><td>${t(r)}</td></tr>`:i+=`<tr><td>${o}</td><td>${r}</td></tr>`)}return i+="</table>",i}this.description=t(e)};var ef=$4;var Skn=x(T(),1);function LC(){he.throwInstantiationError()}Object.defineProperties(LC.prototype,{rectangle:{get:he.throwInstantiationError},tileWidth:{get:he.throwInstantiationError},tileHeight:{get:he.throwInstantiationError},maximumLevel:{get:he.throwInstantiationError},minimumLevel:{get:he.throwInstantiationError},tilingScheme:{get:he.throwInstantiationError},tileDiscardPolicy:{get:he.throwInstantiationError},errorEvent:{get:he.throwInstantiationError},credit:{get:he.throwInstantiationError},proxy:{get:he.throwInstantiationError},hasAlphaChannel:{get:he.throwInstantiationError}});LC.prototype.getTileCredits=function(e,t,n){he.throwInstantiationError()};LC.prototype.requestImage=function(e,t,n,i){he.throwInstantiationError()};LC.prototype.pickFeatures=function(e,t,n,i,o){he.throwInstantiationError()};var DQe=/\.ktx2$/i;LC.loadImage=function(e,t){let n=We.createIfNeeded(t);return DQe.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 fu=LC;var Zkn=x(T(),1),ufe={SATELLITE:1,OCEANS:2,HILLSHADE:3};Object.freeze(ufe);var tf=ufe;function mfe(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 bt(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}mfe.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 M2({missingImageUrl:hfe(e,0,0,this.maximumLevel).url,pixelsToCheck:[new M(0,0),new M(200,20),new M(20,200),new M(80,110),new M(160,130)],disableCheckIfAllPixelsAreTransparent:!0}))};function OQe(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 Fs({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 le(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 li,o=e.fullExtent,r=i.unproject(new m(Math.max(o.xmin,-t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.max(o.ymin,-t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0)),s=i.unproject(new m(Math.min(o.xmax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),Math.min(o.ymax,t.tilingScheme.ellipsoid.maximumRadius*Math.PI),0));t.rectangle=new ae(r.longitude,r.latitude,s.longitude,s.latitude)}else if(e.fullExtent.spatialReference.wkid===4326)t.rectangle=ae.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 le(i)}}else t.rectangle=t.tilingScheme.rectangle;t.useTiles=!0}l(e.copyrightText)&&e.copyrightText.length>0&&(l(t.credit)?t.tileCredits=[new bt(e.copyrightText)]:t.credit=new bt(e.copyrightText))}function BQe(e,t){let n=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(n+=`: ${t.message}`),new le(n)}async function zQe(e,t){let n=e.getDerivedResource({queryParameters:{f:"json"}});try{let i=await n.fetchJson();OQe(i,t)}catch(i){BQe(e,i)}}function Zp(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 bt(t)),this.enablePickFeatures=e.enablePickFeatures??!0,this._errorEvent=new _e}Zp.fromBasemapType=async function(e,t){t=t??B.EMPTY_OBJECT;let n,i,o;switch(e){case tf.SATELLITE:{n=t.token??hu.defaultAccessToken,i=We.createIfNeeded(hu.defaultWorldImageryServer),i.appendForwardSlash();let r=hu.getDefaultTokenCredit(n);l(r)&&(o=bt.clone(r))}break;case tf.OCEANS:{n=t.token??hu.defaultAccessToken,i=We.createIfNeeded(hu.defaultWorldOceanServer),i.appendForwardSlash();let r=hu.getDefaultTokenCredit(n);l(r)&&(o=bt.clone(r))}break;case tf.HILLSHADE:{n=t.token??hu.defaultAccessToken,i=We.createIfNeeded(hu.defaultWorldHillshadeServer),i.appendForwardSlash();let r=hu.getDefaultTokenCredit(n);l(r)&&(o=bt.clone(r))}break;default:}return Zp.fromUrl(i,{...t,token:n,credit:o,usePreCachedTilesIfAvailable:!0})};function hfe(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(Zp.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}}});Zp.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 Zp(t);i._resource=n;let o=new mfe(t);return(t.usePreCachedTilesIfAvailable??!0)&&await zQe(n,o),o.build(i),i};Zp.prototype.getTileCredits=function(e,t,n){return this._tileCredits};Zp.prototype.requestImage=function(e,t,n,i){return fu.loadImage(this,hfe(this,e,t,n,i))};Zp.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 pe(i,o,0));s=p.x,a=p.y,c="3857"}let d="visible";l(this._layers)&&(d+=`:${this._layers}`);let u={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:`${s},${a}`,mapExtent:`${r.west},${r.south},${r.east},${r.north}`,imageDisplay:`${this._tileWidth},${this._tileHeight},96`,sr:c,layers:d};return this._resource.getDerivedResource({url:"identify",queryParameters:u}).fetchJson().then(function(p){let b=[],f=p.results;if(!l(f))return b;for(let y=0;y<f.length;++y){let _=f[y],S=new ef;if(S.data=_,S.name=_.value,S.properties=_.attributes,S.configureDescriptionFromProperties(_.attributes),_.geometryType==="esriGeometryPoint"&&_.geometry){let A=_.geometry.spatialReference&&_.geometry.spatialReference.wkid?_.geometry.spatialReference.wkid:4326;if(A===4326||A===4283)S.position=pe.fromDegrees(_.geometry.x,_.geometry.y,_.geometry.z);else if(A===102100||A===900913||A===3857){let Z=new li;S.position=Z.unproject(new m(_.geometry.x,_.geometry.y,_.geometry.z))}}b.push(S)}return b})};Zp._metadataCache={};var Cb=Zp;var TUn=x(T(),1);var $kn=x(T(),1);var Jkn=x(T(),1);function HQe(e){let t,n=e.name,i=e.message;l(n)&&l(i)?t=`${n}: ${i}`:t=e.toString();let o=e.stack;return l(o)&&(t+=`
${o}`),t}var Cp=HQe;function cD(e,t,n,i,o,r,s){this.provider=e,this.message=t,this.x=n,this.y=i,this.level=o,this.timesRetried=r??0,this.retry=!1,this.error=s}cD.reportError=function(e,t,n,i,o,r,s,a){let c=e;return l(e)?(c.provider=t,c.message=i,c.x=o,c.y=r,c.level=s,c.retry=!1,c.error=a,++c.timesRetried):c=new cD(t,i,o,r,s,0,a),l(n)&&n.numberOfListeners>0?n.raiseEvent(c):l(t)&&console.log(`An error occurred in "${t.constructor.name}": ${Cp(i)}`),c};cD.reportSuccess=function(e){l(e)&&(e.timesRetried=-1)};var Bo=cD;var tUn=x(T(),1),ffe={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(ffe);var WC=ffe;var oUn=x(T(),1);function k2(e){}k2.prototype.isReady=function(){return!0};k2.prototype.shouldDiscardImage=function(e){return k2.EMPTY_IMAGE===e};var lD;Object.defineProperties(k2,{EMPTY_IMAGE:{get:function(){return l(lD)||(lD=new Image,lD.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),lD}}});var vC=k2;function pfe(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}pfe.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 bt)break;o.credit=new bt(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 ae(W.toRadians(d[1]),W.toRadians(d[0]),W.toRadians(d[3]),W.toRadians(d[2]))}}};function KQe(e,t){if(e.resourceSets.length!==1)throw new le("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 JQe(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(i+=`: ${t.message}`),Bo.reportError(void 0,n,l(n)?n._errorEvent:void 0,i,void 0,void 0,void 0,t),new le(i)}async function jQe(e,t,n){let i=e.url,o=da._metadataCache[i];l(o)||(o=e.fetchJson(),da._metadataCache[i]=o);try{let r=await o;return KQe(r,t)}catch(r){JQe(e,r,n)}}function da(e){e=e??B.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=1,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._mapStyle=e.mapStyle??WC.AERIAL,this._mapLayer=e.mapLayer,this._culture=e.culture??"",this._key=e.key,this._tileDiscardPolicy=e.tileDiscardPolicy,l(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new vC),this._proxy=e.proxy,this._credit=new bt(`<a href="https://www.microsoft.com/en-us/maps/bing-maps/product"><img src="${da.logoUrl}" title="Bing Imagery"/></a>`),this._tilingScheme=new Fs({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._attributionList=void 0,this._errorEvent=new _e}Object.defineProperties(da.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},key:{get:function(){return this._key}},mapStyle:{get:function(){return this._mapStyle}},mapLayer:{get:function(){return this._mapLayer}},culture:{get:function(){return this._culture}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return l(this.mapLayer)}}});da.fromUrl=async function(e,t){t=t??B.EMPTY_OBJECT;let n=t.tileProtocol;l(n)?n.length>0&&n[n.length-1]===":"&&(n=n.substr(0,n.length-1)):n=document.location.protocol==="http:"?"http":"https";let i=t.mapStyle??WC.AERIAL,o=We.createIfNeeded(e);o.appendForwardSlash();let r={incl:"ImageryProviders",key:t.key,uriScheme:n};l(t.mapLayer)&&(r.mapLayer=t.mapLayer),l(t.culture)&&(r.culture=t.culture);let s=o.getDerivedResource({url:`REST/v1/Imagery/Metadata/${i}`,queryParameters:r}),a=new da(t);a._resource=o;let c=new pfe(t);return await jQe(s,c),c.build(a),a};var QQe=new ae;da.prototype.getTileCredits=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(e,t,n,QQe);return e8e(this._attributionList,n,i)};da.prototype.requestImage=function(e,t,n,i){let o=fu.loadImage(this,qQe(this,e,t,n,i));if(l(o))return o.catch(function(r){return l(r.blob)&&r.blob.size===0?vC.EMPTY_IMAGE:Promise.reject(r)})};da.prototype.pickFeatures=function(e,t,n,i,o){};da.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<<o,s=0;(e&r)!==0&&(s|=1),(t&r)!==0&&(s|=2),i+=s}return i};da.quadKeyToTileXY=function(e){let t=0,n=0,i=e.length-1;for(let o=i;o>=0;--o){let r=1<<o,s=+e[i-o];(s&1)!==0&&(t|=r),(s&2)!==0&&(n|=r)}return{x:t,y:n,level:i}};da._logoUrl=void 0;Object.defineProperties(da,{logoUrl:{get:function(){return l(da._logoUrl)||(da._logoUrl=Kt("Assets/Images/bing_maps_credit.png")),da._logoUrl},set:function(e){da._logoUrl=e}}});function qQe(e,t,n,i,o){let r=e._imageUrlTemplate,s=e._imageUrlSubdomains,a=(t+n+i)%s.length;return e._resource.getDerivedResource({url:r,request:o,templateValues:{quadkey:da.tileXYToQuadKey(t,n,i),subdomain:s[a],culture:e._culture},queryParameters:{n:"z"}})}var $Qe=new ae;function e8e(e,t,n){++t;let i=[];for(let o=0,r=e.length;o<r;++o){let s=e[o],a=s.coverageAreas,c=!1;for(let d=0,u=s.coverageAreas.length;!c&&d<u;++d){let h=a[d];if(t>=h.zoomMin&&t<=h.zoomMax){let p=ae.intersection(n,h.bbox,$Qe);l(p)&&(c=!0)}}c&&i.push(s.credit)}return i}da._metadataCache={};var U2=da;var QUn=x(T(),1);var XUn=x(T(),1);var bfe=/{[^}]+}/g,gfe={x:o8e,y:s8e,z:l8e,s:d8e,reverseX:r8e,reverseY:a8e,reverseZ:c8e,westDegrees:u8e,southDegrees:m8e,eastDegrees:h8e,northDegrees:f8e,westProjected:p8e,southProjected:b8e,eastProjected:g8e,northProjected:y8e,width:x8e,height:T8e},t8e=Rt(gfe,{i:_8e,j:S8e,reverseI:A8e,reverseJ:Z8e,longitudeDegrees:V8e,latitudeDegrees:R8e,longitudeProjected:E8e,latitudeProjected:G8e,format:W8e});function D2(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 Fs({ellipsoid:e.ellipsoid}),this._rectangle=e.rectangle??this._tilingScheme.rectangle,this._rectangle=ae.intersection(this._rectangle,this._tilingScheme.rectangle),this._tileDiscardPolicy=e.tileDiscardPolicy;let o=e.credit;typeof o=="string"&&(o=new bt(o)),this._credit=o,this._hasAlphaChannel=e.hasAlphaChannel??!0;let r=e.customTags,s=Rt(gfe,r),a=Rt(t8e,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(D2.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}}});D2.prototype.getTileCredits=function(e,t,n){};D2.prototype.requestImage=function(e,t,n,i){return fu.loadImage(this,n8e(this,e,t,n,i))};D2.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=i8e(s,e,t,n,i,o,d.format);return++r,d.type==="json"?u.fetchJson().then(d.callback).catch(c):d.type==="xml"?u.fetchXML().then(d.callback).catch(c):d.type==="text"||d.type==="html"?u.fetchText().then(d.callback).catch(c):u.fetch({responseType:d.format}).then(a.bind(void 0,d)).catch(c)}return c()};var dD=!1,pu=new ae,uD=!1,O2=new ae;function n8e(e,t,n,i,o){dD=!1,uD=!1;let r=e._resource,s=r.getUrlComponent(!0),a=e._tags,c={},d=s.match(bfe);return l(d)&&d.forEach(function(u){let h=u.substring(1,u.length-1);l(a[h])&&(c[h]=a[h](e,t,n,i))}),r.getDerivedResource({request:o,templateValues:c})}var eQ=!1,IC=new M,tQ=!1;function i8e(e,t,n,i,o,r,s){dD=!1,uD=!1,eQ=!1,tQ=!1;let a=e._pickFeaturesResource,c=a.getUrlComponent(!0),d=e._pickFeaturesTags,u={},h=c.match(bfe);return l(h)&&h.forEach(function(p){let b=p.substring(1,p.length-1);l(d[b])&&(u[b]=d[b](e,t,n,i,o,r,s))}),a.getDerivedResource({templateValues:u})}function PC(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 o8e(e,t,n,i){return PC(e,"{x}",t)}function r8e(e,t,n,i){let o=e.tilingScheme.getNumberOfXTilesAtLevel(i)-t-1;return PC(e,"{reverseX}",o)}function s8e(e,t,n,i){return PC(e,"{y}",n)}function a8e(e,t,n,i){let o=e.tilingScheme.getNumberOfYTilesAtLevel(i)-n-1;return PC(e,"{reverseY}",o)}function c8e(e,t,n,i){let o=e.maximumLevel,r=l(o)&&i<o?o-i-1:i;return PC(e,"{reverseZ}",r)}function l8e(e,t,n,i){return PC(e,"{z}",i)}function d8e(e,t,n,i){let o=(t+n+i)%e._subdomains.length;return e._subdomains[o]}function mD(e,t,n,i){dD||(e.tilingScheme.tileXYToRectangle(t,n,i,pu),pu.west=W.toDegrees(pu.west),pu.south=W.toDegrees(pu.south),pu.east=W.toDegrees(pu.east),pu.north=W.toDegrees(pu.north),dD=!0)}function u8e(e,t,n,i){return mD(e,t,n,i),pu.west}function m8e(e,t,n,i){return mD(e,t,n,i),pu.south}function h8e(e,t,n,i){return mD(e,t,n,i),pu.east}function f8e(e,t,n,i){return mD(e,t,n,i),pu.north}function hD(e,t,n,i){uD||(e.tilingScheme.tileXYToNativeRectangle(t,n,i,O2),uD=!0)}function p8e(e,t,n,i){return hD(e,t,n,i),O2.west}function b8e(e,t,n,i){return hD(e,t,n,i),O2.south}function g8e(e,t,n,i){return hD(e,t,n,i),O2.east}function y8e(e,t,n,i){return hD(e,t,n,i),O2.north}function x8e(e,t,n,i){return e.tileWidth}function T8e(e,t,n,i){return e.tileHeight}function _8e(e,t,n,i,o,r,s){return fD(e,t,n,i,o,r),IC.x}function S8e(e,t,n,i,o,r,s){return fD(e,t,n,i,o,r),IC.y}function A8e(e,t,n,i,o,r,s){return fD(e,t,n,i,o,r),e.tileWidth-IC.x-1}function Z8e(e,t,n,i,o,r,s){return fD(e,t,n,i,o,r),e.tileHeight-IC.y-1}var C8e=new ae,FC=new m;function fD(e,t,n,i,o,r,s){if(eQ)return;nQ(e,t,n,i,o,r);let a=FC,c=e.tilingScheme.tileXYToNativeRectangle(t,n,i,C8e);IC.x=e.tileWidth*(a.x-c.west)/c.width|0,IC.y=e.tileHeight*(c.north-a.y)/c.height|0,eQ=!0}function V8e(e,t,n,i,o,r,s){return W.toDegrees(o)}function R8e(e,t,n,i,o,r,s){return W.toDegrees(r)}function E8e(e,t,n,i,o,r,s){return nQ(e,t,n,i,o,r),FC.x}function G8e(e,t,n,i,o,r,s){return nQ(e,t,n,i,o,r),FC.y}var L8e=new pe;function nQ(e,t,n,i,o,r,s){if(!tQ){if(e.tilingScheme.projection instanceof Di)FC.x=W.toDegrees(o),FC.y=W.toDegrees(r);else{let a=L8e;a.longitude=o,a.latitude=r,e.tilingScheme.projection.project(a,FC)}tQ=!0}}function W8e(e,t,n,i,o,r,s){return s}var us=D2;function Gm(e){us.call(this,e)}Gm._requestMetadata=async function(e,t,n,i){try{let o=await n.fetchXML();return Gm._metadataSuccess(o,e,t,n,i)}catch(o){if(o instanceof ip)return Gm._metadataFailure(e,t);throw o}};Gm.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 Gm._requestMetadata(t,i,o);return new Gm(r)};l(Object.create)&&(Gm.prototype=Object.create(us.prototype),Gm.prototype.constructor=Gm);function yfe(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 xfe(e,t,n){let i=e.positionToTileXY(ae.southwest(t),n),o=e.positionToTileXY(ae.northeast(t),n);return(Math.abs(o.x-i.x)+1)*(Math.abs(o.y-i.y)+1)>4?0:n}Gm._metadataSuccess=function(e,t,n,i,o){let r=/tileformat/i,s=/tileset/i,a=/tilesets/i,c=/boundingbox/i,d,u,h,p=[],b=e.childNodes[0].childNodes;for(let I=0;I<b.length;I++)if(r.test(b.item(I).nodeName))d=b.item(I);else if(a.test(b.item(I).nodeName)){h=b.item(I);let X=b.item(I).childNodes;for(let N=0;N<X.length;N++)s.test(X.item(N).nodeName)&&p.push(X.item(N))}else c.test(b.item(I).nodeName)&&(u=b.item(I));let f;if(!l(h)||!l(u))throw f=`Unable to find expected tilesets or bbox attributes in ${i.url}.`,l(o)&&Bo.reportError(void 0,o,o.errorEvent,f),new le(f);let y=t.fileExtension??d.getAttribute("extension"),_=t.tileWidth??parseInt(d.getAttribute("width"),10),S=t.tileHeight??parseInt(d.getAttribute("height"),10),A=t.minimumLevel??parseInt(p[0].getAttribute("order"),10),Z=t.maximumLevel??parseInt(p[p.length-1].getAttribute("order"),10),V=h.getAttribute("profile"),E=t.tilingScheme;if(!l(E))if(V==="geodetic"||V==="global-geodetic")E=new zi({ellipsoid:t.ellipsoid});else if(V==="mercator"||V==="global-mercator")E=new Fs({ellipsoid:t.ellipsoid});else throw f=`${i.url} specifies an unsupported profile attribute, ${V}.`,l(o)&&Bo.reportError(void 0,o,o.errorEvent,f),new le(f);let L=ae.clone(t.rectangle);if(!l(L)){let I,X,N,g;t.flipXY??!1?(N=new M(parseFloat(u.getAttribute("miny")),parseFloat(u.getAttribute("minx"))),g=new M(parseFloat(u.getAttribute("maxy")),parseFloat(u.getAttribute("maxx")))):(N=new M(parseFloat(u.getAttribute("minx")),parseFloat(u.getAttribute("miny"))),g=new M(parseFloat(u.getAttribute("maxx")),parseFloat(u.getAttribute("maxy"))));let R=V==="geodetic"||V==="mercator";if(E.projection instanceof Di||R)I=pe.fromDegrees(N.x,N.y),X=pe.fromDegrees(g.x,g.y);else{let G=E.projection;I=G.unproject(N),X=G.unproject(g)}L=new ae(I.longitude,I.latitude,X.longitude,X.latitude)}return L=yfe(L,E),A=xfe(E,L,A),{url:n.getDerivedResource({url:`{z}/{x}/{reverseY}.${y}`}),tilingScheme:E,rectangle:L,tileWidth:_,tileHeight:S,minimumLevel:A,maximumLevel:Z,tileDiscardPolicy:t.tileDiscardPolicy,credit:t.credit}};Gm._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 Fs({ellipsoid:e.ellipsoid}),a=e.rectangle??s.rectangle;a=yfe(a,s);let c=xfe(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=Gm;var d5n=x(T(),1);function Tfe(e){this.channel=e.channel,this.ellipsoid=e.ellipsoid,this.tilingScheme=void 0,this.version=void 0}Tfe.prototype.build=function(e){e._channel=this.channel,e._version=this.version,e._tilingScheme=this.tilingScheme};function v8e(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 le(o)}if(!l(i.version)){let o=`Could not find a version in channel (id) ${t.channel}.`;throw new le(o)}if(t.version=i.version,l(n.projection)&&n.projection==="flat")t.tilingScheme=new zi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new ae(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:t.ellipsoid});else if(!l(n.projection)||n.projection==="mercator")t.tilingScheme=new Fs({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:t.ellipsoid});else{let o=`Unsupported projection ${n.projection}.`;throw new le(o)}return!0}function F8e(e,t,n){let i=`An error occurred while accessing ${t.url}.`;throw l(e)&&l(e.message)&&(i+=`: ${e.message}`),Bo.reportError(void 0,n,l(n)?n._errorEvent:void 0,i),new le(i)}async function I8e(e,t,n){try{let i=await e.fetchText();v8e(i,t)}catch(i){F8e(i,e,n)}}function vd(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 bt(`<a href="http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"><img src="${vd.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(vd.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}}});vd.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 Tfe(n);s.channel=t,await I8e(r,s);let a=new vd(n);return s.build(a),a._resource=o,a._url=e,a._path=i,a};vd.prototype.getTileCredits=function(e,t,n){};vd.prototype.requestImage=function(e,t,n,i){let o=this._resource.getDerivedResource({url:"query",request:i,queryParameters:{request:this._requestType,channel:this._channel,version:this._version,x:e,y:t,z:n+1}});return fu.loadImage(this,o)};vd.prototype.pickFeatures=function(e,t,n,i,o){};vd._logoUrl=void 0;Object.defineProperties(vd,{logoUrl:{get:function(){return l(vd._logoUrl)||(vd._logoUrl=Kt("Assets/Images/google_earth_credit.png")),vd._logoUrl},set:function(e){vd._logoUrl=e}}});var B2=vd;var g5n=x(T(),1);var P8e=/\/$/,_fe=new bt('&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 XC(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();P8e.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 bt(s))):s=_fe,this._resource=i,this._imageryProvider=new us({url:i,credit:s,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(XC.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}}});XC.prototype.getTileCredits=function(e,t,n){};XC.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};XC.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};XC._defaultCredit=_fe;var z2=XC;var G5n=x(T(),1);function Z_(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??ae.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 bt(i)),this._credit=i;let o=We.createIfNeeded(e.url);this._resource=o,this._tileWidth=e.tileWidth,this._tileHeight=e.tileHeight}Object.defineProperties(Z_.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 X8e(e,t,n,i){let o=`Failed to load image ${e.url}`;l(t)&&l(t.message)&&(o+=`: ${t.message}`);let r=Bo.reportError(i,n,l(n)?n._errorEvent:void 0,o,0,0,0,t);if(r.retry)return iQ(e,n,r);throw l(n)&&(n._hasError=!0),new le(o)}async function iQ(e,t,n){try{return await fu.loadImage(null,e)}catch(i){return X8e(e,i,t,n)}}Z_.fromUrl=async function(e,t){let n=We.createIfNeeded(e),i=await iQ(n);t=t??B.EMPTY_OBJECT;let o=new Z_({...t,url:e,tileWidth:i.width,tileHeight:i.height});return o._image=i,o};Z_.prototype.getTileCredits=function(e,t,n){};Z_.prototype.requestImage=async function(e,t,n,i){if(!this._hasError&&!l(this._image)){let o=await iQ(this._resource,this);return this._image=o,Bo.reportSuccess(this._errorEvent),o}return this._image};Z_.prototype.pickFeatures=function(e,t,n,i,o){};var H2=Z_;var $5n=x(T(),1);var P5n=x(T(),1);function N8e(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=Y8e:e==="xml"?n=U8e:(e==="html"||e==="text")&&(n=Sfe)),this.callback=n}function Y8e(e){let t=[],n=e.features;for(let i=0;i<n.length;++i){let o=n[i],r=new ef;if(r.data=o,r.properties=o.properties,r.configureNameFromProperties(o.properties),r.configureDescriptionFromProperties(o.properties),l(o.geometry)&&o.geometry.type==="Point"){let s=o.geometry.coordinates[0],a=o.geometry.coordinates[1];r.position=pe.fromDegrees(s,a)}t.push(r)}return t}var oQ="http://www.mapinfo.com/mxp",w8e="http://www.esri.com/wms",M8e="http://www.opengis.net/wfs",k8e="http://www.opengis.net/gml";function U8e(e){let t=e.documentElement;if(t.localName==="MultiFeatureCollection"&&t.namespaceURI===oQ)return D8e(e);if(t.localName==="FeatureInfoResponse"&&t.namespaceURI===w8e)return O8e(e);if(t.localName==="FeatureCollection"&&t.namespaceURI===M8e)return B8e(e);if(t.localName==="ServiceExceptionReport")throw new le(new XMLSerializer().serializeToString(t));return t.localName==="msGMLOutput"?z8e(e):H8e(e)}function D8e(e){let t=[],i=e.documentElement.getElementsByTagNameNS(oQ,"Feature");for(let o=0;o<i.length;++o){let r=i[o],s={},a=r.getElementsByTagNameNS(oQ,"Val");for(let d=0;d<a.length;++d){let u=a[d];if(u.hasAttribute("ref")){let h=u.getAttribute("ref"),p=u.textContent.trim();s[h]=p}}let c=new ef;c.data=r,c.properties=s,c.configureNameFromProperties(s),c.configureDescriptionFromProperties(s),t.push(c)}return t}function O8e(e){let t=e.documentElement,n=[],i,o=t.getElementsByTagNameNS("*","FIELDS");if(o.length>0)for(let r=0;r<o.length;++r){let s=o[r];i={};let a=s.attributes;for(let c=0;c<a.length;++c){let d=a[c];i[d.name]=d.value}n.push(pD(s,i))}else{let r=t.getElementsByTagNameNS("*","FeatureInfo");for(let s=0;s<r.length;++s){let a=r[s];i={};let c=a.childNodes;for(let d=0;d<c.length;++d){let u=c[d];u.nodeType===Node.ELEMENT_NODE&&(i[u.localName]=u.textContent)}n.push(pD(a,i))}}return n}function B8e(e){let t=[],i=e.documentElement.getElementsByTagNameNS(k8e,"featureMember");for(let o=0;o<i.length;++o){let r=i[o],s={};rQ(r,s),t.push(pD(r,s))}return t}function z8e(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 le("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={};rQ(s,a),t.push(pD(s,a))}}return t}function rQ(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()&&rQ(o,t)&&(t[o.localName]=o.textContent)}return n}function pD(e,t){let n=new ef;return n.data=e,n.properties=t,n.configureNameFromProperties(t),n.configureDescriptionFromProperties(t),n}function H8e(e){let t=new XMLSerializer().serializeToString(e),n=document.createElement("div"),i=document.createElement("pre");i.textContent=t,n.appendChild(i);let o=new ef;return o.data=e,o.description=n.innerHTML,[o]}var K8e=/<body>\s*<\/body>/im,J8e=/<ServiceExceptionReport([\s\S]*)<\/ServiceExceptionReport>/im,j8e=/<title>([\s\S]*)<\/title>/im;function Sfe(e){if(K8e.test(e)||J8e.test(e))return;let t,n=j8e.exec(e);n&&n.length>1&&(t=n[1]);let i=new ef;return i.name=t,i.description=e,i.data=e,[i]}var nf=N8e;var U5n=x(T(),1);function K2(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(K2.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)}}});K2.prototype.getFromCache=function(e,t,n,i){let o=Afe(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};K2.prototype.checkApproachingInterval=function(e,t,n,i){let o=Afe(e,t,n),r=this._tilesRequestedForInterval,s=Zfe(this),a={key:o,priorityFunction:i.priorityFunction};(!l(s)||!Cfe(this,a,s))&&r.push(a),r.length>=512&&r.splice(0,256)};K2.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=Zfe(this);if(l(r)){let s=this._tilesRequestedForInterval,a=!0;for(;a&&s.length!==0;){let c=s.pop();a=Cfe(this,c,r),a||s.push(c)}}};function Afe(e,t,n){return`${e}-${t}-${n}`}function Q8e(e){let t=e.split("-");if(t.length===3)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}function Zfe(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 Cfe(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=Q8e(s),c=new fr({throttle:!1,throttleByServer:!0,type:ks.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 C_=K2;var q8e=[3034,3035,3042,3043,3044],$8e=[4471,4559];function of(e){if(e=e??B.EMPTY_OBJECT,l(e.times)&&!l(e.clock))throw new he("options.times was specified, so options.clock is required.");this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._getFeatureInfoUrl=e.getFeatureInfoUrl??e.url;let t=We.createIfNeeded(e.url),n=We.createIfNeeded(this._getFeatureInfoUrl);t.setQueryParameters(of.DefaultParameters,!0),n.setQueryParameters(of.GetFeatureInfoDefaultParameters,!0),l(e.parameters)&&t.setQueryParameters(Vfe(e.parameters)),l(e.getFeatureInfoParameters)&&n.setQueryParameters(Vfe(e.getFeatureInfoParameters));let i=this;this._reload=void 0,l(e.times)&&(this._timeDynamicImagery=new C_({clock:e.clock,times:e.times,requestImageFunction:function(s,a,c,d,u){return Rfe(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 li?"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&&!$8e.includes(a)||q8e.includes(a))&&(o.bbox="{southProjected},{westProjected},{northProjected},{eastProjected}")}}else o.srs=e.srs??(e.tilingScheme&&e.tilingScheme.projection instanceof li?"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 us({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??of.DefaultGetFeatureInfoFormats,enablePickFeatures:e.enablePickFeatures})}function Rfe(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 e7e(e,t,n,i,o,r,s){let a=l(s)?s.data:void 0,c=e._tileProvider;return l(a)&&c._pickFeaturesResource.setQueryParameters(a),c.pickFeatures(t,n,i,o,r)}Object.defineProperties(of.prototype,{url:{get:function(){return this._resource._url}},proxy:{get:function(){return this._resource.proxy}},layers:{get:function(){return this._layers}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return this._tileProvider.hasAlphaChannel}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},getFeatureInfoUrl:{get:function(){return this._getFeatureInfoUrl}}});of.prototype.getTileCredits=function(e,t,n){return this._tileProvider.getTileCredits(e,t,n)};of.prototype.requestImage=function(e,t,n,i){let o,r=this._timeDynamicImagery,s;return l(r)&&(s=r.currentInterval,o=r.getFromCache(e,t,n,i)),l(o)||(o=Rfe(this,e,t,n,i,s)),l(o)&&l(r)&&r.checkApproachingInterval(e,t,n,i),o};of.prototype.pickFeatures=function(e,t,n,i,o){let r=this._timeDynamicImagery,s=l(r)?r.currentInterval:void 0;return e7e(this,e,t,n,i,o,s)};of.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"});of.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"});of.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new nf("json","application/json")),Object.freeze(new nf("xml","text/xml")),Object.freeze(new nf("text","text/html"))]);function Vfe(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t}var J2=of;var dDn=x(T(),1);function bu(e){e=e??B.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=void 0,this._defaultMinificationFilter=void 0,this._defaultMagnificationFilter=void 0,this._getFeatureInfoUrl=e.getFeatureInfoUrl??e.url;let t=We.createIfNeeded(e.url),n=We.createIfNeeded(this._getFeatureInfoUrl),i=e.style,o=e.tileMatrixSetID,r=t.url,s=e.format??"image/jpeg",a=r.match(/{/g);if(!l(a)||a.length===1&&/{s}/.test(r)?(t.setQueryParameters(bu.DefaultParameters,!0),this._useKvp=!0):(t.setTemplateValues(bu.DefaultParameters,!0),this._useKvp=!1),this._useKvp){n.setQueryParameters(bu.GetFeatureInfoDefaultParameters,!0),l(e.getFeatureInfoParameters)&&n.setQueryParameters(Efe(e.getFeatureInfoParameters));let u={infoformat:"{format}",i:"{i}",j:"{j}"};n.setQueryParameters(u,!0)}else n.setTemplateValues(bu.GetFeatureInfoDefaultParameters,!0),l(e.getFeatureInfoParameters)&&n.setTemplateValues(Efe(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 C_({clock:e.clock,times:e.times,requestImageFunction:function(u,h,p,b,f){return Gfe(d,u,h,p,b,f)},reloadFunction:function(){l(d._reload)&&d._reload()}})),this._errorEvent=new _e,this._tileProvider=new us({url:t,pickFeaturesUrl:n,tilingScheme:e.tilingScheme??new Fs({ellipsoid:e.ellipsoid}),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:e.getFeatureInfoFormats??bu.DefaultGetFeatureInfoFormats,enablePickFeatures:e.enablePickFeatures??(this._useKvp||l(e.getFeatureInfoUrl)),customTags:n7e(this)})}function Gfe(e,t,n,i,o,r){let s=e._tileProvider;return Lfe(e,s._resource,r),s.requestImage(t,n,i,o)}function t7e(e,t,n,i,o,r,s){let a=e._tileProvider;return Lfe(e,a._pickFeaturesResource,s),a.pickFeatures(t,n,i,o,r)}Object.defineProperties(bu.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},format:{get:function(){return this._format}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return!0}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},dimensions:{get:function(){return this._dimensions},set:function(e){this._dimensions!==e&&(this._dimensions=e,l(this._reload)&&this._reload())}},getFeatureInfoUrl:{get:function(){return this._getFeatureInfoUrl}}});bu.prototype.getTileCredits=function(e,t,n){return this._tileProvider.getTileCredits(e,t,n)};bu.prototype.requestImage=function(e,t,n,i){let o,r=this._timeDynamicImagery,s;return l(r)&&(s=r.currentInterval,o=r.getFromCache(e,t,n,i)),l(o)||(o=Gfe(this,e,t,n,i,s)),l(o)&&l(r)&&r.checkApproachingInterval(e,t,n,i),o};bu.prototype.pickFeatures=function(e,t,n,i,o){let r=this._timeDynamicImagery,s=l(r)?r.currentInterval:void 0;return t7e(this,e,t,n,i,o,s)};bu.DefaultParameters=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});bu.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetFeatureInfo"});bu.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new nf("json","application/json")),Object.freeze(new nf("xml","text/xml")),Object.freeze(new nf("text","text/html"))]);function Lfe(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=Rt(r,i)),l(o)&&(r=Rt(r,o)),t.setQueryParameters(r)}}function n7e(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 Efe(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toLowerCase()]=e[n]);return t}var j2=bu;var ZDn=x(T(),1);var fDn=x(T(),1);var NC={};NC.defaultApiKey=void 0;NC.mapTilesApiEndpoint=new We({url:"https://tile.googleapis.com/"});NC.defaultStreetViewStaticApiKey=void 0;NC.streetViewStaticApiEndpoint=new We({url:"https://maps.googleapis.com/maps/api/streetview"});NC.getDefaultCredit=function(){return new bt('<img alt="Google" src="https://assets.ion.cesium.com/google-credit.png" style="vertical-align:-6px">',!0)};var ua=NC;var Wfe=/\/$/;function Vb(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 ss?e.url:We.createIfNeeded(e.url??ua.mapTilesApiEndpoint),n=t.getUrlComponent();Wfe.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 bt(o)));let r=new us({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(Vb.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}}});Vb.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=vfe(e),i=ss._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},sQ(s,r,i)};Vb.fromUrl=async function(e){e=e??{},e.mapType=e.mapType??"satellite",e.language=e.language??"en_US",e.region=e.region??"US",e.url=e.url??ua.mapTilesApiEndpoint,e.key=e.key??ua.defaultApiKey;let t=e.overlayLayerType,n=await o7e(e);return new Vb({...n,...e,credit:e.credit??ua.getDefaultCredit()})};Vb.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};Vb.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])};Vb.prototype.pickFeatures=function(e,t,n,i,o){};Vb.prototype.getViewportCredits=async function(){let e=this._maximumLevel,t=[];for(let o=0;o<e+1;o++)t.push(i7e(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 bt(s);r.push(a)}i.set(o,r)}return this._attributionsByLevel=i,i};async function i7e(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 vfe(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 o7e(e){let{language:t,region:n,key:i,url:o}=e,r=vfe(e),s=o.url??o;Wfe.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 Q2=Vb;var vDn=x(T(),1);var r7e=/\/$/;function YC(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 ss?e.url:We.createIfNeeded(e.url??"https://atlas.microsoft.com/"),i=n.getUrlComponent();r7e.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 bt(r)));let s=new us({...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(YC.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}}});YC.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};YC.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])};YC.prototype.pickFeatures=function(e,t,n,i,o){};YC.prototype.getViewportCredits=async function(){let e=this._maximumLevel,t=[];for(let o=0;o<e+1;o++)t.push(s7e(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 bt(s);r.push(a)}i.set(o,r)}return this._attributionsByLevel=i,i};async function s7e(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 q2=YC;var a7e=async(e,t,n)=>wy.fromUrl(new ss(t,n)),c7e=async(e,{options:t})=>Cb.fromUrl(e,t),l7e=async(e,{options:t})=>U2.fromUrl(e,t),d7e=async(e,{options:t})=>{let n=t.channel;return delete t.channel,B2.fromUrl(e,n,t)},u7e=async(e,{options:t})=>new z2({url:e,...t}),m7e=async(e,{options:t})=>H2.fromUrl(e,t),h7e=async(e,{options:t})=>wy.fromUrl(e,t),f7e=async(e,{options:t})=>new us({url:e,...t}),p7e=async(e,{options:t})=>new J2({url:e,...t}),b7e=async(e,{options:t})=>new j2({url:e,...t}),sQ=async(e,t,n)=>{delete t.externalType,t.url=e;let i=new ss(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 Q2({...t.options,url:i})},g7e=async(e,t,n)=>{delete t.externalType,t.url=e;let i=new ss(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 q2({...t.options,url:i})},y7e={ARCGIS_MAPSERVER:c7e,BING:l7e,GOOGLE_EARTH:d7e,MAPBOX:u7e,SINGLE_TILE:m7e,TMS:h7e,URL_TEMPLATE:f7e,WMS:p7e,WMTS:b7e,GOOGLE_2D_MAPS:sQ,AZURE_MAPS:g7e,defaultFactoryCallback:a7e},wC=Object.freeze(y7e);function Vp(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(Vp.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(){}}});Vp.fromAssetId=async function(e,t){t=t??B.EMPTY_OBJECT;let n=ss._createEndpointResource(e,t),i=e.toString()+t.accessToken+t.server,o=Vp._endpointCache[i];l(o)||(o=n.fetchJson(),Vp._endpointCache[i]=o);let r=await o;if(r.type!=="IMAGERY")throw new le(`Cesium ion asset ${e} is not an imagery asset.`);let s=r.externalType,a=wC.defaultFactoryCallback;r=ze(r,!0),r.options=r.options??{};let c=r.options?.url;if(delete t.url,l(s)&&(a=wC[s],!l(a)))throw new le(`Unrecognized Cesium ion imagery type: ${s}`);let d=await a(c,r,n),u=new Vp(t);return d.errorEvent.addEventListener(function(h){h.provider=u,u._errorEvent.raiseEvent(h)}),u._tileCredits=ss.getCreditsFromEndpoint(r,n),u._imageryProvider=d,u};Vp.prototype.getTileCredits=function(e,t,n){let i=this._imageryProvider.getTileCredits(e,t,n);return l(i)?this._tileCredits.concat(i):this._tileCredits};Vp.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};Vp.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};Vp._endpointCache={};var Bl=Vp;var iOn=x(T(),1),Ffe={AERIAL:2,AERIAL_WITH_LABELS:3,ROAD:4};Object.freeze(Ffe);var Rb=Ffe;function x7e(e){e=e??B.EMPTY_OBJECT;let t=e.style??Rb.AERIAL;return Bl.fromAssetId(t)}var Eb=x7e;var fOn=x(T(),1);function Is(){he.throwInstantiationError()}Object.defineProperties(Is.prototype,{errorEvent:{get:he.throwInstantiationError},credit:{get:he.throwInstantiationError},tilingScheme:{get:he.throwInstantiationError},hasWaterMask:{get:he.throwInstantiationError},hasVertexNormals:{get:he.throwInstantiationError},availability:{get:he.throwInstantiationError}});var Ife=[];Is.getRegularGridIndices=function(e,t){let n=Ife[e];l(n)||(Ife[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),Yfe(e,t,i,0)),i};var Pfe=[];Is.getRegularGridIndicesAndEdgeIndices=function(e,t){let n=Pfe[e];l(n)||(Pfe[e]=n=[]);let i=n[t];if(!l(i)){let o=Is.getRegularGridIndices(e,t),r=Nfe(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 Xfe=[];Is.getRegularGridAndSkirtIndicesAndEdgeIndices=function(e,t){let n=Xfe[e];l(n)||(Xfe[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=Nfe(e,t),h=u.westIndicesSouthToNorth,p=u.southIndicesEastToWest,b=u.eastIndicesNorthToSouth,f=u.northIndicesWestToEast,y=Me.createTypedArray(c,d);Yfe(e,t,y,0),Is.addSkirtIndices(h,p,b,f,o,y,r),i=n[t]={indices:y,westIndicesSouthToNorth:h,southIndicesEastToWest:p,eastIndicesNorthToSouth:b,northIndicesWestToEast:f,indexCountWithoutSkirts:r}}return i};Is.getSkirtVertexCount=function(e,t,n,i){return e.length+t.length+n.length+i.length};Is.getSkirtIndexCount=function(e){return(e-4)*2*3};Is.getSkirtIndexCountWithFilledCorners=function(e){return((e-4)*2+4)*3};Is.addSkirtIndices=function(e,t,n,i,o,r,s){let a=o;s=bD(e,a,r,s),a+=e.length,s=bD(t,a,r,s),a+=t.length,s=bD(n,a,r,s),a+=n.length,bD(i,a,r,s)};Is.addSkirtIndicesWithFilledCorners=function(e,t,n,i,o,r,s){Is.addSkirtIndices(e,t,n,i,o,r,s);let a=Is.getSkirtVertexCount(e,t,n,i),c=Is.getSkirtIndexCount(a),d=s+c,u=e[0],h=i[0],p=n[0],b=t[0],f=o,y=f+e.length-1,_=y+1,S=_+t.length-1,A=S+1,Z=A+n.length-1,V=Z+1,E=V+i.length-1;r[d+0]=u,r[d+1]=f,r[d+2]=S,r[d+3]=b,r[d+4]=_,r[d+5]=Z,r[d+6]=p,r[d+7]=A,r[d+8]=E,r[d+9]=h,r[d+10]=V,r[d+11]=y};function Nfe(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 Yfe(e,t,n,i){let o=0;for(let r=0;r<t-1;++r){for(let s=0;s<e-1;++s){let a=o,c=a+e,d=c+1,u=a+1;n[i++]=a,n[i++]=c,n[i++]=u,n[i++]=u,n[i++]=c,n[i++]=d,++o}++o}}function bD(e,t,n,i){let o=e[0],r=e.length;for(let s=1;s<r;++s){let a=e[s];n[i++]=o,n[i++]=a,n[i++]=t,n[i++]=t,n[i++]=a,n[i++]=t+1,o=a,++t}return i}Is.heightmapTerrainQuality=.25;Is.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,n){return e.maximumRadius*2*Math.PI*Is.heightmapTerrainQuality/(t*n)};Is.prototype.requestTileGeometry=he.throwInstantiationError;Is.prototype.getLevelMaximumGeometricError=he.throwInstantiationError;Is.prototype.getTileDataAvailable=he.throwInstantiationError;Is.prototype.loadTileDataAvailability=he.throwInstantiationError;var Mo=Is;var bOn=x(T(),1),$2=`uniform sampler2D u_texture;
in vec2 v_textureCoordinates;
void main()
{
out_FragColor = texture(u_texture, v_textureCoordinates);
}
`;var yOn=x(T(),1),eI=`in vec4 position;
in float webMercatorT;
uniform vec2 u_textureDimensions;
out vec2 v_textureCoordinates;
void main()
{
v_textureCoordinates = vec2(position.x, webMercatorT);
gl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));
}
`;var COn=x(T(),1);var TOn=x(T(),1),wfe={UNLOADED:0,TRANSITIONING:1,RECEIVED:2,TEXTURE_LOADED:3,READY:4,FAILED:5,INVALID:6,PLACEHOLDER:7};Object.freeze(wfe);var Bn=wfe;function MC(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=Bn.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}MC.createPlaceholder=function(e){let t=new MC(e,0,0,0);return t.addReference(),t.state=Bn.PLACEHOLDER,t};MC.prototype.addReference=function(){++this.referenceCount};MC.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(),me(this),0):this.referenceCount};MC.prototype.processStateMachine=function(e,t,n){this.state===Bn.UNLOADED&&!n&&(this.state=Bn.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===Bn.RECEIVED&&(this.state=Bn.TRANSITIONING,this.imageryLayer._createTexture(e.context,this));let i=this.state===Bn.READY&&t&&!this.texture;(this.state===Bn.TEXTURE_LOADED||i)&&(this.state=Bn.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))};var kC=MC;var GOn=x(T(),1);function aQ(e,t,n){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=n}aQ.prototype.freeResources=function(){l(this.readyImagery)&&this.readyImagery.releaseReference(),l(this.loadingImagery)&&this.loadingImagery.releaseReference()};aQ.prototype.processStateMachine=function(e,t,n){let i=this.loadingImagery,o=i.imageryLayer;if(i.processStateMachine(t,!this.useWebMercatorT,n),i.state===Bn.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!==Bn.READY||!this.useWebMercatorT&&!l(r.texture));)r.state!==Bn.FAILED&&r.state!==Bn.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===Bn.FAILED||i.state===Bn.INVALID?l(s)?(s.processStateMachine(t,!this.useWebMercatorT,n),!1):!0:!1};var UC=aQ;function Ni(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??Ni.DEFAULT_BRIGHTNESS,this.contrast=t.contrast??e._defaultContrast??Ni.DEFAULT_CONTRAST,this.hue=t.hue??e._defaultHue??Ni.DEFAULT_HUE,this.saturation=t.saturation??e._defaultSaturation??Ni.DEFAULT_SATURATION,this.gamma=t.gamma??e._defaultGamma??Ni.DEFAULT_GAMMA,this.splitDirection=t.splitDirection??Ni.DEFAULT_SPLIT,this.minificationFilter=t.minificationFilter??e._defaultMinificationFilter??Ni.DEFAULT_MINIFICATION_FILTER,this.magnificationFilter=t.magnificationFilter??e._defaultMagnificationFilter??Ni.DEFAULT_MAGNIFICATION_FILTER,this.show=t.show??!0,this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=t.rectangle??ae.MAX_VALUE,this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new UC(kC.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??Ni.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD}Object.defineProperties(Ni.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}}});Ni.DEFAULT_BRIGHTNESS=1;Ni.DEFAULT_CONTRAST=1;Ni.DEFAULT_HUE=0;Ni.DEFAULT_SATURATION=1;Ni.DEFAULT_GAMMA=1;Ni.DEFAULT_SPLIT=Er.NONE;Ni.DEFAULT_MINIFICATION_FILTER=kt.LINEAR;Ni.DEFAULT_MAGNIFICATION_FILTER=ni.LINEAR;Ni.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004;Ni.fromProviderAsync=function(e,t){let n=new Ni(void 0,t);return Z7e(n,Promise.resolve(e)),n};Ni.fromWorldImagery=function(e){return e=e??B.EMPTY_OBJECT,Ni.fromProviderAsync(Eb({style:e.style}),e)};Ni.prototype.isBaseLayer=function(){return this._isBaseLayer};Ni.prototype.isDestroyed=function(){return!1};Ni.prototype.destroy=function(){return me(this)};var Ufe=new ae,Mfe=new ae,cQ=new ae,Dfe=new ae;Ni.prototype.getImageryRectangle=function(){let e=this._imageryProvider,t=this._rectangle;return ae.intersection(e.rectangle,t)};Ni.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 li&&e.rectangle.north<li.MaximumLatitude&&e.rectangle.south>-li.MaximumLatitude,s=ae.intersection(o.rectangle,this._rectangle,Ufe),a=ae.intersection(e.rectangle,s,Mfe);if(!l(a)){if(!this.isBaseLayer())return!1;let R=s,G=e.rectangle;a=Mfe,G.south>=R.north?a.north=a.south=R.north:G.north<=R.south?a.north=a.south=R.south:(a.south=Math.max(G.south,R.south),a.north=Math.min(G.north,R.north)),G.west>=R.east?a.west=a.east=R.east:G.east<=R.west?a.west=a.east=R.west:(a.west=Math.max(G.west,R.west),a.east=Math.min(G.east,R.east))}let c=0;a.south>0?c=a.south:a.north<0&&(c=a.north);let u=1*t.getLevelMaximumGeometricError(e.level),h=S7e(this,u,c);h=Math.max(0,h);let p=o.maximumLevel;if(h>p&&(h=p),l(o.minimumLevel)){let R=o.minimumLevel;h<R&&(h=R)}let b=o.tilingScheme,f=b.positionToTileXY(ae.northwest(a),h),y=b.positionToTileXY(ae.southeast(a),h),_=e.rectangle.width/512,S=e.rectangle.height/512,A=b.tileXYToRectangle(f.x,f.y,h);Math.abs(A.south-e.rectangle.north)<S&&f.y<y.y&&++f.y,Math.abs(A.east-e.rectangle.west)<_&&f.x<y.x&&++f.x;let Z=b.tileXYToRectangle(y.x,y.y,h);Math.abs(Z.north-e.rectangle.south)<S&&y.y>f.y&&--y.y,Math.abs(Z.west-e.rectangle.east)<_&&y.x>f.x&&--y.x;let V=ae.clone(e.rectangle,Dfe),E=b.tileXYToRectangle(f.x,f.y,h),L=ae.intersection(E,s,cQ),v;r?(b.rectangleToNativeRectangle(V,V),b.rectangleToNativeRectangle(E,E),b.rectangleToNativeRectangle(L,L),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(L.west-V.west)>=_&&(X=Math.min(1,(L.west-V.west)/V.width)),!this.isBaseLayer()&&Math.abs(L.north-V.north)>=S&&(N=Math.max(0,(L.north-V.south)/V.height));let C=N;for(let R=f.x;R<=y.x;R++)if(I=X,E=v(R,f.y,h),L=ae.simpleIntersection(E,s,cQ),!!l(L)){X=Math.min(1,(L.east-V.west)/V.width),R===y.x&&(this.isBaseLayer()||Math.abs(L.east-V.east)<_)&&(X=1),N=C;for(let G=f.y;G<=y.y;G++){if(g=N,E=v(R,G,h),L=ae.simpleIntersection(E,s,cQ),!l(L))continue;N=Math.max(0,(L.south-V.south)/V.height),G===y.y&&(this.isBaseLayer()||Math.abs(L.south-V.south)<S)&&(N=0);let P=new se(I,N,X,g),Y=this.getImageryFromCache(R,G,h);i.imagery.splice(n,0,new UC(Y,P,r)),++n}}return!0};Ni.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,Ufe),i=c.rectangleToNativeRectangle(i,Dfe)}let o=i.width,r=i.height,s=o/n.width,a=r/n.height;return new se(s*(i.west-n.west)/o,a*(i.south-n.south)/r,s,a)};Ni.prototype._requestImagery=function(e){let t=this._imageryProvider,n=this;function i(s){if(!l(s))return o();e.image=s,e.state=Bn.RECEIVED,e.request=void 0,Bo.reportSuccess(n._requestImageError)}function o(s){if(e.request.state===ui.CANCELLED){e.state=Bn.UNLOADED,e.request=void 0;return}e.state=Bn.FAILED,e.request=void 0;let a=`Failed to obtain image tile X: ${e.x} Y: ${e.y} Level: ${e.level}.`;n._requestImageError=Bo.reportError(n._requestImageError,t,t.errorEvent,a,e.x,e.y,e.level,s),n._requestImageError.retry&&r()}function r(){let s=new fr({throttle:!1,throttleByServer:!0,type:ks.IMAGERY});e.request=s,e.state=Bn.TRANSITIONING;let a=t.requestImage(e.x,e.y,e.level,s);if(!l(a)){e.state=Bn.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()};Ni.prototype._createTextureWebGL=function(e,t){let n=new Ut({minificationFilter:this.minificationFilter,magnificationFilter:this.magnificationFilter}),i=t.image;return l(i.internalFormat)?new Et({context:e,pixelFormat:i.internalFormat,width:i.width,height:i.height,source:{arrayBufferView:i.bufferView},sampler:n}):new Et({context:e,source:i,pixelFormat:this._imageryProvider.hasAlphaChannel?Ke.RGBA:Ke.RGB,sampler:n})};Ni.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=Bn.RECEIVED;return}if(r.shouldDiscardImage(i)){t.state=Bn.INVALID;return}}}let o=this._createTextureWebGL(e,t);n.tilingScheme.projection instanceof li?t.textureWebMercator=o:t.texture=o,t.image=void 0,t.state=Bn.TEXTURE_LOADED};function kfe(e,t,n){return`${e}:${t}:${n}`}Ni.prototype._finalizeReprojectTexture=function(e,t){let n=this.minificationFilter,i=this.magnificationFilter;if(n===kt.LINEAR&&i===ni.LINEAR&&!Ke.isCompressedFormat(t.pixelFormat)&&W.isPowerOfTwo(t.width)&&W.isPowerOfTwo(t.height)){n=kt.LINEAR_MIPMAP_LINEAR;let r=Lt.maximumTextureFilterAnisotropy,s=Math.min(r,this._maximumAnisotropy??r),a=kfe(n,i,s),c=e.cache.imageryLayerMipmapSamplers;l(c)||(c={},e.cache.imageryLayerMipmapSamplers=c);let d=c[a];l(d)||(d=c[a]=new Ut({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i,maximumAnisotropy:s})),t.generateMipmap(um.NICEST),t.sampler=d}else{let r=kfe(n,i,0),s=e.cache.imageryLayerNonMipmapSamplers;l(s)||(s={},e.cache.imageryLayerNonMipmapSamplers=s);let a=s[r];l(a)||(a=s[r]=new Ut({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i})),t.sampler=a}};Ni.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 xl({persists:!0,owner:this,preExecute:function(c){_7e(c,r,i,t.rectangle)},postExecute:function(c){t.texture=c,s._finalizeReprojectTexture(r,c),t.state=Bn.READY,t.releaseReference()},canceled:function(){t.state=Bn.TEXTURE_LOADED,t.releaseReference()}});this._reprojectComputeCommands.push(a)}else n&&(t.texture=i),this._finalizeReprojectTexture(r,i),t.state=Bn.READY};Ni.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};Ni.prototype.cancelReprojections=function(){this._reprojectComputeCommands.forEach(function(e){l(e.canceled)&&e.canceled()}),this._reprojectComputeCommands.length=0};Ni.prototype.getImageryFromCache=function(e,t,n,i){let o=Ofe(e,t,n),r=this._imageryCache[o];return l(r)||(r=new kC(this,e,t,n,i),this._imageryCache[o]=r),r.addReference(),r};Ni.prototype.removeImageryFromCache=function(e){let t=Ofe(e.x,e.y,e.level);delete this._imageryCache[t]};function Ofe(e,t,n){return JSON.stringify([e,t,n])}var gD={u_textureDimensions:function(){return this.textureDimensions},u_texture:function(){return this.texture},textureDimensions:new M,texture:void 0},T7e=an.supportsTypedArrays()?new Float32Array(128):void 0;function _7e(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 L=0;L<64;++L){let v=L/63;_[S++]=0,_[S++]=v,_[S++]=1,_[S++]=v}let A={position:0,webMercatorT:1},Z=Mo.getRegularGridIndices(2,64),V=qe.createIndexBuffer({context:t,typedArray:Z,usage:Fe.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT});o.vertexArray=new Mn({context:t,attributes:[{index:A.position,vertexBuffer:qe.createVertexBuffer({context:t,typedArray:_,usage:Fe.STATIC_DRAW}),componentsPerAttribute:2},{index:A.webMercatorT,vertexBuffer:qe.createVertexBuffer({context:t,sizeInBytes:512,usage:Fe.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:V});let E=new Be({sources:[eI]});o.shaderProgram=qt.fromCache({context:t,vertexShaderSource:E,fragmentShaderSource:$2,attributeLocations:A}),o.sampler=new Ut({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:kt.LINEAR,magnificationFilter:ni.LINEAR})}n.sampler=o.sampler;let r=n.width,s=n.height;gD.textureDimensions.x=r,gD.textureDimensions.y=s,gD.texture=n;let a=Math.sin(i.south),c=.5*Math.log((1+a)/(1-a));a=Math.sin(i.north);let u=1/(.5*Math.log((1+a)/(1-a))-c),h=new Et({context:t,width:r,height:s,pixelFormat:n.pixelFormat,pixelDatatype:n.pixelDatatype,preMultiplyAlpha:n.preMultiplyAlpha});W.isPowerOfTwo(r)&&W.isPowerOfTwo(s)&&h.generateMipmap(um.NICEST);let p=i.south,b=i.north,f=T7e,y=0;for(let _=0;_<64;++_){let S=_/63,A=W.lerp(p,b,S);a=Math.sin(A);let V=(.5*Math.log((1+a)/(1-a))-c)*u;f[y++]=V,f[y++]=V}o.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(f),e.shaderProgram=o.shaderProgram,e.outputTexture=h,e.uniformMap=gD,e.vertexArray=o.vertexArray}function S7e(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 A7e(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function Z7e(e,t){let n;try{if(n=await Promise.resolve(t),e.isDestroyed())return;e._imageryProvider=n,e._readyEvent.raiseEvent(n)}catch(i){A7e(e._errorEvent,i)}}var ms=Ni;var gBn=x(T(),1),lQ=class{constructor(){this.alpha=!1,this.brightness=!1,this.contrast=!1,this.hue=!1,this.saturation=!1,this.gamma=!1,this.colorToAlpha=!1}},tI=lQ;var qBn=x(T(),1);var ZBn=x(T(),1);var xBn=x(T(),1),dQ=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}},DC=dQ;var C7e=new ae,Bfe=new ae,V7e=new ae,R7e=new ae,E7e=new ae,G7e=new ae,uQ=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=ae.intersection(o.rectangle,n.rectangle,C7e),a=o.tilingScheme,c=e._computeImageryRange(t,s,a,r),d=R7e;a.rectangleToNativeRectangle(t,d);let u=E7e;a.rectangleToNativeRectangle(s,u);let h=(b,f,y)=>{let _=a.tileXYToRectangle(b,f,y),S=ae.intersection(_,s,V7e);if(!l(S))return;let A=G7e;return a.rectangleToNativeRectangle(S,A),A};return e._computeImageryCoverages(n,c,r,d,h)}static _clampImageryLevel(t,n){let i=t.minimumLevel??0,o=t.maximumLevel??Number.POSITIVE_INFINITY,r=Math.min(o-1,Math.max(i,n));return Math.floor(r)}static _computeImageryRange(t,n,i,o){let r=e._computeOverlappedRectangle(t,n),s=i.positionToTileXY(ae.northwest(r),o),a=i.positionToTileXY(ae.southeast(r),o),c=new DC;c.minX=s.x,c.minY=s.y,c.maxX=a.x,c.maxY=a.y;let d=t.width/512,u=t.height/512,h=i.tileXYToRectangle(c.minX,c.minY,o);Math.abs(h.south-t.north)<u&&c.minY<c.maxY&&++c.minY,Math.abs(h.east-t.west)<d&&c.minX<c.maxX&&++c.minX;let f=i.tileXYToRectangle(c.maxX,c.maxY,o);return Math.abs(f.north-t.south)<u&&c.maxY>c.minY&&--c.maxY,Math.abs(f.west-t.east)<d&&c.maxX>c.minX&&--c.maxX,c}static _clampRectangle(t,n,i){return l(i)||(i=new ae),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=ae.intersection(t,n,Bfe);return l(i)?i:e._clampRectangle(t,n,Bfe)}static _computeImageryCoverages(t,n,i,o,r){let s=[];for(let a=n.minX;a<=n.maxX;a++){let c=r(a,n.maxY,i);if(l(c))for(let d=n.minY;d<=n.maxY;d++){let u=r(a,d,i);if(!l(u))continue;let h=e._localizeToCartesianRectangle(u,o,void 0),p=t.getImageryFromCache(a,d,i),b=new e(a,d,i,h,p);s.push(b)}}return s}static _localizeToCartesianRectangle(t,n,i){l(i)||(i=new DC);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}},OC=uQ;var NBn=x(T(),1);var mQ=class e{static createTextureCoordinatesForMappedPositions(t,n){let i=t.cartographicPositions,o=t.cartographicBoundingRectangle,r=t.numPositions;return e._createTextureCoordinates(i,r,o,n)}static _createTextureCoordinates(t,n,i,o){let r=new Qe;Qe.fromRectangle(i,o,r);let s=e.createProjectedPositions(t,o),a=e.computeTexCoords(s,r);return e.createTypedArrayFromCartesians2(n,a)}static createTextureCoordinatesAttributeForMappedPositions(t,n){let i=e.createTextureCoordinatesForMappedPositions(t,n);return e.createTexCoordAttribute(i)}static createCartographicPositions(t,n,i){let o=la.readAttributeAsTypedArray(t),r=t.type,s=Nt.getNumberOfComponents(r),a=e.createIterableCartesian3FromTypedArray(o,s),c=e.transformCartesians3(a,n);return e.transformToCartographic(c,i)}static createIterableCartesian3FromTypedArray(t,n){let i=new m,o=t.length/n;return{[Symbol.iterator]:function*(){for(let s=0;s<o;s++)i.x=t[s*n+0],i.y=t[s*n+1],i.z=t[s*n+2],yield i}}}static map(t,n){return{[Symbol.iterator]:function*(){for(let o of t)yield n(o)}}}static computeCartographicBoundingRectangle(t,n){l(n)||(n=new ae);let i=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(let a of t)i=Math.max(i,a.latitude),o=Math.min(o,a.latitude),r=Math.max(r,a.longitude),s=Math.min(s,a.longitude);return n.north=i,n.south=o,n.east=r,n.west=s,n}static transformCartesians3(t,n){let i=new m;return e.map(t,r=>(F.multiplyByPoint(n,r,i),i))}static transformToCartographic(t,n){let i=new pe;return e.map(t,r=>(n.cartesianToCartographic(r,i),i))}static createProjectedPositions(t,n){let i=new m;return e.map(t,r=>(n.project(r,i),i))}static computeTexCoords(t,n){let i=new M,o=1/n.width,r=1/n.height;return e.map(t,a=>{let c=(a.x-n.x)*o,d=(a.y-n.y)*r,u=Math.min(Math.max(c,0),1),h=Math.min(Math.max(d,0),1);return i.x=u,i.y=h,i})}static createTypedArrayFromCartesians2(t,n){let i=new Float32Array(t*2),o=0;for(let r of n)i[o*2+0]=r.x,i[o*2+1]=r.y,o++;return i}static createTexCoordAttribute(t){return{name:"Imagery Texture Coordinates",semantic:nt.TEXCOORD,setIndex:0,componentDatatype:K.FLOAT,type:Nt.VEC2,normalized:!1,count:t.length/2,min:void 0,max:void 0,constant:new M(0,0),quantization:void 0,typedArray:t,byteOffset:0,byteStride:void 0}}},V_=mQ;var wBn=x(T(),1);var hQ=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}},nI=hQ;var fQ=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 he("Imagery layer is not part of the model");let r=this._coveragesPerLayer;if(!l(r))throw new he("The coveragesPerLayer have not been computed yet");return r[o]}update(t){let n=this._model,r=n.content.tileset.imageryLayersModificationCounter;this._lastImageryLayersModificationCounter!==r&&(delete this._mappedPositionsPerEllipsoid,this._lastImageryLayersModificationCounter=r),this._mappedPositionsNeedUpdate&&(n.resetDrawCommands(),this._mappedPositionsPerEllipsoid=this._computeMappedPositionsPerEllipsoid(),this._deleteCoveragesPerLayer(),this._destroyImageryTexCoordAttributes()),l(this._imageryTexCoordAttributesPerProjection)||(this._imageryTexCoordAttributesPerProjection=this._computeImageryTexCoordsAttributesPerProjection(),this._uploadImageryTexCoordAttributes(t.context)),l(this._coveragesPerLayer)||(this._computeCoveragesPerLayer(),this._allImageriesReady=!1),this._allImageriesReady||this._updateImageries(t)}_deleteCoveragesPerLayer(){let t=this._coveragesPerLayer;if(!l(t))return;let n=this._currentImageryLayers,i=t.length;for(let o=0;o<i;o++){let r=n[o],s=t[o];this._deleteCoverages(r,s)}delete this._currentImageryLayers,delete this._coveragesPerLayer}_deleteCoverages(t,n){if(t.isDestroyed())return;let i=n.length;for(let o=0;o<i;o++)n[o].imagery.releaseReference()}_uploadImageryTexCoordAttributes(t){let n=this._imageryTexCoordAttributesPerProjection;if(!l(n))return;let i=n.length;for(let o=0;o<i;o++){let r=n[o],s=qe.createVertexBuffer({context:t,typedArray:r.typedArray,usage:Fe.STATIC_DRAW});s.vertexArrayDestroyable=!1,r.buffer=s}}_destroyImageryTexCoordAttributes(){let t=this._imageryTexCoordAttributesPerProjection;if(!l(t))return;let n=t.length;for(let i=0;i<n;i++){let o=t[i];l(o)&&(l(o.buffer)&&(o.buffer.isDestroyed()||o.buffer.destroy()),t[i]=void 0)}delete this._imageryTexCoordAttributesPerProjection}get _mappedPositionsNeedUpdate(){if(!l(this._mappedPositionsPerEllipsoid))return!0;let t=this._model,n=this._mappedPositionsModelMatrix;return!F.equals(t.modelMatrix,n)}_computeMappedPositionsPerEllipsoid(){let t=this._model,n=this._runtimeNode,i=this._runtimePrimitive,o=e._obtainPrimitivePositionAttribute(i.primitive),r=o.count,s=e._computePrimitivePositionTransform(t,n,void 0),a=[],c=e._computeUniqueEllipsoids(t.imageryLayers),d=c.length;for(let u=0;u<d;u++){let h=c[u],p=V_.createCartographicPositions(o,s,h),b=V_.computeCartographicBoundingRectangle(p),f=new nI(p,r,b,h);a.push(f)}return F.clone(t.modelMatrix,this._mappedPositionsModelMatrix),a}static _computeUniqueEllipsoids(t){let n=new Set,i=t.length;for(let o=0;o<i;o++){let r=t.get(o),s=e._getEllipsoid(r);n.add(s)}return[...n]}_computeImageryTexCoordsAttributesPerProjection(){let n=this._model.imageryLayers,i=e._extractProjections(n),o=[...new Set(i)];return this._createImageryTexCoordAttributes(o)}static _extractProjections(t){let n=[],i=t.length;for(let o=0;o<i;o++){let r=t.get(o),s=e._getProjection(r);n.push(s)}return n}static _getProjection(t){return t.imageryProvider.tilingScheme.projection}_createImageryTexCoordAttributes(t){let n=[],i=t.length;for(let o=0;o<i;o++){let r=t[o],s=r.ellipsoid,a=this.mappedPositionsForEllipsoid(s),c=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 OC.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 OC._clampImageryLevel(i,d)}_updateImageries(t){let n=this._model,i=this._coveragesPerLayer,o=i.length,r=!0;for(let s=0;s<o;s++){let a=i[s],c=a.length;for(let d=0;d<c;d++){let h=a[d].imagery;h.state===Bn.READY||h.state===Bn.FAILED||h.state===Bn.INVALID||(r=!1,h.processStateMachine(t,!1,!1))}}r&&n.resetDrawCommands(),this._allImageriesReady=r}mappedPositionsForImageryLayer(t){let n=e._getEllipsoid(t);return this.mappedPositionsForEllipsoid(n)}mappedPositionsForEllipsoid(t){let n=this._mappedPositionsPerEllipsoid;if(!l(n))throw new he("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 he(`Could not find mapped positions for ellipsoid ${t}`)}imageryTexCoordAttributesPerProjection(){let t=this._imageryTexCoordAttributesPerProjection;if(!l(t))throw new he("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(),me(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=mt.getAttributeBySemantic(t,"POSITION");if(!l(n))throw new he("The primitive does not have a POSITION attribute");return n}static _getEllipsoid(t){return t.imageryProvider.tilingScheme.projection.ellipsoid}},R_=fQ;var e3n=x(T(),1),pQ=class{constructor(t,n,i,o,r){this.imageryLayer=t,this.texture=n,this.textureTranslationAndScale=i,this.textureCoordinateRectangle=o,this.imageryTexCoordAttributeSetIndex=r}},iI=pQ;var L7e=!1,W7e=new ae,v7e=new ae,bQ=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&&(Tt("imagery-texture-units",`Warning: Draped imagery requires ${u.length} texture units, truncating`),u.length=10),e._addImageryTexCoordAttributesToRenderResources(r,t);let h=[];for(let p=0;p<s.length;p++)h.push(s.get(p));e._processImageryInputs(h,t,u,c.length)}static _addImageryTexCoordAttributesToRenderResources(t,n){let i=t.imageryTexCoordAttributesPerProjection();for(let o of i)e._addImageryTexCoordAttributeToRenderResources(o,n)}static _addImageryTexCoordAttributeToRenderResources(t,n){let i=Nt.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,fe.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 tI;for(let i=0;i<t.length;i++){let o=t[i];n.alpha|=o.alpha!==1,n.brightness|=o.brightness!==ms.DEFAULT_BRIGHTNESS,n.contrast|=o.contrast!==ms.DEFAULT_CONTRAST,n.hue|=o.hue!==ms.DEFAULT_HUE,n.saturation|=o.saturation!==ms.DEFAULT_SATURATION,n.gamma|=o.gamma!==ms.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]",fe.FRAGMENT),t.addUniform("vec4","u_imageryTextureCoordinateRectangle[IMAGERY_TEXTURE_UNITS]",fe.FRAGMENT),t.addUniform("vec4","u_imageryTextureTranslationAndScale[IMAGERY_TEXTURE_UNITS]",fe.FRAGMENT),n.alpha&&t.addUniform("float","u_imageryTextureAlpha[IMAGERY_TEXTURE_UNITS]",fe.FRAGMENT),n.brightness&&t.addUniform("float","u_imageryTextureBrightness[IMAGERY_TEXTURE_UNITS]",fe.FRAGMENT),n.contrast&&t.addUniform("float","u_imageryTextureContrast[IMAGERY_TEXTURE_UNITS]",fe.FRAGMENT),n.hue&&t.addUniform("float","u_imageryTextureHue[IMAGERY_TEXTURE_UNITS]",fe.FRAGMENT),n.saturation&&t.addUniform("float","u_imageryTextureSaturation[IMAGERY_TEXTURE_UNITS]",fe.FRAGMENT),n.gamma&&t.addUniform("float","u_imageryTextureOneOverGamma[IMAGERY_TEXTURE_UNITS]",fe.FRAGMENT),n.colorToAlpha&&t.addUniform("vec4","u_imageryTextureColorToAlpha[IMAGERY_TEXTURE_UNITS]",fe.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,fe.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));"]),L7e&&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)",fe.FRAGMENT),t.addFunctionLines(o,["vec4 blendedBaseColor = baseColorWithAlpha;"]);for(let r=0;r<n.length;r++){let a=n[r].imageryTexCoordAttributeSetIndex,c=e._createSampleAndBlendCallArguments(i,a,r);t.addFunctionLines(o,[`blendedBaseColor = sampleAndBlend(${c});`])}t.addFunctionLines(o,["return blendedBaseColor;"])}static _createImageryUniforms(t){let n=t.length,i={};i.imageryTextures=Array(n),i.imageryTextureCoordinateRectangle=Array(n),i.imageryTextureTranslationAndScale=Array(n),i.imageryTextureAlpha=Array(n),i.imageryTextureBrightness=Array(n),i.imageryTextureContrast=Array(n),i.imageryTextureHue=Array(n),i.imageryTextureSaturation=Array(n),i.imageryTextureOneOverGamma=Array(n),i.imageryTextureColorToAlpha=Array(n);for(let o=0;o<n;o++){let r=t[o],s=r.imageryLayer,a=r.texture,c=r.textureCoordinateRectangle,d=r.textureTranslationAndScale;i.imageryTextures[o]=a,i.imageryTextureTranslationAndScale[o]=d,i.imageryTextureCoordinateRectangle[o]=c,i.imageryTextureAlpha[o]=s.alpha,i.imageryTextureBrightness[o]=s.brightness,i.imageryTextureContrast[o]=s.contrast,i.imageryTextureHue[o]=s.hue,i.imageryTextureSaturation[o]=s.saturation,i.imageryTextureOneOverGamma[o]=1/s.gamma;let u=i.imageryTextureColorToAlpha[o];if(l(u)||(u=new se,i.imageryTextureColorToAlpha[o]=u),l(s.colorToAlpha)&&s.colorToAlphaThreshold>0){let p=s.colorToAlpha;u.x=p.red,u.y=p.green,u.z=p.blue,u.w=s.colorToAlphaThreshold}else u.w=-1}return i}static _setImageryUniforms(t,n){for(let i in n)if(n.hasOwnProperty(i)){let o=`u_${i}`;t[o]=function(){return n[i]}}}static _createImageryInputs(t,n,i){let o=[];for(let r=0;r<t.length;r++){let s=t.get(r);if(!s.show)continue;let a=i[r],d=n.mappedPositionsForImageryLayer(s).cartographicBoundingRectangle,u=n.coveragesForImageryLayer(s);for(let h=0;h<u.length;h++){let p=u[h],b=e._createImageryInput(s,p,d,a);l(b)&&o.push(b)}}return o}static _createImageryInput(t,n,i,o){let r=n.imagery;if(r.state===Bn.FAILED||r.state===Bn.INVALID)return;let s=r.textureWebMercator;if(!l(s)&&(s=r.texture,!l(s))){r.state===Bn.READY&&console.log(`Imagery at ${n.x}, ${n.y} (level ${n.level}) does not have any texture - state ${r.state}`);return}let a=e._computeTextureTranslationAndScale(t,i,r.rectangle),c=n.textureCoordinateRectangle,d=new se(c.minX,c.minY,c.maxX,c.maxY);return new iI(t,s,a,d,o)}static _computeTextureTranslationAndScale(t,n,i){let o=t.imageryProvider.tilingScheme,r=o.rectangleToNativeRectangle(n,W7e),s=o.rectangleToNativeRectangle(i,v7e);return e._computeTextureTranslationAndScaleFromNative(r,s)}static _computeTextureTranslationAndScaleFromNative(t,n){let i=1/n.width,o=1/n.height,r=t.west-n.west,s=t.south-n.south,a=r*i,c=s*o,d=t.width*i,u=t.height*o;return new se(a,c,d,u)}static _computeIndexMapping(t,n){let i=[],o=t.length;for(let r=0;r<o;r++){let s=t[r],a=n.indexOf(s);i.push(a)}return i}},oI=bQ;var A3n=x(T(),1);var p3n=x(T(),1),rI=`#ifdef USE_IBL_LIGHTING
vec3 computeIBL(vec3 position, vec3 normal, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material)
{
#if defined(DIFFUSE_IBL) || defined(SPECULAR_IBL)
// Environment maps were provided, use them for IBL
vec3 viewDirection = -normalize(position);
vec3 iblColor = textureIBL(viewDirection, normal, material);
return iblColor;
#endif
return vec3(0.0);
}
#endif
#ifdef USE_CLEARCOAT
vec3 addClearcoatReflection(vec3 baseLayerColor, vec3 position, vec3 lightDirection, vec3 lightColorHdr, czm_modelMaterial material)
{
vec3 viewDirection = -normalize(position);
vec3 halfwayDirection = normalize(viewDirection + lightDirection);
vec3 normal = material.clearcoatNormal;
float NdotL = clamp(dot(normal, lightDirection), 0.001, 1.0);
// clearcoatF0 = vec3(pow((ior - 1.0) / (ior + 1.0), 2.0)), but without KHR_materials_ior, ior is a constant 1.5.
vec3 f0 = vec3(0.04);
vec3 f90 = vec3(1.0);
// Note: clearcoat Fresnel computed with dot(n, v) instead of dot(v, h).
// This is to make it energy conserving with a simple layering function.
float NdotV = clamp(dot(normal, viewDirection), 0.0, 1.0);
vec3 F = fresnelSchlick2(f0, f90, NdotV);
// compute specular reflection from direct lighting
float roughness = material.clearcoatRoughness;
float alphaRoughness = roughness * roughness;
float directStrength = computeDirectSpecularStrength(normal, lightDirection, viewDirection, halfwayDirection, alphaRoughness);
vec3 directReflection = F * directStrength * NdotL;
vec3 color = lightColorHdr * directReflection;
#ifdef SPECULAR_IBL
// Find the direction in which to sample the environment map
vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflect(-viewDirection, normal));
vec3 iblColor = computeSpecularIBL(reflectMC, NdotV, f0, roughness);
color += iblColor * material.occlusion;
#endif
float clearcoatFactor = material.clearcoatFactor;
vec3 clearcoatColor = color * clearcoatFactor;
// Dim base layer based on transmission loss through clearcoat
return baseLayerColor * (1.0 - clearcoatFactor * F) + clearcoatColor;
}
#endif
#if defined(LIGHTING_PBR) && defined(HAS_NORMALS)
vec3 computePbrLighting(in czm_modelMaterial material, in vec3 position)
{
#ifdef USE_CUSTOM_LIGHT_COLOR
vec3 lightColorHdr = model_lightColorHdr;
#else
vec3 lightColorHdr = czm_lightColorHdr;
#endif
vec3 viewDirection = -normalize(position);
vec3 normal = material.normalEC;
vec3 lightDirection = normalize(czm_lightDirectionEC);
vec3 directLighting = czm_pbrLighting(viewDirection, normal, lightDirection, material);
vec3 directColor = lightColorHdr * directLighting;
// Accumulate colors from base layer
vec3 color = directColor + material.emissive;
#ifdef USE_IBL_LIGHTING
color += computeIBL(position, normal, lightDirection, lightColorHdr, material);
#endif
#ifdef USE_CLEARCOAT
color = addClearcoatReflection(color, position, lightDirection, lightColorHdr, material);
#endif
return color;
}
#endif
/**
* Compute the material color under the current lighting conditions.
* All other material properties are passed through so further stages
* have access to them.
*
* @param {czm_modelMaterial} material The material properties from {@MaterialStageFS}
* @param {ProcessedAttributes} attributes
*/
void lightingStage(inout czm_modelMaterial material, ProcessedAttributes attributes)
{
#ifdef LIGHTING_PBR
#ifdef HAS_NORMALS
vec3 color = computePbrLighting(material, attributes.positionEC);
#else
vec3 color = material.diffuse * material.occlusion + material.emissive;
#endif
// In HDR mode, the frame buffer is in linear color space. The
// post-processing stages (see PostProcessStageCollection) will handle
// tonemapping. However, if HDR is not enabled, we must tonemap else large
// values may be clamped to 1.0
#ifndef HDR
color = czm_pbrNeutralTonemapping(color);
#endif
#else // unlit
vec3 color = material.diffuse;
#endif
#ifdef HAS_POINT_CLOUD_COLOR_STYLE
// The colors resulting from point cloud styles are adjusted differently.
color = czm_gammaCorrect(color);
#elif !defined(HDR)
// If HDR is not enabled, the frame buffer stores sRGB colors rather than
// linear colors so the linear value must be converted.
color = czm_linearToSrgb(color);
#endif
material.diffuse = color;
}
`;var g3n=x(T(),1),zfe={UNLIT:0,PBR:1};Object.freeze(zfe);var Rp=zfe;var Hfe={name:"LightingPipelineStage"};Hfe.process=function(e,t){let{model:n,lightingOptions:i,shaderBuilder:o}=e;if(l(n.lightColor)){o.addDefine("USE_CUSTOM_LIGHT_COLOR",void 0,fe.FRAGMENT),o.addUniform("vec3","model_lightColorHdr",fe.FRAGMENT);let s=e.uniformMap;s.model_lightColorHdr=function(){return n.lightColor}}let{lightingModel:r}=i;r===Rp.PBR?o.addDefine("LIGHTING_PBR",void 0,fe.FRAGMENT):o.addDefine("LIGHTING_UNLIT",void 0,fe.FRAGMENT),o.addFragmentLines(rI)};var sI=Hfe;var K3n=x(T(),1);var C3n=x(T(),1),aI=`// If the style color is white, it implies the feature has not been styled.
bool isDefaultStyleColor(vec3 color)
{
return all(greaterThan(color, vec3(1.0 - czm_epsilon3)));
}
vec3 blend(vec3 sourceColor, vec3 styleColor, float styleColorBlend)
{
vec3 blendColor = mix(sourceColor, styleColor, styleColorBlend);
vec3 color = isDefaultStyleColor(styleColor.rgb) ? sourceColor : blendColor;
return color;
}
#ifdef HAS_NORMAL_TEXTURE
vec2 getNormalTexCoords()
{
vec2 texCoord = TEXCOORD_NORMAL;
#ifdef HAS_NORMAL_TEXTURE_TRANSFORM
texCoord = czm_computeTextureTransform(texCoord, u_normalTextureTransform);
#endif
return texCoord;
}
#endif
#if defined(HAS_NORMAL_TEXTURE) || defined(HAS_CLEARCOAT_NORMAL_TEXTURE)
vec3 computeTangent(in vec3 position, in vec2 normalTexCoords)
{
vec2 tex_dx = dFdx(normalTexCoords);
vec2 tex_dy = dFdy(normalTexCoords);
float determinant = tex_dx.x * tex_dy.y - tex_dy.x * tex_dx.y;
vec3 tangent = tex_dy.t * dFdx(position) - tex_dx.t * dFdy(position);
return tangent / determinant;
}
#endif
#ifdef USE_ANISOTROPY
struct NormalInfo {
vec3 tangent;
vec3 bitangent;
vec3 normal;
vec3 geometryNormal;
};
NormalInfo getNormalInfo(ProcessedAttributes attributes)
{
vec3 geometryNormal = attributes.normalEC;
#ifdef HAS_NORMAL_TEXTURE
vec2 normalTexCoords = getNormalTexCoords();
#endif
#ifdef HAS_BITANGENTS
vec3 tangent = attributes.tangentEC;
vec3 bitangent = attributes.bitangentEC;
#else // Assume HAS_NORMAL_TEXTURE
vec3 tangent = computeTangent(attributes.positionEC, normalTexCoords);
tangent = normalize(tangent - geometryNormal * dot(geometryNormal, tangent));
vec3 bitangent = normalize(cross(geometryNormal, tangent));
#endif
#ifdef HAS_NORMAL_TEXTURE
mat3 tbn = mat3(tangent, bitangent, geometryNormal);
vec3 normalSample;
#if defined(HAS_NORMAL_CONSTANT_LOD) && defined(HAS_CONSTANT_LOD)
#ifdef HAS_NORMAL_TEXTURE_TRANSFORM
normalSample = constantLodTextureLookup(u_normalTexture, u_normalTextureConstantLodParams, u_normalTextureTransform).rgb;
#else
normalSample = constantLodTextureLookup(u_normalTexture, u_normalTextureConstantLodParams).rgb;
#endif
#else
normalSample = texture(u_normalTexture, normalTexCoords).rgb;
#endif
normalSample = 2.0 * normalSample - 1.0;
#ifdef HAS_NORMAL_TEXTURE_SCALE
normalSample.xy *= u_normalTextureScale;
#endif
vec3 normal = normalize(tbn * normalSample);
#else
vec3 normal = geometryNormal;
#endif
#ifdef HAS_DOUBLE_SIDED_MATERIAL
if (czm_backFacing()) {
tangent *= -1.0;
bitangent *= -1.0;
normal *= -1.0;
geometryNormal *= -1.0;
}
#endif
NormalInfo normalInfo;
normalInfo.tangent = tangent;
normalInfo.bitangent = bitangent;
normalInfo.normal = normal;
normalInfo.geometryNormal = geometryNormal;
return normalInfo;
}
#endif
#if defined(HAS_NORMAL_TEXTURE) && !defined(HAS_WIREFRAME)
vec3 getNormalFromTexture(ProcessedAttributes attributes, vec3 geometryNormal)
{
vec2 normalTexCoords = getNormalTexCoords();
// If HAS_BITANGENTS is set, then HAS_TANGENTS is also set
#ifdef HAS_BITANGENTS
vec3 t = attributes.tangentEC;
vec3 b = attributes.bitangentEC;
#else
vec3 t = computeTangent(attributes.positionEC, normalTexCoords);
t = normalize(t - geometryNormal * dot(geometryNormal, t));
vec3 b = normalize(cross(geometryNormal, t));
#endif
mat3 tbn = mat3(t, b, geometryNormal);
vec3 normalSample;
#if defined(HAS_NORMAL_CONSTANT_LOD) && defined(HAS_CONSTANT_LOD)
#ifdef HAS_NORMAL_TEXTURE_TRANSFORM
normalSample = constantLodTextureLookup(u_normalTexture, u_normalTextureConstantLodParams, u_normalTextureTransform).rgb;
#else
normalSample = constantLodTextureLookup(u_normalTexture, u_normalTextureConstantLodParams).rgb;
#endif
#else
normalSample = texture(u_normalTexture, normalTexCoords).rgb;
#endif
normalSample = 2.0 * normalSample - 1.0;
#ifdef HAS_NORMAL_TEXTURE_SCALE
normalSample.xy *= u_normalTextureScale;
#endif
return normalize(tbn * normalSample);
}
#endif
#ifdef HAS_CLEARCOAT_NORMAL_TEXTURE
vec3 getClearcoatNormalFromTexture(ProcessedAttributes attributes, vec3 geometryNormal)
{
vec2 normalTexCoords = TEXCOORD_CLEARCOAT_NORMAL;
#ifdef HAS_CLEARCOAT_NORMAL_TEXTURE_TRANSFORM
normalTexCoords = vec2(u_clearcoatNormalTextureTransform * vec3(normalTexCoords, 1.0));
#endif
// If HAS_BITANGENTS is set, then HAS_TANGENTS is also set
#ifdef HAS_BITANGENTS
vec3 t = attributes.tangentEC;
vec3 b = attributes.bitangentEC;
#else
vec3 t = computeTangent(attributes.positionEC, normalTexCoords);
t = normalize(t - geometryNormal * dot(geometryNormal, t));
vec3 b = normalize(cross(geometryNormal, t));
#endif
mat3 tbn = mat3(t, b, geometryNormal);
vec3 normalSample = texture(u_clearcoatNormalTexture, normalTexCoords).rgb;
normalSample = 2.0 * normalSample - 1.0;
#ifdef HAS_CLEARCOAT_NORMAL_TEXTURE_SCALE
normalSample.xy *= u_clearcoatNormalTextureScale;
#endif
return normalize(tbn * normalSample);
}
#endif
#ifdef HAS_NORMALS
vec3 computeNormal(ProcessedAttributes attributes)
{
// Geometry normal. This is already normalized
vec3 normal = attributes.normalEC;
#if defined(HAS_NORMAL_TEXTURE) && !defined(HAS_WIREFRAME)
normal = getNormalFromTexture(attributes, normal);
#endif
#ifdef HAS_DOUBLE_SIDED_MATERIAL
if (czm_backFacing()) {
normal = -normal;
}
#endif
return normal;
}
#endif
#ifdef HAS_BASE_COLOR_TEXTURE
vec4 getBaseColorFromTexture()
{
vec2 baseColorTexCoords = TEXCOORD_BASE_COLOR;
#ifdef HAS_BASE_COLOR_TEXTURE_TRANSFORM
baseColorTexCoords = czm_computeTextureTransform(baseColorTexCoords, u_baseColorTextureTransform);
#endif
vec4 baseColorWithAlpha;
#if defined(HAS_BASE_COLOR_CONSTANT_LOD) && defined(HAS_CONSTANT_LOD)
#ifdef HAS_BASE_COLOR_TEXTURE_TRANSFORM
baseColorWithAlpha = czm_srgbToLinear(constantLodTextureLookup(u_baseColorTexture, u_baseColorTextureConstantLodParams, u_baseColorTextureTransform));
#else
baseColorWithAlpha = czm_srgbToLinear(constantLodTextureLookup(u_baseColorTexture, u_baseColorTextureConstantLodParams));
#endif
#else
baseColorWithAlpha = czm_srgbToLinear(texture(u_baseColorTexture, baseColorTexCoords));
#endif
#ifdef HAS_BASE_COLOR_FACTOR
baseColorWithAlpha *= u_baseColorFactor;
#endif
return baseColorWithAlpha;
}
#endif
#ifdef HAS_EMISSIVE_TEXTURE
vec3 getEmissiveFromTexture()
{
vec2 emissiveTexCoords = TEXCOORD_EMISSIVE;
#ifdef HAS_EMISSIVE_TEXTURE_TRANSFORM
emissiveTexCoords = czm_computeTextureTransform(emissiveTexCoords, u_emissiveTextureTransform);
#endif
vec3 emissive = czm_srgbToLinear(texture(u_emissiveTexture, emissiveTexCoords).rgb);
#ifdef HAS_EMISSIVE_FACTOR
emissive *= u_emissiveFactor;
#endif
return emissive;
}
#endif
#if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)
void setSpecularGlossiness(inout czm_modelMaterial material)
{
#ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE
vec2 specularGlossinessTexCoords = TEXCOORD_SPECULAR_GLOSSINESS;
#ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE_TRANSFORM
specularGlossinessTexCoords = czm_computeTextureTransform(specularGlossinessTexCoords, u_specularGlossinessTextureTransform);
#endif
vec4 specularGlossiness = czm_srgbToLinear(texture(u_specularGlossinessTexture, specularGlossinessTexCoords));
vec3 specular = specularGlossiness.rgb;
float glossiness = specularGlossiness.a;
#ifdef HAS_LEGACY_SPECULAR_FACTOR
specular *= u_legacySpecularFactor;
#endif
#ifdef HAS_GLOSSINESS_FACTOR
glossiness *= u_glossinessFactor;
#endif
#else
#ifdef HAS_LEGACY_SPECULAR_FACTOR
vec3 specular = clamp(u_legacySpecularFactor, vec3(0.0), vec3(1.0));
#else
vec3 specular = vec3(1.0);
#endif
#ifdef HAS_GLOSSINESS_FACTOR
float glossiness = clamp(u_glossinessFactor, 0.0, 1.0);
#else
float glossiness = 1.0;
#endif
#endif
#ifdef HAS_DIFFUSE_TEXTURE
vec2 diffuseTexCoords = TEXCOORD_DIFFUSE;
#ifdef HAS_DIFFUSE_TEXTURE_TRANSFORM
diffuseTexCoords = czm_computeTextureTransform(diffuseTexCoords, u_diffuseTextureTransform);
#endif
vec4 diffuse = czm_srgbToLinear(texture(u_diffuseTexture, diffuseTexCoords));
#ifdef HAS_DIFFUSE_FACTOR
diffuse *= u_diffuseFactor;
#endif
#elif defined(HAS_DIFFUSE_FACTOR)
vec4 diffuse = clamp(u_diffuseFactor, vec4(0.0), vec4(1.0));
#else
vec4 diffuse = vec4(1.0);
#endif
material.diffuse = diffuse.rgb * (1.0 - czm_maximumComponent(specular));
// the specular glossiness extension's alpha overrides anything set
// by the base material.
material.alpha = diffuse.a;
material.specular = specular;
// glossiness is the opposite of roughness, but easier for artists to use.
material.roughness = 1.0 - glossiness;
}
#elif defined(LIGHTING_PBR)
float setMetallicRoughness(inout czm_modelMaterial material)
{
#ifdef HAS_METALLIC_ROUGHNESS_TEXTURE
vec2 metallicRoughnessTexCoords = TEXCOORD_METALLIC_ROUGHNESS;
#ifdef HAS_METALLIC_ROUGHNESS_TEXTURE_TRANSFORM
metallicRoughnessTexCoords = czm_computeTextureTransform(metallicRoughnessTexCoords, u_metallicRoughnessTextureTransform);
#endif
vec3 metallicRoughness = texture(u_metallicRoughnessTexture, metallicRoughnessTexCoords).rgb;
float metalness = clamp(metallicRoughness.b, 0.0, 1.0);
float roughness = clamp(metallicRoughness.g, 0.0, 1.0);
#ifdef HAS_METALLIC_FACTOR
metalness = clamp(metalness * u_metallicFactor, 0.0, 1.0);
#endif
#ifdef HAS_ROUGHNESS_FACTOR
roughness = clamp(roughness * u_roughnessFactor, 0.0, 1.0);
#endif
#else
#ifdef HAS_METALLIC_FACTOR
float metalness = clamp(u_metallicFactor, 0.0, 1.0);
#else
float metalness = 1.0;
#endif
#ifdef HAS_ROUGHNESS_FACTOR
float roughness = clamp(u_roughnessFactor, 0.0, 1.0);
#else
float roughness = 1.0;
#endif
#endif
// dielectrics use f0 = 0.04, metals use albedo as f0
const vec3 REFLECTANCE_DIELECTRIC = vec3(0.04);
vec3 f0 = mix(REFLECTANCE_DIELECTRIC, material.baseColor.rgb, metalness);
material.specular = f0;
// diffuse only applies to dielectrics.
material.diffuse = mix(material.baseColor.rgb, vec3(0.0), metalness);
// This is perceptual roughness. The square of this value is used for direct lighting
material.roughness = roughness;
return metalness;
}
#ifdef USE_SPECULAR
void setSpecular(inout czm_modelMaterial material, in float metalness)
{
#ifdef HAS_SPECULAR_TEXTURE
vec2 specularTexCoords = TEXCOORD_SPECULAR;
#ifdef HAS_SPECULAR_TEXTURE_TRANSFORM
specularTexCoords = czm_computeTextureTransform(specularTexCoords, u_specularTextureTransform);
#endif
float specularWeight = texture(u_specularTexture, specularTexCoords).a;
#ifdef HAS_SPECULAR_FACTOR
specularWeight *= u_specularFactor;
#endif
#else
#ifdef HAS_SPECULAR_FACTOR
float specularWeight = u_specularFactor;
#else
float specularWeight = 1.0;
#endif
#endif
#ifdef HAS_SPECULAR_COLOR_TEXTURE
vec2 specularColorTexCoords = TEXCOORD_SPECULAR_COLOR;
#ifdef HAS_SPECULAR_COLOR_TEXTURE_TRANSFORM
specularColorTexCoords = czm_computeTextureTransform(specularColorTexCoords, u_specularColorTextureTransform);
#endif
vec3 specularColorSample = texture(u_specularColorTexture, specularColorTexCoords).rgb;
vec3 specularColorFactor = czm_srgbToLinear(specularColorSample);
#ifdef HAS_SPECULAR_COLOR_FACTOR
specularColorFactor *= u_specularColorFactor;
#endif
#else
#ifdef HAS_SPECULAR_COLOR_FACTOR
vec3 specularColorFactor = u_specularColorFactor;
#else
vec3 specularColorFactor = vec3(1.0);
#endif
#endif
material.specularWeight = specularWeight;
vec3 f0 = material.specular;
vec3 dielectricSpecularF0 = min(f0 * specularColorFactor, vec3(1.0));
material.specular = mix(dielectricSpecularF0, material.baseColor.rgb, metalness);
}
#endif
#ifdef USE_ANISOTROPY
void setAnisotropy(inout czm_modelMaterial material, in NormalInfo normalInfo)
{
mat2 rotation = mat2(u_anisotropy.xy, -u_anisotropy.y, u_anisotropy.x);
float anisotropyStrength = u_anisotropy.z;
vec2 direction = vec2(1.0, 0.0);
#ifdef HAS_ANISOTROPY_TEXTURE
vec2 anisotropyTexCoords = TEXCOORD_ANISOTROPY;
#ifdef HAS_ANISOTROPY_TEXTURE_TRANSFORM
anisotropyTexCoords = czm_computeTextureTransform(anisotropyTexCoords, u_anisotropyTextureTransform);
#endif
vec3 anisotropySample = texture(u_anisotropyTexture, anisotropyTexCoords).rgb;
direction = anisotropySample.rg * 2.0 - vec2(1.0);
anisotropyStrength *= anisotropySample.b;
#endif
direction = rotation * direction;
mat3 tbn = mat3(normalInfo.tangent, normalInfo.bitangent, normalInfo.normal);
vec3 anisotropicT = tbn * normalize(vec3(direction, 0.0));
vec3 anisotropicB = cross(normalInfo.geometryNormal, anisotropicT);
material.anisotropicT = anisotropicT;
material.anisotropicB = anisotropicB;
material.anisotropyStrength = anisotropyStrength;
}
#endif
#ifdef USE_CLEARCOAT
void setClearcoat(inout czm_modelMaterial material, in ProcessedAttributes attributes)
{
#ifdef HAS_CLEARCOAT_TEXTURE
vec2 clearcoatTexCoords = TEXCOORD_CLEARCOAT;
#ifdef HAS_CLEARCOAT_TEXTURE_TRANSFORM
clearcoatTexCoords = czm_computeTextureTransform(clearcoatTexCoords, u_clearcoatTextureTransform);
#endif
float clearcoatFactor = texture(u_clearcoatTexture, clearcoatTexCoords).r;
#ifdef HAS_CLEARCOAT_FACTOR
clearcoatFactor *= u_clearcoatFactor;
#endif
#else
#ifdef HAS_CLEARCOAT_FACTOR
float clearcoatFactor = u_clearcoatFactor;
#else
// PERFORMANCE_IDEA: this case should turn the whole extension off
float clearcoatFactor = 0.0;
#endif
#endif
#ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE
vec2 clearcoatRoughnessTexCoords = TEXCOORD_CLEARCOAT_ROUGHNESS;
#ifdef HAS_CLEARCOAT_ROUGHNESS_TEXTURE_TRANSFORM
clearcoatRoughnessTexCoords = czm_computeTextureTransform(clearcoatRoughnessTexCoords, u_clearcoatRoughnessTextureTransform);
#endif
float clearcoatRoughness = texture(u_clearcoatRoughnessTexture, clearcoatRoughnessTexCoords).g;
#ifdef HAS_CLEARCOAT_ROUGHNESS_FACTOR
clearcoatRoughness *= u_clearcoatRoughnessFactor;
#endif
#else
#ifdef HAS_CLEARCOAT_ROUGHNESS_FACTOR
float clearcoatRoughness = u_clearcoatRoughnessFactor;
#else
float clearcoatRoughness = 0.0;
#endif
#endif
material.clearcoatFactor = clearcoatFactor;
// This is perceptual roughness. The square of this value is used for direct lighting
material.clearcoatRoughness = clearcoatRoughness;
#ifdef HAS_CLEARCOAT_NORMAL_TEXTURE
material.clearcoatNormal = getClearcoatNormalFromTexture(attributes, attributes.normalEC);
#else
material.clearcoatNormal = attributes.normalEC;
#endif
}
#endif
#endif
void materialStage(inout czm_modelMaterial material, ProcessedAttributes attributes, SelectedFeature feature)
{
#ifdef USE_ANISOTROPY
NormalInfo normalInfo = getNormalInfo(attributes);
material.normalEC = normalInfo.normal;
#elif defined(HAS_NORMALS)
material.normalEC = computeNormal(attributes);
#endif
vec4 baseColorWithAlpha = vec4(1.0);
// Regardless of whether we use PBR, set a base color
#ifdef HAS_BASE_COLOR_TEXTURE
baseColorWithAlpha = getBaseColorFromTexture();
#elif defined(HAS_BASE_COLOR_FACTOR)
baseColorWithAlpha = u_baseColorFactor;
#endif
#ifdef HAS_IMAGERY
baseColorWithAlpha = blendBaseColorWithImagery(baseColorWithAlpha);
#endif // HAS_IMAGERY
#ifdef HAS_POINT_CLOUD_COLOR_STYLE
baseColorWithAlpha = v_pointCloudColor;
#elif defined(HAS_COLOR_0)
vec4 color = attributes.color_0;
// .pnts files store colors in the sRGB color space
#ifdef HAS_SRGB_COLOR
color = czm_srgbToLinear(color);
#endif
baseColorWithAlpha *= color;
#endif
#ifdef USE_CPU_STYLING
baseColorWithAlpha.rgb = blend(baseColorWithAlpha.rgb, feature.color.rgb, model_colorBlend);
#endif
material.baseColor = baseColorWithAlpha;
material.diffuse = baseColorWithAlpha.rgb;
material.alpha = baseColorWithAlpha.a;
#ifdef HAS_OCCLUSION_TEXTURE
vec2 occlusionTexCoords = TEXCOORD_OCCLUSION;
#ifdef HAS_OCCLUSION_TEXTURE_TRANSFORM
occlusionTexCoords = czm_computeTextureTransform(occlusionTexCoords, u_occlusionTextureTransform);
#endif
material.occlusion = texture(u_occlusionTexture, occlusionTexCoords).r;
#endif
#ifdef HAS_EMISSIVE_TEXTURE
material.emissive = getEmissiveFromTexture();
#elif defined(HAS_EMISSIVE_FACTOR)
material.emissive = u_emissiveFactor;
#endif
#if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)
setSpecularGlossiness(material);
#elif defined(LIGHTING_PBR)
float metalness = setMetallicRoughness(material);
#ifdef USE_SPECULAR
setSpecular(material, metalness);
#endif
#ifdef USE_ANISOTROPY
setAnisotropy(material, normalInfo);
#endif
#ifdef USE_CLEARCOAT
setClearcoat(material, attributes);
#endif
#endif
}
`;var R3n=x(T(),1),cI=`#ifdef HAS_CONSTANT_LOD
// Extract model scale to compensate for minimumPixelSize scaling
float modelScaleX = length(czm_model[0].xyz);
float modelScaleY = length(czm_model[1].xyz);
float modelScaleZ = length(czm_model[2].xyz);
float modelScale = (modelScaleX + modelScaleY + modelScaleZ) / 3.0;
// Transform model position through ENU but as direction only (w=0) to avoid position-dependent rotation
vec3 enuDir = (u_constantLodWorldToEnu * czm_model * vec4(v_positionMC, 0.0)).xyz;
v_constantLodUvCustom.xy = (enuDir.yx + u_constantLodOffset) / modelScale;
v_constantLodUvCustom.z = u_constantLodDistance / modelScale;
#endif`;var G3n=x(T(),1),lI=`#ifdef HAS_CONSTANT_LOD
vec4 constantLodTextureLookup(sampler2D textureSampler, vec3 constantLodParams) {
bool atMaxClamp = v_constantLodUvCustom.z >= constantLodParams.y;
bool atMinClamp = v_constantLodUvCustom.z <= constantLodParams.x;
bool atClampBoundary = atMaxClamp || atMinClamp;
float effectiveDistance = atMaxClamp ? constantLodParams.y :
(atMinClamp ? constantLodParams.x : v_constantLodUvCustom.z);
float logDepth = log2(effectiveDistance);
logDepth = clamp(logDepth, -10.0, 20.0);
float f = fract(logDepth);
float p = floor(logDepth);
if (atClampBoundary) {
float clampedP = ceil(logDepth);
vec2 tc = v_constantLodUvCustom.xy / pow(2.0, clampedP) * constantLodParams.z;
return texture(textureSampler, tc);
}
vec2 tc1 = v_constantLodUvCustom.xy / pow(2.0, p) * constantLodParams.z;
vec2 tc2 = v_constantLodUvCustom.xy / pow(2.0, p + 1.0) * constantLodParams.z;
return mix(texture(textureSampler, tc1), texture(textureSampler, tc2), f);
}
vec4 constantLodTextureLookup(sampler2D textureSampler, vec3 constantLodParams, mat3 textureTransform) {
bool atMaxClamp = v_constantLodUvCustom.z >= constantLodParams.y;
bool atMinClamp = v_constantLodUvCustom.z <= constantLodParams.x;
bool atClampBoundary = atMaxClamp || atMinClamp;
float effectiveDistance = atMaxClamp ? constantLodParams.y :
(atMinClamp ? constantLodParams.x : v_constantLodUvCustom.z);
float logDepth = log2(effectiveDistance);
logDepth = clamp(logDepth, -10.0, 20.0);
float f = fract(logDepth);
float p = floor(logDepth);
if (atClampBoundary) {
float clampedP = ceil(logDepth);
vec2 tc = v_constantLodUvCustom.xy / pow(2.0, clampedP) * constantLodParams.z;
// Apply texture transform to the final texture coordinates
tc = czm_computeTextureTransform(tc, textureTransform);
return texture(textureSampler, tc);
}
vec2 tc1 = v_constantLodUvCustom.xy / pow(2.0, p) * constantLodParams.z;
vec2 tc2 = v_constantLodUvCustom.xy / pow(2.0, p + 1.0) * constantLodParams.z;
// Apply texture transform to both LOD texture coordinates before mixing
tc1 = czm_computeTextureTransform(tc1, textureTransform);
tc2 = czm_computeTextureTransform(tc2, textureTransform);
return mix(texture(textureSampler, tc1), texture(textureSampler, tc2), f);
}
#endif
`;var{Material:F7e,MetallicRoughness:gQ,SpecularGlossiness:yQ,Specular:Kfe,Clearcoat:Jfe}=yn,jfe={name:"MaterialPipelineStage",_processTexture:Fd,_processTextureTransform:Qfe};jfe.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 Z=m.distance(A.positionWC,S.center);return Math.max(Z,.1)}return 1});let a=l(o.classificationType),c=a,{defaultTexture:d,defaultNormalTexture:u,defaultEmissiveTexture:h}=n.context;N7e(i,r,s,d,u,h,c,e),l(i.specularGlossiness)?Y7e(i.specularGlossiness,r,s,d,c,e):(l(i.specular)&&mt.supportedExtensions.KHR_materials_specular&&w7e(i.specular,r,s,d,c),l(i.anisotropy)&&mt.supportedExtensions.KHR_materials_anisotropy&&k7e(i.anisotropy,r,s,d,c),l(i.clearcoat)&&mt.supportedExtensions.KHR_materials_clearcoat&&U7e(i.clearcoat,r,s,d,c),D7e(i.metallicRoughness,r,s,d,c,e));let p=mt.getAttributeBySemantic(t,nt.NORMAL),b=l(o.pointCloudShading)&&!o.pointCloudShading.normalShading,f=e.lightingOptions;i.unlit||!p||a||b?f.lightingModel=Rp.UNLIT:f.lightingModel=Rp.PBR;let y=o.backFaceCulling&&!i.doubleSided;e.renderStateOptions.cull.enabled=y;let _=e.alphaOptions;i.alphaMode===_p.BLEND?_.pass=Le.TRANSLUCENT:i.alphaMode===_p.MASK&&(_.alphaCutoff=i.alphaCutoff),l(i.pointDiameter)&&(s.addDefine("HAS_POINT_DIAMETER",void 0,fe.BOTH),s.addUniform("float","u_pointDiameter",fe.VERTEX),r.u_pointDiameter=function(){return i.pointDiameter*n.pixelRatio}),l(i.lineStyle)&&P7e(i.lineStyle,t,n,r,s),s.addFragmentLines(aI),i.doubleSided&&s.addDefine("HAS_DOUBLE_SIDED_MATERIAL",void 0,fe.BOTH)};function I7e(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,fe.BOTH),!l(t.u_constantLodOffset)){e.addDefine("HAS_CONSTANT_LOD",void 0,fe.BOTH),e.addVarying("vec3","v_constantLodUvCustom"),e.addUniform("vec2","u_constantLodOffset",fe.VERTEX),e.addUniform("float","u_constantLodDistance",fe.VERTEX),e.addUniform("mat4","u_constantLodWorldToEnu",fe.VERTEX),e.addFragmentLines(lI);let d=cI.split(`
`).filter(u=>!u.trim().startsWith("//")||u.includes("#"));e.addFunctionLines("setDynamicVaryingsVS",d)}let c=`${i}ConstantLodParams`;if(e.addUniform("vec3",c,fe.FRAGMENT),t[c]=function(){return new m(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 h=r.model.boundingSphere;if(l(h)){let p=h.center,b=dt.eastNorthUpToFixedFrame(p);F.inverse(b,d),u=!0}}return u?d:F.IDENTITY}}}function P7e(e,t,n,i,o){let{width:r,pattern:s}=e;l(r)&&(o.addUniform("float","u_lineWidth",fe.VERTEX),i.u_lineWidth=function(){return r*n.pixelRatio}),l(s)&&(o.addDefine("HAS_LINE_PATTERN",void 0,fe.BOTH),o.addUniform("float","u_linePattern",fe.FRAGMENT),o.addVarying("float","v_lineCoord"),i.u_linePattern=function(){return s});let a=mt.getAttributeBySemantic(t,nt.CUMULATIVE_DISTANCE);if(l(s)&&l(a)&&(t.primitiveType===ve.LINES||t.primitiveType===ve.TRIANGLE_STRIP)){o.addDefine("HAS_LINE_CUMULATIVE_DISTANCE",void 0,fe.VERTEX),a.normalized&&o.addDefine("LINE_CUM_DIST_NORMALIZED",void 0,fe.VERTEX),o.addUniform("float","u_cumulativeDistanceMax",fe.VERTEX),o.addUniform("float","u_pixelsPerWorld",fe.VERTEX);let c=l(a.max)?a.max:1;i.u_cumulativeDistanceMax=function(){return c},i.u_pixelsPerWorld=function(){let u=n.camera.frustum,h=1,p;return l(u.right)&&l(u.left)?p=u.right-u.left:l(u.width)&&(p=u.width),l(p)&&p>0&&(h=n.context.drawingBufferWidth/p),h};let d=mt.getAttributeInfo(a).variableName;o.addVertexLines(`
#ifdef HAS_LINE_CUMULATIVE_DISTANCE
void lineStyleStageVS(in ProcessedAttributes attributes)
{
float cumDist = attributes.${d};
#ifdef LINE_CUM_DIST_NORMALIZED
cumDist *= u_cumulativeDistanceMax;
#endif
const float textureCoordinateBase = 8192.0;
v_lineCoord = textureCoordinateBase + cumDist * u_pixelsPerWorld;
}
#endif
`)}else l(s)&&o.addVertexLines(`
#ifdef HAS_LINE_PATTERN
void lineStyleStageVS(in ProcessedAttributes attributes)
{
vec4 posClip = gl_Position;
vec2 screenPos = ((posClip.xy / posClip.w) * 0.5 + 0.5) * czm_viewport.zw;
const float textureCoordinateBase = 8192.0;
if (czm_viewport.z > czm_viewport.w) {
v_lineCoord = textureCoordinateBase + screenPos.x;
} else {
v_lineCoord = textureCoordinateBase + screenPos.y;
}
}
#endif
`)}function Qfe(e,t,n,i,o){let r=`HAS_${o}_TEXTURE_TRANSFORM`;e.addDefine(r,void 0,fe.FRAGMENT);let s=`${i}Transform`;e.addUniform("mat3",s,fe.FRAGMENT),t[s]=function(){return n.transform}}function X7e(e,t,n,i,o){let r=`HAS_${o}_TEXTURE_SCALE`;e.addDefine(r,void 0,fe.FRAGMENT);let s=`${i}Scale`;e.addUniform("float",s,fe.FRAGMENT),t[s]=function(){return n.scale}}function Fd(e,t,n,i,o,r,s){e.addUniform("sampler2D",i,fe.FRAGMENT),t[i]=function(){return n.texture??r};let a=`HAS_${o}_TEXTURE`;e.addDefine(a,void 0,fe.FRAGMENT);let d=`v_texCoord_${n.texCoord}`,u=`TEXCOORD_${o}`;e.addDefine(u,d,fe.FRAGMENT);let h=n.transform;l(h)&&!q.equals(h,q.IDENTITY)&&Qfe(e,t,n,i,o);let{scale:p}=n;l(p)&&p!==1&&X7e(e,t,n,i,o),I7e(e,t,n,i,o,s)}function N7e(e,t,n,i,o,r,s,a){let{emissiveFactor:c,emissiveTexture:d,normalTexture:u,occlusionTexture:h}=e;l(c)&&!m.equals(c,F7e.DEFAULT_EMISSIVE_FACTOR)&&(n.addUniform("vec3","u_emissiveFactor",fe.FRAGMENT),t.u_emissiveFactor=function(){return e.emissiveFactor},n.addDefine("HAS_EMISSIVE_FACTOR",void 0,fe.FRAGMENT),l(d)&&!s&&Fd(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),Fd(n,t,b,"u_normalTexture","NORMAL",o,a)}l(h)&&!s&&Fd(n,t,h,"u_occlusionTexture","OCCLUSION",i)}function Y7e(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,fe.FRAGMENT),l(s)&&!o&&Fd(n,t,s,"u_diffuseTexture","DIFFUSE",i,r),l(a)&&!se.equals(a,yQ.DEFAULT_DIFFUSE_FACTOR)&&(n.addUniform("vec4","u_diffuseFactor",fe.FRAGMENT),t.u_diffuseFactor=function(){return e.diffuseFactor},n.addDefine("HAS_DIFFUSE_FACTOR",void 0,fe.FRAGMENT)),l(c)&&!o&&Fd(n,t,c,"u_specularGlossinessTexture","SPECULAR_GLOSSINESS",i),l(d)&&!m.equals(d,yQ.DEFAULT_SPECULAR_FACTOR)&&(n.addUniform("vec3","u_legacySpecularFactor",fe.FRAGMENT),t.u_legacySpecularFactor=function(){return e.specularFactor},n.addDefine("HAS_LEGACY_SPECULAR_FACTOR",void 0,fe.FRAGMENT)),l(u)&&u!==yQ.DEFAULT_GLOSSINESS_FACTOR&&(n.addUniform("float","u_glossinessFactor",fe.FRAGMENT),t.u_glossinessFactor=function(){return e.glossinessFactor},n.addDefine("HAS_GLOSSINESS_FACTOR",void 0,fe.FRAGMENT))}function w7e(e,t,n,i,o){let{specularTexture:r,specularFactor:s,specularColorTexture:a,specularColorFactor:c}=e;n.addDefine("USE_SPECULAR",void 0,fe.FRAGMENT),l(r)&&!o&&Fd(n,t,r,"u_specularTexture","SPECULAR",i),l(s)&&s!==Kfe.DEFAULT_SPECULAR_FACTOR&&(n.addUniform("float","u_specularFactor",fe.FRAGMENT),t.u_specularFactor=function(){return e.specularFactor},n.addDefine("HAS_SPECULAR_FACTOR",void 0,fe.FRAGMENT)),l(a)&&!o&&Fd(n,t,a,"u_specularColorTexture","SPECULAR_COLOR",i),l(c)&&!m.equals(c,Kfe.DEFAULT_SPECULAR_COLOR_FACTOR)&&(n.addUniform("vec3","u_specularColorFactor",fe.FRAGMENT),t.u_specularColorFactor=function(){return e.specularColorFactor},n.addDefine("HAS_SPECULAR_COLOR_FACTOR",void 0,fe.FRAGMENT))}var M7e=new m;function k7e(e,t,n,i,o){let{anisotropyStrength:r,anisotropyRotation:s,anisotropyTexture:a}=e;n.addDefine("USE_ANISOTROPY",void 0,fe.FRAGMENT),l(a)&&!o&&Fd(n,t,a,"u_anisotropyTexture","ANISOTROPY",i);let c=Math.cos(s),d=Math.sin(s);n.addUniform("vec3","u_anisotropy",fe.FRAGMENT),t.u_anisotropy=function(){return m.fromElements(c,d,r,M7e)}}function U7e(e,t,n,i,o){let{clearcoatFactor:r,clearcoatTexture:s,clearcoatRoughnessFactor:a,clearcoatRoughnessTexture:c,clearcoatNormalTexture:d}=e;n.addDefine("USE_CLEARCOAT",void 0,fe.FRAGMENT),l(r)&&r!==Jfe.DEFAULT_CLEARCOAT_FACTOR&&(n.addUniform("float","u_clearcoatFactor",fe.FRAGMENT),t.u_clearcoatFactor=function(){return e.clearcoatFactor},n.addDefine("HAS_CLEARCOAT_FACTOR",void 0,fe.FRAGMENT)),l(s)&&!o&&Fd(n,t,s,"u_clearcoatTexture","CLEARCOAT",i),l(a)&&r!==Jfe.DEFAULT_CLEARCOAT_ROUGHNESS_FACTOR&&(n.addUniform("float","u_clearcoatRoughnessFactor",fe.FRAGMENT),t.u_clearcoatRoughnessFactor=function(){return e.clearcoatRoughnessFactor},n.addDefine("HAS_CLEARCOAT_ROUGHNESS_FACTOR",void 0,fe.FRAGMENT)),l(c)&&!o&&Fd(n,t,c,"u_clearcoatRoughnessTexture","CLEARCOAT_ROUGHNESS",i),l(d)&&!o&&Fd(n,t,d,"u_clearcoatNormalTexture","CLEARCOAT_NORMAL",i)}function D7e(e,t,n,i,o,r){n.addDefine("USE_METALLIC_ROUGHNESS",void 0,fe.FRAGMENT);let s=e.baseColorTexture;l(s)&&!o&&Fd(n,t,s,"u_baseColorTexture","BASE_COLOR",i,r);let a=e.baseColorFactor;l(a)&&!se.equals(a,gQ.DEFAULT_BASE_COLOR_FACTOR)&&(n.addUniform("vec4","u_baseColorFactor",fe.FRAGMENT),t.u_baseColorFactor=function(){return e.baseColorFactor},n.addDefine("HAS_BASE_COLOR_FACTOR",void 0,fe.FRAGMENT));let c=e.metallicRoughnessTexture;l(c)&&!o&&Fd(n,t,c,"u_metallicRoughnessTexture","METALLIC_ROUGHNESS",i);let d=e.metallicFactor;l(d)&&d!==gQ.DEFAULT_METALLIC_FACTOR&&(n.addUniform("float","u_metallicFactor",fe.FRAGMENT),t.u_metallicFactor=function(){return e.metallicFactor},n.addDefine("HAS_METALLIC_FACTOR",void 0,fe.FRAGMENT));let u=e.roughnessFactor;l(u)&&u!==gQ.DEFAULT_ROUGHNESS_FACTOR&&(n.addUniform("float","u_roughnessFactor",fe.FRAGMENT),t.u_roughnessFactor=function(){return e.roughnessFactor},n.addDefine("HAS_ROUGHNESS_FACTOR",void 0,fe.FRAGMENT))}var dI=jfe;var Q3n=x(T(),1);var zl={name:"MetadataPickingPipelineStage",METADATA_PICKING_ENABLED:"METADATA_PICKING_ENABLED",METADATA_PICKING_VALUE_TYPE:"METADATA_PICKING_VALUE_TYPE",METADATA_PICKING_VALUE_STRING:"METADATA_PICKING_VALUE_STRING",METADATA_PICKING_VALUE_COMPONENT_X:"METADATA_PICKING_VALUE_COMPONENT_X",METADATA_PICKING_VALUE_COMPONENT_Y:"METADATA_PICKING_VALUE_COMPONENT_Y",METADATA_PICKING_VALUE_COMPONENT_Z:"METADATA_PICKING_VALUE_COMPONENT_Z",METADATA_PICKING_VALUE_COMPONENT_W:"METADATA_PICKING_VALUE_COMPONENT_W"};zl.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine(zl.METADATA_PICKING_VALUE_TYPE,"float",fe.FRAGMENT),i.addDefine(zl.METADATA_PICKING_VALUE_STRING,"0.0",fe.FRAGMENT),i.addDefine(zl.METADATA_PICKING_VALUE_COMPONENT_X,"0.0",fe.FRAGMENT),i.addDefine(zl.METADATA_PICKING_VALUE_COMPONENT_Y,"0.0",fe.FRAGMENT),i.addDefine(zl.METADATA_PICKING_VALUE_COMPONENT_Z,"0.0",fe.FRAGMENT),i.addDefine(zl.METADATA_PICKING_VALUE_COMPONENT_W,"0.0",fe.FRAGMENT),i.addFunction("metadataPickingStage","void metadataPickingStage(Metadata metadata, MetadataClass metadataClass, inout vec4 metadataValues)",fe.FRAGMENT),i.addFunctionLines("metadataPickingStage",[`${zl.METADATA_PICKING_VALUE_TYPE} value = ${zl.METADATA_PICKING_VALUE_TYPE}(${zl.METADATA_PICKING_VALUE_STRING});`,`metadataValues.x = ${zl.METADATA_PICKING_VALUE_COMPONENT_X};`,`metadataValues.y = ${zl.METADATA_PICKING_VALUE_COMPONENT_Y};`,`metadataValues.z = ${zl.METADATA_PICKING_VALUE_COMPONENT_Z};`,`metadataValues.w = ${zl.METADATA_PICKING_VALUE_COMPONENT_W};`],fe.FRAGMENT)};var gu=zl;var azn=x(T(),1);var $3n=x(T(),1),uI=`void morphTargetsStage(inout ProcessedAttributes attributes)
{
vec3 positionMC = attributes.positionMC;
attributes.positionMC = getMorphedPosition(positionMC);
#ifdef HAS_NORMALS
vec3 normalMC = attributes.normalMC;
attributes.normalMC = getMorphedNormal(normalMC);
#endif
#ifdef HAS_TANGENTS
vec3 tangentMC = attributes.tangentMC;
attributes.tangentMC = getMorphedTangent(tangentMC);
#endif
}`;var Ec={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)"};Ec.process=function(e,t){let n=e.shaderBuilder;n.addDefine("HAS_MORPH_TARGETS",void 0,fe.VERTEX),J7e(n);let i=t.morphTargets.length;for(let a=0;a<i;a++){let c=t.morphTargets[a].attributes,d=c.length;for(let u=0;u<d;u++){let h=c[u],p=h.semantic;p!==nt.POSITION&&p!==nt.NORMAL&&p!==nt.TANGENT||(B7e(e,h,e.attributeIndex,a),e.attributeIndex++)}}j7e(n);let r=e.runtimeNode.morphWeights.length;n.addUniform("float",`u_morphWeights[${r}]`,fe.VERTEX),n.addVertexLines(uI);let s={u_morphWeights:function(){return e.runtimeNode.morphWeights}};e.uniformMap=Rt(s,e.uniformMap)};var O7e={attributeString:void 0,functionId:void 0};function B7e(e,t,n,i){let o=e.shaderBuilder;z7e(e,t,n);let r=H7e(t,O7e);K7e(o,r,i)}function z7e(e,t,n){let i={index:n,value:l(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,componentsPerAttribute:Nt.getNumberOfComponents(t.type),componentDatatype:t.componentDatatype,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};e.attributes.push(i)}function H7e(e,t){switch(e.semantic){case nt.POSITION:t.attributeString="Position",t.functionId=Ec.FUNCTION_ID_GET_MORPHED_POSITION;break;case nt.NORMAL:t.attributeString="Normal",t.functionId=Ec.FUNCTION_ID_GET_MORPHED_NORMAL;break;case nt.TANGENT:t.attributeString="Tangent",t.functionId=Ec.FUNCTION_ID_GET_MORPHED_TANGENT;break;default:break}return t}function K7e(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 J7e(e){e.addFunction(Ec.FUNCTION_ID_GET_MORPHED_POSITION,Ec.FUNCTION_SIGNATURE_GET_MORPHED_POSITION,fe.VERTEX),e.addFunctionLines(Ec.FUNCTION_ID_GET_MORPHED_POSITION,["vec3 morphedPosition = position;"]),e.addFunction(Ec.FUNCTION_ID_GET_MORPHED_NORMAL,Ec.FUNCTION_SIGNATURE_GET_MORPHED_NORMAL,fe.VERTEX),e.addFunctionLines(Ec.FUNCTION_ID_GET_MORPHED_NORMAL,["vec3 morphedNormal = normal;"]),e.addFunction(Ec.FUNCTION_ID_GET_MORPHED_TANGENT,Ec.FUNCTION_SIGNATURE_GET_MORPHED_TANGENT,fe.VERTEX),e.addFunctionLines(Ec.FUNCTION_ID_GET_MORPHED_TANGENT,["vec3 morphedTangent = tangent;"])}function j7e(e){e.addFunctionLines(Ec.FUNCTION_ID_GET_MORPHED_POSITION,["return morphedPosition;"]),e.addFunctionLines(Ec.FUNCTION_ID_GET_MORPHED_NORMAL,["return morphedNormal;"]),e.addFunctionLines(Ec.FUNCTION_ID_GET_MORPHED_TANGENT,["return morphedTangent;"])}var mI=Ec;var gzn=x(T(),1);var qfe={name:"PickingPipelineStage"};qfe.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)Q7e(e,t,a,i);else if(l(a))q7e(e,i);else{let c=$fe(e),d=i.createPickId(c);s._pipelineResources.push(d),s._pickIds.push(d),r.addUniform("vec4","czm_pickColor",fe.FRAGMENT);let u=e.uniformMap;u.czm_pickColor=function(){return d.color},e.pickId="czm_pickColor"}};function $fe(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(Lr.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 Q7e(e,t,n){let i=e.model,o,r,s=i.featureIdLabel,a=i.instanceFeatureIdLabel;l(i.featureTableId)?o=i.featureTableId:l(n)?(r=mt.getFeatureIdsByLabel(n.featureIds,a),o=r.propertyTableId):(r=mt.getFeatureIdsByLabel(t.featureIds,s),o=r.propertyTableId);let c=i.featureTables[o];e.shaderBuilder.addUniform("sampler2D","model_pickTexture",fe.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 q7e(e,t){let n=e.instanceCount,i=new Array(n),o=new Uint8Array(n*4),r=e.model,s=r._pipelineResources;for(let h=0;h<n;h++){let p=$fe(e,h),b=t.createPickId(p);s.push(b),i[h]=b;let f=b.color;o[h*4+0]=U.floatToByte(f.red),o[h*4+1]=U.floatToByte(f.green),o[h*4+2]=U.floatToByte(f.blue),o[h*4+3]=U.floatToByte(f.alpha)}r._pickIds=i;let a=qe.createVertexBuffer({context:t,typedArray:o,usage:Fe.STATIC_DRAW});a.vertexArrayDestroyable=!1,r.statistics.addBuffer(a,!1),s.push(a);let d={index:e.attributeIndex++,vertexBuffer:a,componentsPerAttribute:4,componentDatatype:K.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1};e.attributes.push(d);let u=e.shaderBuilder;u.addDefine("USE_PICKING",void 0,fe.BOTH),u.addAttribute("vec4","a_pickColor"),u.addVarying("vec4","v_pickColor"),e.pickId="v_pickColor"}var hI=qfe;var wzn=x(T(),1);var xzn=x(T(),1),epe={ADD:0,REPLACE:1};Object.freeze(epe);var sr=epe;var _zn=x(T(),1),fI=`float getPointSizeFromAttenuation(vec3 positionEC) {
// Variables are packed into a single vector to minimize gl.uniformXXX() calls
float pointSize = model_pointCloudParameters.x;
float geometricError = model_pointCloudParameters.y;
float depthMultiplier = model_pointCloudParameters.z;
float depth = -positionEC.z;
return min((geometricError / depth) * depthMultiplier, pointSize);
}
#ifdef HAS_POINT_CLOUD_SHOW_STYLE
float pointCloudShowStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
float tiles3d_tileset_time = model_pointCloudParameters.w;
return float(getShowFromStyle(attributes, metadata, tiles3d_tileset_time));
}
#endif
#ifdef HAS_POINT_CLOUD_COLOR_STYLE
vec4 pointCloudColorStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
float tiles3d_tileset_time = model_pointCloudParameters.w;
return getColorFromStyle(attributes, metadata, tiles3d_tileset_time);
}
#endif
#ifdef HAS_POINT_CLOUD_POINT_SIZE_STYLE
float pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
float tiles3d_tileset_time = model_pointCloudParameters.w;
return float(getPointSizeFromStyle(attributes, metadata, tiles3d_tileset_time));
}
#elif defined(HAS_POINT_CLOUD_ATTENUATION)
float pointCloudPointSizeStylingStage(in ProcessedAttributes attributes, in Metadata metadata) {
return getPointSizeFromAttenuation(v_positionEC);
}
#endif
#ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING
float pointCloudBackFaceCullingStage() {
#if defined(HAS_NORMALS) && !defined(HAS_DOUBLE_SIDED_MATERIAL)
// This needs to be computed in eye coordinates so we can't use attributes.normalMC
return step(-v_normalEC.z, 0.0);
#else
return 1.0;
#endif
}
#endif
`;var $7e=new se,npe={name:"PointCloudStylingPipelineStage"};npe.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=i6e(a),_=o6e(r,y);r6e(i,_);let A=s6e(_).indexOf("normalMC")>=0,Z=mt.getAttributeBySemantic(t,nt.NORMAL);if(A&&!Z)throw new le("Style references the NORMAL semantic but the point cloud does not have normals");i.addDefine("COMPUTE_POSITION_WC_STYLE",void 0,fe.VERTEX),_.styleTranslucent&&(e.alphaOptions.pass=Le.TRANSLUCENT)}let u=o.pointCloudShading;u.attenuation&&i.addDefine("HAS_POINT_CLOUD_ATTENUATION",void 0,fe.VERTEX),u.backFaceCulling&&i.addDefine("HAS_POINT_CLOUD_BACK_FACE_CULLING",void 0,fe.VERTEX);let h,p,b;Lr.is3DTiles(o.type)&&(p=!0,h=o.content,b=h.tile.refine===sr.ADD),i.addUniform("vec4","model_pointCloudParameters",fe.VERTEX),i.addVertexLines(fI);let f=e.uniformMap;f.model_pointCloudParameters=function(){let y=$7e,_=1;p&&(_=b?5:h.tileset.memoryAdjustedScreenSpaceError),y.x=u.maximumAttenuation??_,y.x*=n.pixelRatio;let S=e6e(e,t,u,h);y.y=S*u.geometricErrorScale;let A=n.context,Z=n.camera.frustum,V;return n.mode===re.SCENE2D||Z instanceof mn?V=Number.POSITIVE_INFINITY:V=A.drawingBufferHeight/n.camera.frustum.sseDenominator,y.z=V,p&&(y.w=h.tileset.timeSinceLoad),y}};var tpe=new m;function e6e(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=mt.getAttributeBySemantic(t,nt.POSITION),r=o.count,s=e.runtimeNode.transform,a=m.subtract(o.max,o.min,tpe);a=F.multiplyByPointAsVector(s,a,tpe);let c=a.x*a.y*a.z;return W.cbrt(c/r)}var t6e={colorStyleFunction:void 0,showStyleFunction:void 0,pointSizeStyleFunction:void 0,styleTranslucent:!1},n6e={POSITION:"attributes.positionMC",POSITION_ABSOLUTE:"v_positionWC",COLOR:"attributes.color_0",NORMAL:"attributes.normalMC"};function i6e(e){let t=ze(n6e);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 xQ="ProcessedAttributes attributes, Metadata metadata, float tiles3d_tileset_time";function o6e(e,t){let n=t6e,i={translucent:!1};return n.colorStyleFunction=e.getColorShaderFunction(`getColorFromStyle(${xQ})`,t,i),n.showStyleFunction=e.getShowShaderFunction(`getShowFromStyle(${xQ})`,t,i),n.pointSizeStyleFunction=e.getPointSizeShaderFunction(`getPointSizeFromStyle(${xQ})`,t,i),n.styleTranslucent=l(n.colorStyleFunction)&&i.translucent,n}function r6e(e,t){let n=t.colorStyleFunction;l(n)&&(e.addDefine("HAS_POINT_CLOUD_COLOR_STYLE",void 0,fe.BOTH),e.addVertexLines(n),e.addVarying("vec4","v_pointCloudColor"));let i=t.showStyleFunction;l(i)&&(e.addDefine("HAS_POINT_CLOUD_SHOW_STYLE",void 0,fe.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,fe.VERTEX),e.addVertexLines(o))}function TQ(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 s6e(e){let t=e.colorStyleFunction,n=e.showStyleFunction,i=e.pointSizeStyleFunction,o=[];return l(t)&&TQ(t,o),l(n)&&TQ(n,o),l(i)&&TQ(i,o),o}var pI=npe;var jzn=x(T(),1);var kzn=x(T(),1),bI=`void primitiveOutlineStage() {
v_outlineCoordinates = a_outlineCoordinates;
}
`;var Dzn=x(T(),1),gI=`void primitiveOutlineStage(inout czm_modelMaterial material) {
if (!model_showOutline) {
return;
}
float outlineX =
texture(model_outlineTexture, vec2(v_outlineCoordinates.x, 0.5)).r;
float outlineY =
texture(model_outlineTexture, vec2(v_outlineCoordinates.y, 0.5)).r;
float outlineZ =
texture(model_outlineTexture, vec2(v_outlineCoordinates.z, 0.5)).r;
float outlineness = max(outlineX, max(outlineY, outlineZ));
material.diffuse = mix(material.diffuse, model_outlineColor.rgb, model_outlineColor.a * outlineness);
}
`;var ipe={name:"PrimitiveOutlinePipelineStage"};ipe.process=function(e,t,n){let i=e.shaderBuilder,o=e.uniformMap;i.addDefine("HAS_PRIMITIVE_OUTLINE",void 0,fe.BOTH),i.addAttribute("vec3","a_outlineCoordinates"),i.addVarying("vec3","v_outlineCoordinates");let r=t.outlineCoordinates,s={index:e.attributeIndex++,vertexBuffer:r.buffer,componentsPerAttribute:Nt.getNumberOfComponents(r.type),componentDatatype:r.componentDatatype,offsetInBytes:r.byteOffset,strideInBytes:r.byteStride,normalize:r.normalized};e.attributes.push(s),i.addUniform("sampler2D","model_outlineTexture",fe.FRAGMENT);let a=T_.createTexture(n.context);o.model_outlineTexture=function(){return a};let c=e.model;i.addUniform("vec4","model_outlineColor",fe.FRAGMENT),o.model_outlineColor=function(){return c.outlineColor},i.addUniform("bool","model_showOutline",fe.FRAGMENT),o.model_showOutline=function(){return c.showOutline},i.addVertexLines(bI),i.addFragmentLines(gI)};var yI=ipe;var nHn=x(T(),1);var ope={name:"PrimitiveStatisticsPipelineStage",_countGeometry:rpe,_count2DPositions:spe,_countMorphTargetAttributes:ape,_countMaterialTextures:cpe,_countFeatureIdTextures:lpe,_countBinaryMetadata:dpe};ope.process=function(e,t,n){let i=e.model,o=i.statistics;rpe(o,t),spe(o,e.runtimePrimitive),ape(o,t),cpe(o,t.material),lpe(o,t.featureIds),dpe(o,i)};function rpe(e,t){let n=l(t.indices)?t.indices.count:mt.getAttributeBySemantic(t,"POSITION").count,i=t.primitiveType;i===ve.POINTS?e.pointsLength+=n:ve.isTriangles(i)&&(e.trianglesLength+=a6e(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 a6e(e,t){switch(e){case ve.TRIANGLES:return t/3;case ve.TRIANGLE_STRIP:case ve.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}function spe(e,t){let n=t.positionBuffer2D;l(n)&&e.addBuffer(n,!0)}function ape(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 cpe(e,t){let n=c6e(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 c6e(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 lpe(e,t){let n=t.length;for(let i=0;i<n;i++){let o=t[i];if(o instanceof yn.FeatureIdTexture){let r=o.textureReader;l(r.texture)&&e.addTexture(r.texture)}}}function dpe(e,t){let n=t.structuralMetadata;l(n)&&(l6e(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 l6e(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 xI=ope;var gHn=x(T(),1);var d6e=new F,u6e=new F,upe={name:"SceneMode2DPipelineStage"};upe.process=function(e,t,n){let i=mt.getAttributeBySemantic(t,nt.POSITION),o=e.shaderBuilder,r=e.model,s=r.sceneGraph.computedModelMatrix,a=e.runtimeNode.computedTransform,c=F.multiplyTransformation(s,a,d6e),d=f6e(e,c,n),u=e.runtimePrimitive;u.boundingSphere2D=d;let h=e.runtimeNode.node.instances;if(l(h))return;if(l(i.typedArray)){let y=g6e(i,c,d,n);u.positionBuffer2D=y,r._modelResources.push(y),i.typedArray=void 0}o.addDefine("USE_2D_POSITIONS",void 0,fe.VERTEX),o.addUniform("mat4","u_modelView2D",fe.VERTEX);let p=F.fromTranslation(d.center,new F),b=n.context,f={u_modelView2D:function(){return F.multiplyTransformation(b.uniformState.view,p,u6e)}};e.uniformMap=Rt(f,e.uniformMap)};var m6e=new m,h6e=new m;function f6e(e,t,n){let i=F.multiplyByPoint(t,e.positionMin,m6e),o=no.computeActualEllipsoidPosition(n,i,i),r=F.multiplyByPoint(t,e.positionMax,h6e),s=no.computeActualEllipsoidPosition(n,r,r);return de.fromCornerPoints(o,s,new de)}var mpe=new m;function p6e(e,t){let n=e.length,i=new Float32Array(n),o=t.quantizedVolumeOffset,r=t.quantizedVolumeStepSize;for(let s=0;s<n;s+=3){let a=m.fromArray(e,s,mpe),c=m.multiplyComponents(a,r,a),d=m.add(c,o,c);i[s]=d.x,i[s+1]=d.y,i[s+2]=d.z}return i}function b6e(e,t,n,i){let o;l(e.quantization)?o=p6e(e.typedArray,e.quantization):o=e.typedArray.slice();let r=e.byteOffset/Float32Array.BYTES_PER_ELEMENT,s=o.length,a=l(e.byteStride)?e.byteStride/Float32Array.BYTES_PER_ELEMENT:3;for(let c=r;c<s;c+=a){let d=m.fromArray(o,c,mpe);if(isNaN(d.x)||isNaN(d.y)||isNaN(d.z))continue;let u=F.multiplyByPoint(t,d,d),h=no.computeActualEllipsoidPosition(i,u,u),p=m.subtract(h,n,h);o[c]=p.x,o[c+1]=p.y,o[c+2]=p.z}return o}function g6e(e,t,n,i){let o=ze(i);o.mode=re.COLUMBUS_VIEW;let r=n.center,s=b6e(e,t,r,o),a=qe.createVertexBuffer({context:i.context,typedArray:s,usage:Fe.STATIC_DRAW});return a.vertexArrayDestroyable=!1,a}var TI=upe;var CHn=x(T(),1);var xHn=x(T(),1),_I=`void skinningStage(inout ProcessedAttributes attributes)
{
mat4 skinningMatrix = getSkinningMatrix();
mat3 skinningMatrixMat3 = mat3(skinningMatrix);
vec4 positionMC = vec4(attributes.positionMC, 1.0);
attributes.positionMC = vec3(skinningMatrix * positionMC);
#ifdef HAS_NORMALS
vec3 normalMC = attributes.normalMC;
attributes.normalMC = skinningMatrixMat3 * normalMC;
#endif
#ifdef HAS_TANGENTS
vec3 tangentMC = attributes.tangentMC;
attributes.tangentMC = skinningMatrixMat3 * tangentMC;
#endif
}`;var 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,fe.VERTEX),x6e(n,t);let i=e.runtimeNode,o=i.computedJointMatrices;n.addUniform("mat4",`u_jointMatrices[${o.length}]`,fe.VERTEX),n.addVertexLines(_I);let r={u_jointMatrices:function(){return i.computedJointMatrices}};e.uniformMap=Rt(r,e.uniformMap)};function y6e(e){let t=-1,n=e.attributes,i=n.length;for(let o=0;o<i;o++){let r=n[o];(r.semantic===nt.JOINTS||r.semantic===nt.WEIGHTS)&&(t=Math.max(t,r.setIndex))}return t}function x6e(e,t){e.addFunction(E_.FUNCTION_ID_GET_SKINNING_MATRIX,E_.FUNCTION_SIGNATURE_GET_SKINNING_MATRIX,fe.VERTEX),e.addFunctionLines(E_.FUNCTION_ID_GET_SKINNING_MATRIX,["mat4 skinnedMatrix = mat4(0);"]);let i,o,r=["x","y","z","w"],s=y6e(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 SI=E_;var vHn=x(T(),1);var RHn=x(T(),1),AI=`void verticalExaggerationStage(
inout ProcessedAttributes attributes
) {
// Compute the distance from the camera to the local center of curvature.
vec4 vertexPositionENU = czm_modelToEnu * vec4(attributes.positionMC, 1.0);
vec2 vertexAzimuth = normalize(vertexPositionENU.xy);
// Curvature = 1 / radius of curvature.
float azimuthalCurvature = dot(vertexAzimuth * vertexAzimuth, czm_eyeEllipsoidCurvature);
float eyeToCenter = 1.0 / azimuthalCurvature + czm_eyeHeight;
// Compute the approximate ellipsoid normal at the vertex position.
// Uses a circular approximation for the Earth curvature along the geodesic.
vec3 vertexPositionEC = (czm_modelView * vec4(attributes.positionMC, 1.0)).xyz;
vec3 centerToVertex = eyeToCenter * czm_eyeEllipsoidNormalEC + vertexPositionEC;
vec3 vertexNormal = normalize(centerToVertex);
// Estimate the (sine of the) angle between the camera direction and the vertex normal
float verticalDistance = dot(vertexPositionEC, czm_eyeEllipsoidNormalEC);
float horizontalDistance = length(vertexPositionEC - verticalDistance * czm_eyeEllipsoidNormalEC);
float sinTheta = horizontalDistance / (eyeToCenter + verticalDistance);
bool isSmallAngle = clamp(sinTheta, 0.0, 0.05) == sinTheta;
// Approximate the change in height above the ellipsoid, from camera to vertex position.
float exactVersine = 1.0 - dot(czm_eyeEllipsoidNormalEC, vertexNormal);
float smallAngleVersine = 0.5 * sinTheta * sinTheta;
float versine = isSmallAngle ? smallAngleVersine : exactVersine;
float dHeight = dot(vertexPositionEC, vertexNormal) - eyeToCenter * versine;
float vertexHeight = czm_eyeHeight + dHeight;
// Transform the approximate vertex normal to model coordinates.
vec3 vertexNormalMC = (czm_inverseModelView * vec4(vertexNormal, 0.0)).xyz;
vertexNormalMC = normalize(vertexNormalMC);
// Compute the exaggeration and apply it along the approximate vertex normal.
float stretch = u_verticalExaggerationAndRelativeHeight.x;
float shift = u_verticalExaggerationAndRelativeHeight.y;
float exaggeration = (vertexHeight - shift) * (stretch - 1.0);
attributes.positionMC += exaggeration * vertexNormalMC;
}
`;var hpe={name:"VerticalExaggerationPipelineStage"},T6e=new M;hpe.process=function(e,t,n){let{shaderBuilder:i,uniformMap:o}=e;i.addVertexLines(AI),i.addDefine("HAS_VERTICAL_EXAGGERATION",void 0,fe.VERTEX),i.addUniform("vec2","u_verticalExaggerationAndRelativeHeight",fe.VERTEX),o.u_verticalExaggerationAndRelativeHeight=function(){return M.fromElements(n.verticalExaggeration,n.verticalExaggerationRelativeHeight,T6e)}};var ZI=hpe;var KHn=x(T(),1);var NHn=x(T(),1);var _Q={};function _6e(e){let t=Me.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 S6e(e,t){let n=t.length,i=Me.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 A6e(e){let t=e-2,n=2+t*4,i=Me.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 Z6e(e,t){let i=t.length-2,o=2+i*4,r=Me.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 C6e(e){let t=e-2,n=2+t*4,i=Me.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 V6e(e,t){let i=t.length-2,o=2+i*4,r=Me.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}_Q.createWireframeIndices=function(e,t,n){let i=l(n);if(e===ve.TRIANGLES)return i?S6e(t,n):_6e(t);if(e===ve.TRIANGLE_STRIP)return i?Z6e(t,n):A6e(t);if(e===ve.TRIANGLE_FAN)return i?V6e(t,n):C6e(t)};_Q.getWireframeIndicesCount=function(e,t){return e===ve.TRIANGLES?t*2:e===ve.TRIANGLE_STRIP||e===ve.TRIANGLE_FAN?2+(t-2)*4:t};var BC=_Q;var fpe={name:"WireframePipelineStage"};fpe.process=function(e,t,n){e.shaderBuilder.addDefine("HAS_WIREFRAME",void 0,fe.FRAGMENT);let o=e.model,r=R6e(t,e.indices,n);o._pipelineResources.push(r),e.wireframeIndexBuffer=r,o.statistics.addBuffer(r,!1);let a=e.primitiveType,c=e.count;e.primitiveType=ve.LINES,e.count=BC.getWireframeIndicesCount(a,c)};function R6e(e,t,n){let o=mt.getAttributeBySemantic(e,nt.POSITION).count,r=n.context.webgl2,s;if(l(t)){let u=t.buffer,h=t.count;l(u)&&r?(s=u.sizeInBytes===h?new Uint8Array(h):Me.createTypedArray(o,h),u.getBufferData(s)):s=t.typedArray}let a=e.primitiveType,c=BC.createWireframeIndices(a,o,s),d=Me.fromSizeInBytes(c.BYTES_PER_ELEMENT);return qe.createIndexBuffer({context:n.context,typedArray:c,usage:Fe.STATIC_DRAW,indexDatatype:d})}var CI=fpe;function ppe(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=[]}ppe.prototype.configurePipeline=function(e){let t=this.pipelineStages;t.length=0;let n=this.primitive,i=this.node,o=this.model,r=o.customShader,s=o.style,a=e.context.webgl2,d=e.mode!==re.SCENE3D&&!e.scene3DOnly&&o._projectTo2D,u=e.verticalExaggeration!==1&&o.hasVerticalExaggeration,h=l(n.morphTargets)&&n.morphTargets.length>0,p=l(i.skin),b=l(o.imageryLayers)&&o.imageryLayers.length>0,f=l(r),_=!(f&&l(r.fragmentShaderText))||r.mode!==Zb.REPLACE_MATERIAL,S=mt.hasQuantizedAttributes(n.attributes),A=o.debugWireframe&&ve.isTriangles(n.primitiveType)&&(o._enableDebugWireframe||a),Z=o.pointCloudShading,V=l(Z)&&Z.attenuation,E=l(Z)&&Z.backFaceCulling,L=n.primitiveType===ve.POINTS&&(l(s)||V||E),v=o._enableShowOutline&&l(n.outlineCoordinates),I=l(n.edgeVisibility),X=E6e(o,i,n),N=l(o.classificationType);d&&t.push(TI),t.push(w2),A&&t.push(CI),N&&t.push(y2),h&&t.push(mI),p&&t.push(SI),L&&t.push(pI),S&&t.push(L2),b&&(v?Tt("outlines-and-draping","Primitive outlines disable imagery draping"):t.push(oI)),_&&t.push(dI),t.push(Xy),t.push(Em),t.push(gu),X.hasPropertyTable&&(t.push(Yy),t.push(g2),t.push(_2)),u&&t.push(ZI),f&&t.push(E2),t.push(sI),o.allowPicking&&t.push(hI),v&&t.push(yI),I&&(e.edgeVisibilityRequested=!0,t.push(P2),t.push(v2)),t.push(b2),t.push(xI)};function E6e(e,t,n){let i;return l(t.instances)&&(i=mt.getFeatureIdsByLabel(t.instances.featureIds,e.instanceFeatureIdLabel),l(i))?{hasFeatureIds:!0,hasPropertyTable:l(i.propertyTableId)}:(i=mt.getFeatureIdsByLabel(n.featureIds,e.featureIdLabel),l(i)?{hasFeatureIds:!0,hasPropertyTable:l(i.propertyTableId)}:{hasFeatureIds:!1,hasPropertyTable:!1})}var VI=ppe;var vKn=x(T(),1);function SQ(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=[],G6e(this)}Object.defineProperties(SQ.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 G6e(e){let t=e.skin,n=t.inverseBindMatrices;e._inverseBindMatrices=n;let i=t.joints,o=i.length,r=e.sceneGraph._runtimeNodes,s=e.joints,a=e._jointMatrices;for(let c=0;c<o;c++){let d=i[c].index,u=r[d];s.push(u);let h=n[c],p=bpe(u,h,new F);a.push(p)}}function bpe(e,t,n){let i=F.multiplyTransformation(e.transformToRoot,e.transform,n);return n=F.multiplyTransformation(i,t,n),n}SQ.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]=bpe(i,o,e[n])}};var RI=SQ;var MKn=x(T(),1);var IKn=x(T(),1);function L6e(){this.pass=void 0,this.alphaCutoff=void 0}var G_=L6e;function W6e(e){this.shaderBuilder=new M0,this.model=e,this.uniformMap={},this.alphaOptions=new G_,this.renderStateOptions=De.getState(De.fromCache({depthTest:{enabled:!0,func:qa.LESS_OR_EQUAL}})),this.hasSilhouette=!1,this.hasSkipLevelOfDetail=!1,this.nodeRenderResources=[]}var EI=W6e;var QKn=x(T(),1);var UKn=x(T(),1),GI=`void silhouetteStage(inout vec4 color) {
if(model_silhouettePass) {
color = czm_gammaCorrect(model_silhouetteColor);
}
}`;var OKn=x(T(),1),LI=`void silhouetteStage(in ProcessedAttributes attributes, inout vec4 positionClip) {
#ifdef HAS_NORMALS
if(model_silhouettePass) {
vec3 normal = normalize(czm_normal3D * attributes.normalMC);
normal.x *= czm_projection[0][0];
normal.y *= czm_projection[1][1];
positionClip.xy += normal.xy * positionClip.w * model_silhouetteSize * czm_pixelRatio / czm_viewport.z;
}
#endif
}
`;var yD={name:"ModelSilhouettePipelineStage"};yD.silhouettesLength=0;yD.process=function(e,t,n){l(t._silhouetteId)||(t._silhouetteId=++yD.silhouettesLength);let i=e.shaderBuilder;i.addDefine("HAS_SILHOUETTE",void 0,fe.BOTH),i.addVertexLines(LI),i.addFragmentLines(GI),i.addUniform("vec4","model_silhouetteColor",fe.FRAGMENT),i.addUniform("float","model_silhouetteSize",fe.VERTEX),i.addUniform("bool","model_silhouettePass",fe.BOTH);let o={model_silhouetteColor:function(){return t.silhouetteColor},model_silhouetteSize:function(){return t.silhouetteSize},model_silhouettePass:function(){return!1}};e.uniformMap=Rt(o,e.uniformMap),e.hasSilhouette=!0};var WI=yD;var oJn=x(T(),1);var $Kn=x(T(),1),vI=`void modelSplitterStage()
{
// Don't split when rendering the shadow map, because it is rendered from
// the perspective of a totally different camera.
#ifndef SHADOW_MAP
if (model_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
if (model_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
#endif
}
`;var xD={name:"ModelSplitterPipelineStage",SPLIT_DIRECTION_UNIFORM_NAME:"model_splitDirection"};xD.process=function(e,t,n){let i=e.shaderBuilder;i.addDefine("HAS_MODEL_SPLITTER",void 0,fe.FRAGMENT),i.addFragmentLines(vI);let o={};i.addUniform("float",xD.SPLIT_DIRECTION_UNIFORM_NAME,fe.FRAGMENT),o[xD.SPLIT_DIRECTION_UNIFORM_NAME]=function(){return t.splitDirection},e.uniformMap=Rt(o,e.uniformMap)};var FI=xD;var aJn=x(T(),1);function v6e(e,t){this.model=e.model,this.shaderBuilder=e.shaderBuilder.clone(),this.uniformMap=ze(e.uniformMap),this.alphaOptions=ze(e.alphaOptions),this.renderStateOptions=ze(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 II=v6e;var xJn=x(T(),1);var uJn=x(T(),1);function F6e(e){e=e??B.EMPTY_OBJECT,this.lightingModel=e.lightingModel??Rp.UNLIT}var PI=F6e;function I6e(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=ze(e.uniformMap),this.alphaOptions=ze(e.alphaOptions),this.renderStateOptions=ze(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:mt.getAttributeBySemantic(n,"POSITION").count,this.hasPropertyTable=!1,this.indices=n.indices,this.wireframeIndexBuffer=void 0,this.primitiveType=n.primitiveType;let i=mt.getPositionMinMax(n,this.runtimeNode.instancingTranslationMin,this.runtimeNode.instancingTranslationMax);this.positionMin=m.clone(i.min,new m),this.positionMax=m.clone(i.max,new m),this.boundingSphere=de.fromCornerPoints(this.positionMin,this.positionMax,new de),this.lightingOptions=new PI,this.pickId=void 0}var XI=I6e;var _jn=x(T(),1);var IJn=x(T(),1);function ZQ(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!==Jn.CESIUM_3D_TILE,this._classifies3DTiles=o!==Jn.TERRAIN,this._useDebugWireframe=i._enableDebugWireframe&&i.debugWireframe,this._pickId=n.pickId,this._commandListTerrain=[],this._commandList3DTiles=[],this._commandListIgnoreShow=[],this._commandListDebugWireframe=[],this._commandListTerrainPicking=[],this._commandList3DTilesPicking=[],Y6e(this)}function P6e(e){return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:!0,frontFunction:e,frontOperation:{fail:Zt.KEEP,zFail:Zt.DECREMENT_WRAP,zPass:Zt.KEEP},backFunction:e,backOperation:{fail:Zt.KEEP,zFail:Zt.INCREMENT_WRAP,zPass:Zt.KEEP},reference:Ot.CESIUM_3D_TILE_MASK,mask:Ot.CESIUM_3D_TILE_MASK},stencilMask:Ot.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:qa.LESS_OR_EQUAL},depthMask:!1}}var X6e={stencilTest:{enabled:!0,frontFunction:jn.NOT_EQUAL,frontOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},backFunction:jn.NOT_EQUAL,backOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},reference:0,mask:Ot.CLASSIFICATION_MASK},stencilMask:Ot.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:tn.PRE_MULTIPLIED_ALPHA_BLEND},N6e={stencilTest:{enabled:!0,frontFunction:jn.NOT_EQUAL,frontOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},backFunction:jn.NOT_EQUAL,backOperation:{fail:Zt.ZERO,zFail:Zt.ZERO,zPass:Zt.ZERO},reference:0,mask:Ot.CLASSIFICATION_MASK},stencilMask:Ot.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1},xpe=[];function Y6e(e){let t=e._command,n=xpe;if(e._useDebugWireframe){t.pass=Le.OPAQUE,n.length=0,n.push(t),e._commandListDebugWireframe=NI(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=AQ(t,r),a=gpe(t,r);n.length=0,n.push(s,a),e._commandListTerrain=NI(e,n,e._commandListTerrain),o&&(e._commandListTerrainPicking=ype(e,n,e._commandListTerrainPicking))}if(e._classifies3DTiles){let r=Le.CESIUM_3D_TILE_CLASSIFICATION,s=AQ(t,r),a=gpe(t,r);n.length=0,n.push(s,a),e._commandList3DTiles=NI(e,n,e._commandList3DTiles),o&&(e._commandList3DTilesPicking=ype(e,n,e._commandList3DTilesPicking))}}function NI(e,t,n){let i=e._runtimePrimitive,o=i.batchLengths,r=i.batchOffsets,s=o.length,a=t.length;for(let c=0;c<s;c++){let d=o[c],u=r[c];for(let h=0;h<a;h++){let p=t[h],b=et.shallowClone(p);b.count=d,b.offset=u,n.push(b)}}return n}function AQ(e,t){let n=et.shallowClone(e);n.cull=!1,n.pass=t;let i=t===Le.TERRAIN_CLASSIFICATION?jn.ALWAYS:jn.EQUAL,o=P6e(i);return n.renderState=De.fromCache(o),n}function gpe(e,t){let n=et.shallowClone(e);return n.cull=!1,n.pass=t,n.renderState=De.fromCache(X6e),n}var w6e=[];function ype(e,t,n){let i=De.fromCache(N6e),o=t[0],r=t[1],s=et.shallowClone(o);s.cull=!0,s.pickOnly=!0;let a=et.shallowClone(r);a.cull=!0,a.pickOnly=!0,a.renderState=i,a.pickId=e._pickId;let c=w6e;return c.length=0,c.push(s,a),NI(e,c,n)}Object.defineProperties(ZQ.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}}});ZQ.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=AQ(this._command,o),s=xpe;s.length=0,s.push(r),this._commandListIgnoreShow=NI(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 YI=ZQ;var tjn=x(T(),1);function wI(e){e=e??B.EMPTY_OBJECT;let t=e.command,n=e.primitiveRenderResources,i=n.model;this._model=i;let o=n.runtimePrimitive;this._runtimePrimitive=o,this._primitiveRenderResources=n;let r=t.pass===Le.TRANSLUCENT,a=!o.primitive.material.doubleSided&&!r,c=n.hasSilhouette,d=!r&&!c,u=n.hasSkipLevelOfDetail&&!r,h=c,p=l(n.edgeGeometry);this._command=t,this._modelMatrix=F.clone(t.modelMatrix),this._boundingVolume=de.clone(t.boundingVolume),this._modelMatrix2D=new F,this._boundingVolume2D=new de,this._modelMatrix2DDirty=!1,this._backFaceCulling=t.renderState.cull.enabled,this._cullFace=t.renderState.cull.face,this._shadows=i.shadows,this._debugShowBoundingVolume=t.debugShowBoundingVolume,this._usesBackFaceCulling=a,this._needsTranslucentCommand=d,this._needsSkipLevelOfDetailCommands=u,this._needsSilhouetteCommands=h,this._needsEdgeCommands=p,this._originalCommand=void 0,this._translucentCommand=void 0,this._skipLodBackfaceCommand=void 0,this._skipLodStencilCommand=void 0,this._silhouetteModelCommand=void 0,this._silhouetteColorCommand=void 0,this._edgeCommand=void 0,this._derivedCommands=[],this._has2DCommands=!1,M6e(this)}function Ep(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}Ep.clone=function(e){return new Ep({command:e.command,updateShadows:e.updateShadows,updateBackFaceCulling:e.updateBackFaceCulling,updateCullFace:e.updateCullFace,updateDebugShowBoundingVolume:e.updateDebugShowBoundingVolume,is2D:e.is2D,derivedCommand2D:e.derivedCommand2D})};function M6e(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 Ep({command:t,updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0,is2D:!1}),o.push(e._originalCommand),e._needsTranslucentCommand&&(e._translucentCommand=new Ep({command:H6e(t),updateShadows:!0,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!0}),o.push(e._translucentCommand)),e._needsSkipLevelOfDetailCommands&&(e._skipLodBackfaceCommand=new Ep({command:eqe(t),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:i,updateDebugShowBoundingVolume:!1}),e._skipLodStencilCommand=new Ep({command:tqe(t,n),updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0}),o.push(e._skipLodBackfaceCommand),o.push(e._skipLodStencilCommand)),e._needsSilhouetteCommands&&(e._silhouetteModelCommand=new Ep({command:K6e(t,n),updateShadows:!0,updateBackFaceCulling:i,updateCullFace:i,updateDebugShowBoundingVolume:!0}),e._silhouetteColorCommand=new Ep({command:J6e(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 Ep({command:j6e(t,r,n),updateShadows:!1,updateBackFaceCulling:!1,updateCullFace:!1,updateDebugShowBoundingVolume:!1}),o.push(e._edgeCommand)}}Object.defineProperties(wI.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,U6e(this)}},backFaceCulling:{get:function(){return this._backFaceCulling},set:function(e){this._backFaceCulling!==e&&(this._backFaceCulling=e,D6e(this))}},cullFace:{get:function(){return this._cullFace},set:function(e){this._cullFace!==e&&(this._cullFace=e,O6e(this))}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,B6e(this))}}});function k6e(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 U6e(e){let t=e.shadows,n=Cn.castShadows(t),i=Cn.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 D6e(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=ze(r.renderState,!0);s.cull.enabled=t,r.renderState=De.fromCache(s)}}}function O6e(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=ze(r.renderState,!0);s.cull.face=t,r.renderState=De.fromCache(s)}}}function B6e(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}}}wI.prototype.pushCommands=function(e,t){let n=CQ(this,e);n&&!this._has2DCommands&&(z6e(this),this._has2DCommands=!0,this._modelMatrix2DDirty=!0),this._modelMatrix2DDirty&&(k6e(this,e),this._modelMatrix2DDirty=!1);let i=this.model.styleCommandsNeeded;if(!(this._needsTranslucentCommand&&l(i)&&(i!==$h.ALL_OPAQUE&&My(t,this._translucentCommand,n),i===$h.ALL_TRANSLUCENT))){if(this._needsSkipLevelOfDetailCommands){let{tileset:o,tile:r}=this._model.content;if(o.hasMixedContent){r._finalResolution||My(o._backfaceCommands,this._skipLodBackfaceCommand,n),Q6e(this,r,n),My(t,this._skipLodStencilCommand,n);return}}if(this._needsSilhouetteCommands){My(t,this._silhouetteModelCommand,n);return}return My(t,this._originalCommand,n),this._needsEdgeCommands&&My(t,this._edgeCommand,n),t}};wI.prototype.pushSilhouetteCommands=function(e,t){let n=CQ(this,e);return My(t,this._silhouetteColorCommand,n),t};wI.prototype.pushEdgeCommands=function(e,t){if(!l(this._edgeCommand))return t;let n=CQ(this,e);return My(t,this._edgeCommand,n),t};function My(e,t,n){e.push(t.command),n&&e.push(t.derivedCommand2D.command)}function CQ(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=Ep.clone(t),i=et.shallowClone(t.command);return i.modelMatrix=e._modelMatrix2D,i.boundingVolume=e._boundingVolume2D,n.command=i,n.updateShadows=!1,n.is2D=!0,t.derivedCommand2D=n,e._derivedCommands.push(n),n}function z6e(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 H6e(e){let t=et.shallowClone(e);t.pass=Le.TRANSLUCENT;let n=ze(e.renderState,!0);return n.cull.enabled=!1,n.depthMask=!1,n.blending=tn.ALPHA_BLEND,t.renderState=De.fromCache(n),t}function K6e(e,t){let n=t._silhouetteId%255,i=et.shallowClone(e),o=ze(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 J6e(e,t){let n=t._silhouetteId%255,i=et.shallowClone(e),o=ze(e.renderState,!0);o.cull.enabled=!1,(e.pass===Le.TRANSLUCENT||t.silhouetteColor.alpha<1)&&(i.pass=Le.TRANSLUCENT,o.depthMask=!1,o.blending=tn.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=ze(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 j6e(e,t){let n=t.edgeGeometry,i=et.shallowClone(e);i.vertexArray=n.vertexArray,i.primitiveType=n.primitiveType,i.count=n.indexCount,l(n.shaderProgram)&&(i.shaderProgram=n.shaderProgram),i.pass=n.pass;let o=ze(e.uniformMap);return o.u_isEdgePass=function(){return!0},i.uniformMap=o,i.uniformMap=o,i.castShadows=!1,i.receiveShadows=!1,i}function Q6e(e,t,n){let i=e._skipLodStencilCommand,o=i.command,r=t._selectionDepth,s=q6e(o);if(r!==s){let a=$6e(r),c=ze(o.renderState,!0);c.stencilTest.reference=a,o.renderState=De.fromCache(c),n&&(i.derivedCommand2D.renderState=c)}}function q6e(e){return(e.renderState.stencilTest.reference&Ot.SKIP_LOD_MASK)>>>Ot.SKIP_LOD_BIT_SHIFT}function $6e(e){return Ot.CESIUM_3D_TILE_MASK|e<<Ot.SKIP_LOD_BIT_SHIFT}function eqe(e){let t=et.shallowClone(e),n=ze(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=ze(t.uniformMap),o=new M(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 tqe(e){let t=et.shallowClone(e),n=ze(e.renderState,!0),{stencilTest:i}=n;return i.enabled=!0,i.mask=Ot.SKIP_LOD_MASK,i.reference=Ot.CESIUM_3D_TILE_MASK,i.frontFunction=jn.GREATER_OR_EQUAL,i.frontOperation.zPass=Zt.REPLACE,i.backFunction=jn.GREATER_OR_EQUAL,i.backOperation.zPass=Zt.REPLACE,n.stencilMask=Ot.CESIUM_3D_TILE_MASK|Ot.SKIP_LOD_MASK,t.renderState=De.fromCache(n),t}var MI=wI;var ijn=x(T(),1),kI=`precision highp float;
czm_modelVertexOutput defaultVertexOutput(vec3 positionMC) {
czm_modelVertexOutput vsOutput;
vsOutput.positionMC = positionMC;
vsOutput.pointSize = 1.0;
return vsOutput;
}
void main()
{
// Initialize the attributes struct with all
// attributes except quantized ones.
ProcessedAttributes attributes;
initializeAttributes(attributes);
#ifdef HAS_IMAGERY
initializeImageryAttributes();
#endif
// Dequantize the quantized ones and add them to the
// attributes struct.
#ifdef USE_DEQUANTIZATION
dequantizationStage(attributes);
#endif
#ifdef HAS_MORPH_TARGETS
morphTargetsStage(attributes);
#endif
#ifdef HAS_SKINNING
skinningStage(attributes);
#endif
#ifdef HAS_PRIMITIVE_OUTLINE
primitiveOutlineStage();
#endif
// Compute the bitangent according to the formula in the glTF spec.
// Normal and tangents can be affected by morphing and skinning, so
// the bitangent should not be computed until their values are finalized.
#ifdef HAS_BITANGENTS
attributes.bitangentMC = normalize(cross(attributes.normalMC, attributes.tangentMC) * attributes.tangentSignMC);
#endif
FeatureIds featureIds;
featureIdStage(featureIds, attributes);
#ifdef HAS_SELECTED_FEATURE_ID
SelectedFeature feature;
selectedFeatureIdStage(feature, featureIds);
// Handle any show properties that come from the style.
cpuStylingStage(attributes.positionMC, feature);
#endif
#if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)
// The scene mode 2D pipeline stage and instancing stage add a different
// model view matrix to accurately project the model to 2D. However, the
// output positions and normals should be transformed by the 3D matrices
// to keep the data the same for the fragment shader.
mat4 modelView = czm_modelView3D;
mat3 normal = czm_normal3D;
#else
// These are used for individual model projection because they will
// automatically change based on the scene mode.
mat4 modelView = czm_modelView;
mat3 normal = czm_normal;
#endif
// Update the position for this instance in place
#ifdef HAS_INSTANCING
// The legacy instance stage is used when rendering i3dm models that
// encode instances transforms in world space, as opposed to glTF models
// that use EXT_mesh_gpu_instancing, where instance transforms are encoded
// in object space.
#ifdef USE_LEGACY_INSTANCING
mat4 instanceModelView;
mat3 instanceModelViewInverseTranspose;
legacyInstancingStage(attributes, instanceModelView, instanceModelViewInverseTranspose);
modelView = instanceModelView;
normal = instanceModelViewInverseTranspose;
#else
instancingStage(attributes);
#endif
#ifdef USE_PICKING
v_pickColor = a_pickColor;
#endif
#endif
Metadata metadata;
MetadataClass metadataClass;
MetadataStatistics metadataStatistics;
metadataStage(featureIds, metadata, metadataClass, metadataStatistics, attributes);
#ifdef HAS_VERTICAL_EXAGGERATION
verticalExaggerationStage(attributes);
#endif
#ifdef HAS_CUSTOM_VERTEX_SHADER
czm_modelVertexOutput vsOutput = defaultVertexOutput(attributes.positionMC);
customShaderStage(vsOutput, attributes, featureIds, metadata, metadataClass, metadataStatistics);
#endif
// Compute the final position in each coordinate system needed.
// This returns the value that will be assigned to gl_Position.
vec4 positionClip = geometryStage(attributes, modelView, normal);
#if defined(HAS_LINE_CUMULATIVE_DISTANCE) || defined(HAS_LINE_PATTERN)
lineStyleStageVS(attributes);
#endif
// This must go after the geometry stage as it needs v_positionWC
#ifdef HAS_ATMOSPHERE
atmosphereStage(attributes);
#endif
#ifdef ENABLE_CLIPPING_POLYGONS
modelClippingPolygonsStage(attributes);
#endif
#ifdef HAS_SILHOUETTE
silhouetteStage(attributes, positionClip);
#endif
#ifdef HAS_POINT_CLOUD_SHOW_STYLE
float show = pointCloudShowStylingStage(attributes, metadata);
#else
float show = 1.0;
#endif
#ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING
show *= pointCloudBackFaceCullingStage();
#endif
#ifdef HAS_POINT_CLOUD_COLOR_STYLE
v_pointCloudColor = pointCloudColorStylingStage(attributes, metadata);
#endif
#ifdef PRIMITIVE_TYPE_POINTS
#ifdef HAS_CUSTOM_VERTEX_SHADER
gl_PointSize = vsOutput.pointSize;
#elif defined(HAS_POINT_CLOUD_POINT_SIZE_STYLE) || defined(HAS_POINT_CLOUD_ATTENUATION)
gl_PointSize = pointCloudPointSizeStylingStage(attributes, metadata);
#elif defined(HAS_POINT_DIAMETER)
gl_PointSize = u_pointDiameter;
#else
gl_PointSize = 1.0;
#endif
gl_PointSize *= show;
#endif
// Important NOT to compute gl_Position = show * positionClip or we hit:
// https://github.com/CesiumGS/cesium/issues/11270
//
// We will discard points with v_pointCloudShow == 0 in the fragment shader.
gl_Position = positionClip;
#ifdef HAS_EDGE_VISIBILITY
edgeVisibilityStageVS();
#endif
#ifdef HAS_POINT_CLOUD_SHOW_STYLE
v_pointCloudShow = show;
#endif
}
`;var rjn=x(T(),1),UI=`
precision highp float;
czm_modelMaterial defaultModelMaterial()
{
czm_modelMaterial material;
material.diffuse = vec3(0.0);
material.specular = vec3(1.0);
material.roughness = 1.0;
material.occlusion = 1.0;
material.normalEC = vec3(0.0, 0.0, 1.0);
material.emissive = vec3(0.0);
material.alpha = 1.0;
return material;
}
vec4 handleAlpha(vec3 color, float alpha)
{
#ifdef ALPHA_MODE_MASK
if (alpha < u_alphaCutoff) {
discard;
}
#endif
return vec4(color, alpha);
}
void lineStyleStage()
{
#if defined(HAS_LINE_PATTERN) && !defined(HAS_EDGE_VISIBILITY)
const float maskLength = 16.0;
float dashPosition = fract(v_lineCoord / maskLength);
float maskIndex = floor(dashPosition * maskLength);
float maskTest = floor(u_linePattern / pow(2.0, maskIndex));
if (mod(maskTest, 2.0) < 1.0) {
discard;
}
#endif
}
SelectedFeature selectedFeature;
void main()
{
#if defined(PRIMITIVE_TYPE_POINTS) && defined(HAS_POINT_DIAMETER)
// Render points as circles
float distanceToCenter = length(gl_PointCoord - vec2(0.5));
if (distanceToCenter > 0.5) {
discard;
}
#endif
#ifdef HAS_POINT_CLOUD_SHOW_STYLE
if (v_pointCloudShow == 0.0)
{
discard;
}
#endif
#ifdef HAS_MODEL_SPLITTER
modelSplitterStage();
#endif
czm_modelMaterial material = defaultModelMaterial();
ProcessedAttributes attributes;
geometryStage(attributes);
FeatureIds featureIds;
featureIdStage(featureIds, attributes);
Metadata metadata;
MetadataClass metadataClass;
MetadataStatistics metadataStatistics;
metadataStage(featureIds, metadata, metadataClass, metadataStatistics, attributes);
//========================================================================
// When not picking metadata START
#ifndef METADATA_PICKING_ENABLED
#ifdef HAS_SELECTED_FEATURE_ID
selectedFeatureIdStage(selectedFeature, featureIds);
#endif
#ifndef CUSTOM_SHADER_REPLACE_MATERIAL
materialStage(material, attributes, selectedFeature);
#endif
#ifdef HAS_CUSTOM_FRAGMENT_SHADER
customShaderStage(material, attributes, featureIds, metadata, metadataClass, metadataStatistics);
#endif
lightingStage(material, attributes);
#ifdef HAS_SELECTED_FEATURE_ID
cpuStylingStage(material, selectedFeature);
#endif
#ifdef HAS_MODEL_COLOR
modelColorStage(material);
#endif
#ifdef HAS_PRIMITIVE_OUTLINE
primitiveOutlineStage(material);
#endif
vec4 color = handleAlpha(material.diffuse, material.alpha);
// When not picking metadata END
//========================================================================
#else
//========================================================================
// When picking metadata START
vec4 metadataValues = vec4(0.0, 0.0, 0.0, 0.0);
metadataPickingStage(metadata, metadataClass, metadataValues);
vec4 color = metadataValues;
#endif
// When picking metadata END
//========================================================================
lineStyleStage();
#ifdef HAS_CLIPPING_PLANES
modelClippingPlanesStage(color);
#endif
#ifdef ENABLE_CLIPPING_POLYGONS
modelClippingPolygonsStage();
#endif
//========================================================================
// When not picking metadata START
#ifndef METADATA_PICKING_ENABLED
#if defined(HAS_SILHOUETTE) && defined(HAS_NORMALS)
silhouetteStage(color);
#endif
#ifdef HAS_ATMOSPHERE
atmosphereStage(color, attributes);
#endif
#ifdef HAS_EDGE_VISIBILITY
edgeVisibilityStage(color, featureIds);
edgeDetectionStage(color, featureIds);
#endif
#endif
// When not picking metadata END
//========================================================================
out_FragColor = color;
}
`;function Tpe(){}Tpe.buildModelDrawCommand=function(e,t){let n=e.shaderBuilder,i=nqe(e,n,t),o=iqe(e,i,t),r=e.model;return l(r.classificationType)?new YI({primitiveRenderResources:e,command:o}):new MI({primitiveRenderResources:e,command:o})};function nqe(e,t,n){t.addVertexLines(kI),t.addFragmentLines(UI);let i=e.model,o=t.buildShaderProgram(n.context);return i._pipelineResources.push(o),o}function iqe(e,t,n){let i=oqe(e),o=new Mn({context:n.context,indexBuffer:i,attributes:e.attributes}),r=e.model;r._pipelineResources.push(o);let s=e.alphaOptions.pass,a=r.sceneGraph,c=n.mode===re.SCENE3D,d,u;if(!c&&!n.scene3DOnly&&r._projectTo2D)d=F.multiplyTransformation(a._computedModelMatrix,e.runtimeNode.computedTransform,new F),u=e.runtimePrimitive.boundingSphere2D;else{let S=c?a._computedModelMatrix:a._computedModelMatrix2D;d=F.multiplyTransformation(S,e.runtimeNode.computedTransform,new F),u=de.transform(e.boundingSphere,d)}let h=ze(De.fromCache(e.renderStateOptions),!0);h.cull.face=mt.getCullFace(d,e.primitiveType),h=De.fromCache(h);let p=l(r.classificationType),b=p?!1:Cn.castShadows(r.shadows),f=p?!1:Cn.receiveShadows(r.shadows),y=p?void 0:e.pickId;return new et({boundingVolume:u,modelMatrix:d,uniformMap:e.uniformMap,renderState:h,vertexArray:o,shaderProgram:t,cull:r.cull,pass:s,count:e.count,owner:r,pickId:y,pickMetadataAllowed:!0,instanceCount:e.instanceCount,primitiveType:e.primitiveType,debugShowBoundingVolume:r.debugShowBoundingVolume,castShadows:b,receiveShadows:f})}function oqe(e){let t=e.wireframeIndexBuffer;if(l(t))return t;let n=e.indices;if(l(n))return n.buffer}var DI=Tpe;function tl(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=mt.getAxisCorrectionMatrix(t.upAxis,t.forwardAxis,new F),this._runtimeArticulations={},rqe(this)}Object.defineProperties(tl.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 rqe(e){let t=e._components,n=t.scene,o=e._model.modelMatrix;_pe(e,o);let r=t.articulations,s=r.length,a=e._runtimeArticulations;for(let A=0;A<s;A++){let Z=r[A],V=new e2({articulation:Z,sceneGraph:e}),E=V.name;a[E]=V}let c=t.nodes,d=c.length;e._runtimeNodes=new Array(d);let h=n.nodes.length,p=F.IDENTITY;for(let A=0;A<h;A++){let Z=n.nodes[A],V=Spe(e,Z,p);e._rootNodes.push(V)}let b=t.skins,f=e._runtimeSkins,y=b.length;for(let A=0;A<y;A++){let Z=b[A];f.push(new RI({skin:Z,sceneGraph:e}))}let _=e._skinnedNodes,S=_.length;for(let A=0;A<S;A++){let Z=_[A],V=e._runtimeNodes[Z],L=c[Z].skin.index;V._runtimeSkin=f[L],V.updateJointMatrices()}e.applyArticulations()}function _pe(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 sqe=new m;function aqe(e,t){let n=e._computedModelMatrix,i=F.getTranslation(n,sqe);if(!m.equals(i,m.ZERO))e._computedModelMatrix2D=dt.basisTo2D(t.mapProjection,n,e._computedModelMatrix2D);else{let o=e.boundingSphere.center,r=dt.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 Spe(e,t,n){let i=[],o=mt.getNodeTransform(t),r=t.children.length;for(let u=0;u<r;u++){let h=t.children[u],p=F.multiplyTransformation(n,o,new F),b=Spe(e,h,p);i.push(b)}let s=new p2({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,h=new a2(u,s);u._nodesByName[d]=h}return c}var cqe=new m,lqe=new m,dqe=new m,uqe=new m;tl.prototype.buildDrawCommands=function(e){let t=this.buildRenderResources(e);this.computeBoundingVolumes(t),this.createDrawCommands(t,e)};tl.prototype.buildRenderResources=function(e){let t=this._model,n=new EI(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 II(n,r);n.nodeRenderResources[o]=a;for(let c=0;c<s.length;c++)s[c].process(a,r.node,e);for(let c=0;c<r.runtimePrimitives.length;c++){let d=r.runtimePrimitives[c];d.configurePipeline(e);let u=d.pipelineStages,h=new XI(a,d);a.primitiveRenderResources[c]=h;for(let p=0;p<u.length;p++)u[p].process(h,d.primitive,e)}}return n};tl.prototype.computeBoundingVolumes=function(e){let t=this._model,n=m.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,cqe),i=m.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,lqe);for(let o=0;o<this._runtimeNodes.length;o++){let r=this._runtimeNodes[o];if(!l(r))continue;let s=e.nodeRenderResources[o],a=r.computedTransform;for(let c=0;c<r.runtimePrimitives.length;c++){let d=r.runtimePrimitives[c],u=s.primitiveRenderResources[c];d.boundingSphere=de.clone(u.boundingSphere,new de);let h=F.multiplyByPoint(a,u.positionMin,dqe),p=F.multiplyByPoint(a,u.positionMax,uqe);m.minimumByComponent(n,h,n),m.maximumByComponent(i,p,i)}}this._boundingSphere=de.fromCornerPoints(n,i,new de),this._boundingSphere=de.transformWithoutScale(this._boundingSphere,this._axisCorrectionMatrix,this._boundingSphere),this._boundingSphere=de.transform(this._boundingSphere,this._components.transform,this._boundingSphere),t._boundingSphere=de.transform(this._boundingSphere,t.modelMatrix,t._boundingSphere),t._initialRadius=t._boundingSphere.radius,t._boundingSphere.radius*=t._clampedScale};tl.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=DI.buildModelDrawCommand(a,t);s.drawCommand=c}}};tl.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(qF),n.isClippingEnabled()&&t.push(i2),n.isClippingPolygonsEnabled()&&t.push(s2),n.hasSilhouette(e)&&t.push(WI),l(n.splitDirection)&&n.splitDirection!==Er.NONE&&t.push(FI),Lr.is3DTiles(n.type)&&t.push(HF),i&&t.push(jF))};tl.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)}}};tl.prototype.updateModelMatrix=function(e,t){_pe(this,e),t.mode!==re.SCENE3D&&aqe(this,t);let n=this._rootNodes;for(let i=0;i<n.length;i++){let o=this._runtimeNodes[n[i]];o._transformDirty=!0}};tl.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 Ape(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);Ape(e,d,n,i,o)}let s=t.runtimePrimitives,a=s.length;for(let c=0;c<a;c++){let d=s[c];i(d,o)}}function TD(e,t,n,i){let o=e._rootNodes,r=o.length;for(let s=0;s<r;s++){let a=o[s],c=e._runtimeNodes[a];Ape(e,c,t,n,i)}}var mqe={backFaceCulling:void 0};tl.prototype.updateBackFaceCulling=function(e){let t=mqe;t.backFaceCulling=e,TD(this,!1,hqe,t)};function hqe(e,t){let n=e.drawCommand;n.backFaceCulling=t.backFaceCulling}var fqe={shadowMode:void 0};tl.prototype.updateShadows=function(e){let t=fqe;t.shadowMode=e,TD(this,!1,pqe,t)};function pqe(e,t){let n=e.drawCommand;n.shadows=t.shadowMode}var bqe={debugShowBoundingVolume:void 0};tl.prototype.updateShowBoundingVolume=function(e){let t=bqe;t.debugShowBoundingVolume=e,TD(this,!1,gqe,t)};function gqe(e,t){let n=e.drawCommand;n.debugShowBoundingVolume=t.debugShowBoundingVolume}var Zpe=[],Cpe=[],yqe={frameState:void 0,hasSilhouette:void 0};tl.prototype.pushDrawCommands=function(e){let t=Zpe;t.length=0;let n=Cpe;n.length=0;let i=yqe;i.hasSilhouette=this._model.hasSilhouette(e),i.frameState=e,TD(this,!0,xqe,i),qn(e.commandList,t),qn(e.commandList,n)};function xqe(e,t){let n=t.frameState,i=t.hasSilhouette,o=n.passes,r=Zpe,s=Cpe,a=e.drawCommand;a.pushCommands(n,n.commandList),i&&!o.pick&&a.pushSilhouetteCommands(n,r),l(a.pushEdgeCommands)&&a.pushEdgeCommands(n,s)}tl.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)};tl.prototype.applyArticulations=function(){let e=this._runtimeArticulations;for(let t in e)e.hasOwnProperty(t)&&e[t].apply()};var OI=tl;var e4n=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 It}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 BI=ky;var N4n=x(T(),1);var Gpe=x(lU(),1);var h4n=x(T(),1);var Vpe={},W_=Uint32Array.BYTES_PER_ELEMENT;Vpe.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 le(`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 le("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=xr(n,t,r);t+=r;let u=new Uint8Array(e,t,s);t+=s;let h,p;a>0&&(h=xr(n,t,a),Object.keys(h).length===0&&(h=void 0),t+=a,c>0&&(p=new Uint8Array(e,t,c),p=new Uint8Array(p),t+=c));let b=new Qh(d,u),f=b.getGlobalProperty("POINTS_LENGTH");if(b.featuresLength=f,!l(f))throw new le("Feature table global property: POINTS_LENGTH must be defined");let y=b.getGlobalProperty("RTC_CENTER",K.FLOAT,3);l(y)&&(y=m.unpack(y));let _=_qe(b,h);if(_.rtcCenter=y,_.pointsLength=f,!_.hasPositions){let S=Sqe(b);_.positions=S,_.hasPositions=_.hasPositions||l(S)}if(!_.hasPositions)throw new le("Either POSITION or POSITION_QUANTIZED must be defined.");if(!_.hasNormals){let S=Zqe(b);_.normals=S,_.hasNormals=_.hasNormals||l(S)}if(!_.hasColors){let S=Aqe(b);_.colors=S,_.hasColors=_.hasColors||l(S),_.hasConstantColor=l(_.constantColor),_.isTranslucent=l(S)&&S.isTranslucent}if(!_.hasBatchIds){let S=Cqe(b);_.batchIds=S,_.hasBatchIds=_.hasBatchIds||l(S)}if(_.hasBatchIds){let S=b.getGlobalProperty("BATCH_LENGTH");if(!l(S))throw new le("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");_.batchLength=S}return(l(h)||l(p))&&(_.batchTableJson=h,_.batchTableBinary=p),Tqe(_),_};function Tqe(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)Tt("PntsParser-invalidBinaryBodyReference",`The point cloud data contained a binary property ${r} that could not be resolved - skipping`),delete t[r]}function _qe(e,t){let n=e.json,i,o,r,s=l(n.extensions)?n.extensions["3DTILES_draco_point_compression"]:void 0,a=l(t)&&l(t.extensions)?t.extensions["3DTILES_draco_point_compression"]:void 0;l(a)&&(r=a.properties);let c,d,u,h,p;if(l(s)){o=s.properties;let f=s.byteOffset,y=s.byteLength;if(!l(o)||!l(f)||!l(y))throw new le("Draco properties, byteOffset, and byteLength must be defined");i=e.buffer.slice(f,f+y),c=l(o.POSITION),d=l(o.RGB)||l(o.RGBA),u=l(o.NORMAL),h=l(o.BATCH_ID),p=l(o.RGBA)}let b;return l(i)&&(b={buffer:i,featureTableProperties:o,batchTableProperties:r,properties:Rt(o,r),dequantizeInShader:!0}),{draco:b,hasPositions:c,hasColors:d,isTranslucent:p,hasNormals:u,hasBatchIds:h}}function Sqe(e){let t=e.json,n;if(l(t.POSITION))return n=e.getPropertyArray("POSITION",K.FLOAT,3),{name:nt.POSITION,semantic:nt.POSITION,typedArray:n,isQuantized:!1,componentDatatype:K.FLOAT,type:Nt.VEC3};if(l(t.POSITION_QUANTIZED)){n=e.getPropertyArray("POSITION_QUANTIZED",K.UNSIGNED_SHORT,3);let i=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",K.FLOAT,3);if(!l(i))throw new le("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");let o=65535,r=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",K.FLOAT,3);if(!l(r))throw new le("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");return{name:nt.POSITION,semantic:nt.POSITION,typedArray:n,isQuantized:!0,componentDatatype:K.FLOAT,type:Nt.VEC3,quantizedRange:o,quantizedVolumeOffset:m.unpack(r),quantizedVolumeScale:m.unpack(i),quantizedComponentDatatype:K.UNSIGNED_SHORT,quantizedType:Nt.VEC3}}}function Aqe(e){let t=e.json,n;if(l(t.RGBA))return n=e.getPropertyArray("RGBA",K.UNSIGNED_BYTE,4),{name:nt.COLOR,semantic:nt.COLOR,setIndex:0,typedArray:n,componentDatatype:K.UNSIGNED_BYTE,type:Nt.VEC4,normalized:!0,isRGB565:!1,isTranslucent:!0};if(l(t.RGB))return n=e.getPropertyArray("RGB",K.UNSIGNED_BYTE,3),{name:"COLOR",semantic:nt.COLOR,setIndex:0,typedArray:n,componentDatatype:K.UNSIGNED_BYTE,type:Nt.VEC3,normalized:!0,isRGB565:!1,isTranslucent:!1};if(l(t.RGB565))return n=e.getPropertyArray("RGB565",K.UNSIGNED_SHORT,1),{name:"COLOR",semantic:nt.COLOR,setIndex:0,typedArray:n,componentDatatype:K.FLOAT,type:Nt.VEC3,normalized:!1,isRGB565:!0,isTranslucent:!1};if(l(t.CONSTANT_RGBA)){let i=e.getGlobalProperty("CONSTANT_RGBA",K.UNSIGNED_BYTE,4),o=i[3],r=U.fromBytes(i[0],i[1],i[2],o),s=o<255;return{name:nt.COLOR,semantic:nt.COLOR,setIndex:0,constantColor:r,componentDatatype:K.FLOAT,type:Nt.VEC4,isQuantized:!1,isTranslucent:s}}}function Zqe(e){let t=e.json,n;if(l(t.NORMAL))return n=e.getPropertyArray("NORMAL",K.FLOAT,3),{name:nt.NORMAL,semantic:nt.NORMAL,typedArray:n,octEncoded:!1,octEncodedZXY:!1,componentDatatype:K.FLOAT,type:Nt.VEC3};if(l(t.NORMAL_OCT16P))return n=e.getPropertyArray("NORMAL_OCT16P",K.UNSIGNED_BYTE,2),{name:nt.NORMAL,semantic:nt.NORMAL,typedArray:n,octEncoded:!0,octEncodedZXY:!1,quantizedRange:(1<<8)-1,quantizedType:Nt.VEC2,quantizedComponentDatatype:K.UNSIGNED_BYTE,componentDatatype:K.FLOAT,type:Nt.VEC3}}function Cqe(e){let t=e.json;if(l(t.BATCH_ID)){let n=e.getPropertyArray("BATCH_ID",K.UNSIGNED_SHORT,1);return{name:nt.FEATURE_ID,semantic:nt.FEATURE_ID,setIndex:0,typedArray:n,componentDatatype:K.fromTypedArray(n),type:Nt.SCALAR}}}var v_=Vpe;var Vqe=yn.Components,Rqe=yn.Scene,Eqe=yn.Node,Gqe=yn.Primitive,Lqe=yn.Attribute,Rpe=yn.Quantization,Wqe=yn.FeatureIdAttribute,vqe=yn.Material,Fqe=yn.MetallicRoughness,VQ=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=ut.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=ut.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===ut.READY)return!0;if(this._state===ut.PROCESSING){if(l(this._decodePromise))return!1;this._decodePromise=Iqe(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 Iqe(e,t){let i=e._parsedContent.draco,o;if(l(i)?o=ab.decodePointCloud(i,t):o=Promise.resolve(),!!l(o))return e._decodePromise=o,o.then(function(r){if(!e.isDestroyed())return l(r)&&Pqe(e,i,r),zqe(e,t),e._state=ut.READY,e}).catch(function(r){e.unload(),e._state=ut.FAILED;let s="Failed to load Draco pnts";e._error=e.getError(s,r)})}function Pqe(e,t,n){e._state=ut.READY;let i=e._parsedContent,o;if(l(n.POSITION)){if(o={name:"POSITION",semantic:nt.POSITION,typedArray:n.POSITION.array,componentDatatype:K.FLOAT,type:Nt.VEC3,isQuantized:!1},l(n.POSITION.data.quantization)){let a=n.POSITION.data.quantization,c=a.range,d=m.fromElements(c,c,c),u=m.unpack(a.minValues),h=(1<<a.quantizationBits)-1;o.isQuantized=!0,o.quantizedRange=h,o.quantizedVolumeOffset=u,o.quantizedVolumeScale=d,o.quantizedComponentDatatype=h<=255?K.UNSIGNED_BYTE:K.UNSIGNED_SHORT,o.quantizedType=Nt.VEC3}i.positions=o}if(l(n.NORMAL)){if(o={name:"NORMAL",semantic:nt.NORMAL,typedArray:n.NORMAL.array,componentDatatype:K.FLOAT,type:Nt.VEC3,isQuantized:!1,octEncoded:!1,octEncodedZXY:!1},l(n.NORMAL.data.quantization)){let a=(1<<n.NORMAL.data.quantization.quantizationBits)-1;o.quantizedRange=a,o.octEncoded=!0,o.octEncodedZXY=!0,o.quantizedComponentDatatype=K.UNSIGNED_BYTE,o.quantizedType=Nt.VEC2}i.normals=o}if(l(n.RGBA)?i.colors={name:"COLOR",semantic:nt.COLOR,setIndex:0,typedArray:n.RGBA.array,componentDatatype:K.UNSIGNED_BYTE,type:Nt.VEC4,normalized:!0,isTranslucent:!0}:l(n.RGB)&&(i.colors={name:"COLOR",semantic:nt.COLOR,setIndex:0,typedArray:n.RGB.array,componentDatatype:K.UNSIGNED_BYTE,type:Nt.VEC3,normalized:!0,isTranslucent:!1}),l(n.BATCH_ID)){let a=n.BATCH_ID.array;i.batchIds={name:"_FEATURE_ID",semantic:nt.FEATURE_ID,setIndex:0,typedArray:a,componentDatatype:K.fromTypedArray(a),type:Nt.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:Xqe(d.componentsPerAttribute),componentType:Nqe(d.componentDatatype),typedArray:c.array}}i.batchTableJson=r}function Xqe(e){switch(e){case 1:return"SCALAR";case 2:return"VEC2";case 3:return"VEC3";case 4:return"VEC4"}}function Nqe(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 zI(e,t,n){let i=t.typedArray,o;if(t.octEncoded&&(o=new Rpe,o.octEncoded=t.octEncoded,o.octEncodedZXY=t.octEncodedZXY,o.normalizationRange=t.quantizedRange,o.type=t.quantizedType,o.componentDatatype=t.quantizedComponentDatatype),t.isQuantized){o=new Rpe;let a=t.quantizedRange;o.normalizationRange=a,o.quantizedVolumeOffset=m.ZERO;let c=t.quantizedVolumeScale;o.quantizedVolumeDimensions=c,o.quantizedVolumeStepSize=m.divideByScalar(c,a,new m),o.componentDatatype=t.quantizedComponentDatatype,o.type=t.quantizedType}let r=new Lqe;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=cn.decodeRGB565(i)),l(t.constantColor)){let a=new Array(4);r.constant=U.pack(t.constantColor,a)}else{let a=qe.createVertexBuffer({typedArray:i,context:n,usage:Fe.STATIC_DRAW});a.vertexArrayDestroyable=!1,e._buffers.push(a),r.buffer=a}let s=e._loadAttributesFor2D;return r.semantic===nt.POSITION&&s&&(r.typedArray=i),r}var Epe,_D;function Yqe(e){if(!l(_D)){Epe=new Gpe.default(0),_D=new Array(e);for(let t=0;t<e;++t)_D[t]=Epe.random()}return _D}var wqe=new m,Mqe=new m,kqe=new m;function Uqe(e){let t=e.typedArray,n=20,i=t.length/3,o=Math.min(i,n),r=Yqe(n),s=Number.MAX_VALUE,a=-Number.MAX_VALUE,c=m.fromElements(s,s,s,wqe),d=m.fromElements(a,a,a,Mqe),u,h,p;if(e.isQuantized)c=m.ZERO,d=e.quantizedVolumeScale;else for(u=0;u<o;++u)h=Math.floor(r[u]*i),p=m.unpack(t,h*3,kqe),m.minimumByComponent(c,p,c),m.maximumByComponent(d,p,d);e.min=m.clone(c),e.max=m.clone(d)}var Dqe={name:nt.COLOR,semantic:nt.COLOR,setIndex:0,constantColor:U.DARKGRAY,componentDatatype:K.FLOAT,type:Nt.VEC4,isQuantized:!1,isTranslucent:!1};function Oqe(e,t,n){let i=[],o,r=t.positions;return l(r)&&(Uqe(r),o=zI(e,r,n),o.count=t.pointsLength,i.push(o)),l(t.normals)&&(o=zI(e,t.normals,n),o.count=t.pointsLength,i.push(o)),l(t.colors)?(o=zI(e,t.colors,n),o.count=t.pointsLength,i.push(o)):(o=zI(e,Dqe,n),o.count=t.pointsLength,i.push(o)),l(t.batchIds)&&(o=zI(e,t.batchIds,n),o.count=t.pointsLength,i.push(o)),i}function Bqe(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?Tb({count:n??i,batchTable:o,binaryBody:r,parseAsPropertyAttributes:s,customAttributeOutput:t}):new va({schema:{},propertyTables:[]})}function zqe(e,t){let n=e._parsedContent,i=new Fqe;i.metallicFactor=0,i.roughnessFactor=.9;let o=new vqe;o.metallicRoughness=i;let r=n.colors;l(r)&&r.isTranslucent&&(o.alphaMode=_p.BLEND);let s=!l(n.normals);o.unlit=s;let a=new Gqe;if(a.attributes=Oqe(e,n,t),a.primitiveType=ve.POINTS,a.material=o,l(n.batchIds)){let b=new Wqe;b.propertyTableId=0,b.setIndex=0,b.positionalLabel="featureId_0",a.featureIds.push(b)}let c=new Eqe;c.index=0,c.primitives=[a];let d=new Rqe;d.nodes=[c],d.upAxis=to.Z,d.forwardAxis=to.X;let u=new Vqe;u.scene=d,u.nodes=[c];let h=[];u.structuralMetadata=Bqe(n,h),h.length>0&&Hqe(e,a,h,t),l(n.rtcCenter)&&(u.transform=F.multiplyByTranslation(u.transform,n.rtcCenter,u.transform));let p=n.positions;l(p)&&p.isQuantized&&(u.transform=F.multiplyByTranslation(u.transform,p.quantizedVolumeOffset,u.transform)),e._components=u,e._parsedContent=void 0,e._arrayBuffer=void 0}function Hqe(e,t,n,i){let o=t.attributes,r=n.length;for(let s=0;s<r;s++){let a=n[s],c=qe.createVertexBuffer({typedArray:a.typedArray,context:i,usage:Fe.STATIC_DRAW});c.vertexArrayDestroyable=!1,e._buffers.push(c),a.buffer=c,a.typedArray=void 0,o.push(a)}t.propertyAttributeIds=[0]}var HI=VQ;var $4n=x(T(),1);var Lpe=new m,Wpe=new m,vpe=new m,Kqe=new m,Jqe=new m,jqe=new m,Qqe=new pe,qqe=new de;function RQ(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 zC(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(la.forEachPrimitive(e,{mapProjection:c},function(d,u,h,p){if(l(d.boundingSphere)&&h.length===1){let A=de.transform(d.boundingSphere,p,qqe),Z=ai.raySphere(t,A);if(!l(Z))return}if(!l(u.indices))return;let b,f,y=mt.getAttributeBySemantic(u,nt.POSITION);l(y)&&(f=Nt.getNumberOfComponents(y.type),b=la.readAttributeAsTypedArray(y));let _;if(l(u.indices)&&(_=la.readIndicesAsTypedArray(u.indices)),!l(_)||!l(b))return;let S=_.length;for(let A=0;A<S;A+=3){let Z=_[A],V=_[A+1],E=_[A+2];RQ(b,Z,f,Lpe),RQ(b,V,f,Wpe),RQ(b,E,f,vpe);for(let L of h){let v=F.multiplyByPoint(L.transform,Lpe,Kqe),I=F.multiplyByPoint(L.transform,Wpe,Jqe),X=F.multiplyByPoint(L.transform,vpe,jqe);i!==1&&(ao.getPosition(v,r,i,o,v),ao.getPosition(I,r,i,o,I),ao.getPosition(X,r,i,o,X));let N=ai.rayTriangleParametric(t,v,I,X,e.backFaceCulling??!0);l(N)&&N<a&&N>=0&&(a=N)}}}),a!==Number.MAX_VALUE){if(s=gn.getPoint(t,a,s),n.mode!==re.SCENE3D){m.fromElements(s.y,s.z,s.x,s);let d=n.mapProjection,u=d.ellipsoid,h=d.unproject(s,Qqe);u.cartographicToCartesian(h,s)}return s}}var cQn=x(T(),1);var tQn=x(T(),1),EQ=class{constructor(t){this.show=t.show,this.alpha=t.alpha,this.brightness=t.brightness,this.contrast=t.contrast,this.hue=t.hue,this.saturation=t.saturation,this.gamma=t.gamma,this.colorToAlpha=t.colorToAlpha}},KI=EQ;var GQ=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 he("The modelPrimitiveImageries have not been created");let n=this._modelPrimitiveImageries,i=n.length;for(let o=0;o<i;o++)n[o].update(t)}_deleteModelPrimitiveImageries(){let t=this._modelPrimitiveImageries;if(!l(t))return;let n=t.length;for(let i=0;i<n;i++)t[i].destroy();delete this._modelPrimitiveImageries,this._model.resetDrawCommands()}get ready(){return this._hasImagery?!(!this._allImageryLayersReady||!this._allModelPrimitiveImageriesReady):!0}get _hasImagery(){let n=this._model.imageryLayers;return l(n)&&n.length>0}get _allImageryLayersReady(){if(!this._hasImagery)return!0;let t=this._model.imageryLayers,n=t.length;for(let i=0;i<n;i++)if(!t.get(i).ready)return!1;return!0}get _allModelPrimitiveImageriesReady(){let t=this._modelPrimitiveImageries;if(!l(t))return!1;let n=t.length;for(let i=0;i<n;i++)if(!t[i].ready)return!1;return!0}_checkForModifiedImageryConfigurations(){this._imageryConfigurationsModified()&&(this._updateImageryConfigurations(),this._model.resetDrawCommands())}_imageryConfigurationsModified(){let n=this._model.imageryLayers,i=this._imageryConfigurations;if(n.length!==i.length)return!0;for(let o=0;o<n.length;o++){let r=n.get(o),s=i[o];if(r.show!==s.show||r.alpha!==s.alpha||r.brightness!==s.brightness||r.contrast!==s.contrast||r.hue!==s.hue||r.saturation!==s.saturation||r.gamma!==s.gamma||r.colorToAlpha!==s.colorToAlpha)return!0}return!1}_updateImageryConfigurations(){let n=this._model.imageryLayers,i=this._imageryConfigurations;i.length=n.length;for(let o=0;o<n.length;o++){let r=n.get(o);i[o]=new KI(r)}}isDestroyed(){return!1}destroy(){if(!this.isDestroyed())return this._deleteModelPrimitiveImageries(),me(this)}},JI=GQ;function So(e){e=e??B.EMPTY_OBJECT,this._loader=e.loader,this._resource=e.resource,this.type=e.type??Lr.GLTF,this.modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this._modelMatrix=F.clone(this.modelMatrix),this._scale=e.scale??1,this._minimumPixelSize=e.minimumPixelSize??0,this._maximumScale=e.maximumScale,this._clampedScale=l(this._maximumScale)?Math.min(this._scale,this._maximumScale):this._scale,this._computedScale=this._clampedScale,this._updateModelMatrix=!1,this.referenceMatrix=void 0,this._iblReferenceFrameMatrix=q.clone(q.IDENTITY),this._resourcesLoaded=!1,this._drawCommandsBuilt=!1,this._ready=!1,this._customShader=e.customShader,this._content=e.content,this._texturesLoaded=!1,this._defaultTexture=void 0,this._activeAnimations=new OF(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??qc.HIGHLIGHT,this._colorBlendAmount=e.colorBlendAmount??.5;let t=e.silhouetteColor??U.RED;this._silhouetteColor=U.clone(t),this._silhouetteSize=e.silhouetteSize??0,this._silhouetteDirty=!1,this._silhouetteId=void 0,this._cull=e.cull??!0,this._opaquePass=e.opaquePass??Le.OPAQUE,this._allowPicking=e.allowPicking??!0,this._show=e.show??!0,this._style=void 0,this._styleDirty=!1,this._styleCommandsNeeded=void 0;let n=e.featureIdLabel??"featureId_0";typeof n=="number"&&(n=`featureId_${n}`),this._featureIdLabel=n;let i=e.instanceFeatureIdLabel??"instanceFeatureId_0";typeof i=="number"&&(i=`instanceFeatureId_${i}`),this._instanceFeatureIdLabel=i,this._featureTables=[],this._featureTableId=void 0,this._featureTableIdDirty=!0,this._pipelineResources=[],this._modelResources=[],this._pickIds=[],this._boundingSphere=new de,this._initialRadius=void 0,this._heightReference=e.heightReference??tt.NONE,this._heightDirty=this._heightReference!==tt.NONE,this._removeUpdateHeightCallback=void 0,this._enableVerticalExaggeration=e.enableVerticalExaggeration??!0,this._hasVerticalExaggeration=!1,this._clampedModelMatrix=void 0;let o=e.scene;l(o)&&l(o.terrainProviderChanged)&&(this._terrainProviderChangedCallback=o.terrainProviderChanged.addEventListener(()=>{this._heightDirty=!0})),this._scene=o,this._distanceDisplayCondition=e.distanceDisplayCondition;let r=new Ap(e.pointCloudShading);this._pointCloudShading=r,this._attenuation=r.attenuation,this._pointCloudBackFaceCulling=r.backFaceCulling;let s=e.clippingPlanes;l(s)&&s.owner===void 0?as.setOwner(s,this,"_clippingPlanes"):this._clippingPlanes=s,this._clippingPlanesState=0,this._clippingPlanesMatrix=F.clone(F.IDENTITY);let a=e.clippingPolygons;l(a)&&a.owner===void 0?Kh.setOwner(a,this,"_clippingPolygons"):this._clippingPolygons=a,this._clippingPolygonsState=0,this._modelImagery=new JI(this),this._lightColor=m.clone(e.lightColor),this._imageBasedLighting=l(e.imageBasedLighting)?e.imageBasedLighting:new qT,this._shouldDestroyImageBasedLighting=!l(e.imageBasedLighting),this._environmentMapManager=void 0;let c=new fb(e.environmentMapOptions);fb.setOwner(c,this,"_environmentMapManager"),this._backFaceCulling=e.backFaceCulling??!0,this._backFaceCullingDirty=!1,this._shadows=e.shadows??Cn.ENABLED,this._shadowsDirty=!1,this._debugShowBoundingVolumeDirty=!1,this._debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this._enableDebugWireframe=e.enableDebugWireframe??!1,this._enableShowOutline=e.enableShowOutline??!0,this._debugWireframe=e.debugWireframe??!1,this._debugWireframe===!0&&this._enableDebugWireframe===!1&&this.type===Lr.GLTF&&Tt("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 bt(d)),this._credits=[],this._credit=d,this._resourceCredits=[],this._gltfCredits=[],this._showCreditsOnScreen=e.showCreditsOnScreen??!1,this._showCreditsOnScreenDirty=!0,this._splitDirection=e.splitDirection??Er.NONE,this._enableShowOutline=e.enableShowOutline??!0,this.showOutline=e.showOutline??!0,this.outlineColor=e.outlineColor??U.BLACK,this._classificationType=e.classificationType,this._statistics=new BI,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 LQ(e,t){if(e._errorEvent.numberOfListeners>0){e._errorEvent.raiseEvent(t);return}console.log(t)}function $qe(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 zF({model:e,propertyTable:s});n.push(a)}return n}function e$e(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=mt.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=mt.getFeatureIdsByLabel(c.featureIds,n);if(l(d))return d.propertyTableId}if(t._featureTables.length===1)return 0}function FQ(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(So.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=Yt.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){FQ(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=FQ(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 Ppe(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===Lr.GLTF&&Tt("model-debug-wireframe-ignored","enableDebugWireframe must be set to true in Model.fromGltfAsync, otherwise debugWireframe will be ignored.")}},show:{get:function(){return this._show},set:function(e){this._show=e}},featureIdLabel:{get:function(){return this._featureIdLabel},set:function(e){typeof e=="number"&&(e=`featureId_${e}`),e!==this._featureIdLabel&&(this._featureTableIdDirty=!0),this._featureIdLabel=e}},instanceFeatureIdLabel:{get:function(){return this._instanceFeatureIdLabel},set:function(e){typeof e=="number"&&(e=`instanceFeatureId_${e}`),e!==this._instanceFeatureIdLabel&&(this._featureTableIdDirty=!0),this._instanceFeatureIdLabel=e}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){e!==this._clippingPlanes&&(as.setOwner(e,this,"_clippingPlanes"),this.resetDrawCommands())}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){e!==this._clippingPolygons&&(Kh.setOwner(e,this,"_clippingPolygons"),this.resetDrawCommands())}},enableVerticalExaggeration:{get:function(){return this._enableVerticalExaggeration},set:function(e){e!==this._enableVerticalExaggeration&&this.resetDrawCommands(),this._enableVerticalExaggeration=e}},hasVerticalExaggeration:{get:function(){return this._hasVerticalExaggeration}},imageryLayers:{get:function(){if(l(this._content)){let e=this._content.tileset;if(l(e))return e.imageryLayers}}},lightColor:{get:function(){return this._lightColor},set:function(e){l(e)!==l(this._lightColor)&&this.resetDrawCommands(),this._lightColor=m.clone(e,this._lightColor)}},imageBasedLighting:{get:function(){return this._imageBasedLighting},set:function(e){e!==this._imageBasedLighting&&(this._shouldDestroyImageBasedLighting&&!this._imageBasedLighting.isDestroyed()&&this._imageBasedLighting.destroy(),this._imageBasedLighting=e,this._shouldDestroyImageBasedLighting=!1,this.resetDrawCommands())}},environmentMapManager:{get:function(){return this._environmentMapManager},set:function(e){e!==this.environmentMapManager&&(fb.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}}});So.prototype.getNode=function(e){return this._nodesByName[e]};So.prototype.setArticulationStage=function(e,t){this._sceneGraph.setArticulationStage(e,t)};So.prototype.applyArticulations=function(){this._sceneGraph.applyArticulations()};So.prototype.getExtension=function(e){return this._loader.components.extensions[e]};So.prototype.makeStyleDirty=function(){this._styleDirty=!0};So.prototype.resetDrawCommands=function(){this._drawCommandsBuilt=!1};var t$e=new F,n$e=new q,i$e=new F;So.prototype.update=function(e){let t=!1;try{t=o$e(this,e)}catch(i){if(!this._loader.incrementallyLoadTextures&&i.name==="TextureError")LQ(this,i);else{let o=mt.getError("model",this._resource,i);LQ(this,o)}}if(r$e(this,e),s$e(this,e),a$e(this,e),!this._resourcesLoaded&&t){this._resourcesLoaded=!0;let i=this._loader.components;if(!l(i)){if(this._loader.isUnloaded())return;let s=mt.getError("model",this._resource,new le("Failed to load model."));LQ(s),this._rejectLoad=this._rejectLoad&&this._rejectLoad(s)}let o=i.structuralMetadata;l(o)&&o.propertyTableCount>0&&$qe(this,o);let r=new OI({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(c$e(this),l$e(this),d$e(this,e),u$e(this),m$e(this,e),h$e(this,e),f$e(this,e),p$e(this,e),b$e(this,e),g$e(this,e),y$e(this,e),this._defaultTexture=e.context.defaultTexture,x$e(this,e),T$e(this,e),_$e(this),S$e(this,e),V$e(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)),Z$e(this),R$e(this,e),E$e(this),G$e(this,e)}};function o$e(e,t){return!e._resourcesLoaded||e._loader.incrementallyLoadTextures&&!e._texturesLoaded?(t.afterRender.push(()=>!0),e._loader.process(t)):!0}function r$e(e,t){l(e._customShader)&&e._customShader.update(t)}function s$e(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 a$e(e,t){e._imageBasedLighting.update(t),e._imageBasedLighting.shouldRegenerateShaders&&e.resetDrawCommands()}function c$e(e){if(!e._featureTableIdDirty)return;e._featureTableIdDirty=!1;let t=e._sceneGraph.components,n=t.structuralMetadata;l(n)&&n.propertyTableCount>0&&(e.featureTableId=e$e(t,e),e._styleDirty=!0,e.resetDrawCommands())}function l$e(e){e._styleDirty&&(e.applyStyle(e._style),e._styleDirty=!1)}function d$e(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&&Ipe(e)}function Ipe(e){let t=e.featureTables[e.featureTableId];e._styleCommandsNeeded=$h.getStyleCommandsNeeded(t.featuresLength,t.batchTexture.translucentFeaturesLength)}function u$e(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 m$e(e,t){e._silhouetteDirty&&(Xpe(t)&&e.resetDrawCommands(),e._silhouetteDirty=!1)}function h$e(e,t){let n=e.hasSkipLevelOfDetail(t);n!==e._skipLevelOfDetail&&(e.resetDrawCommands(),e._skipLevelOfDetail=n)}function f$e(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 p$e(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 b$e(e,t){t.mode!==e._sceneMode&&(e._projectTo2D?e.resetDrawCommands():e._updateModelMatrix=!0,e._sceneMode=t.mode)}function g$e(e,t){let n=t.fog.enabled&&t.fog.renderable;n!==e._fogRenderable&&(e.resetDrawCommands(),e._fogRenderable=n)}function y$e(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 x$e(e,t){e._drawCommandsBuilt||(e.destroyPipelineResources(),e._sceneGraph.buildDrawCommands(t),e._drawCommandsBuilt=!0)}function T$e(e,t){F.equals(e.modelMatrix,e._modelMatrix)||(e._updateModelMatrix=!0,e._modelMatrix=F.clone(e.modelMatrix,e._modelMatrix))}var Uy=new m,WQ=new pe;function _$e(e){if(!e._updateModelMatrix&&!e._heightDirty&&e._minimumPixelSize===0)return;l(e._removeUpdateHeightCallback)&&(e._removeUpdateHeightCallback(),e._removeUpdateHeightCallback=void 0);let t=e._scene;if(!l(t)||e.heightReference===tt.NONE){e._clampedModelMatrix=void 0;return}let n=t.ellipsoid??ie.default,i=e.modelMatrix;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,Fpe(e,n,o),e.heightReference);let r=t.getHeight(o,e.heightReference);if(l(r)){let s=Fpe(e,n,o);pe.clone(o,WQ),WQ.height=r,s(WQ)}e._heightDirty=!1,e._updateModelMatrix=!0}function S$e(e,t){if(!e._updateModelMatrix&&e._minimumPixelSize===0)return;let n=l(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;Ppe(e,n),A$e(e,n,t)}function Ppe(e,t){e._clampedScale=l(e._maximumScale)?Math.min(e._scale,e._maximumScale):e._scale,e._boundingSphere.center=m.multiplyByScalar(e._sceneGraph.boundingSphere.center,e._clampedScale,e._boundingSphere.center),e._boundingSphere.radius=e._initialRadius*e._clampedScale,e._boundingSphere=de.transform(e._boundingSphere,t,e._boundingSphere)}function A$e(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&&no.computeActualEllipsoidPosition(n,Uy,Uy);let s=e._boundingSphere.radius,a=L$e(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 Z$e(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 C$e=new q(1,0,0,0,0,1,0,-1,0);function V$e(e,t){let n=l(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix,i=e.referenceMatrix??n,o=t.context,r=n$e,s=t$e;if(s=F.multiply(o.uniformState.view3D,i,s),r=F.getRotation(s,r),r=q.transpose(r,r),e._iblReferenceFrameMatrix=q.multiply(C$e,r,e._iblReferenceFrameMatrix),e.isClippingEnabled()){let a=i$e;a=F.multiply(o.uniformState.view3D,i,a),a=F.multiply(a,e._clippingPlanes.modelMatrix,a),e._clippingPlanesMatrix=F.inverseTranspose(a,e._clippingPlanesMatrix)}}function R$e(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 E$e(e){if(!e._showCreditsOnScreenDirty)return;e._showCreditsOnScreenDirty=!1,e._credits.length=0;let t=e._showCreditsOnScreen;if(l(e._credit)){let s=bt.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=bt.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=bt.clone(o[s]);a.showOnScreen=a.showOnScreen||t,e._credits.push(a)}}function G$e(e,t){let n=v$e(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&&(F$e(e,t),e._sceneGraph.pushDrawCommands(t))}var vQ=new de;function L$e(e,t,n){return vQ.center=e,vQ.radius=t,n.camera.getPixelSize(vQ,n.context.drawingBufferWidth,n.context.drawingBufferHeight)}var SD=new m;function Fpe(e,t,n){return function(i){TZ(e.heightReference)&&(i.height+=n.height),t.cartographicToCartesian(i,SD);let o=e._clampedModelMatrix;F.clone(e.modelMatrix,o),o[12]=SD.x,o[13]=SD.y,o[14]=SD.z,e._heightDirty=!0}}var W$e=new m;function v$e(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,W$e);no.computeActualEllipsoidPosition(t,s,s),r=m.distanceSquared(s,t.camera.positionWC)}return r>=i&&r<=o}function F$e(e,t){let n=t.creditDisplay,i=e._credits,o=i.length;for(let r=0;r<o;r++)n.addCreditToNextFrame(i[r])}So.prototype.isTranslucent=function(){let e=this.color;return l(e)&&e.alpha>0&&e.alpha<1};So.prototype.isInvisible=function(){let e=this.color;return l(e)&&e.alpha===0};function Xpe(e){return e.context.stencilBuffer}So.prototype.hasSilhouette=function(e){return Xpe(e)&&this._silhouetteSize>0&&this._silhouetteColor.alpha>0&&!l(this._classificationType)};So.prototype.hasSkipLevelOfDetail=function(e){if(!Lr.is3DTiles(this.type))return!1;let t=e.context.stencilBuffer,n=this._content.tileset;return t&&n.isSkippingLevelOfDetail};So.prototype.isClippingEnabled=function(){let e=this._clippingPlanes;return l(e)&&e.enabled&&e.length!==0};So.prototype.pick=function(e,t,n,i,o){return zC(this,e,t,n,i,o)};So.prototype.isClippingPolygonsEnabled=function(){let e=this._clippingPolygons;return l(e)&&e.enabled&&e.length!==0};So.prototype.isDestroyed=function(){return!1};So.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,me(this)};So.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};So.prototype.destroyModelResources=function(){let e=this._modelResources;for(let t=0;t<e.length;t++)e[t].destroy();this._modelResources.length=0};So.fromGltfAsync=async function(e){e=e??B.EMPTY_OBJECT;let t=e.url??e.gltf,n={releaseGltfJson:e.releaseGltfJson,asynchronous:e.asynchronous,incrementallyLoadTextures:e.incrementallyLoadTextures,upAxis:e.upAxis,forwardAxis:e.forwardAxis,loadAttributesFor2D:e.projectTo2D,enablePick:e.enablePick,loadIndicesForWireframe:e.enableDebugWireframe,loadPrimitiveOutline:e.enableShowOutline,loadForClassification:l(e.classificationType)},i=e.basePath??"",o=We.createIfNeeded(i);l(t.asset)?(n.gltfJson=t,n.baseResource=o,n.gltfResource=o):t instanceof Uint8Array?(n.typedArray=t,n.baseResource=o,n.gltfResource=o):n.gltfResource=We.createIfNeeded(t);let r=new mu(n),a=l(e.content)?Lr.TILE_GLTF:Lr.GLTF,c=n.gltfResource,d=jI(r,a,e);d.resource=c,d.environmentMapOptions=e.environmentMapOptions;try{await r.load()}catch(b){throw r.destroy(),mt.getError("model",c,b)}let u=e.gltfCallback;l(u)&&u(r.gltfJson);let h=new So(d),p=h._resource.credits;if(l(p)){let b=p.length;for(let f=0;f<b;f++)h._resourceCredits.push(bt.clone(p[f]))}return h};So.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 PF(t);try{await n.load();let i=jI(n,Lr.TILE_B3DM,e);return new So(i)}catch(i){throw n.destroy(),i}};So.fromPnts=async function(e){let t={arrayBuffer:e.arrayBuffer,byteOffset:e.byteOffset,loadAttributesFor2D:e.projectTo2D},n=new HI(t);try{await n.load();let i=jI(n,Lr.TILE_PNTS,e);return new So(i)}catch(i){throw n.destroy(),i}};So.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 YF(t);try{await n.load();let i=jI(n,Lr.TILE_I3DM,e);return new So(i)}catch(i){throw n.destroy(),i}};So.fromGeoJson=async function(e){let t={geoJson:e.geoJson},n=new XF(t),i=jI(n,Lr.TILE_GEOJSON,e);return new So(i)};var I$e=new U;So.prototype.applyColorAndShow=function(e){let t=U.clone(this._color,I$e),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,FQ(t,this._color)&&this.resetDrawCommands()};So.prototype.applyStyle=function(e){let t=this.type===Lr.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),Ipe(this,e)):(this.applyColorAndShow(e),this._styleCommandsNeeded=void 0)};function jI(e,t,n){return{loader:e,type:t,resource:n.resource,show:n.show,modelMatrix:n.modelMatrix,scale:n.scale,enableVerticalExaggeration:n.enableVerticalExaggeration,minimumPixelSize:n.minimumPixelSize,maximumScale:n.maximumScale,id:n.id,allowPicking:n.allowPicking,clampAnimations:n.clampAnimations,shadows:n.shadows,debugShowBoundingVolume:n.debugShowBoundingVolume,enableDebugWireframe:n.enableDebugWireframe,debugWireframe:n.debugWireframe,cull:n.cull,opaquePass:n.opaquePass,customShader:n.customShader,content:n.content,heightReference:n.heightReference,scene:n.scene,distanceDisplayCondition:n.distanceDisplayCondition,color:n.color,colorBlendAmount:n.colorBlendAmount,colorBlendMode:n.colorBlendMode,silhouetteColor:n.silhouetteColor,silhouetteSize:n.silhouetteSize,enableShowOutline:n.enableShowOutline,showOutline:n.showOutline,outlineColor:n.outlineColor,clippingPlanes:n.clippingPlanes,clippingPolygons:n.clippingPolygons,lightColor:n.lightColor,imageBasedLighting:n.imageBasedLighting,backFaceCulling:n.backFaceCulling,credit:n.credit,showCreditsOnScreen:n.showCreditsOnScreen,splitDirection:n.splitDirection,projectTo2D:n.projectTo2D,enablePick:n.enablePick,featureIdLabel:n.featureIdLabel,instanceFeatureIdLabel:n.instanceFeatureIdLabel,pointCloudShading:n.pointCloudShading,classificationType:n.classificationType,pickObject:n.pickObject}}var yu=So;function hs(e,t,n){this._tileset=e,this._tile=t,this._resource=n,this._model=void 0,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(hs.prototype,{featuresLength:{get:function(){let e=this._model,t=e.featureTables,n=e.featureTableId;return l(t)&&l(t[n])?t[n].featuresLength:0}},pointsLength:{get:function(){return this._model.statistics.pointsLength}},trianglesLength:{get:function(){return this._model.statistics.trianglesLength}},geometryByteLength:{get:function(){return this._model.statistics.geometryByteLength}},texturesByteLength:{get:function(){return this._model.statistics.texturesByteLength}},batchTableByteLength:{get:function(){let e=this._model.statistics;return e.propertyTablesByteLength+e.batchTexturesByteLength}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){let e=this._model,t=e.featureTables,n=e.featureTableId;if(l(t)&&l(t[n]))return t[n]}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},group:{get:function(){return this._group},set:function(e){this._group=e}}});hs.prototype.getTextureIds=function(){return this._model.statistics.getTextureIds()};hs.prototype.getTextureByteLengthById=function(e){return this._model.statistics.getTextureByteLengthById(e)};hs.prototype.getExtension=function(e){return this._model.getExtension(e)};hs.prototype.getFeature=function(e){let t=this._model,n=t.featureTableId;return t.featureTables[n].getFeature(e)};hs.prototype.hasProperty=function(e,t){let n=this._model,i=n.featureTableId;return l(i)?n.featureTables[i].hasProperty(e,t):!1};hs.prototype.applyDebugSettings=function(e,t){t=e?t:U.WHITE,this.featuresLength===0?this._model.color=t:l(this.batchTable)&&this.batchTable.setAllColor(t)};hs.prototype.applyStyle=function(e){this._model.style=e};hs.prototype.update=function(e,t){let n=this._model,i=this._tile;n.colorBlendAmount=e.colorBlendAmount,n.colorBlendMode=e.colorBlendMode,n.modelMatrix=i.computedTransform,n.customShader=e.customShader,n.featureIdLabel=e.featureIdLabel,n.instanceFeatureIdLabel=e.instanceFeatureIdLabel,n.lightColor=e.lightColor,n.imageBasedLighting=e.imageBasedLighting,n.backFaceCulling=e.backFaceCulling,n.shadows=e.shadows,n.showCreditsOnScreen=e.showCreditsOnScreen,n.splitDirection=e.splitDirection,n.debugWireframe=e.debugWireframe,n.showOutline=e.showOutline,n.outlineColor=e.outlineColor,n.pointCloudShading=e.pointCloudShading;let o=e.clippingPlanes;n.referenceMatrix=e.clippingPlanesOriginMatrix,l(o)&&i.clippingPlanesDirty&&(n._clippingPlanes=o.enabled&&i._isClipped?o:void 0);let r=e.environmentMapManager;n.environmentMapManager!==o&&(n._environmentMapManager=r),l(o)&&l(n._clippingPlanes)&&n._clippingPlanes!==o&&(n._clippingPlanes=o,n._clippingPlanesState=0);let s=e.clippingPolygons;l(s)&&i.clippingPolygonsDirty&&(n._clippingPolygons=s.enabled&&i._isClippedByPolygon?s:void 0),l(s)&&l(n._clippingPolygons)&&n._clippingPolygons!==s&&(n._clippingPolygons=s,n._clippingPolygonsState=0),n.update(t),!this._ready&&n.ready&&(n.activeAnimations.addAll({loop:Gd.REPEAT}),this._ready=!0)};hs.prototype.isDestroyed=function(){return!1};hs.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),me(this)};hs.fromGltf=async function(e,t,n,i){let o=new hs(e,t,n),s=QI(e,t,o,{gltf:i,basePath:n}),a=e.vectorClassificationOnly?void 0:e.classificationType;s.classificationType=a;let c=await yu.fromGltfAsync(s);return o._model=c,o};hs.fromB3dm=async function(e,t,n,i,o){let r=new hs(e,t,n),a=QI(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),c=e.vectorClassificationOnly?void 0:e.classificationType;a.classificationType=c;let d=await yu.fromB3dm(a);return r._model=d,r};hs.fromI3dm=async function(e,t,n,i,o){let r=new hs(e,t,n),a=QI(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),c=await yu.fromI3dm(a);return r._model=c,r};hs.fromPnts=async function(e,t,n,i,o){let r=new hs(e,t,n),a=QI(e,t,r,{arrayBuffer:i,byteOffset:o,resource:n}),c=await yu.fromPnts(a);return r._model=c,r};hs.fromGeoJson=async function(e,t,n,i){let o=new hs(e,t,n),s=QI(e,t,o,{geoJson:i,resource:n}),a=await yu.fromGeoJson(s);return o._model=a,o};hs.prototype.pick=function(e,t,n){if(!l(this._model)||!this._ready)return;let i=t.verticalExaggeration,o=t.verticalExaggerationRelativeHeight;return this._model.pick(e,t,i,o,ie.WGS84,n)};function QI(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 Rt(i,o)}var xu=hs;var u8n=x(T(),1);function Lm(e,t,n){this._tileset=e,this._tile=t,this._resource=n,this.featurePropertiesDirty=!1,this._metadata=void 0,this._group=void 0,this._ready=!1}Object.defineProperties(Lm.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},group:{get:function(){return this._group},set:function(e){this._group=e}}});Lm.fromJson=function(e,t,n,i){let o=new Lm(e,t,n);return o._tileset.loadTileset(o._resource,i,o._tile),o._ready=!0,o};Lm.prototype.hasProperty=function(e,t){return!1};Lm.prototype.getFeature=function(e){};Lm.prototype.applyDebugSettings=function(e,t){};Lm.prototype.applyStyle=function(e){};Lm.prototype.update=function(e,t){};Lm.prototype.pick=function(e,t,n){};Lm.prototype.isDestroyed=function(){return!1};Lm.prototype.destroy=function(){return me(this)};var qI=Lm;var lti=x(T(),1);var f$n=x(T(),1);var P7n=x(T(),1);var h8n=x(T(),1),$I=`uniform sampler2D u_atlas;
uniform float u_coarseDepthTestDistance;
uniform float u_threePointDepthTestDistance;
#ifdef VECTOR_TILE
uniform vec4 u_highlightColor;
#endif
in vec2 v_textureCoordinates;
in vec4 v_pickColor;
in vec4 v_color;
flat in vec2 v_splitDirectionAndEllipsoidDepthEC;
#ifdef SDF
in vec4 v_outlineColor;
in float v_outlineWidth;
#endif
in vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize
const float SHIFT_LEFT1 = 2.0;
const float SHIFT_RIGHT1 = 1.0 / 2.0;
float getGlobeDepthAtCoords(vec2 st)
{
float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st));
if (logDepthOrDepth == 0.0)
{
return 0.0; // not on the globe
}
vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
return eyeCoordinate.z / eyeCoordinate.w;
}
#ifdef SDF
// Get the distance from the edge of a glyph at a given position sampling an SDF texture.
float getDistance(vec2 position)
{
return texture(u_atlas, position).r;
}
// Samples the sdf texture at the given position and produces a color based on the fill color and the outline.
vec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing)
{
float distance = getDistance(position);
if (outlineWidth > 0.0)
{
// Don't get the outline edge exceed the SDF_EDGE
float outlineEdge = clamp(SDF_EDGE - outlineWidth, 0.0, SDF_EDGE);
float outlineFactor = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);
vec4 sdfColor = mix(outlineColor, v_color, outlineFactor);
float alpha = smoothstep(outlineEdge - smoothing, outlineEdge + smoothing, distance);
return vec4(sdfColor.rgb, sdfColor.a * alpha);
}
else
{
float alpha = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);
return vec4(v_color.rgb, v_color.a * alpha);
}
}
#endif
bool getDepthTestEnabled() {
float temp = v_compressed.y;
temp = temp * SHIFT_RIGHT1;
float temp2 = (temp - floor(temp)) * SHIFT_LEFT1;
return temp2 != 0.0;
}
float getRelativeEyeDepth(float eyeDepth, float distanceToEllipsoid, float epsilon) {
float depthDifferential = eyeDepth - distanceToEllipsoid;
float depthRatio = abs(depthDifferential / distanceToEllipsoid);
if (depthRatio < epsilon) {
// The approximations are imprecise, so use an epsilon check for small value differences and assume a value of 0.0
return 0.0;
}
return depthDifferential;
}
// Extra manual depth testing is done to allow more control over how a billboard is occluded
// by the globe when near and far from the camera.
void doDepthTest(float eyeDepth, float globeDepth) {
#ifdef VS_THREE_POINT_DEPTH_CHECK
// Since discarding vertices is not possible, the vertex shader sets eyeDepth to 0 to indicate the depth test failed. Apply the discard here.
if (eyeDepth > -u_threePointDepthTestDistance) {
if (eyeDepth == 0.0) {
discard;
}
return;
}
#endif
bool useGlobeDepth = eyeDepth > -u_coarseDepthTestDistance;
if (useGlobeDepth && globeDepth == 0.0) {
// Pixel is not on the globe, so there is no distance to compare against. Pass.
return;
}
// If the camera is close, compare against the globe depth texture that includes depth from the 3D tile pass.
if (useGlobeDepth && getRelativeEyeDepth(eyeDepth, globeDepth, czm_epsilon1) < 0.0) {
discard;
}
}
#ifdef LOG_DEPTH
void writeDepth(float eyeDepth, float globeDepth, float distanceToEllipsoid) {
// If we've made it here, the manual depth test above determined that this fragment should be visible.
// But the automatic depth test must still run in order to write the result to the depth buffer, and its results may
// disagree with our manual depth test's results. To prefer our manual results when in front of the globe, apply an offset towards the camera.
float depthArg = v_depthFromNearPlusOne;
if (globeDepth != 0.0 && getRelativeEyeDepth(eyeDepth, distanceToEllipsoid, czm_epsilon3) > 0.0) {
float globeDepthFromNearPlusOne = (-globeDepth - czm_currentFrustum.x) + 1.0;
float nudge = max(globeDepthFromNearPlusOne * 5e-6, czm_epsilon7);
float globeOnTop = max(1.0, globeDepthFromNearPlusOne - nudge);
depthArg = min(depthArg, globeOnTop);
}
czm_writeLogDepth(depthArg);
}
#endif
void main()
{
if (v_splitDirectionAndEllipsoidDepthEC.x < 0.0 && gl_FragCoord.x > czm_splitPosition) {
discard;
}
if (v_splitDirectionAndEllipsoidDepthEC.x > 0.0 && gl_FragCoord.x < czm_splitPosition) {
discard;
}
if (getDepthTestEnabled()) {
vec2 fragSt = gl_FragCoord.xy / czm_viewport.zw;
float eyeDepth = v_compressed.x;
float globeDepth = getGlobeDepthAtCoords(fragSt);
float distanceToEllipsoid = -v_splitDirectionAndEllipsoidDepthEC.y;
doDepthTest(eyeDepth, globeDepth);
#ifdef LOG_DEPTH
writeDepth(eyeDepth, globeDepth, distanceToEllipsoid);
#endif
}
vec4 color = texture(u_atlas, v_textureCoordinates);
#ifdef SDF
float outlineWidth = v_outlineWidth;
vec4 outlineColor = v_outlineColor;
// Get the current distance
float distance = getDistance(v_textureCoordinates);
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
float smoothing = fwidth(distance);
// Get an offset that is approximately half the distance to the neighbor pixels
// 0.354 is approximately half of 1/sqrt(2)
vec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates));
// Sample the center point
vec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);
// Sample the 4 neighbors
vec4 color1 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);
vec4 color2 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);
vec4 color3 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);
vec4 color4 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);
// Equally weight the center sample and the 4 neighboring samples
color = (center + color1 + color2 + color3 + color4)/5.0;
#else
// If no derivatives available (IE 10?), just do a single sample
float smoothing = 1.0/32.0;
color = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);
#endif
color = czm_gammaCorrect(color);
#else
color = czm_gammaCorrect(color);
color *= czm_gammaCorrect(v_color);
#endif
// Fully transparent parts of the billboard are not pickable.
#if !defined(OPAQUE) && !defined(TRANSLUCENT)
if (color.a < 0.005) // matches 0/255 and 1/255
{
discard;
}
#else
// The billboard is rendered twice. The opaque pass discards translucent fragments
// and the translucent pass discards opaque fragments.
#ifdef OPAQUE
if (color.a < 0.995) // matches < 254/255
{
discard;
}
#else
if (color.a >= 0.995) // matches 254/255 and 255/255
{
discard;
}
#endif
#endif
#ifdef VECTOR_TILE
color *= u_highlightColor;
#endif
out_FragColor = color;
}
`;var p8n=x(T(),1),eP=`uniform float u_threePointDepthTestDistance;
in vec2 direction;
in vec4 positionHighAndScale;
in vec4 positionLowAndRotation;
in vec4 compressedAttribute0; // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates (texture offset)
in vec4 compressedAttribute1; // aligned axis, translucency by distance, image width
in vec4 compressedAttribute2; // label horizontal origin, image height, color, pick color, size in meters, valid aligned axis, 13 bits free
in vec4 eyeOffset; // eye offset in meters, 4 bytes free (texture range)
in vec4 scaleByDistance; // near, nearScale, far, farScale
in vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale
in vec4 compressedAttribute3; // distance display condition near, far, disableDepthTestDistanceSq, dimensions
in vec2 sdf; // sdf outline color (rgb) and width (w)
in float splitDirection; // splitDirection
#ifdef VS_THREE_POINT_DEPTH_CHECK
in vec4 textureCoordinateBoundsOrLabelTranslate; // the min and max x and y values for the texture coordinates
#endif
#ifdef VECTOR_TILE
in float a_batchId;
#endif
out vec2 v_textureCoordinates;
out vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize
out vec4 v_pickColor;
out vec4 v_color;
flat out vec2 v_splitDirectionAndEllipsoidDepthEC; // x: splitDirection, y: ellipsoid depth in eye coordinates
#ifdef SDF
out vec4 v_outlineColor;
out float v_outlineWidth;
#endif
const float UPPER_BOUND = 32768.0;
const float SHIFT_LEFT16 = 65536.0;
const float SHIFT_LEFT12 = 4096.0;
const float SHIFT_LEFT8 = 256.0;
const float SHIFT_LEFT7 = 128.0;
const float SHIFT_LEFT5 = 32.0;
const float SHIFT_LEFT3 = 8.0;
const float SHIFT_LEFT2 = 4.0;
const float SHIFT_LEFT1 = 2.0;
const float SHIFT_RIGHT12 = 1.0 / 4096.0;
const float SHIFT_RIGHT8 = 1.0 / 256.0;
const float SHIFT_RIGHT7 = 1.0 / 128.0;
const float SHIFT_RIGHT5 = 1.0 / 32.0;
const float SHIFT_RIGHT3 = 1.0 / 8.0;
const float SHIFT_RIGHT2 = 1.0 / 4.0;
const float SHIFT_RIGHT1 = 1.0 / 2.0;
vec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp)
{
// Note the halfSize cannot be computed in JavaScript because it is sent via
// compressed vertex attributes that coerce it to an integer.
vec2 halfSize = imageSize * scale * 0.5;
halfSize *= ((direction * 2.0) - 1.0);
vec2 originTranslate = origin * abs(halfSize);
#if defined(ROTATION) || defined(ALIGNED_AXIS)
if (validAlignedAxis || rotation != 0.0)
{
float angle = rotation;
if (validAlignedAxis)
{
vec4 projectedAlignedAxis = czm_modelView3D * vec4(alignedAxis, 0.0);
angle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /
(projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));
}
float cosTheta = cos(angle);
float sinTheta = sin(angle);
rotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);
halfSize = rotationMatrix * halfSize;
}
else
{
rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);
}
#endif
mpp = czm_metersPerPixel(positionEC);
positionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);
positionEC.xy += (translate + pixelOffset) * mpp;
return positionEC;
}
#ifdef VS_THREE_POINT_DEPTH_CHECK
float getGlobeDepth(vec4 positionEC)
{
vec4 posWC = czm_eyeToWindowCoordinates(positionEC);
float globeDepth = czm_unpackDepth(texture(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));
if (globeDepth == 0.0)
{
return 0.0; // not on the globe
}
vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);
return eyeCoordinate.z / eyeCoordinate.w;
}
#endif
void main()
{
// Modifying this shader may also require modifications to Billboard._computeScreenSpacePosition
// unpack attributes
vec3 positionHigh = positionHighAndScale.xyz;
vec3 positionLow = positionLowAndRotation.xyz;
float scale = positionHighAndScale.w;
#if defined(ROTATION) || defined(ALIGNED_AXIS)
float rotation = positionLowAndRotation.w;
#else
float rotation = 0.0;
#endif
float compressed = compressedAttribute0.x;
vec2 pixelOffset;
pixelOffset.x = floor(compressed * SHIFT_RIGHT7);
compressed -= pixelOffset.x * SHIFT_LEFT7;
pixelOffset.x -= UPPER_BOUND;
vec2 origin;
origin.x = floor(compressed * SHIFT_RIGHT5);
compressed -= origin.x * SHIFT_LEFT5;
origin.y = floor(compressed * SHIFT_RIGHT3);
compressed -= origin.y * SHIFT_LEFT3;
origin -= vec2(1.0);
float show = floor(compressed * SHIFT_RIGHT2);
compressed -= show * SHIFT_LEFT2;
vec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);
vec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);
vec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;
float temp = compressedAttribute0.y * SHIFT_RIGHT8;
pixelOffset.y = -(floor(temp) - UPPER_BOUND);
vec2 translate;
translate.y = (temp - floor(temp)) * SHIFT_LEFT16;
temp = compressedAttribute0.z * SHIFT_RIGHT8;
translate.x = floor(temp) - UPPER_BOUND;
translate.x *= SHIFT_RIGHT2; // undo translateX scaling (helps preserve subpixel precision, see BillboardCollection.js attribute writer for more info)
translate.y += (temp - floor(temp)) * SHIFT_LEFT8;
translate.y -= UPPER_BOUND;
translate.y *= SHIFT_RIGHT2;
temp = compressedAttribute1.x * SHIFT_RIGHT8;
float temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);
vec2 imageSize = vec2(floor(temp), temp2);
#ifdef EYE_DISTANCE_TRANSLUCENCY
vec4 translucencyByDistance;
translucencyByDistance.x = compressedAttribute1.z;
translucencyByDistance.z = compressedAttribute1.w;
translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
temp = compressedAttribute1.y * SHIFT_RIGHT8;
translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
#endif
#ifdef VS_THREE_POINT_DEPTH_CHECK
temp = compressedAttribute3.w;
temp = temp * SHIFT_RIGHT12;
vec2 dimensions;
dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;
dimensions.x = floor(temp);
#endif
#ifdef ALIGNED_AXIS
vec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));
temp = compressedAttribute2.z * SHIFT_RIGHT5;
bool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;
#else
vec3 alignedAxis = vec3(0.0);
bool validAlignedAxis = false;
#endif
vec4 color = czm_decodeRGB8(compressedAttribute2.x);
vec4 pickColor = czm_decodeRGB8(compressedAttribute2.y);
temp = compressedAttribute2.z * SHIFT_RIGHT8;
bool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;
temp = floor(temp) * SHIFT_RIGHT8;
pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;
pickColor.a /= 255.0;
color.a = floor(temp);
color.a /= 255.0;
///////////////////////////////////////////////////////////////////////////
vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
vec4 positionEC = czm_modelViewRelativeToEye * p;
positionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);
positionEC.xyz *= show;
///////////////////////////////////////////////////////////////////////////
#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)
float lengthSq;
if (czm_sceneMode == czm_sceneMode2D)
{
// 2D camera distance is a special case
// treat all billboards as flattened to the z=0.0 plane
lengthSq = czm_eyeHeight2D.y;
}
else
{
lengthSq = dot(positionEC.xyz, positionEC.xyz);
}
#endif
#ifdef EYE_DISTANCE_SCALING
float distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);
scale *= distanceScale;
translate *= distanceScale;
// push vertex behind near plane for clipping
if (scale == 0.0)
{
positionEC.xyz = vec3(0.0);
}
#endif
float translucency = 1.0;
#ifdef EYE_DISTANCE_TRANSLUCENCY
translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);
// push vertex behind near plane for clipping
if (translucency == 0.0)
{
positionEC.xyz = vec3(0.0);
}
#endif
#ifdef EYE_DISTANCE_PIXEL_OFFSET
float pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);
pixelOffset *= pixelOffsetScale;
#endif
#ifdef DISTANCE_DISPLAY_CONDITION
float nearSq = compressedAttribute3.x;
float farSq = compressedAttribute3.y;
if (lengthSq < nearSq || lengthSq > farSq)
{
positionEC.xyz = vec3(0.0);
}
#endif
mat2 rotationMatrix;
float mpp;
float enableDepthCheck = 1.0;
#ifdef DISABLE_DEPTH_DISTANCE
float disableDepthTestDistanceSq = compressedAttribute3.z;
if (disableDepthTestDistanceSq == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)
{
disableDepthTestDistanceSq = czm_minimumDisableDepthTestDistance;
}
if (lengthSq < disableDepthTestDistanceSq || disableDepthTestDistanceSq < 0.0)
{
enableDepthCheck = 0.0;
}
#endif
v_splitDirectionAndEllipsoidDepthEC.y = czm_infinity;
vec3 ellipsoidCenter = czm_view[3].xyz;
vec3 rayDirection = normalize(positionEC.xyz);
czm_ray ray = czm_ray(vec3(0.0), rayDirection);
vec3 ellipsoid_inverseRadii = czm_ellipsoidInverseRadii;
czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);
if (!czm_isEmpty(intersection))
{
v_splitDirectionAndEllipsoidDepthEC.y = intersection.start;
}
v_compressed.y = enableDepthCheck;
#ifdef VS_THREE_POINT_DEPTH_CHECK
if (lengthSq < (u_threePointDepthTestDistance * u_threePointDepthTestDistance) && (enableDepthCheck == 1.0)) {
float depthsilon = 10.0;
vec2 depthOrigin;
// Horizontal origin for labels comes from a special attribute. If that value is 0, this is a billboard - use the regular origin.
// Otherwise, transform the label origin to -1, 0, 1 (right, center, left).
depthOrigin.x = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));
depthOrigin.x = czm_branchFreeTernary(depthOrigin.x == 0.0, origin.x, depthOrigin.x - 2.0);
depthOrigin.y = origin.y;
vec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), depthOrigin, vec2(0.0), pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
float globeDepth1 = getGlobeDepth(pEC1);
if (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)
{
vec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), depthOrigin, vec2(0.0), pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
float globeDepth2 = getGlobeDepth(pEC2);
if (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)
{
vec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), depthOrigin, vec2(0.0), pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
float globeDepth3 = getGlobeDepth(pEC3);
if (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)
{
// "Discard" this vertex, as three key points fail depth test.
positionEC.xyz = vec3(0.0);
}
}
}
}
#endif
// Write out the eyespace depth before applying the screen space offset, but after potentially "discarding" the vertex
// by setting its eyespace position to zero, via the three-point depth test above.
v_compressed.x = positionEC.z;
positionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
gl_Position = czm_projection * positionEC;
v_textureCoordinates = textureCoordinates;
#ifdef LOG_DEPTH
czm_vertexLogDepth();
#endif
#ifdef DISABLE_DEPTH_DISTANCE
if (disableDepthTestDistanceSq != 0.0)
{
// Don't try to "multiply both sides" by w. Greater/less-than comparisons won't work for negative values of w.
float zclip = gl_Position.z / gl_Position.w;
bool clipped = (zclip < -1.0 || zclip > 1.0);
// disableDepthTestDistanceSq can be less than zero if it's explicitly set to -1 in JS (as a sentinel value equivalent to infinity)
if (!clipped && (disableDepthTestDistanceSq < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistanceSq)))
{
// Position z on the near plane.
gl_Position.z = -gl_Position.w;
#ifdef LOG_DEPTH
v_depthFromNearPlusOne = 1.0;
#endif
}
}
#endif
#ifdef SDF
vec4 outlineColor = czm_decodeRGB8(sdf.x);
float outlineWidth;
temp = sdf.y;
temp = temp * SHIFT_RIGHT8;
float temp3 = (temp - floor(temp)) * SHIFT_LEFT8;
temp = floor(temp) * SHIFT_RIGHT8;
outlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;
outlineColor.a = floor(temp);
outlineColor.a /= 255.0;
v_outlineWidth = outlineWidth / 255.0;
v_outlineColor = outlineColor;
v_outlineColor.a *= translucency;
#endif
v_pickColor = pickColor;
v_color = color;
v_color.a *= translucency;
v_splitDirectionAndEllipsoidDepthEC.x = splitDirection;
}
`;var z8n=x(T(),1);var _8n=x(T(),1);var g8n=x(T(),1),P$e=Object.freeze({NONE:0,LOADING:2,LOADED:3,ERROR:4,FAILED:5}),Ps=P$e;function rf(e){this._billboardCollection=e,this._id=void 0,this._loadState=Ps.NONE,this._loadError=void 0,this._index=-1,this._width=void 0,this._height=void 0,this._hasSubregion=!1,this.dirty=!1}Object.defineProperties(rf.prototype,{loadError:{get:function(){return this._loadError}},loadState:{get:function(){return this._loadState}},ready:{get:function(){return this._loadState===Ps.LOADED}},hasImage:{get:function(){return this._loadState!==Ps.NONE}},id:{get:function(){return this._id}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}});rf.prototype.unload=async function(){this._loadState!==Ps.NONE&&(this._id=void 0,this._loadError=void 0,this._loadState=Ps.NONE,this._index=-1,this._width=void 0,this._height=void 0,this.dirty=!0)};rf.prototype.loadImage=async function(e,t,n,i){if(this._id===e)return;let o=this._billboardCollection,r=o.billboardTextureCache,s=r.get(e);if(l(s)&&t.loadState===Ps.LOADING||t.loadState===Ps.LOADED){rf.clone(s,this);return}l(s)||(s=new rf(o),r.set(e,s)),s._id=this._id=e,s._loadState=this._loadState=Ps.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=Ps.ERROR,s._loadError=u,this._id!==e)return;this._loadState=Ps.ERROR,this._loadError=u;return}if(!l(a)||a===-1){if(s._loadState=Ps.FAILED,s._index=-1,this._id!==e)return;this._loadState=Ps.FAILED,this._index=-1;return}s._index=a,s._loadState=Ps.LOADED;let d=c.rectangles[a];s._width=d.width,s._height=d.height,this._id===e&&(this._index=a,this._loadState=Ps.LOADED,this._width=d.width,this._height=d.height,this.dirty=!0)};rf.prototype.addImageSubRegion=function(e,t){this._id=e,this._loadError=void 0,this._hasSubregion=!0;let i=this._billboardCollection.textureAtlas.addImageSubRegion(e,t);if(typeof i=="number"){this.setImageSubRegion(i,t);return}this.loadImageSubRegion(e,t,i)};rf.prototype.loadImageSubRegion=async function(e,t,n){let i;try{this._loadState=Ps.LOADING,i=await n}catch(o){this._loadState=Ps.ERROR,this._loadError=o;return}this._id===e&&(this._loadState=Ps.LOADED,this.setImageSubRegion(i,t))};rf.prototype.setImageSubRegion=function(e,t){if(this._index!==e){if(!l(e)||e===-1){this._loadState=Ps.FAILED,this._index=-1,this._width=void 0,this._height=void 0;return}this._width=t.width,this._height=t.height,this._index=e,this.dirty=!0}};rf.prototype.computeTextureCoordinates=function(e){return this._billboardCollection.textureAtlas.computeTextureCoordinates(this._index,e)};rf.clone=function(e,t){if(t._id=e._id,t._loadState=e._loadState,t._loadError=void 0,t._index=e._index,t._width=e._width,t._height=e._height,t._hasSubregion=e._hasSubregion,e.ready){t.dirty=!0;return}return(async()=>{let i=e._id;await e._billboardCollection.textureAtlas._indexPromiseById.get(i),t._id===i&&(e._hasSubregion&&await Promise.resolve(),t._id=i,t._loadState=e._loadState,t._loadError=e._loadError,t._index=e._index,t._width=e._width,t._height=e._height,t.dirty=!0)})(),t};var Gb=rf;function Li(e,t){e=e??B.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,r=e.distanceDisplayCondition;l(n)&&(n=wt.clone(n)),l(i)&&(i=wt.clone(i)),l(o)&&(o=wt.clone(o)),l(r)&&(r=Yt.clone(r)),this._show=e.show??!0,this._position=m.clone(e.position??m.ZERO),this._actualPosition=m.clone(this._position),this._pixelOffset=M.clone(e.pixelOffset??M.ZERO),this._translate=new M(0,0),this._eyeOffset=m.clone(e.eyeOffset??m.ZERO),this._heightReference=e.heightReference??tt.NONE,this._verticalOrigin=e.verticalOrigin??Dn.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=m.clone(e.alignedAxis??m.ZERO),this._width=e.width,this._height=e.height,this._scaleByDistance=o,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._sizeInMeters=e.sizeInMeters??!1,this._distanceDisplayCondition=r,this._disableDepthTestDistance=e.disableDepthTestDistance,this._id=e.id,this._collection=e.collection??t,this._pickId=void 0,this._pickPrimitive=e._pickPrimitive??this,this._billboardCollection=t,this._dirty=!1,this._index=-1,this._batchIndex=void 0,this._imageTexture=new Gb(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??Er.NONE,this._positionFromParent=!1}var Npe=Li.SHOW_INDEX=0,ZD=Li.POSITION_INDEX=1,Dpe=Li.PIXEL_OFFSET_INDEX=2,X$e=Li.EYE_OFFSET_INDEX=3,N$e=Li.HORIZONTAL_ORIGIN_INDEX=4,Y$e=Li.VERTICAL_ORIGIN_INDEX=5,w$e=Li.SCALE_INDEX=6,Ype=Li.IMAGE_INDEX_INDEX=7,wpe=Li.COLOR_INDEX=8,M$e=Li.ROTATION_INDEX=9,k$e=Li.ALIGNED_AXIS_INDEX=10,U$e=Li.SCALE_BY_DISTANCE_INDEX=11,D$e=Li.TRANSLUCENCY_BY_DISTANCE_INDEX=12,O$e=Li.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,B$e=Li.DISTANCE_DISPLAY_CONDITION=14,z$e=Li.DISABLE_DEPTH_DISTANCE=15;Li.TEXTURE_COORDINATE_BOUNDS=16;var Mpe=Li.SDF_INDEX=17,H$e=Li.SPLIT_DIRECTION_INDEX=18;Li.NUMBER_OF_PROPERTIES=19;function Sr(e,t){let n=e._billboardCollection;l(n)&&(n._updateBillboard(e,t),e._dirty=!0)}Object.defineProperties(Li.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,Sr(this,Npe))}},position:{get:function(){return this._position},set:function(e){let t=this._position;m.equals(t,e)||(m.clone(e,t),m.clone(e,this._actualPosition),this._updateClamping(),Sr(this,ZD))}},heightReference:{get:function(){return this._heightReference},set:function(e){let t=this._heightReference;e!==t&&(this._heightReference=e,this._updateClamping(),Sr(this,ZD))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){let t=this._pixelOffset;M.equals(t,e)||(M.clone(e,t),Sr(this,Dpe))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;wt.equals(t,e)||(this._scaleByDistance=wt.clone(e,t),Sr(this,U$e))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;wt.equals(t,e)||(this._translucencyByDistance=wt.clone(e,t),Sr(this,D$e))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){let t=this._pixelOffsetScaleByDistance;wt.equals(t,e)||(this._pixelOffsetScaleByDistance=wt.clone(e,t),Sr(this,O$e))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){let t=this._eyeOffset;m.equals(t,e)||(m.clone(e,t),Sr(this,X$e))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,Sr(this,N$e))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){this._verticalOrigin!==e&&(this._verticalOrigin=e,Sr(this,Y$e))}},scale:{get:function(){return this._scale},set:function(e){this._scale!==e&&(this._scale=e,Sr(this,w$e))}},color:{get:function(){return this._color},set:function(e){let t=this._color;U.equals(t,e)||(U.clone(e,t),Sr(this,wpe))}},rotation:{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,Sr(this,M$e))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){let t=this._alignedAxis;m.equals(t,e)||(m.clone(e,t),Sr(this,k$e))}},width:{get:function(){return this._width??this._imageTexture.width},set:function(e){this._width!==e&&(this._width=e,Sr(this,Ype))}},height:{get:function(){return this._height??this._imageTexture.height},set:function(e){this._height!==e&&(this._height=e,Sr(this,Ype))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){this._sizeInMeters!==e&&(this._sizeInMeters=e,Sr(this,wpe))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){Yt.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=Yt.clone(e,this._distanceDisplayCondition),Sr(this,B$e))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,Sr(this,z$e))}},id:{get:function(){return this._id},set:function(e){this._id=e,l(this._pickId)&&(this._pickId.object.id=e)}},pickPrimitive:{get:function(){return this._pickPrimitive},set:function(e){this._pickPrimitive=e,l(this._pickId)&&(this._pickId.object.primitive=e)}},pickId:{get:function(){return this._pickId}},image:{get:function(){return this._imageTexture.id},set:function(e){if(!l(e)){this._imageTexture.unload();return}this._computeImageTextureProperties(void 0,e),this._imageTexture.loadImage(this._imageId,e,this._imageWidth,this._imageHeight)}},ready:{get:function(){return this._imageTexture.ready}},loadError:{get:function(){return this._imageTexture.loadError}},textureDirty:{get:function(){return this._imageTexture.dirty},set:function(e){this._imageTexture.dirty=e}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=m.clone(e,this._actualClampedPosition),Sr(this,ZD)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,Sr(this,Npe))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;U.equals(t,e)||(U.clone(e,t),Sr(this,Mpe))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,Sr(this,Mpe))}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,Sr(this,H$e))}}});Li.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId};Li.prototype._updateClamping=function(){Li._updateClamping(this._billboardCollection,this)};var CD=new pe;Li._updateClamping=function(e,t){if(!l(e)||!l(e._scene))return;let n=e._scene,i=n.ellipsoid??ie.default,o=n.frameState.mode,r=o!==t._mode;if(t._mode=o,(t._heightReference===tt.NONE||r)&&l(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0),t._heightReference===tt.NONE||t._positionFromParent||!l(t._position))return;l(t._removeCallbackFunc)&&t._removeCallbackFunc();let s=i.cartesianToCartographic(t._position);if(!l(s)){t._actualClampedPosition=void 0;return}function a(d){let u=i.cartographicToCartesian(d,t._clampedPosition);TZ(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),pe.clone(s,CD);let c=n.getHeight(s,t._heightReference);l(c)&&(CD.height=c),a(CD)};Li.prototype.computeTextureCoordinates=function(e){return this._imageTexture.computeTextureCoordinates(e)};Li.prototype.setImage=function(e,t){this._computeImageTextureProperties(e,t),this._imageTexture.loadImage(this._imageId,t,this._imageWidth,this._imageHeight)};Li.prototype.setImageTexture=function(e){Gb.clone(e,this._imageTexture)};var kpe=512;Li.prototype._computeImageTextureProperties=function(e,t){if(this._imageWidth=void 0,this._imageHeight=void 0,!l(t)){this._imageId=zn();return}let n;typeof t=="string"?n=t:t instanceof We?n=t._url:l(t.src)&&(n=t.src),this._imageId=e??n??zn(),l(this._width)&&l(this._height)&&!this._sizeInMeters&&K$e(n)&&(this._imageWidth=Math.min(this._width,kpe),this._imageHeight=Math.min(this._height,kpe))};function K$e(e){return l(e)?Zh(e)?e.startsWith("data:image/svg+xml"):W0(e)==="svg":!1}Li.prototype.setImageSubRegion=function(e,t){this._imageTexture.addImageSubRegion(e,t)};Li.prototype._setTranslate=function(e){let t=this._translate;M.equals(t,e)||(M.clone(e,t),Sr(this,Dpe))};Li.prototype._getActualPosition=function(){return l(this._clampedPosition)?this._clampedPosition:this._actualPosition};Li.prototype._setActualPosition=function(e){l(this._clampedPosition)||m.clone(e,this._actualPosition),Sr(this,ZD)};var Upe=new se;Li._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,Upe),no.computeActualEllipsoidPosition(n,Upe))};var Ope=new m;Li._computeScreenSpacePosition=function(e,t,n,i,o,r){let s=F.multiplyByPoint(e,t,Ope),a=no.worldWithEyeOffsetToWindowCoordinates(o,s,n,r);if(l(a))return M.add(a,i,a),a};var AD=new M(0,0);Li.prototype.computeScreenSpacePosition=function(e,t){let n=this._billboardCollection;l(t)||(t=new M),M.clone(this._pixelOffset,AD),M.add(AD,this._translate,AD);let i=n.modelMatrix,o=this._position;if(l(this._clampedPosition)&&(o=this._clampedPosition,e.mode!==re.SCENE3D)){let s=e.mapProjection,a=s.ellipsoid,c=s.unproject(o,CD);o=a.cartographicToCartesian(c,Ope),i=F.IDENTITY}return Li._computeScreenSpacePosition(i,o,this._eyeOffset,AD,e,t)};Li.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===Dn.BOTTOM||e.verticalOrigin===Dn.BASELINE?a-=o:e.verticalOrigin===Dn.CENTER&&(a-=o*.5),l(n)||(n=new Qe),n.x=s,n.y=a,n.width=i,n.height=o,n};Li.prototype.equals=function(e){return this===e||l(e)&&this._id===e._id&&m.equals(this._position,e._position)&&this.image===e.image&&this._show===e._show&&this._scale===e._scale&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&U.equals(this._color,e._color)&&M.equals(this._pixelOffset,e._pixelOffset)&&M.equals(this._translate,e._translate)&&m.equals(this._eyeOffset,e._eyeOffset)&&wt.equals(this._scaleByDistance,e._scaleByDistance)&&wt.equals(this._translucencyByDistance,e._translucencyByDistance)&&wt.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&Yt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._splitDirection===e._splitDirection};Li.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 Ao=Li;var K8n=x(T(),1),Bpe={OPAQUE:0,TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2};Object.freeze(Bpe);var zo=Bpe;var j8n=x(T(),1),J$e={FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25},Pa=Object.freeze(J$e);var j$e=Ao.SHOW_INDEX,tP=Ao.POSITION_INDEX,Hpe=Ao.PIXEL_OFFSET_INDEX,Kpe=Ao.EYE_OFFSET_INDEX,Q$e=Ao.HORIZONTAL_ORIGIN_INDEX,q$e=Ao.VERTICAL_ORIGIN_INDEX,$$e=Ao.SCALE_INDEX,F_=Ao.IMAGE_INDEX_INDEX,Jpe=Ao.COLOR_INDEX,eet=Ao.ROTATION_INDEX,tet=Ao.ALIGNED_AXIS_INDEX,jpe=Ao.SCALE_BY_DISTANCE_INDEX,Qpe=Ao.TRANSLUCENCY_BY_DISTANCE_INDEX,qpe=Ao.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX,$pe=Ao.DISTANCE_DISPLAY_CONDITION,net=Ao.DISABLE_DEPTH_DISTANCE,iet=Ao.TEXTURE_COORDINATE_BOUNDS,e0e=Ao.SDF_INDEX,t0e=Ao.SPLIT_DIRECTION_INDEX,wQ=Ao.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 vm(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(wQ),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??zo.OPAQUE_AND_TRANSLUCENT,this._blendOption=void 0,this._mode=re.SCENE3D,this._buffersUsage=[Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW],this._highlightColor=U.clone(U.WHITE),this._coarseDepthTestDistance=e.coarseDepthTestDistance??ie.default.minimumRadius/10,this._threePointDepthTestDistance=e.threePointDepthTestDistance??ie.default.minimumRadius/1e3,this._uniforms={u_atlas:()=>this.textureAtlas.texture,u_highlightColor:()=>this._highlightColor,u_coarseDepthTestDistance:()=>this._coarseDepthTestDistance,u_threePointDepthTestDistance:()=>this._threePointDepthTestDistance};let n=this._scene;l(n)&&l(n.terrainProviderChanged)&&(this._removeCallbackFunc=n.terrainProviderChanged.addEventListener(function(){let i=this._billboards,o=i.length;for(let r=0;r<o;++r)l(i[r])&&i[r]._updateClamping()},this))}Object.defineProperties(vm.prototype,{length:{get:function(){return MQ(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 n0e(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}vm.prototype.add=function(e){let t=new Ao(e,this);return t._index=this._billboards.length,this._billboards.push(t),this._createVertexArray=!0,t};vm.prototype.remove=function(e){return this.contains(e)?(this._billboards[e._index]=void 0,this._billboardsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};vm.prototype.removeAll=function(){n0e(this._billboards),this._billboards=[],this._billboardsToUpdate=[],this._billboardsToUpdateIndex=0,this._billboardsRemoved=!1,this._createVertexArray=!0};function MQ(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}}vm.prototype._updateBillboard=function(e,t){e._dirty||(this._billboardsToUpdate[this._billboardsToUpdateIndex++]=e),++this._propertiesChanged[t]};vm.prototype.contains=function(e){return l(e)&&e._billboardCollection===this};vm.prototype.get=function(e){return MQ(this),this._billboards[e]};function zpe(e){let t=e.cache.billboardCollection_indexBufferInstanced;return l(t)||(t=qe.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Fe.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_indexBufferInstanced=t),t}function oet(e){let t=e.cache.billboardCollection_vertexBufferInstanced;return l(t)||(t=qe.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:Fe.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.billboardCollection_vertexBufferInstanced=t),t}vm.prototype.computeNewBuffersUsage=function(){let e=this._buffersUsage,t=!1,n=this._propertiesChanged;for(let i=0;i<wQ;++i){let o=n[i]===0?Fe.STATIC_DRAW:Fe.STREAM_DRAW;t=t||e[i]!==o,e[i]=o}return t};function ret(e,t,n,i,o){let r=[{index:vo.positionHighAndScale,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[tP]},{index:vo.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[tP]},{index:vo.compressedAttribute0,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[Hpe]},{index:vo.compressedAttribute1,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[Qpe]},{index:vo.compressedAttribute2,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[Jpe]},{index:vo.eyeOffset,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[Kpe]},{index:vo.scaleByDistance,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[jpe]},{index:vo.pixelOffsetScaleByDistance,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[qpe]},{index:vo.compressedAttribute3,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[$pe]},{index:vo.textureCoordinateBoundsOrLabelTranslate,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[iet]},{index:vo.splitDirection,componentsPerAttribute:1,componentDatatype:K.FLOAT,usage:n[t0e]},{index:vo.direction,componentsPerAttribute:2,componentDatatype:K.FLOAT,vertexBuffer:oet(e)}];return l(i)&&r.push({index:vo.a_batchId,componentsPerAttribute:1,componentDatatype:K.FLOAT,bufferUsage:Fe.STATIC_DRAW}),o&&r.push({index:vo.sdf,componentsPerAttribute:2,componentDatatype:K.FLOAT,usage:n[e0e]}),new k0(e,r,t,!0)}var IQ=new Tn;function i0e(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),Tn.fromCartesian(s,IQ);let a=i.scale,c=i.rotation;c!==0&&(e._shaderRotation=!0),e._maxScale=Math.max(e._maxScale,a);let d=IQ.high,u=IQ.low;o(i._index,d.x,d.y,d.z,a),r(i._index,u.x,u.y,u.z,c)}var Dy=new M,Wm=32768,kQ=65536,PQ=4096,I_=256,set=128,aet=32,cet=8,VD=4,det=1/256,o0e=new Qe;function r0e(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 h=i.horizontalOrigin,p=i._verticalOrigin,b=i.show&&i.clusterShow;i.color.alpha===0&&(b=!1),p===Dn.BASELINE&&(p=Dn.BOTTOM),e._allHorizontalCenter=e._allHorizontalCenter&&h===Ii.CENTER,e._allVerticalCenter=e._allVerticalCenter&&p===Dn.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,-Wm,Wm)+Wm)*set;_+=(h+1)*aet,_+=(p+1)*cet,_+=(b?1:0)*VD;let S=Math.floor(W.clamp(a,-Wm,Wm)+Wm)*I_,A=Math.floor(W.clamp(d*VD,-Wm,Wm)+Wm)*I_,Z=(W.clamp(u*VD,-Wm,Wm)+Wm)*det,V=Math.floor(Z),E=Math.floor((Z-V)*I_);S+=V,A+=E,Dy.x=f,Dy.y=y;let L=cn.compressTextureCoordinates(Dy);o(i._index,_,S,A,L)}function s0e(e,t,n,i){let o=n[vo.compressedAttribute1],r=i.alignedAxis;m.equals(r,m.ZERO)||(e._shaderAlignedAxis=!0);let s=0,a=1,c=1,d=1,u=i.translucencyByDistance;l(u)&&(s=u.near,a=u.nearValue,c=u.far,d=u.farValue,(a!==1||d!==1)&&(e._shaderTranslucencyByDistance=!0));let h=Math.round(i.width??0);e._maxSize=Math.max(e._maxSize,h);let p=W.clamp(h,0,kQ),b=0;Math.abs(m.magnitudeSquared(r)-1)<W.EPSILON6&&(b=cn.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 NQ(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(m.magnitudeSquared(i.alignedAxis)-1)<W.EPSILON6?1:0;e._allSizedInMeters=e._allSizedInMeters&&a===1;let d=i.height??0;e._maxSize=Math.max(e._maxSize,d);let u=i._labelHorizontalOrigin??-2;u+=2;let h=cn.encodeRGB8(r),p=cn.encodeRGB8(s),b=U.floatToByte(r.alpha)*kQ+U.floatToByte(s.alpha)*I_+(a*2+c),f=d*VD+u;o(i._index,h,p,b,f)}function YQ(e,t,n,i){let o=n[vo.eyeOffset],r=i.eyeOffset,s=r.z;if(i._heightReference!==tt.NONE&&(s*=1.005),e._maxEyeOffset=Math.max(e._maxEyeOffset,Math.abs(r.x),Math.abs(r.y),Math.abs(s)),Dy.x=0,Dy.y=0,i.ready){let c=i.computeTextureCoordinates(o0e);Dy.x=c.width,Dy.y=c.height}let a=cn.compressTextureCoordinates(Dy);o(i._index,r.x,r.y,s,a)}function a0e(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 c0e(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 l0e(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=pm(i.heightReference)&&t.context.depthTexture;c*=c,(d||c>0)&&(e._shaderDisableDepthDistance=!0,c===Number.POSITIVE_INFINITY&&(c=-1));let u,h;l(i._labelDimensions)?(h=i._labelDimensions.x,u=i._labelDimensions.y):(h=i.width??0,u=i.height??0);let p=Math.floor(W.clamp(h,0,PQ)),b=Math.floor(W.clamp(u,0,PQ)),f=p*PQ+b;o(i._index,r,s,c,f)}function d0e(e,t,n,i){if(pm(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 uet(e,t,n,i){if(!l(e._batchTable))return;let o=n[vo.a_batchId],r=i._batchIndex;o(i._index,r)}function u0e(e,t,n,i){if(!e._sdf)return;let o=n[vo.sdf],r=i.outlineColor,s=i.outlineWidth,a=cn.encodeRGB8(r),c=s/Pa.RADIUS,d=U.floatToByte(r.alpha)*kQ+U.floatToByte(c)*I_;o(i._index,a,d)}function m0e(e,t,n,i){let o=n[vo.splitDirection],r=0,s=i.splitDirection;l(s)&&(r=s),o(i._index,r)}function met(e,t,n,i){i0e(e,t,n,i),r0e(e,t,n,i),s0e(e,t,n,i),NQ(e,t,n,i),YQ(e,t,n,i),a0e(e,t,n,i),c0e(e,t,n,i),l0e(e,t,n,i),d0e(e,t,n,i),uet(e,t,n,i),u0e(e,t,n,i),m0e(e,t,n,i)}function XQ(e,t,n,i,o,r){let s;i.mode===re.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;let a=[];for(let c=0;c<n;++c){let d=t[c],u=d.position,h=Ao._computeActualPosition(d,u,i,o);l(h)&&(d._setActualPosition(h),r?a.push(h):de.expand(s,h,s))}r&&de.fromPoints(a,s)}function het(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)&&XQ(e,i,i.length,t,r,!0)):n===re.MORPHING?XQ(e,i,i.length,t,r,!0):(n===re.SCENE2D||n===re.COLUMBUS_VIEW)&&XQ(e,o,e._billboardsToUpdateIndex,t,r,!1)}function fet(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 pet(e,t){let i=t.createViewportQuadCommand(`uniform sampler2D billboard_texture;
in vec2 v_textureCoordinates;
void main()
{
out_FragColor = texture(billboard_texture, v_textureCoordinates);
}
`,{uniformMap:{billboard_texture:function(){return e.textureAtlas.texture}}});return i.pass=Le.OVERLAY,i}var bet=[];vm.prototype.update=function(e){if(MQ(this),!this.show)return;let t=e.context;if(!t.instancedArrays||!(Lt.maximumVertexTextureImageUnits>0))throw new he("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;het(this,e),n=this._billboards,i=n.length;let s=this._billboardsToUpdate,a=this._billboardsToUpdateIndex,c=this._propertiesChanged,d=r.guid,u=this._createVertexArray||this._textureAtlasGUID!==d;this._textureAtlasGUID=d;let h,p=e.passes,b=p.pick;if(u||!b&&this.computeNewBuffersUsage()){this._createVertexArray=!1;for(let v=0;v<wQ;++v)c[v]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),i>0){this._vaf=ret(t,i,this._buffersUsage,this._batchTable,this._sdf),h=this._vaf.writers;for(let v=0;v<i;++v){let I=this._billboards[v];I._dirty=!1,I.textureDirty=!1,met(this,e,h,I)}this._vaf.commit(zpe(t))}this._billboardsToUpdateIndex=0}else if(a>0){let v=bet;v.length=0,(c[tP]||c[eet]||c[$$e])&&v.push(i0e),(c[F_]||c[Hpe]||c[Q$e]||c[q$e]||c[j$e])&&(v.push(r0e),v.push(YQ)),(c[F_]||c[tet]||c[Qpe])&&(v.push(s0e),v.push(NQ)),(c[F_]||c[Jpe])&&v.push(NQ),(c[F_]||c[Kpe])&&v.push(YQ),c[jpe]&&v.push(a0e),c[qpe]&&v.push(c0e),(c[$pe]||c[net]||c[F_]||c[tP])&&v.push(l0e),(c[F_]||c[tP])&&v.push(d0e),c[e0e]&&v.push(u0e),c[t0e]&&v.push(m0e);let I=v.length;if(h=this._vaf.writers,a/i>.1){for(let X=0;X<a;++X){let N=s[X];N._dirty=!1,N.textureDirty=!1;for(let g=0;g<I;++g)v[g](this,e,h,N)}this._vaf.commit(zpe(t))}else{for(let X=0;X<a;++X){let N=s[X];N._dirty=!1,N.textureDirty=!1;for(let g=0;g<I;++g)v[g](this,e,h,N);this._vaf.subCommit(N._index,1)}this._vaf.endSubCommits()}this._billboardsToUpdateIndex=0}if(a>i*1.5&&(s.length=i),!l(this._vaf)||!l(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,de.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let f,y=F.IDENTITY;e.mode===re.SCENE3D?(y=this.modelMatrix,f=de.clone(this._baseVolumeWC,this._boundingVolume)):f=de.clone(this._baseVolume2D,this._boundingVolume),fet(this,e,f);let _=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,_){this._blendOption===zo.OPAQUE||this._blendOption===zo.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=De.fromCache({depthTest:{enabled:!0,func:ne.LESS},depthMask:!0}):this._rsOpaque=void 0;let v=this._blendOption===zo.TRANSLUCENT;this._blendOption===zo.TRANSLUCENT||this._blendOption===zo.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=De.fromCache({depthTest:{enabled:!0,func:v?ne.LEQUAL:ne.LESS},depthMask:v,blending:tn.ALPHA_BLEND}):this._rsTranslucent=void 0}this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||e.minimumDisableDepthTestDistance!==0;let S,A,Z,V,E;if(_||this._shaderRotation!==this._compiledShaderRotation||this._shaderAlignedAxis!==this._compiledShaderAlignedAxis||this._shaderScaleByDistance!==this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance!==this._compiledShaderTranslucencyByDistance||this._shaderPixelOffsetScaleByDistance!==this._compiledShaderPixelOffsetScaleByDistance||this._shaderDistanceDisplayCondition!==this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance||this._shaderClampToGround!==this._compiledShaderClampToGround||this._sdf!==this._compiledSDF){S=eP,A=$I,E=["INSTANCED"],l(this._batchTable)&&(E.push("VECTOR_TILE"),S=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(S),A=this._batchTable.getFragmentShaderCallback(!1,void 0)(A)),Z=new Be({defines:E,sources:[S]}),this._shaderRotation&&Z.defines.push("ROTATION"),this._shaderAlignedAxis&&Z.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&Z.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&Z.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&Z.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&Z.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&Z.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&Z.defines.push("VS_THREE_POINT_DEPTH_CHECK");let v=1-Pa.CUTOFF;this._sdf&&Z.defines.push("SDF");let I=l(this._batchTable)?"VECTOR_TILE":"";this._blendOption===zo.OPAQUE_AND_TRANSLUCENT&&(V=new Be({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:Z,fragmentShaderSource:V,attributeLocations:vo}),V=new Be({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:Z,fragmentShaderSource:V,attributeLocations:vo})),this._blendOption===zo.OPAQUE&&(V=new Be({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:Z,fragmentShaderSource:V,attributeLocations:vo})),this._blendOption===zo.TRANSLUCENT&&(V=new Be({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:Z,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 L=e.commandList;if(p.render||p.pick){let v=this._colorCommands,I=this._blendOption===zo.OPAQUE,X=this._blendOption===zo.OPAQUE_AND_TRANSLUCENT,N=this._vaf.va,g=N.length,C=this._uniforms,R;l(this._batchTable)?(C=this._batchTable.getUniformMapCallback()(C),R=this._batchTable.getPickId()):R="v_pickColor",v.length=g;let G=X?g*2:g;for(let P=0;P<G;++P){let Y=v[P];l(Y)||(Y=v[P]=new et);let O=I||X&&P%2===0;Y.pass=O||!X?Le.OPAQUE:Le.TRANSLUCENT,Y.owner=this;let k=X?Math.floor(P/2):P;Y.boundingVolume=f,Y.modelMatrix=y,Y.count=N[k].indicesCount,Y.shaderProgram=O?this._sp:this._spTranslucent,Y.uniformMap=C,Y.vertexArray=N[k].va,Y.renderState=O?this._rsOpaque:this._rsTranslucent,Y.debugShowBoundingVolume=this.debugShowBoundingVolume,Y.pickId=R,Y.count=6,Y.instanceCount=i,L.push(Y)}this.debugShowTextureAtlas&&(l(this.debugCommand)||(this.debugCommand=pet(this,e.context)),L.push(this.debugCommand))}this._allBillboardsReady=o};vm.prototype.isDestroyed=function(){return!1};vm.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(),n0e(this._billboards),me(this)};var Tu=vm;var O7n=x(T(),1);var N7n=x(T(),1);function get(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_=get;var yet=new pe,sf=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),HC(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),HC(this)}get pointSize(){return this._pointSize}set pointSize(t){this._pointSize=t,HC(this)}get pointOutlineColor(){return this._pointOutlineColor}set pointOutlineColor(t){this._pointOutlineColor=U.clone(t,this._pointOutlineColor),HC(this)}get pointOutlineWidth(){return this._pointOutlineWidth}set pointOutlineWidth(t){this._pointOutlineWidth=t,HC(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,yet);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&&HC(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 Bs.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)}};Qt(sf,"defaultColor",U.WHITE),Qt(sf,"defaultPointOutlineColor",U.BLACK),Qt(sf,"defaultPointOutlineWidth",0),Qt(sf,"defaultPointSize",8);function HC(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??sf.defaultColor,i=e._pointOutlineColor??sf.defaultPointOutlineColor,o=e._pointOutlineWidth??sf.defaultPointOutlineWidth,r=e._pointSize??sf.defaultPointSize,s=e._billboardColor,a=e._billboardOutlineColor,c=e._billboardOutlineWidth,d=e._billboardSize;if(U.equals(n,s)&&U.equals(i,a)&&o===c&&r===d)return;e._billboardColor=U.clone(n,e._billboardColor),e._billboardOutlineColor=U.clone(i,e._billboardOutlineColor),e._billboardOutlineWidth=o,e._billboardSize=r;let u=n.alpha,h=n.toCssColorString(),p=i.toCssColorString(),b=JSON.stringify([h,r,p,o]);t.setImage(b,P_(u,h,p,o,r))}var Lb=sf;var Y6n=x(T(),1);var j7n=x(T(),1);function xet(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 Tet(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 h=xet(u,e);d.dimensions=h,document.body.removeChild(d),d.style.visibility="";let p=!/\S/.test(e),b=i&&!p?Math.ceil(r/2):0,f=b*2,y=-h.minx+b,_=Math.ceil(h.width)+y+c+b,S=h.height+c+f,A=h.ascent+a+b;if(d.width=_,d.height=S,u.font=n,u.lineJoin="round",u.lineWidth=r,u[X_]=!1,s!==U.TRANSPARENT&&(u.fillStyle=s.toCssColorString(),u.fillRect(0,0,d.width,d.height)),i){let Z=t.strokeColor??U.BLACK;u.strokeStyle=Z.toCssColorString(),u.strokeText(e,y+a,A)}if(o){let Z=t.fillColor??U.WHITE;u.fillStyle=Z.toCssColorString(),u.fillText(e,y+a,A)}return d}var N_=Tet;var C0e=x(b0e(),1);var b6n=x(T(),1);var e6n=x(T(),1),g0e={FILL:0,OUTLINE:1,FILL_AND_OUTLINE:2};Object.freeze(g0e);var ar=g0e;var y0e={},x0e=0,Aet=256,Zet=new U(.165,.165,.165,.8),Cet=new M(7,5),Hs=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 iP(e){!e._rebindAllGlyphs&&!e._repositionAllGlyphs&&e._labelCollection._labelsToUpdate.push(e),e._repositionAllGlyphs=!0}function oP(e,t){return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function _0e(e){let t=y0e[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(oP(n,"line-height"));isNaN(i)&&(i=void 0),t={family:oP(n,"font-family"),size:oP(n,"font-size").replace("px",""),style:oP(n,"font-style"),weight:oP(n,"font-weight"),lineHeight:i},document.body.removeChild(n),x0e<Aet&&(y0e[e._font]=t,x0e++)}e._fontFamily=t.family,e._fontSize=t.size,e._fontStyle=t.style,e._fontWeight=t.weight,e._lineHeight=t.lineHeight}function af(e,t){e=e??B.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,r=e.distanceDisplayCondition;l(n)&&(n=wt.clone(n)),l(i)&&(i=wt.clone(i)),l(o)&&(o=wt.clone(o)),l(r)&&(r=Yt.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??Zet),this._backgroundPadding=M.clone(e.backgroundPadding??Cet),this._style=e.style??ar.FILL,this._verticalOrigin=e.verticalOrigin??Dn.BASELINE,this._horizontalOrigin=e.horizontalOrigin??Ii.LEFT,this._pixelOffset=M.clone(e.pixelOffset??M.ZERO),this._eyeOffset=m.clone(e.eyeOffset??m.ZERO),this._position=m.clone(e.position??m.ZERO),this._scale=e.scale??1,this._id=e.id,this._translucencyByDistance=n,this._pixelOffsetScaleByDistance=i,this._scaleByDistance=o,this._heightReference=e.heightReference??tt.NONE,this._distanceDisplayCondition=r,this._disableDepthTestDistance=e.disableDepthTestDistance,this._labelCollection=t,this._glyphs=[],this._backgroundBillboard=void 0,this._batchIndex=void 0,this._rebindAllGlyphs=!0,this._repositionAllGlyphs=!0,this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=void 0,this._clusterShow=!0,this.text=e.text??"",this._relativeSize=1,_0e(this),this._updateClamping()}Object.defineProperties(af.prototype,{show:{get:function(){return this._show},set:function(e){if(this._show!==e){this._show=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i].billboard;l(r)&&(r.show=e)}let n=this._backgroundBillboard;l(n)&&(n.show=e)}}},position:{get:function(){return this._position},set:function(e){let t=this._position;if(!m.equals(t,e)){m.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o].billboard;l(s)&&(s.position=e)}let i=this._backgroundBillboard;l(i)&&(i.position=e),this._updateClamping()}}},heightReference:{get:function(){return this._heightReference},set:function(e){if(e!==this._heightReference){this._heightReference=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i].billboard;l(r)&&(r.heightReference=e)}let n=this._backgroundBillboard;l(n)&&(n.heightReference=e),iP(this),this._updateClamping()}}},text:{get:function(){return this._text},set:function(e){if(this._text!==e){this._text=e;let t=af.filterUnsupportedCharacters(e);this._renderedText=af.enableRightToLeftDetection?Wet(t):t,Y_(this)}}},font:{get:function(){return this._font},set:function(e){this._font!==e&&(this._font=e,Y_(this),_0e(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;M.equals(t,e)||(M.clone(e,t),iP(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(!M.equals(t,e)){M.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.pixelOffset=e)}let i=this._backgroundBillboard;l(i)&&(i.pixelOffset=e)}}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;if(!wt.equals(t,e)){this._translucencyByDistance=wt.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(!wt.equals(t,e)){this._pixelOffsetScaleByDistance=wt.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(!wt.equals(t,e)){this._scaleByDistance=wt.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.scaleByDistance=e)}let i=this._backgroundBillboard;l(i)&&(i.scaleByDistance=e)}}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){let t=this._eyeOffset;if(!m.equals(t,e)){m.clone(e,t);let n=this._glyphs;for(let o=0,r=n.length;o<r;o++){let s=n[o];l(s.billboard)&&(s.billboard.eyeOffset=e)}let i=this._backgroundBillboard;l(i)&&(i.eyeOffset=e)}}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){this._horizontalOrigin!==e&&(this._horizontalOrigin=e,iP(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),iP(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),iP(this)}}},totalScale:{get:function(){return this._scale*this._relativeSize}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!Yt.equals(e,this._distanceDisplayCondition)){this._distanceDisplayCondition=Yt.clone(e,this._distanceDisplayCondition);let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.distanceDisplayCondition=e)}let n=this._backgroundBillboard;l(n)&&(n.distanceDisplayCondition=e)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){this._disableDepthTestDistance=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.disableDepthTestDistance=e)}let n=this._backgroundBillboard;l(n)&&(n.disableDepthTestDistance=e)}}},id:{get:function(){return this._id},set:function(e){if(this._id!==e){this._id=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.id=e)}let n=this._backgroundBillboard;l(n)&&(n.id=e)}}},pickId:{get:function(){if(!(this._glyphs.length===0||!l(this._glyphs[0].billboard)))return this._glyphs[0].billboard.pickId}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=m.clone(e,this._actualClampedPosition);let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard._clampedPosition=e)}let n=this._backgroundBillboard;l(n)&&(n._clampedPosition=e)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){if(this._clusterShow!==e){this._clusterShow=e;let t=this._glyphs;for(let i=0,o=t.length;i<o;i++){let r=t[i];l(r.billboard)&&(r.billboard.clusterShow=e)}let n=this._backgroundBillboard;l(n)&&(n.clusterShow=e)}}},ready:{get:function(){if(this._rebindAllGlyphs||this._repositionAllGlyphs||l(this._backgroundBillboard)&&!this._backgroundBillboard.ready)return!1;let e=this._glyphs;for(let t=0,n=e.length;t<n;t++){let i=e[t];if(l(i.billboard)&&!i.billboard.ready)return!1}return!0}}});af.prototype._updateClamping=function(){Ao._updateClamping(this._labelCollection,this)};af.prototype.computeScreenSpacePosition=function(e,t){l(t)||(t=new M);let i=this._labelCollection.modelMatrix,o=l(this._actualClampedPosition)?this._actualClampedPosition:this._position;return Ao._computeScreenSpacePosition(i,o,this._eyeOffset,this._pixelOffset,e,t)};af.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===Dn.BOTTOM||e.verticalOrigin===Dn.BASELINE?o-=s:e.verticalOrigin===Dn.CENTER&&(o-=s*.5);else{i=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;let d=0,u=0,h=e._glyphs,p=h.length;for(let b=0;b<p;++b){let f=h[b],y=f.billboard;if(!l(y))continue;let _=t.x+y._translate.x,S=t.y-y._translate.y,A=f.dimensions.width*a,Z=f.dimensions.height*a;e.verticalOrigin===Dn.BOTTOM||e.verticalOrigin===Dn.BASELINE?S-=Z:e.verticalOrigin===Dn.CENTER&&(S-=Z*.5),e._verticalOrigin===Dn.TOP?S+=Pa.PADDING*a:(e._verticalOrigin===Dn.BOTTOM||e._verticalOrigin===Dn.BASELINE)&&(S-=Pa.PADDING*a),i=Math.min(i,_),o=Math.min(o,S),d=Math.max(d,_+A),u=Math.max(u,S+Z)}r=d-i,s=u-o}return l(n)||(n=new Qe),n.x=i,n.y=o,n.width=r,n.height=s,n};af.filterUnsupportedCharacters=function(e){let t=new RegExp(/[\u0000-\u0008\u000E-\u001F\u00ad\u202a-\u206f\u200b-\u200f]/,"g");return e.replace(t,"")};af.prototype.equals=function(e){return this===e||l(e)&&this._show===e._show&&this._scale===e._scale&&this._outlineWidth===e._outlineWidth&&this._showBackground===e._showBackground&&this._style===e._style&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&this._renderedText===e._renderedText&&this._font===e._font&&m.equals(this._position,e._position)&&U.equals(this._fillColor,e._fillColor)&&U.equals(this._outlineColor,e._outlineColor)&&U.equals(this._backgroundColor,e._backgroundColor)&&M.equals(this._backgroundPadding,e._backgroundPadding)&&M.equals(this._pixelOffset,e._pixelOffset)&&m.equals(this._eyeOffset,e._eyeOffset)&&wt.equals(this._translucencyByDistance,e._translucencyByDistance)&&wt.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&wt.equals(this._scaleByDistance,e._scaleByDistance)&&Yt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._id===e._id};af.prototype.isDestroyed=function(){return!1};af.enableRightToLeftDetection=!1;function Vet(e,t){let n=/[a-zA-Z0-9]/,i=/[()[\]{}<>]/,o=[],r="",s=Hs.LTR,a="",c=e.length;for(let d=0;d<c;++d){let u=e.charAt(d);t.test(u)?a=Hs.RTL:n.test(u)?a=Hs.LTR:i.test(u)?a=Hs.BRACKETS:a=Hs.WEAK,d===0&&(s=a),s===a&&a!==Hs.BRACKETS?r+=u:(r!==""&&o.push({Type:s,Word:r}),s=a,r=u)}return o.push({Type:a,Word:r}),o}function Ret(e){return e.split("").reverse().join("")}function rP(e,t,n){return e.slice(0,t)+n+e.slice(t)}function Eet(e){switch(e){case"(":return")";case")":return"(";case"[":return"]";case"]":return"[";case"{":return"}";case"}":return"{";case"<":return">";case">":return"<"}}var Get="\u05D0-\u05EA",Let="\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF",T0e=new RegExp(`[${Get}${Let}]`);function Wet(e){let t=e.split(`
`),n="";for(let i=0;i<t.length;i++){let o=t[i],r=T0e.test(o.charAt(0)),s=Vet(o,T0e),a=0,c="";for(let d=0;d<s.length;++d){let u=s[d],h=u.Type===Hs.BRACKETS?Eet(u.Word):Ret(u.Word);r?u.Type===Hs.RTL?(c=h+c,a=0):u.Type===Hs.LTR?(c=rP(c,a,u.Word),a+=u.Word.length):(u.Type===Hs.WEAK||u.Type===Hs.BRACKETS)&&(u.Type===Hs.WEAK&&s[d-1].Type===Hs.BRACKETS?c=h+c:s[d-1].Type===Hs.RTL?(c=h+c,a=0):s.length>d+1?s[d+1].Type===Hs.RTL?(c=h+c,a=0):(c=rP(c,a,u.Word),a+=u.Word.length):c=rP(c,0,h)):u.Type===Hs.RTL?c=rP(c,a,h):u.Type===Hs.LTR?(c+=u.Word,a=c.length):(u.Type===Hs.WEAK||u.Type===Hs.BRACKETS)&&(d>0&&s[d-1].Type===Hs.RTL?s.length>d+1?s[d+1].Type===Hs.RTL?c=rP(c,a,h):(c+=u.Word,a=c.length):c+=u.Word:(c+=u.Word,a=c.length))}n+=c,i<t.length-1&&(n+=`
`)}return n}var Oy=af;var V0e=x(S0e(),1);function Fet(){this.dimensions=void 0,this.billboardTexture=void 0,this.billboard=void 0}var Iet=1.2,A0e="ID_WHITE_PIXEL",UQ=new M(4,4),Pet=new Qe(1,1,1,1);function Xet(e,t){let n=t._backgroundBillboardTexture;if(!n.hasImage){let o=document.createElement("canvas");o.width=UQ.x,o.height=UQ.y;let r=o.getContext("2d");r.fillStyle="#fff",r.fillRect(0,0,o.width,o.height),n.loadImage(A0e,o),n.addImageSubRegion(A0e,Pet)}let i=e.add({collection:t});return i.setImageTexture(n),i._positionFromParent=!0,i._labelTranslate=new M,i}var Wb={};function Net(e,t,n,i,o,r){return Wb.font=t,Wb.fillColor=n,Wb.strokeColor=i,Wb.strokeWidth=o,Wb.padding=Pa.PADDING,Wb.fill=r===ar.FILL||r===ar.FILL_AND_OUTLINE,Wb.stroke=r===ar.OUTLINE||r===ar.FILL_AND_OUTLINE,Wb.backgroundColor=U.BLACK,N_(e,Wb)}function DQ(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 Yet=new V0e.default,wet=/\s/;function Met(e,t){let n=t._renderedText,i=Yet.splitGraphemes(n),o=i.length,r=t._glyphs,s=r.length;if(t._relativeSize=t._fontSize/Pa.FONT_SIZE,o<s)for(let p=o;p<s;++p)DQ(e,r[p]);r.length=o;let a=t._backgroundBillboard,c=e._backgroundBillboardCollection;t._showBackground&&!l(a)&&(a=Xet(c,e),t._backgroundBillboard=a),ket(c,t,a);let d=e._glyphBillboardCollection,u=d.billboardTextureCache,h=e._textDimensionsCache;for(let p=0;p<o;++p){let b=i[p],f=t._verticalOrigin,y=JSON.stringify([b,t._fontFamily,t._fontStyle,t._fontWeight,+f]),_=h[y],S=u.get(y);if(!l(S)||!l(_)){S=new Gb(d),u.set(y,S);let E=`${t._fontStyle} ${t._fontWeight} ${Pa.FONT_SIZE}px ${t._fontFamily}`,L=Net(b,E,U.WHITE,U.WHITE,0,ar.FILL);if(_=L.dimensions,h[y]=_,L.width>0&&L.height>0&&!wet.test(b)){let v=(0,C0e.default)(L,{cutoff:Pa.CUTOFF,radius:Pa.RADIUS}),I=L.getContext("2d"),X=L.width,N=L.height,g=I.getImageData(0,0,X,N);for(let C=0;C<X;C++)for(let R=0;R<N;R++){let G=R*X+C,P=v[G]*255,Y=G*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,L)}}let A=r[p];if(l(A)||(A=new Fet,A.dimensions=_,A.billboardTexture=S,r[p]=A),A.billboardTexture.id!==y&&(A.billboardTexture=S,A.dimensions=_),!S.hasImage){DQ(e,A);continue}let Z=A.billboard,V=e._spareBillboards;l(Z)||(V.length>0?Z=V.pop():(Z=d.add({collection:e}),Z._labelDimensions=new M,Z._labelTranslate=new M,Z._positionFromParent=!0),A.billboard=Z),Z.setImageTexture(S),Z.show=t._show,Z.position=t._position,Z.eyeOffset=t._eyeOffset,Z.pixelOffset=t._pixelOffset,Z.horizontalOrigin=Ii.LEFT,Z.verticalOrigin=t._verticalOrigin,Z.heightReference=t._heightReference,l(t._clampedPosition)&&(Z._clampedPosition=t._clampedPosition),Z.scale=t.totalScale,Z.pickPrimitive=t,Z.id=t._id,Z.translucencyByDistance=t._translucencyByDistance,Z.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,Z.scaleByDistance=t._scaleByDistance,Z.distanceDisplayCondition=t._distanceDisplayCondition,Z.disableDepthTestDistance=t._disableDepthTestDistance,Z._batchIndex=t._batchIndex,Z.outlineColor=t.outlineColor,t.style===ar.FILL_AND_OUTLINE?(Z.color=t._fillColor,Z.outlineWidth=t.outlineWidth):t.style===ar.FILL?(Z.color=t._fillColor,Z.outlineWidth=0):t.style===ar.OUTLINE&&(Z.color=U.TRANSPARENT,Z.outlineWidth=t.outlineWidth)}t._repositionAllGlyphs=!0}function ket(e,t,n){if(!l(n))return;let i=t.show&&t._showBackground&&t._renderedText.split(`
`).join("").length>0;if(t.show&&!i){e.remove(n),t._backgroundBillboard=n=void 0;return}n.color=t._backgroundColor,n.show=t._show,n.position=t._position,n.eyeOffset=t._eyeOffset,n.pixelOffset=t._pixelOffset,n.horizontalOrigin=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 Z0e(e,t,n){return t===Ii.CENTER?-e/2:t===Ii.RIGHT?-(e+n.x):n.x}var Wr=new M,Uet=new M;function Det(e){let t=e._glyphs,n=e._renderedText,i=0,o=0,r=[],s=Number.NEGATIVE_INFINITY,a=0,c=1,d=t.length,u=e._backgroundBillboard,h=M.clone(l(u)?e._backgroundPadding:M.ZERO,Uet);h.x/=e._relativeSize,h.y/=e._relativeSize;for(let X=0;X<d;++X){if(n.charAt(X)===`
`){r.push(i),++c,i=0;continue}let g=t[X].dimensions;l(g)&&(a=Math.max(a,g.height-g.descent),s=Math.max(s,g.descent),i+=g.width-g.minx,X<d-1&&(i+=t[X+1].dimensions.minx),o=Math.max(o,i))}r.push(i);let p=a+s,b=e.totalScale,f=e._horizontalOrigin,y=e._verticalOrigin,_=0,S=r[_],A=Z0e(S,f,h),Z=(l(e._lineHeight)?e._lineHeight:Iet*e._fontSize)/e._relativeSize,V=Z*(c-1),E=o,L=p+V;l(u)&&(E+=h.x*2,L+=h.y*2,u._labelHorizontalOrigin=f),Wr.x=A*b,Wr.y=0;let v=!0,I=0;for(let X=0;X<d;++X){if(n.charAt(X)===`
`){++_,I+=Z,S=r[_],A=Z0e(S,f,h),Wr.x=A*b,v=!0;continue}let N=t[X],g=N.dimensions;if(l(g)&&(y===Dn.TOP?(Wr.y=g.height-a-h.y,Wr.y+=Pa.PADDING):y===Dn.CENTER?Wr.y=(V+g.height-a)/2:y===Dn.BASELINE?(Wr.y=V,Wr.y-=Pa.PADDING):(Wr.y=V+s+h.y,Wr.y-=Pa.PADDING),Wr.y=(Wr.y-g.descent-I)*b,v&&(Wr.x-=Pa.PADDING*b,v=!1),l(N.billboard)&&(N.billboard._setTranslate(Wr),N.billboard._labelDimensions.x=E,N.billboard._labelDimensions.y=L,N.billboard._labelHorizontalOrigin=f,pm(e.heightReference)&&(N.billboard._labelTranslate=M.clone(Wr,N.billboard._labelTranslate))),X<d-1)){let C=t[X+1];Wr.x+=(g.width-g.minx+C.dimensions.minx)*b}}l(u)&&n.split(`
`).join("").length>0&&(f===Ii.CENTER?A=-o/2-h.x:f===Ii.RIGHT?A=-(o+h.x*2):A=0,Wr.x=A*b,y===Dn.TOP?Wr.y=p-a-s:y===Dn.CENTER?Wr.y=(p-a)/2-s:y===Dn.BASELINE?Wr.y=-h.y-s:Wr.y=0,Wr.y=Wr.y*b,u.width=E,u.height=L,u._setTranslate(Wr),u._labelTranslate=M.clone(Wr,u._labelTranslate))}function R0e(e,t){let n=t._glyphs;for(let i=0,o=n.length;i<o;++i)DQ(e,n[i]);l(t._backgroundBillboard)&&(e._backgroundBillboardCollection.remove(t._backgroundBillboard),t._backgroundBillboard=void 0),t._labelCollection=void 0,l(t._removeCallbackFunc)&&t._removeCallbackFunc(),me(t)}function Gp(e){e=e??B.EMPTY_OBJECT,this._scene=e.scene,this._batchTable=e.batchTable;let t=new Tu({scene:this._scene,textureAtlas:new ET({initialSize:UQ}),coarseDepthTestDistance:e.coarseDepthTestDistance,threePointDepthTestDistance:e.threePointDepthTestDistance});this._backgroundBillboardCollection=t,this._backgroundBillboardTexture=new Gb(t),this._glyphBillboardCollection=new Tu({scene:this._scene,batchTable:this._batchTable,coarseDepthTestDistance:e.coarseDepthTestDistance,threePointDepthTestDistance:e.threePointDepthTestDistance}),this._glyphBillboardCollection._sdf=!0,this._spareBillboards=[],this._textDimensionsCache={},this._labels=[],this._labelsToUpdate=[],this._totalGlyphCount=0,this._highlightColor=U.clone(U.WHITE),this.show=e.show??!0,this.modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.blendOption=e.blendOption??zo.OPAQUE_AND_TRANSLUCENT}Object.defineProperties(Gp.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}}});Gp.prototype.add=function(e){let t=new Oy(e,this);return this._labels.push(t),this._labelsToUpdate.push(t),t};Gp.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),R0e(this,e),!0}return!1};Gp.prototype.removeAll=function(){let e=this._labels;for(let t=0,n=e.length;t<n;++t)R0e(this,e[t]);e.length=0};Gp.prototype.contains=function(e){return l(e)&&e._labelCollection===this};Gp.prototype.get=function(e){return this._labels[e]};Gp.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&&(Met(this,s),s._rebindAllGlyphs=!1),s._repositionAllGlyphs&&(Det(s),s._repositionAllGlyphs=!1);let c=s._glyphs.length-a;this._totalGlyphCount+=c}let o=n.length>0?zo.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)};Gp.prototype.isDestroyed=function(){return!1};Gp.prototype.destroy=function(){return this.removeAll(),this._glyphBillboardCollection=this._glyphBillboardCollection.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),me(this)};var Lp=Gp;var Kqn=x(T(),1);var M6n=x(T(),1),sP=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec3 position2DHigh;
in vec3 position2DLow;
in vec3 prevPosition3DHigh;
in vec3 prevPosition3DLow;
in vec3 prevPosition2DHigh;
in vec3 prevPosition2DLow;
in vec3 nextPosition3DHigh;
in vec3 nextPosition3DLow;
in vec3 nextPosition2DHigh;
in vec3 nextPosition2DLow;
in vec4 texCoordExpandAndBatchIndex;
out vec2 v_st;
out float v_width;
out vec4 v_pickColor;
out float v_polylineAngle;
void main()
{
float texCoord = texCoordExpandAndBatchIndex.x;
float expandDir = texCoordExpandAndBatchIndex.y;
bool usePrev = texCoordExpandAndBatchIndex.z < 0.0;
float batchTableIndex = texCoordExpandAndBatchIndex.w;
vec2 widthAndShow = batchTable_getWidthAndShow(batchTableIndex);
float width = widthAndShow.x + 0.5;
float show = widthAndShow.y;
if (width < 1.0)
{
show = 0.0;
}
vec4 pickColor = batchTable_getPickColor(batchTableIndex);
vec4 p, prev, next;
if (czm_morphTime == 1.0)
{
p = czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz);
prev = czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz);
next = czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz);
}
else if (czm_morphTime == 0.0)
{
p = czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);
prev = czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy);
next = czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy);
}
else
{
p = czm_columbusViewMorph(
czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy),
czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz),
czm_morphTime);
prev = czm_columbusViewMorph(
czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy),
czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz),
czm_morphTime);
next = czm_columbusViewMorph(
czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy),
czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz),
czm_morphTime);
}
#ifdef DISTANCE_DISPLAY_CONDITION
vec3 centerHigh = batchTable_getCenterHigh(batchTableIndex);
vec4 centerLowAndRadius = batchTable_getCenterLowAndRadius(batchTableIndex);
vec3 centerLow = centerLowAndRadius.xyz;
float radius = centerLowAndRadius.w;
vec2 distanceDisplayCondition = batchTable_getDistanceDisplayCondition(batchTableIndex);
float lengthSq;
if (czm_sceneMode == czm_sceneMode2D)
{
lengthSq = czm_eyeHeight2D.y;
}
else
{
vec4 center = czm_translateRelativeToEye(centerHigh.xyz, centerLow.xyz);
lengthSq = max(0.0, dot(center.xyz, center.xyz) - radius * radius);
}
float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;
float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;
if (lengthSq < nearSq || lengthSq > farSq)
{
show = 0.0;
}
#endif
float polylineAngle;
vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);
gl_Position = czm_viewportOrthographic * positionWC * show;
v_st.s = texCoord;
v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);
v_width = width;
v_pickColor = pickColor;
v_polylineAngle = polylineAngle;
}
`;var dqn=x(T(),1);var q6n=x(T(),1);var Hl={};Hl.numberOfPoints=function(e,t,n){let i=m.distance(e,t);return Math.ceil(i/n)};Hl.numberOfPointsRhumbLine=function(e,t,n){let i=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(i/(n*n))))};var Oet=new pe;Hl.extractHeights=function(e,t){let n=e.length,i=new Array(n);for(let o=0;o<n;o++){let r=e[o];i[o]=t.cartesianToCartographic(r,Oet).height}return i};var Bet=new F,zet=new m,E0e=new m,Het=new nn(m.UNIT_X,0),G0e=new m,Ket=new nn(m.UNIT_X,0),Jet=new m,jet=new m,BQ=[];function W0e(e,t,n){let i=BQ;i.length=e;let o;if(t===n){for(o=0;o<e;o++)i[o]=t;return i}let s=(n-t)/e;for(o=0;o<e;o++){let a=t+o*s;i[o]=a}return i}var GD=new pe,ED=new pe,By=new m,zQ=new m,Qet=new m,OQ=new z0,aP=new Sc;function qet(e,t,n,i,o,r,s,a){let c=i.scaleToGeodeticSurface(e,zQ),d=i.scaleToGeodeticSurface(t,Qet),u=Hl.numberOfPoints(e,t,n),h=i.cartesianToCartographic(c,GD),p=i.cartesianToCartographic(d,ED),b=W0e(u,o,r);OQ.setEndPoints(h,p);let f=OQ.surfaceDistance/u,y=a;h.height=o;let _=i.cartographicToCartesian(h,By);m.pack(_,s,y),y+=3;for(let S=1;S<u;S++){let A=OQ.interpolateUsingSurfaceDistance(S*f,ED);A.height=b[S],_=i.cartographicToCartesian(A,By),m.pack(_,s,y),y+=3}return y}function $et(e,t,n,i,o,r,s,a){let c=i.cartesianToCartographic(e,GD),d=i.cartesianToCartographic(t,ED),u=Hl.numberOfPointsRhumbLine(c,d,n);c.height=0,d.height=0;let h=W0e(u,o,r);aP.ellipsoid.equals(i)||(aP=new Sc(void 0,void 0,i)),aP.setEndPoints(c,d);let p=aP.surfaceDistance/u,b=a;c.height=o;let f=i.cartographicToCartesian(c,By);m.pack(f,s,b),b+=3;for(let y=1;y<u;y++){let _=aP.interpolateUsingSurfaceDistance(y*p,ED);_.height=h[y],f=i.cartographicToCartesian(_,By),m.pack(f,s,b),b+=3}return b}Hl.wrapLongitude=function(e,t){let n=[],i=[];if(l(e)&&e.length>0){t=t??F.IDENTITY;let o=F.inverseTransformation(t,Bet),r=F.multiplyByPoint(o,m.ZERO,zet),s=m.normalize(F.multiplyByPointAsVector(o,m.UNIT_Y,E0e),E0e),a=nn.fromPointNormal(r,s,Het),c=m.normalize(F.multiplyByPointAsVector(o,m.UNIT_X,G0e),G0e),d=nn.fromPointNormal(r,c,Ket),u=1;n.push(m.clone(e[0]));let h=n[0],p=e.length;for(let b=1;b<p;++b){let f=e[b];if(nn.getPointDistance(d,h)<0||nn.getPointDistance(d,f)<0){let y=ai.lineSegmentPlane(h,f,a,Jet);if(l(y)){let _=m.multiplyByScalar(s,5e-9,jet);nn.getPointDistance(a,h)<0&&m.negate(_,_),n.push(m.add(y,_,new m)),i.push(u+1),m.negate(_,_),n.push(m.add(y,_,new m)),u=1}}n.push(m.clone(e[b])),u++,h=f}i.push(u)}return{positions:n,lengths:i}};Hl.generateArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=e.ellipsoid??ie.default,o=e.height??0,r=Array.isArray(o);if(n<1)return[];if(n===1){let y=i.scaleToGeodeticSurface(t[0],zQ);if(o=r?o[0]:o,o!==0){let _=i.geodeticSurfaceNormal(y,By);m.multiplyByScalar(_,o,_),m.add(y,_,y)}return[y.x,y.y,y.z]}let s=e.minDistance;if(!l(s)){let y=e.granularity??W.RADIANS_PER_DEGREE;s=W.chordLength(y,i.maximumRadius)}let a=0,c;for(c=0;c<n-1;c++)a+=Hl.numberOfPoints(t[c],t[c+1],s);let d=(a+1)*3,u=new Array(d),h=0;for(c=0;c<n-1;c++){let y=t[c],_=t[c+1],S=r?o[c]:o,A=r?o[c+1]:o;h=qet(y,_,s,i,S,A,u,h)}BQ.length=0;let p=t[n-1],b=i.cartesianToCartographic(p,GD);b.height=r?o[n-1]:o;let f=i.cartographicToCartesian(b,By);return m.pack(f,u,d-3),u};var L0e=new pe,ett=new pe;Hl.generateRhumbArc=function(e){l(e)||(e={});let t=e.positions,n=t.length,i=e.ellipsoid??ie.default,o=e.height??0,r=Array.isArray(o);if(n<1)return[];if(n===1){let S=i.scaleToGeodeticSurface(t[0],zQ);if(o=r?o[0]:o,o!==0){let A=i.geodeticSurfaceNormal(S,By);m.multiplyByScalar(A,o,A),m.add(S,A,S)}return[S.x,S.y,S.z]}let s=e.granularity??W.RADIANS_PER_DEGREE,a=0,c,d=i.cartesianToCartographic(t[0],L0e),u;for(c=0;c<n-1;c++)u=i.cartesianToCartographic(t[c+1],ett),a+=Hl.numberOfPointsRhumbLine(d,u,s),d=pe.clone(u,L0e);let h=(a+1)*3,p=new Array(h),b=0;for(c=0;c<n-1;c++){let S=t[c],A=t[c+1],Z=r?o[c]:o,V=r?o[c+1]:o;b=$et(S,A,s,i,Z,V,p,b)}BQ.length=0;let f=t[n-1],y=i.cartesianToCartographic(f,GD);y.height=r?o[n-1]:o;let _=i.cartographicToCartesian(y,By);return m.pack(_,p,h-3),p};Hl.generateCartesianArc=function(e){let t=Hl.generateArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=m.unpack(t,o*3);return i};Hl.generateCartesianRhumbArc=function(e){let t=Hl.generateRhumbArc(e),n=t.length/3,i=new Array(n);for(let o=0;o<n;o++)i[o]=m.unpack(t,o*3);return i};var Ki=Hl;function _u(e,t){e=e??B.EMPTY_OBJECT,this._show=e.show??!0,this._width=e.width??1,this._loop=e.loop??!1,this._distanceDisplayCondition=e.distanceDisplayCondition,this._material=e.material,l(this._material)||(this._material=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,m.equalsEpsilon),this._loop&&this._actualPositions.length>2&&(this._actualPositions===this._positions&&(this._actualPositions=n.slice()),this._actualPositions.push(m.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id;let i;l(t)&&(i=F.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=Ki.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(F0e),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 v0e=_u.POSITION_INDEX=0,ttt=_u.SHOW_INDEX=1,ntt=_u.WIDTH_INDEX=2,itt=_u.MATERIAL_INDEX=3,cP=_u.POSITION_SIZE_INDEX=4,ott=_u.DISTANCE_DISPLAY_CONDITION=5,F0e=_u.NUMBER_OF_PROPERTIES=6;function vb(e,t){++e._propertiesChanged[t];let n=e._polylineCollection;l(n)&&(n._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(_u.prototype,{show:{get:function(){return this._show},set:function(e){e!==this._show&&(this._show=e,vb(this,ttt))}},positions:{get:function(){return this._positions},set:function(e){let t=Yo(e,m.equalsEpsilon);this._loop&&t.length>2&&(t===e&&(t=e.slice()),t.push(m.clone(t[0]))),(this._actualPositions.length!==t.length||this._actualPositions.length!==this._length)&&vb(this,cP),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),vb(this,v0e),this.update()}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,vb(this,itt))}},width:{get:function(){return this._width},set:function(e){let t=this._width;e!==t&&(this._width=e,vb(this,ntt))}},loop:{get:function(){return this._loop},set:function(e){if(e!==this._loop){let t=this._actualPositions;e?t.length>2&&!m.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(m.clone(t[0]))):t.length>2&&m.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,vb(this,cP)}}},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){Yt.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=Yt.clone(e,this._distanceDisplayCondition),vb(this,ott))}}});_u.prototype.update=function(){let e=F.IDENTITY;l(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);let t=this._segments.positions.length,n=this._segments.lengths,i=this._propertiesChanged[v0e]>0||this._propertiesChanged[cP]>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)vb(this,cP);else{let o=n.length;for(let r=0;r<o;++r)if(n[r]!==this._segments.lengths[r]){vb(this,cP);break}}};_u.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._polylineCollection,id:this._id})),this._pickId};_u.prototype._clean=function(){this._dirty=!1;let e=this._propertiesChanged;for(let t=0;t<F0e-1;++t)e[t]=0};_u.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._material=this._material&&this._material.destroy(),this._polylineCollection=void 0};var Fm=_u;var rtt=Fm.SHOW_INDEX,stt=Fm.WIDTH_INDEX,KQ=Fm.POSITION_INDEX,att=Fm.MATERIAL_INDEX,I0e=Fm.POSITION_SIZE_INDEX,ctt=Fm.DISTANCE_DISPLAY_CONDITION,k0e=Fm.NUMBER_OF_PROPERTIES,Id={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 cf(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(k0e),this._polylines=[],this._polylineBuckets={},this._positionBufferUsage={bufferUsage:Fe.STATIC_DRAW,frameCount:0},this._mode=void 0,this._polylinesToUpdate=[],this._vertexArrays=[],this._positionBuffer=void 0,this._texCoordExpandAndBatchIndexBuffer=void 0,this._batchTable=void 0,this._createBatchTable=!1,this._useHighlightColor=!1,this._highlightColor=U.clone(U.WHITE);let t=this;this._uniformMap={u_highlightColor:function(){return t._highlightColor}}}Object.defineProperties(cf.prototype,{length:{get:function(){return JQ(this),this._polylines.length}}});cf.prototype.add=function(e){let t=new Fm(e,this);return t._index=this._polylines.length,this._polylines.push(t),this._createVertexArray=!0,this._createBatchTable=!0,t};cf.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};cf.prototype.removeAll=function(){jQ(this),z0e(this),this._polylineBuckets={},this._polylinesRemoved=!1,this._polylines.length=0,this._polylinesToUpdate.length=0,this._createVertexArray=!0};cf.prototype.contains=function(e){return l(e)&&e._polylineCollection===this};cf.prototype.get=function(e){return JQ(this),this._polylines[e]};function ltt(e,t){l(e._batchTable)&&e._batchTable.destroy();let n=[{functionName:"batchTable_getWidthAndShow",componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:2},{functionName:"batchTable_getPickColor",componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"batchTable_getCenterHigh",componentDatatype:K.FLOAT,componentsPerAttribute:3},{functionName:"batchTable_getCenterLowAndRadius",componentDatatype:K.FLOAT,componentsPerAttribute:4},{functionName:"batchTable_getDistanceDisplayCondition",componentDatatype:K.FLOAT,componentsPerAttribute:2}];e._batchTable=new WT(t,n,e._polylines.length)}var U0e=new Tn,D0e=new se,O0e=new M;cf.prototype.update=function(e){if(JQ(this),this._polylines.length===0||!this.show)return;ptt(this,e);let t=e.context,n=e.mapProjection,i,o=this._propertiesChanged;if(this._createBatchTable){if(Lt.maximumVertexTextureImageUnits===0)throw new le("Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero.");ltt(this,t),this._createBatchTable=!1}if(this._createVertexArray||utt(this))N0e(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[I0e]||o[att])N0e(this,t,n);else{let d=c.length,u=this._polylineBuckets;for(let h=0;h<d;++h){i=c[h],o=i._propertiesChanged;let p=i._bucket,b=0;for(let f in u)if(u.hasOwnProperty(f)){if(u[f]===p){o[KQ]&&p.writeUpdate(b,i,this._positionBuffer,n);break}b+=u[f].lengthOfPositions}if((o[rtt]||o[stt])&&this._batchTable.setBatchedAttribute(i._index,0,new M(i._width,i._show)),this._batchTable.attributes.length>2){if(o[KQ]||o[I0e]){let f=e.mode===re.SCENE2D?i._boundingVolume2D:i._boundingVolumeWC,y=Tn.fromCartesian(f.center,U0e),_=se.fromElements(y.low.x,y.low.y,y.low.z,f.radius,D0e);this._batchTable.setBatchedAttribute(i._index,2,y.high),this._batchTable.setBatchedAttribute(i._index,3,_)}if(o[ctt]){let f=O0e;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<k0e;++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:tn.ALPHA_BLEND,depthMask:!a,depthTest:{enabled:a}})),this._batchTable.update(e),s.render||s.pick){let c=this._colorCommands;dtt(this,e,c,r)}};var lP=new de,P0e=new de;function dtt(e,t,n,i){let o=t.context,r=t.commandList,s=n.length,a=0,c=!0,d=e._vertexArrays,u=e.debugShowBoundingVolume,p=e._batchTable.getUniformMapCallback(),b=d.length;for(let f=0;f<b;++f){let y=d[f],_=y.buckets,S=_.length;for(let A=0;A<S;++A){let Z=_[A],V=Z.offset,E=Z.bucket.shaderProgram,L=Z.bucket.polylines,v=L.length,I,X,N=0,g,C;for(let R=0;R<v;++R){let G=L[R],P=htt(G._material);if(P!==I){if(l(I)&&N>0){let D=X.isTranslucent();a>=s?(g=new et({owner:e}),n.push(g)):g=n[a],++a,C=Rt(p(X._uniforms),e._uniformMap),g.boundingVolume=de.clone(lP,g.boundingVolume),g.modelMatrix=i,g.shaderProgram=E,g.vertexArray=y.va,g.renderState=D?e._translucentRS:e._opaqueRS,g.pass=D?Le.TRANSLUCENT:Le.OPAQUE,g.debugShowBoundingVolume=u,g.pickId="v_pickColor",g.uniformMap=C,g.count=N,g.offset=V,V+=N,N=0,c=!0,r.push(g)}X=G._material,X.update(o),I=P}let Y=G._locatorBuckets,O=Y.length;for(let D=0;D<O;++D){let w=Y[D];w.locator===Z&&(N+=w.count)}let k;t.mode===re.SCENE3D?k=G._boundingVolumeWC:t.mode===re.COLUMBUS_VIEW?k=G._boundingVolume2D:t.mode===re.SCENE2D?l(G._boundingVolume2D)&&(k=de.clone(G._boundingVolume2D,P0e),k.center.x=0):l(G._boundingVolumeWC)&&l(G._boundingVolume2D)&&(k=de.union(G._boundingVolumeWC,G._boundingVolume2D,P0e)),c?(c=!1,de.clone(k,lP)):de.union(k,lP,lP)}l(I)&&N>0&&(a>=s?(g=new et({owner:e}),n.push(g)):g=n[a],++a,C=Rt(p(X._uniforms),e._uniformMap),g.boundingVolume=de.clone(lP,g.boundingVolume),g.modelMatrix=i,g.shaderProgram=E,g.vertexArray=y.va,g.renderState=X.isTranslucent()?e._translucentRS:e._opaqueRS,g.pass=X.isTranslucent()?Le.TRANSLUCENT:Le.OPAQUE,g.debugShowBoundingVolume=u,g.pickId="v_pickColor",g.uniformMap=C,g.count=N,g.offset=V,c=!0,r.push(g)),I=void 0}}n.length=a}cf.prototype.isDestroyed=function(){return!1};cf.prototype.destroy=function(){return B0e(this),jQ(this),z0e(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),me(this)};function utt(e){let t=!1,n=e._propertiesChanged,i=e._positionBufferUsage;return n[KQ]?(i.bufferUsage!==Fe.STREAM_DRAW&&(t=!0,i.bufferUsage=Fe.STREAM_DRAW),i.frameCount=100):i.bufferUsage!==Fe.STATIC_DRAW&&(i.frameCount===0?(t=!0,i.bufferUsage=Fe.STATIC_DRAW):i.frameCount--),t}var X0e=[0,0,0];function N0e(e,t,n){e._createVertexArray=!1,jQ(e),B0e(e),ftt(e);let i=[[]],o=i[0],r=e._batchTable,s=e._useHighlightColor,a=[0],c=0,d=[[]],u=0,h=e._polylineBuckets,p,b;for(p in h)h.hasOwnProperty(p)&&(b=h[p],b.updateShader(t,r,s),u+=b.lengthOfPositions);if(u>0){let f=e._mode,y=new Float32Array(6*u*3),_=new Float32Array(u*4),S,A=0,Z=0,V=0;for(p in h)if(h.hasOwnProperty(p)){b=h[p],b.write(y,_,A,Z,V,r,t,n),f===re.MORPHING&&(l(S)||(S=new Float32Array(6*u*3)),b.writeForMorph(S,A));let C=b.lengthOfPositions;A+=6*C*3,Z+=C*4,V+=C*4,c=b.updateIndices(i,a,d,c)}let E=e._positionBufferUsage.bufferUsage,L=Fe.STATIC_DRAW;e._positionBuffer=qe.createVertexBuffer({context:t,typedArray:y,usage:E});let v;l(S)&&(v=qe.createVertexBuffer({context:t,typedArray:S,usage:E})),e._texCoordExpandAndBatchIndexBuffer=qe.createVertexBuffer({context:t,typedArray:_,usage:L});let I=3*Float32Array.BYTES_PER_ELEMENT,X=4*Float32Array.BYTES_PER_ELEMENT,N=0,g=i.length;for(let C=0;C<g;++C)if(o=i[C],o.length>0){let R=new Uint16Array(o),G=qe.createIndexBuffer({context:t,typedArray:R,usage:Fe.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT});N+=a[C];let P=6*(C*(I*W.SIXTY_FOUR_KILOBYTES)-N*I),Y=I+P,O=I+Y,k=I+O,D=I+k,w=I+D,z=C*(X*W.SIXTY_FOUR_KILOBYTES)-N*X,J=[{index:Id.position3DHigh,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:P,strideInBytes:6*I},{index:Id.position3DLow,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:Y,strideInBytes:6*I},{index:Id.position2DHigh,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:P,strideInBytes:6*I},{index:Id.position2DLow,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:Y,strideInBytes:6*I},{index:Id.prevPosition3DHigh,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:O,strideInBytes:6*I},{index:Id.prevPosition3DLow,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:k,strideInBytes:6*I},{index:Id.prevPosition2DHigh,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:O,strideInBytes:6*I},{index:Id.prevPosition2DLow,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:k,strideInBytes:6*I},{index:Id.nextPosition3DHigh,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:D,strideInBytes:6*I},{index:Id.nextPosition3DLow,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:w,strideInBytes:6*I},{index:Id.nextPosition2DHigh,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:D,strideInBytes:6*I},{index:Id.nextPosition2DLow,componentsPerAttribute:3,componentDatatype:K.FLOAT,offsetInBytes:w,strideInBytes:6*I},{index:Id.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:K.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:z}],ee,H,te,$;f===re.SCENE3D?(H=e._positionBuffer,ee="vertexBuffer",te=X0e,$="value"):f===re.SCENE2D||f===re.COLUMBUS_VIEW?(H=X0e,ee="value",te=e._positionBuffer,$="vertexBuffer"):(H=v,ee="vertexBuffer",te=e._positionBuffer,$="vertexBuffer"),J[0][ee]=H,J[1][ee]=H,J[2][$]=te,J[3][$]=te,J[4][ee]=H,J[5][ee]=H,J[6][$]=te,J[7][$]=te,J[8][ee]=H,J[9][ee]=H,J[10][$]=te,J[11][$]=te;let be=new Mn({context:t,attributes:J,indexBuffer:G});e._vertexArrays.push({va:be,buckets:d[C]})}}}function mtt(e,t){return t instanceof Et?t.id:t}var LD=[];function htt(e){let t=Bi._uniformList[e.type],n=t.length;LD.length=2*n;let i=0;for(let o=0;o<n;++o){let r=t[o];LD[i]=r,LD[i+1]=e._uniforms[r](),i+=2}return`${e.type}:${JSON.stringify(LD,mtt)}`}function ftt(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 Wp(c,t,n)),d.addPolyline(a)}}}function ptt(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 JQ(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 jQ(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 B0e(e){let t=e._vertexArrays.length;for(let n=0;n<t;++n)e._vertexArrays[n].va.destroy();e._vertexArrays.length=0}cf.prototype._updatePolyline=function(e,t){this._polylinesUpdated=!0,e._dirty||this._polylinesToUpdate.push(e),++this._propertiesChanged[t]};function z0e(e){let t=e._polylines,n=t.length;for(let i=0;i<n;++i)t[i].isDestroyed||t[i]._destroy()}function HQ(e,t,n){this.count=e,this.offset=t,this.bucket=n}function Wp(e,t,n){this.polylines=[],this.lengthOfPositions=0,this.material=e,this.shaderProgram=void 0,this.mode=t,this.modelMatrix=n}Wp.prototype.addPolyline=function(e){this.polylines.push(e),e._actualLength=this.getPolylinePositionsLength(e),this.lengthOfPositions+=e._actualLength,e._bucket=this};Wp.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 Be({defines:i,sources:[`in vec4 v_pickColor;
`,this.material.shaderSource,NT]}),r=t.getVertexShaderCallback()(sP),s=new Be({defines:i,sources:[Ll,r]});this.shaderProgram=qt.fromCache({context:e,vertexShaderSource:s,fragmentShaderSource:o,attributeLocations:Id})};function H0e(e){return m.dot(m.UNIT_X,e._boundingVolume.center)<0||e._boundingVolume.intersectPlane(nn.ORIGIN_ZX_PLANE)===zt.INTERSECTING}Wp.prototype.getPolylinePositionsLength=function(e){let t;if(this.mode===re.SCENE3D||!H0e(e))return t=e._actualPositions.length,t*4-4;let n=0,i=e._segments.lengths;t=i.length;for(let o=0;o<t;++o)n+=i[o]*4-4;return n};var ma=new m,Im=new m,Pm=new m,WD=new m,btt=new se,gtt=new M;Wp.prototype.write=function(e,t,n,i,o,r,s,a){let c=this.mode,d=a.ellipsoid.maximumRadius*W.PI,u=this.polylines,h=u.length;for(let p=0;p<h;++p){let b=u[p],f=b.width,y=b.show&&f>0,_=b._index,S=this.getSegments(b,a),A=S.positions,Z=S.lengths,V=A.length,E=b.getPickId(s).color,L=0,v=0,I;for(let O=0;O<V;++O){O===0?b._loop?I=A[V-2]:(I=WD,m.subtract(A[0],A[1],I),m.add(A[0],I,I)):I=A[O-1],m.clone(I,Im),m.clone(A[O],ma),O===V-1?b._loop?I=A[1]:(I=WD,m.subtract(A[V-1],A[V-2],I),m.add(A[V-1],I,I)):I=A[O+1],m.clone(I,Pm);let k=Z[L];O===v+k&&(v+=k,++L);let D=O-v===0,w=O===v+Z[L]-1;c===re.SCENE2D&&(Im.z=0,ma.z=0,Pm.z=0),(c===re.SCENE2D||c===re.MORPHING)&&(D||w)&&d-Math.abs(ma.x)<1&&((ma.x<0&&Im.x>0||ma.x>0&&Im.x<0)&&m.clone(ma,Im),(ma.x<0&&Pm.x>0||ma.x>0&&Pm.x<0)&&m.clone(ma,Pm));let z=D?2:0,J=w?2:4;for(let ee=z;ee<J;++ee){Tn.writeElements(ma,e,n),Tn.writeElements(Im,e,n+6),Tn.writeElements(Pm,e,n+12);let H=ee-2<0?-1:1;t[o]=O/(V-1),t[o+1]=2*(ee%2)-1,t[o+2]=H,t[o+3]=_,n+=18,o+=4}}let X=btt;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=gtt;N.x=f,N.y=y?1:0;let g=c===re.SCENE2D?b._boundingVolume2D:b._boundingVolumeWC,C=Tn.fromCartesian(g.center,U0e),R=C.high,G=se.fromElements(C.low.x,C.low.y,C.low.z,g.radius,D0e),P=O0e;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,G),r.setBatchedAttribute(_,4,P))}};var ytt=new m,xtt=new m,Ttt=new m,Y0e=new m;Wp.prototype.writeForMorph=function(e,t){let n=this.modelMatrix,i=this.polylines,o=i.length;for(let r=0;r<o;++r){let s=i[r],a=s._segments.positions,c=s._segments.lengths,d=a.length,u=0,h=0;for(let p=0;p<d;++p){let b;p===0?s._loop?b=a[d-2]:(b=Y0e,m.subtract(a[0],a[1],b),m.add(a[0],b,b)):b=a[p-1],b=F.multiplyByPoint(n,b,xtt);let f=F.multiplyByPoint(n,a[p],ytt),y;p===d-1?s._loop?y=a[1]:(y=Y0e,m.subtract(a[d-1],a[d-2],y),m.add(a[d-1],y,y)):y=a[p+1],y=F.multiplyByPoint(n,y,Ttt);let _=c[u];p===h+_&&(h+=_,++u);let S=p-h===0,A=p===h+c[u]-1,Z=S?2:0,V=A?2:4;for(let E=Z;E<V;++E)Tn.writeElements(f,e,t),Tn.writeElements(b,e,t+6),Tn.writeElements(y,e,t+12),t+=18}}};var _tt=new Array(1);Wp.prototype.updateIndices=function(e,t,n,i){let o=n.length-1,r=new HQ(0,i,this);n[o].push(r);let s=0,a=e[e.length-1],c=0;a.length>0&&(c=a[a.length-1]+1);let d=this.polylines,u=d.length;for(let h=0;h<u;++h){let p=d[h];p._locatorBuckets=[];let b;if(this.mode===re.SCENE3D){b=_tt;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 HQ(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 HQ(0,0,this),n[++o]=[r])}p._clean()}return r.count=s,i};Wp.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 KC={positions:void 0,lengths:void 0},w0e=new Array(1),Stt=new m,Att=new pe;Wp.prototype.getSegments=function(e,t){let n=e._actualPositions;if(this.mode===re.SCENE3D)return w0e[0]=n.length,KC.positions=n,KC.lengths=w0e,KC;H0e(e)&&(n=e._segments.positions);let i=t.ellipsoid,o=[],r=this.modelMatrix,s=n.length,a,c=Stt;for(let d=0;d<s;++d)a=n[d],c=F.multiplyByPoint(r,a,c),o.push(t.project(i.cartesianToCartographic(c,Att)));if(o.length>0){e._boundingVolume2D=de.fromPoints(o,e._boundingVolume2D);let d=e._boundingVolume2D.center;e._boundingVolume2D.center=new m(d.z,d.x,d.y)}return KC.positions=o,KC.lengths=e._segments.lengths,KC};var M0e;Wp.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=M0e,c=6*s*3;!l(a)||a.length<c?a=M0e=new Float32Array(c):a.length>c&&(a=new Float32Array(a.buffer,0,c));let d=this.getSegments(t,i),u=d.positions,h=d.lengths,p=0,b=0,f=0,y;s=u.length;for(let _=0;_<s;++_){_===0?t._loop?y=u[s-2]:(y=WD,m.subtract(u[0],u[1],y),m.add(u[0],y,y)):y=u[_-1],m.clone(y,Im),m.clone(u[_],ma),_===s-1?t._loop?y=u[1]:(y=WD,m.subtract(u[s-1],u[s-2],y),m.add(u[s-1],y,y)):y=u[_+1],m.clone(y,Pm);let S=h[b];_===f+S&&(f+=S,++b);let A=_-f===0,Z=_===f+h[b]-1;o===re.SCENE2D&&(Im.z=0,ma.z=0,Pm.z=0),(o===re.SCENE2D||o===re.MORPHING)&&(A||Z)&&r-Math.abs(ma.x)<1&&((ma.x<0&&Im.x>0||ma.x>0&&Im.x<0)&&m.clone(ma,Im),(ma.x<0&&Pm.x>0||ma.x>0&&Pm.x<0)&&m.clone(ma,Pm));let V=A?2:0,E=Z?2:4;for(let L=V;L<E;++L)Tn.writeElements(ma,a,p),Tn.writeElements(Im,a,p+6),Tn.writeElements(Pm,a,p+12),p+=18}n.copyFromArrayView(a,18*Float32Array.BYTES_PER_ELEMENT*e)}};var lf=cf;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 Tu({batchTable:e.batchTable,scene:e.scene}),this._labelCollection=new Lp({batchTable:e.batchTable,scene:e.scene}),this._polylineCollection=new lf,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 Ztt(e,t){let n=e._rectangle,i=e._minHeight,o=e._maxHeight,r=2+ae.packedLength+ie.packedLength,s=new Float64Array(r),a=0;return s[a++]=i,s[a++]=o,ae.pack(n,s,a),a+=ae.packedLength,ie.pack(t,s,a),s}var Ctt=new Hn("createVectorTilePoints",5),Vtt=new m;function Rtt(e,t){let n=e._positions,i=e._packedBuffer;l(i)||(n=e._positions=n.slice(),e._batchIds=e._batchIds.slice(),i=e._packedBuffer=Ztt(e,t));let o=[n.buffer,i.buffer],r={positions:n.buffer,packedBuffer:i.buffer},s=Ctt.scheduleTask(r,o);if(l(s))return s.then(a=>{if(e.isDestroyed())return;e._positions=new Float64Array(a.positions);let c=e._billboardCollection,d=e._labelCollection,u=e._polylineCollection;n=e._positions;let h=e._batchIds,p=n.length/3,b=e._heightReference??tt.NONE;for(let f=0;f<p;++f){let y=h[f],_=m.unpack(n,f*3,Vtt),S=c.add();S.position=_,S._batchIndex=y,S.heightReference=b;let A=d.add();A.text=" ",A.position=_,A._batchIndex=y,A.heightReference=b;let Z=u.add();Z.positions=[m.clone(_),m.clone(_)]}e._positions=void 0,e._packedBuffer=void 0,e._ready=!0}).catch(a=>{e.isDestroyed()||(e._error=a)})}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),h=o.get(a);t[c]=new Lb(e,c,d,u,h)}};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 Ett(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=Lb.defaultPointSize,s.color=Lb.defaultColor,s.pointOutlineColor=Lb.defaultPointOutlineColor,s.pointOutlineWidth=Lb.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 M(7,5),s.backgroundEnabled=!1,s.scaleByDistance=void 0,s.translucencyByDistance=void 0,s.distanceDisplayCondition=void 0,s.heightOffset=0,s.anchorLineEnabled=!1,s.anchorLineColor=U.WHITE,s.image=void 0,s.disableDepthTestDistance=0,s.horizontalOrigin=Ii.CENTER,s.verticalOrigin=Dn.CENTER,s.labelHorizontalOrigin=Ii.RIGHT,s.labelVerticalOrigin=Dn.BASELINE}}var Gtt=new U,Ltt=new U,Wtt=new U,vtt=new U,Ftt=new U,Itt=new U,dP=new wt,uP=new wt,QQ=new Yt;zy.prototype.applyStyle=function(e,t){if(!l(e)){Ett(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,Gtt)),l(e.pointOutlineColor)&&(s.pointOutlineColor=e.pointOutlineColor.evaluateColor(s,Ltt)),l(e.pointOutlineWidth)&&(s.pointOutlineWidth=e.pointOutlineWidth.evaluate(s)),l(e.labelColor)&&(s.labelColor=e.labelColor.evaluateColor(s,Wtt)),l(e.labelOutlineColor)&&(s.labelOutlineColor=e.labelOutlineColor.evaluateColor(s,vtt)),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,Ftt)),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)?(dP.near=a.x,dP.nearValue=a.y,dP.far=a.z,dP.farValue=a.w,s.scaleByDistance=dP):s.scaleByDistance=void 0}else s.scaleByDistance=void 0;if(l(e.translucencyByDistance)){let a=e.translucencyByDistance.evaluate(s);l(a)?(uP.near=a.x,uP.nearValue=a.y,uP.far=a.z,uP.farValue=a.w,s.translucencyByDistance=uP):s.translucencyByDistance=void 0}else s.translucencyByDistance=void 0;if(l(e.distanceDisplayCondition)){let a=e.distanceDisplayCondition.evaluate(s);l(a)?(QQ.near=a.x,QQ.far=a.y,s.distanceDisplayCondition=QQ):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,Itt)),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=Rtt(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(),me(this)};var mP=zy;var E$n=x(T(),1);function Fb(e){this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._counts=e.counts,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._batchedPositions=void 0,this._transferrableBatchIds=void 0,this._vertexBatchIds=void 0,this._ellipsoid=e.ellipsoid??ie.WGS84,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._polygonMinimumHeights=e.polygonMinimumHeights,this._polygonMaximumHeights=e.polygonMaximumHeights,this._center=e.center??m.ZERO,this._rectangle=e.rectangle,this._center=void 0,this._boundingVolume=e.boundingVolume,this._boundingVolumes=void 0,this._batchedIndices=void 0,this._ready=!1,this._promise=void 0,this._error=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=Jn.BOTH}Object.defineProperties(Fb.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 Ptt(e){let t=new Float64Array(3+m.packedLength+ie.packedLength+ae.packedLength),n=0;return t[n++]=e._indices.BYTES_PER_ELEMENT,t[n++]=e._minimumHeight,t[n++]=e._maximumHeight,m.pack(e._center,t,n),n+=m.packedLength,ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,ae.pack(e._rectangle,t,n),t}function Xtt(e,t){let n=1,i=t[n++],o=e._boundingVolumes=new Array(i);for(let a=0;a<i;++a)o[a]=$t.unpack(t,n),n+=$t.packedLength;let r=t[n++],s=e._batchedIndices=new Array(r);for(let a=0;a<r;++a){let c=U.unpack(t,n);n+=U.packedLength;let d=t[n++],u=t[n++],h=t[n++],p=new Array(h);for(let b=0;b<h;++b)p[b]=t[n++];s[a]=new bp({color:c,offset:d,count:u,batchIds:p})}}var Ntt=new Hn("createVectorTilePolygons",5),Ytt=new U;function wtt(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(ae.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,Ytt);s[y]=_.toRgba()}a=e._packedBuffer=Ptt(e)}let c=[t.buffer,n.buffer,i.buffer,o.buffer,r.buffer,s.buffer,a.buffer],d={packedBuffer:a.buffer,positions:t.buffer,counts:n.buffer,indexCounts:i.buffer,indices:o.buffer,batchIds:r.buffer,batchTableColors:s.buffer},u=e._polygonMinimumHeights,h=e._polygonMaximumHeights;l(u)&&l(h)&&(u=u.slice(),h=h.slice(),c.push(u.buffer,h.buffer),d.minimumHeights=u,d.maximumHeights=h);let p=Ntt.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];Xtt(e,f),e._indices=Me.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),Mtt(e),e._ready=!0}).catch(b=>{e.isDestroyed()||(e._error=b)})}function Mtt(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)}Fb.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)};Fb.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)};Fb.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)};Fb.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)};Fb.prototype.update=function(e){if(!this._ready){if(l(this._promise)||(this._promise=wtt(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)};Fb.prototype.isDestroyed=function(){return!1};Fb.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),me(this)};var hP=Fb;var eei=x(T(),1);var L$n=x(T(),1),fP=`in vec4 currentPosition;
in vec4 previousPosition;
in vec4 nextPosition;
in vec2 expandAndWidth;
in float a_batchId;
uniform mat4 u_modifiedModelView;
void main()
{
float expandDir = expandAndWidth.x;
float width = abs(expandAndWidth.y) + 0.5;
bool usePrev = expandAndWidth.y < 0.0;
vec4 p = u_modifiedModelView * currentPosition;
vec4 prev = u_modifiedModelView * previousPosition;
vec4 next = u_modifiedModelView * nextPosition;
float angle;
vec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);
gl_Position = czm_viewportOrthographic * positionWC;
}
`;function df(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(df.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});function ktt(e){let t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,s=2+ae.packedLength+ie.packedLength+m.packedLength,a=new Float64Array(s),c=0;return a[c++]=n,a[c++]=i,ae.pack(t,a,c),c+=ae.packedLength,ie.pack(o,a,c),c+=ie.packedLength,m.pack(r,a,c),a}var Utt=new Hn("createVectorTilePolylines",5),JC={previousPosition:0,currentPosition:1,nextPosition:2,expandAndWidth:3,a_batchId:4};function Dtt(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=ktt(e));let a=[n.buffer,i.buffer,o.buffer,r.buffer,s.buffer],c={positions:n.buffer,widths:i.buffer,counts:o.buffer,batchIds:r.buffer,packedBuffer:s.buffer,keepDecodedPositions:e._keepDecodedPositions},d=Utt.scheduleTask(c,a);if(l(d))return d.then(function(u){if(e.isDestroyed())return;e._keepDecodedPositions&&(e._decodedPositions=new Float64Array(u.decodedPositions),e._decodedPositionOffsets=new Uint32Array(u.decodedPositionOffsets)),e._currentPositions=new Float32Array(u.currentPositions),e._previousPositions=new Float32Array(u.previousPositions),e._nextPositions=new Float32Array(u.nextPositions),e._expandAndWidth=new Float32Array(u.expandAndWidth),e._vertexBatchIds=new Uint16Array(u.batchIds);let h=u.indexDatatype;e._indices=h===Me.UNSIGNED_SHORT?new Uint16Array(u.indices):new Uint32Array(u.indices),Ott(e,t),e._ready=!0}).catch(u=>{e.isDestroyed()||(e._error=u)})}function Ott(e,t){if(!l(e._va)){let n=e._currentPositions,i=e._previousPositions,o=e._nextPositions,r=e._expandAndWidth,s=e._vertexBatchIds,a=e._indices,c=i.byteLength+n.byteLength+o.byteLength;c+=r.byteLength+s.byteLength+a.byteLength,e._trianglesLength=a.length/3,e._geometryByteLength=c;let d=qe.createVertexBuffer({context:t,typedArray:i,usage:Fe.STATIC_DRAW}),u=qe.createVertexBuffer({context:t,typedArray:n,usage:Fe.STATIC_DRAW}),h=qe.createVertexBuffer({context:t,typedArray:o,usage:Fe.STATIC_DRAW}),p=qe.createVertexBuffer({context:t,typedArray:r,usage:Fe.STATIC_DRAW}),b=qe.createVertexBuffer({context:t,typedArray:s,usage:Fe.STATIC_DRAW}),f=qe.createIndexBuffer({context:t,typedArray:a,usage:Fe.STATIC_DRAW,indexDatatype:a.BYTES_PER_ELEMENT===2?Me.UNSIGNED_SHORT:Me.UNSIGNED_INT}),y=[{index:JC.previousPosition,vertexBuffer:d,componentDatatype:K.FLOAT,componentsPerAttribute:3},{index:JC.currentPosition,vertexBuffer:u,componentDatatype:K.FLOAT,componentsPerAttribute:3},{index:JC.nextPosition,vertexBuffer:h,componentDatatype:K.FLOAT,componentsPerAttribute:3},{index:JC.expandAndWidth,vertexBuffer:p,componentDatatype:K.FLOAT,componentsPerAttribute:2},{index:JC.a_batchId,vertexBuffer:b,componentDatatype:K.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new Mn({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 pP=new F,K0e=new m;function Btt(e,t){l(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return F.clone(n,pP),F.multiplyByPoint(pP,e._center,K0e),F.setTranslation(pP,K0e,pP),pP},u_highlightColor:function(){return e._highlightColor}})}function ztt(e){if(l(e._rs))return;let t={enabled:!0,factor:-5,units:-5};e._rs=De.fromCache({blending:tn.ALPHA_BLEND,depthMask:!1,depthTest:{enabled:!0},polygonOffset:t})}var Htt=`uniform vec4 u_highlightColor;
void main()
{
out_FragColor = u_highlightColor;
}
`;function Ktt(e,t){if(l(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(fP),o=n.getFragmentShaderCallback(!1,void 0,!1)(Htt),r=new Be({defines:["VECTOR_TILE","CLIP_POLYLINE"],sources:[Ll,i]}),s=new Be({defines:["VECTOR_TILE"],sources:[o]});e._sp=qt.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:JC})}function Jtt(e,t){if(!l(e._command)){let n=e._batchTable.getUniformMapCallback()(e._uniformMap);e._command=new et({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:n,boundingVolume:e._boundingVolume,pass:Le.TRANSLUCENT,pickId:e._batchTable.getPickId()})}t.commandList.push(e._command)}df.getPolylinePositions=function(e,t){let n=e._batchIds,i=e._decodedPositions,o=e._decodedPositionOffsets;if(!l(n)||!l(i))return;let r,s,a=n.length,c=0,d=0;for(r=0;r<a;++r)n[r]===t&&(c+=o[r+1]-o[r]);if(c===0)return;let u=new Float64Array(c*3);for(r=0;r<a;++r)if(n[r]===t){let h=o[r],p=o[r+1]-h;for(s=0;s<p;++s){let b=(h+s)*3;u[d++]=i[b],u[d++]=i[b+1],u[d++]=i[b+2]}}return u};df.prototype.getPositions=function(e){return df.getPolylinePositions(this,e)};df.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 Bs(e,r)}};df.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function jtt(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 Qtt=new U,qtt=U.WHITE,$tt=!0;df.prototype.applyStyle=function(e,t){if(!l(e)){jtt(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,Qtt):qtt,s.show=l(e.show)?e.show.evaluate(s):$tt}};df.prototype.update=function(e){let t=e.context;if(!this._ready){if(l(this._promise)||(this._promise=Dtt(this,t)),l(this._error)){let i=this._error;throw this._error=void 0,i}return}Btt(this,t),Ktt(this,t),ztt(this);let n=e.passes;(n.render||n.pick)&&Jtt(this,e)};df.prototype.isDestroyed=function(){return!1};df.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),me(this)};var w_=df;var Yei=x(T(),1);var nei=x(T(),1),bP=`in vec3 startEllipsoidNormal;
in vec3 endEllipsoidNormal;
in vec4 startPositionAndHeight;
in vec4 endPositionAndHeight;
in vec4 startFaceNormalAndVertexCorner;
in vec4 endFaceNormalAndHalfWidth;
in float a_batchId;
uniform mat4 u_modifiedModelView;
uniform vec2 u_minimumMaximumVectorHeights;
out vec4 v_startPlaneEC;
out vec4 v_endPlaneEC;
out vec4 v_rightPlaneEC;
out float v_halfWidth;
out vec3 v_volumeUpEC;
void main()
{
// vertex corner IDs
// 3-----------7
// /| left /|
// / | 1 / |
// 2-----------6 5 end
// | / | /
// start |/ right |/
// 0-----------4
//
float isEnd = floor(startFaceNormalAndVertexCorner.w * 0.251); // 0 for front, 1 for end
float isTop = floor(startFaceNormalAndVertexCorner.w * mix(0.51, 0.19, isEnd)); // 0 for bottom, 1 for top
vec3 forward = endPositionAndHeight.xyz - startPositionAndHeight.xyz;
vec3 right = normalize(cross(forward, startEllipsoidNormal));
vec4 position = vec4(startPositionAndHeight.xyz, 1.0);
position.xyz += forward * isEnd;
v_volumeUpEC = czm_normal * normalize(cross(right, forward));
// Push for volume height
float offset;
vec3 ellipsoidNormal = mix(startEllipsoidNormal, endEllipsoidNormal, isEnd);
// offset height to create volume
offset = mix(startPositionAndHeight.w, endPositionAndHeight.w, isEnd);
offset = mix(u_minimumMaximumVectorHeights.y, u_minimumMaximumVectorHeights.x, isTop) - offset;
position.xyz += offset * ellipsoidNormal;
// move from RTC to EC
position = u_modifiedModelView * position;
right = czm_normal * right;
// Push for width in a direction that is in the start or end plane and in a plane with right
// N = normalEC ("right-facing" direction for push)
// R = right
// p = angle between N and R
// w = distance to push along R if R == N
// d = distance to push along N
//
// N R
// { p| } * cos(p) = dot(N, R) = w / d
// d | |w * d = w / dot(N, R)
// { | }
// o---------- polyline segment ---->
//
vec3 scratchNormal = mix(-startFaceNormalAndVertexCorner.xyz, endFaceNormalAndHalfWidth.xyz, isEnd);
scratchNormal = cross(scratchNormal, mix(startEllipsoidNormal, endEllipsoidNormal, isEnd));
vec3 miterPushNormal = czm_normal * normalize(scratchNormal);
offset = 2.0 * endFaceNormalAndHalfWidth.w * max(0.0, czm_metersPerPixel(position)); // offset = widthEC
offset = offset / dot(miterPushNormal, right);
position.xyz += miterPushNormal * (offset * sign(0.5 - mod(startFaceNormalAndVertexCorner.w, 2.0)));
gl_Position = czm_depthClamp(czm_projection * position);
position = u_modifiedModelView * vec4(startPositionAndHeight.xyz, 1.0);
vec3 startNormalEC = czm_normal * startFaceNormalAndVertexCorner.xyz;
v_startPlaneEC = vec4(startNormalEC, -dot(startNormalEC, position.xyz));
v_rightPlaneEC = vec4(right, -dot(right, position.xyz));
position = u_modifiedModelView * vec4(endPositionAndHeight.xyz, 1.0);
vec3 endNormalEC = czm_normal * endFaceNormalAndHalfWidth.xyz;
v_endPlaneEC = vec4(endNormalEC, -dot(endNormalEC, position.xyz));
v_halfWidth = endFaceNormalAndHalfWidth.w;
}
`;var oei=x(T(),1),gP=`in vec4 v_startPlaneEC;
in vec4 v_endPlaneEC;
in vec4 v_rightPlaneEC;
in float v_halfWidth;
in vec3 v_volumeUpEC;
uniform vec4 u_highlightColor;
void main()
{
float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));
// Discard for sky
if (logDepthOrDepth == 0.0) {
#ifdef DEBUG_SHOW_VOLUME
out_FragColor = vec4(0.0, 0.0, 1.0, 0.5);
return;
#else // DEBUG_SHOW_VOLUME
discard;
#endif // DEBUG_SHOW_VOLUME
}
vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
eyeCoordinate /= eyeCoordinate.w;
float halfMaxWidth = v_halfWidth * czm_metersPerPixel(eyeCoordinate);
// Expand halfMaxWidth if direction to camera is almost perpendicular with the volume's up direction
halfMaxWidth += halfMaxWidth * (1.0 - dot(-normalize(eyeCoordinate.xyz), v_volumeUpEC));
// Check distance of the eye coordinate against the right-facing plane
float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);
// Check eye coordinate against the mitering planes
float distanceFromStart = czm_planeDistance(v_startPlaneEC, eyeCoordinate.xyz);
float distanceFromEnd = czm_planeDistance(v_endPlaneEC, eyeCoordinate.xyz);
if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {
#ifdef DEBUG_SHOW_VOLUME
out_FragColor = vec4(logDepthOrDepth, 0.0, 0.0, 0.5);
return;
#else // DEBUG_SHOW_VOLUME
discard;
#endif // DEBUG_SHOW_VOLUME
}
out_FragColor = u_highlightColor;
czm_writeDepthClamp();
}
`;function Ib(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=e.ellipsoid??ie.WGS84,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._minimumMaximumVectorHeights=new M(Ei._defaultMinTerrainHeight,Ei._defaultMaxTerrainHeight),this._boundingVolume=$t.fromRectangle(e.rectangle,Ei._defaultMinTerrainHeight,Ei._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(Ib.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}}});function ent(e,t,n){let i=Ei.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;$t.fromRectangle(c,o,r,n,a)}function tnt(e){let t=e._rectangle,n=e._minimumHeight,i=e._maximumHeight,o=e._ellipsoid,r=e._center,s=2+ae.packedLength+ie.packedLength+m.packedLength,a=new Float64Array(s),c=0;return a[c++]=n,a[c++]=i,ae.pack(t,a,c),c+=ae.packedLength,ie.pack(o,a,c),c+=ie.packedLength,m.pack(r,a,c),a}var nnt=new Hn("createVectorTileClampedPolylines"),Hy={startEllipsoidNormal:0,endEllipsoidNormal:1,startPositionAndHeight:2,endPositionAndHeight:3,startFaceNormalAndVertexCorner:4,endFaceNormalAndHalfWidth:5,a_batchId:6};function int(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=tnt(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=nnt.scheduleTask(c,a);if(l(d))return d.then(function(u){if(e.isDestroyed())return;e._keepDecodedPositions&&(e._decodedPositions=new Float64Array(u.decodedPositions),e._decodedPositionOffsets=new Uint32Array(u.decodedPositionOffsets)),e._startEllipsoidNormals=new Float32Array(u.startEllipsoidNormals),e._endEllipsoidNormals=new Float32Array(u.endEllipsoidNormals),e._startPositionAndHeights=new Float32Array(u.startPositionAndHeights),e._startFaceNormalAndVertexCornerIds=new Float32Array(u.startFaceNormalAndVertexCornerIds),e._endPositionAndHeights=new Float32Array(u.endPositionAndHeights),e._endFaceNormalAndHalfWidths=new Float32Array(u.endFaceNormalAndHalfWidths),e._vertexBatchIds=new Uint16Array(u.vertexBatchIds);let h=u.indexDatatype;e._indices=h===Me.UNSIGNED_SHORT?new Uint16Array(u.indices):new Uint32Array(u.indices),ont(e,t),e._ready=!0}).catch(u=>{e.isDestroyed()||(e._error=u)})}function ont(e,t){if(!l(e._va)){let n=e._startEllipsoidNormals,i=e._endEllipsoidNormals,o=e._startPositionAndHeights,r=e._endPositionAndHeights,s=e._startFaceNormalAndVertexCornerIds,a=e._endFaceNormalAndHalfWidths,c=e._vertexBatchIds,d=e._indices,u=n.byteLength+i.byteLength;u+=o.byteLength+r.byteLength,u+=s.byteLength+a.byteLength,u+=c.byteLength+d.byteLength,e._trianglesLength=d.length/3,e._geometryByteLength=u;let h=qe.createVertexBuffer({context:t,typedArray:n,usage:Fe.STATIC_DRAW}),p=qe.createVertexBuffer({context:t,typedArray:i,usage:Fe.STATIC_DRAW}),b=qe.createVertexBuffer({context:t,typedArray:o,usage:Fe.STATIC_DRAW}),f=qe.createVertexBuffer({context:t,typedArray:r,usage:Fe.STATIC_DRAW}),y=qe.createVertexBuffer({context:t,typedArray:s,usage:Fe.STATIC_DRAW}),_=qe.createVertexBuffer({context:t,typedArray:a,usage:Fe.STATIC_DRAW}),S=qe.createVertexBuffer({context:t,typedArray:c,usage:Fe.STATIC_DRAW}),A=qe.createIndexBuffer({context:t,typedArray:d,usage:Fe.STATIC_DRAW,indexDatatype:d.BYTES_PER_ELEMENT===2?Me.UNSIGNED_SHORT:Me.UNSIGNED_INT}),Z=[{index:Hy.startEllipsoidNormal,vertexBuffer:h,componentDatatype:K.FLOAT,componentsPerAttribute:3},{index:Hy.endEllipsoidNormal,vertexBuffer:p,componentDatatype:K.FLOAT,componentsPerAttribute:3},{index:Hy.startPositionAndHeight,vertexBuffer:b,componentDatatype:K.FLOAT,componentsPerAttribute:4},{index:Hy.endPositionAndHeight,vertexBuffer:f,componentDatatype:K.FLOAT,componentsPerAttribute:4},{index:Hy.startFaceNormalAndVertexCorner,vertexBuffer:y,componentDatatype:K.FLOAT,componentsPerAttribute:4},{index:Hy.endFaceNormalAndHalfWidth,vertexBuffer:_,componentDatatype:K.FLOAT,componentsPerAttribute:4},{index:Hy.a_batchId,vertexBuffer:S,componentDatatype:K.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new Mn({context:t,attributes:Z,indexBuffer:A}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._startEllipsoidNormals=void 0,e._endEllipsoidNormals=void 0,e._startPositionAndHeights=void 0,e._startFaceNormalAndVertexCornerIds=void 0,e._endPositionAndHeights=void 0,e._endFaceNormalAndHalfWidths=void 0,e._vertexBatchIds=void 0,e._indices=void 0}}var yP=new F,J0e=new m;function rnt(e,t){l(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){let n=t.uniformState.view;return F.clone(n,yP),F.multiplyByPoint(yP,e._center,J0e),F.setTranslation(yP,J0e,yP),yP},u_highlightColor:function(){return e._highlightColor},u_minimumMaximumVectorHeights:function(){return e._minimumMaximumVectorHeights}})}function j0e(e){return De.fromCache({cull:{enabled:!0,face:Pi.FRONT},blending:tn.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:jn.EQUAL,frontOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.KEEP},backFunction:jn.EQUAL,backOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.KEEP},reference:Ot.CESIUM_3D_TILE_MASK,mask:Ot.CESIUM_3D_TILE_MASK}})}function snt(e){l(e._rs)||(e._rs=j0e(!1),e._rs3DTiles=j0e(!0))}function ant(e,t){if(l(e._sp))return;let n=e._batchTable,i=n.getVertexShaderCallback(!1,"a_batchId",void 0)(bP),o=n.getFragmentShaderCallback(!1,void 0,!0)(gP),r=new Be({defines:["VECTOR_TILE","CLIP_POLYLINE"],sources:[Ll,i]}),s=new Be({defines:["VECTOR_TILE"],sources:[o]});e._sp=qt.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:Hy})}function cnt(e,t){let n=e._command;if(!l(e._command)){let o=e._batchTable.getUniformMapCallback()(e._uniformMap);n=e._command=new et({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:o,boundingVolume:e._boundingVolume,pass:Le.TERRAIN_CLASSIFICATION,pickId:e._batchTable.getPickId()});let r=et.shallowClone(n,n.derivedCommands.tileset);r.renderState=e._rs3DTiles,r.pass=Le.CESIUM_3D_TILE_CLASSIFICATION,n.derivedCommands.tileset=r}let i=e._classificationType;(i===Jn.TERRAIN||i===Jn.BOTH)&&t.commandList.push(n),(i===Jn.CESIUM_3D_TILE||i===Jn.BOTH)&&t.commandList.push(n.derivedCommands.tileset)}Ib.prototype.getPositions=function(e){return w_.getPolylinePositions(this,e)};Ib.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 Bs(e,r)}};Ib.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};function lnt(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 dnt=new U,unt=U.WHITE,mnt=!0;Ib.prototype.applyStyle=function(e,t){if(!l(e)){lnt(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,dnt):unt,s.show=l(e.show)?e.show.evaluate(s):mnt}};function hnt(e){return Ei.initialize().then(function(){ent(e,e._rectangle,e._ellipsoid)}).catch(t=>{e.isDestroyed()||(e._error=t)})}Ib.prototype.update=function(e){let t=e.context;if(!this._ready){if(l(this._promise)||(this._promise=hnt(this).then(int(this,t))),l(this._error)){let i=this._error;throw this._error=void 0,i}return}rnt(this,t),ant(this,t),snt(this);let n=e.passes;(n.render||n.pick)&&cnt(this,e)};Ib.prototype.isDestroyed=function(){return!1};Ib.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),me(this)};var xP=Ib;var Oei=x(T(),1);var qQ=32767,fnt=new pe,pnt=new m;function bnt(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);cn.zigZagDeltaDecode(s,a,c);let d=new Float64Array(e.length);for(let u=0;u<r;++u){let h=s[u],p=a[u],b=c[u],f=W.lerp(t.west,t.east,h/qQ),y=W.lerp(t.south,t.north,p/qQ),_=W.lerp(n,i,b/qQ),S=pe.fromRadians(f,y,_,fnt),A=o.cartographicToCartesian(S,pnt);m.pack(A,d,u*3)}return d}var TP=bnt;function mf(e,t,n,i,o){this._tileset=e,this._tile=t,this._resource=n,this._polygons=void 0,this._polylines=void 0,this._points=void 0,this._metadata=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._group=void 0,this._ready=!1,_nt(this,i,o)}Object.defineProperties(mf.prototype,{featuresLength:{get:function(){return l(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return l(this._points)?this._points.pointsLength:0}},trianglesLength:{get:function(){let e=0;return l(this._polygons)&&(e+=this._polygons.trianglesLength),l(this._polylines)&&(e+=this._polylines.trianglesLength),e}},geometryByteLength:{get:function(){let e=0;return l(this._polygons)&&(e+=this._polygons.geometryByteLength),l(this._polylines)&&(e+=this._polylines.geometryByteLength),e}},texturesByteLength:{get:function(){return l(this._points)?this._points.texturesByteLength:0}},batchTableByteLength:{get:function(){return l(this._batchTable)?this._batchTable.batchTableByteLength:0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},batchTable:{get:function(){return this._batchTable}},group:{get:function(){return this._group},set:function(e){this._group=e}}});function gnt(e){return function(t,n){l(e._polygons)&&e._polygons.updateCommands(t,n)}}function ynt(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 le("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 uf=Uint32Array.BYTES_PER_ELEMENT;function xnt(e){return new w_(e)}function Tnt(e){return new xP(e)}function _nt(e,t,n){n=n??0;let i=new Uint8Array(t),o=new DataView(t);n+=uf;let r=o.getUint32(n,!0);if(r!==1)throw new le(`Only Vector tile version 1 is supported. Version ${r} is not.`);n+=uf;let s=o.getUint32(n,!0);if(n+=uf,s===0){e._ready=!0;return}let a=o.getUint32(n,!0);if(n+=uf,a===0)throw new le("Feature table must have a byte length greater than zero");let c=o.getUint32(n,!0);n+=uf;let d=o.getUint32(n,!0);n+=uf;let u=o.getUint32(n,!0);n+=uf;let h=o.getUint32(n,!0);n+=uf;let p=o.getUint32(n,!0);n+=uf;let b=o.getUint32(n,!0);n+=uf;let f=o.getUint32(n,!0);n+=uf;let y=xr(i,n,a);n+=a;let _=new Uint8Array(t,n,c);n+=c;let S,A;d>0&&(S=xr(i,n,d),n+=d,u>0&&(A=new Uint8Array(t,n,u),A=new Uint8Array(A),n+=u));let Z=y.POLYGONS_LENGTH??0,V=y.POLYLINES_LENGTH??0,E=y.POINTS_LENGTH??0,L=Z+V+E,v=new Oh(e,L,S,A,gnt(e));if(e._batchTable=v,L===0)return;let I=new Qh(y,_),X=I.getGlobalProperty("REGION");if(!l(X))throw new le("Feature table global property: REGION must be defined");let N=ae.unpack(X),g=X[4],C=X[5],R=e._tile.computedTransform,G=I.getGlobalProperty("RTC_CENTER",K.FLOAT,3);l(G)?(G=m.unpack(G),F.multiplyByPoint(R,G,G)):(G=ae.center(N),G.height=W.lerp(g,C,.5),G=ie.WGS84.cartographicToCartesian(G));let P=ynt(y,_);if(n+=(4-n%4)%4,Z>0){I.featuresLength=Z;let O=I.getPropertyArray("POLYGON_COUNTS",K.UNSIGNED_INT,1)??I.getPropertyArray("POLYGON_COUNT",K.UNSIGNED_INT,1);if(!l(O))throw new le("Feature table property: POLYGON_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let k=I.getPropertyArray("POLYGON_INDEX_COUNTS",K.UNSIGNED_INT,1)??I.getPropertyArray("POLYGON_INDEX_COUNT",K.UNSIGNED_INT,1);if(!l(k))throw new le("Feature table property: POLYGON_INDEX_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");let D=O.reduce(function(te,$){return te+$*2},0),w=k.reduce(function(te,$){return te+$},0),z=new Uint32Array(t,n,w);n+=h;let J=new Uint16Array(t,n,D);n+=p;let ee,H;l(y.POLYGON_MINIMUM_HEIGHTS)&&l(y.POLYGON_MAXIMUM_HEIGHTS)&&(ee=I.getPropertyArray("POLYGON_MINIMUM_HEIGHTS",K.FLOAT,1),H=I.getPropertyArray("POLYGON_MAXIMUM_HEIGHTS",K.FLOAT,1)),e._polygons=new hP({positions:J,counts:O,indexCounts:k,indices:z,minimumHeight:g,maximumHeight:C,polygonMinimumHeights:ee,polygonMaximumHeights:H,center:G,rectangle:N,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:v,batchIds:P.polygons,modelMatrix:R})}let Y=e._tileset;if(V>0){I.featuresLength=V;let O=I.getPropertyArray("POLYLINE_COUNTS",K.UNSIGNED_INT,1)??I.getPropertyArray("POLYLINE_COUNT",K.UNSIGNED_INT,1);if(!l(O))throw new le("Feature table property: POLYLINE_COUNTS must be defined when POLYLINES_LENGTH is greater than 0");let k=I.getPropertyArray("POLYLINE_WIDTHS",K.UNSIGNED_SHORT,1);if(!l(k)){k=new Uint16Array(V);for(let ee=0;ee<V;++ee)k[ee]=2}let D=O.reduce(function(ee,H){return ee+H*3},0),w=new Uint16Array(t,n,D);n+=b;let z=Y.examineVectorLinesFunction;if(l(z)){let ee=TP(new Uint16Array(w),N,g,C,ie.WGS84);Snt(ee,O,P.polylines,v,e.url,z)}let J=xnt;l(Y.classificationType)&&(J=Tnt),e._polylines=J({positions:w,widths:k,counts:O,batchIds:P.polylines,minimumHeight:g,maximumHeight:C,center:G,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 mP({positions:O,batchIds:P.points,minimumHeight:g,maximumHeight:C,rectangle:N,batchTable:v,heightReference:Y.heightReference,scene:Y.scene})}}function $Q(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}}mf.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)};mf.prototype.getFeature=function(e){return l(this._features)||$Q(this),this._features[e]};mf.prototype.applyDebugSettings=function(e,t){l(this._polygons)&&this._polygons.applyDebugSettings(e,t),l(this._polylines)&&this._polylines.applyDebugSettings(e,t),l(this._points)&&this._points.applyDebugSettings(e,t)};mf.prototype.applyStyle=function(e){l(this._features)||$Q(this),l(this._polygons)&&this._polygons.applyStyle(e,this._features),l(this._polylines)&&this._polylines.applyStyle(e,this._features),l(this._points)&&this._points.applyStyle(e,this._features)};mf.prototype.update=function(e,t){let n=!0;l(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(t),n=n&&this._polygons.ready),l(this._polylines)&&(this._polylines.update(t),n=n&&this._polylines.ready),l(this._points)&&(this._points.update(t),n=n&&this._points.ready),l(this._batchTable)&&n&&(l(this._features)||$Q(this),this._batchTable.update(e,t),this._ready=!0)};mf.prototype.pick=function(e,t,n){};mf.prototype.getPolylinePositions=function(e){let t=this._polylines;if(l(t))return t.getPositions(e)};mf.prototype.isDestroyed=function(){return!1};mf.prototype.destroy=function(){return this._polygons=this._polygons&&this._polygons.destroy(),this._polylines=this._polylines&&this._polylines.destroy(),this._points=this._points&&this._points.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),me(this)};function Snt(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 _P=mf;var Eri=x(T(),1);var Lti=x(T(),1);var uti=x(T(),1);var hf=class hf{constructor(){Qt(this,"_collection",null);Qt(this,"_index",-1);Qt(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(hf.Layout.FEATURE_ID_U32)}set featureId(t){this._setUint32(hf.Layout.FEATURE_ID_U32,t)}get show(){return this._getUint8(hf.Layout.SHOW_U8)===1}set show(t){this._setUint8(hf.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(hf.Layout.DIRTY_U8)===1}set _dirty(t){this._collection._primitiveView.setUint8(this._byteOffset+hf.Layout.DIRTY_U8,t?1:0),t&&this._collection._makeDirty(this._index)}get _pickId(){return this._getUint32(hf.Layout.PICK_ID_U32)}set _pickId(t){this._setUint32(hf.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()}}};Qt(hf,"Layout",{FEATURE_ID_U32:0,SHOW_U8:4,DIRTY_U8:5,PICK_ID_U32:8,__BYTE_LENGTH:12});var e8=hf,Qr=e8;var Ati=x(T(),1);var SP=class SP{constructor(t=B.EMPTY_OBJECT){Qt(this,"_renderContext",null);this.show=t.show??!0,this._modelMatrix=F.clone(t.modelMatrix??F.IDENTITY),this._boundingVolume=new de,this._boundingVolumeWC=new de,this._allowPicking=t.allowPicking??!1,this._pickIds=new Map,this._pickObjects=[],this.debugShowBoundingVolume=t.debugShowBoundingVolume??!1,this._primitiveCount=0,this._primitiveCountMax=t.primitiveCountMax??SP.DEFAULT_CAPACITY,this._primitiveView=null,this._positionCount=0,this._positionCountMax=t.vertexCountMax??SP.DEFAULT_CAPACITY,this._positionView=null,this._materialView=null,this._dirtyOffset=0,this._dirtyCount=0,this._dirtyBoundingVolume=!1,this._allocatePrimitiveBuffer(),this._allocatePositionBuffer(t.positionDatatype??K.DOUBLE),this._allocateMaterialBuffer()}_getCollectionClass(){he.throwInstantiationError()}_getPrimitiveClass(){he.throwInstantiationError()}_getMaterialClass(){he.throwInstantiationError()}_allocatePrimitiveBuffer(){let t=this._getPrimitiveClass().Layout;this._primitiveView=new DataView(new ArrayBuffer(this._primitiveCountMax*t.__BYTE_LENGTH))}_allocatePositionBuffer(t){this._positionView=K.createTypedArray(t,this._positionCountMax*3)}_allocateMaterialBuffer(){let t=this._getMaterialClass();this._materialView=new DataView(new ArrayBuffer(this._primitiveCountMax*t.packedLength))}isDestroyed(){return!1}destroy(){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,h)=>t(this.get(u,s),this.get(h,a)));for(let u=0;u<r;u++)n[c[u]]=u;let d=o._cloneEmpty(this);for(let u=0;u<r;u++){let h=this.get(c[u],s),p=d.add({},a);i.clone(h,p)}return o._replaceBuffers(d,this),this._dirtyOffset=0,this._dirtyCount=r,n}static clone(t,n){let i=t._getPrimitiveClass().Layout,o=t._getMaterialClass(),r=t._getPrimitiveClass();this._copySubDataView(t._primitiveView,n._primitiveView,t.primitiveCount*i.__BYTE_LENGTH),this._copySubArray(t._positionView,n._positionView,t.vertexCount*3),this._copySubDataView(t._materialView,n._materialView,t.primitiveCount*o.packedLength),n.show=t.show,n.debugShowBoundingVolume=t.debugShowBoundingVolume,n._primitiveCount=t._primitiveCount,n._positionCount=t._positionCount;let s=new r;for(let a=0,c=n.primitiveCount;a<c;a++)n.get(a,s)._pickId=0;return n._dirtyOffset=0,n._dirtyCount=n.primitiveCount,t.boundingVolume.clone(n.boundingVolume),n}static _cloneEmpty(t){he.throwInstantiationError()}static _replaceBuffers(t,n){n._primitiveView=t._primitiveView,n._positionView=t._positionView,n._materialView=t._materialView}_updateBoundingVolume(){let t=this._positionView.constructor,n=new t(this._positionView.buffer,this._positionView.byteOffset,this._positionCount*3);de.fromVertices(n,m.ZERO,3,this.boundingVolume),de.transform(this.boundingVolume,this.modelMatrix,this.boundingVolumeWC),this._dirtyBoundingVolume=!1}_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._dirtyBoundingVolume=!0}update(t){t.mode!==re.SCENE3D&&Tt("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 boundingVolumeWC(){return this._boundingVolumeWC}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}};Qt(SP,"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 vD=SP;vD.DEFAULT_CAPACITY=1024;var Ks=vD;var{ERR_CAPACITY:Eti}=Ks.Error,Ant=new m,FD=class FD extends Qr{constructor(){super(...arguments);Qt(this,"_collection",null)}static clone(n,i){return super.clone(n,i),i.setPosition(n.getPosition(Ant)),i}get vertexOffset(){return this._getUint32(FD.Layout.POSITION_OFFSET_U32)}get vertexCount(){return 1}getPosition(n){let i=this._collection._positionView;return m.fromArray(i,this.vertexOffset*3,n)}setPosition(n){let i=this._collection,o=this.vertexOffset;i._positionView[o*3]=n.x,i._positionView[o*3+1]=n.y,i._positionView[o*3+2]=n.z,i._makeDirtyBoundingVolume()}toJSON(){return{...super.toJSON(),position:m.pack(this.getPosition(),[])}}};Qt(FD,"Layout",{...Qr.Layout,POSITION_OFFSET_U32:Qr.Layout.__BYTE_LENGTH,__BYTE_LENGTH:Qr.Layout.__BYTE_LENGTH+4});var t8=FD,Kl=t8;var _ni=x(T(),1);var hni=x(T(),1);var Fti=x(T(),1),AP=`in vec3 positionHigh;
in vec3 positionLow;
in vec4 pickColor;
in vec3 showPixelSizeAndColor;
in vec2 outlineWidthAndOutlineColor;
out vec4 v_pickColor;
out vec4 v_color;
out vec4 v_outlineColor;
out float v_innerRadiusFrac;
void main()
{
// Unpack attributes.
float show = showPixelSizeAndColor.x;
float pixelSize = showPixelSizeAndColor.y;
vec4 color = czm_decodeRGB8(showPixelSizeAndColor.z);
float outlineWidth = outlineWidthAndOutlineColor.x;
vec4 outlineColor = czm_decodeRGB8(outlineWidthAndOutlineColor.y);
///////////////////////////////////////////////////////////////////////////
float innerRadius = 0.5 * pixelSize * czm_pixelRatio;
float outerRadius = (0.5 * pixelSize + outlineWidth) * czm_pixelRatio;
///////////////////////////////////////////////////////////////////////////
vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
vec4 positionEC = czm_modelViewRelativeToEye * p;
///////////////////////////////////////////////////////////////////////////
gl_Position = czm_projection * positionEC;
czm_vertexLogDepth();
v_pickColor = pickColor / 255.0;
v_color = color;
v_color.a *= show;
v_outlineColor = outlineColor;
v_outlineColor.a *= show;
v_innerRadiusFrac = innerRadius / outerRadius;
gl_PointSize = 2.0 * outerRadius * show;
gl_Position *= show;
}
`;var Pti=x(T(),1),ZP=`in vec4 v_pickColor;
in vec4 v_color;
in vec4 v_outlineColor;
in float v_innerRadiusFrac;
void main()
{
// Distance between fragment and point center, 0 to 0.5.
float distanceToCenter = length(gl_PointCoord - vec2(0.5));
float delta = fwidth(distanceToCenter);
float outerLimit = 0.5;
float innerLimit = 0.5 * v_innerRadiusFrac;
float outerAlpha = 1.0 - smoothstep(max(0.0, outerLimit - delta), outerLimit, distanceToCenter);
float innerAlpha = 1.0 - smoothstep(innerLimit - delta, innerLimit, distanceToCenter);
vec4 color = vec4(mix(v_outlineColor.rgb, v_color.rgb, innerAlpha), outerAlpha);
if (color.a < 0.005) // matches 0/255 and 1/255
{
discard;
}
out_FragColor = czm_gammaCorrect(color);
czm_writeLogDepth();
}
`;var Oti=x(T(),1);var wti=x(T(),1);var CP=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}}};Qt(CP,"Layout",{COLOR_U32:0,OUTLINE_COLOR_U32:4,OUTLINE_WIDTH_U8:8,__BYTE_LENGTH:12}),Qt(CP,"DEFAULT_MATERIAL");var Jl=CP;var VP=class VP extends Jl{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}}};Qt(VP,"Layout",{...Jl.Layout,SIZE_U8:Jl.Layout.__BYTE_LENGTH,__BYTE_LENGTH:Jl.Layout.__BYTE_LENGTH+4}),Qt(VP,"DEFAULT_MATERIAL",Object.freeze(new VP));var n8=VP,ff=n8;var Pb={positionHigh:0,positionLow:1,pickColor:2,showSizeAndColor:3,outlineWidthAndOutlineColor:4},M_=new Kl,RP=new ff,EP=new U,Q0e=new m,k_=new Tn;function Znt(e,t,n){let i=t.context;if(n=n||{destroy:Cnt},!l(n.attributeArrays)){let r=e.primitiveCountMax;n.attributeArrays={positionHigh:new Float32Array(r*3),positionLow:new Float32Array(r*3),pickColor:new Uint8Array(r*4),showSizeAndColor:new Float32Array(r*3),outlineWidthAndOutlineColor:new Float32Array(r*2)}}if(e._dirtyCount>0){let{attributeArrays:r}=n,s=r.positionHigh,a=r.positionLow,c=r.pickColor,d=r.showSizeAndColor,u=r.outlineWidthAndOutlineColor,{_dirtyOffset:h,_dirtyCount:p}=e;for(let b=h,f=h+p;b<f;b++)e.get(b,M_),M_._dirty&&(M_.getPosition(Q0e),Tn.fromCartesian(Q0e,k_),M_.getMaterial(RP),U.fromRgba(M_._pickId,EP),s[b*3]=k_.high.x,s[b*3+1]=k_.high.y,s[b*3+2]=k_.high.z,a[b*3]=k_.low.x,a[b*3+1]=k_.low.y,a[b*3+2]=k_.low.z,c[b*4]=U.floatToByte(EP.red),c[b*4+1]=U.floatToByte(EP.green),c[b*4+2]=U.floatToByte(EP.blue),c[b*4+3]=U.floatToByte(EP.alpha),d[b*3]=M_.show?1:0,d[b*3+1]=RP.size,d[b*3+2]=cn.encodeRGB8(RP.color),u[b*2]=RP.outlineWidth,u[b*2+1]=cn.encodeRGB8(RP.outlineColor),M_._dirty=!1)}if(l(n.vertexArray)){if(e._dirtyCount>0){for(let r in Pb)if(Object.hasOwn(Pb,r)){let s=r;n.vertexArray.copyAttributeFromRange(Pb[s],n.attributeArrays[s],e._dirtyOffset,e._dirtyCount)}}}else{let{attributeArrays:r}=n;n.vertexArray=new Mn({context:i,attributes:[{index:Pb.positionHigh,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:r.positionHigh,context:i,usage:Fe.STATIC_DRAW})},{index:Pb.positionLow,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:r.positionLow,context:i,usage:Fe.STATIC_DRAW})},{index:Pb.pickColor,componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,vertexBuffer:qe.createVertexBuffer({typedArray:r.pickColor,context:i,usage:Fe.STATIC_DRAW})},{index:Pb.showSizeAndColor,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:r.showSizeAndColor,context:i,usage:Fe.STATIC_DRAW})},{index:Pb.outlineWidthAndOutlineColor,componentDatatype:K.FLOAT,componentsPerAttribute:2,vertexBuffer:qe.createVertexBuffer({typedArray:r.outlineWidthAndOutlineColor,context:i,usage:Fe.STATIC_DRAW})}]})}l(n.renderState)||(n.renderState=De.fromCache({blending:tn.ALPHA_BLEND,depthTest:{enabled:!0}})),l(n.shaderProgram)||(n.shaderProgram=qt.fromCache({context:i,vertexShaderSource:new Be({sources:[AP]}),fragmentShaderSource:new Be({sources:[ZP]}),attributeLocations:Pb})),l(n.command)||(n.command=new et({vertexArray:n.vertexArray,renderState:n.renderState,shaderProgram:n.shaderProgram,primitiveType:ve.POINTS,pass:Le.OPAQUE,pickId:e._allowPicking?"v_pickColor":void 0,owner:e,count:e.primitiveCount,modelMatrix:e.modelMatrix,boundingVolume:e.boundingVolumeWC,debugShowBoundingVolume:e.debugShowBoundingVolume}));let o=n.command;return o.count!==e.primitiveCount&&(o.count=e.primitiveCount),o.debugShowBoundingVolume!==e.debugShowBoundingVolume&&(o.debugShowBoundingVolume=e.debugShowBoundingVolume),t.commandList.push(o),e._dirtyCount=0,e._dirtyOffset=0,n}function Cnt(){let e=this;l(e.vertexArray)&&e.vertexArray.destroy(),l(e.shaderProgram)&&e.shaderProgram.destroy(),l(e.renderState)&&De.removeFromCache(e.renderState)}var GP=Znt;var i8=class e extends Ks{constructor(t=B.EMPTY_OBJECT){super({...t,vertexCountMax:t.primitiveCountMax})}_getCollectionClass(){return e}_getPrimitiveClass(){return Kl}_getMaterialClass(){return ff}static _cloneEmpty(t){return new e({primitiveCountMax:t.primitiveCountMax})}add(t,n=new Kl){return super.add(t,n),n._setUint32(Kl.Layout.POSITION_OFFSET_U32,this._positionCount++),n.setPosition(t.position??m.ZERO),n}update(t){super.update(t);let n=t.passes;this.show&&(n.render||n.pick)&&(this._renderContext=GP(this,t,this._renderContext))}},Xm=i8;var Gni=x(T(),1);var{ERR_CAPACITY:Cni,ERR_RESIZE:Vni,ERR_OUT_OF_RANGE:Rni}=Ks.Error,Nm=class Nm extends Qr{constructor(){super(...arguments);Qt(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];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];i._makeDirtyBoundingVolume()}getHoleVertexCount(n){let i=this.getHoles(),o=i[n];return n===i.length-1?this.vertexCount-o:i[n+1]-o}getHolePositions(n,i){let r=this.getHoles()[n],s=this.getHoleVertexCount(n);return this._getPositionsRange(r,s,i)}_getPositionsRange(n,i,o){let r=this._collection,s=this._collection._positionView,a=this.vertexOffset+n;if(!l(o)){let c=s.byteOffset+a*3*s.BYTES_PER_ELEMENT,d=s.constructor;return new d(s.buffer,c,i*3)}for(let c=0;c<i;c++)o[c*3]=s[(a+c)*3],o[c*3+1]=s[(a+c)*3+1],o[c*3+2]=s[(a+c)*3+2];return o}get triangleOffset(){return this._getUint32(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];i._makeDirtyBoundingVolume()}toJSON(){return{...super.toJSON(),positions:Array.from(this.getPositions()),holes:Array.from(this.getHoles()),triangles:Array.from(this.getTriangles())}}};Qt(Nm,"Layout",{...Qr.Layout,POSITION_OFFSET_U32:Qr.Layout.__BYTE_LENGTH,POSITION_COUNT_U32:Qr.Layout.__BYTE_LENGTH+4,HOLE_OFFSET_U32:Qr.Layout.__BYTE_LENGTH+8,HOLE_COUNT_U32:Qr.Layout.__BYTE_LENGTH+12,TRIANGLE_OFFSET_U32:Qr.Layout.__BYTE_LENGTH+16,TRIANGLE_COUNT_U32:Qr.Layout.__BYTE_LENGTH+20,__BYTE_LENGTH:Qr.Layout.__BYTE_LENGTH+24});var o8=Nm,ha=o8;var yii=x(T(),1);var cii=x(T(),1);var vni=x(T(),1),LP=`in vec3 positionHigh;
in vec3 positionLow;
in vec4 pickColor;
in vec2 showAndColor;
out vec4 v_pickColor;
out vec4 v_color;
void main()
{
float show = showAndColor.x;
vec4 color = czm_decodeRGB8(showAndColor.y);
///////////////////////////////////////////////////////////////////////////
vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
vec4 positionEC = czm_modelViewRelativeToEye * p;
///////////////////////////////////////////////////////////////////////////
gl_Position = czm_projection * positionEC;
czm_vertexLogDepth();
v_pickColor = pickColor / 255.0;
v_color = color;
v_color.a *= show;
gl_Position *= show;
}
`;var Ini=x(T(),1),WP=`in vec4 v_pickColor;
in vec4 v_color;
void main()
{
if (v_color.a < 0.005) // matches 0/255 and 1/255
{
discard;
}
out_FragColor = czm_gammaCorrect(v_color);
czm_writeLogDepth();
}
`;var Yni=x(T(),1);var ID=class ID extends Jl{constructor(t=B.EMPTY_OBJECT){super(t)}};Qt(ID,"DEFAULT_MATERIAL",Object.freeze(new ID));var r8=ID,pf=r8;var Ky={positionHigh:0,positionLow:1,pickColor:2,showAndColor:3},fa=new ha,q0e=new pf,vP=new U,$0e=new m,U_=new Tn;function Vnt(e,t,n){let i=t.context;if(n=n||{destroy:Ent},!l(n.attributeArrays)||!l(n.indexArray)){let{vertexCountMax:s,triangleCountMax:a}=e;n.indexArray=Me.createTypedArray(s,a*3),n.attributeArrays={positionHigh:new Float32Array(s*3),positionLow:new Float32Array(s*3),pickColor:new Uint8Array(s*4),showAndColor:new Float32Array(s*2)}}if(e._dirtyCount>0){let{attributeArrays:s}=n,{_dirtyOffset:a,_dirtyCount:c}=e,d=n.indexArray,u=s.positionHigh,h=s.positionLow,p=s.pickColor,b=s.showAndColor;for(let f=a,y=a+c;f<y;f++){if(e.get(f,fa),!fa._dirty)continue;let _=fa.triangleOffset,S=fa.vertexOffset,A=fa.getTriangles();for(let L=0,v=fa.triangleCount;L<v;L++)d[_*3]=S+A[L*3],d[_*3+1]=S+A[L*3+1],d[_*3+2]=S+A[L*3+2],_++;let Z=fa.show,V=fa.getPositions();fa.getMaterial(q0e);let E=cn.encodeRGB8(q0e.color);U.fromRgba(fa._pickId,vP);for(let L=0,v=fa.vertexCount;L<v;L++)m.fromArray(V,L*3,$0e),Tn.fromCartesian($0e,U_),u[S*3]=U_.high.x,u[S*3+1]=U_.high.y,u[S*3+2]=U_.high.z,h[S*3]=U_.low.x,h[S*3+1]=U_.low.y,h[S*3+2]=U_.low.z,p[S*4]=U.floatToByte(vP.red),p[S*4+1]=U.floatToByte(vP.green),p[S*4+2]=U.floatToByte(vP.blue),p[S*4+3]=U.floatToByte(vP.alpha),b[S*2]=Z?1:0,b[S*2+1]=E,S++;fa._dirty=!1}}if(l(n.vertexArray)){if(e._dirtyCount>0){let{indexOffset:s,indexCount:a,vertexOffset:c,vertexCount:d}=Rnt(e);n.vertexArray.copyIndexFromRange(n.indexArray,s,a);for(let u in Ky)if(Object.hasOwn(Ky,u)){let h=u;n.vertexArray.copyAttributeFromRange(Ky[h],n.attributeArrays[h],c,d)}}}else{let{attributeArrays:s}=n;n.vertexArray=new Mn({context:i,indexBuffer:qe.createIndexBuffer({context:i,typedArray:n.indexArray,usage:Fe.STATIC_DRAW,indexDatatype:Me.fromTypedArray(n.indexArray)}),attributes:[{index:Ky.positionHigh,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:s.positionHigh,context:i,usage:Fe.STATIC_DRAW})},{index:Ky.positionLow,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:s.positionLow,context:i,usage:Fe.STATIC_DRAW})},{index:Ky.pickColor,componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,vertexBuffer:qe.createVertexBuffer({typedArray:s.pickColor,context:i,usage:Fe.STATIC_DRAW})},{index:Ky.showAndColor,componentDatatype:K.FLOAT,componentsPerAttribute:2,vertexBuffer:qe.createVertexBuffer({typedArray:s.showAndColor,context:i,usage:Fe.STATIC_DRAW})}]})}l(n.renderState)||(n.renderState=De.fromCache({blending:tn.DISABLED,depthTest:{enabled:!0}})),l(n.shaderProgram)||(n.shaderProgram=qt.fromCache({context:i,vertexShaderSource:new Be({sources:[LP]}),fragmentShaderSource:new Be({sources:[WP]}),attributeLocations:Ky}));let o=e.triangleCount*3;l(n.command)||(n.command=new et({vertexArray:n.vertexArray,renderState:n.renderState,shaderProgram:n.shaderProgram,primitiveType:ve.TRIANGLES,pass:Le.OPAQUE,pickId:e._allowPicking?"v_pickColor":void 0,owner:e,count:o,modelMatrix:e.modelMatrix,boundingVolume:e.boundingVolumeWC,debugShowBoundingVolume:e.debugShowBoundingVolume}));let r=n.command;return r.count!==o&&(r.count=o),r.debugShowBoundingVolume!==e.debugShowBoundingVolume&&(r.debugShowBoundingVolume=e.debugShowBoundingVolume),t.commandList.push(r),e._dirtyCount=0,e._dirtyOffset=0,n}function Rnt(e){let{_dirtyOffset:t,_dirtyCount:n}=e;e.get(t,fa);let i=fa.vertexOffset,o=fa.triangleOffset*3;e.get(t+n-1,fa);let r=fa.vertexOffset+fa.vertexCount-i,s=(fa.triangleOffset+fa.triangleCount)*3-o;return{indexOffset:o,indexCount:s,vertexOffset:i,vertexCount:r}}function Ent(){let e=this;l(e.vertexArray)&&e.vertexArray.destroy(),l(e.shaderProgram)&&e.shaderProgram.destroy(),l(e.renderState)&&De.removeFromCache(e.renderState)}var FP=Vnt;var{ERR_CAPACITY:bii}=Ks.Error,s8=class e extends Ks{constructor(t=B.EMPTY_OBJECT){super(t),this._holeCount=0,this._holeCountMax=t.holeCountMax??Ks.DEFAULT_CAPACITY,this._holeIndexView=null,this._triangleCount=0,this._triangleCountMax=t.triangleCountMax??Ks.DEFAULT_CAPACITY,this._triangleIndexView=null,this._allocateHoleIndexBuffer(),this._allocateTriangleIndexBuffer()}_getCollectionClass(){return e}_getPrimitiveClass(){return ha}_getMaterialClass(){return pf}_allocateHoleIndexBuffer(){this._holeIndexView=Me.createTypedArray(this._positionCountMax,this._holeCountMax)}_allocateTriangleIndexBuffer(){this._triangleIndexView=Me.createTypedArray(this._positionCountMax,this._triangleCountMax*3)}static clone(t,n){return super.clone(t,n),this._copySubArray(t._holeIndexView,n._holeIndexView,t.holeCount),this._copySubArray(t._triangleIndexView,n._triangleIndexView,t._triangleCount*3),n._holeCount=t._holeCount,n._triangleCount=t._triangleCount,n}static _cloneEmpty(t){return new e({primitiveCountMax:t.primitiveCountMax,vertexCountMax:t.vertexCountMax,holeCountMax:t.holeCountMax,triangleCountMax:t.triangleCountMax})}static _replaceBuffers(t,n){super._replaceBuffers(t,n),n._holeIndexView=t._holeIndexView,n._triangleIndexView=t._triangleIndexView}add(t,n=new ha){super.add(t,n);let i=this._positionCount;n._setUint32(ha.Layout.POSITION_OFFSET_U32,i),n._setUint32(ha.Layout.POSITION_COUNT_U32,0);let o=this._holeCount;n._setUint32(ha.Layout.HOLE_OFFSET_U32,o),n._setUint32(ha.Layout.HOLE_COUNT_U32,0);let r=this._triangleCount;return n._setUint32(ha.Layout.TRIANGLE_OFFSET_U32,r),n._setUint32(ha.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=FP(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}},Ym=s8;var Cii=x(T(),1);var{ERR_RESIZE:Sii,ERR_CAPACITY:Aii}=Ks.Error,jC=class jC extends Qr{constructor(){super(...arguments);Qt(this,"_collection",null)}static clone(n,i){return super.clone(n,i),i.setPositions(n.getPositions()),i}get vertexOffset(){return this._getUint32(jC.Layout.POSITION_OFFSET_U32)}get vertexCount(){return this._getUint32(jC.Layout.POSITION_COUNT_U32)}getPositions(n){let{vertexOffset:i,vertexCount:o}=this,r=this._collection._positionView;if(!l(n)){let s=r.byteOffset+i*3*r.BYTES_PER_ELEMENT,a=r.constructor;return new a(r.buffer,s,o*3)}for(let s=0;s<o;s++)n[s*3]=r[(i+s)*3],n[s*3+1]=r[(i+s)*3+1],n[s*3+2]=r[(i+s)*3+2];return n}setPositions(n){let i=this._collection,o=this.vertexOffset,r=this.vertexCount,s=n.length/3,a=i._positionCount+s-r;i._positionCount=a,this._setUint32(jC.Layout.POSITION_COUNT_U32,s);let c=i._positionView;for(let d=0;d<s;d++)c[(o+d)*3]=n[d*3],c[(o+d)*3+1]=n[d*3+1],c[(o+d)*3+2]=n[d*3+2];i._makeDirtyBoundingVolume()}toJSON(){return{...super.toJSON(),positions:Array.from(this.getPositions())}}};Qt(jC,"Layout",{...Qr.Layout,POSITION_OFFSET_U32:Qr.Layout.__BYTE_LENGTH,POSITION_COUNT_U32:Qr.Layout.__BYTE_LENGTH+4,__BYTE_LENGTH:Qr.Layout.__BYTE_LENGTH+8});var a8=jC,nl=a8;var moi=x(T(),1);var roi=x(T(),1);var Eii=x(T(),1),IP=`in vec3 positionHigh;
in vec3 positionLow;
in vec3 prevPositionHigh;
in vec3 prevPositionLow;
in vec3 nextPositionHigh;
in vec3 nextPositionLow;
in vec4 pickColor;
in vec4 showColorWidthAndTexCoord;
out vec4 v_pickColor;
out vec4 v_color;
out vec2 v_st;
out float v_width;
out float v_polylineAngle;
void main()
{
float show = showColorWidthAndTexCoord.x;
vec4 color = czm_decodeRGB8(showColorWidthAndTexCoord.y);
float width = showColorWidthAndTexCoord.z;
float texCoord = showColorWidthAndTexCoord.w;
///////////////////////////////////////////////////////////////////////////
bool usePrevious = texCoord == 1.0;
float expandDir = gl_VertexID % 2 == 1 ? 1.0 : -1.0;
float polylineAngle;
vec4 positionEC = czm_translateRelativeToEye(positionHigh, positionLow);
vec4 prevPositionEC = czm_translateRelativeToEye(prevPositionHigh, prevPositionLow);
vec4 nextPositionEC = czm_translateRelativeToEye(nextPositionHigh, nextPositionLow);
vec4 positionWC = getPolylineWindowCoordinates(positionEC, prevPositionEC, nextPositionEC, expandDir, width, usePrevious, polylineAngle);
///////////////////////////////////////////////////////////////////////////
gl_Position = czm_viewportOrthographic * positionWC * show;
v_pickColor = pickColor / 255.0;
v_color = color;
v_color.a *= show;
v_st.s = texCoord;
v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);
v_width = width;
v_polylineAngle = polylineAngle;
}
`;var Lii=x(T(),1),PP=`in vec4 v_pickColor;
in vec4 v_color;
void main()
{
if (v_color.a < 0.005) // matches 0/255 and 1/255
{
discard;
}
out_FragColor = czm_gammaCorrect(v_color);
czm_writeLogDepth();
}
`;var Iii=x(T(),1);var XP=class XP extends Jl{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}}};Qt(XP,"Layout",{...Jl.Layout,WIDTH_U8:Jl.Layout.__BYTE_LENGTH,__BYTE_LENGTH:Jl.Layout.__BYTE_LENGTH+4}),Qt(XP,"DEFAULT_MATERIAL",Object.freeze(new XP));var c8=XP,bf=c8;var wm={positionHigh:0,positionLow:1,prevPositionHigh:2,prevPositionLow:3,nextPositionHigh:4,nextPositionLow:5,pickColor:6,showColorWidthAndTexCoord:7},il=new nl,l8=new bf,NP=new U,QC=new m,D_=new m,O_=new m,B_=new Tn,z_=new Tn,H_=new Tn;function Gnt(e,t,n){let i=t.context;if(n=n||{destroy:vnt},!l(n.attributeArrays)||!l(n.indexArray)){let s=e.vertexCountMax-e.primitiveCount,a=e.vertexCountMax*2;n.indexArray=Me.createTypedArray(a,s*6),n.attributeArrays={positionHigh:new Float32Array(a*3),positionLow:new Float32Array(a*3),prevPositionHigh:new Float32Array(a*3),prevPositionLow:new Float32Array(a*3),nextPositionHigh:new Float32Array(a*3),nextPositionLow:new Float32Array(a*3),pickColor:new Uint8Array(a*4),showColorWidthAndTexCoord:new Float32Array(a*4)}}if(e._dirtyCount>0){let{_dirtyOffset:s,_dirtyCount:a}=e,{attributeArrays:c}=n,d=n.indexArray,u=c.positionHigh,h=c.positionLow,p=c.prevPositionHigh,b=c.prevPositionLow,f=c.nextPositionHigh,y=c.nextPositionLow,_=c.pickColor,S=c.showColorWidthAndTexCoord;for(let A=s,Z=s+a;A<Z;A++){if(e.get(A,il),!il._dirty)continue;let V=il.getPositions();il.getMaterial(l8);let E=cn.encodeRGB8(l8.color);U.fromRgba(il._pickId,NP);let L=il.show,v=il.vertexOffset*2,I=(il.vertexOffset-A)*6;for(let X=0,N=il.vertexCount;X<N;X++){let g=X===0,C=X===N-1;m.fromArray(V,X*3,QC),g?(m.fromArray(V,(X+1)*3,O_),m.subtract(QC,O_,D_),m.add(QC,D_,D_)):C?(m.fromArray(V,(X-1)*3,D_),m.subtract(QC,D_,O_),m.add(QC,O_,O_)):(m.fromArray(V,(X-1)*3,D_),m.fromArray(V,(X+1)*3,O_)),C||(d[I]=v,d[I+1]=v+1,d[I+2]=v+2,d[I+3]=v+2,d[I+4]=v+1,d[I+5]=v+3,I+=6),Tn.fromCartesian(QC,B_),Tn.fromCartesian(D_,z_),Tn.fromCartesian(O_,H_);for(let R=0;R<2;R++)u[v*3]=B_.high.x,u[v*3+1]=B_.high.y,u[v*3+2]=B_.high.z,h[v*3]=B_.low.x,h[v*3+1]=B_.low.y,h[v*3+2]=B_.low.z,p[v*3]=z_.high.x,p[v*3+1]=z_.high.y,p[v*3+2]=z_.high.z,b[v*3]=z_.low.x,b[v*3+1]=z_.low.y,b[v*3+2]=z_.low.z,f[v*3]=H_.high.x,f[v*3+1]=H_.high.y,f[v*3+2]=H_.high.z,y[v*3]=H_.low.x,y[v*3+1]=H_.low.y,y[v*3+2]=H_.low.z,_[v*4]=U.floatToByte(NP.red),_[v*4+1]=U.floatToByte(NP.green),_[v*4+2]=U.floatToByte(NP.blue),_[v*4+3]=U.floatToByte(NP.alpha),S[v*4]=L?1:0,S[v*4+1]=E,S[v*4+2]=l8.width,S[v*4+3]=X/(N-1),v++}il._dirty=!1}}if(l(n.vertexArray)){if(e._dirtyCount>0){let{indexOffset:s,indexCount:a,vertexOffset:c,vertexCount:d}=Wnt(e);n.vertexArray.copyIndexFromRange(n.indexArray,s,a);for(let u in wm)if(Object.hasOwn(wm,u)){let h=u;n.vertexArray.copyAttributeFromRange(wm[h],n.attributeArrays[h],c,d)}}}else{let s=n.attributeArrays;n.vertexArray=new Mn({context:i,indexBuffer:qe.createIndexBuffer({context:i,typedArray:n.indexArray,usage:Fe.STATIC_DRAW,indexDatatype:Me.fromTypedArray(n.indexArray)}),attributes:[{index:wm.positionHigh,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:s.positionHigh,context:i,usage:Fe.STATIC_DRAW})},{index:wm.positionLow,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:s.positionLow,context:i,usage:Fe.STATIC_DRAW})},{index:wm.prevPositionHigh,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:s.prevPositionHigh,context:i,usage:Fe.STATIC_DRAW})},{index:wm.prevPositionLow,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:s.prevPositionLow,context:i,usage:Fe.STATIC_DRAW})},{index:wm.nextPositionHigh,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:s.nextPositionHigh,context:i,usage:Fe.STATIC_DRAW})},{index:wm.nextPositionLow,componentDatatype:K.FLOAT,componentsPerAttribute:3,vertexBuffer:qe.createVertexBuffer({typedArray:s.nextPositionLow,context:i,usage:Fe.STATIC_DRAW})},{index:wm.pickColor,componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,vertexBuffer:qe.createVertexBuffer({typedArray:s.pickColor,context:i,usage:Fe.STATIC_DRAW})},{index:wm.showColorWidthAndTexCoord,componentDatatype:K.FLOAT,componentsPerAttribute:4,vertexBuffer:qe.createVertexBuffer({typedArray:s.showColorWidthAndTexCoord,context:i,usage:Fe.STATIC_DRAW})}]})}l(n.renderState)||(n.renderState=De.fromCache({blending:tn.DISABLED,depthTest:{enabled:!0}})),l(n.shaderProgram)||(n.shaderProgram=qt.fromCache({context:i,vertexShaderSource:new Be({sources:[Ll,IP]}),fragmentShaderSource:new Be({sources:[PP]}),attributeLocations:wm}));let o=Lnt(e);l(n.command)||(n.command=new et({vertexArray:n.vertexArray,renderState:n.renderState,shaderProgram:n.shaderProgram,primitiveType:ve.TRIANGLES,pass:Le.OPAQUE,pickId:e._allowPicking?"v_pickColor":void 0,owner:e,count:o,modelMatrix:e.modelMatrix,boundingVolume:e.boundingVolumeWC,debugShowBoundingVolume:e.debugShowBoundingVolume}));let r=n.command;return r.count!==o&&(r.count=o),r.debugShowBoundingVolume!==e.debugShowBoundingVolume&&(r.debugShowBoundingVolume=e.debugShowBoundingVolume),t.commandList.push(r),e._dirtyCount=0,e._dirtyOffset=0,n}function Lnt(e){return(e.vertexCount-e.primitiveCount)*6}function Wnt(e){let{_dirtyOffset:t,_dirtyCount:n}=e;e.get(t,il);let i=il.vertexOffset*2,r=(il.vertexOffset-t)*6;e.get(t+n-1,il);let s=(il.vertexOffset+il.vertexCount)*2-i,c=(s/2-n)*6;return{indexOffset:r,indexCount:c,vertexOffset:i,vertexCount:s}}function vnt(){let e=this;l(e.vertexArray)&&e.vertexArray.destroy(),l(e.shaderProgram)&&e.shaderProgram.destroy(),l(e.renderState)&&De.removeFromCache(e.renderState)}var YP=Gnt;var d8=class e extends Ks{_getCollectionClass(){return e}_getPrimitiveClass(){return nl}_getMaterialClass(){return bf}static _cloneEmpty(t){return new e({primitiveCountMax:t.primitiveCountMax,vertexCountMax:t.vertexCountMax})}add(t,n=new nl){super.add(t,n);let i=this._positionCount;return n._setUint32(nl.Layout.POSITION_OFFSET_U32,i),n._setUint32(nl.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=YP(this,t,this._renderContext))}},Mm=d8;var Roi=x(T(),1);var yoi=x(T(),1);function qC(e,t){this._conditionsExpression=ze(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,Int(this,t)}Object.defineProperties(qC.prototype,{conditionsExpression:{get:function(){return this._conditionsExpression}}});function Fnt(e,t){this.condition=e,this.expression=t}function Int(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 Fnt(new _m(a,t),new _m(c,t)))}e._runtimeConditions=n}qC.prototype.evaluate=function(e,t){let n=this._runtimeConditions;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.condition.evaluate(e))return r.expression.evaluate(e,t)}};qC.prototype.evaluateColor=function(e,t){let n=this._runtimeConditions;if(!l(n))return;let i=n.length;for(let o=0;o<i;++o){let r=n[o];if(r.condition.evaluate(e))return r.expression.evaluateColor(e,t)}};qC.prototype.getShaderFunction=function(e,t,n,i){let o=this._runtimeConditions;if(!l(o)||o.length===0)return;let r="",s=o.length;for(let a=0;a<s;++a){let c=o[a],d=c.condition.getShaderExpression(t,n),u=c.expression.getShaderExpression(t,n);r+=` ${a===0?"if":"else if"} (${d})
{
return ${u};
}
`}return r=`${i} ${e}
{
${r} return ${i}(1.0);
}
`,r};qC.prototype.getVariables=function(){let e=[],t=this._runtimeConditions;if(!l(t)||t.length===0)return e;let n=t.length;for(let i=0;i<n;++i){let o=t[i];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 wP=qC;function Jy(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,Pnt(this,e)}function Pnt(e,t){t=ze(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 _m(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 _m(String(t));if(typeof t=="string")return new _m(t,n);if(l(t.conditions))return new wP(t,n)}else return;return t}function lr(e){if(l(e)){if(l(e.expression))return e.expression;if(l(e.conditionsExpression))return ze(e.conditionsExpression,!0)}else return;return e}Object.defineProperties(Jy.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}}});Jy.fromUrl=function(e){return We.createIfNeeded(e).fetchJson(e).then(function(n){return new Jy(n)})};Jy.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)};Jy.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)};Jy.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)};Jy.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 Xb=Jy;var ari=x(T(),1);var Uoi=x(T(),1);var ebe=new Kl,tbe=new nl,nbe=new ha,Xnt=new ff,Nnt=new bf,Ynt=new pf,u8=class{constructor(t,n,i=0){Qt(this,"_color",new U);Qt(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 Bs.getPropertyInherited(this._content,this._batchId,t,this._batchTable)}setProperty(t,n){throw new he("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(Xm,ebe),yield*this._iteratePrimitivesWith(Mm,tbe),yield*this._iteratePrimitivesWith(Ym,nbe)}*_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(Xm,ebe,Xnt)}*_iteratePolylineMaterials(){yield*this._iterateMaterialsWith(Mm,tbe,Nnt)}*_iteratePolygonMaterials(){yield*this._iterateMaterialsWith(Ym,nbe,Ynt)}*_iterateMaterialsWith(t,n,i){for(let o of this._iteratePrimitivesWith(t,n))o.getMaterial(i),yield i,o.setMaterial(i)}},K_=u8;var ibe=new m,wnt=new Kl,Mnt=new nl,knt=new ha;function Unt(e,t){let n=t.scene.nodes,i={collections:[],collectionLocalMatrices:[],features:new Map};for(let o=0;o<n.length;o++)obe(e,n[o],F.IDENTITY,i);return i}function Dnt(e){let t=e.BYTES_PER_ELEMENT*8;return Math.pow(2,t)-1}function Ont(e,t){let n=Dnt(e),i=0;for(let o=0;o<=e.length;o++)if(o===e.length||e[o]===n){let r=o-i;r>0&&t(i,r),i=o+1}}function Bnt(e){let t={pointPrimitiveCount:0,pointVertexCount:0,polylinePrimitiveCount:0,polylineVertexCount:0,polygonPrimitiveCount:0,polygonVertexCount:0,polygonHoleCount:0,polygonTriangleCount:0},n=e.vector,i=e.primitiveType,r=mt.getAttributeBySemantic(e,nt.POSITION).count,s=e.indices?la.readIndicesAsTypedArray(e.indices):void 0;if(i===ve.POINTS)t.pointPrimitiveCount+=n.count,t.pointVertexCount+=n.count;else if(i===ve.LINE_STRIP)t.polylinePrimitiveCount+=n.count,t.polylineVertexCount+=s.length-(n.count-1);else if(i===ve.TRIANGLES){t.polygonPrimitiveCount+=n.count,t.polygonVertexCount+=r,t.polygonTriangleCount+=s.length/3;let a=n.polygonHoleCounts;if(a)for(let c=0;c<a.length;c++)t.polygonHoleCount+=a[c]}else throw new le(`Unexpected primitive type: ${i}`);return t}function znt(e,t,n,i,o){let r=t.vector,s=mt.getAttributeBySemantic(t,nt.POSITION),a=s.typedArray??la.readAttributeAsTypedArray(s),c=a.length/3,d=t.indices?la.readIndicesAsTypedArray(t.indices):void 0,u=t.featureIds?.[0],h,p;function b(f){let y=p[f];if(y!==u.nullFeatureId)return o.get(y)}if(u instanceof yn.FeatureIdAttribute){h=mt.getAttributeBySemantic(t,nt.FEATURE_ID,u.setIndex),p=h.typedArray??la.readAttributeAsTypedArray(h);for(let f=0;f<p.length;f++){let y=p[f];if(!o.has(y)){let _=new K_(e,y,u.propertyTableId);o.set(y,_)}}}if(n instanceof Xm)for(let f=0,y=d?d.length:c;f<y;f++){let _=d?d[f]:f;m.fromArray(a,_*3,ibe);let S=b(_);S.addPrimitiveByCollection(i,f);let A=S.featureId;n.add({position:ibe,featureId:A,pickObject:S},wnt)}else if(n instanceof Mm)Ont(d,(f,y)=>{let _=n.primitiveCount,S=d[f],A=a.subarray(S*3,(S+y)*3),Z=b(S);Z.addPrimitiveByCollection(i,_);let V=Z.featureId;n.add({positions:A,featureId:V,pickObject:Z},Mnt)});else if(n instanceof Ym){let f=r.polygonAttributeOffsets,y=r.polygonIndicesOffsets,_=r.polygonHoleCounts,S=r.polygonHoleOffsets,A=f.length;for(let Z=0;Z<A;Z++){let V=f[Z],E=Z+1<A?f[Z+1]:c,L=a.subarray(V*3,E*3),v;if(l(_)&&_[Z]>0){let R=_[Z];v=S.slice(Z,Z+R);for(let G=0;G<R;G++)v[Z]-=V}let I=y[Z],X=Z+1<A?y[Z+1]:d.length,N=d.slice(I,X);for(let R=0;R<X;R++)N[R]-=V;let g=b(V);g.addPrimitiveByCollection(i,Z);let C=g.featureId;n.add({positions:L,triangles:N,holes:v,featureId:C,pickObject:g},knt)}}}function obe(e,t,n,i){let o=mt.getNodeTransform(t),r=F.multiplyTransformation(n,o,new F),s=t.primitives;for(let c=0;c<s.length;c++){let d=s[c],u=d.primitiveType;if(!d.vector)continue;let h,p=Bnt(d);u===ve.POINTS?h=new Xm({primitiveCountMax:p.pointPrimitiveCount,allowPicking:!0}):u===ve.LINE_STRIP?h=new Mm({primitiveCountMax:p.polylinePrimitiveCount,vertexCountMax:p.polylineVertexCount,allowPicking:!0}):u===ve.TRIANGLES&&(h=new Ym({primitiveCountMax:p.polygonPrimitiveCount,vertexCountMax:p.polygonVertexCount,holeCountMax:p.polygonHoleCount,triangleCountMax:p.polygonTriangleCount,allowPicking:!0})),i.collections.push(h),i.collectionLocalMatrices.push(F.clone(r)),znt(e,d,h,i.collections.length-1,i.features)}let a=t.children;for(let c=0;c<a.length;c++)obe(e,a[c],r,i)}var MP=Unt;var PD=new Kl,XD=new nl,ND=new ha,kP=new ff,m8=new bf,rbe=new pf,sbe=new F,h8=class e{constructor(t,n,i){this._tileset=t,this._tile=n,this._resource=i,this._model=void 0,this._collections=[],this._collectionLocalMatrices=[],this._features=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._collections.reduce((t,n)=>t+n.primitiveCount,0)}get pointsLength(){return this._collections.filter(t=>t instanceof Xm).reduce((t,n)=>t+n.primitiveCount,0)}get trianglesLength(){return this._collections.reduce((t,n)=>n instanceof Ym?t+n.triangleCount:n instanceof Mm?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 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 he("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){return this._features.get(t)}hasProperty(t,n){let i=this.getFeature(t);return i?i.hasProperty(n):!1}applyDebugSettings(t,n){n=t?n:U.WHITE,this.applyStyle(new Xb({color:n}))}applyStyle(t){let n=r=>r instanceof Xm,i=r=>r instanceof Mm,o=r=>r instanceof Ym;for(let r of this._collections.filter(n))for(let s=0,a=r.primitiveCount;s<a;s++){r.get(s,PD);let c=this.getFeature(PD.featureId);PD.show=t.show?.evaluate(c)??!0,t.color?.evaluate(c,kP.color),kP.size=t.pointSize?.evaluate(c),kP.outlineWidth=t.pointOutlineWidth?.evaluate(c),t.pointOutlineColor?.evaluate(c,kP.outlineColor),PD.setMaterial(kP)}for(let r of this._collections.filter(i))for(let s=0,a=r.primitiveCount;s<a;s++){r.get(s,XD);let c=this.getFeature(XD.featureId);XD.show=t.show?.evaluate(c)??!0,t.color?.evaluate(c,m8.color),m8.width=t.lineWidth?.evaluate(c)??1,XD.setMaterial(m8)}for(let r of this._collections.filter(o))for(let s=0,a=r.primitiveCount;s<a;s++){r.get(s,ND);let c=this.getFeature(ND.featureId);ND.show=t.show?.evaluate(c)??!0,t.color?.evaluate(c,rbe.color),ND.setMaterial(rbe)}}update(t,n){if(l(this._model)&&!this._ready){let i=this._model;i.modelMatrix=this._tile.computedTransform,i.update(n),i.ready&&(Knt(this),this._ready=!0)}F.multiplyTransformation(this._tile.computedTransform,this._modelMatrix,sbe);for(let i=0;i<this._collections.length;i++)F.multiplyTransformation(sbe,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,me(this)}static async fromGltf(t,n,i,o){let r=new e(t,n,i),s=Hnt(t,n,r,o),a=await yu.fromGltfAsync(s);return a.show=!1,r._model=a,r}};function Hnt(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 Knt(e){let t=e._model.sceneGraph.components,n=mt.getAxisCorrectionMatrix(t.upAxis,t.forwardAxis,new F);F.multiplyTransformation(t.transform,n,e._modelMatrix);let i=MP(e,t);e._collections=i.collections,e._collectionLocalMatrices=i.collectionLocalMatrices,e._features=i.features}var $C=h8;var Ksi=x(T(),1);var Xsi=x(T(),1);var Iri=x(T(),1);function nc(){}nc._maxSortingConcurrency=Math.max(an.hardwareConcurrency-1,1);nc._sorterTaskProcessor=void 0;nc._taskProcessorReady=!1;nc._error=void 0;nc._getSorterTaskProcessor=function(){if(!l(nc._sorterTaskProcessor)){let e=new Hn("gaussianSplatSorter",nc._maxSortingConcurrency);e.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/wasm_splats_bg.wasm"}).then(function(t){t?nc._taskProcessorReady=!0:nc._error=new le("Gaussian splat sorter could not be initialized.")}).catch(t=>{nc._error=t}),nc._sorterTaskProcessor=e}return nc._sorterTaskProcessor};nc.radixSortIndexes=function(e){let t=nc._getSorterTaskProcessor();if(l(nc._error))throw nc._error;if(nc._taskProcessorReady)return t.scheduleTask(e,[e.primitive.positions.buffer])};var J_=nc;var Mri=x(T(),1);function ic(){}ic._maxSortingConcurrency=Math.max(an.hardwareConcurrency-1,1);ic._textureTaskProcessor=void 0;ic._taskProcessorReady=!1;ic._error=void 0;ic._getTextureTaskProcessor=function(){if(!l(ic._textureTaskProcessor)){let e=new Hn("gaussianSplatTextureGenerator",ic._maxSortingConcurrency);e.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/wasm_splats_bg.wasm"}).then(function(t){t?ic._taskProcessorReady=!0:ic._error=new le("Gaussian splat sorter could not be initialized.")}).catch(t=>{ic._error=t}),ic._textureTaskProcessor=e}return ic._textureTaskProcessor};ic.generateFromAttributes=function(e){let t=ic._getTextureTaskProcessor();if(l(ic._error))throw ic._error;if(!ic._taskProcessorReady)return;let{attributes:n}=e;return t.scheduleTask(e,[n.positions.buffer,n.scales.buffer,n.rotations.buffer,n.colors.buffer])};var UP=ic;var Hri=x(T(),1);function Jnt(e){let t=new M0;this.shaderBuilder=t,this.uniformMap={},this.renderStateOptions=De.getState(De.fromCache({depthTest:{enabled:!0,func:qa.LESS_OR_EQUAL}})),this.alphaOptions=new G_,this.hasSkipLevelOfDetail=!1,e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,fe.FRAGMENT)}var DP=Jnt;var Jri=x(T(),1),OP=`//
// Vertex shader for Gaussian splats.
// The splats are rendered as quads in view space. Splat attributes are loaded from a texture with precomputed 3D covariance.
// Passes local quad coordinates and color to the fragment shader for Gaussian evaluation.
//
// Discards splats outside the view frustum or with negligible screen size.
//
#if defined(HAS_SPHERICAL_HARMONICS)
const uint coefficientCount[3] = uint[3](3u,8u,15u);
const float SH_C1 = 0.48860251;
const float SH_C2[5] = float[5](
1.092548430,
-1.09254843,
0.315391565,
-1.09254843,
0.546274215
);
const float SH_C3[7] = float[7](
-0.59004358,
2.890611442,
-0.45704579,
0.373176332,
-0.45704579,
1.445305721,
-0.59004358
);
//Retrieve SH coefficient. Currently RG32UI format
uvec2 loadSHCoeff(uint splatID, int index) {
ivec2 shTexSize = textureSize(u_sphericalHarmonicsTexture, 0);
uint dims = coefficientCount[uint(u_sphericalHarmonicsDegree)-1u];
uint splatsPerRow = uint(shTexSize.x) / dims;
uint shIndex = (splatID%splatsPerRow) * dims + uint(index);
ivec2 shPosCoord = ivec2(shIndex, splatID / splatsPerRow);
return texelFetch(u_sphericalHarmonicsTexture, shPosCoord, 0).rg;
}
//Unpack RG32UI half float coefficients to vec3
vec3 halfToVec3(uvec2 packed) {
return vec3(unpackHalf2x16(packed.x), unpackHalf2x16(packed.y).x);
}
vec3 loadAndExpandSHCoeff(uint splatID, int index) {
uvec2 coeff = loadSHCoeff(splatID, index);
return halfToVec3(coeff);
}
vec3 evaluateSH(uint splatID, vec3 viewDir) {
vec3 result = vec3(0.0);
int coeffIndex = 0;
float x = viewDir.x, y = viewDir.y, z = viewDir.z;
if (u_sphericalHarmonicsDegree >= 1.) {
vec3 sh1 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh2 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh3 = loadAndExpandSHCoeff(splatID, coeffIndex++);
result += -SH_C1 * y * sh1 + SH_C1 * z * sh2 - SH_C1 * x * sh3;
if (u_sphericalHarmonicsDegree >= 2.) {
float xx = x * x;
float yy = y * y;
float zz = z * z;
float xy = x * y;
float yz = y * z;
float xz = x * z;
vec3 sh4 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh5 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh6 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh7 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh8 = loadAndExpandSHCoeff(splatID, coeffIndex++);
result += SH_C2[0] * xy * sh4 +
SH_C2[1] * yz * sh5 +
SH_C2[2] * (2.0f * zz - xx - yy) * sh6 +
SH_C2[3] * xz * sh7 +
SH_C2[4] * (xx - yy) * sh8;
if (u_sphericalHarmonicsDegree >= 3.) {
vec3 sh9 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh10 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh11 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh12 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh13 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh14 = loadAndExpandSHCoeff(splatID, coeffIndex++);
vec3 sh15 = loadAndExpandSHCoeff(splatID, coeffIndex++);
result += SH_C3[0] * y * (3.0f * xx - yy) * sh9 +
SH_C3[1] * xy * z * sh10 +
SH_C3[2] * y * (4.0f * zz - xx - yy) * sh11 +
SH_C3[3] * z * (2.0f * zz - 3.0f * xx - 3.0f * yy) * sh12 +
SH_C3[4] * x * (4.0f * zz - xx - yy) * sh13 +
SH_C3[5] * z * (xx - yy) * sh14 +
SH_C3[6] * x * (xx - 3.0f * yy) * sh15;
}
}
}
return result;
}
#endif
// Transforms and projects splat covariance into screen space and extracts the major and minor axes of the Gaussian ellipsoid
// which is used to calculate the vertex position in clip space.
vec4 calcCovVectors(vec3 viewPos, mat3 Vrk) {
vec4 t = vec4(viewPos, 1.0);
vec2 focal = vec2(czm_projection[0][0] * czm_viewport.z, czm_projection[1][1] * czm_viewport.w);
vec2 J1 = focal / t.z;
vec2 J2 = -focal * vec2(t.x, t.y) / (t.z * t.z);
mat3 J = mat3(
J1.x, 0.0, J2.x,
0.0, J1.y, J2.y,
0.0, 0.0, 0.0
);
mat3 R = mat3(czm_modelView);
//transform our covariance into view space
//ensures orientation is correct
mat3 Vrk_view = R * Vrk * transpose(R);
mat3 cov = transpose(J) * Vrk_view * J;
float diagonal1 = cov[0][0] + .3;
float offDiagonal = cov[0][1];
float diagonal2 = cov[1][1] + .3;
float mid = 0.5 * (diagonal1 + diagonal2);
float radius = length(vec2((diagonal1 - diagonal2) * 0.5, offDiagonal));
float lambda1 = mid + radius;
float lambda2 = max(mid - radius, 0.1);
vec2 diagonalVector = normalize(vec2(offDiagonal, lambda1 - diagonal1));
return vec4(
min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector,
min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x)
);
}
highp vec4 discardVec = vec4(0.0, 0.0, 2.0, 1.0);
void main() {
uint texIdx = uint(a_splatIndex);
// u_splatRowMask and u_splatRowShift encode the row width of the splat
// attribute texture. The texture width is always maximumTextureSize, which
// varies by GPU, so these are passed as uniforms rather than constants.
// rowMask = maximumTextureSize/2 - 1
// rowShift = log2(maximumTextureSize/2)
uint rowMask = uint(u_splatRowMask);
uint rowShift = uint(u_splatRowShift);
ivec2 posCoord = ivec2(int((texIdx & rowMask) << 1), int(texIdx >> rowShift));
vec4 splatPosition = vec4( uintBitsToFloat(uvec4(texelFetch(u_splatAttributeTexture, posCoord, 0))) );
vec4 splatViewPos = czm_modelView * vec4(splatPosition.xyz, 1.0);
vec4 clipPosition = czm_projection * splatViewPos;
float clip = 1.2 * clipPosition.w;
if (clipPosition.z < -clip || clipPosition.x < -clip || clipPosition.x > clip ||
clipPosition.y < -clip || clipPosition.y > clip) {
gl_Position = vec4(0.0, 0.0, 2.0, 1.0);
return;
}
ivec2 covCoord = ivec2(int(((texIdx & rowMask) << 1) | 1u), int(texIdx >> rowShift));
uvec4 covariance = uvec4(texelFetch(u_splatAttributeTexture, covCoord, 0));
gl_Position = clipPosition;
vec2 u1 = unpackHalf2x16(covariance.x) ;
vec2 u2 = unpackHalf2x16(covariance.y);
vec2 u3 = unpackHalf2x16(covariance.z);
mat3 Vrk = mat3(u1.x, u1.y, u2.x, u1.y, u2.y, u3.x, u2.x, u3.x, u3.y);
vec4 covVectors = calcCovVectors(splatViewPos.xyz, Vrk);
if (dot(covVectors.xy, covVectors.xy) < 4.0 && dot(covVectors.zw, covVectors.zw) < 4.0) {
gl_Position = discardVec;
return;
}
vec2 corner = vec2((gl_VertexID << 1) & 2, gl_VertexID & 2) - 1.;
gl_Position += vec4((corner.x * covVectors.xy + corner.y * covVectors.zw) / czm_viewport.zw * gl_Position.w, 0, 0);
gl_Position.z = clamp(gl_Position.z, -abs(gl_Position.w), abs(gl_Position.w));
v_vertPos = corner ;
v_splatColor = vec4(covariance.w & 0xffu, (covariance.w >> 8) & 0xffu, (covariance.w >> 16) & 0xffu, (covariance.w >> 24) & 0xffu) / 255.0;
#if defined(HAS_SPHERICAL_HARMONICS)
vec4 splatWC = czm_inverseView * splatViewPos;
vec3 viewDirModel = normalize(u_inverseModelRotation * (splatWC.xyz - u_cameraPositionWC.xyz));
v_splatColor.rgb += evaluateSH(texIdx, viewDirModel).rgb;
#endif
v_splitDirection = u_splitDirection;
}`;var Qri=x(T(),1),BP=`//
// Fragment shader for Gaussian splats.
// Renders a Gaussian splat within a quad, discarding fragments outside the unit circle.
// Applies an approximate Gaussian falloff based on distance from the center and outputs
// a color modulated by the alpha and Gaussian weight.
//
void main() {
if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
float A = -dot(v_vertPos, v_vertPos);
if (A < -4.) {
discard;
}
float B = exp(A * 4.) * v_splatColor.a ;
out_FragColor = vec4(v_splatColor.rgb * B , B);
}
`;var j_=new F,mbe=new F,zP=new F,fi=new q,HP=new Pe,jnt=new m,Qnt=new Pe,qnt=new m,$nt=1e-12,YD=1e-5,f8=1e-7,Xa={IDLE:0,WAITING:1,SORTING:2,SORTED:3,ERROR:4},Xs={BUILDING:"BUILDING",TEXTURE_PENDING:"TEXTURE_PENDING",TEXTURE_READY:"TEXTURE_READY",SORTING:"SORTING",READY:"READY"},eit=2,tit=30,nit=3,iit=.008726646259971648,oit=1;function rit(e,t){let n=e._lastSteadySortFrameNumber>=0?t.frameNumber-e._lastSteadySortFrameNumber:Number.POSITIVE_INFINITY;if(e._lastSteadySortFrameNumber>=0&&n<nit)return!1;let i=t.camera;return l(i)?!e._hasLastSteadySortCameraPosition||!e._hasLastSteadySortCameraDirection||m.distance(i.positionWC,e._lastSteadySortCameraPosition)>=oit?!0:m.angleBetween(i.directionWC,e._lastSteadySortCameraDirection)>=iit:!1}function abe(e,t){e._lastSteadySortFrameNumber=t.frameNumber;let n=t.camera;l(n)&&(m.clone(n.positionWC,e._lastSteadySortCameraPosition),e._hasLastSteadySortCameraPosition=!0,m.clone(n.directionWC,e._lastSteadySortCameraDirection),e._hasLastSteadySortCameraDirection=!0)}function sit(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 cbe(e,t){return l(t)&&t.requestId===e._sortRequestId&&t.dataGeneration===e._splatDataGeneration}function p8(e){l(e)&&(l(e.gaussianSplatTexture)&&(e.gaussianSplatTexture.destroy(),e.gaussianSplatTexture=void 0),l(e.sphericalHarmonicsTexture)&&(e.sphericalHarmonicsTexture.destroy(),e.sphericalHarmonicsTexture=void 0))}function lbe(e,t,n){if(!l(t))return;e._retiredTextures.push({texture:t,frameNumber:n})}function ait(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 cit(e,t){let n=e?.[t];return l(n)?n.buffer:void 0}function lit(e,t,n,i){let o=e._aggregateScratchBuffers[t];l(o)||(o=[],e._aggregateScratchBuffers[t]=o);let r=cit(e._snapshot,t);for(let a=0;a<o.length;a++){let c=o[a];if(c.length>=i&&c.buffer!==r)return c}let s=K.createTypedArray(n,i);return o.push(s),s}function dit(e,t){return e.length===t?e:e.subarray(0,t)}function uit(e,t,n){if(!l(t.indexes)||t.state!==Xs.READY)throw new he("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&&lbe(e,r,i);let s=l(o)?o.sphericalHarmonicsTexture:e.sphericalHarmonicsTexture;l(s)&&s!==t.sphericalHarmonicsTexture&&lbe(e,s,i),e._snapshot=t,e._positions=t.positions,e._rotations=t.rotations,e._scales=t.scales,e._colors=t.colors,e._shData=t.shData,e._sphericalHarmonicsDegree=t.sphericalHarmonicsDegree,e._numSplats=t.numSplats,e._indexes=t.indexes,e.gaussianSplatTexture=t.gaussianSplatTexture,e.sphericalHarmonicsTexture=t.sphericalHarmonicsTexture,e._lastTextureWidth=t.lastTextureWidth,e._lastTextureHeight=t.lastTextureHeight,e._splatRowMask=t.splatRowMask,e._splatRowShift=t.splatRowShift,e._splatBudgetSSEScale=t.splatBudgetSSEScale??1,e._hasGaussianSplatTexture=l(t.gaussianSplatTexture),e._needsGaussianSplatTexture=!1,e._gaussianSplatTexturePending=!1,e._vertexArray=void 0,e._vertexArrayLen=-1,e._drawCommand=void 0,e._sorterPromise=void 0,e._activeSort=void 0,e._sorterState=Xa.IDLE,e._dirty=!1}async function mit(e,t,n,i){try{let o=await i,r=Lt.maximumTextureSize,s=r,a=Math.ceil(n.numSplats/(r/2)),c=Math.log2(r/2),d=r/2-1;if(a>r){let b=n.numSplats;a=r;let f=s/2;if(n.numSplats=r*f,n.positions=n.positions.subarray(0,n.numSplats*3),n.rotations=n.rotations.subarray(0,n.numSplats*4),n.scales=n.scales.subarray(0,n.numSplats*3),n.colors=n.colors.subarray(0,n.numSplats*4),l(n.shData)){let y=n.shData.length/b;n.shData=n.shData.subarray(0,Math.floor(n.numSplats*y))}n.splatBudgetSSEScale=b/n.numSplats,console.warn(`[GaussianSplat][HARD CAP] ${b} splats exceed the maximum texture capacity (${r}\xD7${f} = ${n.numSplats} splats at width=${s}). Rendering only the first ${n.numSplats} splats to avoid a WebGL crash. Increasing maximumScreenSpaceError by ${n.splatBudgetSSEScale.toFixed(2)}x next frame.`)}else n.splatBudgetSSEScale=1;let u=s*a*4,h;u<=o.data.length?h=o.data.subarray(0,u):(h=new Uint32Array(u),h.set(o.data));let p={width:s,height:a,data:h};if(n.splatRowMask=d,n.splatRowShift=c,e._pendingSnapshot!==n){n.state=Xs.BUILDING;return}if(!l(n.gaussianSplatTexture))n.gaussianSplatTexture=ube(t.context,p);else if(n.lastTextureHeight!==p.height||n.lastTextureWidth!==p.width){let b=n.gaussianSplatTexture;n.gaussianSplatTexture=ube(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=Lt.maximumTextureSize,y=n.shCoefficientCount/3,_=Math.floor(f/y),S=_*(y*2),A=Math.ceil(n.numSplats/_);if(A>f)console.warn(`[GaussianSplat][SHTexture] ${n.numSplats} splats require SH height ${A} > maxTex ${f}. Disabling spherical harmonics for this snapshot (color-only fallback).`),n.sphericalHarmonicsDegree=0,l(b)&&b.destroy(),n.sphericalHarmonicsTexture=void 0;else{let Z=new Uint32Array(f*A*2),V=0;for(let E=0;V<n.shData.length;E+=f*2)Z.set(n.shData.subarray(V,V+S),E),V+=S;n.sphericalHarmonicsTexture=fit(t.context,{data:Z,width:f,height:A}),l(b)&&b.destroy()}}n.state=Xs.TEXTURE_READY}catch(o){console.error("Error generating Gaussian splat texture:",o),n.state=Xs.BUILDING}}async function hit(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===Xs.SORTING&&(n.snapshot.state=Xs.TEXTURE_READY);return}let c=n.snapshot;c.indexes=o,c.state=Xs.READY,e._pendingSortPromise=void 0,e._pendingSort=void 0,uit(e,c,t),e._pendingSnapshot=void 0,jl.buildGSplatDrawCommand(e,t)}catch(o){if(!l(n)||n.snapshot!==e._pendingSnapshot)return;e._pendingSortPromise=void 0,e._pendingSort=void 0,n.snapshot.state===Xs.SORTING&&(n.snapshot.state=Xs.TEXTURE_READY),e._sorterState=Xa.ERROR,e._sorterError=o}}async function dbe(e,t,n){try{let i=await n,o=cbe(e,t),r=t?.expectedCount,s=r,a=i?.length;if(!o||(r!==s||a!==r)){o&&(e._sorterPromise=void 0,e._sorterState=Xa.IDLE);return}e._indexes=i,e._sorterState=Xa.SORTED}catch(i){if(!cbe(e,t))return;e._sorterState=Xa.ERROR,e._sorterError=i}}function fit(e,t){return new Et({context:e,source:{width:t.width,height:t.height,arrayBufferView:t.data},preMultiplyAlpha:!1,skipColorSpaceConversion:!0,pixelFormat:Ke.RG_INTEGER,pixelDatatype:Oe.UNSIGNED_INT,flipY:!1,sampler:Ut.NEAREST})}function ube(e,t){return new Et({context:e,source:{width:t.width,height:t.height,arrayBufferView:t.data},preMultiplyAlpha:!1,skipColorSpaceConversion:!0,pixelFormat:Ke.RGBA_INTEGER,pixelDatatype:Oe.UNSIGNED_INT,flipY:!1,sampler:Ut.NEAREST})}function jl(e){e=e??B.EMPTY_OBJECT,this._positions=void 0,this._rotations=void 0,this._scales=void 0,this._colors=void 0,this._indexes=void 0,this._numSplats=0,this._needsGaussianSplatTexture=!0,this._snapshot=void 0,this._pendingSnapshot=void 0,this._retiredTextures=[],this._aggregateScratchBuffers={positions:[],scales:[],rotations:[],colors:[]},this._scratchAggregateShBuffer=void 0,this._selectedTilesStableFrames=0,this._needsSnapshotRebuild=!1,this._snapshotRebuildStallFrames=0,this._prevViewMatrix=new F,this._debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.gaussianSplatTexture=void 0,this.sphericalHarmonicsTexture=void 0,this._lastTextureWidth=0,this._lastTextureHeight=0,this._vertexArray=void 0,this._vertexArrayLen=-1,this._splitDirection=Er.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=mt.getAxisCorrectionMatrix(to.Y,to.X,new F),this._shInverseRotation=new q,this._isDestroyed=!1,this._sorterState=Xa.IDLE,this._sorterPromise=void 0,this._splatDataGeneration=0,this._sortRequestId=0,this._activeSort=void 0,this._pendingSortPromise=void 0,this._pendingSort=void 0,this._lastSteadySortFrameNumber=-1,this._lastSteadySortCameraPosition=new m,this._hasLastSteadySortCameraPosition=!1,this._lastSteadySortCameraDirection=new m,this._hasLastSteadySortCameraDirection=!1,this._sorterError=void 0,this._splatRowMask=0,this._splatRowShift=0,this._splatBudgetSSEScale=1}Object.defineProperties(jl.prototype,{ready:{get:function(){return this._ready}},isStable:{get:function(){return!this._dirty&&(!l(this._pendingSnapshot)||this._pendingSnapshot.state===Xs.READY)}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,this._dirty=!0)}}});jl.prototype._wrappedUpdate=function(e){let t=this._tileset;if(this._splatBudgetSSEScale!==1){let n=t.maximumScreenSpaceError;t.maximumScreenSpaceError*=this._splatBudgetSSEScale,this._baseTilesetUpdate.call(t,e),t.maximumScreenSpaceError=n}else this._baseTilesetUpdate.call(t,e);this.update(e)};jl.prototype.destroy=function(){if(this._positions=void 0,this._rotations=void 0,this._scales=void 0,this._colors=void 0,this._indexes=void 0,p8(this._pendingSnapshot),p8(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),me(this)};jl.prototype.isDestroyed=function(){return this._isDestroyed};jl.prototype.onTileLoad=function(e){this._dirty=!0};jl.prototype.onTileVisible=function(e){};jl.transformTile=function(e){let t=e.computedTransform,n=e.content.gltfPrimitive,i=e.tileset.gaussianSplatPrimitive;i._rootTransform===void 0&&(i._rootTransform=dt.eastNorthUpToFixedFrame(e.tileset.boundingSphere.center));let o=i._rootTransform,r=F.multiplyTransformation(t,i._axisCorrectionMatrix,j_);F.multiplyTransformation(r,e.content.worldTransform,r);let s=F.inverse(o,mbe),a=F.multiplyTransformation(s,r,j_),c=e.content._lastSplatTransform;if(e.content._transformed&&l(c)&&F.equalsEpsilon(a,c,$nt))return;let d=e.content.positions,u=e.content.rotations,h=e.content.scales,p=Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]),b=Math.sqrt(a[4]*a[4]+a[5]*a[5]+a[6]*a[6]),f=Math.sqrt(a[8]*a[8]+a[9]*a[9]+a[10]*a[10]);fi[0]=a[0]/p,fi[1]=a[1]/p,fi[2]=a[2]/p,fi[3]=a[4]/b,fi[4]=a[5]/b,fi[5]=a[6]/b,fi[6]=a[8]/f,fi[7]=a[9]/f,fi[8]=a[10]/f;let y=fi[0]*fi[3]+fi[1]*fi[4]+fi[2]*fi[5],_=fi[0]*fi[6]+fi[1]*fi[7]+fi[2]*fi[8],S=fi[3]*fi[6]+fi[4]*fi[7]+fi[5]*fi[8],A=Math.abs(p-1)<=f8&&Math.abs(b-1)<=f8&&Math.abs(f-1)<=f8,Z=Math.abs(y)<=YD&&Math.abs(_)<=YD&&Math.abs(S)<=YD,V=fi[0]*(fi[4]*fi[8]-fi[5]*fi[7])-fi[3]*(fi[1]*fi[8]-fi[2]*fi[7])+fi[6]*(fi[1]*fi[5]-fi[2]*fi[4]),E=A&&Z&&Math.abs(V-1)<=YD;Pe.fromRotationMatrix(fi,HP),Pe.normalize(HP,HP);let L=mt.getAttributeBySemantic(n,nt.POSITION).typedArray,v=mt.getAttributeBySemantic(n,nt.ROTATION).typedArray,I=mt.getAttributeBySemantic(n,nt.SCALE).typedArray,X=jnt,N=Qnt,g=qnt;for(let C=0;C<L.length/3;++C)X.x=L[C*3],X.y=L[C*3+1],X.z=L[C*3+2],N.x=v[C*4],N.y=v[C*4+1],N.z=v[C*4+2],N.w=v[C*4+3],g.x=I[C*3],g.y=I[C*3+1],g.z=I[C*3+2],E?(F.multiplyByPoint(a,X,X),Pe.multiply(HP,N,N),Pe.normalize(N,N)):(F.fromTranslationQuaternionRotationScale(X,N,g,zP),F.multiplyTransformation(a,zP,zP),F.getTranslation(zP,X),F.getScale(zP,g),Pe.multiply(HP,N,N),Pe.normalize(N,N)),d[C*3]=X.x,d[C*3+1]=X.y,d[C*3+2]=X.z,u[C*4]=N.x,u[C*4+1]=N.y,u[C*4+2]=N.z,u[C*4+3]=N.w,h[C*3]=g.x,h[C*3+1]=g.y,h[C*3+2]=g.z;e.content._lastSplatTransform=F.clone(a,e.content._lastSplatTransform),e.content._transformed=!0};jl.generateSplatTexture=function(e,t,n){if(!l(n)||n.state!==Xs.BUILDING)return;n.state=Xs.TEXTURE_PENDING;let i=UP.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=Xs.BUILDING;return}mit(e,t,n,i)};jl.buildGSplatDrawCommand=function(e,t){let n=e._tileset,i=new DP(e),{shaderBuilder:o}=i,r=i.renderStateOptions;r.cull.enabled=!1,r.depthMask=!1,r.depthTest.enabled=!0,r.blending=tn.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",fe.VERTEX),o.addVarying("float","v_splitDirection"),o.addUniform("highp usampler2D","u_splatAttributeTexture",fe.VERTEX),o.addUniform("float","u_sphericalHarmonicsDegree",fe.VERTEX),o.addUniform("float","u_splatScale",fe.VERTEX),o.addUniform("vec3","u_cameraPositionWC",fe.VERTEX),o.addUniform("mat3","u_inverseModelRotation",fe.VERTEX);let s=i.uniformMap;o.addUniform("int","u_splatRowMask",fe.VERTEX),o.addUniform("int","u_splatRowShift",fe.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",fe.VERTEX),o.addUniform("highp usampler2D","u_sphericalHarmonicsTexture",fe.VERTEX),s.u_sphericalHarmonicsTexture=function(){return e.sphericalHarmonicsTexture}),s.u_sphericalHarmonicsDegree=function(){return e._sphericalHarmonicsDegree},s.u_cameraPositionWC=function(){return m.clone(t.camera.positionWC)},s.u_inverseModelRotation=function(){return e._shInverseRotation},s.u_splitDirection=function(){return e.splitDirection};let c=l(e._indexes)?e._indexes.length:e._numSplats;i.instanceCount=c,i.count=4,i.primitiveType=ve.TRIANGLE_STRIP,o.addVertexLines(OP),o.addFragmentLines(BP);let d=o.buildShaderProgram(t.context),u=ze(De.fromCache(i.renderStateOptions),!0);u.cull.face=mt.getCullFace(n.modelMatrix,ve.TRIANGLE_STRIP),u=De.fromCache(u);let h={screenQuadPosition:0,splatIndex:2},p=new yn.Attribute;if(p.name="_SPLAT_INDEXES",p.typedArray=e._indexes,p.componentDatatype=K.UNSIGNED_INT,p.type=Nt.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 ft({attributes:{screenQuadPosition:new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1],name:"_SCREEN_QUAD_POS",variableName:"screenQuadPosition"}),splatIndex:{...p,variableName:"splatIndex"}},primitiveType:ve.TRIANGLE_STRIP});e._vertexArray=Mn.fromGeometry({context:t.context,geometry:S,attributeLocations:h,bufferUsage:Fe.DYNAMIC_DRAW,interleave:!1})}else e._vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(e._indexes);e._vertexArrayLen=e._indexes.length;let f=F.clone(e._rootTransform,e._drawCommandModelMatrix),y=e._vertexArray,_=new et({boundingVolume:n.boundingSphere,modelMatrix:f,uniformMap:s,renderState:u,vertexArray:y,shaderProgram:d,cull:r.cull.enabled,pass:Le.GAUSSIAN_SPLATS,count:i.count,owner:e,instanceCount:i.instanceCount,primitiveType:ve.TRIANGLE_STRIP,debugShowBoundingVolume:n.debugShowBoundingVolume,castShadows:!1,receiveShadows:!1});e._drawCommand=_};jl.prototype.update=function(e){let t=this._tileset;if(ait(this,e.frameNumber),!t.show)return;if(this._drawCommand&&e.commandList.push(this._drawCommand),t._modelMatrixChanged){this._dirty=!0;return}let n=l(this._rootTransform);if(e.passes.pick===!0)return;this.splitDirection!==t.splitDirection&&(this.splitDirection=t.splitDirection);let i=e.camera;if(l(i)){if(this._sorterState===Xa.IDLE){let o=t._selectedTiles.length!==0&&sit(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>=eit,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>=tit;if(!(this._dirty||this._needsSnapshotRebuild||o||l(this._pendingSnapshot)||l(this._pendingSortPromise)||!l(this._drawCommand))&&F.equals(i.viewMatrix,this._prevViewMatrix))return;if(t._selectedTiles.length!==0&&this._needsSnapshotRebuild&&a){this._splatDataGeneration++,this._activeSort=void 0,this._sorterPromise=void 0,this._sorterState=Xa.IDLE,this._pendingSortPromise=void 0,this._pendingSort=void 0,l(this._pendingSnapshot)&&p8(this._pendingSnapshot);let d=t._selectedTiles;this._rootTransform=dt.eastNorthUpToFixedFrame(t.boundingSphere.center);{let V=d[0],E=F.multiplyTransformation(V.computedTransform,this._axisCorrectionMatrix,mbe);F.multiplyTransformation(E,V.content.worldTransform??F.IDENTITY,E),F.getRotation(F.inverse(E,E),this._shInverseRotation)}for(let V of d)jl.transformTile(V);let u=d.reduce((V,E)=>V+E.content.pointsLength,0),h=(V,E,L,v)=>{let I,X=0,N=0;for(let g of d){let C=L(g.content),R=l(v)?v:Nt.getNumberOfComponents(C.type),G=l(C.typedArray)?C.typedArray:C;N+=G.length,l(I)||(I=lit(this,V,E,u*R))}if(!l(I))return K.createTypedArray(E,0);for(let g of d){let C=g.content,R=L(C),G=l(R.typedArray)?R.typedArray:R;I.set(G,X),X+=G.length}return dit(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 L=this._scratchAggregateShBuffer,v=0;for(let I of d){let X=I.content.packedSphericalHarmonicsData;I.content.sphericalHarmonicsDegree>0&&(L.set(X,v),v+=X.length)}return v<L.length?L.subarray(0,v):L},b=h("positions",K.FLOAT,V=>V.positions,3),f=h("scales",K.FLOAT,V=>V.scales,3),y=h("rotations",K.FLOAT,V=>V.rotations,4),_=h("colors",K.UNSIGNED_BYTE,V=>mt.getAttributeBySemantic(V.gltfPrimitive,nt.COLOR)),S=d[0].content.sphericalHarmonicsDegree,A=S>0?d[0].content.sphericalHarmonicsCoefficientCount:0,Z=p();this._pendingSnapshot={generation:this._splatDataGeneration,positions:b,rotations:y,scales:f,colors:_,shData:Z,sphericalHarmonicsDegree:S,shCoefficientCount:A,numSplats:u,indexes:void 0,gaussianSplatTexture:void 0,sphericalHarmonicsTexture:void 0,lastTextureWidth:0,lastTextureHeight:0,splatRowMask:0,splatRowShift:0,state:Xs.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===Xs.BUILDING){jl.generateSplatTexture(this,e,d);return}if(d.state===Xs.TEXTURE_PENDING||d.state===Xs.TEXTURE_READY&&!l(d.gaussianSplatTexture)||!n)return;if(F.clone(i.viewMatrix,this._prevViewMatrix),F.multiply(i.viewMatrix,this._rootTransform,j_),d.state===Xs.TEXTURE_READY&&!l(this._pendingSortPromise)){let u=++this._sortRequestId,h=this._splatDataGeneration;this._pendingSort={requestId:u,dataGeneration:h,expectedCount:d.numSplats,snapshot:d};let p=J_.radixSortIndexes({primitive:{positions:new Float32Array(d.positions),modelView:Float32Array.from(j_),count:d.numSplats},sortType:"Index"});if(!l(p)){this._pendingSortPromise=void 0,this._pendingSort=void 0,d.state=Xs.TEXTURE_READY;return}this._pendingSortPromise=p,d.state=Xs.SORTING;let b=this._pendingSort;hit(this,e,b,p);return}if(!l(this._pendingSortPromise)){d.state===Xs.SORTING&&(d.state=Xs.TEXTURE_READY);return}return}if(this._numSplats===0||!n)return;if(F.clone(i.viewMatrix,this._prevViewMatrix),F.multiply(i.viewMatrix,this._rootTransform,j_),!l(this._sorterPromise)){if(!rit(this,e))return;let d=++this._sortRequestId,u=this._splatDataGeneration,h=this._numSplats;this._activeSort={requestId:d,dataGeneration:u,expectedCount:h};let p=J_.radixSortIndexes({primitive:{positions:new Float32Array(this._positions),modelView:Float32Array.from(j_),count:this._numSplats},sortType:"Index"});if(this._sorterPromise=p,l(p)){abe(this,e);let b=this._activeSort;this._sorterState=Xa.SORTING,dbe(this,b,p);return}}if(!l(this._sorterPromise)){this._sorterState=Xa.WAITING;return}this._sorterState=Xa.SORTING;return}else if(this._sorterState===Xa.WAITING){if(!l(this._sorterPromise)){let o=++this._sortRequestId,r=this._splatDataGeneration,s=this._numSplats;this._activeSort={requestId:o,dataGeneration:r,expectedCount:s};let a=J_.radixSortIndexes({primitive:{positions:new Float32Array(this._positions),modelView:Float32Array.from(j_),count:this._numSplats},sortType:"Index"});if(this._sorterPromise=a,l(a)){abe(this,e);let c=this._activeSort;this._sorterState=Xa.SORTING,dbe(this,c,a);return}}if(!l(this._sorterPromise)){this._sorterState=Xa.WAITING;return}this._sorterState=Xa.SORTING;return}else{if(this._sorterState===Xa.SORTING)return;if(this._sorterState===Xa.SORTED)jl.buildGSplatDrawCommand(this,e),this._sorterState=Xa.IDLE,this._dirty=!1,this._sorterPromise=void 0,this._activeSort=void 0;else if(this._sorterState===Xa.ERROR)throw this._sorterError}this._dirty=!1}};var KP=jl;function Su(e,t,n,i){this._tileset=t,this._tile=n,this._resource=i,this._loader=e,l(this._tileset.gaussianSplatPrimitive)||(this._tileset.gaussianSplatPrimitive=new KP({tileset:this._tileset})),this._positions=void 0,this._rotations=void 0,this._scales=void 0,this.gltfPrimitive=void 0,this.worldTransform=void 0,this.featurePropertiesDirty=!1,this._metadata=void 0,this._group=void 0,this._ready=!1,this._transformed=!1,this._sphericalHarmonicsDegree=0,this._sphericalHarmonicsCoefficientCount=0,this._packedSphericalHarmonicsData=void 0,this._lastSplatTransform=void 0}Su.tilesetRequiresGaussianSplattingExt=function(e){let t=!1;return e.isGltfExtensionRequired instanceof Function&&(t=e.isGltfExtensionRequired("KHR_gaussian_splatting")&&e.isGltfExtensionRequired("KHR_gaussian_splatting_compression_spz_2"),e.isGltfExtensionRequired("KHR_spz_gaussian_splats_compression")&&La("KHR_spz_gaussian_splats_compression",`Support for the original KHR_spz_gaussian_splats_compression extension has been removed in favor of the up to date KHR_gaussian_splatting and KHR_gaussian_splatting_compression_spz_2 extensions
Please retile your tileset with the KHR_gaussian_splatting and KHR_gaussian_splatting_compression_spz_2 extensions.`)),t};Object.defineProperties(Su.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return this.gltfPrimitive.attributes[0].count}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){let e=this._tileset?.gaussianSplatPrimitive;if(!l(e))return 0;let t=e.gaussianSplatTexture,n=e.selectedTileLength;return!l(t)||n===0?0:t.sizeInBytes/n}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},ready:{get:function(){return this._ready}},transformed:{get:function(){return this._transformed}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}},metadata:{get:function(){return this._metadata},set:function(e){this._metadata=e}},group:{get:function(){return this._group},set:function(e){this._group=e}},positions:{get:function(){return this._positions}},rotations:{get:function(){return this._rotations}},scales:{get:function(){return this._scales}},sphericalHarmonicsCoefficientCount:{get:function(){return this._sphericalHarmonicsCoefficientCount}},sphericalHarmonicsDegree:{get:function(){return this._sphericalHarmonicsDegree}},packedSphericalHarmonicsData:{get:function(){return this._packedSphericalHarmonicsData}}});function pit(e){return`${e.startsWith("KHR_gaussian_splatting:")?"KHR_gaussian_splatting:":"_"}SH_DEGREE_`}function bit(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 hbe=new ArrayBuffer(4),git=new Float32Array(hbe),yit=new Uint32Array(hbe);function b8(e){git[0]=e;let t=yit[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 xit(e){let t=pit(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 Tit(e){let t=e.sphericalHarmonicsDegree,n=e.sphericalHarmonicsCoefficientCount,i=e.pointsLength*(n*(2/3)),o=new Uint32Array(i),r=e.gltfPrimitive.attributes.filter(d=>d.name.includes("SH_DEGREE_")),s=0,a=[0,9,24];switch(t){case 1:s=9;break;case 2:s=24;break;case 3:s=45;break}r.sort((d,u)=>d.name<u.name?-1:d.name>u.name?1:0);let c=s*(2/3);for(let d=0;d<r.length;d++){let{l:u,n:h}=xit(r[d].name);for(let p=0;p<e.pointsLength;p++){let b=a[u-1]*2/3,f=p*c+b+h*2,y=p*3;o[f]=b8(r[d].typedArray[y])|b8(r[d].typedArray[y+1])<<16,o[f+1]=b8(r[d].typedArray[y+2])}}return o}Su.fromGltf=async function(e,t,n,i){let o=n,r=We.createIfNeeded(o),s={releaseGltfJson:!1,upAxis:to.Y,forwardAxis:to.Z};l(i.asset)?(s.gltfJson=i,s.baseResource=r,s.gltfResource=r):i instanceof Uint8Array?(s.typedArray=i,s.baseResource=r,s.gltfResource=r):s.gltfResource=We.createIfNeeded(i);let a=new mu(s);try{await a.load()}catch(c){throw a.destroy(),new le(`Failed to load glTF: ${c.message}`)}return new Su(a,e,t,n)};Su.prototype.update=function(e,t){let n=this._loader;if(!this._ready){if(t.afterRender.push(()=>!0),!l(n)){this._ready=!0;return}if(this._resourcesLoaded){this.gltfPrimitive=n.components.scene.nodes[0].primitives[0],this.worldTransform=n.components.scene.nodes[0].matrix,this._ready=!0,this._positions=mt.getAttributeBySemantic(this.gltfPrimitive,nt.POSITION).typedArray.slice(),this._rotations=mt.getAttributeBySemantic(this.gltfPrimitive,nt.ROTATION).typedArray.slice(),this._scales=mt.getAttributeBySemantic(this.gltfPrimitive,nt.SCALE).typedArray.slice();let{l:i,n:o}=bit(this.gltfPrimitive.attributes);this._sphericalHarmonicsDegree=i,this._sphericalHarmonicsCoefficientCount=o,this._packedSphericalHarmonicsData=Tit(this);return}this._resourcesLoaded=n.process(t)}};Su.prototype.hasProperty=function(e,t){return!1};Su.prototype.getFeature=function(e){};Su.prototype.applyDebugSettings=function(e,t){};Su.prototype.applyStyle=function(e){};Su.prototype.pick=function(e,t,n){};Su.prototype.isDestroyed=function(){return this.isDestroyed};Su.prototype.destroy=function(){return this.splatPrimitive=void 0,this._tile=void 0,this._tileset=void 0,this._resource=void 0,this._ready=!1,this._group=void 0,this._metadata=void 0,this._resourcesLoaded=!1,this._lastSplatTransform=void 0,l(this._loader)&&(this._loader.destroy(),this._loader=void 0),me(this)};var jy=Su;var fbe={b3dm:function(e,t,n,i,o){return xu.fromB3dm(e,t,n,i,o)},pnts:function(e,t,n,i,o){return xu.fromPnts(e,t,n,i,o)},i3dm:function(e,t,n,i,o){return xu.fromI3dm(e,t,n,i,o)},cmpt:function(e,t,n,i,o){return Lv.fromTileType(e,t,n,i,o,fbe)},externalTileset:function(e,t,n,i){return qI.fromJson(e,t,n,i)},geom:function(e,t,n,i,o){return new Fv(e,t,n,i,o)},vctr:function(e,t,n,i,o){return new _P(e,t,n,i,o)},subt:function(e,t,n,i,o){return iC.fromSubtreeJson(e,t,n,void 0,i,o)},subtreeJson:function(e,t,n,i){return iC.fromSubtreeJson(e,t,n,i)},glb:function(e,t,n,i,o){if(i.byteLength<12)throw new le("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.isGltfExtensionUsed("CESIUM_mesh_vector")?$C.fromGltf(e,t,n,c):xu.fromGltf(e,t,n,c)},gltf:function(e,t,n,i){return jy.tilesetRequiresGaussianSplattingExt(e)?jy.fromGltf(e,t,n,i):e.isGltfExtensionUsed("CESIUM_mesh_vector")?$C.fromGltf(e,t,n,i):xu.fromGltf(e,t,n,i)},geoJson:function(e,t,n,i){return xu.fromGeoJson(e,t,n,i)}},Q_=fbe;var aai=x(T(),1),pbe={UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5};Object.freeze(pbe);var dr=pbe;var lai=x(T(),1),km={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"};km.isBinaryFormat=function(e){switch(e){case km.BATCHED_3D_MODEL:case km.INSTANCED_3D_MODEL:case km.COMPOSITE:case km.POINT_CLOUD:case km.VECTOR:case km.GEOMETRY:case km.IMPLICIT_SUBTREE:case km.VOXEL_BINARY:case km.GLTF_BINARY:return!0;default:return!1}};Object.freeze(km);var pa=km;var uai=x(T(),1),bbe={NOT_COMPUTED:-1,USE_OPTIMIZATION:1,SKIP_OPTIMIZATION:0};Object.freeze(bbe);var Um=bbe;var hai=x(T(),1),ba={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},Nb=new Array(ba.NUMBER_OF_PASSES);Nb[ba.RENDER]=Object.freeze({pass:ba.RENDER,isRender:!0,requestTiles:!0,ignoreCommands:!1});Nb[ba.PICK]=Object.freeze({pass:ba.PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1});Nb[ba.SHADOW]=Object.freeze({pass:ba.SHADOW,isRender:!1,requestTiles:!0,ignoreCommands:!1});Nb[ba.PRELOAD]=Object.freeze({pass:ba.PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0});Nb[ba.PRELOAD_FLIGHT]=Object.freeze({pass:ba.PRELOAD_FLIGHT,isRender:!1,requestTiles:!0,ignoreCommands:!0});Nb[ba.REQUEST_RENDER_MODE_DEFER_CHECK]=Object.freeze({pass:ba.REQUEST_RENDER_MODE_DEFER_CHECK,isRender:!1,requestTiles:!0,ignoreCommands:!0});Nb[ba.MOST_DETAILED_PRELOAD]=Object.freeze({pass:ba.MOST_DETAILED_PRELOAD,isRender:!1,requestTiles:!0,ignoreCommands:!0});Nb[ba.MOST_DETAILED_PICK]=Object.freeze({pass:ba.MOST_DETAILED_PICK,isRender:!1,requestTiles:!1,ignoreCommands:!1});ba.getPassOptions=function(e){return Nb[e]};Object.freeze(ba);var er=ba;var bai=x(T(),1);function vp(e,t){this._tileset=e,this._tile=t,this.featurePropertiesDirty=!1}Object.defineProperties(vp.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},ready:{get:function(){return!0}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},metadata:{get:function(){},set:function(e){}},batchTable:{get:function(){}},group:{get:function(){},set:function(e){}}});vp.prototype.hasProperty=function(e,t){return!1};vp.prototype.getFeature=function(e){};vp.prototype.applyDebugSettings=function(e,t){};vp.prototype.applyStyle=function(e){};vp.prototype.update=function(e,t){};vp.prototype.pick=function(e,t,n){};vp.prototype.isDestroyed=function(){return!1};vp.prototype.destroy=function(){return me(this)};var eV=vp;var Rai=x(T(),1);var Tai=x(T(),1);function Yb(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(Yb.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});Yb.prototype.hasProperty=function(e){return On.hasProperty(e,this._properties,this._class)};Yb.prototype.hasPropertyBySemantic=function(e){return On.hasPropertyBySemantic(e,this._properties,this._class)};Yb.prototype.getPropertyIds=function(e){return On.getPropertyIds(this._properties,this._class,e)};Yb.prototype.getProperty=function(e){return On.getProperty(e,this._properties,this._class)};Yb.prototype.setProperty=function(e,t){return On.setProperty(e,t,this._properties,this._class)};Yb.prototype.getPropertyBySemantic=function(e){return On.getPropertyBySemantic(e,this._properties,this._class)};Yb.prototype.setPropertyBySemantic=function(e,t){return On.setPropertyBySemantic(e,t,this._properties,this._class)};var JP=Yb;function g8(e,t){let n=_i(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!l(n))return;if(!l(e.schema)){g8._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 JP({content:n,class:o})}}g8._oneTimeWarning=Tt;var q_=g8;var Wai=x(T(),1);function _it(e,t){let n=e.metadataExtension;if(!l(n))return;let i=n.groups,o=_i(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 $_=_it;var Uai=x(T(),1);var Pai=x(T(),1);function wb(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(wb.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});wb.prototype.hasProperty=function(e){return On.hasProperty(e,this._properties,this._class)};wb.prototype.hasPropertyBySemantic=function(e){return On.hasPropertyBySemantic(e,this._properties,this._class)};wb.prototype.getPropertyIds=function(e){return On.getPropertyIds(this._properties,this._class,e)};wb.prototype.getProperty=function(e){return On.getProperty(e,this._properties,this._class)};wb.prototype.setProperty=function(e,t){return On.setProperty(e,t,this._properties,this._class)};wb.prototype.getPropertyBySemantic=function(e){return On.getPropertyBySemantic(e,this._properties,this._class)};wb.prototype.setPropertyBySemantic=function(e,t){return On.setPropertyBySemantic(e,t,this._properties,this._class)};var jP=wb;function y8(e,t){let n=_i(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t.metadata;if(!l(n))return;if(!l(e.schema)){y8._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 jP({tile:n,class:o})}}y8._oneTimeWarning=Tt;var QP=y8;var dci=x(T(),1);var Jai=x(T(),1);function Sit(e){let t=new Uint8Array(e),n=Dh(t);if(n==="glTF"&&(n="glb"),pa.isBinaryFormat(n))return{contentType:n,binaryPayload:t};let i=Ait(t);if(l(i.root))return{contentType:pa.EXTERNAL_TILESET,jsonPayload:i};if(l(i.asset))return{contentType:pa.GLTF,jsonPayload:i};if(l(i.tileAvailability))return{contentType:pa.IMPLICIT_SUBTREE_JSON,jsonPayload:i};if(l(i.type))return{contentType:pa.GEOJSON,jsonPayload:i};if(l(i.voxelTable))return{contentType:pa.VOXEL_JSON,jsonPayload:i};throw new le("Invalid tile content.")}function Ait(e){let t;try{t=xr(e)}catch{throw new le("Invalid tile content.")}return t}var Mb=Sit;function Dm(e,t,n,i){this._tileset=e,this._tile=t,this._tilesetResource=n,this._contents=[],this._contentsCreated=!1;let o=l(i.contents)?i.contents:i.content;this._innerContentHeaders=o,this._requestsInFlight=0,this._cancelCount=0,this._externalTilesetCount=0;let r=this._innerContentHeaders.length;this._arrayFetchPromises=new Array(r),this._requests=new Array(r),this._ready=!1,this._innerContentResources=new Array(r),this._serverKeys=new Array(r);for(let s=0;s<r;s++){let a=n.getDerivedResource({url:o[s].uri}),c=Mc.getServerKey(a.getUrlComponent());this._innerContentResources[s]=a,this._serverKeys[s]=c}}Object.defineProperties(Dm.prototype,{featurePropertiesDirty:{get:function(){let e=this._contents,t=e.length;for(let n=0;n<t;++n)if(e[n].featurePropertiesDirty)return!0;return!1},set:function(e){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].featurePropertiesDirty=e}},featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){return this._contents}},ready:{get:function(){return this._contentsCreated?this._ready:!1}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},metadata:{get:function(){},set:function(){}},batchTable:{get:function(){}},group:{get:function(){},set:function(){}},innerContentUrls:{get:function(){return this._innerContentHeaders.map(function(e){return e.uri})}}});function x8(e,t){e._requestsInFlight+=t,e.tileset.statistics.numberOfPendingRequests+=t}function gbe(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)}Dm.prototype.requestInnerContents=function(){if(!Zit(this._serverKeys)){this.tileset.statistics.numberOfAttemptedRequests+=this._serverKeys.length;return}let e=this._innerContentHeaders;x8(this,e.length);let t=this._cancelCount;for(let n=0;n<e.length;n++)this._arrayFetchPromises[n]=Cit(this,n,t,this._tile._contentState);return Vit(this)};function Zit(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)&&!Mc.serverHasOpenSlots(n,t[n]))return!1;return Mc.heapHasOpenSlots(e.length)}function Cit(e,t,n,i){let o=e._innerContentResources[t].clone(),r=e.tile,s=function(){return r._priority},a=e._serverKeys[t],c=new fr({throttle:!0,throttleByServer:!0,type:ks.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===ui.CANCELLED){gbe(e,i);return}return x8(e,-1),u}}).catch(function(u){if(!(n<e._cancelCount)){if(o.request.cancelled||o.request.state===ui.CANCELLED){gbe(e,i);return}x8(e,-1),ybe(e,t,u)}})}async function Vit(e){let t=e._cancelCount,n=await Promise.all(e._arrayFetchPromises);if(t<e._cancelCount)return;let i=n.map((r,s)=>Rit(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 Rit(e,t,n){if(l(t))try{let i=Mb(t),o=e._tileset,r=e._innerContentResources[n],s=e._tile;i.contentType===pa.EXTERNAL_TILESET&&(e._externalTilesetCount++,s.hasTilesetContent=!0),e._disableSkipLevelOfDetail=e._disableSkipLevelOfDetail||i.contentType===pa.GEOMETRY||i.contentType===pa.VECTOR;let a,c=Q_[i.contentType];l(i.binaryPayload)?a=await Promise.resolve(c(o,s,r,i.binaryPayload.buffer,0)):a=await Promise.resolve(c(o,s,r,i.jsonPayload));let d=e._innerContentHeaders[n];if(s.hasImplicitContentMetadata){let h=s.implicitSubtree,p=s.implicitCoordinates;a.metadata=h.getContentMetadataView(p,n)}else s.hasImplicitContent||(a.metadata=q_(o,d));let u=$_(o,d);return l(u)&&(a.group=new $T({metadata:u})),a}catch(i){ybe(e,n,i)}}function ybe(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}`))}Dm.prototype.cancelRequests=function(){for(let e=0;e<this._requests.length;e++){let t=this._requests[e];l(t)&&t.cancel()}};Dm.prototype.hasProperty=function(e,t){return!1};Dm.prototype.getFeature=function(e){};Dm.prototype.applyDebugSettings=function(e,t){let n=this._contents,i=n.length;for(let o=0;o<i;++o)n[o].applyDebugSettings(e,t)};Dm.prototype.applyStyle=function(e){let t=this._contents,n=t.length;for(let i=0;i<n;++i)t[i].applyStyle(e)};Dm.prototype.update=function(e,t){let n=this._contents,i=n.length,o=!0;for(let r=0;r<i;++r)n[r].update(e,t),o=o&&n[r].ready;!this._ready&&o&&(this._ready=!0)};Dm.prototype.pick=function(e,t,n){if(!this._ready)return;let i,o=Number.POSITIVE_INFINITY,r=this._contents,s=r.length;for(let a=0;a<s;++a){let c=r[a].pick(e,t,n);if(!l(c))continue;let d=m.distance(e.origin,c);d<o&&(i=c,o=d)}if(l(i))return n};Dm.prototype.isDestroyed=function(){return!1};Dm.prototype.destroy=function(){let e=this._contents,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return me(this)};var qP=Dm;var oli=x(T(),1);var wci=x(T(),1);var Tci=x(T(),1);var xbe=Math.cos,Tbe=Math.sin,Eit=Math.sqrt,T8={};T8.computePosition=function(e,t,n,i,o,r,s){let a=t.radiiSquared,c=e.nwCorner,d=e.boundingRectangle,u=c.latitude-e.granYCos*i+o*e.granXSin,h=xbe(u),p=Tbe(u),b=a.z*p,f=c.longitude+i*e.granYSin+o*e.granXCos,y=h*xbe(f),_=h*Tbe(f),S=a.x*y,A=a.y*_,Z=Eit(S*y+A*_+b*p);if(r.x=S/Z,r.y=A/Z,r.z=b/Z,n){let V=e.stNwCorner;l(V)?(u=V.latitude-e.stGranYCos*i+o*e.stGranXSin,f=V.longitude+i*e.stGranYSin+o*e.stGranXCos,s.x=(f-e.stWest)*e.lonScalar,s.y=(u-e.stSouth)*e.latScalar):(s.x=(f-d.west)*e.lonScalar,s.y=(u-d.south)*e.latScalar)}};var Git=new Oi,Om=new m,Lit=new pe,wD=new m,$P=new Di;function _be(e,t,n,i,o,r,s){let a=Math.cos(t),c=i*a,d=n*a,u=Math.sin(t),h=i*u,p=n*u;$P._ellipsoid=ie.default,Om=$P.project(e,Om),Om=m.subtract(Om,wD,Om);let b=Oi.fromRotation(t,Git);Om=Oi.multiplyByVector(b,Om,Om),Om=m.add(Om,wD,Om),e=$P.unproject(Om,e),r-=1,s-=1;let f=e.latitude,y=f+r*p,_=f-c*s,S=f-c*s+r*p,A=Math.max(f,y,_,S),Z=Math.min(f,y,_,S),V=e.longitude,E=V+r*d,L=V+s*h,v=V+s*h+r*d,I=Math.max(V,E,L,v),X=Math.min(V,E,L,v);return{north:A,south:Z,east:I,west:X,granYCos:c,granYSin:h,granXCos:d,granXSin:p,nwCorner:e}}T8.computeOptions=function(e,t,n,i,o,r,s){let a=e.east,c=e.west,d=e.north,u=e.south,h=!1,p=!1;d===W.PI_OVER_TWO&&(h=!0),u===-W.PI_OVER_TWO&&(p=!0);let b,f=d-u;c>a?b=W.TWO_PI-c+a:b=a-c;let y=Math.ceil(b/t)+1,_=Math.ceil(f/t)+1,S=b/(y-1),A=f/(_-1),Z=ae.northwest(e,r),V=ae.center(e,Lit);(n!==0||i!==0)&&(V.longitude<Z.longitude&&(V.longitude+=W.TWO_PI),$P._ellipsoid=ie.default,wD=$P.project(V,wD));let E=A,L=S,v=0,I=0,X=ae.clone(e,o),N={granYCos:E,granYSin:v,granXCos:L,granXSin:I,nwCorner:Z,boundingRectangle:X,width:y,height:_,northCap:h,southCap:p};if(n!==0){let g=_be(Z,n,S,A,V,y,_);d=g.north,u=g.south,a=g.east,c=g.west,N.granYCos=g.granYCos,N.granYSin=g.granYSin,N.granXCos=g.granXCos,N.granXSin=g.granXSin,X.north=d,X.south=u,X.east=a,X.west=c}if(i!==0){n=n-i;let g=ae.northwest(X,s),C=_be(g,n,S,A,V,y,_);N.stGranYCos=C.granYCos,N.stGranXCos=C.granXCos,N.stGranYSin=C.granYSin,N.stGranXSin=C.granXSin,N.stNwCorner=g,N.stWest=C.west,N.stSouth=C.south}return N};var ga=T8;var Wit=new de,vit=new de,Fit=new m,Iit=new ae;function Sbe(e,t){let n=e._ellipsoid,i=t.height,o=t.width,r=t.northCap,s=t.southCap,a=i,c=2,d=0,u=4;r&&(c-=1,a-=1,d+=1,u-=2),s&&(c-=1,a-=1,d+=1,u-=2),d+=c*o+2*a-u;let h=new Float64Array(d*3),p=0,b=0,f,y=Fit;if(r)ga.computePosition(t,n,!1,b,0,y),h[p++]=y.x,h[p++]=y.y,h[p++]=y.z;else for(f=0;f<o;f++)ga.computePosition(t,n,!1,b,f,y),h[p++]=y.x,h[p++]=y.y,h[p++]=y.z;for(f=o-1,b=1;b<i;b++)ga.computePosition(t,n,!1,b,f,y),h[p++]=y.x,h[p++]=y.y,h[p++]=y.z;if(b=i-1,!s)for(f=o-2;f>=0;f--)ga.computePosition(t,n,!1,b,f,y),h[p++]=y.x,h[p++]=y.y,h[p++]=y.z;for(f=0,b=i-2;b>0;b--)ga.computePosition(t,n,!1,b,f,y),h[p++]=y.x,h[p++]=y.y,h[p++]=y.z;let _=h.length/3*2,S=Me.createTypedArray(h.length/3,_),A=0;for(let V=0;V<h.length/3-1;V++)S[A++]=V,S[A++]=V+1;S[A++]=h.length/3-1,S[A++]=0;let Z=new ft({attributes:new bn,primitiveType:ve.LINES});return Z.attributes.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:h}),Z.indices=S,Z}function Pit(e,t){let n=e._surfaceHeight,i=e._extrudedHeight,o=e._ellipsoid,r=Sbe(e,t),s=t.height,a=t.width,c=Si.scaleToGeodeticHeight(r.attributes.position.values,n,o,!1),d=c.length,u=new Float64Array(d*2);u.set(c);let h=Si.scaleToGeodeticHeight(r.attributes.position.values,i,o);u.set(h,d),r.attributes.position.values=u;let p=t.northCap,b=t.southCap,f=4;p&&(f-=1),b&&(f-=1);let y=(u.length/3+f)*2,_=Me.createTypedArray(u.length/3,y);d=u.length/6;let S=0;for(let Z=0;Z<d-1;Z++)_[S++]=Z,_[S++]=Z+1,_[S++]=Z+d,_[S++]=Z+d+1;_[S++]=d-1,_[S++]=0,_[S++]=d+d-1,_[S++]=d,_[S++]=0,_[S++]=d;let A;if(p)A=s-1;else{let Z=a-1;_[S++]=Z,_[S++]=Z+d,A=a+s-2}if(_[S++]=A,_[S++]=A+d,!b){let Z=a+A-1;_[S++]=Z,_[S]=Z+d}return r.indices=_,r}function nV(e){e=e??B.EMPTY_OBJECT;let t=e.rectangle,n=e.granularity??W.RADIANS_PER_DEGREE,i=e.ellipsoid??ie.default,o=e.rotation??0,r=e.height??0,s=e.extrudedHeight??r;this._rectangle=ae.clone(t),this._granularity=n,this._ellipsoid=i,this._surfaceHeight=Math.max(r,s),this._rotation=o,this._extrudedHeight=Math.min(r,s),this._offsetAttribute=e.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}nV.packedLength=ae.packedLength+ie.packedLength+5;nV.pack=function(e,t,n){return n=n??0,ae.pack(e._rectangle,t,n),n+=ae.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 Abe=new ae,Zbe=ie.clone(ie.UNIT_SPHERE),tV={rectangle:Abe,ellipsoid:Zbe,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};nV.unpack=function(e,t,n){t=t??0;let i=ae.unpack(e,t,Abe);t+=ae.packedLength;let o=ie.unpack(e,t,Zbe);t+=ie.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],d=e[t];return l(n)?(n._rectangle=ae.clone(i,n._rectangle),n._ellipsoid=ie.clone(o,n._ellipsoid),n._surfaceHeight=s,n._rotation=a,n._extrudedHeight=c,n._offsetAttribute=d===-1?void 0:d,n):(tV.granularity=r,tV.height=s,tV.rotation=a,tV.extrudedHeight=c,tV.offsetAttribute=d===-1?void 0:d,new nV(tV))};var Xit=new pe;nV.createGeometry=function(e){let t=e._rectangle,n=e._ellipsoid,i=ga.computeOptions(t,e._granularity,e._rotation,0,Iit,Xit),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=Pit(e,i),l(e._offsetAttribute)){let p=o.attributes.position.values.length/3,b=new Uint8Array(p);e._offsetAttribute===dn.TOP?b=b.fill(1,0,p/2):(d=e._offsetAttribute===dn.NONE?0:1,b=b.fill(d)),o.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:b})}let u=de.fromRectangle3D(t,n,s,vit),h=de.fromRectangle3D(t,n,a,Wit);r=de.union(u,h)}else{if(o=Sbe(e,i),o.attributes.position.values=Si.scaleToGeodeticHeight(o.attributes.position.values,s,n,!1),l(e._offsetAttribute)){let u=o.attributes.position.values.length;d=e._offsetAttribute===dn.NONE?0:1;let h=new Uint8Array(u/3).fill(d);o.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}r=de.fromRectangle3D(t,n,s)}return new ft({attributes:o.attributes,indices:o.indices,primitiveType:ve.LINES,boundingSphere:r,offsetAttribute:e._offsetAttribute})};var eS=nV;function oV(e){this.rectangle=ae.clone(e.rectangle),this.minimumHeight=e.minimumHeight??0,this.maximumHeight=e.maximumHeight??0,this.southwestCornerCartesian=new m,this.northeastCornerCartesian=new m,this.westNormal=new m,this.southNormal=new m,this.eastNormal=new m,this.northNormal=new m;let t=e.ellipsoid??ie.WGS84;kit(this,e.rectangle,t),this._orientedBoundingBox=void 0,this._boundingSphere=void 0,(e.computeBoundingVolumes??!0)&&this.computeBoundingVolumes(t)}Object.defineProperties(oV.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});oV.prototype.computeBoundingVolumes=function(e){this._orientedBoundingBox=$t.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,e),this._boundingSphere=de.fromOrientedBoundingBox(this._orientedBoundingBox)};var Cbe=new m,MD=new m,Vbe=new m,Nit=new m,Yit=new m,wit=new m,Mit=new m,Bm=new pe,Rbe=new nn(m.UNIT_X,0),iV=new gn;function kit(e,t,n){n.cartographicToCartesian(ae.southwest(t),e.southwestCornerCartesian),n.cartographicToCartesian(ae.northeast(t),e.northeastCornerCartesian),Bm.longitude=t.west,Bm.latitude=(t.south+t.north)*.5,Bm.height=0;let i=n.cartographicToCartesian(Bm,wit),o=m.cross(i,m.UNIT_Z,Nit);m.normalize(o,e.westNormal),Bm.longitude=t.east;let r=n.cartographicToCartesian(Bm,Mit),s=m.cross(m.UNIT_Z,r,Cbe);m.normalize(s,e.eastNormal);let a=m.subtract(i,r,Cbe);m.magnitude(a)===0&&(a=m.clone(o,a));let c=m.normalize(a,Yit),d=t.south,u;if(d>0){Bm.longitude=(t.west+t.east)*.5,Bm.latitude=d;let y=n.cartographicToCartesian(Bm,iV.origin);m.clone(c,iV.direction);let _=nn.fromPointNormal(e.southwestCornerCartesian,e.westNormal,Rbe);ai.rayPlane(iV,_,e.southwestCornerCartesian),u=n.geodeticSurfaceNormal(y,MD)}else u=n.geodeticSurfaceNormalCartographic(ae.southeast(t),MD);let h=m.cross(u,a,Vbe);m.normalize(h,e.southNormal);let p=t.north,b;if(p<0){Bm.longitude=(t.west+t.east)*.5,Bm.latitude=p;let y=n.cartographicToCartesian(Bm,iV.origin);m.negate(c,iV.direction);let _=nn.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,Rbe);ai.rayPlane(iV,_,e.northeastCornerCartesian),b=n.geodeticSurfaceNormal(y,MD)}else b=n.geodeticSurfaceNormalCartographic(ae.northwest(t),MD);let f=m.cross(a,b,Vbe);m.normalize(f,e.northNormal)}var Uit=new m,Dit=new m,Oit=new m(0,-1,0),Bit=new m(0,0,-1),Ebe=new m;function zit(e,t){let n=t.camera,i=n.positionWC,o=n.positionCartographic,r=0;if(!ae.contains(e.rectangle,o)){let d=e.southwestCornerCartesian,u=e.northeastCornerCartesian,h=e.westNormal,p=e.southNormal,b=e.eastNormal,f=e.northNormal;t.mode!==re.SCENE3D&&(d=t.mapProjection.project(ae.southwest(e.rectangle),Uit),d.z=d.y,d.y=d.x,d.x=0,u=t.mapProjection.project(ae.northeast(e.rectangle),Dit),u.z=u.y,u.y=u.x,u.x=0,h=Oit,b=m.UNIT_Y,p=Bit,f=m.UNIT_Z);let y=m.subtract(i,d,Ebe),_=m.dot(y,h),S=m.dot(y,p),A=m.subtract(i,u,Ebe),Z=m.dot(A,b),V=m.dot(A,f);_>0?r+=_*_:Z>0&&(r+=Z*Z),S>0?r+=S*S:V>0&&(r+=V*V)}let s,a,c;if(t.mode===re.SCENE3D?(s=o.height,a=e.minimumHeight,c=e.maximumHeight):(s=i.x,a=0,c=0),s>c){let d=s-c;r+=d*d}else if(s<a){let d=a-s;r+=d*d}return Math.sqrt(r)}oV.prototype.distanceToCamera=function(e){let t=zit(this,e);if(e.mode===re.SCENE3D&&l(this._orientedBoundingBox)){let n=Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC));return Math.max(t,n)}return t};oV.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)};oV.prototype.createDebugVolume=function(e){let t=F.clone(F.IDENTITY),n=new eS({rectangle:this.rectangle,height:this.minimumHeight,extrudedHeight:this.maximumHeight}),i=new Wt({geometry:n,id:"outline",modelMatrix:t,attributes:{color:Ht.fromColor(e)}});return new Ln({geometryInstances:i,appearance:new hn({translucent:!1,flat:!0}),asynchronous:!1})};var Au=oV;var Oli=x(T(),1);var Rli=x(T(),1);var dli=x(T(),1);var eX={},Hit=new m,Gbe=new m,Lbe=new m,Wbe=new m,vbe=new $t;eX.validOutline=function(e){let n=$t.fromPoints(e,vbe).halfAxes,i=q.getColumn(n,0,Gbe),o=q.getColumn(n,1,Lbe),r=q.getColumn(n,2,Wbe),s=m.magnitude(i),a=m.magnitude(o),c=m.magnitude(r);return!(s===0&&(a===0||c===0)||a===0&&c===0)};eX.computeProjectTo2DArguments=function(e,t,n,i){let o=$t.fromPoints(e,vbe),r=o.halfAxes,s=q.getColumn(r,0,Gbe),a=q.getColumn(r,1,Lbe),c=q.getColumn(r,2,Wbe),d=m.magnitude(s),u=m.magnitude(a),h=m.magnitude(c),p=Math.min(d,u,h);if(d===0&&(u===0||h===0)||u===0&&h===0)return!1;let b,f;return(p===u||p===h)&&(b=s),p===d?b=a:p===h&&(f=a),(p===d||p===u)&&(f=c),m.normalize(b,n),m.normalize(f,i),m.clone(o.center,t),!0};function Fbe(e,t,n,i,o){let r=m.subtract(e,t,Hit),s=m.dot(n,r),a=m.dot(i,r);return M.fromElements(s,a,o)}eX.createProjectPointsTo2DFunction=function(e,t,n){return function(i){let o=new Array(i.length);for(let r=0;r<i.length;r++)o[r]=Fbe(i[r],e,t,n);return o}};eX.createProjectPointTo2DFunction=function(e,t,n){return function(i,o){return Fbe(i,e,t,n,o)}};var kb=eX;function Kit(e){let t=e.length,n=new Float64Array(t*3),i=Me.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 bn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:n})});return new ft({attributes:s,indices:i,primitiveType:ve.LINES})}function tS(e){e=e??B.EMPTY_OBJECT;let t=e.polygonHierarchy;this._polygonHierarchy=t,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=Qn.computeHierarchyPackedLength(t,m)+1}tS.fromPositions=function(e){e=e??B.EMPTY_OBJECT;let t={polygonHierarchy:{positions:e.positions}};return new tS(t)};tS.pack=function(e,t,n){return n=n??0,n=Qn.packPolygonHierarchy(e._polygonHierarchy,t,n,m),t[n]=e.packedLength,t};var Jit={polygonHierarchy:{}};tS.unpack=function(e,t,n){t=t??0;let i=Qn.unpackPolygonHierarchy(e,t,m);t=i.startingIndex,delete i.startingIndex;let o=e[t];return l(n)||(n=new tS(Jit)),n._polygonHierarchy=i,n.packedLength=o,n};tS.createGeometry=function(e){let t=e._polygonHierarchy,n=t.positions;if(n=Yo(n,m.equalsEpsilon,!0),n.length<3||!kb.validOutline(n))return;let o=Qn.polygonOutlinesFromHierarchy(t,!1);if(o.length===0)return;let r=[];for(let c=0;c<o.length;c++){let d=new Wt({geometry:Kit(o[c])});r.push(d)}let s=Un.combineInstances(r)[0],a=de.fromPoints(t.positions);return new ft({attributes:s.attributes,indices:s.indices,primitiveType:s.primitiveType,boundingSphere:a})};var zm=tS;var kD=new pe;function tX(e){let t=ob.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=oot(t,n,i,o);this._boundingPlanes=r;let s=cot(r);this._vertices=s,this._edgeNormals=new Array(6),this._edgeNormals[0]=E8(r[0],s.slice(0,4));let a;for(a=0;a<4;a++)this._edgeNormals[0][a]=m.negate(this._edgeNormals[0][a],this._edgeNormals[0][a]);for(this._edgeNormals[1]=E8(r[1],s.slice(4,8)),a=0;a<4;a++)this._edgeNormals[2+a]=E8(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();kD=o.cartesianToCartographic(c,kD),kD.height=(i+n)/2,this.center=o.cartographicToCartesian(kD,c),this._boundingSphere=de.fromPoints(s)}var jit=new m,Qit=new pe,qit=new m,$it=new pe,eot=new m,tot=new m,not=new m,iot=new m;function oot(e,t,n,i){let o=new Array(6),r=e.getCenter(),s=i.geodeticSurfaceNormal(r,jit),a=i.cartesianToCartographic(r,Qit);a.height=n;let c=i.cartographicToCartesian(a,qit),d=nn.fromPointNormal(c,s);o[0]=d;let u=0,h,p=[],b,f;for(h=0;h<4;h++){b=e.getVertex(h),p[h]=b,f=i.cartesianToCartographic(b,$it),f.height=t;let _=nn.getPointDistance(d,i.cartographicToCartesian(f,eot));_<u&&(u=_)}let y=nn.clone(d);for(y.normal=m.negate(y.normal,y.normal),y.distance=y.distance*-1+u,o[1]=y,h=0;h<4;h++){b=p[h];let _=p[(h+1)%4],S=i.geodeticSurfaceNormal(b,tot),A=m.subtract(_,b,iot),Z=m.cross(A,S,not);Z=m.normalize(Z,Z),o[2+h]=nn.fromPointNormal(b,Z)}return o}var nS=new m,iS=new m,oS=new m,_8=new m,S8=new m,A8=new m,rot=new m,sot=new m,aot=new m,Z8=new m,C8=new m,V8=new m,Qy=new m,Fp=new q;function Ibe(e,t,n){nS=e.normal,iS=t.normal,oS=n.normal,_8=m.multiplyByScalar(e.normal,-e.distance,_8),S8=m.multiplyByScalar(t.normal,-t.distance,S8),A8=m.multiplyByScalar(n.normal,-n.distance,A8),Z8=m.multiplyByScalar(m.cross(iS,oS,rot),m.dot(_8,nS),Z8),C8=m.multiplyByScalar(m.cross(oS,nS,sot),m.dot(S8,iS),C8),V8=m.multiplyByScalar(m.cross(nS,iS,aot),m.dot(A8,oS),V8),Fp[0]=nS.x,Fp[1]=iS.x,Fp[2]=oS.x,Fp[3]=nS.y,Fp[4]=iS.y,Fp[5]=oS.y,Fp[6]=nS.z,Fp[7]=iS.z,Fp[8]=oS.z;let i=q.determinant(Fp);return Qy=m.add(Z8,C8,Qy),Qy=m.add(Qy,V8,Qy),new m(Qy.x/i,Qy.y/i,Qy.z/i)}function cot(e){let t=new Array(8);for(let n=0;n<4;n++)t[n]=Ibe(e[0],e[2+(n+3)%4],e[2+n%4]),t[n+4]=Ibe(e[1],e[2+(n+3)%4],e[2+n%4]);return t}var R8=new m,rV=new m;function E8(e,t){let n=[];for(let i=0;i<4;i++)R8=m.subtract(t[(i+1)%4],t[i],R8),rV=m.cross(e.normal,R8,rV),rV=m.normalize(rV,rV),n[i]=m.clone(rV);return n}Object.defineProperties(tX.prototype,{boundingVolume:{get:function(){return this}},boundingSphere:{get:function(){return this._boundingSphere}}});var G8=new m;tX.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=L8(nn.projectPointOntoPlane(c,t,G8),i[0],c,o),m.distance(a,t);if(n.length===2){if(n[0]===0){let p=[this._vertices[4*n[0]+(n[1]-2)],this._vertices[4*n[0]+(n[1]-2+1)%4]];return a=Pbe(t,p[0],p[1]),m.distance(a,t)}let u=Number.MAX_VALUE,h;for(r=0;r<2;r++)c=this._boundingPlanes[n[r]],a=L8(nn.projectPointOntoPlane(c,t,G8),i[r],c,this._edgeNormals[n[r]]),h=m.distanceSquared(a,t),h<u&&(u=h);return Math.sqrt(u)}else if(n.length>3)return a=L8(nn.projectPointOntoPlane(this._boundingPlanes[1],t,G8),this._planeVertices[1],this._boundingPlanes[1],this._edgeNormals[1]),m.distance(a,t);let d=n[1]===2&&n[2]===5?0:1;return n[0]===0?m.distance(t,this._vertices[(n[1]-2+d)%4]):m.distance(t,this._vertices[4+(n[1]-2+d)%4])};var lot=new m,dot=new m;function Pbe(e,t,n){let i=m.subtract(n,t,lot),o=m.subtract(e,t,dot),r=m.dot(i,o);if(r<=0)return t;let s=m.dot(i,i);return r>=s?n:(r=r/s,new m((1-r)*t.x+r*n.x,(1-r)*t.y+r*n.y,(1-r)*t.z+r*n.z))}var uot=new nn(m.UNIT_X,0);function L8(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],uot);nn.getPointDistance(d,e)<0||(a=Pbe(e,t[c],t[(c+1)%4]),r=m.distance(e,a),r<o&&(o=r,s=a))}return l(s)?s:e}tX.prototype.intersectPlane=function(e){let t=0,n=0;for(let i=0;i<this._vertices.length;i++)m.dot(e.normal,this._vertices[i])+e.distance<0?n++:t++;return t===this._vertices.length?zt.INSIDE:n===this._vertices.length?zt.OUTSIDE:zt.INTERSECTING};tX.prototype.createDebugVolume=function(e){let t=F.clone(F.IDENTITY),n=new zm({polygonHierarchy:{positions:this._planeVertices[0]}}),i=zm.createGeometry(n),o=new Wt({geometry:i,id:"outline",modelMatrix:t,attributes:{color:Ht.fromColor(e)}}),r=new zm({polygonHierarchy:{positions:this._planeVertices[1]}}),s=zm.createGeometry(r),a=new Wt({geometry:s,id:"outline",modelMatrix:t,attributes:{color:Ht.fromColor(e)}}),c=[];for(let d=0;d<4;d++){let u=new zm({polygonHierarchy:{positions:this._planeVertices[2+d]}}),h=zm.createGeometry(u);c[d]=new Wt({geometry:h,id:"outline",modelMatrix:t,attributes:{color:Ht.fromColor(e)}})}return new Ln({geometryInstances:[c[0],c[1],c[2],c[3],a,o],appearance:new hn({translucent:!1,flat:!0}),asynchronous:!1})};var nX=tX;var _di=x(T(),1);var ddi=x(T(),1);var rdi=x(T(),1);var mot=new m(1,1,1),UD=Math.cos,DD=Math.sin;function sV(e){e=e??B.EMPTY_OBJECT;let t=e.radii??mot,n=e.innerRadii??t,i=e.minimumClock??0,o=e.maximumClock??W.TWO_PI,r=e.minimumCone??0,s=e.maximumCone??W.PI,a=Math.round(e.stackPartitions??10),c=Math.round(e.slicePartitions??8),d=Math.round(e.subdivisions??128);this._radii=m.clone(t),this._innerRadii=m.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._subdivisions=d,this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}sV.packedLength=2*m.packedLength+8;sV.pack=function(e,t,n){return n=n??0,m.pack(e._radii,t,n),n+=m.packedLength,m.pack(e._innerRadii,t,n),n+=m.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n++]=e._subdivisions,t[n]=e._offsetAttribute??-1,t};var Xbe=new m,Nbe=new m,Ub={radii:Xbe,innerRadii:Nbe,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};sV.unpack=function(e,t,n){t=t??0;let i=m.unpack(e,t,Xbe);t+=m.packedLength;let o=m.unpack(e,t,Nbe);t+=m.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],h=e[t++],p=e[t];return l(n)?(n._radii=m.clone(i,n._radii),n._innerRadii=m.clone(o,n._innerRadii),n._minimumClock=r,n._maximumClock=s,n._minimumCone=a,n._maximumCone=c,n._stackPartitions=d,n._slicePartitions=u,n._subdivisions=h,n._offsetAttribute=p===-1?void 0:p,n):(Ub.minimumClock=r,Ub.maximumClock=s,Ub.minimumCone=a,Ub.maximumCone=c,Ub.stackPartitions=d,Ub.slicePartitions=u,Ub.subdivisions=h,Ub.offsetAttribute=p===-1?void 0:p,new sV(Ub))};sV.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._subdivisions,c=ie.fromCartesian3(t),d=e._slicePartitions+1,u=e._stackPartitions+1;d=Math.round(d*Math.abs(o-i)/W.TWO_PI),u=Math.round(u*Math.abs(s-r)/W.PI),d<2&&(d=2),u<2&&(u=2);let h=0,p=1,b=n.x!==t.x||n.y!==t.y||n.z!==t.z,f=!1,y=!1;b&&(p=2,r>0&&(f=!0,h+=d),s<Math.PI&&(y=!0,h+=d));let _=a*p*(u+d),S=new Float64Array(_*3),A=2*(_+h-(d+u)*p),Z=Me.createTypedArray(_,A),V,E,L,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]=DD(v),N[V]=UD(v);let g=new Array(a),C=new Array(a);for(V=0;V<a;V++)L=i+V*(o-i)/(a-1),g[V]=DD(L),C[V]=UD(L);for(V=0;V<u;V++)for(E=0;E<a;E++)S[I++]=t.x*X[V]*C[E],S[I++]=t.y*X[V]*g[E],S[I++]=t.z*N[V];if(b)for(V=0;V<u;V++)for(E=0;E<a;E++)S[I++]=n.x*X[V]*C[E],S[I++]=n.y*X[V]*g[E],S[I++]=n.z*N[V];for(X.length=a,N.length=a,V=0;V<a;V++)v=r+V*(s-r)/(a-1),X[V]=DD(v),N[V]=UD(v);for(g.length=d,C.length=d,V=0;V<d;V++)L=i+V*(o-i)/(d-1),g[V]=DD(L),C[V]=UD(L);for(V=0;V<a;V++)for(E=0;E<d;E++)S[I++]=t.x*X[V]*C[E],S[I++]=t.y*X[V]*g[E],S[I++]=t.z*N[V];if(b)for(V=0;V<a;V++)for(E=0;E<d;E++)S[I++]=n.x*X[V]*C[E],S[I++]=n.y*X[V]*g[E],S[I++]=n.z*N[V];for(I=0,V=0;V<u*p;V++){let P=V*a;for(E=0;E<a-1;E++)Z[I++]=P+E,Z[I++]=P+E+1}let R=u*a*p;for(V=0;V<d;V++)for(E=0;E<a-1;E++)Z[I++]=R+V+E*d,Z[I++]=R+V+(E+1)*d;if(b)for(R=u*a*p+d*a,V=0;V<d;V++)for(E=0;E<a-1;E++)Z[I++]=R+V+E*d,Z[I++]=R+V+(E+1)*d;if(b){let P=u*a*p,Y=P+a*d;if(f)for(V=0;V<d;V++)Z[I++]=P+V,Z[I++]=Y+V;if(y)for(P+=a*d-d,Y+=a*d-d,V=0;V<d;V++)Z[I++]=P+V,Z[I++]=Y+V}let G=new bn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:S})});if(l(e._offsetAttribute)){let P=S.length,Y=e._offsetAttribute===dn.NONE?0:1,O=new Uint8Array(P/3).fill(Y);G.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:O})}return new ft({attributes:G,indices:Z,primitiveType:ve.LINES,boundingSphere:de.fromEllipsoid(c),offsetAttribute:e._offsetAttribute})};var Zu=sV;function aV(e){let t=e.radius??1,i={radii:new m(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,subdivisions:e.subdivisions};this._ellipsoidGeometry=new Zu(i),this._workerName="createSphereOutlineGeometry"}aV.packedLength=Zu.packedLength;aV.pack=function(e,t,n){return Zu.pack(e._ellipsoidGeometry,t,n)};var hot=new Zu,rS={radius:void 0,radii:new m,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};aV.unpack=function(e,t,n){let i=Zu.unpack(e,t,hot);return rS.stackPartitions=i._stackPartitions,rS.slicePartitions=i._slicePartitions,rS.subdivisions=i._subdivisions,l(n)?(m.clone(i._radii,rS.radii),n._ellipsoidGeometry=new Zu(rS),n):(rS.radius=i._radii.x,new aV(rS))};aV.createGeometry=function(e){return Zu.createGeometry(e._ellipsoidGeometry)};var Db=aV;function cV(e,t){t===0&&(t=W.EPSILON7),this._boundingSphere=new de(e,t)}Object.defineProperties(cV.prototype,{center:{get:function(){return this._boundingSphere.center}},radius:{get:function(){return this._boundingSphere.radius}},boundingVolume:{get:function(){return this._boundingSphere}},boundingSphere:{get:function(){return this._boundingSphere}}});cV.prototype.distanceToCamera=function(e){let t=this._boundingSphere;return Math.max(0,m.distance(t.center,e.camera.positionWC)-t.radius)};cV.prototype.intersectPlane=function(e){return de.intersectPlane(this._boundingSphere,e)};cV.prototype.update=function(e,t){m.clone(e,this._boundingSphere.center),this._boundingSphere.radius=t};cV.prototype.createDebugVolume=function(e){let t=new Db({radius:this.radius}),n=F.fromTranslation(this.center,F.clone(F.IDENTITY)),i=new Wt({geometry:t,id:"outline",modelMatrix:n,attributes:{color:Ht.fromColor(e)}});return new Ln({geometryInstances:i,appearance:new hn({translucent:!1,flat:!0}),asynchronous:!1})};var Ob=cV;var Idi=x(T(),1);var fot=new m,pot=new m,bot=new m,got=new m;function sS(e,t,n){n=m.cross(e,t,n);let i=m.magnitude(n);return m.multiplyByScalar(n,W.EPSILON7/i,n)}function W8(e,t){let n=m.normalize(e,got),i=m.equalsEpsilon(n,m.UNIT_X,W.EPSILON6)?m.UNIT_Y:m.UNIT_X;return sS(e,i,t)}function Ybe(e){let t=q.getColumn(e,0,fot),n=q.getColumn(e,1,pot),i=q.getColumn(e,2,bot),o=m.equals(t,m.ZERO),r=m.equals(n,m.ZERO),s=m.equals(i,m.ZERO);return!o&&!r&&!s?e:o&&r&&s?(e[0]=W.EPSILON7,e[4]=W.EPSILON7,e[8]=W.EPSILON7,e):(o&&!r&&!s?t=sS(n,i,t):!o&&r&&!s?n=sS(t,i,n):!o&&!r&&s?i=sS(n,t,i):o?r?s||(t=W8(i,t),n=sS(i,t,n)):(t=W8(n,t),i=sS(n,t,i)):(n=W8(t,n),i=sS(n,t,i)),q.setColumn(e,0,t,e),q.setColumn(e,1,n,e),q.setColumn(e,2,i,e),e)}function lV(e,t){t=Ybe(t),this._orientedBoundingBox=new $t(e,t),this._boundingSphere=de.fromOrientedBoundingBox(this._orientedBoundingBox)}Object.defineProperties(lV.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}});lV.prototype.distanceToCamera=function(e){return Math.sqrt(this._orientedBoundingBox.distanceSquaredTo(e.camera.positionWC))};lV.prototype.intersectPlane=function(e){return this._orientedBoundingBox.intersectPlane(e)};lV.prototype.update=function(e,t){m.clone(e,this._orientedBoundingBox.center),t=Ybe(t),q.clone(t,this._orientedBoundingBox.halfAxes),de.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere)};lV.prototype.createDebugVolume=function(e){let t=new Ih({minimum:new m(-1,-1,-1),maximum:new m(1,1,1)}),n=F.fromRotationTranslation(this.boundingVolume.halfAxes,this.boundingVolume.center),i=new Wt({geometry:t,id:"outline",modelMatrix:n,attributes:{color:Ht.fromColor(e)}});return new Ln({geometryInstances:i,appearance:new hn({translucent:!1,flat:!0}),asynchronous:!1})};var Pd=lV;function Ar(e,t,n,i){this._tileset=e,this._header=n;let o=l(n.contents),r=o&&n.contents.length>1||_i(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=QP(e,n),this._verticalExaggeration=1,this._verticalExaggerationRelativeHeight=0,this._boundingVolume=this.createBoundingVolume(n.boundingVolume,c),this._boundingVolume2D=void 0;let u;l(s)&&l(s.boundingVolume)&&(u=this.createBoundingVolume(s.boundingVolume,c)),this._contentBoundingVolume=u,this._contentBoundingVolume2D=void 0;let h;l(n.viewerRequestVolume)&&(h=this.createBoundingVolume(n.viewerRequestVolume,c)),this._viewerRequestVolume=h,this.geometricError=n.geometricError,this._geometricError=n.geometricError,l(this._geometricError)||(this._geometricError=l(i)?i._geometricError:e._geometricError,Ar._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")&&Ar._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=dr.UNLOADED,_=t.clone();else if(l(s)){let E=s.uri;l(s.url)&&(Ar._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),E=s.url),E===""?(Ar._deprecationWarning("contentUriEmpty","content.uri property is an empty string, which creates a circular dependency, making this tileset invalid. Omit the content property instead"),b=new eV(e,this),f=!0,y=dr.READY):(y=dr.UNLOADED,_=t.getDerivedResource({url:E}),S=Mc.getServerKey(_.getUrlComponent()))}else b=new eV(e,this),f=!0,y=dr.READY;this._content=b,this._contentResource=_,this._contentState=y,this._expiredContent=void 0,this._serverKey=S,this.hasEmptyContent=f,this.hasTilesetContent=!1,this.hasImplicitContent=!1,this.hasRenderableContent=!f,this.hasImplicitContentMetadata=!1,this.hasMultipleContents=r,this.cacheNode=void 0;let A=n.expire,Z,V;l(A)&&(Z=A.duration,l(A.date)&&(V=Q.fromIso8601(A.date))),this.expireDuration=Z,this.expireDate=V,this.lastStyleTime=0,this._optimChildrenWithinParent=Um.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}Ar._deprecationWarning=La;Object.defineProperties(Ar.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===dr.READY}},contentUnloaded:{get:function(){return this._contentState===dr.UNLOADED}},hasUnloadedRenderableContent:{get:function(){return this.hasRenderableContent&&this.contentUnloaded}},contentExpired:{get:function(){return this._contentState===dr.EXPIRED}},contentFailed:{get:function(){return this._contentState===dr.FAILED}},commandsLength:{get:function(){return this._commandsLength}}});var qy=new m;function yot(e,t){let{tileset:n,boundingSphere:i}=e,{radius:o,center:r}=i,{camera:s}=t,a=m.multiplyByScalar(s.directionWC,e._centerZDepth,qy),c=m.add(s.positionWC,a,qy),d=m.subtract(c,r,qy);if(m.magnitude(d)>o){let V=m.normalize(d,qy),E=m.multiplyByScalar(V,o,qy),L=m.add(r,E,qy),v=m.subtract(L,s.positionWC,qy),I=m.normalize(v,qy);e._foveatedFactor=1-Math.abs(m.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===er.PRELOAD_FLIGHT||n._pass===er.PRELOAD)return!1;let f=1-Math.cos(s.frustum.fov*.5),y=n.foveatedConeSize*f;if(e._foveatedFactor<=y)return!1;let _=f-y,S=W.clamp((e._foveatedFactor-y)/_,0,1),A=n.foveatedInterpolationCallback(n.foveatedMinimumScreenSpaceErrorRelaxation,n.memoryAdjustedScreenSpaceError,S),Z=e._screenSpaceError===0&&l(e.parent)?e.parent._screenSpaceError*.5:e._screenSpaceError;return n.memoryAdjustedScreenSpaceError-A<=Z}var Dbe=new Q;Ar.prototype.getScreenSpaceError=function(e,t,n){let i=this._tileset,o=n??1,r=l(this.parent)?this.parent.geometricError:i._scaledGeometricError,s=t?r:this.geometricError;if(s===0)return 0;let{camera:a,context:c}=e,d=a.frustum,u=c.drawingBufferWidth,h=c.drawingBufferHeight*o,p;if(e.mode===re.SCENE2D||d instanceof mn){let b=d.offCenterFrustum;l(b)&&(d=b);let f=Math.max(d.top-d.bottom,d.right-d.left)/Math.max(u,h);p=s/f}else{let b=Math.max(this._distanceToCamera,W.EPSILON7),f=d.sseDenominator;if(p=s*h/(b*f),i.dynamicScreenSpaceError){let y=i._dynamicScreenSpaceErrorComputedDensity,_=i.dynamicScreenSpaceErrorFactor,S=W.fog(b,y)*_;p-=S}}return p/=e.pixelRatio,p};function xot(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 Tot(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}Ar.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:Os.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!==Os.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=Tot(n,this),this._priorityProgressiveResolution=xot(n,this),this.priorityDeferred=yot(this,e),this._updatedVisibilityFrame=n._updatedVisibilityFrame};Ar.prototype.updateExpiration=function(){if(l(this.expireDate)&&this.contentReady&&!this.hasEmptyContent&&!this.hasMultipleContents){let e=Q.now(Dbe);Q.lessThan(this.expireDate,e)&&(this._contentState=dr.EXPIRED,this._expiredContent=this._content)}};function _ot(e){if(!l(e.expireDuration))return;let t=Q.now(Dbe);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 Sot(e){return function(){return e._priority}}Ar.prototype.requestContent=function(){if(!this.hasEmptyContent)return this.hasMultipleContents?Aot(this):Cot(this)};function Aot(e){let t=e._content,n=e._tileset;if(!l(t)){let o=_i(e._header,"3DTILES_multiple_contents")?e._header.extensions["3DTILES_multiple_contents"]:e._header;t=new qP(n,e,e._contentResource.clone(),o),e._content=t}let i=t.requestInnerContents();if(l(i))return e._contentState=dr.LOADING,i.then(o=>{if(!e.isDestroyed()&&l(o))return e._contentState=dr.PROCESSING,t}).catch(o=>{if(!e.isDestroyed())throw e._contentState=dr.FAILED,o})}async function Zot(e,t,n,i,o){let r=e._contentState;e._contentState=dr.LOADING,++t.statistics.numberOfPendingRequests;let s;try{s=await o}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;if(n.cancelled||n.state===ui.CANCELLED){e._contentState=r,++t.statistics.numberOfAttemptedRequests;return}throw e._contentState=dr.FAILED,a}if(e.isDestroyed()){--t.statistics.numberOfPendingRequests;return}if(n.cancelled||n.state===ui.CANCELLED){e._contentState=r,--t.statistics.numberOfPendingRequests,++t.statistics.numberOfAttemptedRequests;return}try{let a=await Vot(e,s);return--t.statistics.numberOfPendingRequests,e.isDestroyed()?void 0:(i&&(e.expireDate=void 0),e._content=a,e._contentState=dr.PROCESSING,a)}catch(a){if(--t.statistics.numberOfPendingRequests,e.isDestroyed())return;throw e._contentState=dr.FAILED,a}}function Cot(e){let t=e._contentResource.clone(),n=e.contentExpired;n&&t.setQueryParameters({expired:e.expireDate.toString()});let i=new fr({throttle:!0,throttleByServer:!0,type:ks.TILES3D,priorityFunction:Sot(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 Zot(e,o,i,n,r)}async function Vot(e,t){let n=Mb(t),i=e._tileset;i._disableSkipLevelOfDetail=i._disableSkipLevelOfDetail||n.contentType===pa.GEOMETRY||n.contentType===pa.VECTOR,(n.contentType===pa.IMPLICIT_SUBTREE||n.contentType===pa.IMPLICIT_SUBTREE_JSON)&&(e.hasImplicitContent=!0,e.hasRenderableContent=!1),n.contentType===pa.EXTERNAL_TILESET&&(e.hasTilesetContent=!0,e.hasRenderableContent=!1);let o,r=Q_[n.contentType];if(e.isDestroyed())return;l(n.binaryPayload)?o=await Promise.resolve(r(i,e,e._contentResource,n.binaryPayload.buffer,0)):o=await Promise.resolve(r(i,e,e._contentResource,n.jsonPayload));let s=e._contentHeader;if(e.hasImplicitContentMetadata){let c=e.implicitSubtree,d=e.implicitCoordinates;o.metadata=c.getContentMetadataView(d,0)}else e.hasImplicitContent||(o.metadata=q_(i,s));let a=$_(i,s);return l(a)&&(o.group=new $T({metadata:a})),o}Ar.prototype.cancelRequests=function(){this.hasMultipleContents?this._content.cancelRequests():this._request.cancel()};Ar.prototype.unloadContent=function(){this.hasRenderableContent&&(this._content=this._content&&this._content.destroy(),this._contentState=dr.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 Obe=new de;function F8(e,t){if(t.mode!==re.SCENE3D&&!l(e._boundingVolume2D)){let n=e._boundingVolume.boundingSphere,i=de.projectTo2D(n,t.mapProjection,Obe);e._boundingVolume2D=new Ob(i.center,i.radius)}return t.mode!==re.SCENE3D?e._boundingVolume2D:e._boundingVolume}function Rot(e,t){if(t.mode!==re.SCENE3D&&!l(e._contentBoundingVolume2D)){let n=e._contentBoundingVolume.boundingSphere,i=de.projectTo2D(n,t.mapProjection,Obe);e._contentBoundingVolume2D=new Ob(i.center,i.radius)}return t.mode!==re.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}Ar.prototype.visibility=function(e,t){let n=e.cullingVolume,i=F8(this,e),o=this._tileset,r=o.clippingPlanes;if(l(r)&&r.enabled){let a=r.computeIntersectionWithBoundingVolume(i,o.clippingPlanesOriginMatrix);if(this._isClipped=a!==zt.INSIDE,a===zt.OUTSIDE)return Os.MASK_OUTSIDE}let s=o.clippingPolygons;if(l(s)&&s.enabled){let a=s.computeIntersectionWithBoundingVolume(i);this._isClippedByPolygon=a!==zt.OUTSIDE}return n.computeVisibilityWithPlaneMask(i,t)};Ar.prototype.contentVisibility=function(e){if(!l(this._contentBoundingVolume))return zt.INSIDE;if(this._visibilityPlaneMask===Os.MASK_INSIDE)return zt.INSIDE;let t=e.cullingVolume,n=Rot(this,e),i=this._tileset,o=i.clippingPlanes;if(l(o)&&o.enabled){let s=o.computeIntersectionWithBoundingVolume(n,i.clippingPlanesOriginMatrix);if(this._isClipped=s!==zt.INSIDE,s===zt.OUTSIDE)return zt.OUTSIDE}let r=i.clippingPolygons;if(l(r)&&r.enabled){let s=r.computeIntersectionWithBoundingVolume(n);if(this._isClippedByPolygon=s!==zt.OUTSIDE,s===zt.INSIDE)return zt.OUTSIDE}return t.computeVisibility(n)};Ar.prototype.distanceToTile=function(e){return F8(this,e).distanceToCamera(e)};var Eot=new m;Ar.prototype.distanceToTileCenter=function(e){let n=F8(this,e).boundingVolume,i=m.subtract(n.center,e.camera.positionWC,Eot);return m.dot(e.camera.directionWC,i)};Ar.prototype.insideViewerRequestVolume=function(e){let t=this._viewerRequestVolume;return!l(t)||t.distanceToCamera(e)===0};var Bbe=new q,zbe=new m,Got=new q,I8=new m,Hbe=new ae,Kbe=new $t,v8=new F;function Lot(e,t,n){let i=m.fromElements(e[0],e[1],e[2],I8),o=q.fromArray(e,3,Got);i=F.multiplyByPoint(t,i,i);let r=F.getMatrix3(t,Bbe);return o=q.multiply(r,o,o),l(n)?(n.update(i,o),n):new Pd(i,o)}function wbe(e,t,n,i){let o=ae.unpack(e,0,Hbe),r=e[4],s=e[5],a=$t.fromRectangle(o,r,s,ie.WGS84,Kbe),c=a.center,d=a.halfAxes;t=F.multiplyTransformation(t,F.inverseTransformation(n,v8),v8),c=F.multiplyByPoint(t,c,c);let u=F.getMatrix3(t,Bbe);return d=q.multiply(u,d,d),l(i)&&i instanceof Pd?(i.update(c,d),i):new Pd(c,d)}function Wot(e,t,n,i){if(!F.equalsEpsilon(t,n,W.EPSILON8))return i instanceof Pd?wbe(e,t,n,i):wbe(e,t,n,void 0);let o=ae.unpack(e,0,Hbe);return i instanceof Au?(i.rectangle=ae.clone(o,i.rectangle),i.minimumHeight=e[4],i.maximumHeight=e[5],i.computeBoundingVolumes(ie.WGS84),i):new Au({rectangle:o,minimumHeight:e[4],maximumHeight:e[5]})}function vot(e,t,n){let i=m.fromElements(e[0],e[1],e[2],I8),o=e[3];i=F.multiplyByPoint(t,i,i);let r=F.getScale(t,zbe),s=m.maximumComponent(r);return o*=s,l(n)?(n.update(i,o),n):new Ob(i,o)}Ar.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 le("boundingVolume must be defined");if(_i(e,"3DTILES_bounding_volume_S2"))return new nX(e.extensions["3DTILES_bounding_volume_S2"]);let{box:r,region:s,sphere:a}=e;if(l(r)){let c=Lot(r,t,n);return this._verticalExaggeration!==1&&Mbe(c,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c}if(l(s)){let c=Wot(s,t,this._initialTransform,n);return this._verticalExaggeration===1||(c instanceof Pd?Mbe(c,this._verticalExaggeration,this._verticalExaggerationRelativeHeight):(c.minimumHeight=ao.getHeight(c.minimumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c.maximumHeight=ao.getHeight(c.maximumHeight,this._verticalExaggeration,this._verticalExaggerationRelativeHeight),c.computeBoundingVolumes(ie.WGS84))),c}if(l(a)){let c=vot(a,t,n);if(this._verticalExaggeration!==1){let d=ao.getPosition(c.center,ie.WGS84,this._verticalExaggeration,this._verticalExaggerationRelativeHeight,I8),u=c.radius*this._verticalExaggeration;c.update(d,u)}return c}throw new le("boundingVolume must contain a sphere, region, or box")};var Fot=m.unpackArray(new Array(24).fill(0));function Mbe(e,t,n){let i=e.boundingVolume.computeCorners(Fot).map(r=>ao.getPosition(r,ie.WGS84,t,n,r)),o=$t.fromPoints(i,Kbe);e.update(o.center,o.halfAxes)}Ar.prototype.updateTransform=function(e,t){e=e??F.IDENTITY;let n=F.multiplyTransformation(e,this.transform,v8),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()};Ar.prototype.updateGeometricErrorScale=function(){let e=F.getScale(this.computedTransform,zbe),t=m.maximumComponent(e);if(this.geometricError=this._geometricError*t,!l(this.parent)){let n=this._tileset;n._scaledGeometricError=n._geometricError*t}};function Iot(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=Ht.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 Pot(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=dr.FAILED,o}}function Xot(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 Not(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)}Ar.prototype.update=function(e,t,n){let{commandList:i}=t,o=i.length;Xot(this,e),Not(this,e),Iot(this,e,t,n),Pot(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 kbe=[];Ar.prototype.process=function(e,t){!this.contentExpired&&!this.contentReady&&this._content.ready&&(_ot(this),this._selectedFrame=0,this.lastStyleTime=0,Q.now(this._loadTimestamp),this._contentState=dr.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=kbe;try{this._content.update(e,t)}catch(i){throw this._contentState=dr.FAILED,i}kbe.length=0,t.commandList=n};function Ube(e,t,n){let i=e*Math.pow(10,t);return parseInt(i)*Math.pow(10,n)}function OD(e,t,n){return Math.max(W.normalize(e,t,n)-W.EPSILON7,0)}Ar.prototype.updatePriority=function(){let e=this.tileset,t=e.preferLeaves,n=e._minimumPriority,i=e._maximumPriority,o=4,r=1,s=0,a=o,c=s+a,d=o,u=c+d,h=r,p=Math.pow(10,u),b=u+h,f=r,y=Math.pow(10,b),_=b+f,S=Math.pow(10,_),A=OD(this._depth,n.depth,i.depth);A=t?1-A:A;let V=!e.isSkippingLevelOfDetail&&this.refine===sr.REPLACE?OD(this._priorityHolder._distanceToCamera,n.distance,i.distance):OD(this._priorityReverseScreenSpaceError,n.reverseScreenSpaceError,i.reverseScreenSpaceError),E=Ube(V,a,s),L=this._priorityProgressiveResolution?0:p,v=OD(this._priorityHolder._foveatedFactor,n.foveatedFactor,i.foveatedFactor),I=Ube(v,d,c),X=this.priorityDeferred?y:0,N=e._pass===er.PRELOAD_FLIGHT?0:S;this._priority=A+E+L+I+X+N};Ar.prototype.isDestroyed=function(){return!1};Ar.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(),me(this)};var Hm=Ar;var Dui=x(T(),1);var vui=x(T(),1);function Bb(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(Bb.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}}});Bb.prototype.hasProperty=function(e){return On.hasProperty(e,this._properties,this._class)};Bb.prototype.hasPropertyBySemantic=function(e){return On.hasPropertyBySemantic(e,this._properties,this._class)};Bb.prototype.getPropertyIds=function(e){return On.getPropertyIds(this._properties,this._class,e)};Bb.prototype.getProperty=function(e){return On.getProperty(e,this._properties,this._class)};Bb.prototype.setProperty=function(e,t){return On.setProperty(e,t,this._properties,this._class)};Bb.prototype.getPropertyBySemantic=function(e){return On.getPropertyBySemantic(e,this._properties,this._class)};Bb.prototype.setPropertyBySemantic=function(e,t){return On.setPropertyBySemantic(e,t,this._properties,this._class)};var dV=Bb;var Nui=x(T(),1);function zb(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(zb.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}});zb.prototype.hasProperty=function(e){return On.hasProperty(e,this._properties,this._class)};zb.prototype.hasPropertyBySemantic=function(e){return On.hasPropertyBySemantic(e,this._properties,this._class)};zb.prototype.getPropertyIds=function(e){return On.getPropertyIds(this._properties,this._class,e)};zb.prototype.getProperty=function(e){return On.getProperty(e,this._properties,this._class)};zb.prototype.setProperty=function(e,t){return On.setProperty(e,t,this._properties,this._class)};zb.prototype.getPropertyBySemantic=function(e){return On.getPropertyBySemantic(e,this._properties,this._class)};zb.prototype.setPropertyBySemantic=function(e,t){return On.setPropertyBySemantic(e,t,this._properties,this._class)};var iX=zb;function Jbe(e){e=e??B.EMPTY_OBJECT;let t=e.metadataJson,n=e.schema,i=t.metadata??t.tileset,o;l(i)&&(o=new iX({tileset:i,class:n.classes[i.class]}));let r=[],s=[],a=t.groups;if(Array.isArray(a)){let c=a.length;for(let d=0;d<c;d++){let u=a[d];s.push(new dV({group:u,class:n.classes[u.class]}))}}else if(l(a)){r=Object.keys(a).sort();let c=r.length;for(let d=0;d<c;d++){let u=r[d];if(a.hasOwnProperty(u)){let h=a[u];s.push(new dV({id:u,group:a[u],class:n.classes[h.class]}))}}}this._schema=n,this._groups=s,this._groupIds=r,this._tileset=o,this._statistics=t.statistics,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(Jbe.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 aS=Jbe;var Jui=x(T(),1);var jbe={},Yot=new m;jbe.checkChildrenWithinParent=function(e){let t=e.children,n=t.length,i=e.boundingVolume;if(i instanceof Pd||i instanceof Au){let o=i._orientedBoundingBox;e._optimChildrenWithinParent=Um.USE_OPTIMIZATION;for(let r=0;r<n;++r){let a=t[r].boundingVolume;if(!(a instanceof Pd||a instanceof Au)){e._optimChildrenWithinParent=Um.SKIP_OPTIMIZATION;break}let c=a._orientedBoundingBox,d=m.subtract(c.center,o.center,Yot),u=m.magnitude(d);m.divideByScalar(d,u,d);let h=Math.abs(o.halfAxes[0]*d.x)+Math.abs(o.halfAxes[1]*d.y)+Math.abs(o.halfAxes[2]*d.z)+Math.abs(o.halfAxes[3]*d.x)+Math.abs(o.halfAxes[4]*d.y)+Math.abs(o.halfAxes[5]*d.z)+Math.abs(o.halfAxes[6]*d.x)+Math.abs(o.halfAxes[7]*d.y)+Math.abs(o.halfAxes[8]*d.z),p=Math.abs(c.halfAxes[0]*d.x)+Math.abs(c.halfAxes[1]*d.y)+Math.abs(c.halfAxes[2]*d.z)+Math.abs(c.halfAxes[3]*d.x)+Math.abs(c.halfAxes[4]*d.y)+Math.abs(c.halfAxes[5]*d.z)+Math.abs(c.halfAxes[6]*d.x)+Math.abs(c.halfAxes[7]*d.y)+Math.abs(c.halfAxes[8]*d.z);if(h<=p+u){e._optimChildrenWithinParent=Um.SKIP_OPTIMIZATION;break}}}return e._optimChildrenWithinParent===Um.USE_OPTIMIZATION};var oX=jbe;var nmi=x(T(),1);var qui=x(T(),1);function rX(){this.head=void 0,this.tail=void 0,this._length=0}Object.defineProperties(rX.prototype,{length:{get:function(){return this._length}}});function wot(e,t,n){this.item=e,this.previous=t,this.next=n}rX.prototype.add=function(e){let t=new wot(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 Qbe(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}rX.prototype.remove=function(e){l(e)&&(Qbe(this,e),--this._length)};rX.prototype.splice=function(e,t){if(e===t)return;Qbe(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 sX=rX;function cS(){this._list=new sX,this._sentinel=this._list.add(),this._trimTiles=!1}cS.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)};cS.prototype.touch=function(e){let t=e.cacheNode;l(t)&&this._list.splice(this._sentinel,t)};cS.prototype.add=function(e){l(e.cacheNode)||(e.cacheNode=this._list.add(e))};cS.prototype.unloadTile=function(e,t,n){let i=t.cacheNode;l(i)&&(this._list.remove(i),t.cacheNode=void 0,n(e,t))};cS.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)}};cS.prototype.trim=function(){this._trimTiles=!0};var aX=cS;var cmi=x(T(),1);function BD(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 X8(e,t){let n;return t==="_loadTimestamp"?n=Q.toDate(e).getTime():n=e,n}BD.prototype.setReferenceMinimumMaximum=function(e,t,n){this._referenceMinimum[n]=X8(e,n),this._referenceMaximum[n]=X8(t,n)};function Mot(e,t){let n=e.tilePropertyName;if(l(n)){let i=X8(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 P8=[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)];BD.prototype.colorize=function(e,t){let n=this.tilePropertyName;if(!l(n)||!e.contentAvailable||e._selectedFrame!==t.frameNumber)return;let i=Mot(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=P8.length-1,u=c*d,h=Math.floor(u),p=Math.ceil(u),b=u-h,f=P8[h],y=P8[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=_};BD.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 cX=BD;var mmi=x(T(),1);function uV(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfPendingRequests=0,this.numberOfTilesProcessing=0,this.numberOfTilesWithContentReady=0,this.numberOfTilesTotal=0,this.numberOfLoadedTilesTotal=0,this.numberOfFeaturesSelected=0,this.numberOfFeaturesLoaded=0,this.numberOfPointsSelected=0,this.numberOfPointsLoaded=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0,this.geometryByteLength=0,this.texturesByteLength=0,this.texturesReferenceCounterById={},this.batchTableByteLength=0}uV.prototype.clear=function(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfFeaturesSelected=0,this.numberOfPointsSelected=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0};uV.prototype.incrementSelectionCounts=function(e){this.numberOfFeaturesSelected+=e.featuresLength,this.numberOfPointsSelected+=e.pointsLength,this.numberOfTrianglesSelected+=e.trianglesLength;let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)this.incrementSelectionCounts(t[i])}};uV.prototype.incrementLoadCounts=function(e){if(this.numberOfFeaturesLoaded+=e.featuresLength,this.numberOfPointsLoaded+=e.pointsLength,this.geometryByteLength+=e.geometryByteLength,this.batchTableByteLength+=e.batchTableByteLength,!(e instanceof xu))this.texturesByteLength+=e.texturesByteLength;else{let n=e.getTextureIds();for(let i of n){let o=this.texturesReferenceCounterById[i]??0;if(o===0){let r=e.getTextureByteLengthById(i);this.texturesByteLength+=r}this.texturesReferenceCounterById[i]=o+1}}let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)this.incrementLoadCounts(t[i])}};uV.prototype.decrementLoadCounts=function(e){if(this.numberOfFeaturesLoaded-=e.featuresLength,this.numberOfPointsLoaded-=e.pointsLength,this.geometryByteLength-=e.geometryByteLength,this.batchTableByteLength-=e.batchTableByteLength,!(e instanceof xu))this.texturesByteLength-=e.texturesByteLength;else{let n=e.getTextureIds();for(let i of n){let o=this.texturesReferenceCounterById[i];if(o===1){delete this.texturesReferenceCounterById[i];let r=e.getTextureByteLengthById(i);this.texturesByteLength-=r}else this.texturesReferenceCounterById[i]=o-1}}let t=e.innerContents;if(l(t)){let n=t.length;for(let i=0;i<n;++i)this.decrementLoadCounts(t[i])}};uV.clone=function(e,t){t.selected=e.selected,t.visited=e.visited,t.numberOfCommands=e.numberOfCommands,t.numberOfAttemptedRequests=e.numberOfAttemptedRequests,t.numberOfPendingRequests=e.numberOfPendingRequests,t.numberOfTilesProcessing=e.numberOfTilesProcessing,t.numberOfTilesWithContentReady=e.numberOfTilesWithContentReady,t.numberOfTilesTotal=e.numberOfTilesTotal,t.numberOfFeaturesSelected=e.numberOfFeaturesSelected,t.numberOfFeaturesLoaded=e.numberOfFeaturesLoaded,t.numberOfPointsSelected=e.numberOfPointsSelected,t.numberOfPointsLoaded=e.numberOfPointsLoaded,t.numberOfTrianglesSelected=e.numberOfTrianglesSelected,t.numberOfTilesStyled=e.numberOfTilesStyled,t.numberOfFeaturesStyled=e.numberOfFeaturesStyled,t.numberOfTilesCulledWithChildrenUnion=e.numberOfTilesCulledWithChildrenUnion,t.geometryByteLength=e.geometryByteLength,t.texturesByteLength=e.texturesByteLength,t.texturesReferenceCounterById={...e.texturesReferenceCounterById},t.batchTableByteLength=e.batchTableByteLength};var gf=uV;var pmi=x(T(),1);function lX(){this._style=void 0,this._styleDirty=!1,this._lastStyleTime=0}Object.defineProperties(lX.prototype,{style:{get:function(){return this._style},set:function(e){e!==this._style&&(this._style=e,this._styleDirty=!0)}}});lX.prototype.makeDirty=function(){this._styleDirty=!0};lX.prototype.resetDirty=function(){this._styleDirty=!1};lX.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 dX=lX;var Ami=x(T(),1);function kot(e,t,n){let i=_i(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)&&!_i(o,"3DTILES_bounding_volume_S2")&&!_i(o,"3DTILES_bounding_volume_cylinder"))throw new le("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=Uot(t);for(let s=0;s<r.length;s++){let a=r[s];this.contentHeaders.push(ze(a,!0));let c=new We({url:a.uri});this.contentUriTemplates.push(c)}this.contentCount=this.contentHeaders.length,this.tileHeader=Dot(t),this.subdivisionScheme=Ws[i.subdivisionScheme],this.branchingFactor=Ws.getBranchingFactor(this.subdivisionScheme),this.subtreeLevels=i.subtreeLevels,l(i.availableLevels)?this.availableLevels=i.availableLevels:this.availableLevels=i.maximumLevel+1}function Uot(e){if(_i(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 Dot(e){let t=ze(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 Ip=kot;var Wmi=x(T(),1);var Vmi=x(T(),1);var uX={};function qbe(e){return e=(e^e<<8)&16711935,e=(e^e<<4)&252645135,e=(e^e<<2)&858993459,e=(e^e<<1)&1431655765,e}function N8(e){return e=(e^e<<16)&50331903,e=(e^e<<8)&50393103,e=(e^e<<4)&51130563,e=(e^e<<2)&153391689,e}function $be(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 Y8(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}uX.encode2D=function(e,t){return(qbe(e)|qbe(t)<<1)>>>0};uX.decode2D=function(e,t){return l(t)||(t=new Array(2)),t[0]=$be(e),t[1]=$be(e>>1),t};uX.encode3D=function(e,t,n){return N8(e)|N8(t)<<1|N8(n)<<2};uX.decode3D=function(e,t){return l(t)||(t=new Array(3)),t[0]=Y8(e),t[1]=Y8(e>>1),t[2]=Y8(e>>2),t};var $y=uX;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===Ws.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===Ws.OCTREE&&(e|=(this.z&1)<<2),e}},mortonIndex:{get:function(){return this.subdivisionScheme===Ws.OCTREE?$y.encode3D(this.x,this.y,this.z):$y.encode2D(this.x,this.y)}},tileIndex:{get:function(){let e=this.subdivisionScheme===Ws.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===Ws.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===Ws.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===Ws.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===Ws.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===Ws.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===Ws.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===Ws.OCTREE&&(e.z=this.z),e};var ege=[0,0,0];ur.fromMortonIndex=function(e,t,n,i){let o;return e===Ws.OCTREE?(o=$y.decode3D(i,ege),new ur({subdivisionScheme:e,subtreeLevels:t,level:n,x:o[0],y:o[1],z:o[2]})):(o=$y.decode2D(i,ege),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===Ws.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 Pp=ur;var Omi=x(T(),1);var Ymi=x(T(),1);function Hb(){}Hb.selectTiles=function(e,t){he.throwInstantiationError()};Hb.sortChildrenByDistanceToCamera=function(e,t){return t._distanceToCamera===0&&e._distanceToCamera===0?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera};Hb.canTraverse=function(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:e._screenSpaceError>e.tileset.memoryAdjustedScreenSpaceError};Hb.selectTile=function(e,t){if(e.contentVisibility(t)===zt.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)};Hb.visitTile=function(e,t){++e.tileset._statistics.visited,e._visitedFrame=t.frameNumber};Hb.touchTile=function(e,t){e._touchedFrame!==t.frameNumber&&(e.tileset._cache.touch(e),e._touchedFrame=t.frameNumber)};Hb.loadTile=function(e,t){let{tileset:n}=e;if(e._requestedFrame===t.frameNumber||!e.hasUnloadedRenderableContent&&!e.contentExpired||!Oot(e,t))return;let i=t.camera.timeSinceMoved<n.foveatedTimeDelay;e.priorityDeferred&&i||(e._requestedFrame=t.frameNumber,n._requestedTiles.push(e))};function Oot(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}Hb.updateTile=function(e,t){tge(e,t),e.updateExpiration(),e._wasMinPriorityChild=!1,e._priorityHolder=e,Hot(e),e._shouldSelect=!1,e._finalResolution=!0};function tge(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];tge(r,t),e._visible=r._visible;return}if(Bot(e,t)){e._visible=!1;return}let i=e.refine===sr.REPLACE,o=e._optimChildrenWithinParent===Um.USE_OPTIMIZATION;if(i&&o&&n&&!zot(e,t)){++e.tileset._statistics.numberOfTilesCulledWithChildrenUnion,e._visible=!1;return}}function Bot(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 zot(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 Hot(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 Na=Hb;function nge(){}var mX={stack:new Yl,stackMaximumLength:0};nge.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}=Na,s=mX.stack;for(s.push(i);s.length>0;){mX.stackMaximumLength=Math.max(mX.stackMaximumLength,s.length);let a=s.pop(),c=a.refine===sr.ADD,d=a.refine===sr.REPLACE,u=Kot(a);u&&Jot(a,s,t),(c||d&&!u)&&(jot(e,a),o(a,t),Qot(a,t),a.hasRenderableContent&&!a.contentAvailable&&(n=!1)),r(a,t)}return mX.stack.trim(mX.stackMaximumLength),n};function Kot(e){return e.children.length===0?!1:e.hasTilesetContent||e.hasImplicitContent?!e.contentExpired:(e.hasEmptyContent,!0)}function Jot(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 jot(e,t){(t.hasUnloadedRenderableContent||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function Qot(e,t){e.contentAvailable&&e.contentVisibility(t)!==zt.OUTSIDE&&e.tileset._selectedTiles.push(e)}var hX=nge;var jmi=x(T(),1);function ige(){}var fX={stack:new Yl,stackMaximumLength:0},pX={stack:new Yl,stackMaximumLength:0};ige.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(Na.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;$ot(n,t),fX.stack.trim(fX.stackMaximumLength),pX.stack.trim(pX.stackMaximumLength);let i=e._requestedTiles;for(let o=0;o<i.length;++o)i[o].updatePriority()};function w8(e,t){e.contentAvailable&&Na.selectTile(e,t)}function qot(e,t,n){let i=e.refine===sr.REPLACE,{tileset:o,children:r}=e,{updateTile:s,loadTile:a,touchTile:c}=Na;for(let f=0;f<r.length;++f)s(r[f],n);r.sort(Na.sortChildrenByDistanceToCamera);let d=i&&e.hasRenderableContent,u=!0,h=!1,p=-1,b=Number.MAX_VALUE;for(let f=0;f<r.length;++f){let y=r[f];if(y.isVisible?(t.push(y),y._foveatedFactor<b&&(p=f,b=y._foveatedFactor),h=!0):(d||o.loadSiblings)&&(y._foveatedFactor<b&&(p=f,b=y._foveatedFactor),a(y,n),c(y,n)),d){let _;y._inRequestVolume?y.hasRenderableContent?_=y.contentAvailable:_=ert(y,n):_=!1,u=u&&_}}if(h||(u=!1),p!==-1&&i){let f=r[p];f._wasMinPriorityChild=!0;let y=(e._wasMinPriorityChild||e===o.root)&&b<=e._priorityHolder._foveatedFactor?e._priorityHolder:e;y._foveatedFactor=Math.min(f._foveatedFactor,y._foveatedFactor),y._distanceToCamera=Math.min(f._distanceToCamera,y._distanceToCamera);for(let _=0;_<r.length;++_)r[_]._priorityHolder=y}return u}function $ot(e,t){let{tileset:n}=e,{canTraverse:i,loadTile:o,visitTile:r,touchTile:s}=Na,a=fX.stack;for(a.push(e);a.length>0;){fX.stackMaximumLength=Math.max(fX.stackMaximumLength,a.length);let c=a.pop(),d=c.parent,u=!l(d)||d._refines;c._refines=i(c)?qot(c,a,t)&&u:!1;let h=!c._refines&&u;c.hasRenderableContent?c.refine===sr.ADD?(w8(c,t),o(c,t)):c.refine===sr.REPLACE&&(o(c,t),h&&w8(c,t)):(n._emptyTiles.push(c),o(c,t),h&&w8(c,t)),r(c,t),s(c,t)}}function ert(e,t){let{canTraverse:n,updateTile:i,loadTile:o,touchTile:r}=Na,s=!0,a=pX.stack;for(a.push(e);a.length>0;){pX.stackMaximumLength=Math.max(pX.stackMaximumLength,a.length);let c=a.pop(),d=c.children,u=d.length,h=!c.hasRenderableContent&&n(c);if(!h&&!c.contentAvailable&&(s=!1),i(c,t),c.isVisible||(o(c,t),r(c,t)),h)for(let p=0;p<u;++p){let b=d[p];a.push(b)}}return e.hasEmptyContent||s}var bX=ige;var nhi=x(T(),1);function oge(){}var gX={stack:new Yl,stackMaximumLength:0},yX={stack:new Yl,stackMaximumLength:0},Kb={stack:new Yl,stackMaximumLength:0,ancestorStack:new Yl,ancestorStackMaximumLength:0},trt=2;oge.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(Na.updateTile(n,t),!n.isVisible||n.getScreenSpaceError(t,!0)<=e.memoryAdjustedScreenSpaceError)return;art(n,t),crt(n,t),gX.stack.trim(gX.stackMaximumLength),yX.stack.trim(yX.stackMaximumLength),Kb.stack.trim(Kb.stackMaximumLength),Kb.ancestorStack.trim(Kb.ancestorStackMaximumLength);let i=e._requestedTiles;for(let o=0;o<i.length;++o)i[o].updatePriority()};function nrt(e,t){let{updateTile:n,touchTile:i,selectTile:o}=Na,r=yX.stack;for(r.push(e);r.length>0;){yX.stackMaximumLength=Math.max(yX.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<trt&&r.push(d))}}}function zD(e,t){let n=e.contentAvailable?e:e._ancestorWithContentAvailable;l(n)?n._shouldSelect=!0:nrt(e,t)}function irt(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 ort(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 rrt(e,t,n){let{tileset:i,children:o}=e,{updateTile:r,loadTile:s,touchTile:a}=Na;for(let d=0;d<o.length;++d)r(o[d],n);o.sort(Na.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 srt(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 art(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}=Na,c=gX.stack;for(c.push(e);c.length>0;){gX.stackMaximumLength=Math.max(gX.stackMaximumLength,c.length);let d=c.pop();irt(d,t);let u=d.parent,h=!l(u)||u._refines;d._refines=o(d)?rrt(d,c,t)&&h:!1;let p=!d._refines&&h;d.hasRenderableContent?d.refine===sr.ADD?(zD(d,t),r(d,t)):d.refine===sr.REPLACE&&(srt(d,i)?(r(d,t),p&&zD(d,t)):p?(zD(d,t),r(d,t)):ort(n,d)&&r(d,t)):(n._emptyTiles.push(d),r(d,t),p&&zD(d,t)),s(d,t),a(d,t)}}function crt(e,t){let{selectTile:n,canTraverse:i}=Na,{stack:o,ancestorStack:r}=Kb,s;for(o.push(e);o.length>0||r.length>0;){if(Kb.stackMaximumLength=Math.max(Kb.stackMaximumLength,o.length),Kb.ancestorStackMaximumLength=Math.max(Kb.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 h=d[u];h.isVisible&&o.push(h)}}}}var xX=oge;var dhi=x(T(),1);function ya(){this._layers=[],this.layerAdded=new _e,this.layerRemoved=new _e,this.layerMoved=new _e,this.layerShownOrHidden=new _e}Object.defineProperties(ya.prototype,{length:{get:function(){return this._layers.length}}});ya.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()})};ya.prototype.addImageryProvider=function(e,t){let n=new ms(e);return this.add(n,t),n};ya.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};ya.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=[]};ya.prototype.contains=function(e){return this.indexOf(e)!==-1};ya.prototype.indexOf=function(e){return this._layers.indexOf(e)};ya.prototype.get=function(e){return this._layers[e]};function HD(e,t){return e.indexOf(t)}function rge(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)}ya.prototype.raise=function(e){let t=HD(this._layers,e);rge(this,t,t+1)};ya.prototype.lower=function(e){let t=HD(this._layers,e);rge(this,t,t-1)};ya.prototype.raiseToTop=function(e){let t=HD(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))};ya.prototype.lowerToBottom=function(e){let t=HD(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 lrt=new ae;function sge(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];ae.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)||!ae.contains(d.rectangle,t))continue;let h=lrt,p=1/1024;h.west=W.lerp(r.rectangle.west,r.rectangle.east,c.textureCoordinateRectangle.x-p),h.east=W.lerp(r.rectangle.west,r.rectangle.east,c.textureCoordinateRectangle.z+p),h.south=W.lerp(r.rectangle.south,r.rectangle.north,c.textureCoordinateRectangle.y-p),h.north=W.lerp(r.rectangle.south,r.rectangle.north,c.textureCoordinateRectangle.w+p),ae.contains(h,t)&&i(d)}}ya.prototype.pickImageryLayers=function(e,t){let n=t.globe.pick(e,t);if(!l(n))return;let i=t.ellipsoid.cartesianToCartographic(n),o=[];if(sge(t,i,!1,function(r){o.push(r.imageryLayer)}),o.length!==0)return o};ya.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(sge(t,i,!0,function(s){if(!s.imageryLayer.ready)return;let c=s.imageryLayer.imageryProvider.pickFeatures(s.x,s.y,s.level,i.longitude,i.latitude);l(c)&&(o.push(c),r.push(s.imageryLayer))}),o.length!==0)return Promise.all(o).then(function(s){let a=[];for(let c=0;c<s.length;++c){let d=s[c],u=r[c];if(l(d)&&d.length>0)for(let h=0;h<d.length;++h){let p=d[h];p.imageryLayer=u,l(p.position)||(p.position=i),a.push(p)}}return a})};ya.prototype.queueReprojectionCommands=function(e){let t=this._layers;for(let n=0,i=t.length;n<i;++n)t[n].queueReprojectionCommands(e)};ya.prototype.cancelReprojections=function(){let e=this._layers;for(let t=0,n=e.length;t<n;++t)e[t].cancelReprojections()};ya.prototype.isDestroyed=function(){return!1};ya.prototype.destroy=function(){return this.removeAll(!0),me(this)};ya.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 lS=ya;function tr(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 aX,this._processingQueue=[],this._selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this._selectedTilesToStyle=[],this._loadTimestamp=void 0,this._timeSinceLoad=0,this._updatedVisibilityFrame=0,this._updatedModelMatrixFrame=0,this._modelMatrixChanged=!1,this._previousModelMatrix=void 0,this._extras=void 0,this._credits=void 0,this._showCreditsOnScreen=e.showCreditsOnScreen??!1,this._cullWithChildrenBounds=e.cullWithChildrenBounds??!0,this._allTilesAdditive=!0,this._hasMixedContent=!1,this._stencilClearCommand=void 0,this._backfaceCommands=new Yl,this._maximumScreenSpaceError=e.maximumScreenSpaceError??16,this._memoryAdjustedScreenSpaceError=this._maximumScreenSpaceError,this._cacheBytes=e.cacheBytes??512*1024*1024;let t=e.maximumCacheOverflowBytes??512*1024*1024;this._maximumCacheOverflowBytes=t,this._styleEngine=new dX,this._styleApplied=!1,this._modelMatrix=l(e.modelMatrix)?F.clone(e.modelMatrix):F.clone(F.IDENTITY),this._addHeightCallbacks=[],this._statistics=new gf,this._statisticsLast=new gf,this._statisticsPerPass=new Array(er.NUMBER_OF_PASSES);for(let o=0;o<er.NUMBER_OF_PASSES;++o)this._statisticsPerPass[o]=new gf;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 cX(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 lS(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??Cn.ENABLED,this.show=e.show??!0,this.colorBlendMode=Cd.HIGHLIGHT,this.colorBlendAmount=.5,this._pointCloudShading=new Ap(e.pointCloudShading),this._pointCloudEyeDomeLighting=new gb,this.loadProgress=new _e,this.allTilesLoaded=new _e,this.initialTilesLoaded=new _e,this.tileLoad=new _e,this.tileUnload=new _e,this.tileFailed=new _e,this.tileVisible=new _e,this.skipLevelOfDetail=e.skipLevelOfDetail??!1,this._disableSkipLevelOfDetail=!1,this.baseScreenSpaceError=e.baseScreenSpaceError??1024,this.skipScreenSpaceErrorFactor=e.skipScreenSpaceErrorFactor??16,this.skipLevels=e.skipLevels??1,this.immediatelyLoadDesiredLevelOfDetail=e.immediatelyLoadDesiredLevelOfDetail??!1,this.loadSiblings=e.loadSiblings??!1,this._clippingPlanes=void 0,l(e.clippingPlanes)&&as.setOwner(e.clippingPlanes,this,"_clippingPlanes"),this._clippingPolygons=void 0,l(e.clippingPolygons)&&Kh.setOwner(e.clippingPolygons,this,"_clippingPolygons"),l(e.imageBasedLighting)?(this._imageBasedLighting=e.imageBasedLighting,this._shouldDestroyImageBasedLighting=!1):(this._imageBasedLighting=new qT,this._shouldDestroyImageBasedLighting=!0),this._environmentMapManager=new fb(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??Er.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&&Tt("tileset-debug-wireframe-ignored","enableDebugWireframe must be set to true in the Cesium3DTileset constructor, otherwise debugWireframe will be ignored."),this.debugShowBoundingVolume=e.debugShowBoundingVolume??!1,this.debugShowContentBoundingVolume=e.debugShowContentBoundingVolume??!1,this.debugShowViewerRequestVolume=e.debugShowViewerRequestVolume??!1,this._tileDebugLabels=void 0,this.debugPickedTileLabelOnly=!1,this.debugPickedTile=void 0,this.debugPickPosition=void 0,this.debugShowGeometricError=e.debugShowGeometricError??!1,this.debugShowRenderingStatistics=e.debugShowRenderingStatistics??!1,this.debugShowMemoryUsage=e.debugShowMemoryUsage??!1,this.debugShowUrl=e.debugShowUrl??!1,this.examineVectorLinesFunction=void 0,this._metadataExtension=void 0,this._customShader=e.customShader;let n=e.featureIdLabel??"featureId_0";typeof n=="number"&&(n=`featureId_${n}`),this._featureIdLabel=n;let i=e.instanceFeatureIdLabel??"instanceFeatureId_0";typeof i=="number"&&(i=`instanceFeatureId_${i}`),this._instanceFeatureIdLabel=i}Object.defineProperties(tr.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){as.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){Kh.setOwner(e,this,"_clippingPolygons")}},imageryLayers:{get:function(){return this._imageryLayers}},imageryLayersModificationCounter:{get:function(){return this._imageryLayersModificationCounter}},asynchronouslyLoadImagery:{get:function(){return this._asynchronouslyLoadImagery}},properties:{get:function(){return this._properties}},tilesLoaded:{get:function(){return this._tilesLoaded}},resource:{get:function(){return this._resource}},basePath:{get:function(){return La("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,fge(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}}});tr.fromIonAssetId=async function(e,t){let n=await ss.fromAssetId(e);return tr.fromUrl(n,t)};tr.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 tr.loadJson(n),r=await drt(n,o),s=new tr(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,fge(s);let c=l(o.asset.gltfUpAxis)?to.fromName(o.asset.gltfUpAxis):to.Y,d=t.modelUpAxis??c,u=t.modelForwardAxis??to.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>Ei._defaultMinTerrainHeight&&(s._initialClippingPlanesOriginMatrix=dt.eastNorthUpToFixedFrame(p)),s._clippingPlanesOriginMatrix=F.clone(s._initialClippingPlanesOriginMatrix),s};tr.loadJson=function(e){return We.createIfNeeded(e).fetchJson()};tr.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()};tr.prototype.loadTileset=function(e,t,n){let i=t.asset;if(!l(i))throw new le("Tileset must have an asset property.");if(i.version!=="0.0"&&i.version!=="1.0"&&i.version!=="1.1")throw new le("The tileset must be 3D Tiles version 0.0, 1.0, or 1.1");l(t.extensionsRequired)&&tr.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=age(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 h=d[u],p=age(this,e,h,c);c.children.push(p),p._depth=c._depth+1,a.push(p)}this._cullWithChildrenBounds&&oX.checkChildrenWithinParent(c)}return s};function age(e,t,n,i){if(!(l(n.implicitTiling)||_i(n,"3DTILES_implicit_tiling")))return new Hm(e,t,n,i);let r=e.schema,s=new Ip(t,n,r),a=new Pp({subdivisionScheme:s.subdivisionScheme,subtreeLevels:s.subtreeLevels,level:0,x:0,y:0,z:0}),c=s.subtreeUriTemplate.getDerivedResource({templateValues:a.getTemplateValues()}).url,u=ze(n,!0);u.contents=[{uri:c}],delete u.content,delete u.extensions;let h=new Hm(e,t,u,i);return h.implicitTileset=s,h.implicitCoordinates=a,h}async function drt(e,t){let n=_i(t,"3DTILES_metadata")?t.extensions["3DTILES_metadata"]:t,i;if(l(n.schemaUri))e=e.getDerivedResource({url:n.schemaUri}),i=vi.getSchemaLoader({resource:e});else if(l(n.schema))i=vi.getSchemaLoader({schema:n.schema});else return;await i.load();let o=new aS({schema:i.schema,metadataJson:n});return vi.unload(i),o}var cge=new m,urt=new pe,mrt=new F,hrt=new m,frt=new m,prt=new m,brt=new m;function grt(e,t){let n,i,o,r,s,a=t.camera,c=e._root,d=c.contentBoundingVolume;if(d instanceof Au)n=m.normalize(a.positionWC,cge),i=a.directionWC,o=a.positionCartographic.height,r=d.minimumHeight,s=d.maximumHeight;else{let y=F.inverseTransformation(c.computedTransform,mrt),_=t.mapProjection.ellipsoid,S=d.boundingVolume,A=F.multiplyByPoint(y,S.center,hrt);if(m.magnitude(A)>_.minimumRadius){let Z=pe.fromCartesian(A,_,urt);n=m.normalize(a.positionWC,cge),i=a.directionWC,o=a.positionCartographic.height,r=0,s=Z.height*2}else{let Z=F.multiplyByPoint(y,a.positionWC,frt);if(n=m.UNIT_Z,i=F.multiplyByPointAsVector(y,a.directionWC,prt),i=m.normalize(i,i),o=Z.z,d instanceof Pd){let V=q.getColumn(S.halfAxes,2,brt),E=m.magnitude(V);r=A.z-E,s=A.z+E}else if(d instanceof Ob){let V=S.radius;r=A.z-V,s=A.z+V}}}let u=e.dynamicScreenSpaceErrorHeightFalloff,h=r+(s-r)*u,p=s,b=W.clamp((o-h)/(p-h),0,1),f=1-Math.abs(m.dot(i,n));f=f*(1-b),e._dynamicScreenSpaceErrorComputedDensity=e.dynamicScreenSpaceErrorDensity*f}function yrt(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=>{uge(r,e,t)}),i&&(t.hasTilesetContent||t.hasImplicitContent?vrt(e,t):(n.decrementLoadCounts(t.content),--n.numberOfTilesWithContentReady)),e._requestedTilesInFlight.push(t))}function dge(e,t){return e._priority-t._priority}tr.prototype.postPassesUpdate=function(e){l(this._root)&&(xrt(this,e),Irt(this,e),this._cache.unloadTiles(this,hge),this._styleApplied&&this._styleEngine.resetDirty(),this._styleApplied=!1)};tr.prototype.prePassesUpdate=function(e){if(!l(this._root))return;Vrt(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&&grt(this,e),e.newFrame&&this._cache.reset()};function xrt(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!==dr.LOADING){++i;continue}else if(s){r.cancelRequests(),++i;continue}i>0&&(n[o-i]=r)}n.length-=i}function Trt(e){let t=e._requestedTiles;t.sort(dge);for(let n=0;n<t.length;++n)yrt(e,t[n])}function uge(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 _rt(e){let t=e._processingQueue,n=0;for(let i=0;i<t.length;++i){let o=t[i];if(o.isDestroyed()||o._contentState!==dr.PROCESSING){++n;continue}n>0&&(t[i-n]=o)}t.length-=n}var Srt=new pe,Art=new pe,Zrt=new m;function Crt(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=pe.clone(r.positionCartographic,Srt),c=pe.fromCartesian(o.center,s,Art);l(c)&&(a.height=c.height);let d=pe.toCartesian(a,s,Zrt);m.distance(d,o.center)<=o.radius&&(r.invoked=!0,n.afterRender.push(()=>{l(r.callback)&&r.callback(),r.invoked=!1}))}}function Vrt(e,t){_rt(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,uge(u,e,d)}}e.totalMemoryUsageInBytes<i?Ert(e):a&&n.length>0&&Rrt(e)}function Rrt(e){e._memoryAdjustedScreenSpaceError*=1.02;let t=e._processingQueue;for(let n=0;n<t.length;++n)t[n].updatePriority();t.sort(dge)}function Ert(e){e._memoryAdjustedScreenSpaceError=Math.max(e.memoryAdjustedScreenSpaceError/1.02,e.maximumScreenSpaceError)}var KD=new m,Grt={maximumFractionDigits:3};function lge(e){let t=e/1048576;return t<1?t.toLocaleString(void 0,Grt):Math.round(t).toLocaleString()}function M8(e){let{halfAxes:t,radius:n,center:i}=e.boundingVolume.boundingVolume,o=m.clone(i,KD);if(l(t))o.x+=.75*(t[0]+t[3]+t[6]),o.y+=.75*(t[1]+t[4]+t[7]),o.z+=.75*(t[2]+t[5]+t[8]);else if(l(n)){let r=m.normalize(i,KD);r=m.multiplyByScalar(r,.75*n,KD),o=m.add(r,i,KD)}return o}function k8(e,t,n){let i="",o=0;if(t.debugShowGeometricError&&(i+=`
Geometric error: ${e.geometricError}`,o++),t.debugShowRenderingStatistics&&(i+=`
Commands: ${e.commandsLength}`,o++,e.content.pointsLength>0&&(i+=`
Points: ${e.content.pointsLength}`,o++),e.content.trianglesLength>0&&(i+=`
Triangles: ${e.content.trianglesLength}`,o++),i+=`
Features: ${e.content.featuresLength}`,o++),t.debugShowMemoryUsage&&(i+=`
Texture Memory: ${lge(e.content.texturesByteLength)}`,i+=`
Geometry Memory: ${lge(e.content.geometryByteLength)}`,o+=2),t.debugShowUrl)if(e.hasMultipleContents){i+=`
Urls:`;let s=e.content.innerContentUrls;for(let a=0;a<s.length;a++)i+=`
- ${s[a]}`;o+=s.length}else i+=`
Url: ${e._contentHeader.uri}`,o++;let r={text:i.substring(1),position:n,font:`${19-o}px sans-serif`,showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY};return t._tileDebugLabels.add(r)}function Lrt(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:M8(e.debugPickedTile),a=k8(e.debugPickedTile,e,s);a.pixelOffset=new M(15,-15)}}else{for(let s=0;s<i;++s){let a=n[s];k8(a,e,M8(a))}for(let s=0;s<r;++s){let a=o[s];(a.hasTilesetContent||a.hasImplicitContent)&&k8(a,e,M8(a))}}e._tileDebugLabels.update(t)}function Wrt(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 si({stencil:0,pass:Le.CESIUM_3D_TILE,renderState:De.fromCache({stencilMask:Ot.SKIP_LOD_MASK})})),i.push(e._stencilClearCommand));let{statistics:c,tileVisible:d}=e,u=n.isRender,h=i.length;for(let f=0;f<s.length;++f){let y=s[f];u&&d.raiseEvent(y),Crt(e,y,t),y.update(e,t,n),c.incrementSelectionCounts(y.content),++c.selected}let p=e._emptyTiles;for(let f=0;f<p.length;++f)p[f].update(e,t,n);let b=i.length-h;if(e._backfaceCommands.trim(),a){let f=e._backfaceCommands.values,y=f.length;i.length+=y;for(let _=b-1;_>=0;--_)i[h+y+_]=i[h+_];for(let _=0;_<y;++_)i[h+_]=f[_]}b=i.length-r,c.numberOfCommands=b,u&&(e.pointCloudShading.attenuation&&e.pointCloudShading.eyeDomeLighting&&b>0&&e._pointCloudEyeDomeLighting.update(t,r,e.pointCloudShading,e.boundingSphere),e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(l(e._tileDebugLabels)||(e._tileDebugLabels=new Lp),Lrt(e,t)):e._tileDebugLabels=e._tileDebugLabels&&e._tileDebugLabels.destroy())}var mge=[];function vrt(e,t){let n=t,i=mge;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&&(Frt(e,t),--e._statistics.numberOfTilesTotal)}n.children=[]}function hge(e,t){e.tileUnload.raiseEvent(t),e._statistics.decrementLoadCounts(t.content),--e._statistics.numberOfTilesWithContentReady,t.unloadContent()}function Frt(e,t){e._cache.unloadTile(e,t,hge),t.destroy()}tr.prototype.trimLoadedTiles=function(){this._cache.trim()};function Irt(e,t){let n=e._statistics,i=e._statisticsLast,o=n.numberOfPendingRequests,r=n.numberOfTilesProcessing,s=i.numberOfPendingRequests,a=i.numberOfTilesProcessing;gf.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 Prt(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 Xrt(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 Nrt(e,t,n,i){if(t.mode===re.MORPHING||!l(e._root))return!1;let o=e._statistics;o.clear(),++e._updatedVisibilityFrame,Prt(e),Xrt(e,t),e._cullRequestsWhileMoving=e.cullRequestsWhileMoving&&!e._modelMatrixChanged;let r=e.getTraversal(i).selectTiles(e,t);if(i.requestTiles&&Trt(e),Wrt(e,t,i),gf.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 fge(e){let t=e._credits;l(t)||(t=[]),t.length=0,l(e.resource.credits)&&e.resource.credits.forEach(i=>{t.push(bt.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 bt(r.html))}}t.forEach(i=>i.showOnScreen=i.showOnScreen||e._showCreditsOnScreen),e._credits=t}tr.prototype.getTraversal=function(e){let{pass:t}=e;return t===er.MOST_DETAILED_PRELOAD||t===er.MOST_DETAILED_PICK?hX:this.isSkippingLevelOfDetail?xX:bX};tr.prototype.update=function(e){this.updateForPass(e,e.tilesetPassState)};tr.prototype.updateForPass=function(e,t){this.imageryLayers._update();let n=t.pass;if(n===er.PRELOAD&&(!this.preloadWhenHidden||this.show)||n===er.PRELOAD_FLIGHT&&(!this.preloadFlightDestinations||!this.show&&!this.preloadWhenHidden)||n===er.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=er.getPassOptions(n),a=s.ignoreCommands,c=t.commandList??i,d=c.length;if(e.commandList=c,e.camera=t.camera??o,e.cullingVolume=t.cullingVolume??r,s.isRender){let p=this._environmentMapManager;l(this._root)&&(p.position=this.boundingSphere.center),p.update(e)}let u=this._clippingPolygons;l(u)&&u.enabled&&u.queueCommands(e);let h=this._statisticsPerPass[n];(this.show||a)&&(this._pass=n,t.ready=Nrt(this,e,h,s)),a&&(c.length=d),e.commandList=i,e.camera=o,e.cullingVolume=r};tr.prototype.hasExtension=function(e){return l(this._extensionsUsed)?this._extensionsUsed.indexOf(e)>-1:!1};tr.prototype.isDestroyed=function(){return!1};tr.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=mge;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,me(this)};tr.supportedExtensions={"3DTILES_metadata":!0,"3DTILES_implicit_tiling":!0,"3DTILES_content_gltf":!0,"3DTILES_multiple_contents":!0,"3DTILES_bounding_volume_S2":!0,"3DTILES_batch_table_hierarchy":!0,"3DTILES_draco_point_compression":!0,CESIUM_mesh_vector:!0,MAXAR_content_geojson:!0};tr.checkSupportedExtensions=function(e){for(let t=0;t<e.length;t++)if(!tr.supportedExtensions[e[t]])throw new le(`Unsupported 3D Tiles Extension: ${e[t]}`)};var Yrt=new gn,wrt=new m,Mrt=new pe;tr.prototype.getHeight=function(e,t){let n=t.ellipsoid;l(n)||(n=ie.WGS84);let i=Yrt,o=n.cartographicToCartesian(e,i.direction);m.normalize(i.direction,i.direction),i.direction=m.normalize(o,i.direction),i.direction=m.negate(o,i.direction),i.origin=m.multiplyByScalar(i.direction,-2*n.maximumRadius,i.origin);let r=this.pick(i,t.frameState,wrt);if(l(r))return n.cartesianToCartographic(r,Mrt)?.height};tr.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 krt=new Or,Urt=new m;tr.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=ai.raySphere(e,d.contentBoundingVolume.boundingSphere,krt);!l(u)||!l(d.content)||r.push(d)}let s=r.length;r.sort((c,d)=>{let u=de.distanceSquaredTo(c.contentBoundingVolume.boundingSphere,e.origin),h=de.distanceSquaredTo(d.contentBoundingVolume.boundingSphere,e.origin);return u-h});let a;for(let c=0;c<s;++c){let u=r[c].content.pick(e,t,Urt);if(l(u))return a=m.clone(u,n),a}};tr.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};tr.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 Js=tr;var Drt=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 It,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),h;u&&(h=s.computeModelMatrix(e,Drt),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],Ort(c,n,s,i)),l(p)&&(p.show=!0,l(h)&&(p.modelMatrix=h),p.maximumScreenSpaceError=j.getValueOrDefault(a.maximumScreenSpaceError,e,p.maximumScreenSpaceError))}return!0};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--)U8(this,e[i],t,n);return me(this)};ex.prototype.getBoundingSphere=function(e,t){let n=this._tilesetHash[e.id];if(!l(n)||n.loadFail)return xt.FAILED;let i=n.tilesetPrimitive;return l(i)?i.show?(de.clone(i.boundingSphere,t),xt.DONE):xt.FAILED:xt.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):(U8(this,r,a,c),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],U8(this,r,a,c),s.remove(r.id)};function U8(e,t,n,i){let o=n[t.id];l(o)&&(l(o.tilesetPrimitive)&&i.removeAndDestroy(o.tilesetPrimitive),delete n[t.id])}async function Ort(e,t,n,i){t[n.id]={url:e.url,loadFail:!1};try{let o=await Js.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 TX=ex;var Dfi=x(T(),1);var Brt=U.WHITE,zrt=U.BLACK,Hrt=new M(2,2);function mV(e){e=e??B.EMPTY_OBJECT,this._definitionChanged=new _e,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.repeat=e.repeat}Object.defineProperties(mV.prototype,{isConstant:{get:function(){return j.isConstant(this._evenColor)&&j.isConstant(this._oddColor)&&j.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:ge("evenColor"),oddColor:ge("oddColor"),repeat:ge("repeat")});mV.prototype.getType=function(e){return"Checkerboard"};var Krt=new Q;mV.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Krt)),l(t)||(t={}),t.lightColor=j.getValueOrClonedDefault(this._evenColor,e,Brt,t.lightColor),t.darkColor=j.getValueOrClonedDefault(this._oddColor,e,zrt,t.darkColor),t.repeat=j.getValueOrDefault(this._repeat,e,Hrt),t};mV.prototype.equals=function(e){return this===e||e instanceof mV&&j.equals(this._evenColor,e._evenColor)&&j.equals(this._oddColor,e._oddColor)&&j.equals(this._repeat,e._repeat)};var hV=mV;var api=x(T(),1);var epi=x(T(),1);var pge={id:void 0};function _X(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 ol(e){this._owner=e,this._entities=new It,this._addedEntities=new It,this._removedEntities=new It,this._changedEntities=new It,this._suspendCount=0,this._collectionChanged=new _e,this._id=zn(),this._show=!0,this._firing=!1,this._refire=!1}ol.prototype.suspendEvents=function(){this._suspendCount++};ol.prototype.resumeEvents=function(){this._suspendCount--,_X(this)};Object.defineProperties(ol.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}}});ol.prototype.computeAvailability=function(){let e=Je.MAXIMUM_VALUE,t=Je.MINIMUM_VALUE,n=this._entities.values;for(let i=0,o=n.length;i<o;i++){let s=n[i].availability;if(l(s)){let a=s.start,c=s.stop;Q.lessThan(a,e)&&!a.equals(Je.MINIMUM_VALUE)&&(e=a),Q.greaterThan(c,t)&&!c.equals(Je.MAXIMUM_VALUE)&&(t=c)}}return Je.MAXIMUM_VALUE.equals(e)&&(e=Je.MINIMUM_VALUE),Je.MINIMUM_VALUE.equals(t)&&(t=Je.MAXIMUM_VALUE),new En({start:e,stop:t})};ol.prototype.add=function(e){e instanceof Oo||(e=new Oo(e));let t=e.id,n=this._entities;if(n.contains(t))throw new he(`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(ol.prototype._onEntityDefinitionChanged,this),_X(this),e};ol.prototype.remove=function(e){return l(e)?this.removeById(e.id):!1};ol.prototype.contains=function(e){return this._entities.get(e.id)===e};ol.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(ol.prototype._onEntityDefinitionChanged,this),_X(this),!0):!1};ol.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(ol.prototype._onEntityDefinitionChanged,this),o.set(a,s))}e.removeAll(),i.removeAll(),this._changedEntities.removeAll(),_X(this)};ol.prototype.getById=function(e){return this._entities.get(e)};ol.prototype.getOrCreateEntity=function(e){let t=this._entities.get(e);return l(t)||(pge.id=e,t=new Oo(pge),this.add(t)),t};ol.prototype._onEntityDefinitionChanged=function(e){let t=e.id;this._addedEntities.contains(t)||this._changedEntities.set(t,e),_X(this)};var Ya=ol;var JD={id:void 0},fV=new Array(2);function D8(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 bge(e,t,n,i){fV[0]=n,fV[1]=i.id,t[JSON.stringify(fV)]=i.definitionChanged.addEventListener(fs.prototype._onDefinitionChanged,e)}function gge(e,t,n,i){fV[0]=n,fV[1]=i.id;let o=JSON.stringify(fV);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,h=new Ya(e),p=e._eventHash,b;for(r=0;r<o;r++)for(d=i[r],d.collectionChanged.removeEventListener(fs.prototype._onCollectionChanged,e),a=d.values,b=d.id,c=a.length-1;c>-1;c--)s=a[c],gge(e,p,b,s);for(r=n-1;r>=0;r--)for(d=t[r],d.collectionChanged.addEventListener(fs.prototype._onCollectionChanged,e),a=d.values,b=d.id,c=a.length-1;c>-1;c--){s=a[c],bge(e,p,b,s);let y=h.getById(s.id);l(y)||(y=u.getById(s.id),l(y)?D8(y):(JD.id=s.id,y=new Oo(JD)),h.add(y)),y.merge(s)}e._collectionsCopy=t.slice(0),u.suspendEvents(),u.removeAll();let f=h.values;for(r=0;r<f.length;r++)u.add(f[r]);u.resumeEvents()}function fs(e,t){this._owner=t,this._composite=new Ya(this),this._suspendCount=0,this._collections=l(e)?e.slice():[],this._collectionsCopy=[],this._id=zn(),this._eventHash={},tx(this),this._shouldRecomposite=!1}Object.defineProperties(fs.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}}});fs.prototype.addCollection=function(e,t){l(t)?this._collections.splice(t,0,e):(t=this._collections.length,this._collections.push(e)),tx(this)};fs.prototype.removeCollection=function(e){let t=this._collections.indexOf(e);return t!==-1?(this._collections.splice(t,1),tx(this),!0):!1};fs.prototype.removeAllCollections=function(){this._collections.length=0,tx(this)};fs.prototype.containsCollection=function(e){return this._collections.indexOf(e)!==-1};fs.prototype.contains=function(e){return this._composite.contains(e)};fs.prototype.indexOfCollection=function(e){return this._collections.indexOf(e)};fs.prototype.getCollection=function(e){return this._collections[e]};fs.prototype.getCollectionsLength=function(){return this._collections.length};function jD(e,t){return e.indexOf(t)}function yge(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)}fs.prototype.raiseCollection=function(e){let t=jD(this._collections,e);yge(this,t,t+1)};fs.prototype.lowerCollection=function(e){let t=jD(this._collections,e);yge(this,t,t-1)};fs.prototype.raiseCollectionToTop=function(e){let t=jD(this._collections,e);t!==this._collections.length-1&&(this._collections.splice(t,1),this._collections.push(e),tx(this))};fs.prototype.lowerCollectionToBottom=function(e){let t=jD(this._collections,e);t!==0&&(this._collections.splice(t,1),this._collections.splice(0,0,e),tx(this))};fs.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()};fs.prototype.resumeEvents=function(){this._suspendCount--,this._shouldRecomposite&&this._suspendCount===0&&(tx(this),this._shouldRecomposite=!1),this._composite.resumeEvents()};fs.prototype.computeAvailability=function(){return this._composite.computeAvailability()};fs.prototype.getById=function(e){return this._composite.getById(e)};fs.prototype._onCollectionChanged=function(e,t,n){let i=this._collectionsCopy,o=i.length,r=this._composite;r.suspendEvents();let s,a,c,d,u=n.length,h=this._eventHash,p=e.id;for(s=0;s<u;s++){let f=n[s];gge(this,h,p,f);let y=f.id;for(a=o-1;a>=0;a--)c=i[a].getById(y),l(c)&&(l(d)||(d=r.getById(y),D8(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];bge(this,h,p,f);let y=f.id;for(a=o-1;a>=0;a--)c=i[a].getById(y),l(c)&&(l(d)||(d=r.getById(y),l(d)?D8(d):(JD.id=y,d=new Oo(JD),r.add(d))),d.merge(c));d=void 0}r.resumeEvents()};fs.prototype._onDefinitionChanged=function(e,t,n,i){let o=this._collections,r=this._composite,s=o.length,a=e.id,c=r.getById(a),d=c[t],u=!l(d),h=!0;for(let p=s-1;p>=0;p--){let b=o[p].getById(e.id);if(l(b)){let f=b[t];if(l(f)){if(h)if(h=!1,l(f.merge)&&l(f.clone))d=f.clone(d);else{d=f;break}d.merge(f)}}}u&&c.propertyNames.indexOf(t)===-1&&c.addProperty(t),c[t]=d};var O8=fs;var Ppi=x(T(),1);var Epi=x(T(),1);var lpi=x(T(),1);function B8(){this._removalFunctions=[]}B8.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)}};B8.prototype.removeAll=function(){let e=this._removalFunctions;for(let t=0,n=e.length;t<n;++t)e[t]();e.length=0};var vr=B8;var Tpi=x(T(),1);function K8(e,t){return Q.compare(e.start,t.start)}function ps(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(ps.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}}});ps.prototype.equals=function(e,t){if(this===e)return!0;if(!(e instanceof ps))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(!En.equals(n[r],i[r],t))return!1;return!0};ps.prototype.get=function(e){return this._intervals[e]};ps.prototype.removeAll=function(){this._intervals.length>0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))};ps.prototype.findIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t]:void 0};ps.prototype.findDataForIntervalContainingDate=function(e){let t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0};ps.prototype.contains=function(e){return this.indexOf(e)>=0};var z8=new En;ps.prototype.indexOf=function(e){let t=this._intervals;z8.start=e,z8.stop=e;let n=bo(t,z8,K8);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&&En.contains(t[n-1],e)?n-1:~n)};ps.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]}};ps.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=bo(n,e,K8);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 En({start:n[i-1].start,stop:e.stop,isStartIncluded:n[i-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):e=new En({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 En({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 En({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 En({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 En({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)};ps.prototype.removeInterval=function(e){if(e.isEmpty)return!1;let t=this._intervals,n=bo(t,e,K8);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 En({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 En({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 En({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 En({start:t[n].start,stop:t[n].stop,isStartIncluded:!0,isStopIncluded:t[n].isStopIncluded,data:t[n].data})):t[n]=new En({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 En({start:e.stop,stop:t[n].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[n].isStopIncluded,data:t[n].data})),i&&this._changedEvent.raiseEvent(this),i};ps.prototype.intersect=function(e,t,n){let i=new ps,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=En.intersect(c,d,new En,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};ps.fromJulianDateArray=function(e,t){l(t)||(t=new ps);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 En({start:Je.MINIMUM_VALUE,stop:n[0],isStartIncluded:!0,isStopIncluded:!r}),d.data=l(o)?o(d,t.length):t.length,t.addInterval(d));for(let h=0;h<i-1;++h){let p=n[h],b=n[h+1];d=new En({start:p,stop:b,isStartIncluded:t.length===u?r:!0,isStopIncluded:h===i-2?s:!1}),d.data=l(o)?o(d,t.length):t.length,t.addInterval(d),p=b}return c&&(d=new En({start:n[i-1],stop:Je.MAXIMUM_VALUE,isStartIncluded:!s,isStopIncluded:!0}),d.data=l(o)?o(d,t.length):t.length,t.addInterval(d)),t};var rl=new L0,SX=[0,31,28,31,30,31,30,31,31,30,31,30,31];function H8(e,t,n){l(n)||(n=new Q),Q.toGregorianDate(e,rl);let i=rl.millisecond+t.millisecond,o=rl.second+t.second,r=rl.minute+t.minute,s=rl.hour+t.hour,a=rl.day+t.day,c=rl.month+t.month,d=rl.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),SX[2]=Sh(d)?29:28;a>SX[c]||c>=13;)a>SX[c]&&(a-=SX[c],++c),c>=13&&(--c,d+=Math.floor(c/12),c=c%12,++c),SX[2]=Sh(d)?29:28;return rl.millisecond=i,rl.second=o,rl.minute=r,rl.hour=s,rl.day=a,rl.month=c,rl.year=d,Q.fromGregorianDate(rl,n)}var Jrt=new Q,jrt=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function xge(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(jrt);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,Jrt),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var AX=new L0;ps.fromIso8601=function(e,t){let n=e.iso8601.split("/"),i=Q.fromIso8601(n[0]),o=Q.fromIso8601(n[1]),r=[];if(!xge(n[2],AX))r.push(i,o);else{let s=Q.clone(i);for(r.push(s);Q.compare(s,o)<0;)s=H8(s,AX),Q.compare(o,s)<=0&&Q.clone(o,s),r.push(s)}return ps.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};ps.fromIso8601DateArray=function(e,t){return ps.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)};ps.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)(xge(i[d],AX)||d===0)&&(o&&l(a)?s=H8(a,AX):s=H8(n,AX),r.push(s),a=s);return ps.fromJulianDateArray({julianDates:r,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)};var bs=ps;function Qrt(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 dS(){this._eventHelper=new vr,this._definitionChanged=new _e,this._intervals=new bs,this._intervals.changedEvent.addEventListener(dS.prototype._intervalsChanged,this)}Object.defineProperties(dS.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}});var qrt=new Q;dS.prototype.getValue=function(e,t){l(e)||(e=Q.now(qrt));let n=this._intervals.findDataForIntervalContainingDate(e);if(l(n))return n.getValue(e,t)};dS.prototype.equals=function(e){return this===e||e instanceof dS&&this._intervals.equals(e._intervals,j.equals)};dS.prototype._intervalsChanged=function(){Qrt(this,this._eventHelper,this._definitionChanged,this._intervals),this._definitionChanged.raiseEvent(this)};var sl=dS;function nx(){this._definitionChanged=new _e,this._composite=new sl,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 $rt=new Q;nx.prototype.getValue=function(e,t){l(e)||(e=Q.now($rt));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 pV=nx;var Dpi=x(T(),1);function ix(e){this._referenceFrame=e??Xi.FIXED,this._definitionChanged=new _e,this._composite=new sl,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 est=new Q;ix.prototype.getValue=function(e,t){return l(e)||(e=Q.now(est)),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 oc=ix;var Ybi=x(T(),1);var Y0i=x(T(),1);var Bpi=x(T(),1),Tge={ROUNDED:0,MITERED:1,BEVELED:2};Object.freeze(Tge);var Ji=Tge;var b0i=x(T(),1);var s0i=x(T(),1);var rc=[new m,new m],tst=new m,nst=new m,ist=new m,ost=new m,rst=new m,sst=new m,ast=new m,cst=new m,lst=new m,bV=new m,QD=new m,ZX={},J8=new pe;function dst(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++){let o=e[i];J8=t.cartesianToCartographic(o,J8),n[i]=J8.height,e[i]=t.scaleToGeodeticSurface(o,o)}return n}function j8(e,t,n,i){let o=e[0],r=e[1],s=m.angleBetween(o,r),a=Math.ceil(s/i),c=new Array(a),d;if(t===n){for(d=0;d<a;d++)c[d]=t;return c.push(n),c}let h=(n-t)/a;for(d=1;d<a;d++){let p=t+d*h;c[d]=p}return c[0]=t,c.push(n),c}var qD=new m,$D=new m;function ust(e,t,n,i){let o=new Rs(n,i),r=o.projectPointOntoPlane(m.add(n,e,qD),qD),s=o.projectPointOntoPlane(m.add(n,t,$D),$D),a=M.angleBetween(r,s);return s.x*r.y-s.y*r.x>=0?-a:a}var mst=new m(-1,0,0),uS=new F,hst=new F,Q8=new q,fst=q.IDENTITY.clone(),pst=new m,bst=new se,_ge=new m;function Jb(e,t,n,i,o,r,s,a){let c=pst,d=bst;uS=dt.eastNorthUpToFixedFrame(e,o,uS),c=F.multiplyByPointAsVector(uS,mst,c),c=m.normalize(c,c);let u=ust(c,t,e,o);Q8=q.fromRotationZ(u,Q8),_ge.z=r,uS=F.multiplyTransformation(uS,F.fromRotationTranslation(Q8,_ge,hst),uS);let h=fst;h[0]=s;for(let p=0;p<a;p++)for(let b=0;b<n.length;b+=3)d=m.fromArray(n,b,d),d=q.multiplyByVector(h,d,d),d=F.multiplyByPoint(uS,d,d),i.push(d.x,d.y,d.z);return i}var gst=new m;function q8(e,t,n,i,o,r,s){for(let a=0;a<e.length;a+=3){let c=m.fromArray(e,a,gst);i=Jb(c,t,n,i,o,r[a/3],s,1)}return i}function yst(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 Sge(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 Age=new Pe,Zge=new m,Cge=new q;function Vge(e,t,n,i,o,r,s,a,c,d){let u=m.angleBetween(m.subtract(t,e,bV),m.subtract(n,e,QD)),h=i===Ji.BEVELED?0:Math.ceil(u/W.toRadians(5)),p;o?p=q.fromQuaternion(Pe.fromAxisAngle(m.negate(e,bV),u/(h+1),Age),Cge):p=q.fromQuaternion(Pe.fromAxisAngle(e,u/(h+1),Age),Cge);let b,f;if(t=m.clone(t,Zge),h>0){let y=d?2:1;for(let _=0;_<h;_++)t=q.multiplyByVector(p,t,t),b=m.subtract(t,e,bV),b=m.normalize(b,b),o||(b=m.negate(b,b)),f=r.scaleToGeodeticSurface(t,QD),s=Jb(f,b,a,s,r,c,1,y)}else b=m.subtract(t,e,bV),b=m.normalize(b,b),o||(b=m.negate(b,b)),f=r.scaleToGeodeticSurface(t,QD),s=Jb(f,b,a,s,r,c,1,1),n=m.clone(n,Zge),b=m.subtract(n,e,bV),b=m.normalize(b,b),o||(b=m.negate(b,b)),f=r.scaleToGeodeticSurface(n,QD),s=Jb(f,b,a,s,r,c,1,1);return s}ZX.removeDuplicatesFromShape=function(e){let t=e.length,n=[];for(let i=t-1,o=0;o<t;i=o++){let r=e[i],s=e[o];M.equals(r,s)||n.push(s)}return n};ZX.angleIsGreaterThanPi=function(e,t,n,i){let o=new Rs(n,i),r=o.projectPointOntoPlane(m.add(n,e,qD),qD),s=o.projectPointOntoPlane(m.add(n,t,$D),$D);return s.x*r.y-s.y*r.x>=0};var xst=new m,Tst=new m;ZX.computePositions=function(e,t,n,i,o){let r=i._ellipsoid,s=dst(e,r),a=i._granularity,c=i._cornerType,d=o?yst(t,n):Sge(t,n),u=o?Sge(t,n):void 0,h=n.height/2,p=n.width/2,b=e.length,f=[],y=o?[]:void 0,_=tst,S=nst,A=ist,Z=ost,V=rst,E=sst,L=ast,v=cst,I=lst,X=e[0],N=e[1];Z=r.geodeticSurfaceNormal(X,Z),_=m.subtract(N,X,_),_=m.normalize(_,_),v=m.cross(Z,_,v),v=m.normalize(v,v);let g=s[0],C=s[1];o&&(y=Jb(X,v,u,y,r,g+h,1,1)),I=m.clone(X,I),X=N,S=m.negate(_,S);let R,G;for(let O=1;O<b-1;O++){let k=o?2:1;if(N=e[O+1],X.equals(N)){Tt("Positions are too close and are considered equivalent with rounding error.");continue}_=m.subtract(N,X,_),_=m.normalize(_,_),Z=r.geodeticSurfaceNormal(X,Z);let D=m.multiplyByScalar(Z,m.dot(_,Z),xst);m.subtract(_,D,D),m.normalize(D,D);let w=m.multiplyByScalar(Z,m.dot(S,Z),Tst);if(m.subtract(S,w,w),m.normalize(w,w),!W.equalsEpsilon(Math.abs(m.dot(D,w)),1,W.EPSILON7)){A=m.add(_,S,A),A=m.normalize(A,A),A=m.cross(A,Z,A),A=m.cross(Z,A,A),A=m.normalize(A,A);let J=1/Math.max(.25,m.magnitude(m.cross(A,S,bV))),ee=ZX.angleIsGreaterThanPi(_,S,X,r);ee?(V=m.add(X,m.multiplyByScalar(A,J*p,A),V),E=m.add(V,m.multiplyByScalar(v,p,E),E),rc[0]=m.clone(I,rc[0]),rc[1]=m.clone(E,rc[1]),R=j8(rc,g+h,C+h,a),G=Ki.generateArc({positions:rc,granularity:a,ellipsoid:r}),f=q8(G,v,d,f,r,R,1),v=m.cross(Z,_,v),v=m.normalize(v,v),L=m.add(V,m.multiplyByScalar(v,p,L),L),c===Ji.ROUNDED||c===Ji.BEVELED?Vge(V,E,L,c,ee,r,f,d,C+h,o):(A=m.negate(A,A),f=Jb(X,A,d,f,r,C+h,J,k)),I=m.clone(L,I)):(V=m.add(X,m.multiplyByScalar(A,J*p,A),V),E=m.add(V,m.multiplyByScalar(v,-p,E),E),rc[0]=m.clone(I,rc[0]),rc[1]=m.clone(E,rc[1]),R=j8(rc,g+h,C+h,a),G=Ki.generateArc({positions:rc,granularity:a,ellipsoid:r}),f=q8(G,v,d,f,r,R,1),v=m.cross(Z,_,v),v=m.normalize(v,v),L=m.add(V,m.multiplyByScalar(v,-p,L),L),c===Ji.ROUNDED||c===Ji.BEVELED?Vge(V,E,L,c,ee,r,f,d,C+h,o):f=Jb(X,A,d,f,r,C+h,J,k),I=m.clone(L,I)),S=m.negate(_,S)}else f=Jb(I,v,d,f,r,g+h,1,1),I=X;g=C,C=s[O+1],X=N}rc[0]=m.clone(I,rc[0]),rc[1]=m.clone(X,rc[1]),R=j8(rc,g+h,C+h,a),G=Ki.generateArc({positions:rc,granularity:a,ellipsoid:r}),f=q8(G,v,d,f,r,R,1),o&&(y=Jb(X,v,u,y,r,C+h,1,1)),b=f.length;let P=o?b+y.length:b,Y=new Float64Array(P);return Y.set(f),o&&Y.set(y,b),Y};var yf=ZX;var e7={},gV=new m,Wge=new m,_st=new m,Rge=new m,Ql=[new m,new m],vge=new m,Fge=new m,Ige=new m,Sst=new m,Ast=new m,Zst=new m,Cst=new m,Vst=new m,Rst=new m,Est=new m,Ege=new Pe,Gge=new q;function eO(e,t,n,i,o){let r=m.angleBetween(m.subtract(t,e,gV),m.subtract(n,e,Wge)),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=q.fromQuaternion(Pe.fromAxisAngle(m.negate(e,gV),r/s,Ege),Gge):d=q.fromQuaternion(Pe.fromAxisAngle(e,r/s,Ege),Gge);let u=0;t=m.clone(t,gV);for(let h=0;h<s;h++)t=q.multiplyByVector(d,t,t),c[u++]=t.x,c[u++]=t.y,c[u++]=t.z;return c}function Gst(e){let t=vge,n=Fge,i=Ige,o=e[1];n=m.fromArray(e[1],o.length-3,n),i=m.fromArray(e[0],0,i),t=m.midpoint(n,i,t);let r=eO(t,n,i,Ji.ROUNDED,!1),s=e.length-1,a=e[s-1];o=e[s],n=m.fromArray(a,a.length-3,n),i=m.fromArray(o,0,i),t=m.midpoint(n,i,t);let c=eO(t,n,i,Ji.ROUNDED,!1);return[r,c]}function Lge(e,t,n,i){let o=gV;return i?o=m.add(e,t,o):(t=m.negate(t,t),o=m.add(e,t,o)),[o.x,o.y,o.z,n.x,n.y,n.z]}function $8(e,t,n,i){let o=new Array(e.length),r=new Array(e.length),s=m.multiplyByScalar(t,n,gV),a=m.negate(s,Wge),c=0,d=e.length-1;for(let u=0;u<e.length;u+=3){let h=m.fromArray(e,u,_st),p=m.add(h,a,Rge);o[c++]=p.x,o[c++]=p.y,o[c++]=p.z;let b=m.add(h,s,Rge);r[d--]=b.z,r[d--]=b.y,r[d--]=b.x}return i.push(o,r),i}e7.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 Lst=new m,Wst=new m;e7.computePositions=function(e){let t=e.granularity,n=e.positions,i=e.ellipsoid,o=e.width/2,r=e.cornerType,s=e.saveAttributes,a=vge,c=Fge,d=Ige,u=Sst,h=Ast,p=Zst,b=Cst,f=Vst,y=Rst,_=Est,S=[],A=s?[]:void 0,Z=s?[]:void 0,V=n[0],E=n[1];c=m.normalize(m.subtract(E,V,c),c),a=i.geodeticSurfaceNormal(V,a),u=m.normalize(m.cross(a,c,u),u),s&&(A.push(u.x,u.y,u.z),Z.push(a.x,a.y,a.z)),b=m.clone(V,b),V=E,d=m.negate(c,d);let L,v=[],I,X=n.length;for(I=1;I<X-1;I++){a=i.geodeticSurfaceNormal(V,a),E=n[I+1],c=m.normalize(m.subtract(E,V,c),c);let g=m.multiplyByScalar(a,m.dot(c,a),Lst);m.subtract(c,g,g),m.normalize(g,g);let C=m.multiplyByScalar(a,m.dot(d,a),Wst);if(m.subtract(d,C,C),m.normalize(C,C),!W.equalsEpsilon(Math.abs(m.dot(g,C)),1,W.EPSILON7)){h=m.normalize(m.add(c,d,h),h),h=m.cross(h,a,h),h=m.cross(a,h,h),h=m.normalize(h,h);let G=o/Math.max(.25,m.magnitude(m.cross(h,d,gV))),P=yf.angleIsGreaterThanPi(c,d,V,i);h=m.multiplyByScalar(h,G,h),P?(f=m.add(V,h,f),_=m.add(f,m.multiplyByScalar(u,o,_),_),y=m.add(f,m.multiplyByScalar(u,o*2,y),y),Ql[0]=m.clone(b,Ql[0]),Ql[1]=m.clone(_,Ql[1]),L=Ki.generateArc({positions:Ql,granularity:t,ellipsoid:i}),S=$8(L,u,o,S),s&&(A.push(u.x,u.y,u.z),Z.push(a.x,a.y,a.z)),p=m.clone(y,p),u=m.normalize(m.cross(a,c,u),u),y=m.add(f,m.multiplyByScalar(u,o*2,y),y),b=m.add(f,m.multiplyByScalar(u,o,b),b),r===Ji.ROUNDED||r===Ji.BEVELED?v.push({leftPositions:eO(f,p,y,r,P)}):v.push({leftPositions:Lge(V,m.negate(h,h),y,P)})):(y=m.add(V,h,y),_=m.add(y,m.negate(m.multiplyByScalar(u,o,_),_),_),f=m.add(y,m.negate(m.multiplyByScalar(u,o*2,f),f),f),Ql[0]=m.clone(b,Ql[0]),Ql[1]=m.clone(_,Ql[1]),L=Ki.generateArc({positions:Ql,granularity:t,ellipsoid:i}),S=$8(L,u,o,S),s&&(A.push(u.x,u.y,u.z),Z.push(a.x,a.y,a.z)),p=m.clone(f,p),u=m.normalize(m.cross(a,c,u),u),f=m.add(y,m.negate(m.multiplyByScalar(u,o*2,f),f),f),b=m.add(y,m.negate(m.multiplyByScalar(u,o,b),b),b),r===Ji.ROUNDED||r===Ji.BEVELED?v.push({rightPositions:eO(y,p,f,r,P)}):v.push({rightPositions:Lge(V,h,f,P)})),d=m.negate(c,d)}V=E}a=i.geodeticSurfaceNormal(V,a),Ql[0]=m.clone(b,Ql[0]),Ql[1]=m.clone(V,Ql[1]),L=Ki.generateArc({positions:Ql,granularity:t,ellipsoid:i}),S=$8(L,u,o,S),s&&(A.push(u.x,u.y,u.z),Z.push(a.x,a.y,a.z));let N;return r===Ji.ROUNDED&&(N=Gst(S)),{positions:S,corners:v,lefts:A,normals:Z,endPositions:N}};var oo=e7;var Nge=new m,Yge=new m,tO=new m,nO=new m,vst=new m,wge=new m,ox=new m,yV=new m;function Mge(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function xf(e,t,n,i,o,r){let s=e.normals,a=e.tangents,c=e.bitangents,d=m.normalize(m.cross(n,t,ox),ox);r.normal&&oo.addAttribute(s,t,i,o),r.tangent&&oo.addAttribute(a,d,i,o),r.bitangent&&oo.addAttribute(c,n,i,o)}function kge(e,t,n){let i=e.positions,o=e.corners,r=e.endPositions,s=e.lefts,a=e.normals,c=new bn,d,u=0,h=0,p,b=0,f;for(p=0;p<i.length;p+=2)f=i[p].length-3,u+=f,b+=f*2,h+=i[p+1].length-3;for(u+=3,h+=3,p=0;p<o.length;p++){d=o[p];let $=o[p].leftPositions;l($)?(f=$.length,u+=f,b+=f):(f=o[p].rightPositions.length,h+=f,b+=f)}let y=l(r),_;y&&(_=r[0].length-3,u+=_,h+=_,_/=3,b+=_*6);let S=u+h,A=new Float64Array(S),Z=t.normal?new Float32Array(S):void 0,V=t.tangent?new Float32Array(S):void 0,E=t.bitangent?new Float32Array(S):void 0,L={normals:Z,tangents:V,bitangents:E},v=0,I=S-1,X,N,g,C,R=Nge,G=Yge,P,Y,O=_/2,k=Me.createTypedArray(S/3,b),D=0;if(y){Y=tO,P=nO;let $=r[0];for(R=m.fromArray(a,0,R),G=m.fromArray(s,0,G),p=0;p<O;p++)Y=m.fromArray($,(O-1-p)*3,Y),P=m.fromArray($,(O+p)*3,P),oo.addAttribute(A,P,v),oo.addAttribute(A,Y,void 0,I),xf(L,R,G,v,I,t),N=v/3,C=N+1,X=(I-2)/3,g=X-1,k[D++]=X,k[D++]=N,k[D++]=g,k[D++]=g,k[D++]=N,k[D++]=C,v+=3,I-=3}let w=0,z=0,J=i[w++],ee=i[w++];A.set(J,v),A.set(ee,I-ee.length+1),G=m.fromArray(s,z,G);let H,te;for(f=ee.length-3,p=0;p<f;p+=3)H=n.geodeticSurfaceNormal(m.fromArray(J,p,ox),ox),te=n.geodeticSurfaceNormal(m.fromArray(ee,f-p,yV),yV),R=m.normalize(m.add(H,te,R),R),xf(L,R,G,v,I,t),N=v/3,C=N+1,X=(I-2)/3,g=X-1,k[D++]=X,k[D++]=N,k[D++]=g,k[D++]=g,k[D++]=N,k[D++]=C,v+=3,I-=3;for(H=n.geodeticSurfaceNormal(m.fromArray(J,f,ox),ox),te=n.geodeticSurfaceNormal(m.fromArray(ee,f,yV),yV),R=m.normalize(m.add(H,te,R),R),z+=3,p=0;p<o.length;p++){let $;d=o[p];let be=d.leftPositions,ye=d.rightPositions,ce,Ze,xe=wge,Ge=tO,Ve=nO;if(R=m.fromArray(a,z,R),l(be)){for(xf(L,R,G,void 0,I,t),I-=3,ce=C,Ze=g,$=0;$<be.length/3;$++)xe=m.fromArray(be,$*3,xe),k[D++]=ce,k[D++]=Ze-$-1,k[D++]=Ze-$,oo.addAttribute(A,xe,void 0,I),Ge=m.fromArray(A,(Ze-$-1)*3,Ge),Ve=m.fromArray(A,ce*3,Ve),G=m.normalize(m.subtract(Ge,Ve,G),G),xf(L,R,G,void 0,I,t),I-=3;xe=m.fromArray(A,ce*3,xe),Ge=m.subtract(m.fromArray(A,Ze*3,Ge),xe,Ge),Ve=m.subtract(m.fromArray(A,(Ze-$)*3,Ve),xe,Ve),G=m.normalize(m.add(Ge,Ve,G),G),xf(L,R,G,v,void 0,t),v+=3}else{for(xf(L,R,G,v,void 0,t),v+=3,ce=g,Ze=C,$=0;$<ye.length/3;$++)xe=m.fromArray(ye,$*3,xe),k[D++]=ce,k[D++]=Ze+$,k[D++]=Ze+$+1,oo.addAttribute(A,xe,v),Ge=m.fromArray(A,ce*3,Ge),Ve=m.fromArray(A,(Ze+$)*3,Ve),G=m.normalize(m.subtract(Ge,Ve,G),G),xf(L,R,G,v,void 0,t),v+=3;xe=m.fromArray(A,ce*3,xe),Ge=m.subtract(m.fromArray(A,(Ze+$)*3,Ge),xe,Ge),Ve=m.subtract(m.fromArray(A,Ze*3,Ve),xe,Ve),G=m.normalize(m.negate(m.add(Ve,Ge,G),G),G),xf(L,R,G,void 0,I,t),I-=3}for(J=i[w++],ee=i[w++],J.splice(0,3),ee.splice(ee.length-3,3),A.set(J,v),A.set(ee,I-ee.length+1),f=ee.length-3,z+=3,G=m.fromArray(s,z,G),$=0;$<ee.length;$+=3)H=n.geodeticSurfaceNormal(m.fromArray(J,$,ox),ox),te=n.geodeticSurfaceNormal(m.fromArray(ee,f-$,yV),yV),R=m.normalize(m.add(H,te,R),R),xf(L,R,G,v,I,t),C=v/3,N=C-1,g=(I-2)/3,X=g+1,k[D++]=X,k[D++]=N,k[D++]=g,k[D++]=g,k[D++]=N,k[D++]=C,v+=3,I-=3;v-=3,I+=3}if(R=m.fromArray(a,a.length-3,R),xf(L,R,G,v,I,t),y){v+=3,I-=3,Y=tO,P=nO;let $=r[1];for(p=0;p<O;p++)Y=m.fromArray($,(_-p-1)*3,Y),P=m.fromArray($,p*3,P),oo.addAttribute(A,Y,void 0,I),oo.addAttribute(A,P,v),xf(L,R,G,v,I,t),C=v/3,N=C-1,g=(I-2)/3,X=g+1,k[D++]=X,k[D++]=N,k[D++]=g,k[D++]=g,k[D++]=N,k[D++]=C,v+=3,I-=3}if(c.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:A}),t.st){let $=new Float32Array(S/3*2),be,ye,ce=0;if(y){u/=3,h/=3;let Ze=Math.PI/(_+1);ye=1/(u-_+1),be=1/(h-_+1);let xe,Ge=_/2;for(p=Ge+1;p<_+1;p++)xe=W.PI_OVER_TWO+Ze*p,$[ce++]=be*(1+Math.cos(xe)),$[ce++]=.5*(1+Math.sin(xe));for(p=1;p<h-_+1;p++)$[ce++]=p*be,$[ce++]=0;for(p=_;p>Ge;p--)xe=W.PI_OVER_TWO-p*Ze,$[ce++]=1-be*(1+Math.cos(xe)),$[ce++]=.5*(1+Math.sin(xe));for(p=Ge;p>0;p--)xe=W.PI_OVER_TWO-Ze*p,$[ce++]=1-ye*(1+Math.cos(xe)),$[ce++]=.5*(1+Math.sin(xe));for(p=u-_;p>0;p--)$[ce++]=p*ye,$[ce++]=1;for(p=1;p<Ge+1;p++)xe=W.PI_OVER_TWO+Ze*p,$[ce++]=ye*(1+Math.cos(xe)),$[ce++]=.5*(1+Math.sin(xe))}else{for(u/=3,h/=3,ye=1/(u-1),be=1/(h-1),p=0;p<h;p++)$[ce++]=p*be,$[ce++]=0;for(p=u;p>0;p--)$[ce++]=(p-1)*ye,$[ce++]=1}c.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:$})}return t.normal&&(c.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:L.normals})),t.tangent&&(c.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:L.tangents})),t.bitangent&&(c.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:L.bitangents})),{attributes:c,indices:k}}function Fst(e,t){if(!t.normal&&!t.tangent&&!t.bitangent&&!t.st)return e;let n=e.position.values,i,o;(t.normal||t.bitangent)&&(i=e.normal.values,o=e.bitangent.values);let r=e.position.values.length/18,s=r*3,a=r*2,c=s*2,d;if(t.normal||t.bitangent||t.tangent){let u=t.normal?new Float32Array(s*6):void 0,h=t.tangent?new Float32Array(s*6):void 0,p=t.bitangent?new Float32Array(s*6):void 0,b=Nge,f=Yge,y=tO,_=nO,S=vst,A=wge,Z=c;for(d=0;d<s;d+=3){let V=Z+c;b=m.fromArray(n,d,b),f=m.fromArray(n,d+s,f),y=m.fromArray(n,(d+3)%s,y),f=m.subtract(f,b,f),y=m.subtract(y,b,y),_=m.normalize(m.cross(f,y,_),_),t.normal&&(oo.addAttribute(u,_,V),oo.addAttribute(u,_,V+3),oo.addAttribute(u,_,Z),oo.addAttribute(u,_,Z+3)),(t.tangent||t.bitangent)&&(A=m.fromArray(i,d,A),t.bitangent&&(oo.addAttribute(p,A,V),oo.addAttribute(p,A,V+3),oo.addAttribute(p,A,Z),oo.addAttribute(p,A,Z+3)),t.tangent&&(S=m.normalize(m.cross(A,_,S),S),oo.addAttribute(h,S,V),oo.addAttribute(h,S,V+3),oo.addAttribute(h,S,Z),oo.addAttribute(h,S,Z+3))),Z+=6}if(t.normal){for(u.set(i),d=0;d<s;d+=3)u[d+s]=-i[d],u[d+s+1]=-i[d+1],u[d+s+2]=-i[d+2];e.normal.values=u}else e.normal=void 0;if(t.bitangent?(p.set(o),p.set(o,s),e.bitangent.values=p):e.bitangent=void 0,t.tangent){let V=e.tangent.values;h.set(V),h.set(V,s),e.tangent.values=h}}if(t.st){let u=e.st.values,h=new Float32Array(a*6);h.set(u),h.set(u,a);let p=a*2;for(let b=0;b<2;b++){for(h[p++]=u[0],h[p++]=u[1],d=2;d<a;d+=2){let f=u[d],y=u[d+1];h[p++]=f,h[p++]=y,h[p++]=f,h[p++]=y}h[p++]=u[0],h[p++]=u[1]}e.st.values=h}return e}function t7(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 Ist(e,t){let n=new Xe({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),i=e.ellipsoid,o=oo.computePositions(e),r=kge(o,n,i),s=e.height,a=e.extrudedHeight,c=r.attributes,d=r.indices,u=c.position.values,h=u.length,p=new Float64Array(h*6),b=new Float64Array(h);b.set(u);let f=new Float64Array(h*4);u=Si.scaleToGeodeticHeight(u,s,i),f=t7(u,0,f),b=Si.scaleToGeodeticHeight(b,a,i),f=t7(b,h*2,f),p.set(u),p.set(b,h),p.set(f,h*2),c.position.values=p,c=Fst(c,t);let y,_=h/3;if(e.shadowVolume){let X=c.normal.values;h=X.length;let N=new Float32Array(h*6);for(y=0;y<h;y++)X[y]=-X[y];N.set(X,h),N=t7(X,h*4,N),c.extrudeDirection=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:N}),t.normal||(c.normal=void 0)}if(l(e.offsetAttribute)){let X=new Uint8Array(_*6);if(e.offsetAttribute===dn.TOP)X=X.fill(1,0,_).fill(1,_*2,_*4);else{let N=e.offsetAttribute===dn.NONE?0:1;X=X.fill(N)}c.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:X})}let S=d.length,A=_+_,Z=Me.createTypedArray(p.length/3,S*2+A*3);Z.set(d);let V=S;for(y=0;y<S;y+=3){let X=d[y],N=d[y+1],g=d[y+2];Z[V++]=g+_,Z[V++]=N+_,Z[V++]=X+_}let E,L,v,I;for(y=0;y<A;y+=2)E=y+A,L=E+A,v=E+1,I=L+1,Z[V++]=E,Z[V++]=L,Z[V++]=v,Z[V++]=v,Z[V++]=L,Z[V++]=I;return{attributes:c,indices:Z}}var Pge=new m,CX=new m,Jm=new pe;function Xge(e,t,n,i,o,r){let s=m.subtract(t,e,Pge);m.normalize(s,s);let a=n.geodeticSurfaceNormal(e,CX),c=m.cross(s,a,Pge);m.multiplyByScalar(c,i,c);let d=o.latitude,u=o.longitude,h=r.latitude,p=r.longitude;m.add(e,c,CX),n.cartesianToCartographic(CX,Jm);let b=Jm.latitude,f=Jm.longitude;d=Math.min(d,b),u=Math.min(u,f),h=Math.max(h,b),p=Math.max(p,f),m.subtract(e,c,CX),n.cartesianToCartographic(CX,Jm),b=Jm.latitude,f=Jm.longitude,d=Math.min(d,b),u=Math.min(u,f),h=Math.max(h,b),p=Math.max(p,f),o.latitude=d,o.longitude=u,r.latitude=h,r.longitude=p}var Km=new m,VX=new m,Xd=new pe,Nd=new pe;function Uge(e,t,n,i,o){e=Mge(e,t);let r=Yo(e,m.equalsEpsilon),s=r.length;if(s<2||n<=0)return new ae;let a=n*.5;Xd.latitude=Number.POSITIVE_INFINITY,Xd.longitude=Number.POSITIVE_INFINITY,Nd.latitude=Number.NEGATIVE_INFINITY,Nd.longitude=Number.NEGATIVE_INFINITY;let c,d;if(i===Ji.ROUNDED){let p=r[0];m.subtract(p,r[1],Km),m.normalize(Km,Km),m.multiplyByScalar(Km,a,Km),m.add(p,Km,VX),t.cartesianToCartographic(VX,Jm),c=Jm.latitude,d=Jm.longitude,Xd.latitude=Math.min(Xd.latitude,c),Xd.longitude=Math.min(Xd.longitude,d),Nd.latitude=Math.max(Nd.latitude,c),Nd.longitude=Math.max(Nd.longitude,d)}for(let p=0;p<s-1;++p)Xge(r[p],r[p+1],t,a,Xd,Nd);let u=r[s-1];m.subtract(u,r[s-2],Km),m.normalize(Km,Km),m.multiplyByScalar(Km,a,Km),m.add(u,Km,VX),Xge(u,VX,t,a,Xd,Nd),i===Ji.ROUNDED&&(t.cartesianToCartographic(VX,Jm),c=Jm.latitude,d=Jm.longitude,Xd.latitude=Math.min(Xd.latitude,c),Xd.longitude=Math.min(Xd.longitude,d),Nd.latitude=Math.max(Nd.latitude,c),Nd.longitude=Math.max(Nd.longitude,d));let h=l(o)?o:new ae;return h.north=Nd.latitude,h.south=Xd.latitude,h.east=Nd.longitude,h.west=Xd.longitude,h}function Qb(e){e=e??B.EMPTY_OBJECT;let t=e.positions,n=e.width,i=e.height??0,o=e.extrudedHeight??i;this._positions=t,this._ellipsoid=ie.clone(e.ellipsoid??ie.default),this._vertexFormat=Xe.clone(e.vertexFormat??Xe.DEFAULT),this._width=n,this._height=Math.max(i,o),this._extrudedHeight=Math.min(i,o),this._cornerType=e.cornerType??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*m.packedLength+ie.packedLength+Xe.packedLength+7}Qb.pack=function(e,t,n){n=n??0;let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=m.packedLength)m.pack(i[r],t,n);return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n++]=e._shadowVolume?1:0,t[n]=e._offsetAttribute??-1,t};var Dge=ie.clone(ie.UNIT_SPHERE),Oge=new Xe,jb={positions:void 0,ellipsoid:Dge,vertexFormat:Oge,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};Qb.unpack=function(e,t,n){t=t??0;let i=e[t++],o=new Array(i);for(let f=0;f<i;++f,t+=m.packedLength)o[f]=m.unpack(e,t);let r=ie.unpack(e,t,Dge);t+=ie.packedLength;let s=Xe.unpack(e,t,Oge);t+=Xe.packedLength;let a=e[t++],c=e[t++],d=e[t++],u=e[t++],h=e[t++],p=e[t++]===1,b=e[t];return l(n)?(n._positions=o,n._ellipsoid=ie.clone(r,n._ellipsoid),n._vertexFormat=Xe.clone(s,n._vertexFormat),n._width=a,n._height=c,n._extrudedHeight=d,n._cornerType=u,n._granularity=h,n._shadowVolume=p,n._offsetAttribute=b===-1?void 0:b,n):(jb.positions=o,jb.width=a,jb.height=c,jb.extrudedHeight=d,jb.cornerType=u,jb.granularity=h,jb.shadowVolume=p,jb.offsetAttribute=b===-1?void 0:b,new Qb(jb))};Qb.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 Uge(n,o,i,r,t)};Qb.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=Mge(t,i);let o=Yo(t,m.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,s=e._extrudedHeight,a=!W.equalsEpsilon(r,s,0,W.EPSILON2),c=e._vertexFormat,d={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0},u;if(a)d.height=r,d.extrudedHeight=s,d.shadowVolume=e._shadowVolume,d.offsetAttribute=e._offsetAttribute,u=Ist(d,c);else{let b=oo.computePositions(d);if(u=kge(b,c,i),u.attributes.position.values=Si.scaleToGeodeticHeight(u.attributes.position.values,r,i),l(e._offsetAttribute)){let f=e._offsetAttribute===dn.NONE?0:1,y=u.attributes.position.values.length,_=new Uint8Array(y/3).fill(f);u.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}}let h=u.attributes,p=de.fromVertices(h.position.values,void 0,3);return c.position||(u.attributes.position.values=void 0),new ft({attributes:h,indices:u.indices,primitiveType:ve.TRIANGLES,boundingSphere:p,offsetAttribute:e._offsetAttribute})};Qb.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new Qb({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:o,granularity:i,extrudedHeight:r,height:s,vertexFormat:Xe.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(Qb.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=Uge(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var mS=Qb;var ibi=x(T(),1);var Bge=new m,zge=new m,Pst=new m;function Xst(e,t){for(let n=0;n<e.length;n++)e[n]=t.scaleToGeodeticSurface(e[n],e[n]);return e}function Hge(e,t){let n=[],i=e.positions,o=e.corners,r=e.endPositions,s=new bn,a,c=0,d=0,u,h=0,p;for(u=0;u<i.length;u+=2)p=i[u].length-3,c+=p,h+=p/3*4,d+=i[u+1].length-3;for(c+=3,d+=3,u=0;u<o.length;u++){a=o[u];let P=o[u].leftPositions;l(P)?(p=P.length,c+=p,h+=p/3*2):(p=o[u].rightPositions.length,d+=p,h+=p/3*2)}let b=l(r),f;b&&(f=r[0].length-3,c+=f,d+=f,f/=3,h+=f*4);let y=c+d,_=new Float64Array(y),S=0,A=y-1,Z,V,E,L,v,I,X=f/2,N=Me.createTypedArray(y/3,h+4),g=0;if(N[g++]=S/3,N[g++]=(A-2)/3,b){n.push(S/3),I=Bge,v=zge;let P=r[0];for(u=0;u<X;u++)I=m.fromArray(P,(X-1-u)*3,I),v=m.fromArray(P,(X+u)*3,v),oo.addAttribute(_,v,S),oo.addAttribute(_,I,void 0,A),V=S/3,L=V+1,Z=(A-2)/3,E=Z-1,N[g++]=Z,N[g++]=E,N[g++]=V,N[g++]=L,S+=3,A-=3}let C=0,R=i[C++],G=i[C++];for(_.set(R,S),_.set(G,A-G.length+1),p=G.length-3,n.push(S/3,(A-2)/3),u=0;u<p;u+=3)V=S/3,L=V+1,Z=(A-2)/3,E=Z-1,N[g++]=Z,N[g++]=E,N[g++]=V,N[g++]=L,S+=3,A-=3;for(u=0;u<o.length;u++){let P;a=o[u];let Y=a.leftPositions,O=a.rightPositions,k,D=Pst;if(l(Y)){for(A-=3,k=E,n.push(L),P=0;P<Y.length/3;P++)D=m.fromArray(Y,P*3,D),N[g++]=k-P-1,N[g++]=k-P,oo.addAttribute(_,D,void 0,A),A-=3;n.push(k-Math.floor(Y.length/6)),t===Ji.BEVELED&&n.push((A-2)/3+1),S+=3}else{for(S+=3,k=L,n.push(E),P=0;P<O.length/3;P++)D=m.fromArray(O,P*3,D),N[g++]=k+P,N[g++]=k+P+1,oo.addAttribute(_,D,S),S+=3;n.push(k+Math.floor(O.length/6)),t===Ji.BEVELED&&n.push(S/3-1),A-=3}for(R=i[C++],G=i[C++],R.splice(0,3),G.splice(G.length-3,3),_.set(R,S),_.set(G,A-G.length+1),p=G.length-3,P=0;P<G.length;P+=3)L=S/3,V=L-1,E=(A-2)/3,Z=E+1,N[g++]=Z,N[g++]=E,N[g++]=V,N[g++]=L,S+=3,A-=3;S-=3,A+=3,n.push(S/3,(A-2)/3)}if(b){S+=3,A-=3,I=Bge,v=zge;let P=r[1];for(u=0;u<X;u++)I=m.fromArray(P,(f-u-1)*3,I),v=m.fromArray(P,u*3,v),oo.addAttribute(_,I,void 0,A),oo.addAttribute(_,v,S),L=S/3,V=L-1,E=(A-2)/3,Z=E+1,N[g++]=Z,N[g++]=E,N[g++]=V,N[g++]=L,S+=3,A-=3;n.push(S/3)}else n.push(S/3,(A-2)/3);return N[g++]=S/3,N[g++]=(A-2)/3,s.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:_}),{attributes:s,indices:N,wallIndices:n}}function Nst(e){let t=e.ellipsoid,n=oo.computePositions(e),i=Hge(n,e.cornerType),o=i.wallIndices,r=e.height,s=e.extrudedHeight,a=i.attributes,c=i.indices,d=a.position.values,u=d.length,h=new Float64Array(u);h.set(d);let p=new Float64Array(u*2);if(d=Si.scaleToGeodeticHeight(d,r,t),h=Si.scaleToGeodeticHeight(h,s,t),p.set(d),p.set(h,u),a.position.values=p,u/=3,l(e.offsetAttribute)){let Z=new Uint8Array(u*2);if(e.offsetAttribute===dn.TOP)Z=Z.fill(1,0,u);else{let V=e.offsetAttribute===dn.NONE?0:1;Z=Z.fill(V)}a.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:Z})}let b,f=c.length,y=Me.createTypedArray(p.length/3,(f+o.length)*2);y.set(c);let _=f;for(b=0;b<f;b+=2){let Z=c[b],V=c[b+1];y[_++]=Z+u,y[_++]=V+u}let S,A;for(b=0;b<o.length;b++)S=o[b],A=S+u,y[_++]=S,y[_++]=A;return{attributes:a,indices:y}}function RX(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*m.packedLength+ie.packedLength+6}RX.pack=function(e,t,n){n=n??0;let i=e._positions,o=i.length;t[n++]=o;for(let r=0;r<o;++r,n+=m.packedLength)m.pack(i[r],t,n);return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,t[n++]=e._width,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._cornerType,t[n++]=e._granularity,t[n]=e._offsetAttribute??-1,t};var Kge=ie.clone(ie.UNIT_SPHERE),rx={positions:void 0,ellipsoid:Kge,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};RX.unpack=function(e,t,n){t=t??0;let i=e[t++],o=new Array(i);for(let p=0;p<i;++p,t+=m.packedLength)o[p]=m.unpack(e,t);let r=ie.unpack(e,t,Kge);t+=ie.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],h=e[t];return l(n)?(n._positions=o,n._ellipsoid=ie.clone(r,n._ellipsoid),n._width=s,n._height=a,n._extrudedHeight=c,n._cornerType=d,n._granularity=u,n._offsetAttribute=h===-1?void 0:h,n):(rx.positions=o,rx.width=s,rx.height=a,rx.extrudedHeight=c,rx.cornerType=d,rx.granularity=u,rx.offsetAttribute=h===-1?void 0:h,new RX(rx))};RX.createGeometry=function(e){let t=e._positions,n=e._width,i=e._ellipsoid;t=Xst(t,i);let o=Yo(t,m.equalsEpsilon);if(o.length<2||n<=0)return;let r=e._height,s=e._extrudedHeight,a=!W.equalsEpsilon(r,s,0,W.EPSILON2),c={ellipsoid:i,positions:o,width:n,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1},d;if(a)c.height=r,c.extrudedHeight=s,c.offsetAttribute=e._offsetAttribute,d=Nst(c);else{let p=oo.computePositions(c);if(d=Hge(p,c.cornerType),d.attributes.position.values=Si.scaleToGeodeticHeight(d.attributes.position.values,r,i),l(e._offsetAttribute)){let b=d.attributes.position.values.length,f=e._offsetAttribute===dn.NONE?0:1,y=new Uint8Array(b/3).fill(f);d.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})}}let u=d.attributes,h=de.fromVertices(u.position.values,void 0,3);return new ft({attributes:u,indices:d.indices,primitiveType:ve.LINES,boundingSphere:h,offsetAttribute:e._offsetAttribute})};var EX=RX;var pbi=x(T(),1);var Yst=new ci(0);function ql(e){Ti.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}l(Object.create)&&(ql.prototype=Object.create(Ti.prototype),ql.prototype.constructor=ql);Object.defineProperties(ql.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});ql.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!l(t.height)&&!l(t.extrudedHeight)&&El.isSupported(this._scene)};ql.prototype._getIsClosed=function(e){let t=e.height,n=e.extrudedHeight;return t===0||l(n)&&n!==t};ql.prototype._computeCenter=he.throwInstantiationError;ql.prototype._onEntityPropertyChanged=function(e,t,n,i){if(Ti.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))&&Tt(Tt.geometryZIndex),this._zIndex=o.zIndex??Yst,l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);let r=o.heightReference,s=o.extrudedHeightReference;if(l(r)||l(s)){let a=new Mh(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new JT(this._scene,a,r,s)}};ql.prototype.destroy=function(){l(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),Ti.prototype.destroy.call(this)};ql.getGeometryHeight=function(e,t){if(!l(e)){t!==tt.NONE&&Tt(Tt.geometryHeightReference);return}return pm(t)?0:e};ql.getGeometryExtrudedHeight=function(e,t){if(!l(e)){t!==tt.NONE&&Tt(Tt.geometryExtrudedHeightReference);return}return pm(t)?ql.CLAMP_TO_GROUND:e};ql.CLAMP_TO_GROUND="clamp";ql.computeGeometryOffsetAttribute=function(e,t,n,i){(!l(e)||!l(t))&&(t=tt.NONE),(!l(n)||!l(i))&&(i=tt.NONE);let o=0;if(t!==tt.NONE&&o++,i===tt.RELATIVE_TO_GROUND&&o++,o===2)return dn.ALL;if(o===1)return dn.TOP};var $n=ql;var Jge=new U,jge=m.ZERO,Qge=new m,qge=new ae;function wst(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 Tf(e,t){$n.call(this,{entity:e,scene:t,geometryOptions:new wst(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}l(Object.create)&&(Tf.prototype=Object.create($n.prototype),Tf.prototype.constructor=Tf);Tf.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Bt){let o;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,Jge)),l(o)||(o=U.WHITE),i.color=Ht.fromColor(o)}return l(this._options.offsetAttribute)&&(i.offset=fo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,jge,Qge))),new Wt({id:t,geometry:new mS(this._options),attributes:i})};Tf.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,Jge),o={show:new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return l(this._options.offsetAttribute)&&(o.offset=fo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,jge,Qge))),new Wt({id:t,geometry:new EX(this._options),attributes:o})};Tf.prototype._computeCenter=function(e,t){let n=j.getValueOrUndefined(this._entity.corridor.positions,e);if(!(!l(n)||n.length===0))return m.clone(n[Math.floor(n.length/2)],t)};Tf.prototype._isHidden=function(e,t){return!l(t.positions)||!l(t.width)||Ti.prototype._isHidden.call(this,e,t)};Tf.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 Bt)};Tf.prototype._setStaticOptions=function(e,t){let n=j.getValueOrUndefined(t.height,Je.MINIMUM_VALUE),i=j.getValueOrDefault(t.heightReference,Je.MINIMUM_VALUE,tt.NONE),o=j.getValueOrUndefined(t.extrudedHeight,Je.MINIMUM_VALUE),r=j.getValueOrDefault(t.extrudedHeightReference,Je.MINIMUM_VALUE,tt.NONE);l(o)&&!l(n)&&(n=0);let s=this._options;s.vertexFormat=this._materialProperty instanceof Bt?hn.VERTEX_FORMAT:po.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(Je.MINIMUM_VALUE,s.positions),s.width=t.width.getValue(Je.MINIMUM_VALUE),s.granularity=j.getValueOrUndefined(t.granularity,Je.MINIMUM_VALUE),s.cornerType=j.getValueOrUndefined(t.cornerType,Je.MINIMUM_VALUE),s.offsetAttribute=$n.computeGeometryOffsetAttribute(n,i,o,r),s.height=$n.getGeometryHeight(n,i),o=$n.getGeometryExtrudedHeight(o,r),o===$n.CLAMP_TO_GROUND&&(o=Ei.getMinimumMaximumHeights(mS.computeRectangle(s,qge)).minimumTerrainHeight),s.extrudedHeight=o};Tf.DynamicGeometryUpdater=xV;function xV(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(xV.prototype=Object.create(xi.prototype),xV.prototype.constructor=xV);xV.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.positions)||!l(i.width)||xi.prototype._isHidden.call(this,e,t,n)};xV.prototype._setOptions=function(e,t,n){let i=this._options,o=j.getValueOrUndefined(t.height,n),r=j.getValueOrDefault(t.heightReference,n,tt.NONE),s=j.getValueOrUndefined(t.extrudedHeight,n),a=j.getValueOrDefault(t.extrudedHeightReference,n,tt.NONE);l(s)&&!l(o)&&(o=0),i.positions=j.getValueOrUndefined(t.positions,n),i.width=j.getValueOrUndefined(t.width,n),i.granularity=j.getValueOrUndefined(t.granularity,n),i.cornerType=j.getValueOrUndefined(t.cornerType,n),i.offsetAttribute=$n.computeGeometryOffsetAttribute(o,r,s,a),i.height=$n.getGeometryHeight(o,r),s=$n.getGeometryExtrudedHeight(s,a),s===$n.CLAMP_TO_GROUND&&(s=Ei.getMinimumMaximumHeights(mS.computeRectangle(i,qge)).minimumTerrainHeight),i.extrudedHeight=s};var GX=Tf;var hyi=x(T(),1);var kbi=x(T(),1);function iO(){he.throwInstantiationError()}Object.defineProperties(iO.prototype,{name:{get:he.throwInstantiationError},clock:{get:he.throwInstantiationError},entities:{get:he.throwInstantiationError},isLoading:{get:he.throwInstantiationError},changedEvent:{get:he.throwInstantiationError},errorEvent:{get:he.throwInstantiationError},loadingEvent:{get:he.throwInstantiationError},show:{get:he.throwInstantiationError},clustering:{get:he.throwInstantiationError}});iO.prototype.update=function(e){he.throwInstantiationError()};iO.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))};var gs=iO;var ayi=x(T(),1);var Kbi=x(T(),1);function Xp(e,t){this._ellipsoid=e,this._cameraPosition=new m,this._cameraPositionInScaledSpace=new m,this._distanceToLimbInScaledSpaceSquared=0,l(t)&&(this.cameraPosition=t)}Object.defineProperties(Xp.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=m.magnitudeSquared(n)-1;m.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=n,this._distanceToLimbInScaledSpaceSquared=i}}});var $ge=new m;Xp.prototype.isPointVisible=function(e){let n=this._ellipsoid.transformPositionToScaledSpace(e,$ge);return i7(n,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};Xp.prototype.isScaledSpacePointVisible=function(e){return i7(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var Mst=new m;Xp.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(e,t){let n=this._ellipsoid,i,o;return l(t)&&t<0&&n.minimumRadius>-t?(o=Mst,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),i7(e,o,i)};Xp.prototype.computeHorizonCullingPoint=function(e,t,n){return nye(this._ellipsoid,e,t,n)};var eye=ie.clone(ie.UNIT_SPHERE);Xp.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,n,i){let o=tye(this._ellipsoid,n,eye);return nye(o,e,t,i)};Xp.prototype.computeHorizonCullingPointFromVertices=function(e,t,n,i,o){return iye(this._ellipsoid,e,t,n,i,o)};Xp.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,n,i,o,r){let s=tye(this._ellipsoid,o,eye);return iye(s,e,t,n,i,r)};var kst=[];Xp.prototype.computeHorizonCullingPointFromRectangle=function(e,t,n){let i=ae.subsample(e,t,0,kst),o=de.fromPoints(i);if(!(m.magnitude(o.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(o.center,i,n)};var Ust=new m;function tye(e,t,n){if(l(t)&&t<0&&e.minimumRadius>-t){let i=m.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,Ust);e=ie.fromCartesian3(i,n)}return e}function nye(e,t,n,i){l(i)||(i=new m);let o=sye(e,t),r=0;for(let s=0,a=n.length;s<a;++s){let c=n[s],d=oye(e,c,o);if(d<0)return;r=Math.max(r,d)}return rye(o,r,i)}var oO=new m;function iye(e,t,n,i,o,r){l(r)||(r=new m),i=i??3,o=o??m.ZERO;let s=sye(e,t),a=0;for(let c=0,d=n.length;c<d;c+=i){oO.x=n[c]+o.x,oO.y=n[c+1]+o.y,oO.z=n[c+2]+o.z;let u=oye(e,oO,s);if(u<0)return;a=Math.max(a,u)}return rye(s,a,r)}function i7(e,t,n){let i=t,o=n,r=m.subtract(e,i,$ge),s=-m.dot(r,i);return!(o<0?s>0:s>o&&s*s/m.magnitudeSquared(r)>o)}var Dst=new m,Ost=new m;function oye(e,t,n){let i=e.transformPositionToScaledSpace(t,Dst),o=m.magnitudeSquared(i),r=Math.sqrt(o),s=m.divideByScalar(i,r,Ost);o=Math.max(1,o),r=Math.max(1,r);let a=m.dot(s,n),c=m.magnitude(m.cross(s,n,s)),d=1/r,u=Math.sqrt(o-1)*d;return 1/(a*d-c*u)}function rye(e,t,n){if(!(t<=0||t===1/0||t!==t))return m.multiplyByScalar(e,t,n)}var n7=new m;function sye(e,t){return m.equals(t,m.ZERO)?t:(e.transformPositionToScaledSpace(t,n7),m.normalize(n7,n7))}var _f=Xp;var lgi=x(T(),1);function qr(e,t){e=e??B.EMPTY_OBJECT;let n=e.translucencyByDistance,i=e.scaleByDistance,o=e.distanceDisplayCondition;l(n)&&(n=wt.clone(n)),l(i)&&(i=wt.clone(i)),l(o)&&(o=Yt.clone(o)),this._show=e.show??!0,this._position=m.clone(e.position??m.ZERO),this._actualPosition=m.clone(this._position),this._color=U.clone(e.color??U.WHITE),this._outlineColor=U.clone(e.outlineColor??U.TRANSPARENT),this._outlineWidth=e.outlineWidth??0,this._pixelSize=e.pixelSize??10,this._scaleByDistance=i,this._translucencyByDistance=n,this._distanceDisplayCondition=o,this._disableDepthTestDistance=e.disableDepthTestDistance??0,this._id=e.id,this._collection=e.collection??t,this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1,this._splitDirection=e.splitDirection??Er.NONE}var aye=qr.SHOW_INDEX=0,dye=qr.POSITION_INDEX=1,Bst=qr.COLOR_INDEX=2,zst=qr.OUTLINE_COLOR_INDEX=3,Hst=qr.OUTLINE_WIDTH_INDEX=4,Kst=qr.PIXEL_SIZE_INDEX=5,Jst=qr.SCALE_BY_DISTANCE_INDEX=6,jst=qr.TRANSLUCENCY_BY_DISTANCE_INDEX=7,Qst=qr.DISTANCE_DISPLAY_CONDITION_INDEX=8,qst=qr.DISABLE_DEPTH_DISTANCE_INDEX=9,$st=qr.SPLIT_DIRECTION_INDEX=10;qr.NUMBER_OF_PROPERTIES=11;function Cu(e,t){let n=e._pointPrimitiveCollection;l(n)&&(n._updatePointPrimitive(e,t),e._dirty=!0)}Object.defineProperties(qr.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,Cu(this,aye))}},position:{get:function(){return this._position},set:function(e){let t=this._position;m.equals(t,e)||(m.clone(e,t),m.clone(e,this._actualPosition),Cu(this,dye))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){let t=this._scaleByDistance;wt.equals(t,e)||(this._scaleByDistance=wt.clone(e,t),Cu(this,Jst))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){let t=this._translucencyByDistance;wt.equals(t,e)||(this._translucencyByDistance=wt.clone(e,t),Cu(this,jst))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){this._pixelSize!==e&&(this._pixelSize=e,Cu(this,Kst))}},color:{get:function(){return this._color},set:function(e){let t=this._color;U.equals(t,e)||(U.clone(e,t),Cu(this,Bst))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){let t=this._outlineColor;U.equals(t,e)||(U.clone(e,t),Cu(this,zst))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,Cu(this,Hst))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){Yt.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=Yt.clone(e,this._distanceDisplayCondition),Cu(this,Qst))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,Cu(this,qst))}},id:{get:function(){return this._id},set:function(e){this._id=e,l(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,Cu(this,aye))}},splitDirection:{get:function(){return this._splitDirection},set:function(e){this._splitDirection!==e&&(this._splitDirection=e,Cu(this,$st))}}});qr.prototype.getPickId=function(e){return l(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId};qr.prototype._getActualPosition=function(){return this._actualPosition};qr.prototype._setActualPosition=function(e){m.clone(e,this._actualPosition),Cu(this,dye)};var cye=new se;qr._computeActualPosition=function(e,t,n){return t.mode===re.SCENE3D?e:(F.multiplyByPoint(n,e,cye),no.computeActualEllipsoidPosition(t,cye))};var lye=new se;qr._computeScreenSpacePosition=function(e,t,n,i){let o=F.multiplyByVector(e,se.fromElements(t.x,t.y,t.z,1,lye),lye);return no.worldToWindowCoordinates(n,o,i)};qr.prototype.computeScreenSpacePosition=function(e,t){let n=this._pointPrimitiveCollection;l(t)||(t=new M);let i=n.modelMatrix,o=qr._computeScreenSpacePosition(i,this._actualPosition,e,t);if(l(o))return o.y=e.canvas.clientHeight-o.y,o};qr.getScreenSpaceBoundingBox=function(e,t,n){let i=e.pixelSize,o=i*.5,r=t.x-o,s=t.y-o,a=i,c=i;return l(n)||(n=new Qe),n.x=r,n.y=s,n.width=a,n.height=c,n};qr.prototype.equals=function(e){return this===e||l(e)&&this._id===e._id&&m.equals(this._position,e._position)&&U.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&U.equals(this._outlineColor,e._outlineColor)&&wt.equals(this._scaleByDistance,e._scaleByDistance)&&wt.equals(this._translucencyByDistance,e._translucencyByDistance)&&Yt.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance&&this._splitDirection===e._splitDirection};qr.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0};var xa=qr;var kgi=x(T(),1);var ugi=x(T(),1),sx=`in vec4 v_color;
in vec4 v_outlineColor;
in float v_innerPercent;
in float v_pixelDistance;
in vec4 v_pickColor;
in float v_splitDirection;
void main()
{
if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
// The distance in UV space from this fragment to the center of the point, at most 0.5.
float distanceToCenter = length(gl_PointCoord - vec2(0.5));
// The max distance stops one pixel shy of the edge to leave space for anti-aliasing.
float maxDistance = max(0.0, 0.5 - v_pixelDistance);
float wholeAlpha = 1.0 - smoothstep(maxDistance, 0.5, distanceToCenter);
float innerAlpha = 1.0 - smoothstep(maxDistance * v_innerPercent, 0.5 * v_innerPercent, distanceToCenter);
vec4 color = mix(v_outlineColor, v_color, innerAlpha);
color.a *= wholeAlpha;
// Fully transparent parts of the billboard are not pickable.
#if !defined(OPAQUE) && !defined(TRANSLUCENT)
if (color.a < 0.005) // matches 0/255 and 1/255
{
discard;
}
#else
// The billboard is rendered twice. The opaque pass discards translucent fragments
// and the translucent pass discards opaque fragments.
#ifdef OPAQUE
if (color.a < 0.995) // matches < 254/255
{
discard;
}
#else
if (color.a >= 0.995) // matches 254/255 and 255/255
{
discard;
}
#endif
#endif
out_FragColor = czm_gammaCorrect(color);
czm_writeLogDepth();
}
`;var hgi=x(T(),1),LX=`uniform float u_maxTotalPointSize;
in vec4 positionHighAndSize;
in vec4 positionLowAndOutline;
in vec4 compressedAttribute0; // color, outlineColor, pick color
in vec4 compressedAttribute1; // show, translucency by distance, some free space
in vec4 scaleByDistance; // near, nearScale, far, farScale
in vec4 distanceDisplayConditionAndDisableDepthAndSplitDirection; // near, far, disableDepthTestDistance, splitDirection
out vec4 v_color;
out vec4 v_outlineColor;
out float v_innerPercent;
out float v_pixelDistance;
out vec4 v_pickColor;
out float v_splitDirection;
const float SHIFT_LEFT8 = 256.0;
const float SHIFT_RIGHT8 = 1.0 / 256.0;
void main()
{
// Modifying this shader may also require modifications to PointPrimitive._computeScreenSpacePosition
// unpack attributes
vec3 positionHigh = positionHighAndSize.xyz;
vec3 positionLow = positionLowAndOutline.xyz;
float outlineWidthBothSides = 2.0 * positionLowAndOutline.w;
float totalSize = positionHighAndSize.w + outlineWidthBothSides;
float outlinePercent = outlineWidthBothSides / totalSize;
// Scale in response to browser-zoom.
totalSize *= czm_pixelRatio;
float temp = compressedAttribute1.x * SHIFT_RIGHT8;
float show = floor(temp);
#ifdef EYE_DISTANCE_TRANSLUCENCY
vec4 translucencyByDistance;
translucencyByDistance.x = compressedAttribute1.z;
translucencyByDistance.z = compressedAttribute1.w;
translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
temp = compressedAttribute1.y * SHIFT_RIGHT8;
translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;
#endif
///////////////////////////////////////////////////////////////////////////
vec4 color = czm_decodeRGB8(compressedAttribute0.x);
vec4 outlineColor = czm_decodeRGB8(compressedAttribute0.y);
vec4 pickColor = czm_decodeRGB8(compressedAttribute0.z);
vec4 alphaPacked = czm_decodeRGB8(compressedAttribute0.w);
color.a = alphaPacked.x;
outlineColor.a = alphaPacked.y;
pickColor.a = alphaPacked.z;
///////////////////////////////////////////////////////////////////////////
vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
vec4 positionEC = czm_modelViewRelativeToEye * p;
///////////////////////////////////////////////////////////////////////////
#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)
float lengthSq;
if (czm_sceneMode == czm_sceneMode2D)
{
// 2D camera distance is a special case
// treat all billboards as flattened to the z=0.0 plane
lengthSq = czm_eyeHeight2D.y;
}
else
{
lengthSq = dot(positionEC.xyz, positionEC.xyz);
}
#endif
#ifdef EYE_DISTANCE_SCALING
totalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);
#endif
if (totalSize > 0.0) {
// Add padding for anti-aliasing on both sides.
totalSize += 3.0;
}
// Clamp to max point size.
totalSize = min(totalSize, u_maxTotalPointSize);
// If size is too small, push vertex behind near plane for clipping.
// Note that context.minimumAliasedPointSize "will be at most 1.0".
if (totalSize < 1.0)
{
positionEC.xyz = vec3(0.0);
totalSize = 1.0;
}
float translucency = 1.0;
#ifdef EYE_DISTANCE_TRANSLUCENCY
translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);
// push vertex behind near plane for clipping
if (translucency < 0.004)
{
positionEC.xyz = vec3(0.0);
}
#endif
#ifdef DISTANCE_DISPLAY_CONDITION
float nearSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.x;
float farSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.y;
if (lengthSq < nearSq || lengthSq > farSq) {
// push vertex behind camera to force it to be clipped
positionEC.xyz = vec3(0.0, 0.0, 1.0);
}
#endif
gl_Position = czm_projection * positionEC;
czm_vertexLogDepth();
#ifdef DISABLE_DEPTH_DISTANCE
float disableDepthTestDistance = distanceDisplayConditionAndDisableDepthAndSplitDirection.z;
if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)
{
disableDepthTestDistance = czm_minimumDisableDepthTestDistance;
}
if (disableDepthTestDistance != 0.0)
{
// Don't try to "multiply both sides" by w. Greater/less-than comparisons won't work for negative values of w.
float zclip = gl_Position.z / gl_Position.w;
bool clipped = (zclip < -1.0 || zclip > 1.0);
if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))
{
// Position z on the near plane.
gl_Position.z = -gl_Position.w;
#ifdef LOG_DEPTH
czm_vertexLogDepth(vec4(czm_currentFrustum.x));
#endif
}
}
#endif
v_color = color;
v_color.a *= translucency * show;
v_outlineColor = outlineColor;
v_outlineColor.a *= translucency * show;
v_innerPercent = 1.0 - outlinePercent;
v_pixelDistance = 2.0 / totalSize;
gl_PointSize = totalSize * show;
gl_Position *= show;
v_pickColor = pickColor;
v_splitDirection = distanceDisplayConditionAndDisableDepthAndSplitDirection.w;
}
`;var eat=xa.SHOW_INDEX,s7=xa.POSITION_INDEX,uye=xa.COLOR_INDEX,tat=xa.OUTLINE_COLOR_INDEX,nat=xa.OUTLINE_WIDTH_INDEX,iat=xa.PIXEL_SIZE_INDEX,mye=xa.SCALE_BY_DISTANCE_INDEX,hye=xa.TRANSLUCENCY_BY_DISTANCE_INDEX,fye=xa.DISTANCE_DISPLAY_CONDITION_INDEX,oat=xa.DISABLE_DEPTH_DISTANCE_INDEX,rat=xa.SPLIT_DIRECTION_INDEX,a7=xa.NUMBER_OF_PROPERTIES,al={positionHighAndSize:0,positionLowAndOutline:1,compressedAttribute0:2,compressedAttribute1:3,scaleByDistance:4,distanceDisplayConditionAndDisableDepthAndSplitDirection:5};function jm(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(a7),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??zo.OPAQUE_AND_TRANSLUCENT,this._blendOption=void 0,this._mode=re.SCENE3D,this._maxTotalPointSize=1,this._buffersUsage=[Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW,Fe.STATIC_DRAW];let t=this;this._uniforms={u_maxTotalPointSize:function(){return t._maxTotalPointSize}}}Object.defineProperties(jm.prototype,{length:{get:function(){return c7(this),this._pointPrimitives.length}}});function pye(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}jm.prototype.add=function(e){let t=new xa(e,this);return t._index=this._pointPrimitives.length,this._pointPrimitives.push(t),this._createVertexArray=!0,t};jm.prototype.remove=function(e){return this.contains(e)?(this._pointPrimitives[e._index]=null,this._pointPrimitivesRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};jm.prototype.removeAll=function(){pye(this._pointPrimitives),this._pointPrimitives=[],this._pointPrimitivesToUpdate=[],this._pointPrimitivesToUpdateIndex=0,this._pointPrimitivesRemoved=!1,this._createVertexArray=!0};function c7(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}}jm.prototype._updatePointPrimitive=function(e,t){e._dirty||(this._pointPrimitivesToUpdate[this._pointPrimitivesToUpdateIndex++]=e),++this._propertiesChanged[t]};jm.prototype.contains=function(e){return l(e)&&e._pointPrimitiveCollection===this};jm.prototype.get=function(e){return c7(this),this._pointPrimitives[e]};jm.prototype.computeNewBuffersUsage=function(){let e=this._buffersUsage,t=!1,n=this._propertiesChanged;for(let i=0;i<a7;++i){let o=n[i]===0?Fe.STATIC_DRAW:Fe.STREAM_DRAW;t=t||e[i]!==o,e[i]=o}return t};function sat(e,t,n){return new k0(e,[{index:al.positionHighAndSize,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[s7]},{index:al.positionLowAndShow,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[s7]},{index:al.compressedAttribute0,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[uye]},{index:al.compressedAttribute1,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[hye]},{index:al.scaleByDistance,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[mye]},{index:al.distanceDisplayConditionAndDisableDepthAndSplitDirection,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:n[fye]}],t)}var o7=new Tn,rO=new U;function bye(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),Tn.fromCartesian(r,o7);let s=i.pixelSize,a=i.outlineWidth;e._maxPixelSize=Math.max(e._maxPixelSize,s+a);let c=n[al.positionHighAndSize],d=o7.high;c(o,d.x,d.y,d.z,s);let u=n[al.positionLowAndOutline],h=o7.low;u(o,h.x,h.y,h.z,a)}var aat=256;function gye(e,t,n,i){let o=i._index,r=i.color,s=i.outlineColor,a=i.getPickId(t).color;rO.red=r.alpha,rO.green=s.alpha,rO.blue=a.alpha;let c=n[al.compressedAttribute0];c(o,cn.encodeRGB8(r),cn.encodeRGB8(s),cn.encodeRGB8(a),cn.encodeRGB8(rO))}function yye(e,t,n,i){let o=i._index,r=0,s=1,a=1,c=1,d=i.translucencyByDistance;l(d)&&(r=d.near,s=d.nearValue,a=d.far,c=d.farValue,(s!==1||c!==1)&&(e._shaderTranslucencyByDistance=!0));let u=i.show&&i.clusterShow;i.color.alpha===0&&i.outlineColor.alpha===0&&(u=!1),s=W.clamp(s,0,1),s=s===1?255:s*255|0;let h=(u?1:0)*aat+s;c=W.clamp(c,0,1),c=c===1?255:c*255|0;let p=c,b=n[al.compressedAttribute1];b(o,h,p,r,a)}function xye(e,t,n,i){let o=i._index,r=n[al.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 Tye(e,t,n,i){let o=i._index,r=n[al.distanceDisplayConditionAndDisableDepthAndSplitDirection],s=0,a=Number.MAX_VALUE,c=i.distanceDisplayCondition;l(c)&&(s=c.near,a=c.far,s*=s,a*=a,e._shaderDistanceDisplayCondition=!0);let d=i.disableDepthTestDistance;d*=d,d>0&&(e._shaderDisableDepthDistance=!0,d===Number.POSITIVE_INFINITY&&(d=-1));let u=0,h=i.splitDirection;l(h)&&(u=h),r(o,s,a,d,u)}function cat(e,t,n,i){bye(e,t,n,i),gye(e,t,n,i),yye(e,t,n,i),xye(e,t,n,i),Tye(e,t,n,i)}function r7(e,t,n,i,o,r){let s;i.mode===re.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;let a=[];for(let c=0;c<n;++c){let d=t[c],u=d.position,h=xa._computeActualPosition(u,i,o);l(h)&&(d._setActualPosition(h),r?a.push(h):de.expand(s,h,s))}r&&de.fromPoints(a,s)}function lat(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)&&r7(e,i,i.length,t,r,!0)):n===re.MORPHING?r7(e,i,i.length,t,r,!0):(n===re.SCENE2D||n===re.COLUMBUS_VIEW)&&r7(e,o,e._pointPrimitivesToUpdateIndex,t,r,!1)}function dat(e,t,n){let o=t.camera.getPixelSize(n,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize;n.radius+=o}var uat=[];jm.prototype.update=function(e){if(c7(this),!this.show)return;this._maxTotalPointSize=Lt.maximumAliasedPointSize,lat(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<a7;++E)r[E]=0;if(this._vaf=this._vaf&&this._vaf.destroy(),n>0){this._vaf=sat(c,n,this._buffersUsage),a=this._vaf.writers;for(let E=0;E<n;++E){let L=this._pointPrimitives[E];L._dirty=!1,cat(this,c,a,L)}this._vaf.commit()}this._pointPrimitivesToUpdateIndex=0}else if(o>0){let E=uat;E.length=0,(r[s7]||r[nat]||r[iat])&&E.push(bye),(r[uye]||r[tat])&&E.push(gye),(r[eat]||r[hye])&&E.push(yye),r[mye]&&E.push(xye),(r[fye]||r[oat]||r[rat])&&E.push(Tye);let L=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<L;++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<L;++X)E[X](this,c,a,I);this._vaf.subCommit(I._index,1)}this._vaf.endSubCommits()}this._pointPrimitivesToUpdateIndex=0}if(o>n*1.5&&(i.length=n),!l(this._vaf)||!l(this._vaf.va))return;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,de.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));let h,p=F.IDENTITY;e.mode===re.SCENE3D?(p=this.modelMatrix,h=de.clone(this._baseVolumeWC,this._boundingVolume)):h=de.clone(this._baseVolume2D,this._boundingVolume),dat(this,e,h);let b=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,b&&(this._blendOption===zo.OPAQUE||this._blendOption===zo.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=De.fromCache({depthTest:{enabled:!0,func:ne.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===zo.TRANSLUCENT||this._blendOption===zo.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=De.fromCache({depthTest:{enabled:!0,func:ne.LEQUAL},depthMask:!1,blending:tn.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 Be({sources:[LX]}),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===zo.OPAQUE_AND_TRANSLUCENT&&(y=new Be({defines:["OPAQUE"],sources:[sx]}),this._sp=qt.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:f,fragmentShaderSource:y,attributeLocations:al}),y=new Be({defines:["TRANSLUCENT"],sources:[sx]}),this._spTranslucent=qt.replaceCache({context:c,shaderProgram:this._spTranslucent,vertexShaderSource:f,fragmentShaderSource:y,attributeLocations:al})),this._blendOption===zo.OPAQUE&&(y=new Be({sources:[sx]}),this._sp=qt.replaceCache({context:c,shaderProgram:this._sp,vertexShaderSource:f,fragmentShaderSource:y,attributeLocations:al})),this._blendOption===zo.TRANSLUCENT&&(y=new Be({sources:[sx]}),this._spTranslucent=qt.replaceCache({context:c,shaderProgram:this._spTranslucent,vertexShaderSource:f,fragmentShaderSource:y,attributeLocations:al})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);let _,S,A,Z,V=e.commandList;if(d.render||u){let E=this._colorCommands,L=this._blendOption===zo.OPAQUE,v=this._blendOption===zo.OPAQUE_AND_TRANSLUCENT;_=this._vaf.va,S=_.length,E.length=S;let I=v?S*2:S;for(Z=0;Z<I;++Z){let X=L||v&&Z%2===0;A=E[Z],l(A)||(A=E[Z]=new et),A.primitiveType=ve.POINTS,A.pass=X||!v?Le.OPAQUE:Le.TRANSLUCENT,A.owner=this;let N=v?Math.floor(Z/2):Z;A.boundingVolume=h,A.modelMatrix=p,A.shaderProgram=X?this._sp:this._spTranslucent,A.uniformMap=this._uniforms,A.vertexArray=_[N].va,A.renderState=X?this._rsOpaque:this._rsTranslucent,A.debugShowBoundingVolume=this.debugShowBoundingVolume,A.pickId="v_pickColor",V.push(A)}}};jm.prototype.isDestroyed=function(){return!1};jm.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(),pye(this._pointPrimitives),me(this)};var TV=jm;var Dgi=x(T(),1),_ye=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],l7=1,WX=8,FX=class e{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[n,i]=new Uint8Array(t,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");let o=i>>4;if(o!==l7)throw new Error(`Got v${o} data when expected v${l7}.`);let r=_ye[i&15];if(!r)throw new Error("Unrecognized array type.");let[s]=new Uint16Array(t,2,1),[a]=new Uint32Array(t,4,1);return new e(a,s,r,t)}constructor(t,n=64,i=Float64Array,o){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=i,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let r=_ye.indexOf(this.ArrayType),s=t*2*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,c=(8-a%8)%8;if(r<0)throw new Error(`Unexpected typed array class: ${i}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,WX,t),this.coords=new this.ArrayType(this.data,WX+a+c,t*2),this._pos=t*2,this._finished=!0):(this.data=new ArrayBuffer(WX+s+a+c),this.ids=new this.IndexArrayType(this.data,WX,t),this.coords=new this.ArrayType(this.data,WX+a+c,t*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(l7<<4)+r]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=t)}add(t,n){let i=this._pos>>1;return this.ids[i]=i,this.coords[this._pos++]=t,this.coords[this._pos++]=n,i}finish(){let t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return u7(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,n,i,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:r,coords:s,nodeSize:a}=this,c=[0,r.length-1,0],d=[];for(;c.length;){let u=c.pop()||0,h=c.pop()||0,p=c.pop()||0;if(h-p<=a){for(let _=p;_<=h;_++){let S=s[2*_],A=s[2*_+1];S>=t&&S<=i&&A>=n&&A<=o&&d.push(r[_])}continue}let b=p+h>>1,f=s[2*b],y=s[2*b+1];f>=t&&f<=i&&y>=n&&y<=o&&d.push(r[b]),(u===0?t<=f:n<=y)&&(c.push(p),c.push(b-1),c.push(1-u)),(u===0?i>=f:o>=y)&&(c.push(b+1),c.push(h),c.push(1-u))}return d}within(t,n,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:r,nodeSize:s}=this,a=[0,o.length-1,0],c=[],d=i*i;for(;a.length;){let u=a.pop()||0,h=a.pop()||0,p=a.pop()||0;if(h-p<=s){for(let _=p;_<=h;_++)Sye(r[2*_],r[2*_+1],t,n)<=d&&c.push(o[_]);continue}let b=p+h>>1,f=r[2*b],y=r[2*b+1];Sye(f,y,t,n)<=d&&c.push(o[b]),(u===0?t-i<=f:n-i<=y)&&(a.push(p),a.push(b-1),a.push(1-u)),(u===0?t+i>=f:n+i>=y)&&(a.push(b+1),a.push(h),a.push(1-u))}return c}};function u7(e,t,n,i,o,r){if(o-i<=n)return;let s=i+o>>1;Aye(e,t,s,i,o,r),u7(e,t,n,i,s-1,1-r),u7(e,t,n,s+1,o,1-r)}function Aye(e,t,n,i,o,r){for(;o>i;){if(o-i>600){let d=o-i+1,u=n-i+1,h=Math.log(d),p=.5*Math.exp(2*h/3),b=.5*Math.sqrt(h*p*(d-p)/d)*(u-d/2<0?-1:1),f=Math.max(i,Math.floor(n-u*p/d+b)),y=Math.min(o,Math.floor(n+(d-u)*p/d+b));Aye(e,t,n,f,y,r)}let s=t[2*n+r],a=i,c=o;for(vX(e,t,i,n),t[2*o+r]>s&&vX(e,t,i,o);a<c;){for(vX(e,t,a,c),a++,c--;t[2*a+r]<s;)a++;for(;t[2*c+r]>s;)c--}t[2*i+r]===s?vX(e,t,i,c):(c++,vX(e,t,c,o)),c<=n&&(i=c+1),n<=c&&(o=c-1)}}function vX(e,t,n,i){d7(e,n,i),d7(t,2*n,2*i),d7(t,2*n+1,2*i+1)}function d7(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}function Sye(e,t,n,i){let o=e-n,r=t-i;return o*o+r*r}function Sf(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 Zye(e,t){e.x-=t,e.y-=t,e.width+=t*2,e.height+=t*2}var mat=new Qe;function Cye(e,t,n,i,o){if(l(e._labelCollection)&&i._clusterLabels?o=Oy.getScreenSpaceBoundingBox(e,t,o):l(e._billboardCollection)&&i._clusterBillboards?o=Ao.getScreenSpaceBoundingBox(e,t,o):l(e._pointPrimitiveCollection)&&i._clusterPoints&&(o=xa.getScreenSpaceBoundingBox(e,t,o)),Zye(o,n),i._clusterLabels&&!l(e._labelCollection)&&l(e.id)&&Rye(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,mat);Zye(a,n),o=Qe.union(o,a,o)}return o}function hat(e,t){if(e.clusterShow=!0,!l(e._labelCollection)&&l(e.id)&&Rye(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 Vye(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 Rye(e,t){return l(e)&&l(e._collectionIndicesByEntity[t])&&l(e._collectionIndicesByEntity[t].labelIndex)}function m7(e,t,n,i,o){if(!l(e))return;let r=e.length;for(let s=0;s<r;++s){let a=e.get(s);if(a.clusterShow=!1,!a.show||o._scene.mode===re.SCENE3D&&!i.isPointVisible(a.position))continue;let c=o._clusterLabels&&l(a._labelCollection),d=o._clusterBillboards&&l(a.id._billboard),u=o._clusterPoints&&l(a.id._point);if(c&&(u||d))continue;let h=a.computeScreenSpacePosition(n);l(h)&&t.push({index:s,collection:e,clustered:!1,coord:h})}}var fat=new Qe,pat=new Qe,bat=new Qe;function gat(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 Lp({scene:n}),l(a)?a.removeAll():a=e._clusterBillboardCollection=new Tu({scene:n}),l(c)?c.removeAll():c=e._clusterPointCollection=new TV;let d=e._pixelRange,u=e._minimumClusterSize,h=e._previousClusters,p=[],b=e._previousHeight,f=n.camera.positionCartographic.height,y=n.ellipsoid,_=n.camera.positionWC,S=new _f(y,_),A=[];e._clusterLabels&&m7(i,A,n,S,e),e._clusterBillboards&&m7(o,A,n,S,e),e._clusterPoints&&m7(r,A,n,S,e);let Z,V,E,L,v,I,X,N,g,C,R,G;if(A.length>0){let P=new FX(A.length,64,Float64Array);for(let Y=0;Y<A.length;++Y)P.add(A[Y].coord.x,A[Y].coord.y);if(P.finish(),f<b)for(E=h.length,Z=0;Z<E;++Z){let Y=h[Z];if(!S.isPointVisible(Y.position))continue;let O=Ao._computeScreenSpacePosition(F.IDENTITY,Y.position,m.ZERO,M.ZERO,n);if(!l(O))continue;let k=1-f/b,D=Y.width=Y.width*k,w=Y.height=Y.height*k;D=Math.max(D,Y.minimumWidth),w=Math.max(w,Y.minimumHeight);let z=O.x-D*.5,J=O.y-w*.5,ee=O.x+D,H=O.y+w;for(v=P.range(z,J,ee,H),I=v.length,C=0,g=[],V=0;V<I;++V)X=v[V],N=A[X],N.clustered||(++C,R=N.collection,G=N.index,g.push(R.get(G).id));if(C>=u)for(Vye(Y.position,C,g,e),p.push(Y),V=0;V<I;++V)A[v[V]].clustered=!0}for(E=A.length,Z=0;Z<E;++Z){let Y=A[Z];if(Y.clustered)continue;Y.clustered=!0,R=Y.collection,G=Y.index;let O=R.get(G);L=Cye(O,Y.coord,d,e,fat);let k=Qe.clone(L,pat);v=P.range(L.x,L.y,L.x+L.width,L.y+L.height),I=v.length;let D=m.clone(O.position);for(C=1,g=[O.id],V=0;V<I;++V)if(X=v[V],N=A[X],!N.clustered){let w=N.collection.get(N.index),z=Cye(w,N.coord,d,e,bat);m.add(w.position,D,D),Qe.union(k,z,k),++C,g.push(w.id)}if(C>=u){let w=m.multiplyByScalar(D,1/C,D);for(Vye(w,C,g,e),p.push({position:w,width:k.width,height:k.height,minimumWidth:L.width,minimumHeight:L.height}),V=0;V<I;++V)A[v[V]].clustered=!0}else hat(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}}Sf.prototype._initialize=function(e){this._scene=e;let t=gat(this);this._cluster=t,this._removeEventListener=e.camera.changed.addEventListener(t)};Object.defineProperties(Sf.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 f7(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 p7(e,t){let n=e._collectionIndicesByEntity[t];!l(n.billboardIndex)&&!l(n.labelIndex)&&!l(n.pointIndex)&&delete e._collectionIndicesByEntity[t]}Sf.prototype.getLabel=f7("_labelCollection",Lp,"_unusedLabelIndices","labelIndex");Sf.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,p7(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};Sf.prototype.getBillboard=f7("_billboardCollection",Tu,"_unusedBillboardIndices","billboardIndex");Sf.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,p7(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};Sf.prototype.getPoint=f7("_pointCollection",TV,"_unusedPointIndices","pointIndex");Sf.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,p7(this,e.id);let i=this._pointCollection.get(n);i.show=!1,i.id=void 0,this._unusedPointIndices.push(n),this._clusterDirty=!0};function h7(e){if(!l(e))return;let t=e.length;for(let n=0;n<t;++n)e.get(n).clusterShow=!0}function yat(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,h7(e._labelCollection),h7(e._billboardCollection),h7(e._pointCollection))}Sf.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,yat(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)};Sf.prototype.destroy=function(){l(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1};var Vu=Sf;function b7(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 Ya(this),this._entityCluster=new Vu}Object.defineProperties(b7.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){gs.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}}});b7.prototype.update=function(e){return!0};var IX=b7;var bxi=x(T(),1);var Fyi=x(T(),1);var byi=x(T(),1);var Eye={};Eye.computePositions=function(e,t,n,i,o){let r=e*.5,s=-r,a=i+i,c=o?2*a:a,d=new Float64Array(c*3),u,h=0,p=0,b=o?a*3:0,f=o?(a+i)*3:i*3;for(u=0;u<i;u++){let y=u/i*W.TWO_PI,_=Math.cos(y),S=Math.sin(y),A=_*n,Z=S*n,V=_*t,E=S*t;d[p+b]=A,d[p+b+1]=Z,d[p+b+2]=s,d[p+f]=V,d[p+f+1]=E,d[p+f+2]=r,p+=3,o&&(d[h++]=A,d[h++]=Z,d[h++]=s,d[h++]=V,d[h++]=E,d[h++]=r)}return d};var hS=Eye;var g7=new M,xat=new m,Tat=new m,_at=new m,Sat=new m;function qb(e){e=e??B.EMPTY_OBJECT;let t=e.length,n=e.topRadius,i=e.bottomRadius,o=e.vertexFormat??Xe.DEFAULT,r=e.slices??128;this._length=t,this._topRadius=n,this._bottomRadius=i,this._vertexFormat=Xe.clone(o),this._slices=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}qb.packedLength=Xe.packedLength+5;qb.pack=function(e,t,n){return n=n??0,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n]=e._offsetAttribute??-1,t};var Gye=new Xe,_V={vertexFormat:Gye,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};qb.unpack=function(e,t,n){t=t??0;let i=Xe.unpack(e,t,Gye);t+=Xe.packedLength;let o=e[t++],r=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._vertexFormat=Xe.clone(i,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=s,n._slices=a,n._offsetAttribute=c===-1?void 0:c,n):(_V.length=o,_V.topRadius=r,_V.bottomRadius=s,_V.slices=a,_V.offsetAttribute=c===-1?void 0:c,new qb(_V))};qb.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=hS.computePositions(t,n,i,r,!0),u=o.st?new Float32Array(c*2):void 0,h=o.normal?new Float32Array(c*3):void 0,p=o.tangent?new Float32Array(c*3):void 0,b=o.bitangent?new Float32Array(c*3):void 0,f,y=o.normal||o.tangent||o.bitangent;if(y){let v=o.tangent||o.bitangent,I=0,X=0,N=0,g=Math.atan2(i-n,t),C=xat;C.z=Math.sin(g);let R=Math.cos(g),G=_at,P=Tat;for(f=0;f<r;f++){let Y=f/r*W.TWO_PI,O=R*Math.cos(Y),k=R*Math.sin(Y);y&&(C.x=O,C.y=k,v&&(G=m.normalize(m.cross(m.UNIT_Z,C,G),G)),o.normal&&(h[I++]=C.x,h[I++]=C.y,h[I++]=C.z,h[I++]=C.x,h[I++]=C.y,h[I++]=C.z),o.tangent&&(p[X++]=G.x,p[X++]=G.y,p[X++]=G.z,p[X++]=G.x,p[X++]=G.y,p[X++]=G.z),o.bitangent&&(P=m.normalize(m.cross(C,G,P),P),b[N++]=P.x,b[N++]=P.y,b[N++]=P.z,b[N++]=P.x,b[N++]=P.y,b[N++]=P.z))}for(f=0;f<r;f++)o.normal&&(h[I++]=0,h[I++]=0,h[I++]=-1),o.tangent&&(p[X++]=1,p[X++]=0,p[X++]=0),o.bitangent&&(b[N++]=0,b[N++]=-1,b[N++]=0);for(f=0;f<r;f++)o.normal&&(h[I++]=0,h[I++]=0,h[I++]=1),o.tangent&&(p[X++]=1,p[X++]=0,p[X++]=0),o.bitangent&&(b[N++]=0,b[N++]=1,b[N++]=0)}let _=12*r-12,S=Me.createTypedArray(c,_),A=0,Z=0;for(f=0;f<r-1;f++)S[A++]=Z,S[A++]=Z+2,S[A++]=Z+3,S[A++]=Z,S[A++]=Z+3,S[A++]=Z+1,Z+=2;for(S[A++]=s-2,S[A++]=0,S[A++]=1,S[A++]=s-2,S[A++]=1,S[A++]=s-1,f=1;f<r-1;f++)S[A++]=s+f+1,S[A++]=s+f,S[A++]=s;for(f=1;f<r-1;f++)S[A++]=a,S[A++]=a+f,S[A++]=a+f+1;let V=0;if(o.st){let v=Math.max(n,i);for(f=0;f<c;f++){let I=m.fromArray(d,f*3,Sat);u[V++]=(I.x+v)/(2*v),u[V++]=(I.y+v)/(2*v)}}let E=new bn;o.position&&(E.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:d})),o.normal&&(E.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:h})),o.tangent&&(E.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),o.bitangent&&(E.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b})),o.st&&(E.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:u})),g7.x=t*.5,g7.y=Math.max(i,n);let L=new de(m.ZERO,M.magnitude(g7));if(l(e._offsetAttribute)){t=d.length;let v=e._offsetAttribute===dn.NONE?0:1,I=new Uint8Array(t/3).fill(v);E.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}return new ft({attributes:E,indices:S,primitiveType:ve.TRIANGLES,boundingSphere:L,offsetAttribute:e._offsetAttribute})};var y7;qb.getUnitCylinder=function(){return l(y7)||(y7=qb.createGeometry(new qb({topRadius:1,bottomRadius:1,length:1,vertexFormat:Xe.POSITION_ONLY}))),y7};var PX=qb;var Kyi=x(T(),1);var x7=new M;function SV(e){e=e??B.EMPTY_OBJECT;let t=e.length,n=e.topRadius,i=e.bottomRadius,o=e.slices??128,r=Math.max(e.numberOfVerticalLines??16,0);this._length=t,this._topRadius=n,this._bottomRadius=i,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}SV.packedLength=6;SV.pack=function(e,t,n){return n=n??0,t[n++]=e._length,t[n++]=e._topRadius,t[n++]=e._bottomRadius,t[n++]=e._slices,t[n++]=e._numberOfVerticalLines,t[n]=e._offsetAttribute??-1,t};var fS={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};SV.unpack=function(e,t,n){t=t??0;let i=e[t++],o=e[t++],r=e[t++],s=e[t++],a=e[t++],c=e[t];return l(n)?(n._length=i,n._topRadius=o,n._bottomRadius=r,n._slices=s,n._numberOfVerticalLines=a,n._offsetAttribute=c===-1?void 0:c,n):(fS.length=i,fS.topRadius=o,fS.bottomRadius=r,fS.slices=s,fS.numberOfVerticalLines=a,fS.offsetAttribute=c===-1?void 0:c,new SV(fS))};SV.createGeometry=function(e){let t=e._length,n=e._topRadius,i=e._bottomRadius,o=e._slices,r=e._numberOfVerticalLines;if(t<=0||n<0||i<0||n===0&&i===0)return;let s=o*2,a=hS.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=Me.createTypedArray(s,c*2),h=0,p;for(p=0;p<o-1;p++)u[h++]=p,u[h++]=p+1,u[h++]=p+o,u[h++]=p+1+o;if(u[h++]=o-1,u[h++]=0,u[h++]=o+o-1,u[h++]=o,r>0)for(p=0;p<o;p+=d)u[h++]=p,u[h++]=p+o;let b=new bn;b.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:a}),x7.x=t*.5,x7.y=Math.max(i,n);let f=new de(m.ZERO,M.magnitude(x7));if(l(e._offsetAttribute)){t=a.length;let y=e._offsetAttribute===dn.NONE?0:1,_=new Uint8Array(t/3).fill(y);b.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}return new ft({attributes:b,indices:u,primitiveType:ve.LINES,boundingSphere:f,offsetAttribute:e._offsetAttribute})};var XX=SV;var Lye=m.ZERO,Wye=new m,Aat=new m,vye=new U;function Zat(e){this.id=e,this.vertexFormat=void 0,this.length=void 0,this.topRadius=void 0,this.bottomRadius=void 0,this.slices=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function Ru(e,t){Ti.call(this,{entity:e,scene:t,geometryOptions:new Zat(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}l(Object.create)&&(Ru.prototype=Object.create(Ti.prototype),Ru.prototype.constructor=Ru);Object.defineProperties(Ru.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});Ru.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=Kn.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r,color:void 0,offset:void 0};if(this._materialProperty instanceof Bt){let a;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,vye)),l(a)||(a=U.WHITE),s.color=Ht.fromColor(a)}return l(this._options.offsetAttribute)&&(s.offset=fo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,Lye,Wye))),new Wt({id:t,geometry:new PX(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,this._options.length*.5,this._scene.ellipsoid),attributes:s})};Ru.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,vye),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=fo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,Lye,Wye))),new Wt({id:t,geometry:new XX(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,this._options.length*.5,this._scene.ellipsoid),attributes:r})};Ru.prototype._computeCenter=function(e,t){return j.getValueOrUndefined(this._entity.position,e,t)};Ru.prototype._isHidden=function(e,t){return!l(e.position)||!l(t.length)||!l(t.topRadius)||!l(t.bottomRadius)||Ti.prototype._isHidden.call(this,e,t)};Ru.prototype._isDynamic=function(e,t){return!e.position.isConstant||!j.isConstant(e.orientation)||!t.length.isConstant||!t.topRadius.isConstant||!t.bottomRadius.isConstant||!j.isConstant(t.slices)||!j.isConstant(t.outlineWidth)||!j.isConstant(t.numberOfVerticalLines)};Ru.prototype._setStaticOptions=function(e,t){let n=j.getValueOrDefault(t.heightReference,Je.MINIMUM_VALUE,tt.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Bt?hn.VERTEX_FORMAT:po.MaterialSupport.TEXTURED.vertexFormat,i.length=t.length.getValue(Je.MINIMUM_VALUE),i.topRadius=t.topRadius.getValue(Je.MINIMUM_VALUE),i.bottomRadius=t.bottomRadius.getValue(Je.MINIMUM_VALUE),i.slices=j.getValueOrUndefined(t.slices,Je.MINIMUM_VALUE),i.numberOfVerticalLines=j.getValueOrUndefined(t.numberOfVerticalLines,Je.MINIMUM_VALUE),i.offsetAttribute=n!==tt.NONE?dn.ALL:void 0};Ru.prototype._onEntityPropertyChanged=eb;Ru.DynamicGeometryUpdater=AV;function AV(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(AV.prototype=Object.create(xi.prototype),AV.prototype.constructor=AV);AV.prototype._isHidden=function(e,t,n){let i=this._options,o=j.getValueOrUndefined(e.position,n,Aat);return!l(o)||!l(i.length)||!l(i.topRadius)||!l(i.bottomRadius)||xi.prototype._isHidden.call(this,e,t,n)};AV.prototype._setOptions=function(e,t,n){let i=j.getValueOrDefault(t.heightReference,n,tt.NONE),o=this._options;o.length=j.getValueOrUndefined(t.length,n),o.topRadius=j.getValueOrUndefined(t.topRadius,n),o.bottomRadius=j.getValueOrUndefined(t.bottomRadius,n),o.slices=j.getValueOrUndefined(t.slices,n),o.numberOfVerticalLines=j.getValueOrUndefined(t.numberOfVerticalLines,n),o.offsetAttribute=i!==tt.NONE?dn.ALL:void 0};var NX=Ru;var bZi=x(T(),1);var yxi=x(T(),1),Fye={UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2};Object.freeze(Fye);var ys=Fye;var Txi=x(T(),1),Iye={TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2};Object.freeze(Iye);var Fo=Iye;var Sxi=x(T(),1),Pye={NONE:0,HOLD:1,EXTRAPOLATE:2};Object.freeze(Pye);var Eu=Pye;var Zxi=x(T(),1),Xye=x(tu(),1);function Cat(e){let t=new Xye.default(e);t.normalize();let n=t.path(),i=n.lastIndexOf("/");return i!==-1&&(n=n.substr(i+1)),n}var $b=Cat;var Exi=x(T(),1);var Vat=W.factorial;function T7(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+=T7(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 sO={type:"Hermite"};sO.getRequiredDataPoints=function(e,t){return t=t??0,Math.max(Math.floor((e+1)/(t+1)),2)};sO.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,s,a,c,d,u,h=t.length,p=new Array(i);for(r=0;r<i;r++){o[r]=0;let _=new Array(h);for(p[r]=_,s=0;s<h;s++)_[s]=[]}let b=h,f=new Array(b);for(r=0;r<b;r++)f[r]=r;let y=h-1;for(c=0;c<i;c++){for(s=0;s<b;s++)u=f[s]*i+c,p[c][0].push(n[u]);for(r=1;r<b;r++){let _=!1;for(s=0;s<b-r;s++){let S=t[f[s]],A=t[f[s+r]],Z;A-S<=0?(u=f[s]*i+i*r+c,Z=n[u],p[c][r].push(Z/Vat(r))):(Z=p[c][r-1][s+1]-p[c][r-1][s],p[c][r].push(Z/(A-S))),_=_||Z!==0}_||(y=r-1)}}for(a=0,d=0;a<=d;a++)for(r=a;r<=y;r++){let _=T7(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 Rat=[];sO.interpolate=function(e,t,n,i,o,r,s){let a=i*(r+1);l(s)||(s=new Array(a));for(let S=0;S<a;S++)s[S]=0;let c=t.length,d=new Array(c*(o+1)),u;for(u=0;u<c;u++)for(let S=0;S<o+1;S++)d[u*(o+1)+S]=u;let h=d.length,p=Rat,b=Eat(p,d,t,n,i,o),f=[],y=h*(h+1)/2,_=Math.min(b,r);for(let S=0;S<=_;S++)for(u=S;u<=b;u++){f.length=0;let A=T7(e,d,t,S,u,f),Z=Math.floor(u*(1-u)/2)+h*u;for(let V=0;V<i;V++){let E=Math.floor(V*y),L=p[E+Z];s[V+S*i]+=L*A}}return s};function Eat(e,t,n,i,o,r){let s,a,c=-1,d=t.length,u=d*(d+1)/2;for(let h=0;h<o;h++){let p=Math.floor(h*u);for(s=0;s<d;s++)a=t[s]*o*(r+1)+h,e[p+s]=i[a];for(let b=1;b<d;b++){let f=0,y=Math.floor(b*(1-b)/2)+d*b,_=!1;for(s=0;s<d-b;s++){let S=n[t[s]],A=n[t[s+b]],Z,V;if(A-S<=0)a=t[s]*o*(r+1)+o*b+h,Z=i[a],V=Z/W.factorial(b),e[p+y+f]=V,f++;else{let E=Math.floor((b-1)*(2-b)/2)+d*(b-1);Z=e[p+E+s+1]-e[p+E+s],V=Z/(A-S),e[p+y+f]=V,f++}_=_||Z!==0}_&&(c=Math.max(c,b))}}return c}var YX=sO;var Wxi=x(T(),1);var _7={type:"Lagrange"};_7.getRequiredDataPoints=function(e){return Math.max(e+1,2)};_7.interpolateOrderZero=function(e,t,n,i,o){l(o)||(o=new Array(i));let r,s,a=t.length;for(r=0;r<i;r++)o[r]=0;for(r=0;r<a;r++){let c=1;for(s=0;s<a;s++)if(s!==r){let d=t[r]-t[s];c*=(e-t[s])/d}for(s=0;s<i;s++)o[s]+=c*n[r*i+s]}return o};var wX=_7;var Ixi=x(T(),1);var S7={type:"Linear"};S7.getRequiredDataPoints=function(e){return 2};S7.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 pS=S7;var Nxi=x(T(),1);function cl(e,t,n){this.clock=e??0,this.cone=t??0,this.magnitude=n??1}cl.fromCartesian3=function(e,t){let n=e.x,i=e.y,o=e.z,r=n*n+i*i;return l(t)||(t=new cl),t.clock=Math.atan2(i,n),t.cone=Math.atan2(Math.sqrt(r),o),t.magnitude=Math.sqrt(r+o*o),t};cl.clone=function(e,t){if(l(e))return l(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new cl(e.clock,e.cone,e.magnitude)};cl.normalize=function(e,t){return l(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new cl(e.clock,e.cone,1)};cl.equals=function(e,t){return e===t||l(e)&&l(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude};cl.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};cl.prototype.equals=function(e){return cl.equals(this,e)};cl.prototype.clone=function(e){return cl.clone(this,e)};cl.prototype.equalsEpsilon=function(e,t){return cl.equalsEpsilon(this,e,t)};cl.prototype.toString=function(){return`(${this.clock}, ${this.cone}, ${this.magnitude})`};var MX=cl;var BX=x(tu(),1);var tTi=x(T(),1);var Kxi=x(T(),1);var wxi=x(T(),1),A7;typeof performance<"u"&&typeof performance.now=="function"&&isFinite(performance.now())?A7=function(){return performance.now()}:A7=function(){return Date.now()};var Yi=A7;function Z7(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??ys.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=Yi(),this.currentTime=t,this.multiplier=e.multiplier??1,this.shouldAnimate=e.shouldAnimate??!1,this.clockStep=e.clockStep??Fo.SYSTEM_CLOCK_MULTIPLIER}Object.defineProperties(Z7.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)}}});Z7.prototype.tick=function(){let e=Yi(),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===ys.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===ys.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 Af=Z7;function bS(){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(bS.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},startTime:vl("startTime"),stopTime:vl("stopTime"),currentTime:vl("currentTime"),clockRange:vl("clockRange"),clockStep:vl("clockStep"),multiplier:vl("multiplier")});bS.prototype.clone=function(e){return l(e)||(e=new bS),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};bS.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};bS.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};bS.prototype.getValue=function(e){return l(e)||(e=new Af),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 Zf=bS;var uTi=x(T(),1);var Gat=U.WHITE,Lat=.1,Wat=new M(8,8),vat=new M(0,0),Fat=new M(1,1);function ZV(e){e=e??B.EMPTY_OBJECT,this._definitionChanged=new _e,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=e.color,this.cellAlpha=e.cellAlpha,this.lineCount=e.lineCount,this.lineThickness=e.lineThickness,this.lineOffset=e.lineOffset}Object.defineProperties(ZV.prototype,{isConstant:{get:function(){return j.isConstant(this._color)&&j.isConstant(this._cellAlpha)&&j.isConstant(this._lineCount)&&j.isConstant(this._lineThickness)&&j.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:ge("color"),cellAlpha:ge("cellAlpha"),lineCount:ge("lineCount"),lineThickness:ge("lineThickness"),lineOffset:ge("lineOffset")});ZV.prototype.getType=function(e){return"Grid"};var Iat=new Q;ZV.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Iat)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,Gat,t.color),t.cellAlpha=j.getValueOrDefault(this._cellAlpha,e,Lat),t.lineCount=j.getValueOrClonedDefault(this._lineCount,e,Wat,t.lineCount),t.lineThickness=j.getValueOrClonedDefault(this._lineThickness,e,Fat,t.lineThickness),t.lineOffset=j.getValueOrClonedDefault(this._lineOffset,e,vat,t.lineOffset),t};ZV.prototype.equals=function(e){return this===e||e instanceof ZV&&j.equals(this._color,e._color)&&j.equals(this._cellAlpha,e._cellAlpha)&&j.equals(this._lineCount,e._lineCount)&&j.equals(this._lineThickness,e._lineThickness)&&j.equals(this._lineOffset,e._lineOffset)};var CV=ZV;var xTi=x(T(),1);function VV(e){this._definitionChanged=new _e,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(VV.prototype,{isConstant:{get:function(){return j.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:ge("color")});VV.prototype.getType=function(e){return"PolylineArrow"};var Pat=new Q;VV.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Pat)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,U.WHITE,t.color),t};VV.prototype.equals=function(e){return this===e||e instanceof VV&&j.equals(this._color,e._color)};var RV=VV;var ETi=x(T(),1);var Xat=U.WHITE,Nat=U.TRANSPARENT,Yat=16,wat=255;function EV(e){e=e??B.EMPTY_OBJECT,this._definitionChanged=new _e,this._color=void 0,this._colorSubscription=void 0,this._gapColor=void 0,this._gapColorSubscription=void 0,this._dashLength=void 0,this._dashLengthSubscription=void 0,this._dashPattern=void 0,this._dashPatternSubscription=void 0,this.color=e.color,this.gapColor=e.gapColor,this.dashLength=e.dashLength,this.dashPattern=e.dashPattern}Object.defineProperties(EV.prototype,{isConstant:{get:function(){return j.isConstant(this._color)&&j.isConstant(this._gapColor)&&j.isConstant(this._dashLength)&&j.isConstant(this._dashPattern)}},definitionChanged:{get:function(){return this._definitionChanged}},color:ge("color"),gapColor:ge("gapColor"),dashLength:ge("dashLength"),dashPattern:ge("dashPattern")});EV.prototype.getType=function(e){return"PolylineDash"};var Mat=new Q;EV.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Mat)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,Xat,t.color),t.gapColor=j.getValueOrClonedDefault(this._gapColor,e,Nat,t.gapColor),t.dashLength=j.getValueOrDefault(this._dashLength,e,Yat,t.dashLength),t.dashPattern=j.getValueOrDefault(this._dashPattern,e,wat,t.dashPattern),t};EV.prototype.equals=function(e){return this===e||e instanceof EV&&j.equals(this._color,e._color)&&j.equals(this._gapColor,e._gapColor)&&j.equals(this._dashLength,e._dashLength)&&j.equals(this._dashPattern,e._dashPattern)};var GV=EV;var NTi=x(T(),1);var kat=U.WHITE,Uat=.25,Dat=1;function LV(e){e=e??B.EMPTY_OBJECT,this._definitionChanged=new _e,this._color=void 0,this._colorSubscription=void 0,this._glowPower=void 0,this._glowPowerSubscription=void 0,this._taperPower=void 0,this._taperPowerSubscription=void 0,this.color=e.color,this.glowPower=e.glowPower,this.taperPower=e.taperPower}Object.defineProperties(LV.prototype,{isConstant:{get:function(){return j.isConstant(this._color)&&j.isConstant(this._glow)}},definitionChanged:{get:function(){return this._definitionChanged}},color:ge("color"),glowPower:ge("glowPower"),taperPower:ge("taperPower")});LV.prototype.getType=function(e){return"PolylineGlow"};var Oat=new Q;LV.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Oat)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,kat,t.color),t.glowPower=j.getValueOrDefault(this._glowPower,e,Uat,t.glowPower),t.taperPower=j.getValueOrDefault(this._taperPower,e,Dat,t.taperPower),t};LV.prototype.equals=function(e){return this===e||e instanceof LV&&j.equals(this._color,e._color)&&j.equals(this._glowPower,e._glowPower)&&j.equals(this._taperPower,e._taperPower)};var WV=LV;var zTi=x(T(),1);var Bat=U.WHITE,zat=U.BLACK,Hat=1;function vV(e){e=e??B.EMPTY_OBJECT,this._definitionChanged=new _e,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth}Object.defineProperties(vV.prototype,{isConstant:{get:function(){return j.isConstant(this._color)&&j.isConstant(this._outlineColor)&&j.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:ge("color"),outlineColor:ge("outlineColor"),outlineWidth:ge("outlineWidth")});vV.prototype.getType=function(e){return"PolylineOutline"};var Kat=new Q;vV.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Kat)),l(t)||(t={}),t.color=j.getValueOrClonedDefault(this._color,e,Bat,t.color),t.outlineColor=j.getValueOrClonedDefault(this._outlineColor,e,zat,t.outlineColor),t.outlineWidth=j.getValueOrDefault(this._outlineWidth,e,Hat),t};vV.prototype.equals=function(e){return this===e||e instanceof vV&&j.equals(this._color,e._color)&&j.equals(this._outlineColor,e._outlineColor)&&j.equals(this._outlineWidth,e._outlineWidth)};var ax=vV;var e_i=x(T(),1);function eg(e,t){this._value=void 0,this._definitionChanged=new _e,this._eventHelper=new vr,this._referenceFrame=t??Xi.FIXED,this.setValue(e)}Object.defineProperties(eg.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 Jat=new Q;eg.prototype.getValue=function(e,t){return l(e)||(e=Q.now(Jat)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};eg.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};eg.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,eg.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)};eg.prototype.equals=function(e){return this===e||e instanceof eg&&this._referenceFrame===e._referenceFrame&&j.arrayEquals(this._value,e._value)};eg.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)};var tg=eg;var a_i=x(T(),1);function cx(e){this._value=void 0,this._definitionChanged=new _e,this._eventHelper=new vr,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 jat=new Q;cx.prototype.getValue=function(e,t){l(e)||(e=Q.now(jat));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 FV=cx;var h_i=x(T(),1);function gS(e){let t=e._targetProperty;if(!l(t)){let n=e._targetEntity;if(!l(n)){if(n=e._targetCollection.getById(e._targetId),!l(n)){e._targetEntity=e._targetProperty=void 0;return}n.definitionChanged.addEventListener(Gu.prototype._onTargetEntityDefinitionChanged,e),e._targetEntity=n}let i=e._targetPropertyNames;t=e._targetEntity;for(let o=0,r=i.length;o<r&&l(t);++o)t=t[i[o]];e._targetProperty=t}return t}function Gu(e,t,n){this._targetCollection=e,this._targetId=t,this._targetPropertyNames=n,this._targetProperty=void 0,this._targetEntity=void 0,this._definitionChanged=new _e,e.collectionChanged.addEventListener(Gu.prototype._onCollectionChanged,this)}Object.defineProperties(Gu.prototype,{isConstant:{get:function(){return j.isConstant(gS(this))}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){let e=gS(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 gS(this)}}});Gu.fromString=function(e,t){let n,i=[],o=!0,r=!1,s="";for(let a=0;a<t.length;++a){let c=t.charAt(a);r?(s+=c,r=!1):c==="\\"?r=!0:o&&c==="#"?(n=s,o=!1,s=""):!o&&c==="."?(i.push(s),s=""):s+=c}return i.push(s),new Gu(e,n,i)};var Qat=new Q;Gu.prototype.getValue=function(e,t){let n=gS(this);return l(e)||(e=Q.now(Qat)),l(n)?n.getValue(e,t):void 0};Gu.prototype.getValueInReferenceFrame=function(e,t,n){let i=gS(this);return l(i)?i.getValueInReferenceFrame(e,t,n):void 0};Gu.prototype.getType=function(e){let t=gS(this);return l(t)?t.getType(e):void 0};Gu.prototype.equals=function(e){if(this===e)return!0;let t=this._targetPropertyNames,n=e._targetPropertyNames;if(this._targetCollection!==e._targetCollection||this._targetId!==e._targetId||t.length!==n.length)return!1;let i=this._targetPropertyNames.length;for(let o=0;o<i;o++)if(t[o]!==n[o])return!1;return!0};Gu.prototype._onTargetEntityDefinitionChanged=function(e,t,n,i){l(this._targetProperty)&&this._targetPropertyNames[0]===t&&(this._targetProperty=void 0,this._definitionChanged.raiseEvent(this))};Gu.prototype._onCollectionChanged=function(e,t,n){let i=this._targetEntity;l(i)&&n.indexOf(i)!==-1?(i.definitionChanged.removeEventListener(Gu.prototype._onTargetEntityDefinitionChanged,this),this._targetEntity=this._targetProperty=void 0):l(i)||(i=gS(this),l(i)&&this._definitionChanged.raiseEvent(this))};var ng=Gu;var g_i=x(T(),1);var qat={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}},Qm=qat;var P_i=x(T(),1);var C_i=x(T(),1);var Nye={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 Yye(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 wye(e,t){return e instanceof Q?e:typeof e=="string"?Q.fromIso8601(e):Q.addSeconds(t,e,new Q)}var C7=[],V7=[];function aO(e,t,n,i,o){let r=0,s,a,c,d,u,h;for(;r<i.length;){u=wye(i[r],e),c=bo(t,u,Q.compare);let p=0,b=0;if(c<0){for(c=~c,d=c*o,a=void 0,h=t[c];r<i.length&&(u=wye(i[r],e),!(l(a)&&Q.compare(a,u)>=0||l(h)&&Q.compare(u,h)>=0));){for(C7[p++]=u,r=r+1,s=0;s<o;s++)V7[b++]=i[r],r=r+1;a=u}p>0&&(V7.length=b,Yye(n,d,V7),C7.length=p,Yye(t,c,C7))}else{for(s=0;s<o;s++)r++,n[c*o+s]=i[r];r++}}}function qm(e,t){let n=e;n===Number&&(n=Nye);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=Nye);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=pS,this._numberOfPoints=0,this._times=[],this._values=[],this._xTable=[],this._yTable=[],this._packedLength=i,this._packedInterpolationLength=o,this._updateTableLength=!0,this._interpolationResult=new Array(o),this._definitionChanged=new _e,this._derivativeTypes=t,this._innerDerivativeTypes=s,this._inputOrder=r,this._forwardExtrapolationType=Eu.NONE,this._forwardExtrapolationDuration=0,this._backwardExtrapolationType=Eu.NONE,this._backwardExtrapolationDuration=0}Object.defineProperties(qm.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 $at=new Q;qm.prototype.getValue=function(e,t){l(e)||(e=Q.now($at));let n=this._times,i=n.length;if(i===0)return;let o,r=this._innerType,s=this._values,a=bo(n,e,Q.compare);if(a<0){if(a=~a,a===0){let V=n[a];if(o=this._backwardExtrapolationDuration,this._backwardExtrapolationType===Eu.NONE||o!==0&&Q.secondsDifference(V,e)>o)return;if(this._backwardExtrapolationType===Eu.HOLD)return r.unpack(s,0,t)}if(a>=i){a=i-1;let V=n[a];if(o=this._forwardExtrapolationDuration,this._forwardExtrapolationType===Eu.NONE||o!==0&&Q.secondsDifference(e,V)>o)return;if(this._forwardExtrapolationType===Eu.HOLD)return a=i-1,r.unpack(s,a*r.packedLength,t)}let c=this._xTable,d=this._yTable,u=this._interpolationAlgorithm,h=this._packedInterpolationLength,p=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;let V=Math.min(u.getRequiredDataPoints(this._interpolationDegree,p),i);V!==this._numberOfPoints&&(this._numberOfPoints=V,c.length=V,d.length=V*h)}let b=this._numberOfPoints-1;if(b<1)return;let f=0,y=i-1;if(y-f+1>=b+1){let V=a-(b/2|0)-1;V<f&&(V=f);let E=V+b;E>y&&(E=y,V=E-b,V<f&&(V=f)),f=V,y=E}let S=y-f+1;for(let V=0;V<S;++V)c[V]=Q.secondsDifference(n[f+V],n[y]);if(l(r.convertPackedArrayForInterpolation))r.convertPackedArrayForInterpolation(s,f,y,d);else{let V=0,E=this._packedLength,L=f*E,v=(y+1)*E;for(;L<v;)d[V]=s[L],L++,V++}let A=Q.secondsDifference(e,n[y]),Z;if(p===0||!l(u.interpolate))Z=u.interpolateOrderZero(A,c,d,h,this._interpolationResult);else{let V=Math.floor(h/(p+1));Z=u.interpolate(A,c,d,V,p,p,this._interpolationResult)}return l(r.unpackInterpolationResult)?r.unpackInterpolationResult(Z,s,f,y,t):r.unpack(Z,0,t)}return r.unpack(s,a*this._packedLength,t)};qm.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))};qm.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)}aO(void 0,this._times,this._values,s,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};qm.prototype.addSamples=function(e,t,n){let i=this._innerDerivativeTypes,o=l(i),r=this._innerType,s=e.length,a=[];for(let c=0;c<s;c++)if(a.push(e[c]),r.pack(t[c],a,a.length),o){let d=n[c],u=i.length;for(let h=0;h<u;h++)i[h].pack(d[h],a,a.length)}aO(void 0,this._times,this._values,a,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};qm.prototype.getSample=function(e){let t=this._times,n=t.length;if(l(n))return e<0&&(e+=n),t[e]};qm.prototype.addSamplesPackedArray=function(e,t){aO(t,this._times,this._values,e,this._packedLength),this._updateTableLength=!0,this._definitionChanged.raiseEvent(this)};qm.prototype.removeSample=function(e){let t=bo(this._times,e,Q.compare);return t<0?!1:(Mye(this,t,1),!0)};function Mye(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)}qm.prototype.removeSamples=function(e){let t=this._times,n=bo(t,e.start,Q.compare);n<0?n=~n:e.isStartIncluded||++n;let i=bo(t,e.stop,Q.compare);i<0?i=~i:e.isStopIncluded&&++i,Mye(this,n,i-n)};qm.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};qm._mergeNewSamples=aO;var Lu=qm;function $m(e,t){t=t??0;let n;if(t>0){n=new Array(t);for(let i=0;i<t;i++)n[i]=m}this._numberOfDerivatives=t,this._property=new Lu(m,n),this._definitionChanged=new _e,this._referenceFrame=e??Xi.FIXED,this._property._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)}Object.defineProperties($m.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 ect=new Q;$m.prototype.getValue=function(e,t){return l(e)||(e=Q.now(ect)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};$m.prototype.getValueInReferenceFrame=function(e,t,n){if(n=this._property.getValue(e,n),l(n))return Xh.convertToReferenceFrame(e,n,this._referenceFrame,t,n)};$m.prototype.setInterpolationOptions=function(e){this._property.setInterpolationOptions(e)};$m.prototype.addSample=function(e,t,n){let i=this._numberOfDerivatives;this._property.addSample(e,t,n)};$m.prototype.addSamples=function(e,t,n){this._property.addSamples(e,t,n)};$m.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)};$m.prototype.removeSample=function(e){return this._property.removeSample(e)};$m.prototype.removeSamples=function(e){this._property.removeSamples(e)};$m.prototype.equals=function(e){return this===e||e instanceof $m&&j.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame};var sc=$m;var H_i=x(T(),1);var N_i=x(T(),1),kye={HORIZONTAL:0,VERTICAL:1};Object.freeze(kye);var Cf=kye;var tct=Cf.HORIZONTAL,nct=U.WHITE,ict=U.BLACK,oct=0,rct=1;function IV(e){e=e??B.EMPTY_OBJECT,this._definitionChanged=new _e,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=e.orientation,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.offset=e.offset,this.repeat=e.repeat}Object.defineProperties(IV.prototype,{isConstant:{get:function(){return j.isConstant(this._orientation)&&j.isConstant(this._evenColor)&&j.isConstant(this._oddColor)&&j.isConstant(this._offset)&&j.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:ge("orientation"),evenColor:ge("evenColor"),oddColor:ge("oddColor"),offset:ge("offset"),repeat:ge("repeat")});IV.prototype.getType=function(e){return"Stripe"};var sct=new Q;IV.prototype.getValue=function(e,t){return l(e)||(e=Q.now(sct)),l(t)||(t={}),t.horizontal=j.getValueOrDefault(this._orientation,e,tct)===Cf.HORIZONTAL,t.evenColor=j.getValueOrClonedDefault(this._evenColor,e,nct,t.evenColor),t.oddColor=j.getValueOrClonedDefault(this._oddColor,e,ict,t.oddColor),t.offset=j.getValueOrDefault(this._offset,e,oct),t.repeat=j.getValueOrDefault(this._repeat,e,rct),t};IV.prototype.equals=function(e){return this===e||e instanceof IV&&j.equals(this._orientation,e._orientation)&&j.equals(this._evenColor,e._evenColor)&&j.equals(this._oddColor,e._oddColor)&&j.equals(this._offset,e._offset)&&j.equals(this._repeat,e._repeat)};var PV=IV;var nSi=x(T(),1);function lx(e){this._definitionChanged=new _e,this._intervals=new bs,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 act=new Q;lx.prototype.getValue=function(e,t){return l(e)||(e=Q.now(act)),this.getValueInReferenceFrame(e,Xi.FIXED,t)};lx.prototype.getValueInReferenceFrame=function(e,t,n){let i=this._intervals.findDataForIntervalContainingDate(e);if(l(i))return Xh.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 ig=lx;var lSi=x(T(),1);function yS(){this._definitionChanged=new _e,this._intervals=new bs,this._intervals.changedEvent.addEventListener(yS.prototype._intervalsChanged,this)}Object.defineProperties(yS.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}});var cct=new Q;yS.prototype.getValue=function(e,t){l(e)||(e=Q.now(cct));let n=this._intervals.findDataForIntervalContainingDate(e);return l(n)&&typeof n.clone=="function"?n.clone(t):n};yS.prototype.equals=function(e){return this===e||e instanceof yS&&this._intervals.equals(e._intervals,j.equals)};yS.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)};var og=yS;var ESi=x(T(),1);var bSi=x(T(),1);function XV(e,t){this._position=void 0,this._subscription=void 0,this._definitionChanged=new _e,this._normalize=t??!0,this.position=e}Object.defineProperties(XV.prototype,{isConstant:{get:function(){return j.isConstant(this._position)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._position},set:function(e){let t=this._position;t!==e&&(l(t)&&this._subscription(),this._position=e,l(e)&&(this._subscription=e._definitionChanged.addEventListener(function(){this._definitionChanged.raiseEvent(this)},this)),this._definitionChanged.raiseEvent(this))}},normalize:{get:function(){return this._normalize},set:function(e){this._normalize!==e&&(this._normalize=e,this._definitionChanged.raiseEvent(this))}}});var lct=new m,Uye=new m,Dye=new Q,dct=new Q,R7=1/60;XV.prototype.getValue=function(e,t){return this._getValue(e,t)};XV.prototype._getValue=function(e,t,n){l(e)||(e=Q.now(dct)),l(t)||(t=new m);let i=this._position;if(j.isConstant(i))return this._normalize?void 0:m.clone(m.ZERO,t);let o=i.getValue(e,lct),r=i.getValue(Q.addSeconds(e,R7,Dye),Uye);if(!l(o)||!l(r)&&(r=o,o=i.getValue(Q.addSeconds(e,-R7,Dye),Uye),!l(o)))return;if(m.equals(o,r))return this._normalize?void 0:m.clone(m.ZERO,t);l(n)&&o.clone(n);let s=m.subtract(r,o,t);return this._normalize?m.normalize(s,t):m.divideByScalar(s,R7,t)};XV.prototype.equals=function(e){return this===e||e instanceof XV&&j.equals(this._position,e._position)};var rg=XV;function kX(e,t){this._velocityVectorProperty=new rg(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(kX.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 Oye=new m,uct=new m,Bye=new q,mct=new Q;kX.prototype.getValue=function(e,t){l(e)||(e=Q.now(mct));let n=this._velocityVectorProperty._getValue(e,uct,Oye);if(l(n))return dt.rotationMatrixFromPositionVelocity(Oye,n,this._ellipsoid,Bye),Pe.fromRotationMatrix(Bye,t)};kX.prototype.equals=function(e){return this===e||e instanceof kX&&j.equals(this._velocityVectorProperty,e._velocityVectorProperty)&&(this._ellipsoid===e._ellipsoid||this._ellipsoid.equals(e._ellipsoid))};var UX=kX;var WSi=x(T(),1);var sg={COMPLETE:0,BELOW_ELLIPSOID_HORIZON:1,ABOVE_ELLIPSOID_HORIZON:2};sg.validate=function(e){return e===sg.COMPLETE||e===sg.BELOW_ELLIPSOID_HORIZON||e===sg.ABOVE_ELLIPSOID_HORIZON};sg.toString=function(e){switch(e){case sg.COMPLETE:return"COMPLETE";case sg.BELOW_ELLIPSOID_HORIZON:return"BELOW_ELLIPSOID_HORIZON";case sg.ABOVE_ELLIPSOID_HORIZON:return"ABOVE_ELLIPSOID_HORIZON";default:throw new he("SensorVolumePortionToDisplay value is not valid and cannot be converted to a String.")}};var NV=sg;function dx(){}dx.packedLength=m.packedLength;dx.unpack=m.unpack;dx.pack=m.pack;var E7;function DX(e,t){return t[0]==="#"&&(t=E7+t),ng.fromString(e,t)}function zye(e,t,n){if(l(n.reference))return DX(t,n.reference);if(l(n.velocityReference)){let i=DX(t,n.velocityReference);switch(e){case m:case dx:return new rg(i,e===dx);case Pe:return new UX(i)}}throw new le(`${JSON.stringify(n)} is not valid CZML.`)}function hct(e,t){return new Mh(function(n,i){return t(e.getValue(n,i))},e.isConstant)}var ro=new m,$l=new MX,ll=new pe,xS=new En,cO=new Pe;function fct(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 Hye(e,t){let n=e.uri??e;return l(t)?t.getDerivedResource({url:n}):We.createIfNeeded(n)}function pct(e){let t=e.wsen;if(l(t))return t;let n=e.wsenDegrees;if(!l(n))return;let i=n.length;if(i===ae.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 bct(e){let t=e.length;if($l.magnitude=1,t===2)return $l.clock=e[0],$l.cone=e[1],m.fromSpherical($l,ro),[ro.x,ro.y,ro.z];let n=new Array(t/3*4);for(let i=0,o=0;i<t;i+=3,o+=4)n[o]=e[i],$l.clock=e[i+1],$l.cone=e[i+2],m.fromSpherical($l,ro),n[o+1]=ro.x,n[o+2]=ro.y,n[o+3]=ro.z;return n}function gct(e){let t=e.length;if(t===3)return $l.clock=e[0],$l.cone=e[1],$l.magnitude=e[2],m.fromSpherical($l,ro),[ro.x,ro.y,ro.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],$l.clock=e[i+1],$l.cone=e[i+2],$l.magnitude=e[i+3],m.fromSpherical($l,ro),n[i+1]=ro.x,n[i+2]=ro.y,n[i+3]=ro.z;return n}function yct(e){let t=e.length;if(t===3)return ll.longitude=e[0],ll.latitude=e[1],ll.height=e[2],ie.default.cartographicToCartesian(ll,ro),[ro.x,ro.y,ro.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],ll.longitude=e[i+1],ll.latitude=e[i+2],ll.height=e[i+3],ie.default.cartographicToCartesian(ll,ro),n[i+1]=ro.x,n[i+2]=ro.y,n[i+3]=ro.z;return n}function xct(e){let t=e.length;if(t===3)return ll.longitude=W.toRadians(e[0]),ll.latitude=W.toRadians(e[1]),ll.height=e[2],ie.default.cartographicToCartesian(ll,ro),[ro.x,ro.y,ro.z];let n=new Array(t);for(let i=0;i<t;i+=4)n[i]=e[i],ll.longitude=W.toRadians(e[i+1]),ll.latitude=W.toRadians(e[i+2]),ll.height=e[i+3],ie.default.cartographicToCartesian(ll,ro),n[i+1]=ro.x,n[i+2]=ro.y,n[i+3]=ro.z;return n}function G7(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 bct(o);let r=e.spherical;if(l(r))return gct(r);let s=e.cartographicRadians;if(l(s))return yct(s);let a=e.cartographicDegrees;if(l(a))return xct(a);throw new le(`${JSON.stringify(e)} is not a valid CZML interval.`)}function Kye(e,t){m.unpack(e,t,ro),m.normalize(ro,ro),m.pack(ro,e,t)}function Tct(e){let t=G7(e);if(t.length===3)return Kye(t,0),t;for(let n=1;n<t.length;n+=4)Kye(t,n);return t}function Jye(e,t){Pe.unpack(e,t,cO),Pe.normalize(cO,cO),Pe.pack(cO,e,t)}function _ct(e){let t=e.unitQuaternion;if(l(t)){if(t.length===4)return Jye(t,0),t;for(let n=1;n<t.length;n+=5)Jye(t,n)}return t}function jye(e){return typeof e=="boolean"?Boolean:typeof e=="number"?Number:typeof e=="string"?String:e.hasOwnProperty("array")?Array:e.hasOwnProperty("boolean")?Boolean:e.hasOwnProperty("boundingRectangle")?Qe:e.hasOwnProperty("cartesian2")?M:e.hasOwnProperty("cartesian")||e.hasOwnProperty("spherical")||e.hasOwnProperty("cartographicRadians")||e.hasOwnProperty("cartographicDegrees")?m:e.hasOwnProperty("unitCartesian")||e.hasOwnProperty("unitSpherical")?dx:e.hasOwnProperty("rgba")||e.hasOwnProperty("rgbaf")?U:e.hasOwnProperty("arcType")?on:e.hasOwnProperty("classificationType")?Jn:e.hasOwnProperty("colorBlendMode")?qc:e.hasOwnProperty("cornerType")?Ji:e.hasOwnProperty("heightReference")?tt:e.hasOwnProperty("horizontalOrigin")?Ii:e.hasOwnProperty("date")?Q:e.hasOwnProperty("labelStyle")?ar:e.hasOwnProperty("number")?Number:e.hasOwnProperty("nearFarScalar")?wt:e.hasOwnProperty("distanceDisplayCondition")?Yt:e.hasOwnProperty("object")||e.hasOwnProperty("value")?Object:e.hasOwnProperty("unitQuaternion")?Pe:e.hasOwnProperty("shadowMode")?Cn:e.hasOwnProperty("string")?String:e.hasOwnProperty("stripeOrientation")?Cf:e.hasOwnProperty("wsen")||e.hasOwnProperty("wsenDegrees")?ae:e.hasOwnProperty("uri")?BX.default:e.hasOwnProperty("verticalOrigin")?Dn:Object}function Sct(e,t,n){switch(e){case on:return on[t.arcType??t];case Array:return t.array;case Boolean:return t.boolean??t;case Qe:return t.boundingRectangle;case M:return t.cartesian2;case m:return G7(t);case dx:return Tct(t);case U:return fct(t);case Jn:return Jn[t.classificationType??t];case qc:return qc[t.colorBlendMode??t];case Ji:return Ji[t.cornerType??t];case tt:return tt[t.heightReference??t];case Ii:return Ii[t.horizontalOrigin??t];case Image:return Hye(t,n);case Q:return Q.fromIso8601(t.date??t);case ar:return ar[t.labelStyle??t];case Number:return t.number??t;case wt:return t.nearFarScalar;case Yt:return t.distanceDisplayCondition;case Object:return t.object??t.value??t;case Pe:return _ct(t);case Qm:return t.number??t;case NV:return NV[t.portionToDisplay??t];case Cn:return Cn[t.shadowMode??t.shadows??t];case String:return t.string??t;case Cf:return Cf[t.stripeOrientation??t];case ae:return pct(t);case BX.default:return Hye(t,n);case Dn:return Dn[t.verticalOrigin??t];default:throw new le(`Unknown CzmlDataSource interval type: ${e}`)}}var Act={HERMITE:YX,LAGRANGE:wX,LINEAR:pS};function lO(e,t){let n=e.interpolationAlgorithm,i=e.interpolationDegree;(l(n)||l(i))&&t.setInterpolationOptions({interpolationAlgorithm:Act[n],interpolationDegree:i});let o=e.forwardExtrapolationType;l(o)&&(t.forwardExtrapolationType=Eu[o]);let r=e.forwardExtrapolationDuration;l(r)&&(t.forwardExtrapolationDuration=r);let s=e.backwardExtrapolationType;l(s)&&(t.backwardExtrapolationType=Eu[s]);let a=e.backwardExtrapolationDuration;l(a)&&(t.backwardExtrapolationDuration=a)}var Qye={iso8601:void 0};function Fr(e){if(l(e))return Qye.iso8601=e,En.fromIso8601(Qye)}function L7(e){let t=Je.MAXIMUM_INTERVAL.clone();return t.data=e,t}function qye(e){let t=new sl;return t.intervals.addInterval(L7(e)),t}function $ye(e){let t=new oc(e.referenceFrame);return t.intervals.addInterval(L7(e)),t}function dO(e,t,n,i,o,r,s){let a=Fr(i.interval);l(o)&&(l(a)?a=En.intersect(a,o,xS):a=o);let c,d,u,h=!l(i.reference)&&!l(i.velocityReference),p=l(a)&&!a.equals(Je.MAXIMUM_INTERVAL);if(i.delete===!0){if(!p){t[n]=void 0;return}return dxe(t[n],a)}let b=!1;if(h){if(d=Sct(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!==Qm;if(!b&&!p){h?t[n]=new ci(f?e.unpack(d,0):d):t[n]=zye(e,s,i);return}let y=t[n],_,S=i.epoch;if(l(S)&&(_=Q.fromIso8601(S)),b&&!p){y instanceof Lu||(t[n]=y=new Lu(e)),y.addSamplesPackedArray(d,_),lO(i,y);return}let A;if(!b&&p){a=a.clone(),h?a.data=f?e.unpack(d,0):d:a.data=zye(e,s,i),l(y)||(t[n]=y=h?new og:new sl),h&&y instanceof og?y.intervals.addInterval(a):y instanceof sl?(h&&(a.data=new ci(a.data)),y.intervals.addInterval(a)):(t[n]=y=qye(y),h&&(a.data=new ci(a.data)),y.intervals.addInterval(a));return}l(y)||(t[n]=y=new sl),y instanceof sl||(t[n]=y=qye(y));let Z=y.intervals;A=Z.findInterval(a),(!l(A)||!(A.data instanceof Lu))&&(A=a.clone(),A.data=new Lu(e),Z.addInterval(A)),A.data.addSamplesPackedArray(d,_),lO(i,A.data)}function dxe(e,t){if(e instanceof Lu){e.removeSamples(t);return}else if(e instanceof og){e.intervals.removeInterval(t);return}else if(e instanceof sl){let n=e.intervals;for(let i=0;i<n.length;++i){let o=En.intersect(n.get(i),t,xS);o.isEmpty||dxe(o.data,t)}n.removeInterval(t);return}}function Ae(e,t,n,i,o,r,s){if(l(i))if(Array.isArray(i))for(let a=0,c=i.length;a<c;++a)dO(e,t,n,i[a],o,r,s);else dO(e,t,n,i,o,r,s)}function exe(e,t,n,i,o,r){let s=Fr(n.interval);l(i)&&(l(s)?s=En.intersect(s,i,xS):s=i);let a=l(n.cartesianVelocity)?1:0,c=m.packedLength*(a+1),d,u,h=!l(n.reference),p=l(s)&&!s.equals(Je.MAXIMUM_INTERVAL);if(n.delete===!0){if(!p){e[t]=void 0;return}return uxe(e[t],s)}let b,f=!1;if(h&&(l(n.referenceFrame)&&(b=Xi[n.referenceFrame]),b=b??Xi.FIXED,d=G7(n),u=d.length??1,f=u>c),!f&&!p){h?e[t]=new Wl(m.unpack(d),b):e[t]=DX(r,n.reference);return}let y=e[t],_,S=n.epoch;if(l(S)&&(_=Q.fromIso8601(S)),f&&!p){(!(y instanceof sc)||l(b)&&y.referenceFrame!==b)&&(e[t]=y=new sc(b,a)),y.addSamplesPackedArray(d,_),lO(n,y);return}let A;if(!f&&p){s=s.clone(),h?s.data=m.unpack(d):s.data=DX(r,n.reference),l(y)||(h?y=new ig(b):y=new oc(b),e[t]=y),h&&y instanceof ig&&l(b)&&y.referenceFrame===b?y.intervals.addInterval(s):y instanceof oc?(h&&(s.data=new Wl(s.data,b)),y.intervals.addInterval(s)):(e[t]=y=$ye(y),h&&(s.data=new Wl(s.data,b)),y.intervals.addInterval(s));return}l(y)?y instanceof oc||(e[t]=y=$ye(y)):e[t]=y=new oc(b);let Z=y.intervals;A=Z.findInterval(s),(!l(A)||!(A.data instanceof sc)||l(b)&&A.data.referenceFrame!==b)&&(A=s.clone(),A.data=new sc(b,a),Z.addInterval(A)),A.data.addSamplesPackedArray(d,_),lO(n,A.data)}function uxe(e,t){if(e instanceof sc){e.removeSamples(t);return}else if(e instanceof ig){e.intervals.removeInterval(t);return}else if(e instanceof oc){let n=e.intervals;for(let i=0;i<n.length;++i){let o=En.intersect(n.get(i),t,xS);o.isEmpty||uxe(o.data,t)}n.removeInterval(t);return}}function mxe(e,t,n,i,o,r){if(l(n))if(Array.isArray(n))for(let s=0,a=n.length;s<a;++s)exe(e,t,n[s],i,o,r);else exe(e,t,n,i,o,r)}function txe(e,t,n,i){l(n.references)?uO(e,t,n.references,n.interval,i,FV,sl):(l(n.cartesian2)?n.array=M.unpackArray(n.cartesian2):l(n.cartesian)&&(n.array=M.unpackArray(n.cartesian)),l(n.array)&&Ae(Array,e,t,n,void 0,void 0,i))}function nxe(e,t,n,i,o,r){let s=Fr(n.interval);l(i)&&(l(s)?s=En.intersect(s,i,xS):s=i);let a=e[t],c,d;if(l(s)){a instanceof pV||(a=new pV,e[t]=a);let h=a.intervals;d=h.findInterval({start:s.start,stop:s.stop}),l(d)?c=d.data:(d=s.clone(),h.addInterval(d))}else c=a;let u;l(n.solidColor)?(c instanceof Bt||(c=new Bt),u=n.solidColor,Ae(U,c,"color",u.color,void 0,void 0,r)):l(n.grid)?(c instanceof CV||(c=new CV),u=n.grid,Ae(U,c,"color",u.color,void 0,o,r),Ae(Number,c,"cellAlpha",u.cellAlpha,void 0,o,r),Ae(M,c,"lineCount",u.lineCount,void 0,o,r),Ae(M,c,"lineThickness",u.lineThickness,void 0,o,r),Ae(M,c,"lineOffset",u.lineOffset,void 0,o,r)):l(n.image)?(c instanceof ly||(c=new ly),u=n.image,Ae(Image,c,"image",u.image,void 0,o,r),Ae(M,c,"repeat",u.repeat,void 0,o,r),Ae(U,c,"color",u.color,void 0,o,r),Ae(Boolean,c,"transparent",u.transparent,void 0,o,r)):l(n.stripe)?(c instanceof PV||(c=new PV),u=n.stripe,Ae(Cf,c,"orientation",u.orientation,void 0,o,r),Ae(U,c,"evenColor",u.evenColor,void 0,o,r),Ae(U,c,"oddColor",u.oddColor,void 0,o,r),Ae(Number,c,"offset",u.offset,void 0,o,r),Ae(Number,c,"repeat",u.repeat,void 0,o,r)):l(n.polylineOutline)?(c instanceof ax||(c=new ax),u=n.polylineOutline,Ae(U,c,"color",u.color,void 0,o,r),Ae(U,c,"outlineColor",u.outlineColor,void 0,o,r),Ae(Number,c,"outlineWidth",u.outlineWidth,void 0,o,r)):l(n.polylineGlow)?(c instanceof WV||(c=new WV),u=n.polylineGlow,Ae(U,c,"color",u.color,void 0,o,r),Ae(Number,c,"glowPower",u.glowPower,void 0,o,r),Ae(Number,c,"taperPower",u.taperPower,void 0,o,r)):l(n.polylineArrow)?(c instanceof RV||(c=new RV),u=n.polylineArrow,Ae(U,c,"color",u.color,void 0,void 0,r)):l(n.polylineDash)?(c instanceof GV||(c=new GV),u=n.polylineDash,Ae(U,c,"color",u.color,void 0,void 0,r),Ae(U,c,"gapColor",u.gapColor,void 0,void 0,r),Ae(Number,c,"dashLength",u.dashLength,void 0,o,r),Ae(Number,c,"dashPattern",u.dashPattern,void 0,o,r)):l(n.checkerboard)&&(c instanceof hV||(c=new hV),u=n.checkerboard,Ae(U,c,"evenColor",u.evenColor,void 0,o,r),Ae(U,c,"oddColor",u.oddColor,void 0,o,r),Ae(M,c,"repeat",u.repeat,void 0,o,r)),l(d)?d.data=c:e[t]=c}function Wu(e,t,n,i,o,r){if(l(n))if(Array.isArray(n))for(let s=0,a=n.length;s<a;++s)nxe(e,t,n[s],i,o,r);else nxe(e,t,n,i,o,r)}function Zct(e,t,n,i){let o=t.name;l(o)&&(e.name=t.name)}function Cct(e,t,n,i){let o=t.description;l(o)&&Ae(String,e,"description",o,void 0,i,n)}function Vct(e,t,n,i){let o=t.position;l(o)&&mxe(e,"position",o,void 0,i,n)}function Rct(e,t,n,i){let o=t.viewFrom;l(o)&&Ae(m,e,"viewFrom",o,void 0,i,n)}function Ect(e,t,n,i){let o=t.orientation;l(o)&&Ae(Pe,e,"orientation",o,void 0,i,n)}function Gct(e,t,n,i){let o=t.properties;if(l(o)){l(e.properties)||(e.properties=new Fl);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)dO(jye(s[a]),e.properties,r,s[a],void 0,i,n);else dO(jye(s),e.properties,r,s,void 0,i,n)}}}function uO(e,t,n,i,o,r,s){let a=n.map(function(c){return DX(o,c)});if(l(i)){i=Fr(i);let c=e[t];if(!(c instanceof s)){let d=new s;d.intervals.addInterval(L7(c)),e[t]=c=d}i.data=new r(a),c.intervals.addInterval(i)}else e[t]=new r(a)}function ixe(e,t,n,i){let o=n.references;l(o)?uO(e,t,o,n.interval,i,FV,sl):Ae(Array,e,t,n,void 0,void 0,i)}function oxe(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)ixe(e,t,n[o],i);else ixe(e,t,n,i)}function rxe(e,t,n,i){let o=n.references;l(o)?uO(e,t,o,n.interval,i,tg,oc):(l(n.cartesian)?n.array=m.unpackArray(n.cartesian):l(n.cartographicRadians)?n.array=m.fromRadiansArrayHeights(n.cartographicRadians,ie.default):l(n.cartographicDegrees)&&(n.array=m.fromDegreesArrayHeights(n.cartographicDegrees,ie.default)),l(n.array)&&Ae(Array,e,t,n,void 0,void 0,i))}function zX(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)rxe(e,t,n[o],i);else rxe(e,t,n,i)}function Lct(e){return m.unpackArray(e)}function Wct(e){return m.fromRadiansArrayHeights(e,ie.default)}function vct(e){return m.fromDegreesArrayHeights(e,ie.default)}function sxe(e,t,n,i){let o=n.references;if(l(o)){let r=o.map(function(s){let a={};return uO(a,"positions",s,n.interval,i,tg,oc),a.positions});e[t]=new tg(r)}else l(n.cartesian)?n.array=n.cartesian.map(Lct):l(n.cartographicRadians)?n.array=n.cartographicRadians.map(Wct):l(n.cartographicDegrees)&&(n.array=n.cartographicDegrees.map(vct)),l(n.array)&&Ae(Array,e,t,n,void 0,void 0,i)}function Fct(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;++o)sxe(e,t,n[o],i);else sxe(e,t,n,i)}function Ict(e,t,n,i){if(l(n))if(Array.isArray(n))for(let o=0,r=n.length;o<r;o++)txe(e,t,n[o],i);else txe(e,t,n,i)}function Pct(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 bs),r.addInterval(Fr(o[s]));else r=new bs,r.addInterval(Fr(o));e.availability=r}function Xct(e,t,n,i,o){l(t)&&Ae(dx,e,"alignedAxis",t,n,i,o)}function Nct(e,t,n,i){let o=t.billboard;if(!l(o))return;let r=Fr(o.interval),s=e.billboard;l(s)||(e.billboard=s=new Oc),Ae(Boolean,s,"show",o.show,r,i,n),Ae(Image,s,"image",o.image,r,i,n),Ae(Number,s,"scale",o.scale,r,i,n),Ae(M,s,"pixelOffset",o.pixelOffset,r,i,n),Ae(m,s,"eyeOffset",o.eyeOffset,r,i,n),Ae(Ii,s,"horizontalOrigin",o.horizontalOrigin,r,i,n),Ae(Dn,s,"verticalOrigin",o.verticalOrigin,r,i,n),Ae(tt,s,"heightReference",o.heightReference,r,i,n),Ae(U,s,"color",o.color,r,i,n),Ae(Qm,s,"rotation",o.rotation,r,i,n),Xct(s,o.alignedAxis,r,i,n),Ae(Boolean,s,"sizeInMeters",o.sizeInMeters,r,i,n),Ae(Number,s,"width",o.width,r,i,n),Ae(Number,s,"height",o.height,r,i,n),Ae(wt,s,"scaleByDistance",o.scaleByDistance,r,i,n),Ae(wt,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),Ae(wt,s,"pixelOffsetScaleByDistance",o.pixelOffsetScaleByDistance,r,i,n),Ae(Qe,s,"imageSubRegion",o.imageSubRegion,r,i,n),Ae(Yt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ae(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function Yct(e,t,n,i){let o=t.box;if(!l(o))return;let r=Fr(o.interval),s=e.box;l(s)||(e.box=s=new wT),Ae(Boolean,s,"show",o.show,r,i,n),Ae(m,s,"dimensions",o.dimensions,r,i,n),Ae(tt,s,"heightReference",o.heightReference,r,i,n),Ae(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ae(Boolean,s,"outline",o.outline,r,i,n),Ae(U,s,"outlineColor",o.outlineColor,r,i,n),Ae(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ae(Cn,s,"shadows",o.shadows,r,i,n),Ae(Yt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function wct(e,t,n,i){let o=t.corridor;if(!l(o))return;let r=Fr(o.interval),s=e.corridor;l(s)||(e.corridor=s=new kT),Ae(Boolean,s,"show",o.show,r,i,n),zX(s,"positions",o.positions,n),Ae(Number,s,"width",o.width,r,i,n),Ae(Number,s,"height",o.height,r,i,n),Ae(tt,s,"heightReference",o.heightReference,r,i,n),Ae(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),Ae(tt,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),Ae(Ji,s,"cornerType",o.cornerType,r,i,n),Ae(Number,s,"granularity",o.granularity,r,i,n),Ae(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ae(Boolean,s,"outline",o.outline,r,i,n),Ae(U,s,"outlineColor",o.outlineColor,r,i,n),Ae(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ae(Cn,s,"shadows",o.shadows,r,i,n),Ae(Yt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ae(Jn,s,"classificationType",o.classificationType,r,i,n),Ae(Number,s,"zIndex",o.zIndex,r,i,n)}function Mct(e,t,n,i){let o=t.cylinder;if(!l(o))return;let r=Fr(o.interval),s=e.cylinder;l(s)||(e.cylinder=s=new UT),Ae(Boolean,s,"show",o.show,r,i,n),Ae(Number,s,"length",o.length,r,i,n),Ae(Number,s,"topRadius",o.topRadius,r,i,n),Ae(Number,s,"bottomRadius",o.bottomRadius,r,i,n),Ae(tt,s,"heightReference",o.heightReference,r,i,n),Ae(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ae(Boolean,s,"outline",o.outline,r,i,n),Ae(U,s,"outlineColor",o.outlineColor,r,i,n),Ae(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ae(Number,s,"numberOfVerticalLines",o.numberOfVerticalLines,r,i,n),Ae(Number,s,"slices",o.slices,r,i,n),Ae(Cn,s,"shadows",o.shadows,r,i,n),Ae(Yt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function kct(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 le("Cesium only supports CZML version 1.");t._version=n}}if(!l(t._version))throw new le("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 Uct(e,t,n,i){let o=t.ellipse;if(!l(o))return;let r=Fr(o.interval),s=e.ellipse;l(s)||(e.ellipse=s=new DT),Ae(Boolean,s,"show",o.show,r,i,n),Ae(Number,s,"semiMajorAxis",o.semiMajorAxis,r,i,n),Ae(Number,s,"semiMinorAxis",o.semiMinorAxis,r,i,n),Ae(Number,s,"height",o.height,r,i,n),Ae(tt,s,"heightReference",o.heightReference,r,i,n),Ae(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),Ae(tt,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),Ae(Qm,s,"rotation",o.rotation,r,i,n),Ae(Qm,s,"stRotation",o.stRotation,r,i,n),Ae(Number,s,"granularity",o.granularity,r,i,n),Ae(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ae(Boolean,s,"outline",o.outline,r,i,n),Ae(U,s,"outlineColor",o.outlineColor,r,i,n),Ae(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ae(Number,s,"numberOfVerticalLines",o.numberOfVerticalLines,r,i,n),Ae(Cn,s,"shadows",o.shadows,r,i,n),Ae(Yt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ae(Jn,s,"classificationType",o.classificationType,r,i,n),Ae(Number,s,"zIndex",o.zIndex,r,i,n)}function Dct(e,t,n,i){let o=t.ellipsoid;if(!l(o))return;let r=Fr(o.interval),s=e.ellipsoid;l(s)||(e.ellipsoid=s=new OT),Ae(Boolean,s,"show",o.show,r,i,n),Ae(m,s,"radii",o.radii,r,i,n),Ae(m,s,"innerRadii",o.innerRadii,r,i,n),Ae(Number,s,"minimumClock",o.minimumClock,r,i,n),Ae(Number,s,"maximumClock",o.maximumClock,r,i,n),Ae(Number,s,"minimumCone",o.minimumCone,r,i,n),Ae(Number,s,"maximumCone",o.maximumCone,r,i,n),Ae(tt,s,"heightReference",o.heightReference,r,i,n),Ae(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ae(Boolean,s,"outline",o.outline,r,i,n),Ae(U,s,"outlineColor",o.outlineColor,r,i,n),Ae(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ae(Number,s,"stackPartitions",o.stackPartitions,r,i,n),Ae(Number,s,"slicePartitions",o.slicePartitions,r,i,n),Ae(Number,s,"subdivisions",o.subdivisions,r,i,n),Ae(Cn,s,"shadows",o.shadows,r,i,n),Ae(Yt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function Oct(e,t,n,i){let o=t.label;if(!l(o))return;let r=Fr(o.interval),s=e.label;l(s)||(e.label=s=new Nh),Ae(Boolean,s,"show",o.show,r,i,n),Ae(String,s,"text",o.text,r,i,n),Ae(String,s,"font",o.font,r,i,n),Ae(ar,s,"style",o.style,r,i,n),Ae(Number,s,"scale",o.scale,r,i,n),Ae(Boolean,s,"showBackground",o.showBackground,r,i,n),Ae(U,s,"backgroundColor",o.backgroundColor,r,i,n),Ae(M,s,"backgroundPadding",o.backgroundPadding,r,i,n),Ae(M,s,"pixelOffset",o.pixelOffset,r,i,n),Ae(m,s,"eyeOffset",o.eyeOffset,r,i,n),Ae(Ii,s,"horizontalOrigin",o.horizontalOrigin,r,i,n),Ae(Dn,s,"verticalOrigin",o.verticalOrigin,r,i,n),Ae(tt,s,"heightReference",o.heightReference,r,i,n),Ae(U,s,"fillColor",o.fillColor,r,i,n),Ae(U,s,"outlineColor",o.outlineColor,r,i,n),Ae(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ae(wt,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),Ae(wt,s,"pixelOffsetScaleByDistance",o.pixelOffsetScaleByDistance,r,i,n),Ae(wt,s,"scaleByDistance",o.scaleByDistance,r,i,n),Ae(Yt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ae(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function Bct(e,t,n,i){let o=t.model;if(!l(o))return;let r=Fr(o.interval),s=e.model;l(s)||(e.model=s=new Q0),Ae(Boolean,s,"show",o.show,r,i,n),Ae(BX.default,s,"uri",o.gltf,r,i,n),Ae(Number,s,"scale",o.scale,r,i,n),Ae(Number,s,"minimumPixelSize",o.minimumPixelSize,r,i,n),Ae(Number,s,"maximumScale",o.maximumScale,r,i,n),Ae(Boolean,s,"incrementallyLoadTextures",o.incrementallyLoadTextures,r,i,n),Ae(Boolean,s,"runAnimations",o.runAnimations,r,i,n),Ae(Boolean,s,"clampAnimations",o.clampAnimations,r,i,n),Ae(Cn,s,"shadows",o.shadows,r,i,n),Ae(tt,s,"heightReference",o.heightReference,r,i,n),Ae(U,s,"silhouetteColor",o.silhouetteColor,r,i,n),Ae(Number,s,"silhouetteSize",o.silhouetteSize,r,i,n),Ae(U,s,"color",o.color,r,i,n),Ae(qc,s,"colorBlendMode",o.colorBlendMode,r,i,n),Ae(Number,s,"colorBlendAmount",o.colorBlendAmount,r,i,n),Ae(Yt,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)axe(s,d[a],r,i,n);else axe(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)cxe(s,u[a],r,i,n);else cxe(s,u,r,i,n)}function axe(e,t,n,i,o){let r=Fr(t.interval);l(n)&&(l(r)?r=En.intersect(r,n,xS):r=n);let s=e.nodeTransformations,a=Object.keys(t);for(let c=0,d=a.length;c<d;++c){let u=a[c];if(u==="interval")continue;let h=t[u];if(!l(h))continue;l(s)||(e.nodeTransformations=s=new Fl),s.hasProperty(u)||s.addProperty(u);let p=s[u];l(p)||(s[u]=p=new BT),Ae(m,p,"translation",h.translation,r,i,o),Ae(Pe,p,"rotation",h.rotation,r,i,o),Ae(m,p,"scale",h.scale,r,i,o)}}function cxe(e,t,n,i,o){let r=Fr(t.interval);l(n)&&(l(r)?r=En.intersect(r,n,xS):r=n);let s=e.articulations,a=Object.keys(t);for(let c=0,d=a.length;c<d;++c){let u=a[c];if(u==="interval")continue;let h=t[u];l(h)&&(l(s)||(e.articulations=s=new Fl),s.hasProperty(u)||s.addProperty(u),Ae(Number,s,u,h,r,i,o))}}function zct(e,t,n,i){let o=t.path;if(!l(o))return;let r=Fr(o.interval),s=e.path;l(s)||(e.path=s=new q0),Ae(Boolean,s,"show",o.show,r,i,n),Ae(Number,s,"leadTime",o.leadTime,r,i,n),Ae(Number,s,"trailTime",o.trailTime,r,i,n),Ae(Number,s,"width",o.width,r,i,n),Ae(Number,s,"resolution",o.resolution,r,i,n),Wu(s,"material",o.material,r,i,n),Ae(Yt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ae(String,s,"relativeTo",o.relativeTo,r,i,n)}function Hct(e,t,n,i){let o=t.point;if(!l(o))return;let r=Fr(o.interval),s=e.point;l(s)||(e.point=s=new HT),Ae(Boolean,s,"show",o.show,r,i,n),Ae(Number,s,"pixelSize",o.pixelSize,r,i,n),Ae(tt,s,"heightReference",o.heightReference,r,i,n),Ae(U,s,"color",o.color,r,i,n),Ae(U,s,"outlineColor",o.outlineColor,r,i,n),Ae(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ae(wt,s,"scaleByDistance",o.scaleByDistance,r,i,n),Ae(wt,s,"translucencyByDistance",o.translucencyByDistance,r,i,n),Ae(Yt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ae(Number,s,"disableDepthTestDistance",o.disableDepthTestDistance,r,i,n)}function OX(e){this.polygon=e,this._definitionChanged=new _e}Object.defineProperties(OX.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}}});OX.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 Ac(o)}))),l(t)?(t.positions=n,t.holes=i,t):new Ac(n,i)};OX.prototype.equals=function(e){return this===e||e instanceof OX&&j.equals(this.polygon._positions,e.polygon._positions)&&j.equals(this.polygon._holes,e.polygon._holes)};function Kct(e,t,n,i){let o=t.polygon;if(!l(o))return;let r=Fr(o.interval),s=e.polygon;l(s)||(e.polygon=s=new Yh),Ae(Boolean,s,"show",o.show,r,i,n),zX(s,"_positions",o.positions,n),Fct(s,"_holes",o.holes,n),(l(s._positions)||l(s._holes))&&(s.hierarchy=new OX(s)),Ae(Number,s,"height",o.height,r,i,n),Ae(tt,s,"heightReference",o.heightReference,r,i,n),Ae(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),Ae(tt,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),Ae(Qm,s,"stRotation",o.stRotation,r,i,n),Ae(Number,s,"granularity",o.granularity,r,i,n),Ae(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ae(Boolean,s,"outline",o.outline,r,i,n),Ae(U,s,"outlineColor",o.outlineColor,r,i,n),Ae(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ae(Boolean,s,"perPositionHeight",o.perPositionHeight,r,i,n),Ae(Boolean,s,"closeTop",o.closeTop,r,i,n),Ae(Boolean,s,"closeBottom",o.closeBottom,r,i,n),Ae(on,s,"arcType",o.arcType,r,i,n),Ae(Cn,s,"shadows",o.shadows,r,i,n),Ae(Yt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ae(Jn,s,"classificationType",o.classificationType,r,i,n),Ae(Number,s,"zIndex",o.zIndex,r,i,n)}function Jct(e){return e?on.GEODESIC:on.NONE}function jct(e,t,n,i){let o=t.polyline;if(!l(o))return;let r=Fr(o.interval),s=e.polyline;if(l(s)||(e.polyline=s=new zc),Ae(Boolean,s,"show",o.show,r,i,n),zX(s,"positions",o.positions,n),Ae(Number,s,"width",o.width,r,i,n),Ae(Number,s,"granularity",o.granularity,r,i,n),Wu(s,"material",o.material,r,i,n),Wu(s,"depthFailMaterial",o.depthFailMaterial,r,i,n),Ae(on,s,"arcType",o.arcType,r,i,n),Ae(Boolean,s,"clampToGround",o.clampToGround,r,i,n),Ae(Cn,s,"shadows",o.shadows,r,i,n),Ae(Yt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ae(Jn,s,"classificationType",o.classificationType,r,i,n),Ae(Number,s,"zIndex",o.zIndex,r,i,n),l(o.followSurface)&&!l(o.arcType)){let a={};Ae(Boolean,a,"followSurface",o.followSurface,r,i,n),s.arcType=hct(a.followSurface,Jct)}}function Qct(e,t,n,i){let o=t.polylineVolume;if(!l(o))return;let r=Fr(o.interval),s=e.polylineVolume;l(s)||(e.polylineVolume=s=new KT),zX(s,"positions",o.positions,n),Ict(s,"shape",o.shape,n),Ae(Boolean,s,"show",o.show,r,i,n),Ae(Ji,s,"cornerType",o.cornerType,r,i,n),Ae(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ae(Boolean,s,"outline",o.outline,r,i,n),Ae(U,s,"outlineColor",o.outlineColor,r,i,n),Ae(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ae(Number,s,"granularity",o.granularity,r,i,n),Ae(Cn,s,"shadows",o.shadows,r,i,n),Ae(Yt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function qct(e,t,n,i){let o=t.rectangle;if(!l(o))return;let r=Fr(o.interval),s=e.rectangle;l(s)||(e.rectangle=s=new wh),Ae(Boolean,s,"show",o.show,r,i,n),Ae(ae,s,"coordinates",o.coordinates,r,i,n),Ae(Number,s,"height",o.height,r,i,n),Ae(tt,s,"heightReference",o.heightReference,r,i,n),Ae(Number,s,"extrudedHeight",o.extrudedHeight,r,i,n),Ae(tt,s,"extrudedHeightReference",o.extrudedHeightReference,r,i,n),Ae(Qm,s,"rotation",o.rotation,r,i,n),Ae(Qm,s,"stRotation",o.stRotation,r,i,n),Ae(Number,s,"granularity",o.granularity,r,i,n),Ae(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ae(Boolean,s,"outline",o.outline,r,i,n),Ae(U,s,"outlineColor",o.outlineColor,r,i,n),Ae(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ae(Cn,s,"shadows",o.shadows,r,i,n),Ae(Yt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n),Ae(Jn,s,"classificationType",o.classificationType,r,i,n),Ae(Number,s,"zIndex",o.zIndex,r,i,n)}function $ct(e,t,n,i){let o=t.tileset;if(!l(o))return;let r=Fr(o.interval),s=e.tileset;l(s)||(e.tileset=s=new zT),Ae(Boolean,s,"show",o.show,r,i,n),Ae(BX.default,s,"uri",o.uri,r,i,n),Ae(Number,s,"maximumScreenSpaceError",o.maximumScreenSpaceError,r,i,n)}function elt(e,t,n,i){let o=t.wall;if(!l(o))return;let r=Fr(o.interval),s=e.wall;l(s)||(e.wall=s=new $0),Ae(Boolean,s,"show",o.show,r,i,n),zX(s,"positions",o.positions,n),oxe(s,"minimumHeights",o.minimumHeights,n),oxe(s,"maximumHeights",o.maximumHeights,n),Ae(Number,s,"granularity",o.granularity,r,i,n),Ae(Boolean,s,"fill",o.fill,r,i,n),Wu(s,"material",o.material,r,i,n),Ae(Boolean,s,"outline",o.outline,r,i,n),Ae(U,s,"outlineColor",o.outlineColor,r,i,n),Ae(Number,s,"outlineWidth",o.outlineWidth,r,i,n),Ae(Cn,s,"shadows",o.shadows,r,i,n),Ae(Yt,s,"distanceDisplayCondition",o.distanceDisplayCondition,r,i,n)}function lxe(e,t,n,i,o){let r=e.id;if(l(r)||(r=zn()),E7=r,!l(o._version)&&r!=="document")throw new le("The first CZML packet is required to be the document object.");if(e.delete===!0)t.removeById(r);else if(r==="document")kct(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)}E7=void 0}function tlt(e){let t,n=e._documentPacket.clock;if(!l(n)){if(!l(e._clock)){let o=e._entityCollection.computeAvailability();if(!o.start.equals(Je.MINIMUM_VALUE)){let r=o.start,s=o.stop,a=Q.secondsDifference(s,r),c=Math.round(a/120);return t=new Zf,t.startTime=Q.clone(r),t.stopTime=Q.clone(s),t.clockRange=ys.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 Zf,t.startTime=Je.MINIMUM_VALUE.clone(),t.stopTime=Je.MAXIMUM_VALUE.clone(),t.currentTime=Je.MINIMUM_VALUE.clone(),t.clockRange=ys.LOOP_STOP,t.clockStep=Fo.SYSTEM_CLOCK_MULTIPLIER,t.multiplier=1);let i=Fr(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=ys[n.range]??ys.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 hxe(e,t,n,i){n=n??B.EMPTY_OBJECT;let o=t,r=n.sourceUri,s=n.credit;if(typeof s=="string"&&(s=new bt(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),gs.setLoading(e,!0),Promise.resolve(o).then(function(a){return nlt(e,a,r,i)}).catch(function(a){return gs.setLoading(e,!1),e._error.raiseEvent(e,a),console.log(a),Promise.reject(a)})}function nlt(e,t,n,i){gs.setLoading(e,!0);let o=e._entityCollection;i&&(e._version=void 0,e._documentPacket=new fxe,o.removeAll()),js._processCzml(t,o,n,void 0,e);let r=tlt(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=$b(n.getUrlComponent()),r=!0),gs.setLoading(e,!1),r&&e._changed.raiseEvent(e),e}function fxe(){this.name=void 0,this.clock=void 0}function js(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 fxe,this._version=void 0,this._entityCollection=new Ya(this),this._entityCluster=new Vu,this._credit=void 0,this._resourceCredits=[]}js.load=function(e,t){return new js().load(e,t)};Object.defineProperties(js.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}}});js.updaters=[Nct,Yct,wct,Mct,Uct,Dct,Oct,Bct,Zct,Cct,zct,Hct,Kct,jct,Qct,Gct,qct,Vct,$ct,Rct,elt,Ect,Pct];js.registerUpdater=function(e){js.updaters.includes(e)||js.updaters.push(e)};js.unregisterUpdater=function(e){if(js.updaters.includes(e)){let t=js.updaters.indexOf(e);js.updaters.splice(t,1)}};js.prototype.process=function(e,t){return hxe(this,e,t,!1)};js.prototype.load=function(e,t){return hxe(this,e,t,!0)};js.prototype.update=function(e){return!0};js.processPacketData=Ae;js.processPositionPacketData=mxe;js.processMaterialPacketData=Wu;js._processCzml=function(e,t,n,i,o){if(i=i??js.updaters,Array.isArray(e))for(let r=0,s=e.length;r<s;++r)lxe(e[r],t,i,n,o);else lxe(e,t,i,n,o)};var HX=js;var _Zi=x(T(),1);function ed(){this._dataSources=[],this._dataSourceAdded=new _e,this._dataSourceRemoved=new _e,this._dataSourceMoved=new _e}Object.defineProperties(ed.prototype,{length:{get:function(){return this._dataSources.length}},dataSourceAdded:{get:function(){return this._dataSourceAdded}},dataSourceRemoved:{get:function(){return this._dataSourceRemoved}},dataSourceMoved:{get:function(){return this._dataSourceMoved}}});ed.prototype.add=function(e){let t=this,n=this._dataSources;return Promise.resolve(e).then(function(i){return n===t._dataSources&&(t._dataSources.push(i),t._dataSourceAdded.raiseEvent(t,i)),i})};ed.prototype.remove=function(e,t){t=t??!1;let n=this._dataSources.indexOf(e);return n!==-1?(this._dataSources.splice(n,1),this._dataSourceRemoved.raiseEvent(this,e),t&&typeof e.destroy=="function"&&e.destroy(),!0):!1};ed.prototype.removeAll=function(e){e=e??!1;let t=this._dataSources;for(let n=0,i=t.length;n<i;++n){let o=t[n];this._dataSourceRemoved.raiseEvent(this,o),e&&typeof o.destroy=="function"&&o.destroy()}this._dataSources=[]};ed.prototype.contains=function(e){return this.indexOf(e)!==-1};ed.prototype.indexOf=function(e){return this._dataSources.indexOf(e)};ed.prototype.get=function(e){return this._dataSources[e]};ed.prototype.getByName=function(e){return this._dataSources.filter(function(t){return t.name===e})};function mO(e,t){return e.indexOf(t)}function pxe(e,t,n){let i=e._dataSources,o=i.length-1;if(t=W.clamp(t,0,o),n=W.clamp(n,0,o),t===n)return;let r=i[t];i[t]=i[n],i[n]=r,e.dataSourceMoved.raiseEvent(r,n,t)}ed.prototype.raise=function(e){let t=mO(this._dataSources,e);pxe(this,t,t+1)};ed.prototype.lower=function(e){let t=mO(this._dataSources,e);pxe(this,t,t-1)};ed.prototype.raiseToTop=function(e){let t=mO(this._dataSources,e);t!==this._dataSources.length-1&&(this._dataSources.splice(t,1),this._dataSources.push(e),this.dataSourceMoved.raiseEvent(e,this._dataSources.length-1,t))};ed.prototype.lowerToBottom=function(e){let t=mO(this._dataSources,e);t!==0&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))};ed.prototype.isDestroyed=function(){return!1};ed.prototype.destroy=function(){return this.removeAll(!0),me(this)};var KX=ed;var DPi=x(T(),1);var FZi=x(T(),1);var EZi=x(T(),1);function ac(e){e=e??B.EMPTY_OBJECT,this._primitives=[],this._guid=zn(),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(ac.prototype,{length:{get:function(){return this._primitives.length}},primitiveAdded:{get:function(){return this._primitiveAdded}},primitiveRemoved:{get:function(){return this._primitiveRemoved}}});ac.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};ac.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};ac.prototype.removeAndDestroy=function(e){let t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t};ac.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=[]};ac.prototype.contains=function(e){return!!(l(e)&&e._external&&e._external._composites&&e._external._composites[this._guid])};function hO(e,t){return e._primitives.indexOf(t)}ac.prototype.raise=function(e){if(l(e)){let t=hO(this,e),n=this._primitives;if(t!==n.length-1){let i=n[t];n[t]=n[t+1],n[t+1]=i}}};ac.prototype.raiseToTop=function(e){if(l(e)){let t=hO(this,e),n=this._primitives;t!==n.length-1&&(n.splice(t,1),n.push(e))}};ac.prototype.lower=function(e){if(l(e)){let t=hO(this,e),n=this._primitives;if(t!==0){let i=n[t];n[t]=n[t-1],n[t-1]=i}}};ac.prototype.lowerToBottom=function(e){if(l(e)){let t=hO(this,e),n=this._primitives;t!==0&&(n.splice(t,1),n.unshift(e))}};ac.prototype.get=function(e){return this._primitives[e]};ac.prototype.update=function(e){if(!this.show)return;let t=this._primitives;for(let n=0;n<t.length;++n)t[n].update(e)};ac.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)}};ac.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)}};ac.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)}};ac.prototype.isDestroyed=function(){return!1};ac.prototype.destroy=function(){return this.removeAll(),me(this)};var td=ac;function Np(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}Object.defineProperties(Np.prototype,{length:{get:function(){return this._length}}});Np.prototype.add=function(e,t){t=t??0;let n=this._collections[t];if(!l(n)){n=new td({destroyPrimitives:!1}),n._zIndex=t,this._collections[t]=n;let i=this._collectionsArray,o=0;for(;o<i.length&&i[o]._zIndex<t;)o++;i.splice(o,0,n)}return n.add(e),this._length++,e._zIndex=t,e};Np.prototype.set=function(e,t){return t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e};Np.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};Np.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};Np.prototype.contains=function(e){if(!l(e))return!1;let t=this._collections[e._zIndex];return l(t)&&t.contains(e)};Np.prototype.update=function(e){if(!this.show)return;let t=this._collectionsArray;for(let n=0;n<t.length;n++)t[n].update(e)};Np.prototype.isDestroyed=function(){return!1};Np.prototype.destroy=function(){return this.removeAll(),me(this)};var JX=Np;var gFi=x(T(),1);var YZi=x(T(),1);function YV(e,t){this._primitives=e,this._orderedGroundPrimitives=t,this._dynamicUpdaters=new It}YV.prototype.add=function(e,t){this._dynamicUpdaters.set(t.id,t.createDynamicUpdater(this._primitives,this._orderedGroundPrimitives))};YV.prototype.remove=function(e){let t=e.id,n=this._dynamicUpdaters.get(t);l(n)&&(this._dynamicUpdaters.remove(t),n.destroy())};YV.prototype.update=function(e){let t=this._dynamicUpdaters.values;for(let n=0,i=t.length;n<i;n++)t[n].update(e);return!0};YV.prototype.removeAllPrimitives=function(){let e=this._dynamicUpdaters.values;for(let t=0,n=e.length;t<n;t++)e[t].destroy();this._dynamicUpdaters.removeAll()};YV.prototype.getBoundingSphere=function(e,t){return e=this._dynamicUpdaters.get(e.id),l(e)&&l(e.getBoundingSphere)?e.getBoundingSphere(t):xt.FAILED};var TS=YV;var AWi=x(T(),1);var eVi=x(T(),1);var pCi=x(T(),1);var OZi=x(T(),1);var v7={},fO=new m,bxe=new m,gxe=new Pe,yxe=new q;function wV(e,t,n,i,o,r,s,a,c,d){let u=e+t;m.multiplyByScalar(i,Math.cos(u),fO),m.multiplyByScalar(n,Math.sin(u),bxe),m.add(fO,bxe,fO);let h=Math.cos(e);h=h*h;let p=Math.sin(e);p=p*p;let f=r/Math.sqrt(s*h+o*p)/a;return Pe.fromAxisAngle(fO,f,gxe),q.fromQuaternion(gxe,yxe),q.multiplyByVector(yxe,c,d),m.normalize(d,d),m.multiplyByScalar(d,a,d),d}var xxe=new m,Txe=new m,W7=new m,ilt=new m;v7.raisePositionsToHeight=function(e,t,n){let i=t.ellipsoid,o=t.height,r=t.extrudedHeight,s=n?e.length/3*2:e.length/3,a=new Float64Array(s*3),c=e.length,d=n?c:0;for(let u=0;u<c;u+=3){let h=u+1,p=u+2,b=m.fromArray(e,u,xxe);i.scaleToGeodeticSurface(b,b);let f=m.clone(b,Txe),y=i.geodeticSurfaceNormal(b,ilt),_=m.multiplyByScalar(y,o,W7);m.add(b,_,b),n&&(m.multiplyByScalar(y,r,_),m.add(f,_,f),a[u+d]=f.x,a[h+d]=f.y,a[p+d]=f.z),a[u]=b.x,a[h]=b.y,a[p]=b.z}return a};var olt=new m,rlt=new m,slt=new m;v7.computeEllipsePositions=function(e,t,n){let i=e.semiMinorAxis,o=e.semiMajorAxis,r=e.rotation,s=e.center,a=e.granularity*8,c=i*i,d=o*o,u=o*i,h=m.magnitude(s),p=m.normalize(s,olt),b=m.cross(m.UNIT_Z,s,rlt);b=m.normalize(b,b);let f=m.cross(p,b,slt),y=1+Math.ceil(W.PI_OVER_TWO/a),_=W.PI_OVER_TWO/(y-1),S=W.PI_OVER_TWO-y*_;S<0&&(y-=Math.ceil(Math.abs(S)/_));let A=2*(y*(y+2)),Z=t?new Array(A*3):void 0,V=0,E=xxe,L=Txe,v=y*4*3,I=v-1,X=0,N=n?new Array(v):void 0,g,C,R,G,P;for(S=W.PI_OVER_TWO,E=wV(S,r,f,b,c,u,d,h,p,E),t&&(Z[V++]=E.x,Z[V++]=E.y,Z[V++]=E.z),n&&(N[I--]=E.z,N[I--]=E.y,N[I--]=E.x),S=W.PI_OVER_TWO-_,g=1;g<y+1;++g){if(E=wV(S,r,f,b,c,u,d,h,p,E),L=wV(Math.PI-S,r,f,b,c,u,d,h,p,L),t){for(Z[V++]=E.x,Z[V++]=E.y,Z[V++]=E.z,R=2*g+2,C=1;C<R-1;++C)G=C/(R-1),P=m.lerp(E,L,G,W7),Z[V++]=P.x,Z[V++]=P.y,Z[V++]=P.z;Z[V++]=L.x,Z[V++]=L.y,Z[V++]=L.z}n&&(N[I--]=E.z,N[I--]=E.y,N[I--]=E.x,N[X++]=L.x,N[X++]=L.y,N[X++]=L.z),S=W.PI_OVER_TWO-(g+1)*_}for(g=y;g>1;--g){if(S=W.PI_OVER_TWO-(g-1)*_,E=wV(-S,r,f,b,c,u,d,h,p,E),L=wV(S+Math.PI,r,f,b,c,u,d,h,p,L),t){for(Z[V++]=E.x,Z[V++]=E.y,Z[V++]=E.z,R=2*(g-1)+2,C=1;C<R-1;++C)G=C/(R-1),P=m.lerp(E,L,G,W7),Z[V++]=P.x,Z[V++]=P.y,Z[V++]=P.z;Z[V++]=L.x,Z[V++]=L.y,Z[V++]=L.z}n&&(N[I--]=E.z,N[I--]=E.y,N[I--]=E.x,N[X++]=L.x,N[X++]=L.y,N[X++]=L.z)}S=W.PI_OVER_TWO,E=wV(-S,r,f,b,c,u,d,h,p,E);let Y={};return t&&(Z[V++]=E.x,Z[V++]=E.y,Z[V++]=E.z,Y.positions=Z,Y.numPts=y),n&&(N[I--]=E.z,N[I--]=E.y,N[I--]=E.x,Y.outerPositions=N),Y};var Yd=v7;var MV=new m,F7=new m,I7=new m,_xe=new m,Ta=new M,Sxe=new q,alt=new q,P7=new Pe,Axe=new m,Zxe=new m,Cxe=new m,gO=new pe,Vxe=new m,Rxe=new M,Exe=new M;function Gxe(e,t,n){let i=t.vertexFormat,o=t.center,r=t.semiMajorAxis,s=t.semiMinorAxis,a=t.ellipsoid,c=t.stRotation,d=n?e.length/3*2:e.length/3,u=t.shadowVolume,h=i.st?new Float32Array(d*2):void 0,p=i.normal?new Float32Array(d*3):void 0,b=i.tangent?new Float32Array(d*3):void 0,f=i.bitangent?new Float32Array(d*3):void 0,y=u?new Float32Array(d*3):void 0,_=0,S=Axe,A=Zxe,Z=Cxe,V=new Di(a),E=V.project(a.cartesianToCartographic(o,gO),Vxe),L=a.scaleToGeodeticSurface(o,MV);a.geodeticSurfaceNormal(L,L);let v=Sxe,I=alt;if(c!==0){let P=Pe.fromAxisAngle(L,c,P7);v=q.fromQuaternion(P,v),P=Pe.fromAxisAngle(L,-c,P7),I=q.fromQuaternion(P,I)}else v=q.clone(q.IDENTITY,v),I=q.clone(q.IDENTITY,I);let X=M.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Rxe),N=M.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Exe),g=e.length,C=n?g:0,R=C/3*2;for(let P=0;P<g;P+=3){let Y=P+1,O=P+2,k=m.fromArray(e,P,MV);if(i.st){let D=q.multiplyByVector(v,k,F7),w=V.project(a.cartesianToCartographic(D,gO),I7);m.subtract(w,E,w),Ta.x=(w.x+r)/(2*r),Ta.y=(w.y+s)/(2*s),X.x=Math.min(Ta.x,X.x),X.y=Math.min(Ta.y,X.y),N.x=Math.max(Ta.x,N.x),N.y=Math.max(Ta.y,N.y),n&&(h[_+R]=Ta.x,h[_+1+R]=Ta.y),h[_++]=Ta.x,h[_++]=Ta.y}(i.normal||i.tangent||i.bitangent||u)&&(S=a.geodeticSurfaceNormal(k,S),u&&(y[P+C]=-S.x,y[Y+C]=-S.y,y[O+C]=-S.z),(i.normal||i.tangent||i.bitangent)&&((i.tangent||i.bitangent)&&(A=m.normalize(m.cross(m.UNIT_Z,S,A),A),q.multiplyByVector(I,A,A)),i.normal&&(p[P]=S.x,p[Y]=S.y,p[O]=S.z,n&&(p[P+C]=-S.x,p[Y+C]=-S.y,p[O+C]=-S.z)),i.tangent&&(b[P]=A.x,b[Y]=A.y,b[O]=A.z,n&&(b[P+C]=-A.x,b[Y+C]=-A.y,b[O+C]=-A.z)),i.bitangent&&(Z=m.normalize(m.cross(S,A,Z),Z),f[P]=Z.x,f[Y]=Z.y,f[O]=Z.z,n&&(f[P+C]=Z.x,f[Y+C]=Z.y,f[O+C]=Z.z))))}if(i.st){g=h.length;for(let P=0;P<g;P+=2)h[P]=(h[P]-X.x)/(N.x-X.x),h[P+1]=(h[P+1]-X.y)/(N.y-X.y)}let G=new bn;if(i.position){let P=Yd.raisePositionsToHeight(e,t,n);G.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:P})}if(i.st&&(G.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:h})),i.normal&&(G.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),i.tangent&&(G.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b})),i.bitangent&&(G.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:f})),u&&(G.extrudeDirection=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:y})),n&&l(t.offsetAttribute)){let P=new Uint8Array(d);if(t.offsetAttribute===dn.TOP)P=P.fill(1,0,d/2);else{let Y=t.offsetAttribute===dn.NONE?0:1;P=P.fill(Y)}G.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:P})}return G}function Lxe(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 _S=new m;function clt(e){let t=e.center;_S=m.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,_S),e.height,_S),_S=m.add(t,_S,_S);let n=new de(_S,e.semiMajorAxis),i=Yd.computeEllipsePositions(e,!0,!1),o=i.positions,r=i.numPts,s=Gxe(o,e,!1),a=Lxe(r);return a=Me.createTypedArray(o.length/3,a),{boundingSphere:n,attributes:s,indices:a}}function llt(e,t){let n=t.vertexFormat,i=t.center,o=t.semiMajorAxis,r=t.semiMinorAxis,s=t.ellipsoid,a=t.height,c=t.extrudedHeight,d=t.stRotation,u=e.length/3*2,h=new Float64Array(u*3),p=n.st?new Float32Array(u*2):void 0,b=n.normal?new Float32Array(u*3):void 0,f=n.tangent?new Float32Array(u*3):void 0,y=n.bitangent?new Float32Array(u*3):void 0,_=t.shadowVolume,S=_?new Float32Array(u*3):void 0,A=0,Z=Axe,V=Zxe,E=Cxe,L=new Di(s),v=L.project(s.cartesianToCartographic(i,gO),Vxe),I=s.scaleToGeodeticSurface(i,MV);s.geodeticSurfaceNormal(I,I);let X=Pe.fromAxisAngle(I,d,P7),N=q.fromQuaternion(X,Sxe),g=M.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Rxe),C=M.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Exe),R=e.length,G=R/3*2;for(let Y=0;Y<R;Y+=3){let O=Y+1,k=Y+2,D=m.fromArray(e,Y,MV),w;if(n.st){let J=q.multiplyByVector(N,D,F7),ee=L.project(s.cartesianToCartographic(J,gO),I7);m.subtract(ee,v,ee),Ta.x=(ee.x+o)/(2*o),Ta.y=(ee.y+r)/(2*r),g.x=Math.min(Ta.x,g.x),g.y=Math.min(Ta.y,g.y),C.x=Math.max(Ta.x,C.x),C.y=Math.max(Ta.y,C.y),p[A+G]=Ta.x,p[A+1+G]=Ta.y,p[A++]=Ta.x,p[A++]=Ta.y}D=s.scaleToGeodeticSurface(D,D),w=m.clone(D,F7),Z=s.geodeticSurfaceNormal(D,Z),_&&(S[Y+R]=-Z.x,S[O+R]=-Z.y,S[k+R]=-Z.z);let z=m.multiplyByScalar(Z,a,_xe);if(D=m.add(D,z,D),z=m.multiplyByScalar(Z,c,z),w=m.add(w,z,w),n.position&&(h[Y+R]=w.x,h[O+R]=w.y,h[k+R]=w.z,h[Y]=D.x,h[O]=D.y,h[k]=D.z),n.normal||n.tangent||n.bitangent){E=m.clone(Z,E);let J=m.fromArray(e,(Y+3)%R,_xe);m.subtract(J,D,J);let ee=m.subtract(w,D,I7);Z=m.normalize(m.cross(ee,J,Z),Z),n.normal&&(b[Y]=Z.x,b[O]=Z.y,b[k]=Z.z,b[Y+R]=Z.x,b[O+R]=Z.y,b[k+R]=Z.z),n.tangent&&(V=m.normalize(m.cross(E,Z,V),V),f[Y]=V.x,f[O]=V.y,f[k]=V.z,f[Y+R]=V.x,f[Y+1+R]=V.y,f[Y+2+R]=V.z),n.bitangent&&(y[Y]=E.x,y[O]=E.y,y[k]=E.z,y[Y+R]=E.x,y[O+R]=E.y,y[k+R]=E.z)}}if(n.st){R=p.length;for(let Y=0;Y<R;Y+=2)p[Y]=(p[Y]-g.x)/(C.x-g.x),p[Y+1]=(p[Y+1]-g.y)/(C.y-g.y)}let P=new bn;if(n.position&&(P.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:h})),n.st&&(P.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:p})),n.normal&&(P.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b})),n.tangent&&(P.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:f})),n.bitangent&&(P.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:y})),_&&(P.extrudeDirection=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:S})),l(t.offsetAttribute)){let Y=new Uint8Array(u);if(t.offsetAttribute===dn.TOP)Y=Y.fill(1,0,u/2);else{let O=t.offsetAttribute===dn.NONE?0:1;Y=Y.fill(O)}P.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:Y})}return P}function dlt(e){let t=e.length/3,n=Me.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 pO=new de,bO=new de;function ult(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=m.multiplyByScalar(n.geodeticSurfaceNormal(t,MV),e.height,MV);pO.center=m.add(t,o,pO.center),pO.radius=i,o=m.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),bO.center=m.add(t,o,bO.center),bO.radius=i;let r=Yd.computeEllipsePositions(e,!0,!0),s=r.positions,a=r.numPts,c=r.outerPositions,d=de.union(pO,bO),u=Gxe(s,e,!0),h=Lxe(a),p=h.length;h.length=p*2;let b=s.length/3;for(let V=0;V<p;V+=3)h[V+p]=h[V+2]+b,h[V+1+p]=h[V+1]+b,h[V+2+p]=h[V]+b;let f=Me.createTypedArray(b*2/3,h),y=new ft({attributes:u,indices:f,primitiveType:ve.TRIANGLES}),_=llt(c,e);h=dlt(c);let S=Me.createTypedArray(c.length*2/3,h),A=new ft({attributes:_,indices:S,primitiveType:ve.TRIANGLES}),Z=Un.combineInstances([new Wt({geometry:y}),new Wt({geometry:A})]);return{boundingSphere:d,attributes:Z[0].attributes,indices:Z[0].indices}}function Wxe(e,t,n,i,o,r,s){let c=Yd.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:n,rotation:i,granularity:o},!1,!0).outerPositions,d=c.length/3,u=new Array(d);for(let p=0;p<d;++p)u[p]=m.fromArray(c,p*3);let h=ae.fromCartesianArray(u,r,s);return h.width>W.PI&&(h.north=h.north>0?W.PI_OVER_TWO-W.EPSILON7:h.north,h.south=h.south<0?W.EPSILON7-W.PI_OVER_TWO:h.south,h.east=W.PI,h.west=-W.PI),h}function wp(e){e=e??B.EMPTY_OBJECT;let t=e.center,n=e.ellipsoid??ie.default,i=e.semiMajorAxis,o=e.semiMinorAxis,r=e.granularity??W.RADIANS_PER_DEGREE,s=e.vertexFormat??Xe.DEFAULT,a=e.height??0,c=e.extrudedHeight??a;this._center=m.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=ie.clone(n),this._rotation=e.rotation??0,this._stRotation=e.stRotation??0,this._height=Math.max(c,a),this._granularity=r,this._vertexFormat=Xe.clone(s),this._extrudedHeight=Math.min(c,a),this._shadowVolume=e.shadowVolume??!1,this._workerName="createEllipseGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}wp.packedLength=m.packedLength+ie.packedLength+Xe.packedLength+9;wp.pack=function(e,t,n){return n=n??0,m.pack(e._center,t,n),n+=m.packedLength,ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=e._offsetAttribute??-1,t};var vxe=new m,Fxe=new ie,Ixe=new Xe,Yp={center:vxe,ellipsoid:Fxe,vertexFormat:Ixe,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};wp.unpack=function(e,t,n){t=t??0;let i=m.unpack(e,t,vxe);t+=m.packedLength;let o=ie.unpack(e,t,Fxe);t+=ie.packedLength;let r=Xe.unpack(e,t,Ixe);t+=Xe.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],h=e[t++],p=e[t++],b=e[t++]===1,f=e[t];return l(n)?(n._center=m.clone(i,n._center),n._ellipsoid=ie.clone(o,n._ellipsoid),n._vertexFormat=Xe.clone(r,n._vertexFormat),n._semiMajorAxis=s,n._semiMinorAxis=a,n._rotation=c,n._stRotation=d,n._height=u,n._granularity=h,n._extrudedHeight=p,n._shadowVolume=b,n._offsetAttribute=f===-1?void 0:f,n):(Yp.height=u,Yp.extrudedHeight=p,Yp.granularity=h,Yp.stRotation=d,Yp.rotation=c,Yp.semiMajorAxis=s,Yp.semiMinorAxis=a,Yp.shadowVolume=b,Yp.offsetAttribute=f===-1?void 0:f,new wp(Yp))};wp.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 Wxe(n,o,r,a,s,i,t)};wp.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=ult(o);else if(r=clt(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===dn.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new ft({attributes:r.attributes,indices:r.indices,primitiveType:ve.TRIANGLES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};wp.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new wp({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:o,rotation:e._rotation,stRotation:e._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Xe.POSITION_ONLY,shadowVolume:!0})};function mlt(e){let t=-e._stRotation;if(t===0)return[0,0,0,1,1,0];let i=Yd.computeEllipsePositions({center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,rotation:e._rotation,granularity:e._granularity},!1,!0).outerPositions,o=i.length/3,r=new Array(o);for(let c=0;c<o;++c)r[c]=m.fromArray(i,c*3);let s=e._ellipsoid,a=e.rectangle;return ft._textureCoordinateRotationPoints(r,t,s,a)}Object.defineProperties(wp.prototype,{rectangle:{get:function(){return l(this._rectangle)||(this._rectangle=Wxe(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=mlt(this)),this._textureCoordinateRotationPoints}}});var nd=wp;var WCi=x(T(),1);var Pxe=new m,SS=new m;function hlt(e){let t=e.center;SS=m.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,SS),e.height,SS),SS=m.add(t,SS,SS);let n=new de(SS,e.semiMajorAxis),i=Yd.computeEllipsePositions(e,!1,!0).outerPositions,o=new bn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:Yd.raisePositionsToHeight(i,e,!1)})}),r=i.length/3,s=Me.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 yO=new de,xO=new de;function flt(e){let t=e.center,n=e.ellipsoid,i=e.semiMajorAxis,o=m.multiplyByScalar(n.geodeticSurfaceNormal(t,Pxe),e.height,Pxe);yO.center=m.add(t,o,yO.center),yO.radius=i,o=m.multiplyByScalar(n.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),xO.center=m.add(t,o,xO.center),xO.radius=i;let r=Yd.computeEllipsePositions(e,!1,!0).outerPositions,s=new bn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:Yd.raisePositionsToHeight(r,e,!0)})});r=s.position.values;let a=de.union(yO,xO),c=r.length/3;if(l(e.offsetAttribute)){let f=new Uint8Array(c);if(e.offsetAttribute===dn.TOP)f=f.fill(1,0,c/2);else{let y=e.offsetAttribute===dn.NONE?0:1;f=f.fill(y)}s.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}let d=e.numberOfVerticalLines??16;d=W.clamp(d,0,c/2);let u=Me.createTypedArray(c,c*2+d*2);c/=2;let h=0,p;for(p=0;p<c;++p)u[h++]=p,u[h++]=(p+1)%c,u[h++]=p+c,u[h++]=(p+1)%c+c;let b;if(d>0){let f=Math.min(d,c);b=Math.round(c/f);let y=Math.min(b*d,c);for(p=0;p<y;p+=b)u[h++]=p,u[h++]=p+c}return{boundingSphere:a,attributes:s,indices:u}}function kV(e){e=e??B.EMPTY_OBJECT;let t=e.center,n=e.ellipsoid??ie.default,i=e.semiMajorAxis,o=e.semiMinorAxis,r=e.granularity??W.RADIANS_PER_DEGREE,s=e.height??0,a=e.extrudedHeight??s;this._center=m.clone(t),this._semiMajorAxis=i,this._semiMinorAxis=o,this._ellipsoid=ie.clone(n),this._rotation=e.rotation??0,this._height=Math.max(a,s),this._granularity=r,this._extrudedHeight=Math.min(a,s),this._numberOfVerticalLines=Math.max(e.numberOfVerticalLines??16,0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}kV.packedLength=m.packedLength+ie.packedLength+8;kV.pack=function(e,t,n){return n=n??0,m.pack(e._center,t,n),n+=m.packedLength,ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,t[n++]=e._semiMajorAxis,t[n++]=e._semiMinorAxis,t[n++]=e._rotation,t[n++]=e._height,t[n++]=e._granularity,t[n++]=e._extrudedHeight,t[n++]=e._numberOfVerticalLines,t[n]=e._offsetAttribute??-1,t};var Xxe=new m,Nxe=new ie,ag={center:Xxe,ellipsoid:Nxe,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};kV.unpack=function(e,t,n){t=t??0;let i=m.unpack(e,t,Xxe);t+=m.packedLength;let o=ie.unpack(e,t,Nxe);t+=ie.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],h=e[t++],p=e[t];return l(n)?(n._center=m.clone(i,n._center),n._ellipsoid=ie.clone(o,n._ellipsoid),n._semiMajorAxis=r,n._semiMinorAxis=s,n._rotation=a,n._height=c,n._granularity=d,n._extrudedHeight=u,n._numberOfVerticalLines=h,n._offsetAttribute=p===-1?void 0:p,n):(ag.height=c,ag.extrudedHeight=u,ag.granularity=d,ag.rotation=a,ag.semiMajorAxis=r,ag.semiMinorAxis=s,ag.numberOfVerticalLines=h,ag.offsetAttribute=p===-1?void 0:p,new kV(ag))};kV.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,n=e._extrudedHeight,i=!W.equalsEpsilon(t,n,0,W.EPSILON2);e._center=e._ellipsoid.scaleToGeodeticSurface(e._center,e._center);let o={center:e._center,semiMajorAxis:e._semiMajorAxis,semiMinorAxis:e._semiMinorAxis,ellipsoid:e._ellipsoid,rotation:e._rotation,height:t,granularity:e._granularity,numberOfVerticalLines:e._numberOfVerticalLines},r;if(i)o.extrudedHeight=n,o.offsetAttribute=e._offsetAttribute,r=flt(o);else if(r=hlt(o),l(e._offsetAttribute)){let s=r.attributes.position.values.length,a=e._offsetAttribute===dn.NONE?0:1,c=new Uint8Array(s/3).fill(a);r.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:c})}return new ft({attributes:r.attributes,indices:r.indices,primitiveType:ve.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};var vu=kV;var Yxe=new U,wxe=m.ZERO,Mxe=new m,kxe=new ae;function plt(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 Vf(e,t){$n.call(this,{entity:e,scene:t,geometryOptions:new plt(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}l(Object.create)&&(Vf.prototype=Object.create($n.prototype),Vf.prototype.constructor=Vf);Vf.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Bt){let o;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,Yxe)),l(o)||(o=U.WHITE),i.color=Ht.fromColor(o)}return l(this._options.offsetAttribute)&&(i.offset=fo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,wxe,Mxe))),new Wt({id:t,geometry:new nd(this._options),attributes:i})};Vf.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,Yxe),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=fo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,wxe,Mxe))),new Wt({id:t,geometry:new vu(this._options),attributes:r})};Vf.prototype._computeCenter=function(e,t){return j.getValueOrUndefined(this._entity.position,e,t)};Vf.prototype._isHidden=function(e,t){let n=e.position;return!l(n)||!l(t.semiMajorAxis)||!l(t.semiMinorAxis)||Ti.prototype._isHidden.call(this,e,t)};Vf.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 Bt)};Vf.prototype._setStaticOptions=function(e,t){let n=j.getValueOrUndefined(t.height,Je.MINIMUM_VALUE),i=j.getValueOrDefault(t.heightReference,Je.MINIMUM_VALUE,tt.NONE),o=j.getValueOrUndefined(t.extrudedHeight,Je.MINIMUM_VALUE),r=j.getValueOrDefault(t.extrudedHeightReference,Je.MINIMUM_VALUE,tt.NONE);l(o)&&!l(n)&&(n=0);let s=this._options;s.vertexFormat=this._materialProperty instanceof Bt?hn.VERTEX_FORMAT:po.MaterialSupport.TEXTURED.vertexFormat,s.center=e.position.getValue(Je.MINIMUM_VALUE,s.center),s.semiMajorAxis=t.semiMajorAxis.getValue(Je.MINIMUM_VALUE,s.semiMajorAxis),s.semiMinorAxis=t.semiMinorAxis.getValue(Je.MINIMUM_VALUE,s.semiMinorAxis),s.rotation=j.getValueOrUndefined(t.rotation,Je.MINIMUM_VALUE),s.granularity=j.getValueOrUndefined(t.granularity,Je.MINIMUM_VALUE),s.stRotation=j.getValueOrUndefined(t.stRotation,Je.MINIMUM_VALUE),s.numberOfVerticalLines=j.getValueOrUndefined(t.numberOfVerticalLines,Je.MINIMUM_VALUE),s.offsetAttribute=$n.computeGeometryOffsetAttribute(n,i,o,r),s.height=$n.getGeometryHeight(n,i),o=$n.getGeometryExtrudedHeight(o,r),o===$n.CLAMP_TO_GROUND&&(o=Ei.getMinimumMaximumHeights(nd.computeRectangle(s,kxe)).minimumTerrainHeight),s.extrudedHeight=o};Vf.DynamicGeometryUpdater=UV;function UV(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(UV.prototype=Object.create(xi.prototype),UV.prototype.constructor=UV);UV.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.center)||!l(i.semiMajorAxis)||!l(i.semiMinorAxis)||xi.prototype._isHidden.call(this,e,t,n)};UV.prototype._setOptions=function(e,t,n){let i=this._options,o=j.getValueOrUndefined(t.height,n),r=j.getValueOrDefault(t.heightReference,n,tt.NONE),s=j.getValueOrUndefined(t.extrudedHeight,n),a=j.getValueOrDefault(t.extrudedHeightReference,n,tt.NONE);l(s)&&!l(o)&&(o=0),i.center=j.getValueOrUndefined(e.position,n,i.center),i.semiMajorAxis=j.getValueOrUndefined(t.semiMajorAxis,n),i.semiMinorAxis=j.getValueOrUndefined(t.semiMinorAxis,n),i.rotation=j.getValueOrUndefined(t.rotation,n),i.granularity=j.getValueOrUndefined(t.granularity,n),i.stRotation=j.getValueOrUndefined(t.stRotation,n),i.numberOfVerticalLines=j.getValueOrUndefined(t.numberOfVerticalLines,n),i.offsetAttribute=$n.computeGeometryOffsetAttribute(o,r,s,a),i.height=$n.getGeometryHeight(o,r),s=$n.getGeometryExtrudedHeight(s,a),s===$n.CLAMP_TO_GROUND&&(s=Ei.getMinimumMaximumHeights(nd.computeRectangle(i,kxe)).minimumTerrainHeight),i.extrudedHeight=s};var jX=Vf;var OVi=x(T(),1);var gVi=x(T(),1);var blt=new m,glt=new m,ylt=new m,xlt=new m,Tlt=new m,_lt=new m(1,1,1),Uxe=Math.cos,Dxe=Math.sin;function cg(e){e=e??B.EMPTY_OBJECT;let t=e.radii??_lt,n=e.innerRadii??t,i=e.minimumClock??0,o=e.maximumClock??W.TWO_PI,r=e.minimumCone??0,s=e.maximumCone??W.PI,a=Math.round(e.stackPartitions??64),c=Math.round(e.slicePartitions??64),d=e.vertexFormat??Xe.DEFAULT;this._radii=m.clone(t),this._innerRadii=m.clone(n),this._minimumClock=i,this._maximumClock=o,this._minimumCone=r,this._maximumCone=s,this._stackPartitions=a,this._slicePartitions=c,this._vertexFormat=Xe.clone(d),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipsoidGeometry"}cg.packedLength=2*m.packedLength+Xe.packedLength+7;cg.pack=function(e,t,n){return n=n??0,m.pack(e._radii,t,n),n+=m.packedLength,m.pack(e._innerRadii,t,n),n+=m.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._minimumClock,t[n++]=e._maximumClock,t[n++]=e._minimumCone,t[n++]=e._maximumCone,t[n++]=e._stackPartitions,t[n++]=e._slicePartitions,t[n]=e._offsetAttribute??-1,t};var Oxe=new m,Bxe=new m,zxe=new Xe,ux={radii:Oxe,innerRadii:Bxe,vertexFormat:zxe,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};cg.unpack=function(e,t,n){t=t??0;let i=m.unpack(e,t,Oxe);t+=m.packedLength;let o=m.unpack(e,t,Bxe);t+=m.packedLength;let r=Xe.unpack(e,t,zxe);t+=Xe.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],h=e[t++],p=e[t];return l(n)?(n._radii=m.clone(i,n._radii),n._innerRadii=m.clone(o,n._innerRadii),n._vertexFormat=Xe.clone(r,n._vertexFormat),n._minimumClock=s,n._maximumClock=a,n._minimumCone=c,n._maximumCone=d,n._stackPartitions=u,n._slicePartitions=h,n._offsetAttribute=p===-1?void 0:p,n):(ux.minimumClock=s,ux.maximumClock=a,ux.minimumCone=c,ux.maximumCone=d,ux.stackPartitions=u,ux.slicePartitions=h,ux.offsetAttribute=p===-1?void 0:p,new cg(ux))};cg.createGeometry=function(e){let t=e._radii;if(t.x<=0||t.y<=0||t.z<=0)return;let n=e._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let i=e._minimumClock,o=e._maximumClock,r=e._minimumCone,s=e._maximumCone,a=e._vertexFormat,c=e._slicePartitions+1,d=e._stackPartitions+1;c=Math.round(c*Math.abs(o-i)/W.TWO_PI),d=Math.round(d*Math.abs(s-r)/W.PI),c<2&&(c=2),d<2&&(d=2);let u,h,p=0,b=[r],f=[i];for(u=0;u<d;u++)b.push(r+u*(s-r)/(d-1));for(b.push(s),h=0;h<c;h++)f.push(i+h*(o-i)/(c-1));f.push(o);let y=b.length,_=f.length,S=0,A=1,Z=n.x!==t.x||n.y!==t.y||n.z!==t.z,V=!1,E=!1,L=!1;Z&&(A=2,r>0&&(V=!0,S+=c-1),s<Math.PI&&(E=!0,S+=c-1),(o-i)%W.TWO_PI?(L=!0,S+=(d-1)*2+1):S+=1);let v=_*y*A,I=new Float64Array(v*3),X=new Array(v).fill(!1),N=new Array(v).fill(!1),g=c*d*A,C=6*(g+S+1-(c+d)*A),R=Me.createTypedArray(g,C),G=a.normal?new Float32Array(v*3):void 0,P=a.tangent?new Float32Array(v*3):void 0,Y=a.bitangent?new Float32Array(v*3):void 0,O=a.st?new Float32Array(v*2):void 0,k=new Array(y),D=new Array(y);for(u=0;u<y;u++)k[u]=Dxe(b[u]),D[u]=Uxe(b[u]);let w=new Array(_),z=new Array(_);for(h=0;h<_;h++)z[h]=Uxe(f[h]),w[h]=Dxe(f[h]);for(u=0;u<y;u++)for(h=0;h<_;h++)I[p++]=t.x*k[u]*z[h],I[p++]=t.y*k[u]*w[h],I[p++]=t.z*D[u];let J=v/2;if(Z)for(u=0;u<y;u++)for(h=0;h<_;h++)I[p++]=n.x*k[u]*z[h],I[p++]=n.y*k[u]*w[h],I[p++]=n.z*D[u],X[J]=!0,u>0&&u!==y-1&&h!==0&&h!==_-1&&(N[J]=!0),J++;p=0;let ee,H;for(u=1;u<y-2;u++)for(ee=u*_,H=(u+1)*_,h=1;h<_-2;h++)R[p++]=H+h,R[p++]=H+h+1,R[p++]=ee+h+1,R[p++]=H+h,R[p++]=ee+h+1,R[p++]=ee+h;if(Z){let it=y*_;for(u=1;u<y-2;u++)for(ee=it+u*_,H=it+(u+1)*_,h=1;h<_-2;h++)R[p++]=H+h,R[p++]=ee+h,R[p++]=ee+h+1,R[p++]=H+h,R[p++]=ee+h+1,R[p++]=H+h+1}let te,$;if(Z){if(V)for($=y*_,u=1;u<_-2;u++)R[p++]=u,R[p++]=u+1,R[p++]=$+u+1,R[p++]=u,R[p++]=$+u+1,R[p++]=$+u;if(E)for(te=y*_-_,$=y*_*A-_,u=1;u<_-2;u++)R[p++]=te+u+1,R[p++]=te+u,R[p++]=$+u,R[p++]=te+u+1,R[p++]=$+u,R[p++]=$+u+1}if(L){for(u=1;u<y-2;u++)$=_*y+_*u,te=_*u,R[p++]=$,R[p++]=te+_,R[p++]=te,R[p++]=$,R[p++]=$+_,R[p++]=te+_;for(u=1;u<y-2;u++)$=_*y+_*(u+1)-1,te=_*(u+1)-1,R[p++]=te+_,R[p++]=$,R[p++]=te,R[p++]=te+_,R[p++]=$+_,R[p++]=$}let be=new bn;a.position&&(be.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:I}));let ye=0,ce=0,Ze=0,xe=0,Ge=v/2,Ve,Ye=ie.fromCartesian3(t),ke=ie.fromCartesian3(n);if(a.st||a.normal||a.tangent||a.bitangent){for(u=0;u<v;u++){Ve=X[u]?ke:Ye;let it=m.fromArray(I,u*3,blt),pt=Ve.geodeticSurfaceNormal(it,glt);if(N[u]&&m.negate(pt,pt),a.st){let Vt=M.negate(pt,Tlt);O[ye++]=Math.atan2(Vt.y,Vt.x)/W.TWO_PI+.5,O[ye++]=Math.asin(pt.z)/Math.PI+.5}if(a.normal&&(G[ce++]=pt.x,G[ce++]=pt.y,G[ce++]=pt.z),a.tangent||a.bitangent){let Vt=ylt,Ue=0,St;if(X[u]&&(Ue=Ge),!V&&u>=Ue&&u<Ue+_*2?St=m.UNIT_X:St=m.UNIT_Z,m.cross(St,pt,Vt),m.normalize(Vt,Vt),a.tangent&&(P[Ze++]=Vt.x,P[Ze++]=Vt.y,P[Ze++]=Vt.z),a.bitangent){let ht=m.cross(pt,Vt,xlt);m.normalize(ht,ht),Y[xe++]=ht.x,Y[xe++]=ht.y,Y[xe++]=ht.z}}}a.st&&(be.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:O})),a.normal&&(be.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:G})),a.tangent&&(be.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:P})),a.bitangent&&(be.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:Y}))}if(l(e._offsetAttribute)){let it=I.length,pt=e._offsetAttribute===dn.NONE?0:1,Vt=new Uint8Array(it/3).fill(pt);be.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:Vt})}return new ft({attributes:be,indices:R,primitiveType:ve.TRIANGLES,boundingSphere:de.fromEllipsoid(Ye),offsetAttribute:e._offsetAttribute})};var X7;cg.getUnitEllipsoid=function(){return l(X7)||(X7=cg.createGeometry(new cg({radii:new m(1,1,1),vertexFormat:Xe.POSITION_ONLY}))),X7};var wa=cg;var Slt=new Bt(U.WHITE),N7=m.ZERO,Y7=new m,Alt=new m,Zlt=new m,w7=new U,Clt=new m(1,1,1);function Vlt(e){this.id=e,this.vertexFormat=void 0,this.radii=void 0,this.innerRadii=void 0,this.minimumClock=void 0,this.maximumClock=void 0,this.minimumCone=void 0,this.maximumCone=void 0,this.stackPartitions=void 0,this.slicePartitions=void 0,this.subdivisions=void 0,this.offsetAttribute=void 0}function Fu(e,t){Ti.call(this,{entity:e,scene:t,geometryOptions:new Vlt(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}l(Object.create)&&(Fu.prototype=Object.create(Ti.prototype),Fu.prototype.constructor=Fu);Object.defineProperties(Fu.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}});Fu.prototype.createFillGeometryInstance=function(e,t,n){let i=this._entity,o=i.isAvailable(e),r,s=new Zn(o&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),a=this._distanceDisplayConditionProperty.getValue(e),c=Kn.fromDistanceDisplayCondition(a),d={show:s,distanceDisplayCondition:c,color:void 0,offset:void 0};if(this._materialProperty instanceof Bt){let u;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||o)&&(u=this._materialProperty.color.getValue(e,w7)),l(u)||(u=U.WHITE),r=Ht.fromColor(u),d.color=r}return l(this._options.offsetAttribute)&&(d.offset=fo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,N7,Y7))),new Wt({id:i,geometry:new wa(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,this._options.radii.z*.5,this._scene.ellipsoid,n),attributes:d})};Fu.prototype.createOutlineGeometryInstance=function(e,t,n){let i=this._entity,o=i.isAvailable(e),r=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,w7),s=this._distanceDisplayConditionProperty.getValue(e),a={show:new Zn(o&&i.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(r),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(s),offset:void 0};return l(this._options.offsetAttribute)&&(a.offset=fo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,N7,Y7))),new Wt({id:i,geometry:new Zu(this._options),modelMatrix:t?void 0:i.computeModelMatrixForHeightReference(e,i.ellipsoid.heightReference,this._options.radii.z*.5,this._scene.ellipsoid,n),attributes:a})};Fu.prototype._computeCenter=function(e,t){return j.getValueOrUndefined(this._entity.position,e,t)};Fu.prototype._isHidden=function(e,t){return!l(e.position)||!l(t.radii)||Ti.prototype._isHidden.call(this,e,t)};Fu.prototype._isDynamic=function(e,t){return!e.position.isConstant||!j.isConstant(e.orientation)||!t.radii.isConstant||!j.isConstant(t.innerRadii)||!j.isConstant(t.stackPartitions)||!j.isConstant(t.slicePartitions)||!j.isConstant(t.outlineWidth)||!j.isConstant(t.minimumClock)||!j.isConstant(t.maximumClock)||!j.isConstant(t.minimumCone)||!j.isConstant(t.maximumCone)||!j.isConstant(t.subdivisions)};Fu.prototype._setStaticOptions=function(e,t){let n=j.getValueOrDefault(t.heightReference,Je.MINIMUM_VALUE,tt.NONE),i=this._options;i.vertexFormat=this._materialProperty instanceof Bt?hn.VERTEX_FORMAT:po.MaterialSupport.TEXTURED.vertexFormat,i.radii=t.radii.getValue(Je.MINIMUM_VALUE,i.radii),i.innerRadii=j.getValueOrUndefined(t.innerRadii,i.radii),i.minimumClock=j.getValueOrUndefined(t.minimumClock,Je.MINIMUM_VALUE),i.maximumClock=j.getValueOrUndefined(t.maximumClock,Je.MINIMUM_VALUE),i.minimumCone=j.getValueOrUndefined(t.minimumCone,Je.MINIMUM_VALUE),i.maximumCone=j.getValueOrUndefined(t.maximumCone,Je.MINIMUM_VALUE),i.stackPartitions=j.getValueOrUndefined(t.stackPartitions,Je.MINIMUM_VALUE),i.slicePartitions=j.getValueOrUndefined(t.slicePartitions,Je.MINIMUM_VALUE),i.subdivisions=j.getValueOrUndefined(t.subdivisions,Je.MINIMUM_VALUE),i.offsetAttribute=n!==tt.NONE?dn.ALL:void 0};Fu.prototype._onEntityPropertyChanged=eb;Fu.DynamicGeometryUpdater=QX;function QX(e,t,n){xi.call(this,e,t,n),this._scene=e._scene,this._modelMatrix=new F,this._attributes=void 0,this._outlineAttributes=void 0,this._lastSceneMode=void 0,this._lastShow=void 0,this._lastOutlineShow=void 0,this._lastOutlineWidth=void 0,this._lastOutlineColor=void 0,this._lastOffset=new m,this._material={}}l(Object.create)&&(QX.prototype=Object.create(xi.prototype),QX.prototype.constructor=QX);QX.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,Alt),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,w7),c=yr.getValue(e,n.material??Slt,this._material),d=j.getValueOrUndefined(n.innerRadii,e,Zlt),u=j.getValueOrUndefined(n.minimumClock,e),h=j.getValueOrUndefined(n.maximumClock,e),p=j.getValueOrUndefined(n.minimumCone,e),b=j.getValueOrUndefined(n.maximumCone,e),f=j.getValueOrUndefined(n.stackPartitions,e),y=j.getValueOrUndefined(n.slicePartitions,e),_=j.getValueOrUndefined(n.subdivisions,e),S=j.getValueOrDefault(n.outlineWidth,e,1),A=j.getValueOrDefault(n.heightReference,e,tt.NONE),Z=A!==tt.NONE?dn.ALL:void 0,V=this._scene.mode,E=V===re.SCENE3D&&A===tt.NONE,L=this._options,v=this._geometryUpdater.shadowsProperty.getValue(e),X=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e),N=j.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,N7,Y7);if(!E||this._lastSceneMode!==V||!l(this._primitive)||L.stackPartitions!==f||L.slicePartitions!==y||l(d)&&!m.equals(L.innerRadii!==d)||L.minimumClock!==u||L.maximumClock!==h||L.minimumCone!==p||L.maximumCone!==b||L.subdivisions!==_||this._lastOutlineWidth!==S||L.offsetAttribute!==Z){let C=this._primitives;C.removeAndDestroy(this._primitive),C.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=V,this._lastOutlineWidth=S,L.stackPartitions=f,L.slicePartitions=y,L.subdivisions=_,L.offsetAttribute=Z,L.radii=m.clone(E?Clt:i,L.radii),l(d)?E?L.innerRadii=m.fromElements(d.x/i.x,d.y/i.y,d.z/i.z,L.innerRadii):L.innerRadii=m.clone(d,L.innerRadii):L.innerRadii=void 0,L.minimumClock=u,L.maximumClock=h,L.minimumCone=p,L.maximumCone=b;let R=new po({material:c,translucent:c.isTranslucent(),closed:!0});L.vertexFormat=R.vertexFormat;let G=this._geometryUpdater.createFillGeometryInstance(e,E,this._modelMatrix);this._primitive=C.add(new Ln({geometryInstances:G,appearance:R,asynchronous:!1,shadows:v}));let P=this._geometryUpdater.createOutlineGeometryInstance(e,E,this._modelMatrix);this._outlinePrimitive=C.add(new Ln({geometryInstances:P,appearance:new hn({flat:!0,translucent:P.attributes.color.value[3]!==255,renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth(S)}}),asynchronous:!1,shadows:v})),this._lastShow=r,this._lastOutlineShow=s,this._lastOutlineColor=U.clone(a,this._lastOutlineColor),this._lastDistanceDisplayCondition=X,this._lastOffset=m.clone(N,this._lastOffset)}else if(this._primitive.ready){let C=this._primitive,R=this._outlinePrimitive;C.show=!0,R.show=!0,C.appearance.material=c;let G=this._attributes;l(G)||(G=C.getGeometryInstanceAttributes(t),this._attributes=G),r!==this._lastShow&&(G.show=Zn.toValue(r,G.show),this._lastShow=r);let P=this._outlineAttributes;l(P)||(P=R.getGeometryInstanceAttributes(t),this._outlineAttributes=P),s!==this._lastOutlineShow&&(P.show=Zn.toValue(s,P.show),this._lastOutlineShow=s),U.equals(a,this._lastOutlineColor)||(P.color=Ht.toValue(a,P.color),U.clone(a,this._lastOutlineColor)),Yt.equals(X,this._lastDistanceDisplayCondition)||(G.distanceDisplayCondition=Kn.toValue(X,G.distanceDisplayCondition),P.distanceDisplayCondition=Kn.toValue(X,P.distanceDisplayCondition),Yt.clone(X,this._lastDistanceDisplayCondition)),m.equals(N,this._lastOffset)||(G.offset=fo.toValue(N,G.offset),P.offset=fo.toValue(N,G.offset),m.clone(N,this._lastOffset))}E&&(i.x=Math.max(i.x,.001),i.y=Math.max(i.y,.001),i.z=Math.max(i.z,.001),o=F.multiplyByScale(o,i,o),this._primitive.modelMatrix=o,this._outlinePrimitive.modelMatrix=o)};var qX=Fu;var FRi=x(T(),1);var nRi=x(T(),1);function DV(e){e=e??B.EMPTY_OBJECT;let t=e.vertexFormat??Xe.DEFAULT;this._vertexFormat=t,this._workerName="createPlaneGeometry"}DV.packedLength=Xe.packedLength;DV.pack=function(e,t,n){return n=n??0,Xe.pack(e._vertexFormat,t,n),t};var Hxe=new Xe,Rlt={vertexFormat:Hxe};DV.unpack=function(e,t,n){t=t??0;let i=Xe.unpack(e,t,Hxe);return l(n)?(n._vertexFormat=Xe.clone(i,n._vertexFormat),n):new DV(Rlt)};var TO=new m(-.5,-.5,0),_O=new m(.5,.5,0);DV.createGeometry=function(e){let t=e._vertexFormat,n=new bn,i,o;if(t.position){if(o=new Float64Array(12),o[0]=TO.x,o[1]=TO.y,o[2]=0,o[3]=_O.x,o[4]=TO.y,o[5]=0,o[6]=_O.x,o[7]=_O.y,o[8]=0,o[9]=TO.x,o[10]=_O.y,o[11]=0,n.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:o}),t.normal){let r=new Float32Array(12);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=1,r[9]=0,r[10]=0,r[11]=1,n.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:r})}if(t.st){let r=new Float32Array(8);r[0]=0,r[1]=0,r[2]=1,r[3]=0,r[4]=1,r[5]=1,r[6]=0,r[7]=1,n.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:r})}if(t.tangent){let r=new Float32Array(12);r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r[6]=1,r[7]=0,r[8]=0,r[9]=1,r[10]=0,r[11]=0,n.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:r})}if(t.bitangent){let r=new Float32Array(12);r[0]=0,r[1]=1,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=0,r[7]=1,r[8]=0,r[9]=0,r[10]=1,r[11]=0,n.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:r})}i=new Uint16Array(6),i[0]=0,i[1]=1,i[2]=2,i[3]=0,i[4]=2,i[5]=3}return new ft({attributes:n,indices:i,primitiveType:ve.TRIANGLES,boundingSphere:new de(m.ZERO,Math.sqrt(2))})};var $X=DV;var mRi=x(T(),1);function OV(){this._workerName="createPlaneOutlineGeometry"}OV.packedLength=0;OV.pack=function(e,t){return t};OV.unpack=function(e,t,n){return l(n)?n:new OV};var mx=new m(-.5,-.5,0),SO=new m(.5,.5,0);OV.createGeometry=function(){let e=new bn,t=new Uint16Array(8),n=new Float64Array(12);return n[0]=mx.x,n[1]=mx.y,n[2]=mx.z,n[3]=SO.x,n[4]=mx.y,n[5]=mx.z,n[6]=SO.x,n[7]=SO.y,n[8]=mx.z,n[9]=mx.x,n[10]=SO.y,n[11]=mx.z,e.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:n}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new ft({attributes:e,indices:t,primitiveType:ve.LINES,boundingSphere:new de(m.ZERO,Math.sqrt(2))})};var eN=OV;var Elt=new m,Kxe=new U;function Glt(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function eh(e,t){Ti.call(this,{entity:e,scene:t,geometryOptions:new Glt(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}l(Object.create)&&(eh.prototype=Object.create(Ti.prototype),eh.prototype.constructor=eh);eh.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,o,r=new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=Kn.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Bt){let b;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(b=this._materialProperty.color.getValue(e,Kxe)),l(b)||(b=U.WHITE),o=Ht.fromColor(b),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};let c=t.plane,d=this._options,u=t.computeModelMatrix(e),h=j.getValueOrDefault(c.plane,e,d.plane),p=j.getValueOrUndefined(c.dimensions,e,d.dimensions);return d.plane=h,d.dimensions=p,u=M7(h,p,u,u),new Wt({id:t,geometry:new $X(this._options),modelMatrix:u,attributes:i})};eh.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,Kxe),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=M7(c,d,a,a),new Wt({id:t,geometry:new eN,modelMatrix:a,attributes:{show:new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(o)}})};eh.prototype._isHidden=function(e,t){return!l(t.plane)||!l(t.dimensions)||!l(e.position)||Ti.prototype._isHidden.call(this,e,t)};eh.prototype._getIsClosed=function(e){return!1};eh.prototype._isDynamic=function(e,t){return!e.position.isConstant||!j.isConstant(e.orientation)||!t.plane.isConstant||!t.dimensions.isConstant||!j.isConstant(t.outlineWidth)};eh.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Bt,i=this._options;i.vertexFormat=n?hn.VERTEX_FORMAT:po.MaterialSupport.TEXTURED.vertexFormat,i.plane=t.plane.getValue(Je.MINIMUM_VALUE,i.plane),i.dimensions=t.dimensions.getValue(Je.MINIMUM_VALUE,i.dimensions)};eh.DynamicGeometryUpdater=BV;function BV(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(BV.prototype=Object.create(xi.prototype),BV.prototype.constructor=BV);BV.prototype._isHidden=function(e,t,n){let i=this._options,o=j.getValueOrUndefined(e.position,n,Elt);return!l(o)||!l(i.plane)||!l(i.dimensions)||xi.prototype._isHidden.call(this,e,t,n)};BV.prototype._setOptions=function(e,t,n){let i=this._options;i.plane=j.getValueOrDefault(t.plane,n,i.plane),i.dimensions=j.getValueOrUndefined(t.dimensions,n,i.dimensions)};var Llt=new m,Wlt=new m,vlt=new m,Flt=new m,Ilt=new q,Plt=new q,Xlt=new F;function M7(e,t,n,i){let o=e.normal,r=e.distance,s=m.multiplyByScalar(o,-r,vlt),a=m.clone(m.UNIT_Z,Wlt);W.equalsEpsilon(Math.abs(m.dot(a,o)),1,W.EPSILON8)&&(a=m.clone(m.UNIT_Y,a));let c=m.cross(a,o,Llt);a=m.cross(o,c,a),m.normalize(c,c),m.normalize(a,a);let d=Ilt;q.setColumn(d,0,c,d),q.setColumn(d,1,a,d),q.setColumn(d,2,o,d);let u=m.fromElements(t.x,t.y,1,Flt),h=q.multiplyByScale(d,u,Plt),p=F.fromRotationTranslation(h,s,Xlt);return F.multiplyTransformation(n,p,i)}eh.createPrimitiveMatrix=M7;var tN=eh;var tEi=x(T(),1);var o1i=x(T(),1);var Nlt=new m,Ylt=new Qe,wlt=new M,Mlt=new M,klt=new m,Ult=new m,Dlt=new m,nN=new m,Olt=new m,Blt=new m,Jxe=new Pe,zlt=new q,Hlt=new q,Klt=new m;function Jlt(e,t,n,i,o,r,s,a,c){let d=e.positions,u=Si.triangulate(e.positions2D,e.holes);u.length<3&&(u=[0,1,2]);let h=Me.createTypedArray(d.length,u.length);h.set(u);let p=zlt;if(i!==0){let g=Pe.fromAxisAngle(s,i,Jxe);if(p=q.fromQuaternion(g,p),t.tangent||t.bitangent){g=Pe.fromAxisAngle(s,-i,Jxe);let C=q.fromQuaternion(g,Hlt);a=m.normalize(q.multiplyByVector(C,a,a),a),t.bitangent&&(c=m.normalize(m.cross(s,a,c),c))}}else p=q.clone(q.IDENTITY,p);let b=Mlt;t.st&&(b.x=n.x,b.y=n.y);let f=d.length,y=f*3,_=new Float64Array(y),S=t.normal?new Float32Array(y):void 0,A=t.tangent?new Float32Array(y):void 0,Z=t.bitangent?new Float32Array(y):void 0,V=t.st?new Float32Array(f*2):void 0,E=0,L=0,v=0,I=0,X=0;for(let g=0;g<f;g++){let C=d[g];if(_[E++]=C.x,_[E++]=C.y,_[E++]=C.z,t.st)if(l(o)&&o.positions.length===f)V[X++]=o.positions[g].x,V[X++]=o.positions[g].y;else{let R=q.multiplyByVector(p,C,Nlt),G=r(R,wlt);M.subtract(G,b,G);let P=W.clamp(G.x/n.width,0,1),Y=W.clamp(G.y/n.height,0,1);V[X++]=P,V[X++]=Y}t.normal&&(S[L++]=s.x,S[L++]=s.y,S[L++]=s.z),t.tangent&&(A[I++]=a.x,A[I++]=a.y,A[I++]=a.z),t.bitangent&&(Z[v++]=c.x,Z[v++]=c.y,Z[v++]=c.z)}let N=new bn;return t.position&&(N.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:_})),t.normal&&(N.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:S})),t.tangent&&(N.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:A})),t.bitangent&&(N.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:Z})),t.st&&(N.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:V})),new ft({attributes:N,indices:h,primitiveType:ve.TRIANGLES})}function AS(e){e=e??B.EMPTY_OBJECT;let t=e.polygonHierarchy,n=e.textureCoordinates,i=e.vertexFormat??Xe.DEFAULT;this._vertexFormat=Xe.clone(i),this._polygonHierarchy=t,this._stRotation=e.stRotation??0,this._ellipsoid=ie.clone(e.ellipsoid??ie.default),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=n,this.packedLength=Qn.computeHierarchyPackedLength(t,m)+Xe.packedLength+ie.packedLength+(l(n)?Qn.computeHierarchyPackedLength(n,M):1)+2}AS.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 AS(t)};AS.pack=function(e,t,n){return n=n??0,n=Qn.packPolygonHierarchy(e._polygonHierarchy,t,n,m),ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._stRotation,l(e._textureCoordinates)?n=Qn.packPolygonHierarchy(e._textureCoordinates,t,n,M):t[n++]=-1,t[n++]=e.packedLength,t};var jlt=ie.clone(ie.UNIT_SPHERE),Qlt=new Xe,qlt={polygonHierarchy:{}};AS.unpack=function(e,t,n){t=t??0;let i=Qn.unpackPolygonHierarchy(e,t,m);t=i.startingIndex,delete i.startingIndex;let o=ie.unpack(e,t,jlt);t+=ie.packedLength;let r=Xe.unpack(e,t,Qlt);t+=Xe.packedLength;let s=e[t++],a=e[t]===-1?void 0:Qn.unpackPolygonHierarchy(e,t,M);l(a)?(t=a.startingIndex,delete a.startingIndex):t++;let c=e[t++];return l(n)||(n=new AS(qlt)),n._polygonHierarchy=i,n._ellipsoid=ie.clone(o,n._ellipsoid),n._vertexFormat=Xe.clone(r,n._vertexFormat),n._stRotation=s,n._textureCoordinates=a,n.packedLength=c,n};AS.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,m.equalsEpsilon,!0),s.length<3)return;let a=klt,c=Ult,d=Dlt,u=Olt,h=Blt;if(!kb.computeProjectTo2DArguments(s,nN,u,h))return;if(a=m.cross(u,h,a),a=m.normalize(a,a),!m.equalsEpsilon(nN,m.ZERO,W.EPSILON6)){let X=e._ellipsoid.geodeticSurfaceNormal(nN,Klt);m.dot(a,X)<0&&(a=m.negate(a,a),u=m.negate(u,u))}let b=kb.createProjectPointsTo2DFunction(nN,u,h),f=kb.createProjectPointTo2DFunction(nN,u,h);t.tangent&&(c=m.clone(u,c)),t.bitangent&&(d=m.clone(h,d));let y=Qn.polygonsFromHierarchy(n,r,b,!1),_=y.hierarchy,S=y.polygons,A=function(X){return X},Z=r?Qn.polygonsFromHierarchy(o,!0,A,!1).polygons:void 0;if(_.length===0)return;s=_[0].outerRing;let V=de.fromPoints(s),E=Qn.computeBoundingRectangle(a,f,s,i,Ylt),L=[];for(let X=0;X<S.length;X++){let N=new Wt({geometry:Jlt(S[X],t,E,i,r?Z[X]:void 0,f,a,c,d)});L.push(N)}let v=Un.combineInstances(L)[0];v.attributes.position.values=new Float64Array(v.attributes.position.values),v.indices=Me.createTypedArray(v.attributes.position.values.length/3,v.indices);let I=v.attributes;return t.position||delete I.position,new ft({attributes:I,indices:v.indices,primitiveType:v.primitiveType,boundingSphere:V})};var iN=AS;var V1i=x(T(),1);var jxe=[],AO=[];function $lt(e,t,n,i,o){let s=Rs.fromPoints(t,e).projectPointsOntoPlane(t,jxe);Si.computeWindingOrder2D(s)===Us.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let c,d,u=t.length,h=0;if(i)for(c=new Float64Array(u*2*3),d=0;d<u;d++){let f=t[d],y=t[(d+1)%u];c[h++]=f.x,c[h++]=f.y,c[h++]=f.z,c[h++]=y.x,c[h++]=y.y,c[h++]=y.z}else{let f=0;if(o===on.GEODESIC)for(d=0;d<u;d++)f+=Qn.subdivideLineCount(t[d],t[(d+1)%u],n);else if(o===on.RHUMB)for(d=0;d<u;d++)f+=Qn.subdivideRhumbLineCount(e,t[d],t[(d+1)%u],n);for(c=new Float64Array(f*3),d=0;d<u;d++){let y;o===on.GEODESIC?y=Qn.subdivideLine(t[d],t[(d+1)%u],n,AO):o===on.RHUMB&&(y=Qn.subdivideRhumbLine(e,t[d],t[(d+1)%u],n,AO));let _=y.length;for(let S=0;S<_;++S)c[h++]=y[S]}}u=c.length/3;let p=u*2,b=Me.createTypedArray(u,p);for(h=0,d=0;d<u-1;d++)b[h++]=d,b[h++]=d+1;return b[h++]=u-1,b[h++]=0,new Wt({geometry:new ft({attributes:new bn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c})}),indices:b,primitiveType:ve.LINES})})}function edt(e,t,n,i,o){let s=Rs.fromPoints(t,e).projectPointsOntoPlane(t,jxe);Si.computeWindingOrder2D(s)===Us.CLOCKWISE&&(s.reverse(),t=t.slice().reverse());let c,d,u=t.length,h=new Array(u),p=0;if(i)for(c=new Float64Array(u*2*3*2),d=0;d<u;++d){h[d]=p/3;let _=t[d],S=t[(d+1)%u];c[p++]=_.x,c[p++]=_.y,c[p++]=_.z,c[p++]=S.x,c[p++]=S.y,c[p++]=S.z}else{let _=0;if(o===on.GEODESIC)for(d=0;d<u;d++)_+=Qn.subdivideLineCount(t[d],t[(d+1)%u],n);else if(o===on.RHUMB)for(d=0;d<u;d++)_+=Qn.subdivideRhumbLineCount(e,t[d],t[(d+1)%u],n);for(c=new Float64Array(_*3*2),d=0;d<u;++d){h[d]=p/3;let S;o===on.GEODESIC?S=Qn.subdivideLine(t[d],t[(d+1)%u],n,AO):o===on.RHUMB&&(S=Qn.subdivideRhumbLine(e,t[d],t[(d+1)%u],n,AO));let A=S.length;for(let Z=0;Z<A;++Z)c[p++]=S[Z]}}u=c.length/6;let b=h.length,f=(u*2+b)*2,y=Me.createTypedArray(u+b,f);for(p=0,d=0;d<u;++d)y[p++]=d,y[p++]=(d+1)%u,y[p++]=d+u,y[p++]=(d+1)%u+u;for(d=0;d<b;d++){let _=h[d];y[p++]=_,y[p++]=_+u}return new Wt({geometry:new ft({attributes:new bn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c})}),indices:y,primitiveType:ve.LINES})})}function ZS(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??on.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=Qn.computeHierarchyPackedLength(t,m)+ie.packedLength+8}ZS.pack=function(e,t,n){return n=n??0,n=Qn.packPolygonHierarchy(e._polygonHierarchy,t,n,m),ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,t[n++]=e._height,t[n++]=e._extrudedHeight,t[n++]=e._granularity,t[n++]=e._perPositionHeightExtrude?1:0,t[n++]=e._perPositionHeight?1:0,t[n++]=e._arcType,t[n++]=e._offsetAttribute??-1,t[n]=e.packedLength,t};var tdt=ie.clone(ie.UNIT_SPHERE),ndt={polygonHierarchy:{}};ZS.unpack=function(e,t,n){t=t??0;let i=Qn.unpackPolygonHierarchy(e,t,m);t=i.startingIndex,delete i.startingIndex;let o=ie.unpack(e,t,tdt);t+=ie.packedLength;let r=e[t++],s=e[t++],a=e[t++],c=e[t++]===1,d=e[t++]===1,u=e[t++],h=e[t++],p=e[t];return l(n)||(n=new ZS(ndt)),n._polygonHierarchy=i,n._ellipsoid=ie.clone(o,n._ellipsoid),n._height=r,n._extrudedHeight=s,n._granularity=a,n._perPositionHeight=d,n._perPositionHeightExtrude=c,n._arcType=u,n._offsetAttribute=h===-1?void 0:h,n.packedLength=p,n};ZS.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 ZS(t)};ZS.createGeometry=function(e){let t=e._ellipsoid,n=e._granularity,i=e._polygonHierarchy,o=e._perPositionHeight,r=e._arcType,s=Qn.polygonOutlinesFromHierarchy(i,!o,t);if(s.length===0)return;let a,c=[],d=W.chordLength(n,t.maximumRadius),u=e._height,h=e._extrudedHeight,p=e._perPositionHeightExtrude||!W.equalsEpsilon(u,h,0,W.EPSILON2),b,f;if(p)for(f=0;f<s.length;f++){if(a=edt(t,s[f],d,o,r),a.geometry=Qn.scaleToGeodeticHeightExtruded(a.geometry,u,h,t,o),l(e._offsetAttribute)){let S=a.geometry.attributes.position.values.length/3,A=new Uint8Array(S);e._offsetAttribute===dn.TOP?A=A.fill(1,0,S/2):(b=e._offsetAttribute===dn.NONE?0:1,A=A.fill(b)),a.geometry.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:A})}c.push(a)}else for(f=0;f<s.length;f++){if(a=$lt(t,s[f],d,o,r),a.geometry.attributes.position.values=Si.scaleToGeodeticHeight(a.geometry.attributes.position.values,u,t,!o),l(e._offsetAttribute)){let S=a.geometry.attributes.position.values.length;b=e._offsetAttribute===dn.NONE?0:1;let A=new Uint8Array(S/3).fill(b);a.geometry.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:A})}c.push(a)}let y=Un.combineInstances(c)[0],_=de.fromVertices(y.attributes.position.values);return new ft({attributes:y.attributes,indices:y.indices,primitiveType:y.primitiveType,boundingSphere:_,offsetAttribute:e._offsetAttribute})};var oN=ZS;var Qxe="Entity polygons cannot have both height and perPositionHeight. height will be ignored",qxe="heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored",$xe=new U,eTe=m.ZERO,tTe=new m,nTe=new ae,idt=[],odt=new M;function rdt(e){this.id=e,this.vertexFormat=void 0,this.polygonHierarchy=void 0,this.perPositionHeight=void 0,this.closeTop=void 0,this.closeBottom=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.offsetAttribute=void 0,this.arcType=void 0,this.textureCoordinates=void 0}function Iu(e,t){$n.call(this,{entity:e,scene:t,geometryOptions:new rdt(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}l(Object.create)&&(Iu.prototype=Object.create($n.prototype),Iu.prototype.constructor=Iu);Iu.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=this._options,o={show:new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Bt){let s;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(s=this._materialProperty.color.getValue(e,$xe)),l(s)||(s=U.WHITE),o.color=Ht.fromColor(s)}l(i.offsetAttribute)&&(o.offset=fo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,eTe,tTe)));let r;return i.perPositionHeight&&!l(i.extrudedHeight)?r=new iN(i):r=new mb(i),new Wt({id:t,geometry:r,attributes:o})};Iu.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=this._options,o=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,$xe),r=this._distanceDisplayConditionProperty.getValue(e),s={show:new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(o),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(r),offset:void 0};l(i.offsetAttribute)&&(s.offset=fo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,eTe,tTe)));let a;return i.perPositionHeight&&!l(i.extrudedHeight)?a=new zm(i):a=new oN(i),new Wt({id:t,geometry:a,attributes:s})};Iu.prototype._computeCenter=function(e,t){let n=j.getValueOrUndefined(this._entity.polygon.hierarchy,e);if(!l(n))return;let i=n.positions;if(i.length===0)return;let o=this._scene.ellipsoid,r=Rs.fromPoints(i,o),s=r.projectPointsOntoPlane(i,idt),a=s.length,c=0,d=a-1,u=new M;for(let p=0;p<a;d=p++){let b=s[p],f=s[d],y=b.x*f.y-f.x*b.y,_=M.add(b,f,odt);_=M.multiplyByScalar(_,y,_),u=M.add(u,_,u),c+=y}let h=1/(c*3);return u=M.multiplyByScalar(u,h,u),r.projectPointOntoEllipsoid(u,t)};Iu.prototype._isHidden=function(e,t){return!l(t.hierarchy)||Ti.prototype._isHidden.call(this,e,t)};Iu.prototype._isOnTerrain=function(e,t){let n=$n.prototype._isOnTerrain.call(this,e,t),i=t.perPositionHeight,o=l(i)&&(i.isConstant?i.getValue(Je.MINIMUM_VALUE):!0);return n&&!o};Iu.prototype._isDynamic=function(e,t){return!t.hierarchy.isConstant||!j.isConstant(t.height)||!j.isConstant(t.extrudedHeight)||!j.isConstant(t.granularity)||!j.isConstant(t.stRotation)||!j.isConstant(t.textureCoordinates)||!j.isConstant(t.outlineWidth)||!j.isConstant(t.perPositionHeight)||!j.isConstant(t.closeTop)||!j.isConstant(t.closeBottom)||!j.isConstant(t.zIndex)||!j.isConstant(t.arcType)||this._onTerrain&&!j.isConstant(this._materialProperty)&&!(this._materialProperty instanceof Bt)};Iu.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Bt,i=this._options;i.vertexFormat=n?hn.VERTEX_FORMAT:po.MaterialSupport.TEXTURED.vertexFormat;let o=t.hierarchy.getValue(Je.MINIMUM_VALUE),r=j.getValueOrUndefined(t.height,Je.MINIMUM_VALUE),s=j.getValueOrDefault(t.heightReference,Je.MINIMUM_VALUE,tt.NONE),a=j.getValueOrUndefined(t.extrudedHeight,Je.MINIMUM_VALUE),c=j.getValueOrDefault(t.extrudedHeightReference,Je.MINIMUM_VALUE,tt.NONE),d=j.getValueOrDefault(t.perPositionHeight,Je.MINIMUM_VALUE,!1);r=$n.getGeometryHeight(r,s);let u;if(d?(l(r)&&(r=void 0,Tt(Qxe)),s!==tt.NONE&&d&&(r=void 0,Tt(qxe))):(l(a)&&!l(r)&&(r=0),u=$n.computeGeometryOffsetAttribute(r,s,a,c)),i.polygonHierarchy=o,i.granularity=j.getValueOrUndefined(t.granularity,Je.MINIMUM_VALUE),i.stRotation=j.getValueOrUndefined(t.stRotation,Je.MINIMUM_VALUE),i.perPositionHeight=d,i.closeTop=j.getValueOrDefault(t.closeTop,Je.MINIMUM_VALUE,!0),i.closeBottom=j.getValueOrDefault(t.closeBottom,Je.MINIMUM_VALUE,!0),i.offsetAttribute=u,i.height=r,i.arcType=j.getValueOrDefault(t.arcType,Je.MINIMUM_VALUE,on.GEODESIC),i.textureCoordinates=j.getValueOrUndefined(t.textureCoordinates,Je.MINIMUM_VALUE),a=$n.getGeometryExtrudedHeight(a,c),a===$n.CLAMP_TO_GROUND){let h=mb.computeRectangleFromPositions(i.polygonHierarchy.positions,i.ellipsoid,i.arcType,nTe);a=Ei.getMinimumMaximumHeights(h).minimumTerrainHeight}i.extrudedHeight=a};Iu.prototype._getIsClosed=function(e){let t=e.height,n=e.extrudedHeight,i=l(n)&&n!==t;return!e.perPositionHeight&&(!i&&t===0||i&&e.closeTop&&e.closeBottom)};Iu.DynamicGeometryUpdater=zV;function zV(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(zV.prototype=Object.create(xi.prototype),zV.prototype.constructor=zV);zV.prototype._isHidden=function(e,t,n){return!l(this._options.polygonHierarchy)||xi.prototype._isHidden.call(this,e,t,n)};zV.prototype._setOptions=function(e,t,n){let i=this._options;i.polygonHierarchy=j.getValueOrUndefined(t.hierarchy,n);let o=j.getValueOrUndefined(t.height,n),r=j.getValueOrDefault(t.heightReference,n,tt.NONE),s=j.getValueOrDefault(t.extrudedHeightReference,n,tt.NONE),a=j.getValueOrUndefined(t.extrudedHeight,n),c=j.getValueOrUndefined(t.perPositionHeight,n);o=$n.getGeometryHeight(o,s);let d;if(c?(l(o)&&(o=void 0,Tt(Qxe)),r!==tt.NONE&&c&&(o=void 0,Tt(qxe))):(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,on.GEODESIC),a=$n.getGeometryExtrudedHeight(a,s),a===$n.CLAMP_TO_GROUND){let u=mb.computeRectangleFromPositions(i.polygonHierarchy.positions,i.ellipsoid,i.arcType,nTe);a=Ei.getMinimumMaximumHeights(u).minimumTerrainHeight}i.extrudedHeight=a};var rN=Iu;var lGi=x(T(),1);var CEi=x(T(),1);function sdt(e,t,n,i){let o=new bn;i.position&&(o.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:e}));let r=t.length,s=e.length/3,a=(s-r*2)/(r*2),c=Si.triangulate(t),d=(a-1)*r*6+c.length*2,u=Me.createTypedArray(s,d),h,p,b,f,y,_,S=r*2,A=0;for(h=0;h<a-1;h++){for(p=0;p<r-1;p++)b=p*2+h*r*2,_=b+S,f=b+1,y=f+S,u[A++]=f,u[A++]=b,u[A++]=y,u[A++]=y,u[A++]=b,u[A++]=_;b=r*2-2+h*r*2,f=b+1,y=f+S,_=b+S,u[A++]=f,u[A++]=b,u[A++]=y,u[A++]=y,u[A++]=b,u[A++]=_}if(i.st||i.tangent||i.bitangent){let E=new Float32Array(s*2),L=1/(a-1),v=1/n.height,I=n.height/2,X,N,g=0;for(h=0;h<a;h++){for(X=h*L,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)*L,N=v*(t[p].y+I),E[g++]=X,E[g++]=N;o.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:new Float32Array(E)})}let Z=s-r*2;for(h=0;h<c.length;h+=3){let E=c[h]+Z,L=c[h+1]+Z,v=c[h+2]+Z;u[A++]=E,u[A++]=L,u[A++]=v,u[A++]=v+r,u[A++]=L+r,u[A++]=E+r}let V=new ft({attributes:o,indices:u,boundingSphere:de.fromVertices(e),primitiveType:ve.TRIANGLES});if(i.normal&&(V=Un.computeNormal(V)),i.tangent||i.bitangent){try{V=Un.computeTangentAndBitangent(V)}catch{Tt("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 aN(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=Xe.clone(e.vertexFormat??Xe.DEFAULT),this._granularity=e.granularity??W.RADIANS_PER_DEGREE,this._workerName="createPolylineVolumeGeometry";let i=1+t.length*m.packedLength;i+=1+n.length*M.packedLength,this.packedLength=i+ie.packedLength+Xe.packedLength+2}aN.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=m.packedLength)m.pack(o[i],t,n);let s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=M.packedLength)M.pack(s[i],t,n);return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var iTe=ie.clone(ie.UNIT_SPHERE),oTe=new Xe,sN={polylinePositions:void 0,shapePositions:void 0,ellipsoid:iTe,vertexFormat:oTe,cornerType:void 0,granularity:void 0};aN.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=m.packedLength)r[i]=m.unpack(e,t);o=e[t++];let s=new Array(o);for(i=0;i<o;++i,t+=M.packedLength)s[i]=M.unpack(e,t);let a=ie.unpack(e,t,iTe);t+=ie.packedLength;let c=Xe.unpack(e,t,oTe);t+=Xe.packedLength;let d=e[t++],u=e[t];return l(n)?(n._positions=r,n._shape=s,n._ellipsoid=ie.clone(a,n._ellipsoid),n._vertexFormat=Xe.clone(c,n._vertexFormat),n._cornerType=d,n._granularity=u,n):(sN.polylinePositions=r,sN.shapePositions=s,sN.cornerType=d,sN.granularity=u,new aN(sN))};var adt=new Qe;aN.createGeometry=function(e){let t=e._positions,n=Yo(t,m.equalsEpsilon),i=e._shape;if(i=yf.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;Si.computeWindingOrder2D(i)===Us.CLOCKWISE&&i.reverse();let o=Qe.fromPoints(i,adt),r=yf.computePositions(n,i,o,e,!0);return sdt(r,i,o,e._vertexFormat)};var cN=aN;var zEi=x(T(),1);function cdt(e,t){let n=new bn;n.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:e});let i=t.length,o=n.position.values.length/3,s=e.length/3/i,a=Me.createTypedArray(o,2*i*(s+1)),c,d,u=0;c=0;let h=c*i;for(d=0;d<i-1;d++)a[u++]=d+h,a[u++]=d+h+1;for(a[u++]=i-1+h,a[u++]=h,c=s-1,h=c*i,d=0;d<i-1;d++)a[u++]=d+h,a[u++]=d+h+1;for(a[u++]=i-1+h,a[u++]=h,c=0;c<s-1;c++){let b=i*c,f=b+i;for(d=0;d<i;d++)a[u++]=d+b,a[u++]=d+f}return new ft({attributes:n,indices:Me.createTypedArray(o,a),boundingSphere:de.fromVertices(e),primitiveType:ve.LINES})}function dN(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*m.packedLength;i+=1+n.length*M.packedLength,this.packedLength=i+ie.packedLength+2}dN.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=m.packedLength)m.pack(o[i],t,n);let s=e._shape;for(r=s.length,t[n++]=r,i=0;i<r;++i,n+=M.packedLength)M.pack(s[i],t,n);return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,t[n++]=e._cornerType,t[n]=e._granularity,t};var rTe=ie.clone(ie.UNIT_SPHERE),lN={polylinePositions:void 0,shapePositions:void 0,ellipsoid:rTe,height:void 0,cornerType:void 0,granularity:void 0};dN.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=m.packedLength)r[i]=m.unpack(e,t);o=e[t++];let s=new Array(o);for(i=0;i<o;++i,t+=M.packedLength)s[i]=M.unpack(e,t);let a=ie.unpack(e,t,rTe);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):(lN.polylinePositions=r,lN.shapePositions=s,lN.cornerType=c,lN.granularity=d,new dN(lN))};var ldt=new Qe;dN.createGeometry=function(e){let t=e._positions,n=Yo(t,m.equalsEpsilon),i=e._shape;if(i=yf.removeDuplicatesFromShape(i),n.length<2||i.length<3)return;Si.computeWindingOrder2D(i)===Us.CLOCKWISE&&i.reverse();let o=Qe.fromPoints(i,ldt),r=yf.computePositions(n,i,o,e,!1);return cdt(r,i)};var uN=dN;var sTe=new U;function ddt(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 Mp(e,t){Ti.call(this,{entity:e,scene:t,geometryOptions:new ddt(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}l(Object.create)&&(Mp.prototype=Object.create(Ti.prototype),Mp.prototype.constructor=Mp);Mp.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,o,r=new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=Kn.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Bt){let c;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(c=this._materialProperty.color.getValue(e,sTe)),l(c)||(c=U.WHITE),o=Ht.fromColor(c),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};return new Wt({id:t,geometry:new cN(this._options),attributes:i})};Mp.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,sTe),o=this._distanceDisplayConditionProperty.getValue(e);return new Wt({id:t,geometry:new uN(this._options),attributes:{show:new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(o)}})};Mp.prototype._isHidden=function(e,t){return!l(t.positions)||!l(t.shape)||Ti.prototype._isHidden.call(this,e,t)};Mp.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!t.shape.isConstant||!j.isConstant(t.granularity)||!j.isConstant(t.outlineWidth)||!j.isConstant(t.cornerType)};Mp.prototype._setStaticOptions=function(e,t){let n=t.granularity,i=t.cornerType,o=this._options,r=this._materialProperty instanceof Bt;o.vertexFormat=r?hn.VERTEX_FORMAT:po.MaterialSupport.TEXTURED.vertexFormat,o.polylinePositions=t.positions.getValue(Je.MINIMUM_VALUE,o.polylinePositions),o.shapePositions=t.shape.getValue(Je.MINIMUM_VALUE,o.shape),o.granularity=l(n)?n.getValue(Je.MINIMUM_VALUE):void 0,o.cornerType=l(i)?i.getValue(Je.MINIMUM_VALUE):void 0};Mp.DynamicGeometryUpdater=HV;function HV(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(HV.prototype=Object.create(xi.prototype),HV.prototype.constructor=HV);HV.prototype._isHidden=function(e,t,n){let i=this._options;return!l(i.polylinePositions)||!l(i.shapePositions)||xi.prototype._isHidden.call(this,e,t,n)};HV.prototype._setOptions=function(e,t,n){let i=this._options;i.polylinePositions=j.getValueOrUndefined(t.positions,n,i.polylinePositions),i.shapePositions=j.getValueOrUndefined(t.shape,n),i.granularity=j.getValueOrUndefined(t.granularity,n),i.cornerType=j.getValueOrUndefined(t.cornerType,n)};var mN=Mp;var sLi=x(T(),1);var PGi=x(T(),1);var k7=new m,lTe=new m,dTe=new m,uTe=new m,mTe=new ae,udt=new M,mdt=new de,hdt=new de;function hTe(e,t){let n=new ft({attributes:new bn,primitiveType:ve.TRIANGLES});return n.attributes.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:t.positions}),e.normal&&(n.attributes.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:t.normals})),e.tangent&&(n.attributes.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:t.tangents})),e.bitangent&&(n.attributes.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:t.bitangents})),n}function fdt(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=uTe,u=dTe,h=lTe;if(t.normal||t.tangent||t.bitangent)for(let p=0;p<o;p+=3){let b=m.fromArray(e,p,k7),f=c+1,y=c+2;h=n.geodeticSurfaceNormal(b,h),(t.tangent||t.bitangent)&&(m.cross(m.UNIT_Z,h,u),q.multiplyByVector(i,u,u),m.normalize(u,u),t.bitangent&&m.normalize(m.cross(h,u,d),d)),t.normal&&(r[c]=h.x,r[f]=h.y,r[y]=h.z),t.tangent&&(s[c]=u.x,s[f]=u.y,s[y]=u.z),t.bitangent&&(a[c]=d.x,a[f]=d.y,a[y]=d.z),c+=3}return hTe(t,{positions:e,normals:r,tangents:s,bitangents:a})}var U7=new m,fTe=new m;function pdt(e,t,n){let i=e.length,o=t.normal?new Float32Array(i):void 0,r=t.tangent?new Float32Array(i):void 0,s=t.bitangent?new Float32Array(i):void 0,a=0,c=0,d=0,u=!0,h=uTe,p=dTe,b=lTe;if(t.normal||t.tangent||t.bitangent)for(let f=0;f<i;f+=6){let y=m.fromArray(e,f,k7),_=m.fromArray(e,(f+6)%i,U7);if(u){let S=m.fromArray(e,(f+3)%i,fTe);m.subtract(_,y,_),m.subtract(S,y,S),b=m.normalize(m.cross(S,_,b),b),u=!1}m.equalsEpsilon(_,y,W.EPSILON10)&&(u=!0),(t.tangent||t.bitangent)&&(h=n.geodeticSurfaceNormal(y,h),t.tangent&&(p=m.normalize(m.cross(h,b,p),p))),t.normal&&(o[a++]=b.x,o[a++]=b.y,o[a++]=b.z,o[a++]=b.x,o[a++]=b.y,o[a++]=b.z),t.tangent&&(r[c++]=p.x,r[c++]=p.y,r[c++]=p.z,r[c++]=p.x,r[c++]=p.y,r[c++]=p.z),t.bitangent&&(s[d++]=h.x,s[d++]=h.y,s[d++]=h.z,s[d++]=h.x,s[d++]=h.y,s[d++]=h.z)}return hTe(t,{positions:e,normals:o,tangents:r,bitangents:s})}function pTe(e,t){let n=e._vertexFormat,i=e._ellipsoid,o=t.height,r=t.width,s=t.northCap,a=t.southCap,c=0,d=o,u=o,h=0;s&&(c=1,u-=1,h+=1),a&&(d-=1,u-=1,h+=1),h+=r*u;let p=n.position?new Float64Array(h*3):void 0,b=n.st?new Float32Array(h*2):void 0,f=0,y=0,_=k7,S=udt,A=Number.MAX_VALUE,Z=Number.MAX_VALUE,V=-Number.MAX_VALUE,E=-Number.MAX_VALUE;for(let C=c;C<d;++C)for(let R=0;R<r;++R)ga.computePosition(t,i,n.st,C,R,_,S),p[f++]=_.x,p[f++]=_.y,p[f++]=_.z,n.st&&(b[y++]=S.x,b[y++]=S.y,A=Math.min(A,S.x),Z=Math.min(Z,S.y),V=Math.max(V,S.x),E=Math.max(E,S.y));if(s&&(ga.computePosition(t,i,n.st,0,0,_,S),p[f++]=_.x,p[f++]=_.y,p[f++]=_.z,n.st&&(b[y++]=S.x,b[y++]=S.y,A=S.x,Z=S.y,V=S.x,E=S.y)),a&&(ga.computePosition(t,i,n.st,o-1,0,_,S),p[f++]=_.x,p[f++]=_.y,p[f]=_.z,n.st&&(b[y++]=S.x,b[y]=S.y,A=Math.min(A,S.x),Z=Math.min(Z,S.y),V=Math.max(V,S.x),E=Math.max(E,S.y))),n.st&&(A<0||Z<0||V>1||E>1))for(let C=0;C<b.length;C+=2)b[C]=(b[C]-A)/(V-A),b[C+1]=(b[C+1]-Z)/(E-Z);let L=fdt(p,n,i,t.tangentRotationMatrix),v=6*(r-1)*(u-1);s&&(v+=3*(r-1)),a&&(v+=3*(r-1));let I=Me.createTypedArray(h,v),X=0,N=0,g;for(g=0;g<u-1;++g){for(let C=0;C<r-1;++C){let R=X,G=R+r,P=G+1,Y=R+1;I[N++]=R,I[N++]=G,I[N++]=Y,I[N++]=Y,I[N++]=G,I[N++]=P,++X}++X}if(s||a){let C=h-1,R=h-1;s&&a&&(C=h-2);let G,P;if(X=0,s)for(g=0;g<r-1;g++)G=X,P=G+1,I[N++]=C,I[N++]=G,I[N++]=P,++X;if(a)for(X=(u-1)*r,g=0;g<r-1;g++)G=X,P=G+1,I[N++]=G,I[N++]=R,I[N++]=P,++X}return L.indices=I,n.st&&(L.attributes.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:b})),L}function KV(e,t,n,i,o){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n+2],e[t++]=o[n],e[t++]=o[n+1],e[t]=o[n+2],e}function JV(e,t,n,i){return e[t++]=i[n],e[t++]=i[n+1],e[t++]=i[n],e[t]=i[n+1],e}var D7=new Xe;function bdt(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 Ue=Xe.clone(o,D7);Ue.normal=!0,e._vertexFormat=Ue}let h=pTe(e,t);n&&(e._vertexFormat=o);let p=Si.scaleToGeodeticHeight(h.attributes.position.values,s,a,!1);p=new Float64Array(p);let b=p.length,f=b*2,y=new Float64Array(f);y.set(p);let _=Si.scaleToGeodeticHeight(h.attributes.position.values,r,a);y.set(_,b),h.attributes.position.values=y;let S=o.normal?new Float32Array(f):void 0,A=o.tangent?new Float32Array(f):void 0,Z=o.bitangent?new Float32Array(f):void 0,V=o.st?new Float32Array(f/3*2):void 0,E,L;if(o.normal){for(L=h.attributes.normal.values,S.set(L),u=0;u<b;u++)L[u]=-L[u];S.set(L,b),h.attributes.normal.values=S}if(n){L=h.attributes.normal.values,o.normal||(h.attributes.normal=void 0);let Ue=new Float32Array(f);for(u=0;u<b;u++)L[u]=-L[u];Ue.set(L,b),h.attributes.extrudeDirection=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:Ue})}let v,I=l(i);if(I){let Ue=b/3*2,St=new Uint8Array(Ue);i===dn.TOP?St=St.fill(1,0,Ue/2):(v=i===dn.NONE?0:1,St=St.fill(v)),h.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:St})}if(o.tangent){let Ue=h.attributes.tangent.values;for(A.set(Ue),u=0;u<b;u++)Ue[u]=-Ue[u];A.set(Ue,b),h.attributes.tangent.values=A}if(o.bitangent){let Ue=h.attributes.bitangent.values;Z.set(Ue),Z.set(Ue,b),h.attributes.bitangent.values=Z}o.st&&(E=h.attributes.st.values,V.set(E),V.set(E,b/3*2),h.attributes.st.values=V);let X=h.indices,N=X.length,g=b/3,C=Me.createTypedArray(f/3,N*2);for(C.set(X),u=0;u<N;u+=3)C[u+N]=X[u+2]+g,C[u+1+N]=X[u+1]+g,C[u+2+N]=X[u]+g;h.indices=C;let R=t.northCap,G=t.southCap,P=c,Y=2,O=0,k=4,D=4;R&&(Y-=1,P-=1,O+=1,k-=2,D-=1),G&&(Y-=1,P-=1,O+=1,k-=2,D-=1),O+=Y*d+2*P-k;let w=(O+D)*2,z=new Float64Array(w*3),J=n?new Float32Array(w*3):void 0,ee=I?new Uint8Array(w):void 0,H=o.st?new Float32Array(w*2):void 0,te=i===dn.TOP;I&&!te&&(v=i===dn.ALL?1:0,ee=ee.fill(v));let $=0,be=0,ye=0,ce=0,Ze=d*P,xe;for(u=0;u<Ze;u+=d)xe=u*3,z=KV(z,$,xe,p,_),$+=6,o.st&&(H=JV(H,be,u*2,E),be+=4),n&&(ye+=3,J[ye++]=L[xe],J[ye++]=L[xe+1],J[ye++]=L[xe+2]),te&&(ee[ce++]=1,ce+=1);if(G){let Ue=R?Ze+1:Ze;for(xe=Ue*3,u=0;u<2;u++)z=KV(z,$,xe,p,_),$+=6,o.st&&(H=JV(H,be,Ue*2,E),be+=4),n&&(ye+=3,J[ye++]=L[xe],J[ye++]=L[xe+1],J[ye++]=L[xe+2]),te&&(ee[ce++]=1,ce+=1)}else for(u=Ze-d;u<Ze;u++)xe=u*3,z=KV(z,$,xe,p,_),$+=6,o.st&&(H=JV(H,be,u*2,E),be+=4),n&&(ye+=3,J[ye++]=L[xe],J[ye++]=L[xe+1],J[ye++]=L[xe+2]),te&&(ee[ce++]=1,ce+=1);for(u=Ze-1;u>0;u-=d)xe=u*3,z=KV(z,$,xe,p,_),$+=6,o.st&&(H=JV(H,be,u*2,E),be+=4),n&&(ye+=3,J[ye++]=L[xe],J[ye++]=L[xe+1],J[ye++]=L[xe+2]),te&&(ee[ce++]=1,ce+=1);if(R){let Ue=Ze;for(xe=Ue*3,u=0;u<2;u++)z=KV(z,$,xe,p,_),$+=6,o.st&&(H=JV(H,be,Ue*2,E),be+=4),n&&(ye+=3,J[ye++]=L[xe],J[ye++]=L[xe+1],J[ye++]=L[xe+2]),te&&(ee[ce++]=1,ce+=1)}else for(u=d-1;u>=0;u--)xe=u*3,z=KV(z,$,xe,p,_),$+=6,o.st&&(H=JV(H,be,u*2,E),be+=4),n&&(ye+=3,J[ye++]=L[xe],J[ye++]=L[xe+1],J[ye++]=L[xe+2]),te&&(ee[ce++]=1,ce+=1);let Ge=pdt(z,o,a);o.st&&(Ge.attributes.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:H})),n&&(Ge.attributes.extrudeDirection=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:J})),I&&(Ge.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:ee}));let Ve=Me.createTypedArray(w,O*6),Ye,ke,it,pt;b=z.length/3;let Vt=0;for(u=0;u<b-1;u+=2){Ye=u,pt=(Ye+2)%b;let Ue=m.fromArray(z,Ye*3,U7),St=m.fromArray(z,pt*3,fTe);m.equalsEpsilon(Ue,St,W.EPSILON10)||(ke=(Ye+1)%b,it=(ke+2)%b,Ve[Vt++]=Ye,Ve[Vt++]=ke,Ve[Vt++]=pt,Ve[Vt++]=pt,Ve[Vt++]=ke,Ve[Vt++]=it)}return Ge.indices=Ve,Ge=Un.combineInstances([new Wt({geometry:h}),new Wt({geometry:Ge})]),Ge[0]}var gdt=[new m,new m,new m,new m],bTe=new pe,ydt=new pe;function O7(e,t,n,i,o){if(n===0)return ae.clone(e,o);let r=ga.computeOptions(e,t,n,0,mTe,bTe),s=r.height,a=r.width,c=gdt;return ga.computePosition(r,i,!1,0,0,c[0]),ga.computePosition(r,i,!1,0,a-1,c[1]),ga.computePosition(r,i,!1,s-1,0,c[2]),ga.computePosition(r,i,!1,s-1,a-1,c[3]),ae.fromCartesianArray(c,i,o)}function kp(e){e=e??B.EMPTY_OBJECT;let t=e.rectangle,n=e.height??0,i=e.extrudedHeight??n;this._rectangle=ae.clone(t),this._granularity=e.granularity??W.RADIANS_PER_DEGREE,this._ellipsoid=ie.clone(e.ellipsoid??ie.default),this._surfaceHeight=Math.max(n,i),this._rotation=e.rotation??0,this._stRotation=e.stRotation??0,this._vertexFormat=Xe.clone(e.vertexFormat??Xe.DEFAULT),this._extrudedHeight=Math.min(n,i),this._shadowVolume=e.shadowVolume??!1,this._workerName="createRectangleGeometry",this._offsetAttribute=e.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}kp.packedLength=ae.packedLength+ie.packedLength+Xe.packedLength+7;kp.pack=function(e,t,n){return n=n??0,ae.pack(e._rectangle,t,n),n+=ae.packedLength,ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._granularity,t[n++]=e._surfaceHeight,t[n++]=e._rotation,t[n++]=e._stRotation,t[n++]=e._extrudedHeight,t[n++]=e._shadowVolume?1:0,t[n]=e._offsetAttribute??-1,t};var gTe=new ae,yTe=ie.clone(ie.UNIT_SPHERE),hx={rectangle:gTe,ellipsoid:yTe,vertexFormat:D7,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};kp.unpack=function(e,t,n){t=t??0;let i=ae.unpack(e,t,gTe);t+=ae.packedLength;let o=ie.unpack(e,t,yTe);t+=ie.packedLength;let r=Xe.unpack(e,t,D7);t+=Xe.packedLength;let s=e[t++],a=e[t++],c=e[t++],d=e[t++],u=e[t++],h=e[t++]===1,p=e[t];return l(n)?(n._rectangle=ae.clone(i,n._rectangle),n._ellipsoid=ie.clone(o,n._ellipsoid),n._vertexFormat=Xe.clone(r,n._vertexFormat),n._granularity=s,n._surfaceHeight=a,n._rotation=c,n._stRotation=d,n._extrudedHeight=u,n._shadowVolume=h,n._offsetAttribute=p===-1?void 0:p,n):(hx.granularity=s,hx.height=a,hx.rotation=c,hx.stRotation=d,hx.extrudedHeight=u,hx.shadowVolume=h,hx.offsetAttribute=p===-1?void 0:p,new kp(hx))};kp.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 O7(n,i,r,o,t)};var xdt=new q,aTe=new Pe,Tdt=new pe;kp.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=ga.computeOptions(t,e._granularity,i,o,mTe,bTe,ydt),a=xdt;if(o!==0||i!==0){let b=ae.center(t,Tdt),f=n.geodeticSurfaceNormalCartographic(b,U7);Pe.fromAxisAngle(f,-o,aTe),q.fromQuaternion(aTe,a)}else q.clone(q.IDENTITY,a);let c=e._surfaceHeight,d=e._extrudedHeight,u=!W.equalsEpsilon(c,d,0,W.EPSILON2);s.lonScalar=1/e._rectangle.width,s.latScalar=1/e._rectangle.height,s.tangentRotationMatrix=a;let h,p;if(t=e._rectangle,u){h=bdt(e,s);let b=de.fromRectangle3D(t,n,c,hdt),f=de.fromRectangle3D(t,n,d,mdt);p=de.union(b,f)}else{if(h=pTe(e,s),h.attributes.position.values=Si.scaleToGeodeticHeight(h.attributes.position.values,c,n,!1),l(e._offsetAttribute)){let b=h.attributes.position.values.length,f=e._offsetAttribute===dn.NONE?0:1,y=new Uint8Array(b/3).fill(f);h.attributes.applyOffset=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:1,values:y})}p=de.fromRectangle3D(t,n,c)}return r.position||delete h.attributes.position,new ft({attributes:h.attributes,indices:h.indices,primitiveType:h.primitiveType,boundingSphere:p,offsetAttribute:e._offsetAttribute})};kp.createShadowVolume=function(e,t,n){let i=e._granularity,o=e._ellipsoid,r=t(i,o),s=n(i,o);return new kp({rectangle:e._rectangle,rotation:e._rotation,ellipsoid:o,stRotation:e._stRotation,granularity:i,extrudedHeight:s,height:r,vertexFormat:Xe.POSITION_ONLY,shadowVolume:!0})};var cTe=new ae,_dt=[new M,new M,new M],Sdt=new Oi,Adt=new pe;function Zdt(e){if(e._stRotation===0)return[0,0,0,1,1,0];let t=ae.clone(e._rectangle,cTe),n=e._granularity,i=e._ellipsoid,o=e._rotation-e._stRotation,r=O7(t,n,o,i,cTe),s=_dt;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,Sdt),d=ae.center(a,Adt);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],h=s[1],p=s[2],b=new Array(6);return M.pack(u,b),M.pack(h,b,2),M.pack(p,b,4),b}Object.defineProperties(kp.prototype,{rectangle:{get:function(){return l(this._rotatedRectangle)||(this._rotatedRectangle=O7(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=Zdt(this)),this._textureCoordinateRotationPoints}}});var CS=kp;var xTe=new U,TTe=m.ZERO,_Te=new m,STe=new ae,Cdt=new ae,Vdt=new pe;function Rdt(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 Rf(e,t){$n.call(this,{entity:e,scene:t,geometryOptions:new Rdt(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}l(Object.create)&&(Rf.prototype=Object.create($n.prototype),Rf.prototype.constructor=Rf);Rf.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i={show:new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};if(this._materialProperty instanceof Bt){let o;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(o=this._materialProperty.color.getValue(e,xTe)),l(o)||(o=U.WHITE),i.color=Ht.fromColor(o)}return l(this._options.offsetAttribute)&&(i.offset=fo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,TTe,_Te))),new Wt({id:t,geometry:new CS(this._options),attributes:i})};Rf.prototype.createOutlineGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=j.getValueOrDefault(this._outlineColorProperty,e,U.BLACK,xTe),o=this._distanceDisplayConditionProperty.getValue(e),r={show:new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(o),offset:void 0};return l(this._options.offsetAttribute)&&(r.offset=fo.fromCartesian3(j.getValueOrDefault(this._terrainOffsetProperty,e,TTe,_Te))),new Wt({id:t,geometry:new eS(this._options),attributes:r})};Rf.prototype._computeCenter=function(e,t){let n=j.getValueOrUndefined(this._entity.rectangle.coordinates,e,Cdt);if(!l(n))return;let i=ae.center(n,Vdt);return pe.toCartesian(i,ie.default,t)};Rf.prototype._isHidden=function(e,t){return!l(t.coordinates)||Ti.prototype._isHidden.call(this,e,t)};Rf.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 Bt)};Rf.prototype._setStaticOptions=function(e,t){let n=this._materialProperty instanceof Bt,i=j.getValueOrUndefined(t.height,Je.MINIMUM_VALUE),o=j.getValueOrDefault(t.heightReference,Je.MINIMUM_VALUE,tt.NONE),r=j.getValueOrUndefined(t.extrudedHeight,Je.MINIMUM_VALUE),s=j.getValueOrDefault(t.extrudedHeightReference,Je.MINIMUM_VALUE,tt.NONE);l(r)&&!l(i)&&(i=0);let a=this._options;a.vertexFormat=n?hn.VERTEX_FORMAT:po.MaterialSupport.TEXTURED.vertexFormat,a.rectangle=t.coordinates.getValue(Je.MINIMUM_VALUE,a.rectangle),a.granularity=j.getValueOrUndefined(t.granularity,Je.MINIMUM_VALUE),a.stRotation=j.getValueOrUndefined(t.stRotation,Je.MINIMUM_VALUE),a.rotation=j.getValueOrUndefined(t.rotation,Je.MINIMUM_VALUE),a.offsetAttribute=$n.computeGeometryOffsetAttribute(i,o,r,s),a.height=$n.getGeometryHeight(i,o),r=$n.getGeometryExtrudedHeight(r,s),r===$n.CLAMP_TO_GROUND&&(r=Ei.getMinimumMaximumHeights(CS.computeRectangle(a,STe)).minimumTerrainHeight),a.extrudedHeight=r};Rf.DynamicGeometryUpdater=jV;function jV(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(jV.prototype=Object.create(xi.prototype),jV.prototype.constructor=jV);jV.prototype._isHidden=function(e,t,n){return!l(this._options.rectangle)||xi.prototype._isHidden.call(this,e,t,n)};jV.prototype._setOptions=function(e,t,n){let i=this._options,o=j.getValueOrUndefined(t.height,n),r=j.getValueOrDefault(t.heightReference,n,tt.NONE),s=j.getValueOrUndefined(t.extrudedHeight,n),a=j.getValueOrDefault(t.extrudedHeightReference,n,tt.NONE);l(s)&&!l(o)&&(o=0),i.rectangle=j.getValueOrUndefined(t.coordinates,n,i.rectangle),i.granularity=j.getValueOrUndefined(t.granularity,n),i.stRotation=j.getValueOrUndefined(t.stRotation,n),i.rotation=j.getValueOrUndefined(t.rotation,n),i.offsetAttribute=$n.computeGeometryOffsetAttribute(o,r,s,a),i.height=$n.getGeometryHeight(o,r),s=$n.getGeometryExtrudedHeight(s,a),s===$n.CLAMP_TO_GROUND&&(s=Ei.getMinimumMaximumHeights(CS.computeRectangle(i,STe)).minimumTerrainHeight),i.extrudedHeight=s};var hN=Rf;var cWi=x(T(),1);var LLi=x(T(),1);var fLi=x(T(),1);var ATe={};function Edt(e,t){return W.equalsEpsilon(e.latitude,t.latitude,W.EPSILON10)&&W.equalsEpsilon(e.longitude,t.longitude,W.EPSILON10)}var Gdt=new pe,Ldt=new pe;function Wdt(e,t,n,i){t=Yo(t,m.equalsEpsilon);let o=t.length;if(o<2)return;let r=l(i),s=l(n),a=new Array(o),c=new Array(o),d=new Array(o),u=t[0];a[0]=u;let h=e.cartesianToCartographic(u,Gdt);s&&(h.height=n[0]),c[0]=h.height,r?d[0]=i[0]:d[0]=0;let p=c[0],b=d[0],f=p===b,y=1;for(let _=1;_<o;++_){let S=t[_],A=e.cartesianToCartographic(S,Ldt);s&&(A.height=n[_]),f=f&&A.height===0,Edt(h,A)?h.height<A.height&&(c[y-1]=A.height):(a[y]=S,c[y]=A.height,r?d[y]=i[_]:d[y]=0,f=f&&c[y]===d[y],pe.clone(A,h),++y)}if(!(f||y<2))return a.length=y,c.length=y,d.length=y,{positions:a,topHeights:c,bottomHeights:d}}var vdt=new Array(2),Fdt=new Array(2),Idt={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};ATe.computePositions=function(e,t,n,i,o,r){let s=Wdt(e,t,n,i);if(!l(s))return;t=s.positions,n=s.topHeights,i=s.bottomHeights;let a=t.length,c=a-2,d,u,h=W.chordLength(o,e.maximumRadius),p=Idt;if(p.minDistance=h,p.ellipsoid=e,r){let b=0,f;for(f=0;f<a-1;f++)b+=Ki.numberOfPoints(t[f],t[f+1],h)+1;d=new Float64Array(b*3),u=new Float64Array(b*3);let y=vdt,_=Fdt;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 VS=ATe;var B7=new m,ZO=new m,Pdt=new m,ZTe=new m,Xdt=new m,Ndt=new m,Ydt=new m;function RS(e){e=e??B.EMPTY_OBJECT;let t=e.positions,n=e.maximumHeights,i=e.minimumHeights,o=e.vertexFormat??Xe.DEFAULT,r=e.granularity??W.RADIANS_PER_DEGREE,s=e.ellipsoid??ie.default;this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._vertexFormat=Xe.clone(o),this._granularity=r,this._ellipsoid=ie.clone(s),this._workerName="createWallGeometry";let a=1+t.length*m.packedLength+2;l(i)&&(a+=i.length),l(n)&&(a+=n.length),this.packedLength=a+ie.packedLength+Xe.packedLength+1}RS.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=m.packedLength)m.pack(o[i],t,n);let s=e._minimumHeights;if(r=l(s)?s.length:0,t[n++]=r,l(s))for(i=0;i<r;++i)t[n++]=s[i];let a=e._maximumHeights;if(r=l(a)?a.length:0,t[n++]=r,l(a))for(i=0;i<r;++i)t[n++]=a[i];return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n]=e._granularity,t};var CTe=ie.clone(ie.UNIT_SPHERE),VTe=new Xe,fN={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:CTe,vertexFormat:VTe,granularity:void 0};RS.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=m.packedLength)r[i]=m.unpack(e,t);o=e[t++];let s;if(o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];o=e[t++];let a;if(o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];let c=ie.unpack(e,t,CTe);t+=ie.packedLength;let d=Xe.unpack(e,t,VTe);t+=Xe.packedLength;let u=e[t];return l(n)?(n._positions=r,n._minimumHeights=s,n._maximumHeights=a,n._ellipsoid=ie.clone(c,n._ellipsoid),n._vertexFormat=Xe.clone(d,n._vertexFormat),n._granularity=u,n):(fN.positions=r,fN.minimumHeights=s,fN.maximumHeights=a,fN.granularity=u,new RS(fN))};RS.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 RS(c)};RS.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,o=e._vertexFormat,r=e._granularity,s=e._ellipsoid,a=VS.computePositions(s,t,i,n,r,!0);if(!l(a))return;let c=a.bottomPositions,d=a.topPositions,u=a.numCorners,h=d.length,p=h*2,b=o.position?new Float64Array(p):void 0,f=o.normal?new Float32Array(p):void 0,y=o.tangent?new Float32Array(p):void 0,_=o.bitangent?new Float32Array(p):void 0,S=o.st?new Float32Array(p/3*2):void 0,A=0,Z=0,V=0,E=0,L=0,v=Ydt,I=Ndt,X=Xdt,N=!0;h/=3;let g,C=0,R=1/(h-u-1);for(g=0;g<h;++g){let k=g*3,D=m.fromArray(d,k,B7),w=m.fromArray(c,k,ZO);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[L++]=C,S[L++]=0,S[L++]=C,S[L++]=1),o.normal||o.tangent||o.bitangent){let z=m.clone(m.ZERO,ZTe),J=m.subtract(D,s.geodeticSurfaceNormal(D,ZO),ZO);if(g+1<h&&(z=m.fromArray(d,k+3,ZTe)),N){let ee=m.subtract(z,D,Pdt),H=m.subtract(J,D,B7);v=m.normalize(m.cross(H,ee,v),v),N=!1}m.equalsEpsilon(D,z,W.EPSILON10)?N=!0:(C+=R,o.tangent&&(I=m.normalize(m.subtract(z,D,I),I)),o.bitangent&&(X=m.normalize(m.cross(v,I,X),X))),o.normal&&(f[Z++]=v.x,f[Z++]=v.y,f[Z++]=v.z,f[Z++]=v.x,f[Z++]=v.y,f[Z++]=v.z),o.tangent&&(y[E++]=I.x,y[E++]=I.y,y[E++]=I.z,y[E++]=I.x,y[E++]=I.y,y[E++]=I.z),o.bitangent&&(_[V++]=X.x,_[V++]=X.y,_[V++]=X.z,_[V++]=X.x,_[V++]=X.y,_[V++]=X.z)}}let G=new bn;o.position&&(G.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:b})),o.normal&&(G.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:f})),o.tangent&&(G.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:y})),o.bitangent&&(G.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:_})),o.st&&(G.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:S}));let P=p/3;p-=6*(u+1);let Y=Me.createTypedArray(P,p),O=0;for(g=0;g<P-2;g+=2){let k=g,D=g+2,w=m.fromArray(b,k*3,B7),z=m.fromArray(b,D*3,ZO);if(m.equalsEpsilon(w,z,W.EPSILON10))continue;let J=g+1,ee=g+3;Y[O++]=J,Y[O++]=k,Y[O++]=ee,Y[O++]=ee,Y[O++]=k,Y[O++]=D}return new ft({attributes:G,indices:Y,primitiveType:ve.TRIANGLES,boundingSphere:de.fromVertices(b)})};var pN=RS;var BLi=x(T(),1);var RTe=new m,ETe=new m;function ES(e){e=e??B.EMPTY_OBJECT;let t=e.positions,n=e.maximumHeights,i=e.minimumHeights,o=e.granularity??W.RADIANS_PER_DEGREE,r=e.ellipsoid??ie.default;this._positions=t,this._minimumHeights=i,this._maximumHeights=n,this._granularity=o,this._ellipsoid=ie.clone(r),this._workerName="createWallOutlineGeometry";let s=1+t.length*m.packedLength+2;l(i)&&(s+=i.length),l(n)&&(s+=n.length),this.packedLength=s+ie.packedLength+1}ES.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=m.packedLength)m.pack(o[i],t,n);let s=e._minimumHeights;if(r=l(s)?s.length:0,t[n++]=r,l(s))for(i=0;i<r;++i)t[n++]=s[i];let a=e._maximumHeights;if(r=l(a)?a.length:0,t[n++]=r,l(a))for(i=0;i<r;++i)t[n++]=a[i];return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,t[n]=e._granularity,t};var GTe=ie.clone(ie.UNIT_SPHERE),bN={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:GTe,granularity:void 0};ES.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=m.packedLength)r[i]=m.unpack(e,t);o=e[t++];let s;if(o>0)for(s=new Array(o),i=0;i<o;++i)s[i]=e[t++];o=e[t++];let a;if(o>0)for(a=new Array(o),i=0;i<o;++i)a[i]=e[t++];let c=ie.unpack(e,t,GTe);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):(bN.positions=r,bN.minimumHeights=s,bN.maximumHeights=a,bN.granularity=d,new ES(bN))};ES.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 ES(c)};ES.createGeometry=function(e){let t=e._positions,n=e._minimumHeights,i=e._maximumHeights,o=e._granularity,r=e._ellipsoid,s=VS.computePositions(r,t,i,n,o,!1);if(!l(s))return;let a=s.bottomPositions,c=s.topPositions,d=c.length,u=d*2,h=new Float64Array(u),p=0;d/=3;let b;for(b=0;b<d;++b){let A=b*3,Z=m.fromArray(c,A,RTe),V=m.fromArray(a,A,ETe);h[p++]=V.x,h[p++]=V.y,h[p++]=V.z,h[p++]=Z.x,h[p++]=Z.y,h[p++]=Z.z}let f=new bn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:h})}),y=u/3;u=2*y-4+y;let _=Me.createTypedArray(y,u),S=0;for(b=0;b<y-2;b+=2){let A=b,Z=b+2,V=m.fromArray(h,A*3,RTe),E=m.fromArray(h,Z*3,ETe);if(m.equalsEpsilon(V,E,W.EPSILON10))continue;let L=b+1,v=b+3;_[S++]=L,_[S++]=A,_[S++]=L,_[S++]=v,_[S++]=A,_[S++]=Z}return _[S++]=y-2,_[S++]=y-1,new ft({attributes:f,indices:_,primitiveType:ve.LINES,boundingSphere:de.fromVertices(h)})};var gN=ES;var LTe=new U;function wdt(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 Ef(e,t){Ti.call(this,{entity:e,scene:t,geometryOptions:new wdt(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}l(Object.create)&&(Ef.prototype=Object.create(Ti.prototype),Ef.prototype.constructor=Ef);Ef.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i,o,r=new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),s=this._distanceDisplayConditionProperty.getValue(e),a=Kn.fromDistanceDisplayCondition(s);if(this._materialProperty instanceof Bt){let c;l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(c=this._materialProperty.color.getValue(e,LTe)),l(c)||(c=U.WHITE),o=Ht.fromColor(c),i={show:r,distanceDisplayCondition:a,color:o}}else i={show:r,distanceDisplayCondition:a};return new Wt({id:t,geometry:new pN(this._options),attributes:i})};Ef.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);return new Wt({id:t,geometry:new gN(this._options),attributes:{show:new Zn(n&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:Ht.fromColor(i),distanceDisplayCondition:Kn.fromDistanceDisplayCondition(o)}})};Ef.prototype._isHidden=function(e,t){return!l(t.positions)||Ti.prototype._isHidden.call(this,e,t)};Ef.prototype._getIsClosed=function(e){return!1};Ef.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)};Ef.prototype._setStaticOptions=function(e,t){let n=t.minimumHeights,i=t.maximumHeights,o=t.granularity,r=this._materialProperty instanceof Bt,s=this._options;s.vertexFormat=r?hn.VERTEX_FORMAT:po.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(Je.MINIMUM_VALUE,s.positions),s.minimumHeights=l(n)?n.getValue(Je.MINIMUM_VALUE,s.minimumHeights):void 0,s.maximumHeights=l(i)?i.getValue(Je.MINIMUM_VALUE,s.maximumHeights):void 0,s.granularity=l(o)?o.getValue(Je.MINIMUM_VALUE):void 0};Ef.DynamicGeometryUpdater=QV;function QV(e,t,n){xi.call(this,e,t,n)}l(Object.create)&&(QV.prototype=Object.create(xi.prototype),QV.prototype.constructor=QV);QV.prototype._isHidden=function(e,t,n){return!l(this._options.positions)||xi.prototype._isHidden.call(this,e,t,n)};QV.prototype._setOptions=function(e,t,n){let i=this._options;i.positions=j.getValueOrUndefined(t.positions,n,i.positions),i.minimumHeights=j.getValueOrUndefined(t.minimumHeights,n,i.minimumHeights),i.maximumHeights=j.getValueOrUndefined(t.maximumHeights,n,i.maximumHeights),i.granularity=j.getValueOrUndefined(t.granularity,n)};var yN=Ef;var GS=[Tv,NX,GX,jX,qX,tN,rN,mN,hN,yN];function LS(e,t){this.entity=e,this.scene=t;let n=new Array(GS.length),i=new _e,o=new vr;for(let r=0;r<n.length;r++){let s=new GS[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(LS.prototype._onEntityPropertyChanged,this)}LS.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)};LS.prototype.forEach=function(e){let t=this.updaters;for(let n=0;n<t.length;n++)e(t[n])};LS.prototype.destroy=function(){this.eventHelper.removeAll();let e=this.updaters;for(let t=0;t<e.length;t++)e[t].destroy();this._removeEntitySubscription(),me(this)};LS.registerUpdater=function(e){GS.includes(e)||GS.push(e)};LS.unregisterUpdater=function(e){if(GS.includes(e)){let t=GS.indexOf(e);GS.splice(t,1)}};var WS=LS;var wWi=x(T(),1);var WTe=new U,Mdt=new Yt,kdt=new Yt,Udt=m.ZERO,Ddt=new m;function Gf(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 It,this.updaters=new It,this.updatersWithAttributes=new It,this.attributes=new It,this.subscriptions=new It,this.showsUpdated=new It,this.itemsToRemove=[],this.invalidated=!1;let a;l(o)&&(a=o.definitionChanged.addEventListener(Gf.prototype.onMaterialChanged,this)),this.removeMaterialSubscription=a}Gf.prototype.onMaterialChanged=function(){this.invalidated=!0};Gf.prototype.isMaterial=function(e){let t=this.depthFailMaterialProperty,n=e.depthFailMaterialProperty;return n===t?!0:l(t)?t.equals(n):!1};Gf.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)}))}};Gf.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return l(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};Gf.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=yr.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 Ln({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 Bt)&&(this.depthFailMaterial=yr.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(r=0;r<a;r++){let d=s[r],u=this.geometry.get(d.id),h=this.attributes.get(u.id.id);if(l(h)||(h=i.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,h)),!d.fillMaterialProperty.isConstant||c){let _=d.fillMaterialProperty.color,S=j.getValueOrDefault(_,e,U.WHITE,WTe);U.equals(h._lastColor,S)||(h._lastColor=U.clone(S,h._lastColor),h.color=Ht.toValue(S,h.color),(this.translucent&&h.color[3]===255||!this.translucent&&h.color[3]!==255)&&(this.itemsToRemove[n++]=d))}if(l(this.depthFailAppearanceType)&&d.depthFailMaterialProperty instanceof Bt&&(!d.depthFailMaterialProperty.isConstant||c)){let _=d.depthFailMaterialProperty.color,S=j.getValueOrDefault(_,e,U.WHITE,WTe);U.equals(h._lastDepthFailColor,S)||(h._lastDepthFailColor=U.clone(S,h._lastDepthFailColor),h.depthFailColor=Ht.toValue(S,h.depthFailColor))}let p=d.entity.isShowing&&(d.hasConstantFill||d.isFilled(e)),b=h.show[0]===1;p!==b&&(h.show=Zn.toValue(p,h.show));let f=d.distanceDisplayConditionProperty;if(!j.isConstant(f)){let _=j.getValueOrDefault(f,e,kdt,Mdt);Yt.equals(_,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Yt.clone(_,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Kn.toValue(_,h.distanceDisplayCondition))}let y=d.terrainOffsetProperty;if(!j.isConstant(y)){let _=j.getValueOrDefault(y,e,Udt,Ddt);m.equals(_,h._lastOffset)||(h._lastOffset=m.clone(_,h._lastOffset),h.offset=fo.toValue(_,h.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};Gf.prototype.updateShows=function(e){let t=this.showsUpdated.values,n=t.length;for(let i=0;i<n;i++){let o=t[i],r=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=Zn.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};Gf.prototype.contains=function(e){return this.updaters.contains(e.id)};Gf.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return xt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?xt.FAILED:(i.boundingSphere.clone(t),xt.DONE)};Gf.prototype.destroy=function(){let e=this.primitive,t=this.primitives;l(e)&&t.remove(e);let n=this.oldPrimitive;l(n)&&t.remove(n),l(this.removeMaterialSubscription)&&this.removeMaterialSubscription()};function qV(e,t,n,i,o){this._solidItems=[],this._translucentItems=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=o}qV.prototype.add=function(e,t){let n,i,o=t.createFillGeometryInstance(e);o.attributes.color.value[3]===255?(n=this._solidItems,i=!1):(n=this._translucentItems,i=!0);let r=n.length;for(let a=0;a<r;a++){let c=n[a];if(c.isMaterial(t)){c.add(t,o);return}}let s=new Gf(this._primitives,i,this._appearanceType,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);s.add(t,o),n.push(s)};function vTe(e,t){let n=e.length;for(let i=n-1;i>=0;i--){let o=e[i];if(o.remove(t))return o.updaters.length===0&&(e.splice(i,1),o.destroy()),!0}return!1}qV.prototype.remove=function(e){vTe(this._solidItems,e)||vTe(this._translucentItems,e)};function FTe(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 CO(e,t,n,i){let o=t.length,r;for(r=o-1;r>=0;r--){let s=t[r];if(s.invalidated){t.splice(r,1);let a=s.updaters.values,c=a.length;for(let d=0;d<c;d++)e.add(n,a[d]);s.destroy()}}for(o=t.length,r=0;r<o;++r)i=t[r].update(n)&&i;return i}qV.prototype.update=function(e){let t=CO(this,this._solidItems,e,!0);t=CO(this,this._translucentItems,e,t)&&t;let n=FTe(this,this._solidItems,e),i=FTe(this,this._translucentItems,e);return(n||i)&&(t=CO(this,this._solidItems,e,t)&&t,t=CO(this,this._translucentItems,e,t)&&t),t};function ITe(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 xt.FAILED}qV.prototype.getBoundingSphere=function(e,t){let n=ITe(this._solidItems,e,t);return n===xt.FAILED?ITe(this._translucentItems,e,t):n};function PTe(e){let t=e.length;for(let n=0;n<t;n++)e[n].destroy();e.length=0}qV.prototype.removeAllPrimitives=function(){PTe(this._solidItems),PTe(this._translucentItems)};var th=qV;var tvi=x(T(),1);var Odt=new Yt,Bdt=new Yt,zdt=m.ZERO,Hdt=new m;function Lf(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 It,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new It,this.material=void 0,this.depthFailMaterial=void 0,this.updatersWithAttributes=new It,this.attributes=new It,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(Lf.prototype.onMaterialChanged,this),this.subscriptions=new It,this.showsUpdated=new It}Lf.prototype.onMaterialChanged=function(){this.invalidated=!0};Lf.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};Lf.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};Lf.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 Kdt=new U;Lf.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=yr.getValue(e,this.materialProperty,this.material);let a;if(l(this.depthFailMaterialProperty)){this.depthFailMaterial=yr.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 Ln({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=yr.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,l(this.depthFailAppearanceType)&&!(this.depthFailMaterialProperty instanceof Bt)&&(this.depthFailMaterial=yr.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){let c=s[r],d=c.entity,u=this.geometry.get(c.id),h=this.attributes.get(u.id.id);if(l(h)||(h=n.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,h)),l(this.depthFailAppearanceType)&&this.depthFailMaterialProperty instanceof Bt&&!c.depthFailMaterialProperty.isConstant){let _=c.depthFailMaterialProperty.color,S=j.getValueOrDefault(_,e,U.WHITE,Kdt);U.equals(h._lastDepthFailColor,S)||(h._lastDepthFailColor=U.clone(S,h._lastDepthFailColor),h.depthFailColor=Ht.toValue(S,h.depthFailColor))}let p=d.isShowing&&(c.hasConstantFill||c.isFilled(e)),b=h.show[0]===1;p!==b&&(h.show=Zn.toValue(p,h.show));let f=c.distanceDisplayConditionProperty;if(!j.isConstant(f)){let _=j.getValueOrDefault(f,e,Bdt,Odt);Yt.equals(_,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Yt.clone(_,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Kn.toValue(_,h.distanceDisplayCondition))}let y=c.terrainOffsetProperty;if(!j.isConstant(y)){let _=j.getValueOrDefault(y,e,zdt,Hdt);m.equals(_,h._lastOffset)||(h._lastOffset=m.clone(_,h._lastOffset),h.offset=fo.toValue(_,h.offset))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return t};Lf.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=Zn.toValue(c,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};Lf.prototype.contains=function(e){return this.updaters.contains(e.id)};Lf.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return xt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?xt.FAILED:(i.boundingSphere.clone(t),xt.DONE)};Lf.prototype.destroy=function(){let e=this.primitive,t=this.primitives;l(e)&&t.remove(e);let n=this.oldPrimitive;l(n)&&t.remove(n),this.removeMaterialSubscription()};function $V(e,t,n,i,o){this._items=[],this._primitives=e,this._appearanceType=t,this._depthFailAppearanceType=n,this._closed=i,this._shadows=o}$V.prototype.add=function(e,t){let n=this._items,i=n.length;for(let r=0;r<i;r++){let s=n[r];if(s.isMaterial(t)){s.add(e,t);return}}let o=new Lf(this._primitives,this._appearanceType,t.fillMaterialProperty,this._depthFailAppearanceType,t.depthFailMaterialProperty,this._closed,this._shadows);o.add(e,t),n.push(o)};$V.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0;i--){let o=t[i];if(o.remove(e)){o.updaters.length===0&&(t.splice(i,1),o.destroy());break}}};$V.prototype.update=function(e){let t,n=this._items,i=n.length;for(t=i-1;t>=0;t--){let r=n[t];if(r.invalidated){n.splice(t,1);let s=r.updaters.values,a=s.length;for(let c=0;c<a;c++)this.add(e,s[c]);r.destroy()}}let o=!0;for(t=0;t<n.length;t++)o=n[t].update(e)&&o;return o};$V.prototype.getBoundingSphere=function(e,t){let n=this._items,i=n.length;for(let o=0;o<i;o++){let r=n[o];if(r.contains(e))return r.getBoundingSphere(e,t)}return xt.FAILED};$V.prototype.removeAllPrimitives=function(){let e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};var nh=$V;var Svi=x(T(),1);var lvi=x(T(),1);var svi=x(T(),1);var ivi=x(T(),1);function VO(e,t,n=0,i=e.length-1,o=Jdt){for(;i>n;){if(i-n>600){let c=i-n+1,d=t-n+1,u=Math.log(c),h=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*h*(c-h)/c)*(d-c/2<0?-1:1),b=Math.max(n,Math.floor(t-d*h/c+p)),f=Math.min(i,Math.floor(t+(c-d)*h/c+p));VO(e,t,b,f,o)}let r=e[t],s=n,a=i;for(xN(e,n,t),o(e[i],r)>0&&xN(e,n,i);s<a;){for(xN(e,s,a),s++,a--;o(e[s],r)<0;)s++;for(;o(e[a],r)>0;)a--}o(e[n],r)===0?xN(e,n,a):(a++,xN(e,a,i)),a<=t&&(n=a+1),t<=a&&(i=a-1)}}function xN(e,t,n){let i=e[t];e[t]=e[n],e[n]=i}function Jdt(e,t){return e<t?-1:e>t?1:0}var SN=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(!EO(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;EO(t,c)&&(n.leaf?i.push(a):H7(t,c)?this._all(a,i):r.push(a))}n=r.pop()}return i}collides(t){let n=this.data;if(!EO(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(EO(t,s)){if(n.leaf||H7(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=tR([]),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=jdt(t,i.children,n);if(u!==-1)return i.children.splice(u,1),r.push(i),this._condense(r),this}!d&&!i.leaf&&H7(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=tR(t.slice(n,i+1)),eR(a,this.toBBox),a;o||(o=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/Math.pow(s,o-1))),a=tR([]),a.leaf=!1,a.height=o;let c=Math.ceil(r/s),d=c*Math.ceil(Math.sqrt(s));XTe(t,n,i,d,this.compareMinX);for(let u=n;u<=i;u+=d){let h=Math.min(u+d-1,i);XTe(t,u,h,c,this.compareMinY);for(let p=u;p<=h;p+=c){let b=Math.min(p+c-1,h);a.children.push(this._build(t,p,b,o-1))}}return eR(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=z7(d),h=$dt(t,d)-u;h<s?(s=h,r=u<r?u:r,a=d):h===s&&u<r&&(r=u,a=d)}n=a||n.children[0]}return n}_insert(t,n,i){let o=i?t:this.toBBox(t),r=[],s=this._chooseSubtree(o,this.data,n,r);for(s.children.push(t),_N(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=tR(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,eR(i,this.toBBox),eR(a,this.toBBox),n?t[n-1].children.push(a):this._splitRoot(i,a)}_splitRoot(t,n){this.data=tR([t,n]),this.data.height=t.height+1,this.data.leaf=!1,eR(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=TN(t,0,a,this.toBBox),d=TN(t,a,i,this.toBBox),u=eut(c,d),h=z7(c)+z7(d);u<r?(r=u,o=a,s=h<s?h:s):u===r&&h<s&&(s=h,o=a)}return o||i-n}_chooseSplitAxis(t,n,i){let o=t.leaf?this.compareMinX:Qdt,r=t.leaf?this.compareMinY:qdt,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=TN(t,0,n,r),a=TN(t,i-n,i,r),c=RO(s)+RO(a);for(let d=n;d<i-n;d++){let u=t.children[d];_N(s,t.leaf?r(u):u),c+=RO(s)}for(let d=i-n-1;d>=n;d--){let u=t.children[d];_N(a,t.leaf?r(u):u),c+=RO(a)}return c}_adjustParentBBoxes(t,n,i){for(let o=i;o>=0;o--)_N(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():eR(t[n],this.toBBox)}};function jdt(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 eR(e,t){TN(e,0,e.children.length,t,e)}function TN(e,t,n,i,o){o||(o=tR(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];_N(o,e.leaf?i(s):s)}return o}function _N(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 Qdt(e,t){return e.minX-t.minX}function qdt(e,t){return e.minY-t.minY}function z7(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function RO(e){return e.maxX-e.minX+(e.maxY-e.minY)}function $dt(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 eut(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 H7(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function EO(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function tR(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function XTe(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;VO(e,s,t,n,o),r.push(t,s,s,n)}}function GO(){this._tree=new SN}function vS(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.id=""}vS.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};GO.prototype.insert=function(e,t){let n=vS.fromRectangleAndId(e,t,new vS);this._tree.insert(n)};function tut(e,t){return e.id===t.id}var nut=new vS;GO.prototype.remove=function(e,t){let n=vS.fromRectangleAndId(e,t,nut);this._tree.remove(n,tut)};var iut=new vS;GO.prototype.collides=function(e){let t=vS.fromRectangleAndId("",e,iut);return this._tree.collides(t)};var FS=GO;var out=new U,rut=new Yt,sut=new Yt;function lg(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 It,this.updaters=new It,this.updatersWithAttributes=new It,this.attributes=new It,this.subscriptions=new It,this.showsUpdated=new It,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new FS}lg.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)};lg.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)}))}};lg.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};lg.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 El({show:!1,asynchronous:!0,geometryInstances:s.slice(),classificationType:this.classificationType}),o.add(i,this.zIndex),t=!1;else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(r=0;r<a;r++){let d=s[r],u=this.geometry.get(d.id),h=this.attributes.get(u.id.id);if(l(h)||(h=i.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,h)),!d.fillMaterialProperty.isConstant||c){let y=d.fillMaterialProperty.color,_=j.getValueOrDefault(y,e,U.WHITE,out);U.equals(h._lastColor,_)||(h._lastColor=U.clone(_,h._lastColor),h.color=Ht.toValue(_,h.color))}let p=d.entity.isShowing&&(d.hasConstantFill||d.isFilled(e)),b=h.show[0]===1;p!==b&&(h.show=Zn.toValue(p,h.show));let f=d.distanceDisplayConditionProperty;if(!j.isConstant(f)){let y=j.getValueOrDefault(f,e,sut,rut);Yt.equals(y,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Yt.clone(y,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Kn.toValue(y,h.distanceDisplayCondition))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};lg.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=Zn.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};lg.prototype.contains=function(e){return this.updaters.contains(e.id)};lg.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return xt.PENDING;let i=n.getBoundingSphere(e.entity);return l(i)?(i.clone(t),xt.DONE):xt.FAILED};lg.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 nR(e,t){this._batches=[],this._primitives=e,this._classificationType=t}nR.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 lg(this._primitives,this._classificationType,n.attributes.color.value,o),i.push(r)),r.add(t,n),r};nR.prototype.remove=function(e){let t=this._batches,n=t.length;for(let i=0;i<n;++i)if(t[i].remove(e))return};nR.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};nR.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 xt.FAILED};nR.prototype.removeAllPrimitives=function(){let e=this._batches,t=e.length;for(let n=0;n<t;++n)e[n].removeAllPrimitives()};var iR=nR;var Xvi=x(T(),1);var aut=new Yt,cut=new Yt;function Up(e,t,n,i,o,r){this.primitives=e,this.classificationType=t,this.appearanceType=n,this.materialProperty=i,this.updaters=new It,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new It,this.material=void 0,this.updatersWithAttributes=new It,this.attributes=new It,this.subscriptions=new It,this.showsUpdated=new It,this.usingSphericalTextureCoordinates=o,this.zIndex=r,this.rectangleCollisionCheck=new FS}Up.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)};Up.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Bt&&t instanceof Bt?!0:l(t)&&t.equals(n)};Up.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};Up.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};Up.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=yr.getValue(e,this.materialProperty,this.material);let a=this.appearanceType;n=new El({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=yr.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){let c=s[r],d=c.entity,u=this.geometry.get(c.id),h=this.attributes.get(u.id.id);l(h)||(h=n.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,h));let p=d.isShowing&&(c.hasConstantFill||c.isFilled(e)),b=h.show[0]===1;p!==b&&(h.show=Zn.toValue(p,h.show));let f=c.distanceDisplayConditionProperty;if(!j.isConstant(f)){let y=j.getValueOrDefault(f,e,cut,aut);Yt.equals(y,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Yt.clone(y,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Kn.toValue(y,h.distanceDisplayCondition))}}this.updateShows(n)}else l(n)&&!n.ready&&(t=!1);return t};Up.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=Zn.toValue(c,a.show),s.attributes.show.value[0]=a.show[0])}this.showsUpdated.removeAll()};Up.prototype.contains=function(e){return this.updaters.contains(e.id)};Up.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return xt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?xt.FAILED:(i.boundingSphere.clone(t),xt.DONE)};Up.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 oR(e,t,n){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=n}oR.prototype.add=function(e,t){let n=this._items,i=n.length,o=t.createFillGeometryInstance(e),r=cu.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 Up(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,r,s);a.add(e,t,o),n.push(a)};oR.prototype.remove=function(e){let t=this._items,n=t.length;for(let i=n-1;i>=0&&!t[i].remove(e);i--);};oR.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};oR.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 xt.FAILED};oR.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 AN=oR;var Qvi=x(T(),1);var lut=new U,dut=new Yt,uut=new Yt,mut=m.ZERO,hut=new m;function dg(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 It,this.updaters=new It,this.updatersWithAttributes=new It,this.attributes=new It,this.itemsToRemove=[],this.subscriptions=new It,this.showsUpdated=new It}dg.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)}))}};dg.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};dg.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 Ln({show:!1,asynchronous:!0,geometryInstances:s.slice(),appearance:new hn({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width}}),shadows:this.shadows}),o.add(i),t=!1;else{l(i)&&(o.remove(i),i=void 0);let c=this.oldPrimitive;l(c)&&(o.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=i,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(l(i)&&i.ready){i.show=!0,l(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0);let s=this.updatersWithAttributes.values,a=s.length,c=this.waitingOnCreate;for(r=0;r<a;r++){let d=s[r],u=this.geometry.get(d.id),h=this.attributes.get(u.id.id);if(l(h)||(h=i.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,h)),!d.outlineColorProperty.isConstant||c){let _=d.outlineColorProperty,S=j.getValueOrDefault(_,e,U.WHITE,lut);U.equals(h._lastColor,S)||(h._lastColor=U.clone(S,h._lastColor),h.color=Ht.toValue(S,h.color),(this.translucent&&h.color[3]===255||!this.translucent&&h.color[3]!==255)&&(this.itemsToRemove[n++]=d))}let p=d.entity.isShowing&&(d.hasConstantOutline||d.isOutlineVisible(e)),b=h.show[0]===1;p!==b&&(h.show=Zn.toValue(p,h.show));let f=d.distanceDisplayConditionProperty;if(!j.isConstant(f)){let _=j.getValueOrDefault(f,e,uut,dut);Yt.equals(_,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Yt.clone(_,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Kn.toValue(_,h.distanceDisplayCondition))}let y=d.terrainOffsetProperty;if(!j.isConstant(y)){let _=j.getValueOrDefault(y,e,mut,hut);m.equals(_,h._lastOffset)||(h._lastOffset=m.clone(_,h._lastOffset),h.offset=fo.toValue(_,h.offset))}}this.updateShows(i),this.waitingOnCreate=!1}else l(i)&&!i.ready&&(t=!1);return this.itemsToRemove.length=n,t};dg.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=Zn.toValue(a,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()};dg.prototype.contains=function(e){return this.updaters.contains(e.id)};dg.prototype.getBoundingSphere=function(e,t){let n=this.primitive;if(!n.ready)return xt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?xt.FAILED:(i.boundingSphere.clone(t),xt.DONE)};dg.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 rR(e,t,n){this._primitives=e,this._scene=t,this._shadows=n,this._solidBatches=new It,this._translucentBatches=new It}rR.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 dg(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 dg(this._primitives,!0,i,this._shadows),o.set(i,r)),r.add(t,n))};rR.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};rR.prototype.update=function(e){let t,n,i,o,r=this._solidBatches.values,s=r.length,a=this._translucentBatches.values,c=a.length,d,u=!0,h=!1;do{for(h=!1,n=0;n<s;n++){o=r[n],u=o.update(e),d=o.itemsToRemove;let p=d.length;if(p>0)for(h=!0,t=0;t<p;t++)i=d[t],o.remove(i),this.add(e,i)}for(n=0;n<c;n++){o=a[n],u=o.update(e),d=o.itemsToRemove;let p=d.length;if(p>0)for(h=!0,t=0;t<p;t++)i=d[t],o.remove(i),this.add(e,i)}}while(h);return u};rR.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 xt.FAILED};rR.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 sR=rR;var fut=[];function wd(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 It,this._removedObjects=new It,this._changedObjects=new It;let o=Cn.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=Oo.supportsMaterialsforEntitiesOnTerrain(e);this._supportsMaterialsforEntitiesOnTerrain=r;let s;for(s=0;s<o;++s)this._outlineBatches[s]=new sR(n,e,s,!1),this._outlineBatches[o+s]=new sR(n,e,s,!0),this._closedColorBatches[s]=new th(n,hn,void 0,!0,s,!0),this._closedColorBatches[o+s]=new th(n,hn,void 0,!0,s,!1),this._closedMaterialBatches[s]=new nh(n,po,void 0,!0,s,!0),this._closedMaterialBatches[o+s]=new nh(n,po,void 0,!0,s,!1),this._openColorBatches[s]=new th(n,hn,void 0,!1,s,!0),this._openColorBatches[o+s]=new th(n,hn,void 0,!1,s,!1),this._openMaterialBatches[s]=new nh(n,po,void 0,!1,s,!0),this._openMaterialBatches[o+s]=new nh(n,po,void 0,!1,s,!1);let a=Jn.NUMBER_OF_CLASSIFICATION_TYPES,c=new Array(a),d=[];if(r)for(s=0;s<a;++s)d.push(new AN(i,s,po)),c[s]=new iR(i,s);else for(s=0;s<a;++s)c[s]=new iR(i,s);this._groundColorBatches=c,this._groundMaterialBatches=d,this._dynamicBatch=new TS(n,i),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new It,this._updaterSets=new It,this._entityCollection=t,t.collectionChanged.addEventListener(wd.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,fut)}wd.registerUpdater=function(e){WS.registerUpdater(e)};wd.unregisterUpdater=function(e){WS.unregisterUpdater(e)};wd.prototype.update=function(e){let t=this._addedObjects,n=t.values,i=this._removedObjects,o=i.values,r=this._changedObjects,s=r.values,a,c,d,u,h=this;for(a=s.length-1;a>-1;a--)c=s[a],d=c.id,u=this._updaterSets.get(d),u.entity===c?u.forEach(function(y){h._removeUpdater(y),h._insertUpdaterIntoBatch(e,y)}):(o.push(c),n.push(c));for(a=o.length-1;a>-1;a--)c=o[a],d=c.id,u=this._updaterSets.get(d),u.forEach(this._removeUpdater.bind(this)),u.destroy(),this._updaterSets.remove(d),this._subscriptions.get(d)(),this._subscriptions.remove(d);for(a=n.length-1;a>-1;a--)c=n[a],d=c.id,u=new WS(c,this._scene),this._updaterSets.set(d,u),u.forEach(function(y){h._insertUpdaterIntoBatch(e,y)}),this._subscriptions.set(d,u.geometryChanged.addEventListener(wd._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 put=[],but=new de;wd.prototype.getBoundingSphere=function(e,t){let n=put,i=but,o=0,r=xt.DONE,s=this._batches,a=s.length,c=e.id,d=this._updaterSets.get(c).updaters;for(let u=0;u<d.length;u++){let h=d[u];for(let p=0;p<a;p++){if(r=s[p].getBoundingSphere(h,i),r===xt.PENDING)return xt.PENDING;r===xt.DONE&&(n[o]=de.clone(i,n[o]),o++)}}return o===0?xt.FAILED:(n.length=o,de.fromBoundingSpheres(n,t),xt.DONE)};wd.prototype.isDestroyed=function(){return!1};wd.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(wd.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(),me(this)};wd.prototype._removeUpdater=function(e){let t=this._batches,n=t.length;for(let i=0;i<n;i++)t[i].remove(e)};wd.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=Cn.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 Bt?this._groundColorBatches[o].add(e,t):this._groundMaterialBatches[o].add(e,t)}else t.isClosed?t.fillMaterialProperty instanceof Bt?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 Bt?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)};wd._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)};wd.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 ZN=wd;var FFi=x(T(),1);var gut=1,yut="30px sans-serif",xut=ar.FILL,Tut=U.WHITE,_ut=U.BLACK,Sut=1,Aut=!1,Zut=new U(.165,.165,.165,.8),Cut=new M(7,5),Vut=M.ZERO,Rut=m.ZERO,Eut=tt.NONE,Gut=Ii.CENTER,Lut=Dn.CENTER,Wut=new m,vut=new U,Fut=new U,Iut=new U,Put=new M,Xut=new m,Nut=new M,Yut=new wt,wut=new wt,Mut=new wt,kut=new Yt;function NTe(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 It,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),h;if(u&&(h=j.getValueOrUndefined(s._position,e,Wut),c=j.getValueOrUndefined(a._text,e),u=l(h)&&l(c)),!u){K7(r,s,n);continue}j.isConstant(s._position)||(n._clusterDirty=!0);let p=!1,b=j.getValueOrDefault(a._heightReference,e,Eut);l(d)||(d=n.getLabel(s),d.id=s,r.label=d,p=m.equals(d.position,h)&&d.heightReference===b),d.show=!0,d.position=h,d.text=c,d.scale=j.getValueOrDefault(a._scale,e,gut),d.font=j.getValueOrDefault(a._font,e,yut),d.style=j.getValueOrDefault(a._style,e,xut),d.fillColor=j.getValueOrDefault(a._fillColor,e,Tut,vut),d.outlineColor=j.getValueOrDefault(a._outlineColor,e,_ut,Fut),d.outlineWidth=j.getValueOrDefault(a._outlineWidth,e,Sut),d.showBackground=j.getValueOrDefault(a._showBackground,e,Aut),d.backgroundColor=j.getValueOrDefault(a._backgroundColor,e,Zut,Iut),d.backgroundPadding=j.getValueOrDefault(a._backgroundPadding,e,Cut,Put),d.pixelOffset=j.getValueOrDefault(a._pixelOffset,e,Vut,Nut),d.eyeOffset=j.getValueOrDefault(a._eyeOffset,e,Rut,Xut),d.heightReference=b,d.horizontalOrigin=j.getValueOrDefault(a._horizontalOrigin,e,Gut),d.verticalOrigin=j.getValueOrDefault(a._verticalOrigin,e,Lut),d.translucencyByDistance=j.getValueOrUndefined(a._translucencyByDistance,e,Yut),d.pixelOffsetScaleByDistance=j.getValueOrUndefined(a._pixelOffsetScaleByDistance,e,wut),d.scaleByDistance=j.getValueOrUndefined(a._scaleByDistance,e,Mut),d.distanceDisplayCondition=j.getValueOrUndefined(a._distanceDisplayCondition,e,kut),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 xt.FAILED;let i=n.label;return t.center=m.clone(i._clampedPosition??i.position,t.center),t.radius=0,xt.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 me(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 NTe(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 NTe(r)):(K7(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],K7(s.get(r.id),r,a),s.remove(r.id)};function K7(e,t,n){l(e)&&(e.label=void 0,n.removeLabel(t))}var CN=fx;var $Fi=x(T(),1);var Uut=1,Dut=!0,Out=0,But=!0,zut=!0,Hut=Cn.ENABLED,Kut=tt.NONE,Jut=U.RED,jut=0,Qut=U.WHITE,qut=qc.HIGHLIGHT,$ut=.5,emt=new M(1,1),YTe={maximumPositionEpsilon:Number.POSITIVE_INFINITY},tmt=new F,nmt=new F,wTe=new U,MTe=new Array(4),imt=new m;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 It,this._onCollectionChanged(t,t.values,[],[])}async function omt(e,t,n,i,o){let r=e._primitives,s=e._modelHash;try{let a=await yu.fromGltfAsync({url:n,incrementallyLoadTextures:i,scene:e._scene,environmentMapOptions:o});if(e.isDestroyed()||!l(s[t.id]))return;a.id=t,r.add(a),s[t.id].modelPrimitive=a,a.errorEvent.addEventListener(c=>{l(s[t.id])&&(console.log(c),c.name!=="TextureError"&&a.incrementallyLoadTextures&&(s[t.id].loadFailed=!0))})}catch(a){if(e.isDestroyed()||!l(s[t.id]))return;console.log(a),s[t.id].loadFailed=!0}}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),h;if(u&&(h=s.computeModelMatrix(e,tmt),c=We.createIfNeeded(j.getValueOrUndefined(a._uri,e)),u=l(h)&&l(c)),!u){l(d)&&d.modelPrimitive&&(d.modelPrimitive.show=!1);continue}if(!l(d)||c.url!==d.url){l(d?.modelPrimitive)&&(i.removeAndDestroy(d.modelPrimitive),delete n[s.id]),d={modelPrimitive:void 0,url:c.url,animationsRunning:!1,nodeTransformationsScratch:{},articulationsScratch:{},loadFailed:!1,modelUpdated:!1,environmentMapOptionsScratch:{...YTe}},n[s.id]=d;let f=j.getValueOrDefault(a._incrementallyLoadTextures,e,But),y=j.getValueOrDefault(a._environmentMapOptions,e,YTe,d.environmentMapOptionsScratch);omt(this,s,c,f,y)}let p=d.modelPrimitive;if(!l(p))continue;p.show=!0,p.scale=j.getValueOrDefault(a._scale,e,Uut),p.enableVerticalExaggeration=j.getValueOrDefault(a._enableVerticalExaggeration,e,Dut),p.minimumPixelSize=j.getValueOrDefault(a._minimumPixelSize,e,Out),p.maximumScale=j.getValueOrUndefined(a._maximumScale,e),p.modelMatrix=F.clone(h,p.modelMatrix),p.shadows=j.getValueOrDefault(a._shadows,e,Hut),p.heightReference=j.getValueOrDefault(a._heightReference,e,Kut),p.distanceDisplayCondition=j.getValueOrUndefined(a._distanceDisplayCondition,e),p.silhouetteColor=j.getValueOrDefault(a._silhouetteColor,e,Jut,wTe),p.silhouetteSize=j.getValueOrDefault(a._silhouetteSize,e,jut),p.color=j.getValueOrDefault(a._color,e,Qut,wTe),p.colorBlendMode=j.getValueOrDefault(a._colorBlendMode,e,qut),p.colorBlendAmount=j.getValueOrDefault(a._colorBlendAmount,e,$ut),p.clippingPlanes=j.getValueOrUndefined(a._clippingPlanes,e),p.clampAnimations=j.getValueOrDefault(a._clampAnimations,e,zut),p.imageBasedLighting.imageBasedLightingFactor=j.getValueOrDefault(a._imageBasedLightingFactor,e,emt);let b=j.getValueOrUndefined(a._lightColor,e);if(l(b)&&(U.pack(b,MTe,0),b=m.unpack(MTe,0,imt)),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:Gd.REPEAT}):p.activeAnimations.removeAll(),d.animationsRunning=f);let y=j.getValueOrUndefined(a._nodeTransformations,e,d.nodeTransformationsScratch);if(l(y)){let A=Object.keys(y);for(let Z=0,V=A.length;Z<V;++Z){let E=A[Z],L=y[E];if(!l(L))continue;let v=p.getNode(E);if(!l(v))continue;let I=F.fromTranslationRotationScale(L,nmt);v.matrix=F.multiply(v.originalMatrix,I,I)}}let _=!1,S=j.getValueOrUndefined(a._articulations,e,d.articulationsScratch);if(l(S)){let A=Object.keys(S);for(let Z=0,V=A.length;Z<V;++Z){let E=A[Z],L=S[E];l(L)&&(_=!0,p.setArticulationStage(E,L))}}_&&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--)J7(this,e[i],t,n);return me(this)};var LO=new m,rmt=new pe;px.prototype.getBoundingSphere=function(e,t){let n=this._modelHash[e.id];if(!l(n))return xt.FAILED;if(n.loadFailed)return xt.FAILED;let i=n.modelPrimitive;if(!l(i)||!i.show)return xt.PENDING;if(!i.ready||!n.modelUpdated)return xt.PENDING;let o=this._scene,r=o.ellipsoid??ie.default;if(i.heightReference!==tt.NONE){let a=i.modelMatrix;LO.x=a[12],LO.y=a[13],LO.z=a[14];let c=r.cartesianToCartographic(LO,rmt),d=o.getHeight(c,i.heightReference);return l(d)&&(pm(i.heightReference)?c.height=d:c.height+=d),de.clone(i.boundingSphere,t),t.center=r.cartographicToCartesian(c),xt.DONE}return de.clone(i.boundingSphere,t),xt.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)?(smt(r,a),s.set(r.id,r)):(J7(this,r,a,c),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],J7(this,r,a,c),s.remove(r.id)};function J7(e,t,n,i){let o=n[t.id];l(o)&&(i.removeAndDestroy(o.modelPrimitive),delete n[t.id])}function smt(e,t){let n=t[e.id];l(n)&&(n.nodeTransformationsScratch={},n.articulationsScratch={})}var VN=px;var F2i=x(T(),1);var a2i=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 amt=new Q;bx.prototype.getValue=function(e,t){return l(e)||(e=Q.now(amt)),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 Dp=bx;var kTe=new q,UTe=new q,DTe=new q,cmt=new m,OTe=new m,lmt=new m,dmt=new m,WO=new Pe,vO=new F,FO=new q;function RN(e,t,n,i,o){if(!(!l(t)||!l(n))){if(m.subtract(t,n,o),l(i.orientation))i.orientation.getValue(e,WO)&&(Pe.conjugate(WO,WO),q.fromQuaternion(WO,FO),q.multiplyByVector(FO,o,o));else if(l(q7(e,i.position,vO)))F.inverse(vO,vO),F.getRotation(vO,FO),q.multiplyByVector(FO,o,o);else return;return o}}function q7(e,t,n){let i=t.getValue(e,cmt);if(l(i)){let o=Q.addSeconds(e,.01,new Q),r=t.getValue(o,OTe);if(l(r)&&!m.equalsEpsilon(i,r,W.EPSILON16)){let s=dt.computeFixedToIcrfMatrix(e,kTe),a=dt.computeFixedToIcrfMatrix(o,UTe),c;!l(s)||!l(a)?(c=dt.computeTemeToPseudoFixedMatrix(e,DTe),s=q.transpose(c,kTe),a=dt.computeTemeToPseudoFixedMatrix(o,UTe),q.transpose(a,a)):c=q.transpose(s,DTe);let d=lmt;m.normalize(i,d),m.normalize(r,r),q.multiplyByVector(s,d,d),q.multiplyByVector(a,r,r);let u=m.cross(d,r,dmt);if(!m.equalsEpsilon(u,m.ZERO,W.EPSILON16)){let h=m.cross(u,d,OTe);return q.multiplyByVector(c,h,h),q.multiplyByVector(c,u,u),q.multiplyByVector(c,d,d),m.normalize(h,h),m.normalize(u,u),m.normalize(d,d),l(n)||(n=new F),n[0]=h.x,n[1]=h.y,n[2]=h.z,n[3]=0,n[4]=u.x,n[5]=u.y,n[6]=u.z,n[7]=0,n[8]=d.x,n[9]=d.y,n[10]=d.z,n[11]=0,n[12]=i.x,n[13]=i.y,n[14]=i.z,n[15]=1,n}}}}var umt=60,mmt=1,JTe=new En,j7=new En,Q7=new En;function BTe(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}var IO=new m;function hmt(e,t,n,i,o,r,s,a,c){let d,u,h=!1;r instanceof Oo&&(d=r,u=d.position,r=Xi.FIXED,h=!0);let p=a,b,f;b=e.getValueInReferenceFrame(t,r,c[p]),h?(f=u.getValueInReferenceFrame(t,r,IO),b=RN(t,b,f,d,b),l(b)&&(c[p++]=b)):l(b)&&(c[p++]=b);let y=!l(o)||Q.lessThanOrEquals(o,t)||Q.greaterThanOrEquals(o,n),_=0,S=i.length,A=i[_],Z=n,V=!1,E,L,v;for(;_<S;){if(!y&&Q.greaterThanOrEquals(A,o)&&(b=e.getValueInReferenceFrame(o,r,c[p]),h?(f=u.getValueInReferenceFrame(o,r,IO),l(b)&&l(f)&&(b=RN(o,b,f,d,b),l(b)&&(c[p++]=b))):l(b)&&(c[p++]=b),y=!0),Q.greaterThan(A,t)&&Q.lessThan(A,Z)&&!A.equals(o)&&(b=e.getValueInReferenceFrame(A,r,c[p]),h?(f=u.getValueInReferenceFrame(A,r,IO),l(b)&&l(f)&&(b=RN(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),L=0,v=X/Math.max(E,2),E=Math.max(E-1,1))}if(V&&L<E){A=Q.addSeconds(A,v,new Q),L++;continue}}V=!1,_++,A=i[_]}return b=e.getValueInReferenceFrame(n,r,c[p]),h?(f=u.getValueInReferenceFrame(n,r,IO),l(b)&&l(f)&&(b=RN(n,b,f,d,b),l(b)&&(c[p++]=b))):l(b)&&(c[p++]=b),p}function fmt(e,t,n,i,o,r,s,a){let c,d=0,u=s,h=t,p=!l(i)||Q.lessThanOrEquals(i,t)||Q.greaterThanOrEquals(i,n);for(;Q.lessThan(h,n);)!p&&Q.greaterThanOrEquals(h,i)&&(p=!0,c=e.getValueInReferenceFrame(i,o,a[u]),l(c)&&(a[u]=c,u++)),c=e.getValueInReferenceFrame(h,o,a[u]),l(c)&&(a[u]=c,u++),d++,h=Q.addSeconds(t,r*d,new Q);return c=e.getValueInReferenceFrame(n,o,a[u]),l(c)&&(a[u]=c,u++),u}function pmt(e,t,n,i,o,r,s,a){let c,d=0,u=s,h=t,p=Math.max(r,60),b=!l(i)||Q.lessThanOrEquals(i,t)||Q.greaterThanOrEquals(i,n);for(;Q.lessThan(h,n);)!b&&Q.greaterThanOrEquals(h,i)&&(b=!0,c=e.getValueInReferenceFrame(i,o,a[u]),l(c)&&(a[u]=c,u++)),c=e.getValueInReferenceFrame(h,o,a[u]),l(c)&&(a[u]=c,u++),d++,h=Q.addSeconds(t,p*d,new Q);return c=e.getValueInReferenceFrame(n,o,a[u]),l(c)&&(a[u]=c,u++),u}function bmt(e,t,n,i,o,r,s,a){Q7.start=t,Q7.stop=n;let c=s,d=e.intervals;for(let u=0;u<d.length;u++){let h=d.get(u);if(!En.intersect(h,Q7,JTe).isEmpty){let p=h.start;h.isStartIncluded||(h.isStopIncluded?p=h.stop:p=Q.addSeconds(h.start,Q.secondsDifference(h.stop,h.start)/2,new Q));let b=e.getValueInReferenceFrame(p,o,a[c]);l(b)&&(a[c]=b,c++)}}return c}function gmt(e,t,n,i,o,r,s,a){let c=e.getValueInReferenceFrame(t,o,a[s]);return l(c)&&(a[s++]=c),s}function ymt(e,t,n,i,o,r,s,a){j7.start=t,j7.stop=n;let c=s,d=e.intervals;for(let u=0;u<d.length;u++){let h=d.get(u);if(!En.intersect(h,j7,JTe).isEmpty){let p=h.start,b=h.stop,f=t;Q.greaterThan(p,f)&&(f=p);let y=n;Q.lessThan(b,y)&&(y=b),c=jTe(h.data,f,y,i,o,r,c,a)}}return c}function jTe(e,t,n,i,o,r,s,a){for(;e instanceof ng;)e=e.resolvedProperty;if(e instanceof sc){let c=e._property._times;s=hmt(e,t,n,c,i,o,r,s,a)}else e instanceof _v?s=fmt(e,t,n,i,o,r,s,a):e instanceof oc?s=ymt(e,t,n,i,o,r,s,a):e instanceof ig?s=bmt(e,t,n,i,o,r,s,a):e instanceof Wl||e instanceof Dp&&j.isConstant(e)?s=gmt(e,t,n,i,o,r,s,a):s=pmt(e,t,n,i,o,r,s,a);return s}function QTe(e,t,n,i,o,r,s){l(s)||(s=[]);let a=jTe(e,t,n,i,o,r,0,s);return s.length=a,s}var zTe=new q,HTe=new Pe,KTe=new q;function EN(e,t){this._unusedIndexes=[],this._polylineCollection=new lf,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}EN.prototype.update=function(e){let t=this._referenceFrame;if(t===Xi.INERTIAL){let n=dt.computeIcrfToFixedMatrix(e,zTe);l(n)||(n=dt.computeTemeToPseudoFixedMatrix(e,zTe)),F.fromRotationTranslation(n,m.ZERO,this._polylineCollection.modelMatrix)}else if(t instanceof Oo){let n=t.position.getValue(e);l(t.orientation)?l(t.orientation.getValue(e,HTe))&&(q.fromQuaternion(HTe,KTe),F.fromRotationTranslation(KTe,n,this._polylineCollection.modelMatrix)):q7(e,t.position,this._polylineCollection.modelMatrix)}};EN.prototype.updateObject=function(e,t){let n=t.entity,i=n._path,o=n._position,r,s,a=i._show,c=t.polyline,d=n.isShowing&&n.isAvailable(e)&&(!l(a)||a.getValue(e));if(d){let p=j.getValueOrUndefined(i._leadTime,e),b=j.getValueOrUndefined(i._trailTime,e),f=n._availability,y=l(f),_=l(p),S=l(b);if(d=y||_&&S,d){if(S&&(r=Q.addSeconds(e,-b,new Q)),_&&(s=Q.addSeconds(e,p,new Q)),y){let A=f.start,Z=f.stop;(!S||Q.greaterThan(A,r))&&(r=A),(!_||Q.lessThan(Z,s))&&(s=Z)}d=Q.lessThan(r,s)}}if(!d){l(c)&&(this._unusedIndexes.push(t.index),t.polyline=void 0,c.show=!1,t.index=void 0);return}if(!l(c)){let p=this._unusedIndexes;if(p.length>0){let f=p.pop();c=this._polylineCollection.get(f),t.index=f}else t.index=this._polylineCollection.length,c=this._polylineCollection.add();c.id=n,t.polyline=c}let u=j.getValueOrDefault(i._resolution,e,umt),h=QTe(o,r,s,e,this._referenceFrame,u,c.positions.slice());if(h.length<2){c.show=!1;return}c.show=!0,c.positions=h,c.material=yr.getValue(e,i._material,c.material),c.width=j.getValueOrDefault(i._width,e,mmt),c.distanceDisplayCondition=j.getValueOrUndefined(i._distanceDisplayCondition,e,c.distanceDisplayCondition)};EN.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)};EN.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),me(this)};function Op(e,t){t.collectionChanged.addEventListener(Op.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new It,this._onCollectionChanged(t,t.values,[],[])}Op.prototype.update=function(e){let t=this._updaters;for(let i in t)t.hasOwnProperty(i)&&t[i].update(e);let n=this._items.values;if(n.length===0&&l(this._updaters)&&Object.keys(this._updaters).length>0){for(let i in t)t.hasOwnProperty(i)&&t[i].destroy();this._updaters={}}for(let i=0,o=n.length;i<o;i++){let r=n[i],s=r.entity,a=s._position,c=s._path,d=r.updater,u=!1,h=Xi.FIXED,p=h.toString();if(this._scene.mode===re.SCENE3D){let f=j.getValueOrUndefined(c.relativeTo,e);l(f)?f==="FIXED"?(h=Xi.FIXED,p=h.toString()):f==="INERTIAL"?(h=Xi.INERTIAL,p=h.toString()):(u=!0,h=this._entityCollection.getById(f),p=f):(h=a.referenceFrame,p=h.toString())}let b=this._updaters[p];if(d===b&&l(b)){b.updateObject(e,r);continue}l(d)&&d.removeObject(r),!(u&&!l(h))&&(l(b)||(b=new EN(this._scene,h),b.update(e),this._updaters[p]=b),r.updater=b,l(b)&&b.updateObject(e,r))}return!0};Op.prototype.isDestroyed=function(){return!1};Op.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Op.prototype._onCollectionChanged,this);let e=this._updaters;for(let t in e)e.hasOwnProperty(t)&&e[t].destroy();return me(this)};Op.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 BTe(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 BTe(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))};Op._subSample=QTe;Op._computeVvlhTransform=q7;Op._transformToEntityFrame=RN;var GN=Op;var H2i=x(T(),1);var qTe=U.WHITE,$Te=U.BLACK,e_e=0,t_e=1,n_e=0,i_e=Er.NONE,o_e=new U,xmt=new m,r_e=new U,s_e=new wt,a_e=new wt,c_e=new Yt;function l_e(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 It,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,tt.NONE),h=s.isShowing&&s.isAvailable(e)&&j.getValueOrDefault(a._show,e,!0),p;if(h&&(p=j.getValueOrUndefined(s._position,e,xmt),h=l(p)),!h){LN(r,s,n);continue}j.isConstant(s._position)||(n._clusterDirty=!0);let b=!1,f=!1;if(u!==tt.NONE&&!l(d)?(l(c)&&(LN(r,s,n),c=void 0),d=n.getBillboard(s),d.id=s,d.image=void 0,r.billboard=d,b=!0,f=m.equals(d.position,p)&&d.heightReference===u):u===tt.NONE&&!l(c)&&(l(d)&&(LN(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,s_e),c.translucencyByDistance=j.getValueOrUndefined(a._translucencyByDistance,e,a_e),c.color=j.getValueOrDefault(a._color,e,qTe,o_e),c.outlineColor=j.getValueOrDefault(a._outlineColor,e,$Te,r_e),c.outlineWidth=j.getValueOrDefault(a._outlineWidth,e,e_e),c.pixelSize=j.getValueOrDefault(a._pixelSize,e,t_e),c.distanceDisplayCondition=j.getValueOrUndefined(a._distanceDisplayCondition,e,c_e),c.disableDepthTestDistance=j.getValueOrDefault(a._disableDepthTestDistance,e,n_e),c.splitDirection=j.getValueOrDefault(a._splitDirection,e,i_e);else if(l(d)){d.show=!0,d.position=p,d.scaleByDistance=j.getValueOrUndefined(a._scaleByDistance,e,s_e),d.translucencyByDistance=j.getValueOrUndefined(a._translucencyByDistance,e,a_e),d.distanceDisplayCondition=j.getValueOrUndefined(a._distanceDisplayCondition,e,c_e),d.disableDepthTestDistance=j.getValueOrDefault(a._disableDepthTestDistance,e,n_e),d.splitDirection=j.getValueOrDefault(a._splitDirection,e,i_e),d.heightReference=u;let y=j.getValueOrDefault(a._color,e,qTe,o_e),_=j.getValueOrDefault(a._outlineColor,e,$Te,r_e),S=Math.round(j.getValueOrDefault(a._outlineWidth,e,e_e)),A=Math.max(1,Math.round(j.getValueOrDefault(a._pixelSize,e,t_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 Z=y.alpha,V=y.toCssColorString(),E=_.toCssColorString(),L=JSON.stringify([V,A,E,S]);d.setImage(L,P_(Z,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 xt.FAILED;if(l(n.pointPrimitive))t.center=m.clone(n.pointPrimitive.position,t.center);else{let i=n.billboard;if(!l(i._clampedPosition))return xt.PENDING;t.center=m.clone(i._clampedPosition,t.center)}return t.radius=0,xt.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 me(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 l_e(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 l_e(r)):(LN(s.get(r.id),r,a),s.remove(r.id));for(o=n.length-1;o>-1;o--)r=n[o],LN(s.get(r.id),r,a),s.remove(r.id)};function LN(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 WN=gx;var SPi=x(T(),1);var DIi=x(T(),1);var hIi=x(T(),1);var f_e=[];function Tmt(e,t,n,i,o){let r=f_e;r.length=o;let s,a=n.red,c=n.green,d=n.blue,u=n.alpha,h=i.red,p=i.green,b=i.blue,f=i.alpha;if(U.equals(n,i)){for(s=0;s<o;s++)r[s]=U.clone(n);return r}let y=(h-a)/o,_=(p-c)/o,S=(b-d)/o,A=(f-u)/o;for(s=0;s<o;s++)r[s]=new U(a+s*y,c+s*_,d+s*S,u+s*A);return r}function vN(e){e=e??B.EMPTY_OBJECT;let t=e.positions,n=e.colors,i=e.width??1,o=e.colorsPerVertex??!1;this._positions=t,this._colors=n,this._width=i,this._colorsPerVertex=o,this._vertexFormat=Xe.clone(e.vertexFormat??Xe.DEFAULT),this._arcType=e.arcType??on.GEODESIC,this._granularity=e.granularity??W.RADIANS_PER_DEGREE,this._ellipsoid=ie.clone(e.ellipsoid??ie.default),this._workerName="createPolylineGeometry";let r=1+t.length*m.packedLength;r+=l(n)?1+n.length*U.packedLength:1,this.packedLength=r+ie.packedLength+Xe.packedLength+4}vN.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=m.packedLength)m.pack(o[i],t,n);let s=e._colors;for(r=l(s)?s.length:0,t[n++]=r,i=0;i<r;++i,n+=U.packedLength)U.pack(s[i],t,n);return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n++]=e._width,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};var p_e=ie.clone(ie.UNIT_SPHERE),b_e=new Xe,IS={positions:void 0,colors:void 0,ellipsoid:p_e,vertexFormat:b_e,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};vN.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=m.packedLength)r[i]=m.unpack(e,t);o=e[t++];let s=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=U.packedLength)s[i]=U.unpack(e,t);let a=ie.unpack(e,t,p_e);t+=ie.packedLength;let c=Xe.unpack(e,t,b_e);t+=Xe.packedLength;let d=e[t++],u=e[t++]===1,h=e[t++],p=e[t];return l(n)?(n._positions=r,n._colors=s,n._ellipsoid=ie.clone(a,n._ellipsoid),n._vertexFormat=Xe.clone(c,n._vertexFormat),n._width=d,n._colorsPerVertex=u,n._arcType=h,n._granularity=p,n):(IS.positions=r,IS.colors=s,IS.width=d,IS.colorsPerVertex=u,IS.arcType=h,IS.granularity=p,new vN(IS))};var d_e=new m,u_e=new m,m_e=new m,h_e=new m;vN.createGeometry=function(e){let t=e._width,n=e._vertexFormat,i=e._colors,o=e._colorsPerVertex,r=e._arcType,s=e._granularity,a=e._ellipsoid,c,d,u,h=[],p=Yo(e._positions,m.equalsEpsilon,!1,h);if(l(i)&&h.length>0){let P=0,Y=h[0];i=i.filter(function(O,k){let D=!1;return o?D=k===Y||k===0&&Y===1:D=k+1===Y,D?(P++,Y=h[P],!1):!0})}let b=p.length;if(b<2||t<=0)return;if(r===on.GEODESIC||r===on.RHUMB){let P,Y;r===on.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 k=1;for(c=0;c<b-1;++c)k+=Y(p[c],p[c+1],P);let D=new Array(k),w=0;for(c=0;c<b-1;++c){let z=p[c],J=p[c+1],ee=i[c],H=Y(z,J,P);if(o&&c<k){let te=i[c+1],$=Tmt(z,J,ee,te,H),be=$.length;for(d=0;d<be;++d)D[w++]=$[d]}else for(d=0;d<H;++d)D[w++]=U.clone(ee)}D[w]=U.clone(i[i.length-1]),i=D,f_e.length=0}r===on.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),Z=n.st?new Float32Array(f*2):void 0,V=l(i)?new Uint8Array(f*4):void 0,E=0,L=0,v=0,I=0,X;for(d=0;d<b;++d){d===0?(X=d_e,m.subtract(p[0],p[1],X),m.add(p[0],X,X)):X=p[d-1],m.clone(X,m_e),m.clone(p[d],u_e),d===b-1?(X=d_e,m.subtract(p[b-1],p[b-2],X),m.add(p[b-1],X,X)):X=p[d+1],m.clone(X,h_e);let P,Y;l(V)&&(d!==0&&!o?P=i[d-1]:P=i[d],d!==b-1&&(Y=i[d]));let O=d===0?2:0,k=d===b-1?2:4;for(u=O;u<k;++u){m.pack(u_e,y,E),m.pack(m_e,_,E),m.pack(h_e,S,E),E+=3;let D=u-2<0?-1:1;if(A[L++]=2*(u%2)-1,A[L++]=D*t,n.st&&(Z[v++]=d/(b-1),Z[v++]=Math.max(A[L-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 bn;N.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:y}),N.prevPosition=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:_}),N.nextPosition=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:S}),N.expandAndWidth=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:A}),n.st&&(N.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:Z})),l(V)&&(N.color=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,values:V,normalize:!0}));let g=Me.createTypedArray(f,b*6-6),C=0,R=0,G=b-1;for(d=0;d<G;++d)g[R++]=C,g[R++]=C+2,g[R++]=C+1,g[R++]=C+1,g[R++]=C+2,g[R++]=C+3,C+=4;return new ft({attributes:N,indices:g,primitiveType:ve.TRIANGLES,boundingSphere:de.fromPoints(p),geometryType:cm.POLYLINES})};var ug=vN;var _mt=new ci(0),PO={},g_e=new U,Smt=new Bt(U.WHITE),Amt=new ci(!0),Zmt=new ci(Cn.DISABLED),Cmt=new ci(new Yt),Vmt=new ci(Jn.BOTH);function Rmt(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function Emt(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function Wf(e,t){this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(Wf.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 Rmt,this._groundGeometryOptions=new Emt,this._id=`polyline-${e.id}`,this._clampToGround=!1,this._supportsPolylinesOnTerrain=Oo.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(Wf.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}}});Wf.prototype.isOutlineVisible=function(e){return!1};Wf.prototype.isFilled=function(e){let t=this._entity;return(this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e))??!1};Wf.prototype.createFillGeometryInstance=function(e){let t=this._entity,n=t.isAvailable(e),i=new Zn(n&&t.isShowing&&this._showProperty.getValue(e)),o=this._distanceDisplayConditionProperty.getValue(e),r=Kn.fromDistanceDisplayCondition(o),s={show:i,distanceDisplayCondition:r},a;return this._materialProperty instanceof Bt&&(l(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(a=this._materialProperty.color.getValue(e,g_e)),l(a)||(a=U.WHITE),s.color=Ht.fromColor(a)),this.clampToGround?new Wt({id:t,geometry:new PT(this._groundGeometryOptions),attributes:s}):(l(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof Bt&&(l(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||n)&&(a=this._depthFailMaterialProperty.color.getValue(e,g_e)),l(a)||(a=U.WHITE),s.depthFailColor=Ht.fromColor(a)),new Wt({id:t,geometry:new ug(this._geometryOptions),attributes:s}))};Wf.prototype.createOutlineGeometryInstance=function(e){};Wf.prototype.isDestroyed=function(){return!1};Wf.prototype.destroy=function(){this._entitySubscription(),me(this)};Wf.prototype._onEntityPropertyChanged=function(e,t,n,i){if(!(t==="availability"||t==="polyline"))return;let o=this._entity.polyline;if(!l(o)){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let r=o.positions,s=o.show;if(l(s)&&s.isConstant&&!s.getValue(Je.MINIMUM_VALUE)||!l(r)){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let a=o.zIndex,c=o.material??Smt,d=c instanceof Bt;this._materialProperty=c,this._depthFailMaterialProperty=o.depthFailMaterial,this._showProperty=s??Amt,this._shadowsProperty=o.shadows??Zmt,this._distanceDisplayConditionProperty=o.distanceDisplayCondition??Cmt,this._classificationTypeProperty=o.classificationType??Vmt,this._fillEnabled=!0,this._zIndex=a??_mt;let u=o.width,h=o.arcType,p=o.clampToGround,b=o.granularity;if(!r.isConstant||!j.isConstant(u)||!j.isConstant(h)||!j.isConstant(b)||!j.isConstant(p)||!j.isConstant(a))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{let f=this._geometryOptions,y=r.getValue(Je.MINIMUM_VALUE,f.positions);if(!l(y)||y.length<2){this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));return}let _;d&&(!l(this._depthFailMaterialProperty)||this._depthFailMaterialProperty instanceof Bt)?_=Es.VERTEX_FORMAT:_=$a.VERTEX_FORMAT,f.vertexFormat=_,f.positions=y,f.width=l(u)?u.getValue(Je.MINIMUM_VALUE):void 0,f.arcType=l(h)?h.getValue(Je.MINIMUM_VALUE):void 0,f.granularity=l(b)?b.getValue(Je.MINIMUM_VALUE):void 0;let S=this._groundGeometryOptions;S.positions=y,S.width=f.width,S.arcType=f.arcType,S.granularity=f.granularity,this._clampToGround=l(p)?p.getValue(Je.MINIMUM_VALUE):!1,!this._clampToGround&&l(a)&&Tt("Entity polylines must have clampToGround: true when using zIndex. zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}};Wf.prototype.createDynamicUpdater=function(e,t){return new FN(e,t,this)};var aR={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function FN(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 y_e(e){if(l(e._line))return e._line;let t=e._primitives,n=e._geometryUpdater._scene.id+t._guid,i=PO[n];!l(i)||i.isDestroyed()?(i=new lf,PO[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}FN.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,on.GEODESIC),t._groundGeometryOptions.granularity=j.getValueOrDefault(i._granularity,e,9999);let s=this._groundPrimitives;if(l(this._groundPolylinePrimitive)&&(s.remove(this._groundPolylinePrimitive),this._groundPolylinePrimitive=void 0),t.clampToGround){if(!n.isShowing||!n.isAvailable(e)||!j.getValueOrDefault(i._show,e,!0)||!l(r)||r.length<2)return;let h=t.fillMaterialProperty,p;if(h instanceof Bt)p=new Es;else{let b=yr.getValue(e,h,this._material);p=new $a({material:b,translucent:b.isTranslucent()}),this._material=b}this._groundPolylinePrimitive=s.add(new Ph({geometryInstances:t.createFillGeometryInstance(e),appearance:p,classificationType:t.classificationTypeProperty.getValue(e),asynchronous:!1}),j.getValueOrUndefined(t.zIndex,e)),l(this._line)&&(this._line.show=!1);return}let a=y_e(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=on.GEODESIC;c=j.getValueOrDefault(i._arcType,e,c);let d=t._scene.globe,u=t._scene.ellipsoid;c!==on.NONE&&l(d)&&(aR.ellipsoid=u,aR.positions=r,aR.granularity=j.getValueOrUndefined(i._granularity,e),aR.height=Ki.extractHeights(r,u),c===on.GEODESIC?r=Ki.generateCartesianArc(aR):r=Ki.generateCartesianRhumbArc(aR)),a.show=!0,a.positions=r.slice(),a.material=yr.getValue(e,t.fillMaterialProperty,a.material),a.width=j.getValueOrDefault(i._width,e,1),a.distanceDisplayCondition=j.getValueOrUndefined(i._distanceDisplayCondition,e,a.distanceDisplayCondition)};FN.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),xt.DONE}return l(t)&&!t.ready?xt.PENDING:xt.DONE}else{let t=y_e(this);if(t.show&&t.positions.length>0)return de.fromPoints(t.positions,e),xt.DONE}return xt.FAILED};FN.prototype.isDestroyed=function(){return!1};FN.prototype.destroy=function(){let t=this._geometryUpdater._scene.id+this._primitives._guid,n=PO[t];l(n)&&(n.remove(this._line),n.length===0&&(this._primitives.removeAndDestroy(n),delete PO[t])),l(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),me(this)};var IN=Wf;var rPi=x(T(),1);var Gmt=new U,Lmt=new Yt,Wmt=new Yt;function vf(e,t,n,i,o){let r;n instanceof Bt?r=Es:r=$a,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=r,this.materialProperty=n,this.updaters=new It,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new It,this.material=void 0,this.updatersWithAttributes=new It,this.attributes=new It,this.invalidated=!1,this.removeMaterialSubscription=n.definitionChanged.addEventListener(vf.prototype.onMaterialChanged,this),this.subscriptions=new It,this.showsUpdated=new It,this.zIndex=i,this._asynchronous=o}vf.prototype.onMaterialChanged=function(){this.invalidated=!0};vf.prototype.isMaterial=function(e){let t=this.materialProperty,n=e.fillMaterialProperty;return n===t||n instanceof Bt&&t instanceof Bt?!0:l(t)&&t.equals(n)};vf.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};vf.prototype.remove=function(e){let t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);let n=this.subscriptions.get(t);return l(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1};vf.prototype.update=function(e){let t=!0,n=this.primitive,i=this.orderedGroundPrimitives,o=this.geometry.values,r;if(this.createPrimitive){if(o.length>0){l(n)&&(l(this.oldPrimitive)?i.remove(n):this.oldPrimitive=n);let a=this.appearanceType;n=new Ph({show:!1,asynchronous:this._asynchronous,geometryInstances:o.slice(),appearance:new a,classificationType:this.classificationType}),this.appearanceType===$a&&(this.material=yr.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===$a&&(this.material=yr.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);let s=this.updatersWithAttributes.values,a=s.length;for(r=0;r<a;r++){let c=s[r],d=c.entity,u=this.geometry.get(c.id),h=this.attributes.get(u.id.id);if(l(h)||(h=n.getGeometryInstanceAttributes(u.id),this.attributes.set(u.id.id,h)),!c.fillMaterialProperty.isConstant){let y=c.fillMaterialProperty.color,_=j.getValueOrDefault(y,e,U.WHITE,Gmt);U.equals(h._lastColor,_)||(h._lastColor=U.clone(_,h._lastColor),h.color=Ht.toValue(_,h.color))}let p=d.isShowing&&(c.hasConstantFill||c.isFilled(e)),b=h.show[0]===1;p!==b&&(h.show=Zn.toValue(p,h.show));let f=c.distanceDisplayConditionProperty;if(!j.isConstant(f)){let y=j.getValueOrDefault(f,e,Wmt,Lmt);Yt.equals(y,h._lastDistanceDisplayCondition)||(h._lastDistanceDisplayCondition=Yt.clone(y,h._lastDistanceDisplayCondition),h.distanceDisplayCondition=Kn.toValue(y,h.distanceDisplayCondition))}}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=Zn.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 xt.PENDING;let i=n.getGeometryInstanceAttributes(e.entity);return!l(i)||!l(i.boundingSphere)||l(i.show)&&i.show[0]===0?xt.FAILED:(i.boundingSphere.clone(t),xt.DONE)};vf.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 cR(e,t,n){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=n??!0}cR.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 vf(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,r,this._asynchronous);s.add(e,t,o),n.push(s)};cR.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}}};cR.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};cR.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 xt.FAILED};cR.prototype.removeAllPrimitives=function(){let e=this._items,t=e.length;for(let n=0;n<t;n++)e[n].destroy();this._items.length=0};var PN=cR;var vmt=[];function x_e(e,t){let n=e._batches,i=n.length;for(let o=0;o<i;o++)n[o].remove(t)}function T_e(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 Bt?1:2);let r;l(i)&&(r=i+o*Cn.NUMBER_OF_SHADOW_MODES),n.fillEnabled&&(n.fillMaterialProperty instanceof Bt?e._colorBatches[r].add(t,n):e._materialBatches[r].add(t,n))}function Bp(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 It,this._removedObjects=new It,this._changedObjects=new It;let o,r=Cn.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 th(n,Es,void 0,!1,o),this._materialBatches[o]=new nh(n,$a,void 0,!1,o),this._colorBatches[o+r]=new th(n,Es,Es,!1,o),this._materialBatches[o+r]=new nh(n,$a,Es,!1,o),this._colorBatches[o+r*2]=new th(n,Es,$a,!1,o),this._materialBatches[o+r*2]=new nh(n,$a,$a,!1,o);this._dynamicBatch=new TS(n,i);let s=Jn.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(s),o=0;o<s;++o)this._groundBatches[o]=new PN(i,o);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new It,this._updaters=new It,this._entityCollection=t,t.collectionChanged.addEventListener(Bp.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,vmt)}Bp.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?(x_e(this,u),T_e(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),x_e(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 IN(c,this._scene),this._updaters.set(d,u),T_e(this,e,u),this._subscriptions.set(d,u.geometryChanged.addEventListener(Bp._onGeometryChanged,this));t.removeAll(),i.removeAll(),r.removeAll();let h=!0,p=this._batches,b=p.length;for(a=0;a<b;a++)h=p[a].update(e)&&h;return h};var Fmt=[],Imt=new de;Bp.prototype.getBoundingSphere=function(e,t){let n=Fmt,i=Imt,o=0,r=xt.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===xt.PENDING)return xt.PENDING;r===xt.DONE&&(n[o]=de.clone(i,n[o]),o++)}return o===0?xt.FAILED:(n.length=o,de.fromBoundingSpheres(n,t),xt.DONE)};Bp.prototype.isDestroyed=function(){return!1};Bp.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(Bp.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(),me(this)};Bp._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)};Bp.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 XN=Bp;function Md(e){El.initializeTerrainHeights(),Ph.initializeTerrainHeights();let t=e.scene,n=e.dataSourceCollection;this._eventHelper=new vr,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??Md.defaultVisualizersCallback;let i=!1,o=new td,r=new td;n.length>0&&(t.primitives.add(o),t.groundPrimitives.add(r),i=!0),this._primitives=o,this._groundPrimitives=r;for(let d=0,u=n.length;d<u;d++)this._onDataSourceAdded(n,n.get(d));let s=new IX;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 lR=[];Md.registerVisualizer=function(e){lR.includes(e)||lR.push(e)};Md.unregisterVisualizer=function(e){if(lR.includes(e)){let t=lR.indexOf(e);lR.splice(t,1)}};Md.defaultVisualizersCallback=function(e,t,n){let i=n.entities;return[new aW(t,i),new ZN(e,i,n._primitives,n._groundPrimitives),new CN(t,i),new VN(e,i),new TX(e,i),new WN(t,i),new GN(e,i),new XN(e,i,n._primitives,n._groundPrimitives),...lR.map(o=>new o(e,i))]};Object.defineProperties(Md.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}}});Md.prototype.isDestroyed=function(){return!1};Md.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)),me(this)};Md.prototype.update=function(e){if(!Ei.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};Md.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 Pmt=[],Xmt=new de;Md.prototype.getBoundingSphere=function(e,t,n){if(!this._ready)return xt.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 xt.FAILED;let s=Pmt,a=Xmt,c=0,d=xt.DONE,u=r._visualizers,h=u.length;for(i=0;i<h;i++){let p=u[i];if(l(p.getBoundingSphere)){if(d=u[i].getBoundingSphere(e,a),!t&&d===xt.PENDING)return xt.PENDING;d===xt.DONE&&(s[c]=de.clone(a,s[c]),c++)}}return c===0?xt.FAILED:(s.length=c,de.fromBoundingSpheres(s,n),xt.DONE)};Md.prototype._onDataSourceAdded=function(e,t){let n=this._scene,i=this._primitives,o=this._groundPrimitives,r=i.add(new td),s=o.add(new JX);t._primitives=r,t._groundPrimitives=s;let a=t.clustering;a._initialize(n),r.add(a),t._visualizers=this._visualizersCallback(n,a,t)};Md.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};Md.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 NN=Md;var aXi=x(T(),1);var zPi=x(T(),1);function $7(e,t,n){this.heading=e??0,this.pitch=t??0,this.range=n??0}$7.clone=function(e,t){if(l(e))return l(t)||(t=new $7),t.heading=e.heading,t.pitch=e.pitch,t.range=e.range,t};var ih=$7;var __e=new q,S_e=new q,A_e=new q,Nmt=new F,XO=new m,Z_e=new m,e6=new m,t6=new m,C_e=new m,V_e=new m,Ymt=new Pe,wmt=new m,Mmt=new q,dR=new Q,kmt=1.25;function Umt(e,t,n,i,o,r,s,a,c,d){let u=e.scene.mode,h=o.getValue(c,e._lastCartesian);if(l(h)){let p=!1,b=!1,f,y,_;if(u===re.SCENE3D){Q.addSeconds(c,.001,dR);let v=o.getValue(dR,XO);if(l(v)||(Q.addSeconds(c,-.001,dR),v=o.getValue(dR,XO),b=!0),l(v)){let I=dt.computeFixedToIcrfMatrix(c,__e),X=dt.computeFixedToIcrfMatrix(dR,S_e),N;!l(I)||!l(X)?(N=dt.computeTemeToPseudoFixedMatrix(c,A_e),I=q.transpose(N,__e),X=dt.computeTemeToPseudoFixedMatrix(dR,S_e),q.transpose(X,X)):N=q.transpose(I,A_e);let g=q.multiplyByVector(I,h,C_e),C=q.multiplyByVector(X,v,V_e);m.subtract(g,C,t6);let R=m.magnitude(t6)*1e3,G=W.GRAVITATIONALPARAMETER,P=-G/(R*R-2*G/m.magnitude(g));P<0||P>kmt*d.maximumRadius?(f=Z_e,m.normalize(h,f),m.negate(f,f),_=m.clone(m.UNIT_Z,e6),y=m.cross(_,f,XO),m.magnitude(y)>W.EPSILON7&&(m.normalize(f,f),m.normalize(y,y),_=m.cross(f,y,e6),m.normalize(_,_),p=!0)):m.equalsEpsilon(h,v,W.EPSILON7)||(_=Z_e,m.normalize(g,_),m.normalize(C,C),y=m.cross(_,C,e6),b&&(y=m.multiplyByScalar(y,-1,y)),m.equalsEpsilon(y,m.ZERO,W.EPSILON7)||(f=m.cross(y,_,XO),q.multiplyByVector(N,f,f),q.multiplyByVector(N,y,y),q.multiplyByVector(N,_,_),m.normalize(f,f),m.normalize(y,y),m.normalize(_,_),p=!0))}}l(e.boundingSphere)&&(h=e.boundingSphere.center);let S,A,Z;i&&(S=m.clone(t.position,t6),A=m.clone(t.direction,C_e),Z=m.clone(t.up,V_e));let V=Nmt,E;l(s)&&(E=s.getValue(c,Ymt));let L=r.getValue(c,wmt);if(a===B0.INERTIAL&&l(E))F.fromTranslationQuaternionRotationScale(h,E,m.ONE,V);else if(a===B0.VELOCITY&&l(L)){let v=dt.rotationMatrixFromPositionVelocity(h,L,d,Mmt);F.fromRotationTranslation(v,h,V)}else a===B0.ENU||!p?dt.eastNorthUpToFixedFrame(h,d,V):(V[0]=f.x,V[1]=f.y,V[2]=f.z,V[3]=0,V[4]=y.x,V[5]=y.y,V[6]=y.z,V[7]=0,V[8]=_.x,V[9]=_.y,V[10]=_.z,V[11]=0,V[12]=h.x,V[13]=h.y,V[14]=h.z,V[15]=0);t._setTransform(V),i&&(m.clone(S,t.position),m.clone(A,t.direction),m.clone(Z,t.up),m.cross(A,Z,t.right))}if(n){let p=u===re.SCENE2D||m.equals(e._offset3D,m.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,p)}}function YN(e,t,n){this.entity=e,this.scene=t,this.ellipsoid=n??ie.default,this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new m,this._defaultOffset3D=void 0,this._velocityProperty=new rg(e.position,!0),this._offset3D=new m}Object.defineProperties(YN,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=m.clone(e,new m)}}});YN.defaultOffset3D=new m(-14e3,3500,3500);var NO=new ih,Dmt=new m;YN.prototype.update=function(e,t){let n=this.scene,i=this.ellipsoid,o=n.mode;if(o===re.MORPHING)return;let r=this.entity,s=r.trackingReferenceFrame,a=r.position;if(!l(a))return;let c=this._velocityProperty,d=r.orientation,u=r!==this._lastEntity,h=o!==this._mode,p=n.camera,b=u||h,f=!0;if(u){let y=r.viewFrom,_=l(y);if(!_&&l(t)){NO.pitch=-W.PI_OVER_FOUR,NO.range=0;let S=a.getValue(e,Dmt);if(l(S)){let A=2-1/Math.max(1,m.magnitude(S)/i.maximumRadius);NO.pitch*=A}p.viewBoundingSphere(t,NO),this.boundingSphere=t,b=!1,f=!1}else(!_||!l(y.getValue(e,this._offset3D)))&&m.clone(YN._defaultOffset3D,this._offset3D)}else!h&&this._mode!==re.SCENE2D&&m.clone(p.position,this._offset3D);this._lastEntity=r,this._mode=o,Umt(this,p,b,f,a,c,d,s,e,i)};var wN=YN;var wNi=x(T(),1);var fXi=x(T(),1);function kN(){this._cache={}}kN.prototype.fromColor=function(e,t){return YO(void 0,void 0,e,t,this._cache)};kN.prototype.fromUrl=function(e,t,n){return YO(e,void 0,t,n,this._cache)};kN.prototype.fromMakiIconId=function(e,t,n){return YO(Kt(`Assets/Textures/maki/${encodeURIComponent(e)}.png`),void 0,t,n,this._cache)};kN.prototype.fromText=function(e,t,n){return YO(void 0,e,t,n,this._cache)};var Omt=new U;function Bmt(e,t,n){e.save(),e.scale(n/24,n/24),e.fillStyle=t.toCssColorString(),e.strokeStyle=t.brighten(.6,Omt).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 R_e(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 MN=new Array(4);function YO(e,t,n,i,o){MN[0]=e,MN[1]=t,MN[2]=n,MN[3]=i;let r=JSON.stringify(MN),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(Bmt(c,n,i),l(e)){let u=We.createIfNeeded(e).fetchImage().then(function(h){return R_e(c,h,i),o[r]=a,a});return o[r]=u,u}else if(l(t)){let d=N_(t,{font:`bold ${i}px sans-serif`});R_e(c,d,i)}return o[r]=a,a}var mg=kN;var oNi=x(T());var SXi=x(T());var xXi=x(T());var bXi=x(T());function n6(e){return e}function wO(e){if(e==null)return n6;var t,n,i=e.scale[0],o=e.scale[1],r=e.translate[0],s=e.translate[1];return function(a,c){c||(t=n=0);var d=2,u=a.length,h=new Array(u);for(h[0]=(t+=a[0])*i+r,h[1]=(n+=a[1])*o+s;d<u;)h[d]=a[d],++d;return h}}var EXi=x(T());var ZXi=x(T());function E_e(e,t){for(var n,i=e.length,o=i-t;o<--i;)n=e[o],e[o++]=e[i],e[i]=n}function i6(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return G_e(e,n)})}:G_e(e,t)}function G_e(e,t){var n=t.id,i=t.bbox,o=t.properties==null?{}:t.properties,r=o6(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 o6(e,t){var n=wO(e.transform),i=e.arcs;function o(u,h){h.length&&h.pop();for(var p=i[u<0?~u:u],b=0,f=p.length;b<f;++b)h.push(n(p[b],b));u<0&&E_e(h,f)}function r(u){return n(u)}function s(u){for(var h=[],p=0,b=u.length;p<b;++p)o(u[p],h);return h.length<2&&h.push(h[0]),h}function a(u){for(var h=s(u);h.length<4;)h.push(h[0]);return h}function c(u){return u.map(a)}function d(u){var h=u.type,p;switch(h){case"GeometryCollection":return{type:h,geometries:u.geometries.map(d)};case"Point":p=r(u.coordinates);break;case"MultiPoint":p=u.coordinates.map(r);break;case"LineString":p=s(u.arcs);break;case"MultiLineString":p=u.arcs.map(s);break;case"Polygon":p=c(u.arcs);break;case"MultiPolygon":p=u.arcs.map(c);break;default:return null}return{type:h,coordinates:p}}return d(t)}var IXi=x(T());var LXi=x(T());var YXi=x(T());var OXi=x(T());var MXi=x(T());var QXi=x(T());var HXi=x(T());function MO(e){return m.fromDegrees(e[0],e[1],e[2])}var r6={"urn:ogc:def:crs:OGC:1.3:CRS84":MO,"EPSG:4326":MO,"urn:ogc:def:crs:EPSG::4326":MO},L_e={},W_e={},s6=48,a6,c6=U.ROYALBLUE,l6=U.YELLOW,d6=2,u6=U.fromBytes(255,255,0,100),m6=!1,jmt={small:24,medium:48,large:64},Qmt=["title","description","marker-size","marker-symbol","marker-color","stroke","stroke-opacity","stroke-width","fill","fill-opacity"];function v_e(e,t){let n="";for(let i in e)if(e.hasOwnProperty(i)){if(i===t||Qmt.indexOf(i)!==-1)continue;let o=e[i];l(o)&&(typeof o=="object"?n+=`<tr><th>${i}</th><td>${v_e(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 qmt(e,t,n){let i;return function(o,r){return l(i)||(i=e(t,n)),i}}function $mt(e,t){return new Mh(qmt(v_e,e,t),!0)}function kO(e,t,n){let i=e.id;if(!l(i)||e.type!=="Feature")i=zn();else{let s=2,a=i;for(;l(t.getById(a));)a=`${i}_${s}`,s++;i=a}let o=t.getOrCreateEntity(i),r=e.properties;if(l(r)){o.properties=r;let s,a=r.title;if(l(a))o.name=a,s="title";else{let d=Number.MAX_VALUE;for(let u in r)if(r.hasOwnProperty(u)&&r[u]){let h=u.toLowerCase();if(d>1&&h==="title"){d=1,s=u;break}else d>2&&h==="name"?(d=2,s=u):d>3&&/title/i.test(u)?(d=3,s=u):d>4&&/name/i.test(u)&&(d=4,s=u)}l(s)&&(o.name=r[s])}let c=r.description;c!==null&&(o.description=l(c)?new ci(c):n(r,s))}return o}function h6(e,t){let n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=t(e[i]);return n}var F_e={Feature:P_e,FeatureCollection:eht,GeometryCollection:X_e,LineString:k_e,MultiLineString:U_e,MultiPoint:w_e,MultiPolygon:B_e,Point:Y_e,Polygon:O_e,Topology:z_e},I_e={GeometryCollection:X_e,LineString:k_e,MultiLineString:U_e,MultiPoint:w_e,MultiPolygon:B_e,Point:Y_e,Polygon:O_e,Topology:z_e};function P_e(e,t,n,i,o){if(t.geometry===null){kO(t,e._entityCollection,o.describe);return}if(!l(t.geometry))throw new le("feature.geometry is required.");let r=t.geometry.type,s=I_e[r];if(!l(s))throw new le(`Unknown geometry type: ${r}`);s(e,t,t.geometry,i,o)}function eht(e,t,n,i,o){let r=t.features;for(let s=0,a=r.length;s<a;s++)P_e(e,r[s],void 0,i,o)}function X_e(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=I_e[d];if(!l(u))throw new le(`Unknown geometry type: ${d}`);u(e,t,c,i,o)}}function N_e(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=jmt[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 Oc;u.verticalOrigin=new ci(Dn.BOTTOM),i.length===2&&o.clampToGround&&(u.heightReference=tt.CLAMP_TO_GROUND);let h=kO(t,e._entityCollection,o.describe);h.billboard=u,h.position=new Wl(n(i));let p=Promise.resolve(d).then(function(b){u.image=new ci(b)}).catch(function(){u.image=new ci(e._pinBuilder.fromColor(s,a))});e._promises.push(p)}function Y_e(e,t,n,i,o){N_e(e,t,i,n.coordinates,o)}function w_e(e,t,n,i,o){let r=n.coordinates;for(let s=0;s<r.length;s++)N_e(e,t,i,r[s],o)}function M_e(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 ci(u));let h,p=a.stroke;l(p)&&(h=U.fromCssColorString(p));let b=a["stroke-opacity"];l(b)&&b!==1&&(l(h)||(h=r.color.getValue().clone()),h.alpha=b),l(h)&&(r=new Bt(h))}let c=kO(t,e._entityCollection,o.describe),d=new zc;c.polyline=d,d.clampToGround=o.clampToGround,d.material=r,d.width=s,d.positions=new ci(h6(i,n)),d.arcType=on.RHUMB}function k_e(e,t,n,i,o){M_e(e,t,i,n.coordinates,o)}function U_e(e,t,n,i,o){let r=n.coordinates;for(let s=0;s<r.length;s++)M_e(e,t,i,r[s],o)}function D_e(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 ci(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 ci(f));let S,A=c.fill,Z=s.color.getValue();l(A)&&(S=U.fromCssColorString(A),S.alpha=Z.alpha),_=c["fill-opacity"],l(_)&&_!==Z.alpha&&(l(S)||(S=Z.clone()),S.alpha=_),l(S)&&(s=new Bt(S))}let d=new Yh;d.outline=new ci(!0),d.outlineColor=r,d.outlineWidth=a,d.material=s,d.arcType=on.RHUMB;let u=[];for(let b=1,f=i.length;b<f;b++)u.push(new Ac(h6(i[b],n)));let h=i[0];d.hierarchy=new ci(new Ac(h6(h,n),u)),h[0].length>2?d.perPositionHeight=new ci(!0):o.clampToGround||(d.height=0);let p=kO(t,e._entityCollection,o.describe);p.polygon=d}function O_e(e,t,n,i,o){D_e(e,t,i,n.coordinates,o)}function B_e(e,t,n,i,o){let r=n.coordinates;for(let s=0;s<r.length;s++)D_e(e,t,i,r[s],o)}function z_e(e,t,n,i,o){for(let r in n.objects)if(n.objects.hasOwnProperty(r)){let s=i6(n,n.objects[r]),a=F_e[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 Ya(this),this._promises=[],this._pinBuilder=new mg,this._entityCluster=new Vu,this._credit=void 0,this._resourceCredits=[]}yx.load=function(e,t){return new yx().load(e,t)};Object.defineProperties(yx,{markerSize:{get:function(){return s6},set:function(e){s6=e}},markerSymbol:{get:function(){return a6},set:function(e){a6=e}},markerColor:{get:function(){return c6},set:function(e){c6=e}},stroke:{get:function(){return l6},set:function(e){l6=e}},strokeWidth:{get:function(){return d6},set:function(e){d6=e}},fill:{get:function(){return u6},set:function(e){u6=e}},clampToGround:{get:function(){return m6},set:function(e){m6=e}},crsNames:{get:function(){return r6}},crsLinkHrefs:{get:function(){return L_e}},crsLinkTypes:{get:function(){return W_e}}});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 H_e(this,e,t,!0)};yx.prototype.process=function(e,t){return H_e(this,e,t,!1)};function H_e(e,t,n,i){gs.setLoading(e,!0),n=n??B.EMPTY_OBJECT;let o=n.credit;typeof o=="string"&&(o=new bt(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??$mt,markerSize:n.markerSize??s6,markerSymbol:n.markerSymbol??a6,markerColor:n.markerColor??c6,strokeWidthProperty:new ci(n.strokeWidth??d6),strokeMaterialProperty:new Bt(n.stroke??l6),fillMaterialProperty:new Bt(n.fill??u6),clampToGround:n.clampToGround??m6},Promise.resolve(r).then(function(a){return tht(e,a,n,s,i)}).catch(function(a){throw gs.setLoading(e,!1),e._error.raiseEvent(e,a),a})}yx.prototype.update=function(e){return!0};function tht(e,t,n,i,o){let r;l(i)&&(r=$b(i)),l(r)&&e._name!==r&&(e._name=r,e._changed.raiseEvent(e));let s=F_e[t.type];if(!l(s))throw new le(`Unsupported GeoJSON object type: ${t.type}`);let a=t.crs,c=a!==null?MO:null;if(l(a)){if(!l(a.properties))throw new le("crs.properties is undefined.");let d=a.properties;if(a.type==="name"){if(c=r6[d.name],!l(c))throw new le(`Unknown crs name: ${d.name}`)}else if(a.type==="link"){let u=L_e[d.href];if(l(u)||(u=W_e[d.type]),!l(u))throw new le(`Unable to resolve crs link: ${JSON.stringify(d)}`);c=u(d)}else if(a.type==="EPSG"){if(c=r6[`EPSG:${d.code}`],!l(c))throw new le(`Unknown crs EPSG code: ${d.code}`)}else throw new le(`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,gs.setLoading(e,!1),e})})}var xx=yx;var LMi=x(T(),1);var Owi=x(T());var Ewi=x(T());var kNi=x(T(),1),f6=function(e,t){return f6=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])},f6(e,t)};function zp(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");f6(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Qs=function(){return Qs=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},Qs.apply(this,arguments)};function K_e(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 J_e(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 DNi=x(T()),j_e="4.1.5";var BNi=x(T()),Q_e=Object.prototype.hasOwnProperty;function Pu(e){return typeof e=="boolean"}function q_e(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 Ff(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}var aYi=x(T());var KNi=x(T());var UO=/\s+/,DO=(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(UO):[],o=t.split(UO),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(UO):[],o=t.split(UO),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)Q_e.call(t,i)&&n.push(i+'="'+t[i]+'"');return n.join(" ")},e})();var jNi=x(T());function eSe(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=nht(e);if(s.query){var a=s.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);a&&(s.query=s.query.substr(0,a[1].length),e=$_e(s))}if(e.length<=t||(s.host&&(s.host=s.host.replace(/^www\./,""),e=$_e(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):p6(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+p6(d,u,n)).substr(0,r+i)}else c+=d;if(s.fragment){var h="#"+s.fragment;if((c+h).length>=r){if((c+h).length==t)return(c+h).substr(0,t);var p=r-c.length;return(c+p6(h,p,n)).substr(0,r+i)}else c+=h}if(s.scheme&&s.host){var b=s.scheme+"://";if((c+b).length<r)return(b+c).substr(0,t)}if(c.length<=t)return c;var f="";return r>0&&(f=c.substr(-1*Math.floor(r/2))),(c.substr(0,Math.ceil(r/2))+n+f).substr(0,r+i)}function nht(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 $_e(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 p6(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 qNi=x(T());function tSe(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 tYi=x(T());function nSe(e,t,n){return q_e(e,t,n)}var iSe=(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 DO({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"?eSe(t,i):o==="middle"?tSe(t,i):nSe(t,i)},e})();var mwi=x(T());var SYi=x(T());var lYi=x(T()),Hp=(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 gYi=x(T());var uYi=x(T());function oSe(e){return e>=0&&e<=31||e==127}function hg(e){return e>=65&&e<=90||e>=97&&e<=122}function qs(e){return e>=48&&e<=57}function OO(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 If(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 rSe(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 sSe(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 BO(e){return e<58?e<44?e==33:e==44||e==46:e<63?e>=58&&e<=59:e==63||e==94}function aSe(e){return e<91?e==40:e==91||e==123}function b6(e){return e<93?e==41:e==93||e==125}var hYi=x(T()),cSe=/^(?: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 g6=/https?:\/\//i,lSe=new RegExp("^"+g6.source,"i"),iht=/^(javascript|vbscript):/i,oht=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,rht=/^(?:\/\/)?([^/#?:]+)/,uR=hg;function y6(e){return hg(e)||qs(e)||e===43||e===45||e===46}var fg=If;function zO(e){return e===95||fg(e)}function x6(e){return If(e)||sSe(e)||BO(e)}function HO(e){return e===47||e===63||e===35}function T6(e){return cSe.test(e.toLowerCase())}function dSe(e){if(iht.test(e))return!1;var t=e.match(oht);if(!t)return!1;var n=!!t[1],i=t[2];return n?!0:!(i.indexOf(".")===-1||!/[A-Za-z]/.test(i))}function uSe(e){var t=e.match(rht);if(!t)return!1;var n=t[0],i=n.split(".");if(i.length<2)return!1;var o=i[i.length-1];return!!T6(o)}var sht=/^(?:(?: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]?)$/,aht=/[:/?#]/;function mSe(e){var t=e.split(aht,1)[0];return sht.test(t)}var cht=/^(https?:\/\/)?(?:www\.)?/i,lht=/^\/\//,hSe=(function(e){zp(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=mht(n)),this.stripPrefix.scheme&&(n=dht(n)),this.stripPrefix.www&&(n=uht(n)),this.stripTrailingSlash&&(n=hht(n)),this.decodePercentEncoding&&(n=fht(n)),n},t})(Hp);function dht(e){return e.replace(lSe,"")}function uht(e){return e.includes("www.")?e.replace(cht,"$1"):e}function mht(e){return e.replace(lht,"")}function hht(e){return e.charAt(e.length-1)==="/"&&(e=e.slice(0,-1)),e}function fht(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 VYi=x(T());var fSe=/^mailto:/i,_6=If;function KO(e){return _6(e)||rSe(e)}function pSe(e){var t=e.split(".").pop();return T6(t)}var LYi=x(T());var bSe=(function(e){zp(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})(Hp);var FYi=x(T());function S6(e){return e===95||If(e)}function gSe(e){return e.length<=140}var ySe=["twitter","facebook","instagram","tiktok","youtube"];var YYi=x(T());var xSe=(function(e){zp(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:Ff(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})(Hp);var kYi=x(T());var pht={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function A6(e){return e===45||e===46||e===95||hg(e)||qs(e)}function TSe(e,t){var n=pht[t];return n.test(e)}var _Se=["twitter","instagram","soundcloud","tiktok","youtube"];var zYi=x(T());var SSe=(function(e){zp(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:Ff(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})(Hp);var KYi=x(T()),bht=/[-. ()]/,ght=/(?:(?:(?:(\+)?\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]+#?)*/,yht=/(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})/,xht=new RegExp("^".concat(ght.source,"|").concat(yht.source,"$"));function Z6(e){return e===45||e===46||e===32}function JO(e){return e===44||e===59}function ASe(e){var t=e.charAt(0)==="+"||bht.test(e);return t&&xht.test(e)}var qYi=x(T());var ZSe=(function(e){zp(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})(Hp);var Tht=(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),VSe(t)&&this.schemeUrlMachinesCount++},e.prototype.removeMachine=function(t){this._stateMachines=this._stateMachines.filter(function(n){return n!==t}),VSe(t)&&this.schemeUrlMachinesCount--},e.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},e})();function RSe(e,t){for(var n=new Tht(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)jO(n,i,o);else{for(var r=n.stateMachines.length-1;r>=0;r--){var s=n.stateMachines[r];switch(s.state){case 11:Vht(n,s,o);break;case 12:Rht(n,s,o);break;case 0:_ht(n,s,o);break;case 1:Sht(n,s,o);break;case 2:Aht(n,s,o);break;case 3:Zht(n,s,o);break;case 4:Cht(n,s,i,o);break;case 5:Eht(n,s,o);break;case 6:Ght(n,s,i,o);break;case 7:Lht(n,s,i,o);break;case 13:Wht(n,s,o);break;case 14:vht(n,s,o);break;case 8:Fht(n,s,o);break;case 9:Iht(n,s,o);break;case 10:Pht(n,s,o);break;case 15:Xht(n,s,i,o);break;case 16:Nht(n,s,i,o);break;case 17:Yht(n,s,i,o);break;case 18:wht(n,s,i,o);break;case 19:Mht(n,s,i,o);break;case 20:kht(n,s,o);break;case 21:Uht(n,s,o);break;case 22:PS(n,s,o);break;case 23:Dht(n,s,o);break;case 24:Oht(n,s,o);break;case 25:Bht(n,s,o);break;case 26:zht(n,s,o);break;case 27:Hht(n,s,o);break;case 28:Kht(n,s,o);break;case 29:Jht(n,s,o);break;case 30:jht(n,s,o);break;case 31:Qht(n,s,o);break;case 32:$ht(n,s,i,o);break;case 33:eft(n,s,o);break;case 34:tft(n,s,o);break;case 35:nft(n,s,o);break;case 36:ift(n,s,i,o);break;case 37:qht(n,s,i,o);break;case 38:oft(n,s,i,o);break;case 39:rft(n,s,i,o);break;case 40:sft(n,s,o);break;case 41:aft(n,s,o);break;default:Ff(s.state)}}if(!n.hasSchemeUrlMachine()&&n.charIdx>0&&uR(o)){var a=n.text.charCodeAt(n.charIdx-1);uR(a)||n.addMachine(QO(n.charIdx,0))}}}for(var c=n.stateMachines.length-1;c>=0;c--)n.stateMachines.forEach(function(d){return xs(n,d)});return n.matches}function jO(e,t,n){var i=e.charIdx;if(n===35)e.addMachine(mft(i,28));else if(n===64)e.addMachine(hft(i,30));else if(n===47)e.addMachine(V6(i,11));else if(n===43)e.addMachine(C6(i,37));else if(n===40)e.addMachine(C6(i,32));else{if(qs(n)&&(e.addMachine(C6(i,38)),e.addMachine(dft(i,13))),_6(n)){var o=t.toLowerCase()==="m"?15:22;e.addMachine(uft(i,o))}uR(n)&&e.addMachine(QO(i,0)),If(n)&&e.addMachine(V6(i,5))}}function _ht(e,t,n){n===58?t.state=2:n===45?t.state=1:y6(n)||e.removeMachine(t)}function Sht(e,t,n){var i=e.charIdx;n===45||(n===47?(e.removeMachine(t),e.addMachine(V6(i,11))):y6(n)?t.state=0:e.removeMachine(t))}function Aht(e,t,n){var i=e.charIdx;n===47?t.state=3:n===46?e.removeMachine(t):fg(n)?(t.state=5,uR(n)&&e.addMachine(QO(i,0))):e.removeMachine(t)}function Zht(e,t,n){n===47?t.state=4:x6(n)?(t.state=10,t.acceptStateReached=!0):xs(e,t)}function Cht(e,t,n,i){i===47?(t.state=10,t.acceptStateReached=!0):fg(i)?(t.state=5,t.acceptStateReached=!0):e.removeMachine(t)}function Vht(e,t,n){n===47?t.state=12:e.removeMachine(t)}function Rht(e,t,n){fg(n)?t.state=5:e.removeMachine(t)}function Eht(e,t,n){n===46?t.state=7:n===45?t.state=6:n===58?t.state=8:HO(n)?t.state=10:zO(n)||xs(e,t)}function Ght(e,t,n,i){i===45||(i===46?xs(e,t):fg(i)?t.state=5:xs(e,t))}function Lht(e,t,n,i){i===46?xs(e,t):fg(i)?(t.state=5,t.acceptStateReached=!0):xs(e,t)}function Wht(e,t,n){n===46?t.state=14:n===58?t.state=8:qs(n)||(HO(n)?t.state=10:If(n)?e.removeMachine(t):xs(e,t))}function vht(e,t,n){qs(n)?(t.octetsEncountered++,t.octetsEncountered===4&&(t.acceptStateReached=!0),t.state=13):xs(e,t)}function Fht(e,t,n){qs(n)?t.state=9:xs(e,t)}function Iht(e,t,n){qs(n)||(HO(n)?t.state=10:xs(e,t))}function Pht(e,t,n){x6(n)||xs(e,t)}function Xht(e,t,n,i){n.toLowerCase()==="a"?t.state=16:PS(e,t,i)}function Nht(e,t,n,i){n.toLowerCase()==="i"?t.state=17:PS(e,t,i)}function Yht(e,t,n,i){n.toLowerCase()==="l"?t.state=18:PS(e,t,i)}function wht(e,t,n,i){n.toLowerCase()==="t"?t.state=19:PS(e,t,i)}function Mht(e,t,n,i){n.toLowerCase()==="o"?t.state=20:PS(e,t,i)}function kht(e,t,n){n===58?t.state=21:PS(e,t,n)}function Uht(e,t,n){KO(n)?t.state=22:e.removeMachine(t)}function PS(e,t,n){n===46?t.state=23:n===64?t.state=24:KO(n)?t.state=22:e.removeMachine(t)}function Dht(e,t,n){n===46||n===64?e.removeMachine(t):KO(n)?t.state=22:e.removeMachine(t)}function Oht(e,t,n){fg(n)?t.state=25:e.removeMachine(t)}function Bht(e,t,n){n===46?t.state=27:n===45?t.state=26:zO(n)||xs(e,t)}function zht(e,t,n){n===45||n===46?xs(e,t):zO(n)?t.state=25:xs(e,t)}function Hht(e,t,n){n===46||n===45?xs(e,t):fg(n)?(t.state=25,t.acceptStateReached=!0):xs(e,t)}function Kht(e,t,n){S6(n)?(t.state=29,t.acceptStateReached=!0):e.removeMachine(t)}function Jht(e,t,n){S6(n)||xs(e,t)}function jht(e,t,n){A6(n)?(t.state=31,t.acceptStateReached=!0):e.removeMachine(t)}function Qht(e,t,n){A6(n)||(If(n)?e.removeMachine(t):xs(e,t))}function qht(e,t,n,i){qs(i)?t.state=38:(e.removeMachine(t),jO(e,n,i))}function $ht(e,t,n,i){qs(i)?t.state=33:e.removeMachine(t),jO(e,n,i)}function eft(e,t,n){qs(n)?t.state=34:e.removeMachine(t)}function tft(e,t,n){qs(n)?t.state=35:e.removeMachine(t)}function nft(e,t,n){n===41?t.state=36:e.removeMachine(t)}function ift(e,t,n,i){qs(i)?t.state=38:Z6(i)?t.state=39:e.removeMachine(t)}function oft(e,t,n,i){var o=e.charIdx;t.acceptStateReached=!0,JO(i)?t.state=40:i===35?t.state=41:qs(i)||(i===40?t.state=32:Z6(i)?t.state=39:(xs(e,t),uR(i)&&e.addMachine(QO(o,0))))}function rft(e,t,n,i){qs(i)?t.state=38:i===40?t.state=32:(xs(e,t),jO(e,n,i))}function sft(e,t,n){JO(n)||(n===35?t.state=41:qs(n)?t.state=38:xs(e,t))}function aft(e,t,n){JO(n)?t.state=40:qs(n)?e.removeMachine(t):xs(e,t)}function xs(e,t){var n=e.matches,i=e.text,o=e.charIdx,r=e.tagBuilder,s=e.stripPrefix,a=e.stripTrailingSlash,c=e.decodePercentEncoding,d=e.hashtagServiceName,u=e.mentionServiceName;if(e.removeMachine(t),!!t.acceptStateReached){var h=t.startIdx,p=i.slice(t.startIdx,o);switch(p=lft(p),t.type){case 0:{var b=i.charCodeAt(t.startIdx-1);if(b===64)return;switch(t.matchType){case 0:{var f=g6.exec(p);if(f&&(h=h+f.index,p=p.slice(f.index)),!dSe(p))return;break}case 1:{if(!uSe(p))return;break}case 2:{if(!mSe(p))return;break}default:Ff(t)}n.push(new hSe({tagBuilder:r,matchedText:p,offset:h,urlMatchType:cft(t.matchType),url:p,protocolRelativeMatch:p.slice(0,2)==="//",stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:c}));break}case 1:{pSe(p)&&n.push(new bSe({tagBuilder:r,matchedText:p,offset:h,email:p.replace(fSe,"")}));break}case 2:{gSe(p)&&n.push(new xSe({tagBuilder:r,matchedText:p,offset:h,serviceName:d,hashtag:p.slice(1)}));break}case 3:{TSe(p,u)&&n.push(new SSe({tagBuilder:r,matchedText:p,offset:h,serviceName:u,mention:p.slice(1)}));break}case 4:{if(p=p.replace(/ +$/g,""),ASe(p)){var y=p.replace(/[^0-9,;#]/g,"");n.push(new ZSe({tagBuilder:r,matchedText:p,offset:h,number:y,plusSign:p.charAt(0)==="+"}))}break}default:Ff(t)}}}function cft(e){switch(e){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:Ff(e)}}var CSe={")":"(","}":"{","]":"["};function lft(e){for(var t={"(":0,"{":0,"[":0},n=0;n<e.length;n++){var i=e.charAt(n),o=e.charCodeAt(n);aSe(o)?t[i]++:b6(o)&&t[CSe[i]]--}for(var r=e.length-1;r>=0;){var i=e.charAt(r),o=e.charCodeAt(r);if(b6(o)){var s=CSe[i];if(t[s]<0)t[s]++,r--;else break}else if(BO(o))r--;else break}return e.slice(0,r+1)}function QO(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:0}}function V6(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:1}}function dft(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:2,octetsEncountered:1}}function uft(e,t){return{type:1,startIdx:e,state:t,acceptStateReached:!1}}function mft(e,t){return{type:2,startIdx:e,state:t,acceptStateReached:!1}}function hft(e,t){return{type:3,startIdx:e,state:t,acceptStateReached:!1}}function C6(e,t){return{type:4,startIdx:e,state:t,acceptStateReached:!1}}function VSe(e){return e.type===0&&e.matchType===0}var gwi=x(T());var Kp=(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})(),E6=new Kp,fft=(function(){function e(t,n){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=E6,this.html=t,this.callbacks=n}return e})();function ESe(e,t){for(var n=new fft(e,t),i=e.length;n.charIdx<i;){var o=e.charAt(n.charIdx),r=e.charCodeAt(n.charIdx);switch(n.state){case 0:pft(n,o);break;case 1:bft(n,o,r);break;case 2:yft(n,o,r);break;case 3:gft(n,o,r);break;case 4:xft(n,o,r);break;case 5:Tft(n,o,r);break;case 6:_ft(n,o,r);break;case 7:Sft(n,o,r);break;case 8:Aft(n,o);break;case 9:Zft(n,o);break;case 10:Cft(n,o,r);break;case 11:Vft(n,o,r);break;case 12:Rft(n,o);break;case 13:Eft(n);break;case 14:Gft(n,o);break;case 15:Lft(n,o);break;case 16:Wft(n,o);break;case 17:vft(n,o);break;case 18:Fft(n,o);break;case 19:Ift(n,o);break;case 20:Pft(n,o);break;default:Ff(n.state)}n.charIdx++}n.currentDataIdx<n.charIdx&&Xft(n)}function pft(e,t){t==="<"&&Jp(e)}function bft(e,t,n){t==="!"?e.state=13:t==="/"?(e.state=2,e.currentTag=new Kp(Qs(Qs({},e.currentTag),{isClosing:!0}))):t==="<"?Jp(e):hg(n)?(e.state=3,e.currentTag=new Kp(Qs(Qs({},e.currentTag),{isOpening:!0}))):(e.state=0,e.currentTag=E6)}function gft(e,t,n){_x(n)?(e.currentTag=new Kp(Qs(Qs({},e.currentTag),{name:R6(e)})),e.state=4):t==="<"?Jp(e):t==="/"?(e.currentTag=new Kp(Qs(Qs({},e.currentTag),{name:R6(e)})),e.state=12):t===">"?(e.currentTag=new Kp(Qs(Qs({},e.currentTag),{name:R6(e)})),jp(e)):!hg(n)&&!qs(n)&&t!==":"&&oh(e)}function yft(e,t,n){t===">"?oh(e):hg(n)?e.state=3:oh(e)}function xft(e,t,n){_x(n)||(t==="/"?e.state=12:t===">"?jp(e):t==="<"?Jp(e):t==="="||OO(n)||oSe(n)?oh(e):e.state=5)}function Tft(e,t,n){_x(n)?e.state=6:t==="/"?e.state=12:t==="="?e.state=7:t===">"?jp(e):t==="<"?Jp(e):OO(n)&&oh(e)}function _ft(e,t,n){_x(n)||(t==="/"?e.state=12:t==="="?e.state=7:t===">"?jp(e):t==="<"?Jp(e):OO(n)?oh(e):e.state=5)}function Sft(e,t,n){_x(n)||(t==='"'?e.state=8:t==="'"?e.state=9:/[>=`]/.test(t)?oh(e):t==="<"?Jp(e):e.state=10)}function Aft(e,t){t==='"'&&(e.state=11)}function Zft(e,t){t==="'"&&(e.state=11)}function Cft(e,t,n){_x(n)?e.state=4:t===">"?jp(e):t==="<"&&Jp(e)}function Vft(e,t,n){_x(n)?e.state=4:t==="/"?e.state=12:t===">"?jp(e):t==="<"?Jp(e):(e.state=4,Nft(e))}function Rft(e,t){t===">"?(e.currentTag=new Kp(Qs(Qs({},e.currentTag),{isClosing:!0})),jp(e)):oh(e)}function Eft(e){var t=e.html,n=e.charIdx;t.slice(n,n+2)==="--"?(e.charIdx++,e.currentTag=new Kp(Qs(Qs({},e.currentTag),{type:"comment"})),e.state=14):t.slice(n,n+7).toUpperCase()==="DOCTYPE"?(e.charIdx+=6,e.currentTag=new Kp(Qs(Qs({},e.currentTag),{type:"doctype"})),e.state=20):oh(e)}function Gft(e,t){t==="-"?e.state=15:t===">"?oh(e):e.state=16}function Lft(e,t){t==="-"?e.state=18:t===">"?oh(e):e.state=16}function Wft(e,t){t==="-"&&(e.state=17)}function vft(e,t){t==="-"?e.state=18:e.state=16}function Fft(e,t){t===">"?jp(e):t==="!"?e.state=19:t==="-"||(e.state=16)}function Ift(e,t){t==="-"?e.state=17:t===">"?jp(e):e.state=16}function Pft(e,t){t===">"?jp(e):t==="<"&&Jp(e)}function oh(e){e.state=0,e.currentTag=E6}function Jp(e){e.state=1,e.currentTag=new Kp({idx:e.charIdx})}function jp(e){var t=e.html.slice(e.currentDataIdx,e.currentTag.idx);t&&e.callbacks.onText(t,e.currentDataIdx);var n=e.currentTag;n.type==="comment"?e.callbacks.onComment(n.idx):n.type==="doctype"?e.callbacks.onDoctype(n.idx):(n.isOpening&&e.callbacks.onOpenTag(n.name,n.idx),n.isClosing&&e.callbacks.onCloseTag(n.name,n.idx)),oh(e),e.currentDataIdx=e.charIdx+1}function Xft(e){var t=e.html.slice(e.currentDataIdx,e.charIdx);e.callbacks.onText(t,e.currentDataIdx),e.currentDataIdx=e.charIdx+1}function R6(e){var t=e.currentTag.idx+(e.currentTag.isClosing?2:1);return e.html.slice(t,e.charIdx).toLowerCase()}function Nft(e){e.charIdx--}var Yft=(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=wft(t.urls),this.email=Pu(t.email)?t.email:this.email,this.phone=Pu(t.phone)?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=Pu(t.newWindow)?t.newWindow:this.newWindow,this.stripPrefix=Mft(t.stripPrefix),this.stripTrailingSlash=Pu(t.stripTrailingSlash)?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=Pu(t.decodePercentEncoding)?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&_Se.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var i=this.hashtag;if(i!==!1&&ySe.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=kft(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 ESe(t,{onOpenTag:function(s){i.indexOf(s)>=0&&o++},onText:function(s,a){if(o===0){var c=/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi,d=s.split(c),u=a;d.forEach(function(h,p){if(p%2===0){var b=n.parseText(h,u);r.push.apply(r,J_e([],K_e(b),!1))}u+=h.length})}},onCloseTag:function(s){i.indexOf(s)>=0&&(o=Math.max(o-1,0))},onComment:function(){},onDoctype:function(){}}),r=this.compactMatches(r),r=this.removeUnwantedMatches(r),r},e.prototype.compactMatches=function(t){t.sort(Uft);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=RSe(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 DO)return n.toAnchorString();var i=t.buildTag();return i.toAnchorString()},e.prototype.getTagBuilder=function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new iSe({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t},e.version=j_e,e})(),GSe=Yft;function wft(e){return e==null&&(e=!0),Pu(e)?{schemeMatches:e,tldMatches:e,ipV4Matches:e}:{schemeMatches:Pu(e.schemeMatches)?e.schemeMatches:!0,tldMatches:Pu(e.tldMatches)?e.tldMatches:!0,ipV4Matches:Pu(e.ipV4Matches)?e.ipV4Matches:!0}}function Mft(e){return e==null&&(e=!0),Pu(e)?{scheme:e,www:e}:{scheme:Pu(e.scheme)?e.scheme:!0,www:Pu(e.www)?e.www:!0}}function kft(e){return typeof e=="number"?{length:e,location:"end"}:Qs({length:Number.POSITIVE_INFINITY,location:"end"},e)}function Uft(e,t){return e.getOffset()-t.getOffset()}var Wwi=x(T());var Gwi=x(T());var Mwi=x(T());var qO=GSe;var YSe;typeof DOMParser<"u"&&(YSe=new DOMParser);var Dft=new qO({stripPrefix:!1,email:!1,replaceFn:function(e,t){return t.urlMatchType==="scheme"||t.urlMatchType==="www"}}),$O=32,LSe=2414016,WSe=1,vSe=16093e3,FSe=.1,Oft=[null,void 0,"http://www.topografix.com/GPX/1/1"],Ho={gpx:Oft};function Bft(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 G6(e,t){let n=ON(e,"id");return n=l(n)?n:zn(),t.getOrCreateEntity(n)}function L6(e){let t=ISe(e,"lon"),n=ISe(e,"lat"),i=UN(e,"ele",Ho.gpx);return m.fromDegrees(t,n,i)}function ISe(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 ON(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 W6(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 UN(e,t,n){let i=Sx(e,t,n);if(l(i)){let o=parseFloat(i.textContent);return isNaN(o)?void 0:o}}function kd(e,t,n){let i=Sx(e,t,n);if(l(i))return i.textContent.trim()}function wSe(e){let t=new Oc;return t.width=$O,t.height=$O,t.scaleByDistance=new wt(LSe,WSe,vSe,FSe),t.pixelOffsetScaleByDistance=new wt(LSe,WSe,vSe,FSe),t.verticalOrigin=new ci(Dn.BOTTOM),t.image=e,t}function zft(){let e=new Nh;return e.translucencyByDistance=new wt(3e6,1,5e6,0),e.pixelOffset=new M(17,0),e.horizontalOrigin=Ii.LEFT,e.font="16px sans-serif",e.style=ar.FILL_AND_OUTLINE,e}function MSe(e){let t=new zc;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 PSe={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"}},DN;typeof document<"u"&&(DN=document.createElement("div"));function v6(e,t){let n,i="",o=Object.keys(PSe),r=o.length;for(n=0;n<r;n++){let u=o[n],h=PSe[u];h.value=kd(e,h.tag,Ho.gpx)??"",l(h.value)&&h.value!==""&&(i=`${i}<p>${h.text}: ${h.value}</p>`)}if(!l(i)||i==="")return;i=Dft.link(i),DN.innerHTML=i;let s=DN.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+=`${DN.innerHTML}</div>`,DN.innerHTML="",d}function kSe(e,t,n,i){let o=L6(t),r=G6(t,n);r.position=o;let s=l(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",U.RED,$O);r.billboard=wSe(s);let a=kd(t,"name",Ho.gpx);r.name=a,r.label=zft(),r.label.text=a,r.description=v6(t,r),i.clampToGround&&(r.billboard.heightReference=tt.CLAMP_TO_GROUND,r.label.heightReference=tt.CLAMP_TO_GROUND)}function Hft(e,t,n,i){let o=G6(t,n);o.description=v6(t,o);let r=W6(t,"rtept",Ho.gpx),s=new Array(r.length);for(let a=0;a<r.length;a++)kSe(e,r[a],n,i),s[a]=L6(r[a]);o.polyline=MSe(i.routeColor),i.clampToGround&&(o.polyline.clampToGround=!0),o.polyline.positions=s}function Kft(e,t,n,i){let o=G6(t,n);o.description=v6(t,o);let r=W6(t,"trkseg",Ho.gpx),s=[],a=[],c,d=!0,u=new sc;for(let h=0;h<r.length;h++)c=Jft(r[h]),s=s.concat(c.positions),c.times.length>0?(a=a.concat(c.times),u.addSamples(a,s),d=d&&!0):d=!1;if(d){let h=l(i.waypointImage)?i.waypointImage:e._pinBuilder.fromMakiIconId("marker",U.RED,$O);o.billboard=wSe(h),o.position=u,i.clampToGround&&(o.billboard.heightReference=tt.CLAMP_TO_GROUND),o.availability=new bs,o.availability.addInterval(new En({start:a[0],stop:a[a.length-1]}))}o.polyline=MSe(i.trackColor),o.polyline.positions=s,i.clampToGround&&(o.polyline.clampToGround=!0)}function Jft(e){let t={positions:[],times:[]},n=W6(e,"trkpt",Ho.gpx),i;for(let o=0;o<n.length;o++){let r=L6(n[o]);t.positions.push(r),i=kd(n[o],"time",Ho.gpx),l(i)&&t.times.push(Q.fromIso8601(i))}return t}function jft(e){let t=Sx(e,"metadata",Ho.gpx);if(l(t)){let n={name:kd(t,"name",Ho.gpx),desc:kd(t,"desc",Ho.gpx),author:Qft(t),copyright:$ft(t),link:USe(t),time:kd(t,"time",Ho.gpx),keywords:kd(t,"keywords",Ho.gpx),bounds:ept(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 Qft(e){let t=Sx(e,"author",Ho.gpx);if(l(t)){let n={name:kd(t,"name",Ho.gpx),email:qft(t),link:USe(t)};if(l(n.name)||l(n.email)||l(n.link))return n}}function qft(e){let t=Sx(e,"email",Ho.gpx);if(l(t)){let n=kd(t,"id",Ho.gpx),i=kd(t,"domain",Ho.gpx);return`${n}@${i}`}}function USe(e){let t=Sx(e,"link",Ho.gpx);if(l(t)){let n={href:ON(t,"href"),text:kd(t,"text",Ho.gpx),mimeType:kd(t,"type",Ho.gpx)};if(l(n.href)||l(n.text)||l(n.mimeType))return n}}function $ft(e){let t=Sx(e,"copyright",Ho.gpx);if(l(t)){let n={author:ON(t,"author"),year:kd(t,"year",Ho.gpx),license:kd(t,"license",Ho.gpx)};if(l(n.author)||l(n.year)||l(n.license))return n}}function ept(e){let t=Sx(e,"bounds",Ho.gpx);if(l(t)){let n={minLat:UN(t,"minlat",Ho.gpx),maxLat:UN(t,"maxlat",Ho.gpx),minLon:UN(t,"minlon",Ho.gpx),maxLon:UN(t,"maxlon",Ho.gpx)};if(l(n.minLat)||l(n.maxLat)||l(n.minLon)||l(n.maxLon))return n}}var XSe={wpt:kSe,rte:Hft,trk:Kft};function tpt(e,t,n,i){let o=Object.keys(XSe),r=o.length;for(let s=0;s<r;s++){let a=o[s],c=XSe[a],d=t.childNodes,u=d.length;for(let h=0;h<u;h++){let p=d[h];p.localName===a&&Ho.gpx.indexOf(p.namespaceURI)!==-1&&c(e,p,n,i)}}}function NSe(e,t,n){let i=e._entityCollection;i.removeAll();let o=t.documentElement,r=ON(o,"version"),s=ON(o,"creator"),a,c=jft(o);l(c)&&(a=c.name),o.localName==="gpx"?tpt(e,o,i,n):console.log(`GPX - Unsupported node: ${o.localName}`);let d,u=i.computeAvailability(),h=u.start,p=u.stop,b=Q.equals(h,Je.MINIMUM_VALUE),f=Q.equals(p,Je.MAXIMUM_VALUE);if(!b||!f){let _;b&&(_=new Date,_.setHours(0,0,0,0),h=Q.fromDate(_)),f&&(_=new Date,_.setHours(24,0,0,0),p=Q.fromDate(_)),d=new Zf,d.startTime=h,d.stopTime=p,d.currentTime=Q.clone(h),d.clockRange=ys.LOOP_STOP,d.clockStep=Fo.SYSTEM_CLOCK_MULTIPLIER,d.multiplier=Math.round(Math.min(Math.max(Q.secondsDifference(p,h)/60,1),31556900))}let y=!1;return e._name!==a&&(e._name=a,y=!0),e._creator!==s&&(e._creator=s,y=!0),npt(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),gs.setLoading(e,!1),e}function npt(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 ipt(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?Bft(r).then(function(s){let a,c;try{a=YSe.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 le(d)}return NSe(e,a,i)}):NSe(e,r,i)}).catch(function(r){return e._error.raiseEvent(e,r),console.log(r),Promise.reject(r)})}function mR(){this._changed=new _e,this._error=new _e,this._loading=new _e,this._clock=void 0,this._entityCollection=new Ya(this),this._entityCluster=new Vu,this._name=void 0,this._version=void 0,this._creator=void 0,this._metadata=void 0,this._isLoading=!1,this._pinBuilder=new mg}mR.load=function(e,t){return new mR().load(e,t)};Object.defineProperties(mR.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}}});mR.prototype.update=function(e){return!0};mR.prototype.load=function(e,t){if(!l(e))throw new he("data is required.");t=t??B.EMPTY_OBJECT,gs.setLoading(this,!0);let n=this._name,i=this;return ipt(this,this._entityCollection,e,t).then(function(){let o,r=i._entityCollection.computeAvailability(),s=r.start,a=r.stop,c=Q.equals(s,Je.MINIMUM_VALUE),d=Q.equals(a,Je.MAXIMUM_VALUE);if(!c||!d){let h;c&&(h=new Date,h.setHours(0,0,0,0),s=Q.fromDate(h)),d&&(h=new Date,h.setHours(24,0,0,0),a=Q.fromDate(h)),o=new Zf,o.startTime=s,o.stopTime=a,o.currentTime=Q.clone(s),o.clockRange=ys.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),gs.setLoading(i,!1),i}).catch(function(o){return gs.setLoading(i,!1),i._error.raiseEvent(i,o),console.log(o),Promise.reject(o)})};var BN=mR;var vMi=x(T(),1);function opt(e,t){this.position=e,this.headingPitchRoll=t}var zN=opt;var z5i=x(T(),1);var WY=x(tu(),1);var tUi=x(T(),1);var Lki=x(T(),1);var NMi=x(T(),1);var IMi=x(T(),1);var F6=new Date(2107,11,31),I6=new Date(1980,0,1),Mt=void 0,XS=1/0,Xu="undefined",Nu="function",DSe="object";var rpt=64,OSe=2;try{typeof navigator!=Xu&&navigator.hardwareConcurrency&&(OSe=navigator.hardwareConcurrency)}catch{}var spt={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:64*1024,maxWorkers:OSe,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,CompressionStream:typeof CompressionStream!=Xu&&CompressionStream,DecompressionStream:typeof DecompressionStream!=Xu&&DecompressionStream},BSe=Object.assign({},spt);function HN(){return BSe}function eB(e){return Math.max(e.chunkSize,rpt)}function Qp(e){let{baseURI:t,chunkSize:n,maxWorkers:i,terminateWorkerTimeout:o,useCompressionStream:r,useWebWorkers:s,CompressionStream:a,DecompressionStream:c,CompressionStreamZlib:d,DecompressionStreamZlib:u,workerURI:h,wasmURI:p}=e;rh("baseURI",t),rh("wasmURI",p),rh("workerURI",h),rh("chunkSize",n),rh("maxWorkers",i),rh("terminateWorkerTimeout",o),rh("useCompressionStream",r),rh("useWebWorkers",s),rh("CompressionStream",a),rh("DecompressionStream",c),rh("CompressionStreamZlib",d),rh("DecompressionStreamZlib",u)}function rh(e,t){t!==Mt&&(BSe[e]=t)}var iki=x(T(),1);var eki=x(T(),1);var L9i=x(T(),1);var _9i=x(T(),1);var g9i=x(T(),1);var UMi=x(T(),1);var wMi=x(T(),1),zSe=[];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;zSe[e]=t}var pg=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^zSe[(n^t[i])&255];this.crc=n}get(){return~this.crc}};var KN=class extends TransformStream{constructor(){let t,n=new pg;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 a9i=x(T(),1);var BMi=x(T(),1);function hR(e){if(typeof TextEncoder==Xu){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}else return new TextEncoder().encode(e)}var HMi=x(T(),1),id={concat(e,t){if(e.length===0||t.length===0)return e.concat(t);let n=e[e.length-1],i=id.getPartial(n);return i===32?e.concat(t):id._shiftRight(t,i,n|0,e.slice(0,e.length-1))},bitLength(e){let t=e.length;if(t===0)return 0;let n=e[t-1];return(t-1)*32+id.getPartial(n)},clamp(e,t){if(e.length*32<t)return e;e=e.slice(0,Math.ceil(t/32));let n=e.length;return t=t&31,n>0&&t&&(e[n-1]=id.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial(e,t,n){return e===32?t:(n?t|0:t<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,t,n,i){for(i===void 0&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(t===0)return i.concat(e);for(let s=0;s<e.length;s++)i.push(n|e[s]>>>t),n=e[s]<<32-t;let o=e.length?e[e.length-1]:0,r=id.getPartial(o);return i.push(id.partial(t+r&31,t+r>32?n:i.pop(),1)),i}},JN={bytes:{fromBits(e){let n=id.bitLength(e)/8,i=new Uint8Array(n),o;for(let r=0;r<n;r++)(r&3)===0&&(o=e[r/4]),i[r]=o>>>24,o<<=8;return i},toBits(e){let t=[],n,i=0;for(n=0;n<e.length;n++)i=i<<8|e[n],(n&3)===3&&(t.push(i),i=0);return n&3&&t.push(id.partial(8*(n&3),i)),t}}},HSe={};HSe.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=JN.utf8String.toBits(e));let n=t._buffer=id.concat(t._buffer,e),i=t._length,o=t._length=i+id.bitLength(e);if(o>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");let r=new Uint32Array(n),s=0;for(let a=t.blockSize+i-(t.blockSize+i&t.blockSize-1);a<=o;a+=t.blockSize)t._block(r.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t}finalize(){let e=this,t=e._buffer,n=e._h;t=id.concat(t,[id.partial(1,1)]);for(let i=t.length+2;i&15;i++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(e._length|0);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){if(e<=19)return t&n|~t&i;if(e<=39)return t^n^i;if(e<=59)return t&n|t&i|n&i;if(e<=79)return t^n^i}_S(e,t){return t<<e|t>>>32-e}_block(e){let t=this,n=t._h,i=Array(80);for(let d=0;d<16;d++)i[d]=e[d];let o=n[0],r=n[1],s=n[2],a=n[3],c=n[4];for(let d=0;d<=79;d++){d>=16&&(i[d]=t._S(1,i[d-3]^i[d-8]^i[d-14]^i[d-16]));let u=t._S(5,o)+t._f(d,r,s,a)+c+i[d]+t._key[Math.floor(d/20)]|0;c=a,a=s,s=t._S(30,r),r=o,o=u}n[0]=n[0]+o|0,n[1]=n[1]+r|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+c|0}};var P6={};P6.aes=class{constructor(e){let t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();let n=t._tables[0][4],i=t._tables[1],o=e.length,r,s,a,c=1;if(o!==4&&o!==6&&o!==8)throw new Error("invalid aes key size");for(t._key=[s=e.slice(0),a=[]],r=o;r<4*o+28;r++){let d=s[r-1];(r%o===0||o===8&&r%o===4)&&(d=n[d>>>24]<<24^n[d>>16&255]<<16^n[d>>8&255]<<8^n[d&255],r%o===0&&(d=d<<8^d>>>24^c<<24,c=c<<1^(c>>7)*283)),s[r]=s[r-o]^d}for(let d=0;r;d++,r--){let u=s[d&3?r:r-4];r<=4||d<4?a[d]=u:a[d]=i[0][n[u>>>24]]^i[1][n[u>>16&255]]^i[2][n[u>>8&255]]^i[3][n[u&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){let e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],o=[],r=[],s,a,c,d;for(let u=0;u<256;u++)r[(o[u]=u<<1^(u>>7)*283)^u]=u;for(let u=s=0;!n[u];u^=a||1,s=r[s]||1){let h=s^s<<1^s<<2^s<<3^s<<4;h=h>>8^h&255^99,n[u]=h,i[h]=u,d=o[c=o[a=o[u]]];let p=d*16843009^c*65537^a*257^u*16843008,b=o[h]*257^h*16843008;for(let f=0;f<4;f++)e[f][u]=b=b<<24^b>>>8,t[f][h]=p=p<<24^p>>>8}for(let u=0;u<5;u++)e[u]=e[u].slice(0),t[u]=t[u].slice(0)}_crypt(e,t){if(e.length!==4)throw new Error("invalid aes block size");let n=this._key[t],i=n.length/4-2,o=[0,0,0,0],r=this._tables[t],s=r[0],a=r[1],c=r[2],d=r[3],u=r[4],h=e[0]^n[0],p=e[t?3:1]^n[1],b=e[2]^n[2],f=e[t?1:3]^n[3],y=4,_,S,A;for(let Z=0;Z<i;Z++)_=s[h>>>24]^a[p>>16&255]^c[b>>8&255]^d[f&255]^n[y],S=s[p>>>24]^a[b>>16&255]^c[f>>8&255]^d[h&255]^n[y+1],A=s[b>>>24]^a[f>>16&255]^c[h>>8&255]^d[p&255]^n[y+2],f=s[f>>>24]^a[h>>16&255]^c[p>>8&255]^d[b&255]^n[y+3],y+=4,h=_,p=S,b=A;for(let Z=0;Z<4;Z++)o[t?3&-Z:Z]=u[h>>>24]<<24^u[p>>16&255]<<16^u[b>>8&255]<<8^u[f&255]^n[y++],_=h,h=p,p=b,b=f,f=_;return o}};var KSe={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}},X6={};X6.ctrGladman=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if((e>>24&255)===255){let t=e>>16&255,n=e>>8&255,i=e&255;t===255?(t=0,n===255?(n=0,i===255?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];let o=id.bitLength(t);for(let r=0;r<i;r+=4){this.incCounter(n);let s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return id.clamp(t,o)}};var Ax={importKey(e){return new Ax.hmacSha1(JN.bytes.toBits(e))},pbkdf2(e,t,n,i){if(n=n||1e4,i<0||n<0)throw new Error("invalid params to pbkdf2");let o=(i>>5)+1<<2,r,s,a,c,d,u=new ArrayBuffer(o),h=new DataView(u),p=0,b=id;for(t=JN.bytes.toBits(t),d=1;p<(o||1);d++){for(r=s=e.encrypt(b.concat(t,[d])),a=1;a<n;a++)for(s=e.encrypt(s),c=0;c<s.length;c++)r[c]^=s[c];for(a=0;p<(o||1)&&a<r.length;a++)h.setInt32(p,r[a]),p+=4}return u.slice(0,i/8)}};Ax.hmacSha1=class{constructor(e){let t=this,n=t._hash=HSe.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 t9i=x(T(),1);var apt=typeof crypto!=Xu&&typeof crypto.getRandomValues==Nu,bg="Invalid password",Zx="Invalid signature",gg="zipjs-abort-check-password";function tB(e){return apt?crypto.getRandomValues(e):KSe.getRandomValues(e)}var fR=16,cpt="raw",QSe={name:"PBKDF2"},lpt={name:"HMAC"},dpt="SHA-1",upt=Object.assign({hash:lpt},QSe),N6=Object.assign({iterations:1e3,hash:{name:dpt}},QSe),mpt=["deriveBits"],QN=[8,12,16],jN=[16,24,32],Cx=10,hpt=[0,0,0,0],oB=typeof crypto!=Xu,eY=oB&&crypto.subtle,qSe=oB&&typeof eY!=Xu,qp=JN.bytes,fpt=P6.aes,ppt=X6.ctrGladman,bpt=Ax.hmacSha1,JSe=oB&&qSe&&typeof eY.importKey==Nu,jSe=oB&&qSe&&typeof eY.deriveBits==Nu,nB=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:tAe(t,n),signed:i,strength:o-1,pending:new Uint8Array})},async transform(s,a){let c=this,{password:d,strength:u,resolveReady:h,ready:p}=c;d?(await gpt(c,u,d,sh(s,0,QN[u]+2)),s=sh(s,QN[u]+2),r?a.error(new Error(gg)):h()):await p;let b=new Uint8Array(s.length-Cx-(s.length-Cx)%fR);a.enqueue($Se(c,s,b,0,Cx,!0))},async flush(s){let{signed:a,ctr:c,hmac:d,pending:u,ready:h}=this;if(d&&c){await h;let p=sh(u,0,u.length-Cx),b=sh(u,u.length-Cx),f=new Uint8Array;if(p.length){let y=$N(qp,p);d.update(y);let _=c.update(y);f=qN(qp,_)}if(a){let y=sh(qN(qp,d.digest()),0,Cx);for(let _=0;_<Cx;_++)if(y[_]!=b[_])throw new Error(Zx)}s.enqueue(f)}}})}},iB=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:tAe(t,n),strength:i-1,pending:new Uint8Array})},async transform(r,s){let a=this,{password:c,strength:d,resolveReady:u,ready:h}=a,p=new Uint8Array;c?(p=await ypt(a,d,c),u()):await h;let b=new Uint8Array(p.length+r.length-r.length%fR);b.set(p,0),s.enqueue($Se(a,r,b,p.length,0))},async flush(r){let{ctr:s,hmac:a,pending:c,ready:d}=this;if(a&&s){await d;let u=new Uint8Array;if(c.length){let h=s.update($N(qp,c));a.update(h),u=qN(qp,h)}o.signature=qN(qp,a.digest()).slice(0,Cx),r.enqueue(Y6(u,o.signature))}}}),o=this}};function $Se(e,t,n,i,o,r){let{ctr:s,hmac:a,pending:c}=e,d=t.length-o;c.length&&(t=Y6(c,t),n=_pt(n,d-d%fR));let u;for(u=0;u<=d-fR;u+=fR){let h=$N(qp,sh(t,u,u+fR));r&&a.update(h);let p=s.update(h);r||a.update(p),n.set(qN(qp,p),u+i)}return e.pending=sh(t,u),n}async function gpt(e,t,n,i){let o=await eAe(e,t,n,sh(i,0,QN[t])),r=sh(i,QN[t]);if(o[0]!=r[0]||o[1]!=r[1])throw new Error(bg)}async function ypt(e,t,n){let i=tB(new Uint8Array(QN[t])),o=await eAe(e,t,n,i);return Y6(i,o)}async function eAe(e,t,n,i){e.password=null;let o=await xpt(cpt,n,upt,!1,mpt),r=await Tpt(Object.assign({salt:i},N6),o,8*(jN[t]*2+2)),s=new Uint8Array(r),a=$N(qp,sh(s,0,jN[t])),c=$N(qp,sh(s,jN[t],jN[t]*2)),d=sh(s,jN[t]*2);return Object.assign(e,{keys:{key:a,authentication:c,passwordVerification:d},ctr:new ppt(new fpt(a),Array.from(hpt)),hmac:new bpt(c)}),d}async function xpt(e,t,n,i,o){if(JSe)try{return await eY.importKey(e,t,n,i,o)}catch{return JSe=!1,Ax.importKey(t)}else return Ax.importKey(t)}async function Tpt(e,t,n){if(jSe)try{return await eY.deriveBits(e,t,n)}catch{return jSe=!1,Ax.pbkdf2(t,e.salt,N6.iterations,n)}else return Ax.pbkdf2(t,e.salt,N6.iterations,n)}function tAe(e,t){return t===Mt?hR(e):t}function Y6(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 _pt(e,t){if(t&&t>e.length){let n=e;e=new Uint8Array(t),e.set(n,0)}return e}function sh(e,t,n){return e.subarray(t,n)}function qN(e,t){return e.fromBits(t)}function $N(e,t){return e.toBits(t)}var u9i=x(T(),1);var tY=12,rB=class extends TransformStream{constructor({password:t,passwordVerification:n,checkPasswordOnly:i}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),rAe(this,t)},transform(o,r){let s=this;if(s.password){let a=nAe(s,o.subarray(0,tY));if(s.password=null,a.at(-1)!=s.passwordVerification)throw new Error(bg);o=o.subarray(tY)}i?r.error(new Error(gg)):r.enqueue(nAe(s,o))}})}},sB=class extends TransformStream{constructor({password:t,passwordVerification:n}){super({start(){Object.assign(this,{password:t,passwordVerification:n}),rAe(this,t)},transform(i,o){let r=this,s,a;if(r.password){r.password=null;let c=tB(new Uint8Array(tY));c[tY-1]=r.passwordVerification,s=new Uint8Array(i.length+c.length),s.set(iAe(r,c),0),a=tY}else s=new Uint8Array(i.length),a=0;s.set(iAe(r,i),a),o.enqueue(s)}})}};function nAe(e,t){let n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=sAe(e)^t[i],w6(e,n[i]);return n}function iAe(e,t){let n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=sAe(e)^t[i],w6(e,t[i]);return n}function rAe(e,t){let n=[305419896,591751049,878082192];Object.assign(e,{keys:n,crcKey0:new pg(n[0]),crcKey2:new pg(n[2])});for(let i=0;i<t.length;i++)w6(e,t.charCodeAt(i))}function w6(e,t){let[n,i,o]=e.keys;e.crcKey0.append([t]),n=~e.crcKey0.get(),i=oAe(Math.imul(oAe(i+aAe(n)),134775813)+1),e.crcKey2.append([i>>>24]),o=~e.crcKey2.get(),e.keys=[n,i,o]}function sAe(e){let t=e.keys[2]|2;return aAe(Math.imul(t,t^1)>>>8)}function aAe(e){return e&255}function oAe(e){return e&4294967295}var pR="Invalid uncompressed size",Spt="deflate-raw",Apt="deflate64-raw",aB=class extends TransformStream{constructor(t,{chunkSize:n,CompressionStreamZlib:i,CompressionStream:o}){super({});let{compressed:r,encrypted:s,useCompressionStream:a,zipCrypto:c,signed:d,level:u}=t,h=this,p,b,f=super.readable;(!s||c)&&d&&(p=new KN,f=$p(f,p)),r&&(f=lAe(f,a,{level:u,chunkSize:n},o,i,o)),s&&(c?f=$p(f,new sB(t)):(b=new iB(t),f=$p(f,b))),cAe(h,f,()=>{let y;s&&!c&&(y=b.signature),(!s||c)&&d&&(y=new DataView(p.value.buffer).getUint32(0)),h.signature=y})}},cB=class extends TransformStream{constructor(t,{chunkSize:n,DecompressionStreamZlib:i,DecompressionStream:o}){super({});let{zipCrypto:r,encrypted:s,signed:a,signature:c,compressed:d,useCompressionStream:u,deflate64:h}=t,p,b,f=super.readable;s&&(r?f=$p(f,new rB(t)):(b=new nB(t),f=$p(f,b))),d&&(f=lAe(f,u,{chunkSize:n,deflate64:h},o,i,o)),(!s||r)&&a&&(p=new KN,f=$p(f,p)),cAe(this,f,()=>{if((!s||r)&&a){let y=new DataView(p.value.buffer);if(c!=y.getUint32(0,!1))throw new Error(Zx)}})}};function cAe(e,t,n){t=$p(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get(){return t}})}function lAe(e,t,n,i,o,r){let s=t&&i?i:o||r,a=n.deflate64?Apt:Spt;try{e=$p(e,new s(a,n))}catch(c){if(t)if(o)e=$p(e,new o(a,n));else if(r)e=$p(e,new r(a,n));else throw c;else throw c}return e}function $p(e,t){return e.pipeThrough(t)}var dAe="message",uAe="start",mAe="pull",M6="data",hAe="ack",k6="close",uB="deflate",mB="inflate";var lB=class extends TransformStream{constructor(t,n){super({});let i=this,{codecType:o}=t,r;o.startsWith(uB)?r=aB:o.startsWith(mB)&&(r=cB),i.outputSize=0;let s=0,a=new r(t,n),c=super.readable,d=new TransformStream({transform(h,p){h&&h.length&&(s+=h.length,p.enqueue(h))},flush(){Object.assign(i,{inputSize:s})}}),u=new TransformStream({transform(h,p){if(h&&h.length&&(p.enqueue(h),i.outputSize+=h.length,t.outputSize!==Mt&&i.outputSize>t.outputSize))throw new Error(pR)},flush(){let{signature:h}=a;Object.assign(i,{signature:h,inputSize:s})}});Object.defineProperty(i,"readable",{get(){return c.pipeThrough(d).pipeThrough(a).pipeThrough(u)}})}},dB=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 C9i=x(T(),1);var fAe={type:"module"},hB,U6,pAe,O6=!0;try{O6=typeof structuredClone==Nu&&structuredClone(new DOMException("","AbortError")).code!==Mt}catch{}var bAe=()=>{};function gAe({initModule:e}){bAe=e}var bR=class{constructor(t,{readable:n,writable:i},{options:o,config:r,streamOptions:s,useWebWorkers:a,transferStreams:c,workerURI:d},u){let{signal:h}=s;return Object.assign(t,{busy:!0,readable:n.pipeThrough(new dB(r.chunkSize)).pipeThrough(new B6(s),{signal:h}),writable:i,options:Object.assign({},o),workerURI:d,transferStreams:c,terminate(){return new Promise(p=>{let{worker:b,busy:f}=t;b?(f?t.resolveTerminated=p:(b.terminate(),p()),t.interface=null):p()})},onTaskFinished(){let{resolveTerminated:p}=t;p&&(t.resolveTerminated=null,t.terminated=!0,t.worker.terminate(),p()),t.busy=!1,u(t)}}),hB===Mt&&(hB=typeof Worker!=Xu),(a&&hB?Zpt:yAe)(t,r)}},B6=class extends TransformStream{constructor({onstart:t,onprogress:n,size:i,onend:o}){let r=0;super({async start(){t&&await D6(t,i)},async transform(s,a){r+=s.length,n&&await D6(n,r,i),a.enqueue(s)},async flush(){o&&await D6(o,r)}})}};async function D6(e,...t){try{await e(...t)}catch{}}function yAe(e,t){return{run:()=>Cpt(e,t)}}function Zpt(e,t){let{baseURI:n,chunkSize:i}=t,{wasmURI:o}=t;if(!e.interface){typeof o==Nu&&(o=o());let r;try{r=fB(e.workerURI,n,e)}catch{return hB=!1,yAe(e,t)}Object.assign(e,{worker:r,interface:{run:()=>Vpt(e,{chunkSize:i,wasmURI:o,baseURI:n})}})}return e.interface}async function Cpt({options:e,readable:t,writable:n,onTaskFinished:i},o){let r;try{if(!e.useCompressionStream)try{await bAe(o)}catch{e.useCompressionStream=!0}r=new lB(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 Vpt(e,t){let n,i,o=new Promise((h,p)=>{n=h,i=p});Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:i,result:o});let{readable:r,options:s}=e,{writable:a,closed:c}=Rpt(e.writable),d=pB({type:uAe,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 Rpt(e){let{writable:t,readable:n}=new TransformStream,i=n.pipeTo(e,{preventClose:!0});return{writable:t,closed:i}}function fB(e,t,n,i,o=!0){let r,s,a;if(U6===Mt){let c=typeof e==Nu;c?s=e(o):s=e;let d=s.startsWith("data:"),u=s.startsWith("blob:");if(d||u){i===Mt&&(i=!1),i&&(a=fAe);try{r=new Worker(s,a)}catch(h){if(u)try{URL.revokeObjectURL(s)}catch{}if(c&&u)return fB(e,t,n,i,!1);if(i)throw h;return fB(e,t,n,!0,!1)}}else{i===Mt&&(i=!0),i&&(a=fAe);try{s=new URL(s,t)}catch{}try{r=new Worker(s,a)}catch(h){if(i)throw h;return fB(e,t,n,!1,o)}}U6=s,pAe=a}else r=new Worker(U6,pAe);return r.addEventListener(dAe,c=>Ept(c,n)),r}function pB(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&&O6?(s&&c.push(s),a&&c.push(a)):e.readable=e.writable=null,c.length)try{return t.postMessage(e,c),!0}catch{O6=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(r){throw n&&n.releaseLock(),i(),r}}async function Ept({data:e},t){let{type:n,value:i,messageId:o,result:r,error:s}=e,{reader:a,writer:c,resolveResult:d,rejectResult:u,onTaskFinished:h}=t;try{if(s){let{message:b,stack:f,code:y,name:_,outputSize:S}=s,A=new Error(b);Object.assign(A,{stack:f,code:y,name:_,outputSize:S}),p(A)}else{if(n==mAe){let{value:b,done:f}=await a.read();pB({type:M6,value:b,done:f,messageId:o},t)}n==M6&&(await c.ready,await c.write(new Uint8Array(i)),pB({type:hAe,messageId:o},t)),n==k6&&p(null,r)}}catch(b){pB({type:k6,messageId:o},t),p(b)}function p(b,f){b?u(b):d(f),c&&c.releaseLock(),h()}}var NS=[],z6=[];var xAe=0;async function bB(e,t){let{options:n,config:i}=t,{transferStreams:o,useWebWorkers:r,useCompressionStream:s,compressed:a,signed:c,encrypted:d}=n,{workerURI:u,maxWorkers:h}=i;t.transferStreams=o||o===Mt;let p=!a&&!c&&!d&&!t.transferStreams;return t.useWebWorkers=!p&&(r||r===Mt&&i.useWebWorkers),t.workerURI=t.useWebWorkers&&u?u:Mt,n.useCompressionStream=s||s===Mt&&i.useCompressionStream,(await b()).run();async function b(){let y=NS.find(_=>!_.busy);if(y)return TAe(y),new bR(y,e,t,f);if(NS.length<h){let _={indexWorker:xAe};return xAe++,NS.push(_),new bR(_,e,t,f)}else return new Promise(_=>z6.push({resolve:_,stream:e,workerOptions:t}))}function f(y){if(z6.length){let[{resolve:_,stream:S,workerOptions:A}]=z6.splice(0,1);_(new bR(y,S,A,f))}else y.worker?(TAe(y),Gpt(y,t)):NS=NS.filter(_=>_!=y)}}function Gpt(e,t){let{config:n}=t,{terminateWorkerTimeout:i}=n;Number.isFinite(i)&&i>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{NS=NS.filter(o=>o!=e);try{await e.terminate()}catch{}},i))}function TAe(e){let{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}var P9i=x(T(),1);var Lpt="Writer iterator completed too soon",Wpt="Writer not initialized",vpt="text/plain";var Fpt="Content-Type";var Ipt=64*1024,F9i=256*1024,H6="writable",gR=class{constructor(){this.size=0}init(){this.initialized=!0}},nY=class extends gR{get readable(){let t=this,{chunkSize:n=Ipt}=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===Mt?n:Math.min(n,s-c),u=await cc(t,r+c,d,a);o.enqueue(u),c+n>s||s===Mt&&!u.length&&d?o.close():this.chunkOffset+=n}});return i}},gB=class extends gR{constructor(){super();let t=this,n=new WritableStream({write(i){if(!t.initialized)throw new Error(Wpt);return t.writeUint8Array(i)}});Object.defineProperty(t,H6,{get(){return n}})}writeUint8Array(){}};var iY=class extends gB{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)}},e0=class extends nY{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)}},yR=class extends gR{constructor(t){super();let n=this,i=new TransformStream,o=[];t&&o.push([Fpt,t]),Object.defineProperty(n,H6,{get(){return i.writable}}),n.blob=new Response(i.readable,{headers:o}).blob()}getData(){return this.blob}},oY=class extends e0{constructor(t){super(new Blob([t],{type:vpt}))}},rY=class extends yR{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 yB=class extends nY{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 cc(d,c,n);else{let h=u-c;s=new Uint8Array(n);let p=await cc(d,c,h);s.set(p,0);let b=await o.readUint8Array(t+h,n-h,i);s.set(b,h),p.length+b.length<n&&(s=s.subarray(0,p.length+b.length))}}else s=new Uint8Array;return o.lastDiskNumber=Math.max(a,o.lastDiskNumber),s}},sY=class extends gR{constructor(t,n=4294967295){super();let i=this;Object.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:n,availableSize:n});let o,r,s,a=new WritableStream({async write(u){let{availableSize:h}=i;if(s)u.length>=h?(await c(u.subarray(0,h)),await d(),i.diskOffset+=o.size,i.diskNumber++,s=null,await this.write(u.subarray(h))):await c(u);else{let{value:p,done:b}=await t.next();if(b&&!p)throw new Error(Lpt);o=p,o.size=0,o.maxSize&&(i.maxSize=o.maxSize),i.availableSize=i.maxSize,await n0(o),r=p.writable,s=r.getWriter(),await this.write(u)}},async close(){await s.ready,await d()}});Object.defineProperty(i,H6,{get(){return a}});async function c(u){let h=u.length;h&&(await s.ready,await s.write(u),o.size+=h,i.size+=h,i.availableSize-=h)}async function d(){await s.close()}}},YS=class{constructor(t){return Array.isArray(t)&&(t=new yB(t)),t instanceof ReadableStream&&(t={readable:t}),t}},xR=class{constructor(t){return t.writable===Mt&&typeof t.next==Nu&&(t=new sY(t)),t instanceof WritableStream&&(t={writable:t}),t.size===Mt&&(t.size=0),t instanceof sY||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:XS,maxSize:XS}),t}};async function n0(e,t){if(e.init&&!e.initialized)await e.init(t);else return Promise.resolve()}function cc(e,t,n,i){return e.readUint8Array(t,n,i)}var M9i=x(T(),1);var N9i=x(T(),1),_Ae="\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(""),Ppt=_Ae.length==256;function SAe(e){if(Ppt){let t="";for(let n=0;n<e.length;n++)t+=_Ae[e[n]];return t}else return new TextDecoder().decode(e)}function aY(e,t){return t&&t.trim().toLowerCase()=="cp437"?SAe(e):new TextDecoder(t).decode(e)}var U9i=x(T(),1),K6="filename",J6="rawFilename",cY="comment",j6="rawComment",lY="uncompressedSize",Q6="compressedSize",q6="offset",$6="diskNumberStart",TR="lastModDate",xB="rawLastModDate",dY="lastAccessDate",AAe="rawLastAccessDate",uY="creationDate",eq="rawCreationDate",tq="internalFileAttributes",nq="externalFileAttributes",iq="msdosAttributesRaw",oq="msdosAttributes",rq="msDosCompatible",TB="zip64",sq="encrypted",aq="version",cq="versionMadeBy",lq="zipCrypto",mY="directory",dq="executable",uq="compressionMethod",mq="signature",hq="extraField",Xpt="extraFieldInfoZip",Npt="extraFieldUnix";var fq="unixMode",pq="setuid",bq="setgid",gq="sticky",Ypt="bitFlag",wpt="filenameUTF8",Mpt="commentUTF8",kpt="rawExtraField",Upt="extraFieldZip64",Dpt="extraFieldUnicodePath",Opt="extraFieldUnicodeComment",Bpt="extraFieldAES",zpt="extraFieldNTFS",Hpt="extraFieldExtendedTimestamp",Kpt=[K6,J6,lY,Q6,TR,xB,cY,j6,dY,uY,eq,q6,$6,tq,nq,iq,oq,rq,TB,sq,aq,cq,lq,mY,dq,uq,mq,hq,Npt,Xpt,"uid","gid",fq,pq,bq,gq,Ypt,wpt,Mpt,kpt,Upt,Dpt,Opt,Bpt,zpt,Hpt],Vx=class{constructor(t){Kpt.forEach(n=>this[n]=t[n])}};var O9i=x(T(),1),ZAe="filenameEncoding",CAe="commentEncoding",VAe="decodeText",RAe="extractPrependedData",EAe="extractAppendedData",_B="password",SB="rawPassword",AB="passThrough",ZB="signal",GAe="checkPasswordOnly",LAe="checkOverlappingEntryOnly",WAe="checkOverlappingEntry",vAe="checkSignature",CB="useWebWorkers",VB="useCompressionStream",RB="transferStreams",EB="preventClose",FAe="encryptionStrength",IAe="extendedTimestamp",PAe="keepOrder",XAe="level",NAe="bufferedWrite",YAe="createTempStream",wAe="dataDescriptorSignature",MAe="useUnicodeFileNames",kAe="dataDescriptor",UAe="supportZip64SplitFile",DAe="encodeText",yq="offset",xq="usdz",OAe="unixExtraFieldType";var GB="File format is not recognized",QAe="End of central directory not found",qAe="End of Zip64 central directory locator not found",$Ae="Central directory header not found",eZe="Local file header not found",tZe="Zip64 extra field not found",nZe="File contains encrypted entry",iZe="Encryption method not supported",_q="Compression method not supported",Sq="Split zip file",oZe="Overlapping entry found",zAe="utf-8",qpt="UTF8",HAe="cp437",$pt=[[lY,4294967295],[Q6,4294967295],[q6,4294967295],[$6,65535]],e0t={65535:{getValue:Ir,bytes:4},4294967295:{getValue:AR,bytes:8}},wS=class{constructor(t,n={}){Object.assign(this,{reader:new YS(t),options:n,config:HN(),readRanges:[]})}async*getEntriesGenerator(t={}){let n=this,{reader:i}=n,{config:o}=n;if(await n0(i),(i.size===Mt||!i.readUint8Array)&&(i=new e0(await new Response(i.readable).blob()),await n0(i)),i.size<22)throw new Error(GB);i.chunkSize=eB(o);let r=await s0t(i,101010256,i.size,22,65535*16);if(!r){let N=await cc(i,0,4),g=Pr(N);throw Ir(g)==134695760?new Error(Sq):new Error(QAe)}let s=Pr(r),a=Ir(s,12),c=Ir(s,16),d=r.offset,u=lc(s,20),h=d+22+u,p=lc(s,4),b=i.lastDiskNumber||0,f=lc(s,6),y=lc(s,8),_=0,S=0;if(c==4294967295||a==4294967295||y==65535||f==65535){let N=await cc(i,r.offset-20,20),g=Pr(N);if(Ir(g,0)==117853008){c=AR(g,8);let C=await cc(i,c,56,-1),R=Pr(C),G=r.offset-20-56;if(Ir(R,0)!=101075792&&c!=G){let P=c;c=G,c>P&&(_=c-P),C=await cc(i,c,56,-1),R=Pr(C)}if(Ir(R,0)!=101075792)throw new Error(qAe);p==65535&&(p=Ir(R,16)),f==65535&&(f=Ir(R,20)),y==65535&&(y=AR(R,32)),a==4294967295&&(a=AR(R,40)),c-=a}}if(c>=i.size&&(_=i.size-c-a-22,c=i.size-a-22),b!=p)throw new Error(Sq);if(c<0)throw new Error(GB);let A=0,Z=await cc(i,c,a,f),V=Pr(Z);if(a){let N=r.offset-a;if(Ir(V,A)!=33639248&&c!=N){let g=c;c=N,c>g&&(_+=c-g),Z=await cc(i,c,a,f),V=Pr(Z)}}let E=r.offset-c-(i.lastDiskOffset||0);if(a!=E&&E>=0&&(a=E,Z=await cc(i,c,a,f),V=Pr(Z)),c<0||c>=i.size)throw new Error(GB);let L=Gc(n,t,ZAe),v=Gc(n,t,CAe);for(let N=0;N<y;N++){let g=new Aq(i,o,n.options);if(Ir(V,A)!=33639248)throw new Error($Ae);rZe(g,V,A+6);let C=!!g.bitFlag.languageEncodingFlag,R=A+46,G=R+g.filenameLength,P=G+g.extraFieldLength,Y=lc(V,A+4),O=Y>>8==0,k=Y>>8==3,D=Z.subarray(R,G),w=lc(V,A+32),z=P+w,J=Z.subarray(P,z),ee=C,H=C,te=Ir(V,A+38),$=te&255,be={readOnly:!!($&1),hidden:!!($&2),system:!!($&4),directory:!!($&16),archive:!!($&32)},ye=Ir(V,A+42)+_,ce=Gc(n,t,VAe)||aY,Ze=ee?zAe:L||HAe,xe=H?zAe:v||HAe,Ge=ce(D,Ze);Ge===Mt&&(Ge=aY(D,Ze));let Ve=ce(J,xe);Ve===Mt&&(Ve=aY(J,xe)),Object.assign(g,{versionMadeBy:Y,msDosCompatible:O,compressedSize:0,uncompressedSize:0,commentLength:w,offset:ye,diskNumberStart:lc(V,A+34),internalFileAttributes:lc(V,A+36),externalFileAttributes:te,msdosAttributesRaw:$,msdosAttributes:be,rawFilename:D,filenameUTF8:ee,commentUTF8:H,rawExtraField:Z.subarray(G,P),rawComment:J,filename:Ge,comment:Ve}),S=Math.max(ye,S),sZe(g,g,V,A+6);let Ye=g.externalFileAttributes>>16&65535;g.unixMode===Mt&&(Ye&16877)!=0&&(g.unixMode=Ye);let ke=!!(g.unixMode&2048),it=!!(g.unixMode&1024),pt=!!(g.unixMode&512),Vt=g.unixMode!==Mt?(g.unixMode&73)!=0:k&&(Ye&73)!=0,Ue=g.unixMode!==Mt&&(g.unixMode&61440)==16384,St=(Ye&61440)==16384;Object.assign(g,{setuid:ke,setgid:it,sticky:pt,unixExternalUpper:Ye,internalFileAttribute:g.internalFileAttributes,externalFileAttribute:g.externalFileAttributes,executable:Vt,directory:Ue||St||O&&be.directory||Ge.endsWith("/")&&!g.uncompressedSize,zipCrypto:g.encrypted&&!g.extraFieldAES});let ht=new Vx(g);ht.getData=(Jt,jt)=>g.getData(Jt,ht,n.readRanges,jt),ht.arrayBuffer=async Jt=>{let jt=new TransformStream,[yt]=await Promise.all([new Response(jt.readable).arrayBuffer(),g.getData(jt,ht,n.readRanges,Jt)]);return yt},A=z;let{onprogress:ot}=t;if(ot)try{await ot(N+1,y,new Vx(g))}catch{}yield ht}let I=Gc(n,t,RAe),X=Gc(n,t,EAe);return I&&(n.prependedData=S>0?await cc(i,0,S):new Uint8Array),n.comment=u?await cc(i,d+22,u):new Uint8Array,X&&(n.appendedData=h<i.size?await cc(i,h,i.size-h):new Uint8Array),!0}async getEntries(t={}){let n=[];for await(let i of this.getEntriesGenerator(t))n.push(i);return n}async close(){}};var Aq=class{constructor(t,n,i){Object.assign(this,{reader:t,config:n,options:i})}async getData(t,n,i,o={}){let r=this,{reader:s,offset:a,diskNumberStart:c,extraFieldAES:d,extraFieldZip64:u,compressionMethod:h,config:p,bitFlag:b,signature:f,rawLastModDate:y,uncompressedSize:_,compressedSize:S}=r,{dataDescriptor:A}=b,Z=n.localDirectory={},V=await cc(s,a,30,c),E=Pr(V),L=Gc(r,o,_B),v=Gc(r,o,SB),I=Gc(r,o,AB);if(L=L&&L.length&&L,v=v&&v.length&&v,d&&d.originalCompressionMethod!=99)throw new Error(_q);if(h!=0&&h!=8&&h!=9&&!I)throw new Error(_q);if(Ir(E,0)!=67324752)throw new Error(eZe);rZe(Z,E,4);let{extraFieldLength:X,filenameLength:N,lastAccessDate:g,creationDate:C}=Z;Z.rawExtraField=X?await cc(s,a+30+N,X,c):new Uint8Array,sZe(r,Z,E,4,!0),Object.assign(n,{lastAccessDate:g,creationDate:C});let R=r.encrypted&&Z.encrypted&&!I,G=R&&!d;if(I||(n.zipCrypto=G),R){if(!G&&d.strength===Mt)throw new Error(iZe);if(!L&&!v)throw new Error(nZe)}let P=a+30+N+X,Y=S,O=s.readable;Object.assign(O,{diskNumberStart:c,offset:P,size:Y});let k=Gc(r,o,ZB),D=Gc(r,o,GAe),w=Gc(r,o,WAe),z=Gc(r,o,LAe);z&&(w=!0);let{onstart:J,onprogress:ee,onend:H}=o,te=h==9,$=Gc(r,o,VB);te&&($=!1);let be={options:{codecType:mB,password:L,rawPassword:v,zipCrypto:G,encryptionStrength:d&&d.strength,signed:Gc(r,o,vAe)&&!I,passwordVerification:G&&(A?y>>>8&255:f>>>24&255),outputSize:I?S:_,signature:f,compressed:h!=0&&!I,encrypted:r.encrypted&&!I,useWebWorkers:Gc(r,o,CB),useCompressionStream:$,transferStreams:Gc(r,o,RB),deflate64:te,checkPasswordOnly:D},config:p,streamOptions:{signal:k,size:Y,onstart:J,onprogress:ee,onend:H}};w&&await r0t({reader:s,fileEntry:n,offset:a,diskNumberStart:c,signature:f,compressedSize:S,uncompressedSize:_,dataOffset:P,dataDescriptor:A||Z.bitFlag.dataDescriptor,extraFieldZip64:u||Z.extraFieldZip64,readRanges:i});let ye;try{if(!z){D&&(t=new WritableStream),t=new xR(t),await n0(t,I?S:_),{writable:ye}=t;let{outputSize:ce}=await bB({readable:O,writable:ye},be);if(t.size+=ce,ce!=(I?S:_))throw new Error(pR)}}catch(ce){if(ce.outputSize!==Mt&&(t.size+=ce.outputSize),!D||ce.message!=gg)throw ce}finally{!Gc(r,o,EB)&&ye&&!ye.locked&&await ye.getWriter().close()}return D||z?Mt:t.getData?t.getData():ye}};function rZe(e,t,n){let i=e.rawBitFlag=lc(t,n+2),o=(i&1)==1,r=Ir(t,n+6);Object.assign(e,{encrypted:o,version:lc(t,n),bitFlag:{level:(i&6)>>1,dataDescriptor:(i&8)==8,languageEncodingFlag:(i&2048)==2048},rawLastModDate:r,lastModDate:a0t(r),filenameLength:lc(t,n+22),extraFieldLength:lc(t,n+24)})}function sZe(e,t,n,i,o){let{rawExtraField:r}=t,s=t.extraField=new Map,a=Pr(new Uint8Array(r)),c=0;try{for(;c<r.length;){let A=lc(a,c),Z=lc(a,c+2);s.set(A,{type:A,data:r.slice(c+4,c+4+Z)}),c+=4+Z}}catch{}let d=lc(n,i+4);Object.assign(t,{signature:Ir(n,i+10),compressedSize:Ir(n,i+14),uncompressedSize:Ir(n,i+18)});let u=s.get(1);u&&(t0t(u,t),t.extraFieldZip64=u);let h=s.get(28789);h&&(KAe(h,K6,J6,t,e),t.extraFieldUnicodePath=h);let p=s.get(25461);p&&(KAe(p,cY,j6,t,e),t.extraFieldUnicodeComment=p);let b=s.get(39169);b?(n0t(b,t,d),t.extraFieldAES=b):t.compressionMethod=d;let f=s.get(10);f&&(i0t(f,t),t.extraFieldNTFS=f);let y=s.get(30805);if(y)JAe(y,t,!1),t.extraFieldUnix=y;else{let A=s.get(30837);A&&(JAe(A,t,!0),t.extraFieldInfoZip=A)}let _=s.get(21589);_&&(o0t(_,t,o),t.extraFieldExtendedTimestamp=_);let S=s.get(6534);S&&(t.extraFieldUSDZ=S)}function t0t(e,t){t.zip64=!0;let n=Pr(e.data),i=$pt.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=e0t[a];t[s]=e[s]=c.getValue(n,r),r+=c.bytes}else if(e[s])throw new Error(tZe)}}function KAe(e,t,n,i,o){let r=Pr(e.data),s=new pg;s.append(o[n]);let a=Pr(new Uint8Array(4));a.setUint32(0,s.get(),!0);let c=Ir(r,1);Object.assign(e,{version:Ex(r,0),[t]:aY(e.data.subarray(5)),valid:!o.bitFlag.languageEncodingFlag&&c==Ir(a,0)}),e.valid&&(i[t]=e[t],i[t+qpt]=!0)}function n0t(e,t,n){let i=Pr(e.data),o=Ex(i,4);Object.assign(e,{vendorVersion:Ex(i,0),vendorId:Ex(i,2),strength:o,originalCompressionMethod:n,compressionMethod:lc(i,5)}),t.compressionMethod=e.compressionMethod}function i0t(e,t){let n=Pr(e.data),i=4,o;try{for(;i<e.data.length&&!o;){let r=lc(n,i),s=lc(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=Pr(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=Tq(s),u=Tq(a),h=Tq(c),p={lastModDate:d,lastAccessDate:u,creationDate:h};Object.assign(e,p),Object.assign(t,p)}}catch{}}function JAe(e,t,n){try{let i=Pr(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=jAe(a),d=Ex(i,o++),u=e.data.subarray(o,o+d);o+=d;let h=jAe(u),p=Mt;if(!n&&o+2<=e.data.length){let b=e.data;p=new DataView(b.buffer,b.byteOffset+o,2).getUint16(0,!0)}Object.assign(e,{version:r,uid:c,gid:h,unixMode:p}),c!==Mt&&(t.uid=c),h!==Mt&&(t.gid=h),p!==Mt&&(t.unixMode=p)}catch{}}function jAe(e){let t=new Uint8Array(4);return t.set(e,0),new DataView(t.buffer,t.byteOffset,4).getUint32(0,!0)}function o0t(e,t,n){let i=Pr(e.data),o=Ex(i,0),r=[],s=[];n?((o&1)==1&&(r.push(TR),s.push(xB)),(o&2)==2&&(r.push(dY),s.push(AAe)),(o&4)==4&&(r.push(uY),s.push(eq))):e.data.length>=5&&(r.push(TR),s.push(xB));let a=1;r.forEach((c,d)=>{if(e.data.length>=a+4){let u=Ir(i,a);t[c]=e[c]=new Date(u*1e3);let h=s[d];e[h]=u}a+=4})}async function r0t({reader:e,fileEntry:t,offset:n,diskNumberStart:i,signature:o,compressedSize:r,uncompressedSize:s,dataOffset:a,dataDescriptor:c,extraFieldZip64:d,readRanges:u}){let h=0;if(i)for(let f=0;f<i;f++){let y=e.readers[f];h+=y.size}let p=0;if(c&&(d?p=20:p=12),p){let f=await cc(e,a+r,p+4,i);if(Ir(Pr(f),0)==134695760){let _=Ir(Pr(f),4),S,A;d?(S=AR(Pr(f),8),A=AR(Pr(f),16)):(S=Ir(Pr(f),8),A=Ir(Pr(f),12)),(t.encrypted&&!t.zipCrypto||_==o)&&S==r&&A==s&&(p+=4)}}let b={start:h+n,end:h+a+r+p,fileEntry:t};for(let f of u)if(f.fileEntry!=t&&b.start>=f.start&&b.start<f.end){let y=new Error(oZe);throw y.overlappingEntry=f.fileEntry,y}u.push(b)}async function s0t(e,t,n,i,o){let r=new Uint8Array(4),s=Pr(r);c0t(s,0,t);let a=i+o;return await c(i)||await c(Math.min(a,n));async function c(d){let u=n-d,h=await cc(e,u,d);for(let p=h.length-i;p>=0;p--)if(h[p]==r[0]&&h[p+1]==r[1]&&h[p+2]==r[2]&&h[p+3]==r[3])return{offset:u+p,buffer:h.slice(p,p+i).buffer}}}function Gc(e,t,n){return t[n]===Mt?e.options[n]:t[n]}function a0t(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 Tq(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function Ex(e,t){return e.getUint8(t)}function lc(e,t){return e.getUint16(t,!0)}function Ir(e,t){return e.getUint32(t,!0)}function AR(e,t){return Number(e.getBigUint64(t,!0))}function c0t(e,t,n){e.setUint32(t,n,!0)}function Pr(e){return new DataView(e.buffer)}var gki=x(T(),1);var fki=x(T(),1);var hZe="File already exists",fZe="Zip file comment exceeds 64KB",pZe="File entry comment exceeds 64KB",bZe="File entry name exceeds 64KB",kq="Version exceeds 65535",gZe="The strength must equal 1, 2, or 3",yZe="Extra field type exceeds 65535",xZe="Extra field data exceeds 64KB",Uq="Zip64 is not supported (set the 'zip64' option to 'true')",TZe="Undefined uncompressed size",_Ze="Zip file not empty",b0t="Invalid uid (must be integer 0..2^32-1)",g0t="Invalid gid (must be integer 0..2^32-1)",y0t="Invalid UNIX mode (must be integer 0..65535)",x0t="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",T0t="Invalid msdosAttributesRaw (must be integer 0..255)",_0t="Invalid msdosAttributes (must be an object with boolean flags)",lZe=new Uint8Array([7,0,2,0,65,69,3,0,0]),SZe="infozip",AZe="unix",wq=0,dZe=[],SY=class{constructor(t,n={}){t=new xR(t);let i=t.availableSize!==Mt&&t.availableSize>0&&t.availableSize!==XS&&t.maxSize!==Mt&&t.maxSize>0&&t.maxSize!==XS;Object.assign(this,{writer:t,addSplitZipSignature:i,options:n,config:HN(),files:new Map,filenames:new Set,offset:n[yq]===Mt?t.size||t.writable.size||0:n[yq],pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async prependZip(t){if(this.filenames.size)throw new Error(_Ze);t=new YS(t);let n=new wS(t.readable),i=await n.getEntries();await n.close(),await t.readable.pipeTo(this.writer.writable,{preventClose:!0,preventAbort:!0}),this.writer.size=this.offset=t.size,this.filenames=new Set(i.map(o=>o.filename)),this.files=new Map(i.map(o=>{let{version:r,compressionMethod:s,lastModDate:a,lastAccessDate:c,creationDate:d,rawFilename:u,bitFlag:h,encrypted:p,uncompressedSize:b,compressedSize:f,diskOffset:y,diskNumber:_,zip64:S}=o,{rawExtraFieldZip64:A,rawExtraFieldAES:Z,rawExtraFieldExtendedTimestamp:V,rawExtraFieldNTFS:E,rawExtraFieldUnix:L,rawExtraField:v}=o,{level:I,languageEncodingFlag:X,dataDescriptor:N}=h;A=A||new Uint8Array,Z=Z||new Uint8Array,V=V||new Uint8Array,E=E||new Uint8Array,L=o.rawExtraFieldUnix||new Uint8Array,v=v||new Uint8Array;let g=Fi(A,Z,V,E,L,v),C=S&&b>4294967295,R=S&&f>4294967295,{headerArray:G,headerView:P}=ZZe({version:r,bitFlag:CZe(I,X,N,p,s),compressionMethod:s,uncompressedSize:b,compressedSize:f,lastModDate:a,rawFilename:u,zip64CompressedSize:R,zip64UncompressedSize:C,extraFieldLength:g});return Object.assign(o,{zip64UncompressedSize:C,zip64CompressedSize:R,zip64Offset:S&&this.offset-y>4294967295,zip64DiskNumberStart:S&&_>65535,rawExtraFieldZip64:A,rawExtraFieldAES:Z,rawExtraFieldExtendedTimestamp:V,rawExtraFieldNTFS:E,rawExtraFieldUnix:L,rawExtraField:v,extendedTimestamp:V.length>0||E.length>0,extraFieldExtendedTimestampFlag:1+(c?2:0)+(d?4:0),headerArray:G,headerView:P}),[o.filename,o]}))}async add(t="",n,i={}){let o=this,{pendingAddFileCalls:r,config:s}=o;wq<s.maxWorkers?wq++:await new Promise(c=>dZe.push(c));let a;try{if(t=t.trim(),o.filenames.has(t))throw new Error(hZe);return o.filenames.add(t),a=S0t(o,t,n,i),r.add(a),await a}catch(c){throw o.filenames.delete(t),c}finally{r.delete(a);let c=dZe.shift();c?c():wq--}}remove(t){let{filenames:n,files:i}=this;if(typeof t=="string"&&(t=i.get(t)),t&&t.filename!==Mt){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 W0t(i,t,n),pi(i,n,EB)||await s.getWriter().close(),r.getData?r.getData():s}};async function S0t(e,t,n,i){t=t.trim();let o=pi(e,i,rq),r=pi(e,i,cq,o?20:768),s=pi(e,i,dq),a=pi(e,i,"uid"),c=pi(e,i,"gid"),d=pi(e,i,fq),u=pi(e,i,OAe),h=pi(e,i,pq),p=pi(e,i,bq),b=pi(e,i,gq);if(a!==Mt&&(a<0||a>4294967295))throw new Error(b0t);if(c!==Mt&&(c<0||c>4294967295))throw new Error(g0t);if(d!==Mt&&(d<0||d>65535))throw new Error(y0t);if(u!==Mt&&u!==SZe&&u!==AZe)throw new Error(x0t);let f=pi(e,i,iq),y=pi(e,i,oq),_=a!==Mt||c!==Mt||d!==Mt||u,S=f!==Mt||y!==Mt;if(_?(o=!1,r=r&65535|768):S&&(o=!0,r=r&255),f!==Mt&&(f<0||f>255))throw new Error(T0t);if(y&&typeof y!==DSe)throw new Error(_0t);if(r>65535)throw new Error(kq);let A=pi(e,i,nq,0);!i[mY]&&t.endsWith("/")&&(i[mY]=!0);let Z=pi(e,i,mY);Z?(t.endsWith("/")||(t+="/"),A===0&&(A=16,o||(A|=16877<<16))):!o&&A===0&&(s?A=493<<16:A=420<<16);let V;o||(V=A>>16&65535,d=d===Mt?V:d&65535,h?d|=2048:h=!!(d&2048),p?d|=1024:p=!!(d&1024),b?d|=512:b=!!(d&512),Z&&(d|=16384),A=(d&65535)<<16|A&255),{msdosAttributesRaw:f,msdosAttributes:y}=R0t(f,y),S&&(A=A&4294967295|f&255);let E=pi(e,i,DAe,hR),L=E(t);if(L===Mt&&(L=hR(t)),Fi(L)>65535)throw new Error(bZe);let v=i[cY]||"",I=E(v);if(I===Mt&&(I=hR(v)),Fi(I)>65535)throw new Error(pZe);let X=pi(e,i,aq,20);if(X>65535)throw new Error(kq);let N=pi(e,i,TR,new Date),g=pi(e,i,dY),C=pi(e,i,uY),R=pi(e,i,tq,0),G=pi(e,i,AB),P,Y;G||(P=pi(e,i,_B),Y=pi(e,i,SB));let O=pi(e,i,FAe,3),k=pi(e,i,lq),D=pi(e,i,IAe,!0),w=pi(e,i,PAe,!0),z=pi(e,i,CB),J=pi(e,i,RB,!0),ee=pi(e,i,NAe),H=pi(e,i,YAe),te=pi(e,i,wAe,!1),$=pi(e,i,ZB),be=pi(e,i,MAe,!0),ye=pi(e,i,uq),ce=pi(e,i,XAe),Ze=pi(e,i,VB),xe=pi(e,i,kAe);ee&&xe===Mt&&(xe=!1),(xe===Mt||k)&&(xe=!0),ce!==Mt&&ce!=6&&(Ze=!1),!Ze&&e.config.CompressionStream===Mt&&e.config.CompressionStreamZlib===Mt&&(ce=0);let Ge=pi(e,i,TB);if(!k&&(P!==Mt||Y!==Mt)&&!(O>=1&&O<=3))throw new Error(gZe);let Ve=new Uint8Array,Ye=i[hq];if(Ye){let st=0,Nn=0;Ye.forEach(Zi=>st+=4+Fi(Zi)),Ve=new Uint8Array(st),Ye.forEach((Zi,Ci)=>{if(Ci>65535)throw new Error(yZe);if(Fi(Zi)>65535)throw new Error(xZe);Zr(Ve,new Uint16Array([Ci]),Nn),Zr(Ve,new Uint16Array([Fi(Zi)]),Nn+2),Zr(Ve,Zi,Nn+4),Nn+=4+Fi(Zi)})}let ke=0,it=0,pt=0;if(G&&(pt=i[lY],pt===Mt))throw new Error(TZe);let Vt=Ge===!0;n&&(n=new YS(n),await n0(n),G?(i.uncompressedSize=pt,ke=mZe(pt)):n.size===Mt?(xe=!0,(Ge||Ge===Mt)&&(Ge=!0,pt=ke=4294967296)):(i.uncompressedSize=pt=n.size,ke=mZe(pt)));let{diskOffset:Ue,diskNumber:St}=e.writer,ht=Vt||pt>4294967295,ot=Vt||ke>4294967295;if(ht||ot){if(Ge===!1)throw new Error(Uq);Ge=!0}Ge=Ge||!1;let Jt=pi(e,i,sq);i=Object.assign({},i,{rawFilename:L,rawComment:I,version:X,versionMadeBy:r,lastModDate:N,lastAccessDate:g,creationDate:C,rawExtraField:Ve,zip64:Ge,zip64UncompressedSize:ht,zip64CompressedSize:ot,password:P,rawPassword:Y,level:ce,useWebWorkers:z,transferStreams:J,encryptionStrength:O,extendedTimestamp:D,zipCrypto:k,bufferedWrite:ee,createTempStream:H,keepOrder:w,useUnicodeFileNames:be,dataDescriptor:xe,dataDescriptorSignature:te,signal:$,msDosCompatible:o,internalFileAttribute:R,internalFileAttributes:R,externalFileAttribute:A,externalFileAttributes:A,useCompressionStream:Ze,passThrough:G,encrypted:!!(P&&Fi(P)||Y&&Fi(Y))||G&&Jt,signature:i[mq],compressionMethod:ye,uncompressedSize:pt,offset:e.offset-Ue,diskNumberStart:St,uid:a,gid:c,setuid:h,setgid:p,sticky:b,unixMode:d,msdosAttributesRaw:f,msdosAttributes:y,unixExternalUpper:V});let jt=C0t(i),yt=E0t(i),Gt=Fi(jt.localHeaderArray,yt.dataDescriptorArray);it=Gt+ke,e.options[xq]&&(it+=it+64),e.pendingEntriesSize+=it;let ln;try{ln=await A0t(e,t,n,{headerInfo:jt,dataDescriptorInfo:yt,metadataSize:Gt},i)}finally{e.pendingEntriesSize-=it}return Object.assign(ln,{name:t,comment:v,extraField:Ye}),new Vx(ln)}async function A0t(e,t,n,i,o){let{files:r,writer:s}=e,{keepOrder:a,dataDescriptor:c,signal:d}=o,{headerInfo:u}=i,h=e.options[xq],p=Array.from(r.values()).pop(),b={},f,y,_,S,A,Z;r.set(t,b);try{let v;a&&(v=p&&p.lock,V()),(o.bufferedWrite||!a||e.writerLocked||e.bufferedWrites||!c)&&!h?(o.createTempStream?Z=await o.createTempStream():Z=new TransformStream(Mt,Mt,{highWaterMark:XS}),Z.size=0,f=!0,e.bufferedWrites++,await n0(s)):(Z=s,await E()),await n0(Z);let{writable:I,diskOffset:X}=s;if(e.addSplitZipSignature){delete e.addSplitZipSignature;let R=new Uint8Array(4),G=Ma(R);co(G,0,134695760),await yg(s,R),e.offset+=4}h&&V0t(i,e.offset-X);let{localHeaderView:N,localHeaderArray:g}=u;f||(await v,await L(I));let{diskNumber:C}=s;return b.diskNumberStart=C,f||(A=!0,await yg(Z,g)),b=await Z0t(n,Z,b,i,e.config,o),f||(A=!1),r.set(t,b),b.filename=t,f?(await Promise.all([Z.writable.getWriter().close(),v]),await E(),S=!0,b.diskNumberStart=s.diskNumber,b.offset=e.offset-s.diskOffset,L0t(b,N,o),await L(I),await yg(s,g),await Z.readable.pipeTo(I,{preventClose:!0,preventAbort:!0,signal:d}),s.size+=Z.size,S=!1):b.offset=e.offset-X,e.offset+=b.size,b}catch(v){if(S||A){if(e.hasCorruptedEntries=!0,v)try{v.corruptedEntry=!0}catch{}f?e.offset+=Z.size:e.offset=Z.size}throw r.delete(t),v}finally{f&&e.bufferedWrites--,_&&_(),y&&y()}function V(){b.lock=new Promise(v=>_=v)}async function E(){e.writerLocked=!0;let{lockWriter:v}=e;e.lockWriter=new Promise(I=>y=()=>{e.writerLocked=!1,I()}),await v}async function L(v){Fi(u.localHeaderArray)>s.availableSize&&(s.availableSize=0,await yg(v,new Uint8Array))}}async function Z0t(e,t,{diskNumberStart:n,lock:i},o,r,s){let{headerInfo:a,dataDescriptorInfo:c,metadataSize:d}=o,{headerArray:u,headerView:h,lastModDate:p,rawLastModDate:b,encrypted:f,compressed:y,version:_,compressionMethod:S,rawExtraFieldZip64:A,localExtraFieldZip64Length:Z,rawExtraFieldExtendedTimestamp:V,extraFieldExtendedTimestampFlag:E,rawExtraFieldNTFS:L,rawExtraFieldUnix:v,rawExtraFieldAES:I}=a,{dataDescriptorArray:X}=c,{rawFilename:N,lastAccessDate:g,creationDate:C,password:R,rawPassword:G,level:P,zip64:Y,zip64UncompressedSize:O,zip64CompressedSize:k,zipCrypto:D,dataDescriptor:w,directory:z,executable:J,versionMadeBy:ee,rawComment:H,rawExtraField:te,useWebWorkers:$,transferStreams:be,onstart:ye,onprogress:ce,onend:Ze,signal:xe,encryptionStrength:Ge,extendedTimestamp:Ve,msDosCompatible:Ye,internalFileAttributes:ke,externalFileAttributes:it,uid:pt,gid:Vt,unixMode:Ue,setuid:St,setgid:ht,sticky:ot,unixExternalUpper:Jt,msdosAttributesRaw:jt,msdosAttributes:yt,useCompressionStream:Gt,passThrough:ln}=s,st={lock:i,versionMadeBy:ee,zip64:Y,directory:!!z,executable:!!J,filenameUTF8:!0,rawFilename:N,commentUTF8:!0,rawComment:H,rawExtraFieldZip64:A,localExtraFieldZip64Length:Z,rawExtraFieldExtendedTimestamp:V,rawExtraFieldNTFS:L,rawExtraFieldUnix:v,rawExtraFieldAES:I,rawExtraField:te,extendedTimestamp:Ve,msDosCompatible:Ye,internalFileAttributes:ke,externalFileAttributes:it,diskNumberStart:n,uid:pt,gid:Vt,unixMode:Ue,setuid:St,setgid:ht,sticky:ot,unixExternalUpper:Jt,msdosAttributesRaw:jt,msdosAttributes:yt},{signature:Nn,uncompressedSize:Zi}=s,Ci=0;ln||(Zi=0);let{writable:Dt}=t;if(e){e.chunkSize=eB(r);let Ro=e.readable,ki=e.size,ri={options:{codecType:uB,level:P,rawPassword:G,password:R,encryptionStrength:Ge,zipCrypto:f&&D,passwordVerification:f&&D&&b>>8&255,signed:!ln,compressed:y&&!ln,encrypted:f&&!ln,useWebWorkers:$,useCompressionStream:Gt,transferStreams:be},config:r,streamOptions:{signal:xe,size:ki,onstart:ye,onprogress:ce,onend:Ze}};try{let kn=await bB({readable:Ro,writable:Dt},ri);Ci=kn.outputSize,t.size+=Ci,ln||(Zi=kn.inputSize,Nn=kn.signature)}catch(kn){throw kn.outputSize!==Mt&&(t.size+=kn.outputSize),kn}}return G0t({signature:Nn,compressedSize:Ci,uncompressedSize:Zi,headerInfo:a,dataDescriptorInfo:c},s),w&&await yg(t,X),Object.assign(st,{uncompressedSize:Zi,compressedSize:Ci,lastModDate:p,rawLastModDate:b,creationDate:C,lastAccessDate:g,encrypted:f,zipCrypto:D,size:d+Ci,compressionMethod:S,version:_,headerArray:u,headerView:h,signature:Nn,extraFieldExtendedTimestampFlag:E,zip64UncompressedSize:O,zip64CompressedSize:k}),st}function C0t(e){let{rawFilename:t,lastModDate:n,lastAccessDate:i,creationDate:o,level:r,zip64:s,zipCrypto:a,useUnicodeFileNames:c,dataDescriptor:d,directory:u,rawExtraField:h,encryptionStrength:p,extendedTimestamp:b,passThrough:f,encrypted:y,zip64UncompressedSize:_,zip64CompressedSize:S,uncompressedSize:A}=e,{version:Z,compressionMethod:V}=e,E=!u&&(r>0||r===Mt&&V!==0),L,v=f||!E,I=s&&(e.bufferedWrite||!_&&!S||v);if(s){let J=4;_&&(J+=8),S&&(J+=8),L=new Uint8Array(J);let ee=Ma(L);if(ji(ee,0,1),ji(ee,2,Fi(L)-4),I){let H=Ma(L),te=4;_&&(dc(H,te,BigInt(A)),te+=8),S&&v&&(dc(H,te,BigInt(A)),te+=8),te==4&&(L=new Uint8Array)}}else L=new Uint8Array;let X;if(y&&!a){X=new Uint8Array(Fi(lZe)+2);let J=Ma(X);ji(J,0,39169),Zr(X,lZe,2),ZR(J,8,p)}else X=new Uint8Array;let N,g,C;if(b){g=new Uint8Array(9+(i?4:0)+(o?4:0));let J=Ma(g);ji(J,0,21589),ji(J,2,Fi(g)-4),C=1+(i?2:0)+(o?4:0),ZR(J,4,C);let ee=5;co(J,ee,Math.floor(n.getTime()/1e3)),ee+=4,i&&(co(J,ee,Math.floor(i.getTime()/1e3)),ee+=4),o&&co(J,ee,Math.floor(o.getTime()/1e3));try{N=new Uint8Array(36);let H=Ma(N),te=Mq(n);ji(H,0,10),ji(H,2,32),ji(H,8,1),ji(H,10,24),dc(H,12,te),dc(H,20,Mq(i)||te),dc(H,28,Mq(o)||te)}catch{N=new Uint8Array}}else N=g=new Uint8Array;let R;try{let{uid:J,gid:ee,unixMode:H,setuid:te,setgid:$,sticky:be,unixExtraFieldType:ye}=e;if(ye&&(J!==Mt||ee!==Mt||H!==Mt)){let ce=uZe(J),Ze=uZe(ee),xe=new Uint8Array;if(ye==AZe&&H!==Mt){let ke=H&65535;te&&(ke|=2048),$&&(ke|=1024),be&&(ke|=512),xe=new Uint8Array(2),new DataView(xe.buffer).setUint16(0,ke,!0)}let Ge=3+ce.length+Ze.length+xe.length;R=new Uint8Array(4+Ge);let Ve=Ma(R);ji(Ve,0,ye==SZe?30837:30805),ji(Ve,2,Ge),ZR(Ve,4,1),ZR(Ve,5,ce.length);let Ye=6;Zr(R,ce,Ye),Ye+=ce.length,ZR(Ve,Ye,Ze.length),Ye++,Zr(R,Ze,Ye),Ye+=Ze.length,Zr(R,xe,Ye)}else R=new Uint8Array}catch{R=new Uint8Array}V===Mt&&(V=E?8:0),s&&(Z=Z>45?Z:45),y&&!a&&(Z=Z>51?Z:51,X[9]=V,V=99);let G=I?Fi(L):0,P=G+Fi(X,g,N,R,h),{headerArray:Y,headerView:O,rawLastModDate:k}=ZZe({version:Z,bitFlag:CZe(r,c,d,y,V),compressionMethod:V,uncompressedSize:A,lastModDate:n<I6?I6:n>F6?F6:n,rawFilename:t,zip64CompressedSize:S,zip64UncompressedSize:_,extraFieldLength:P}),D=30,w=new Uint8Array(D+Fi(t)+P),z=Ma(w);return co(z,0,67324752),Zr(w,Y,4),Zr(w,t,D),D+=Fi(t),I&&Zr(w,L,D),D+=G,Zr(w,X,D),D+=Fi(X),Zr(w,g,D),D+=Fi(g),Zr(w,N,D),D+=Fi(N),Zr(w,R,D),D+=Fi(R),Zr(w,h,D),d&&(co(z,18,0),co(z,22,0)),{localHeaderArray:w,localHeaderView:z,headerArray:Y,headerView:O,lastModDate:n,rawLastModDate:k,encrypted:y,compressed:E,version:Z,compressionMethod:V,extraFieldExtendedTimestampFlag:C,rawExtraFieldZip64:new Uint8Array,localExtraFieldZip64Length:G,rawExtraFieldExtendedTimestamp:g,rawExtraFieldNTFS:N,rawExtraFieldUnix:R,rawExtraFieldAES:X,extraFieldLength:P}}function V0t(e,t){let{headerInfo:n}=e,{localHeaderArray:i,extraFieldLength:o}=n,r=Ma(i),s=64-(t+Fi(i))%64;s<4&&(s+=64);let a=new Uint8Array(s),c=Ma(a);ji(c,0,6534),ji(c,2,s-2);let d=i;n.localHeaderArray=i=new Uint8Array(Fi(d)+s),Zr(i,d),Zr(i,a,Fi(d)),r=Ma(i),ji(r,28,o+s),e.metadataSize+=s}function uZe(e){if(e===Mt)return new Uint8Array;{let t=new Uint8Array(4);Ma(t).setUint32(0,e,!0);let i=4;for(;i>1&&t[i-1]===0;)i--;return t.subarray(0,i)}}function R0t(e,t){if(e!==Mt)e=e&255;else if(t!==Mt){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===Mt&&(t={readOnly:!!(e&1),hidden:!!(e&2),system:!!(e&4),directory:!!(e&16),archive:!!(e&32)}),{msdosAttributesRaw:e,msdosAttributes:t}}function E0t({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=Ma(i),n&&(r=4,co(o,0,134695760))),{dataDescriptorArray:i,dataDescriptorView:o,dataDescriptorOffset:r}}function G0t({signature:e,compressedSize:t,uncompressedSize:n,headerInfo:i,dataDescriptorInfo:o},{zip64:r,zipCrypto:s,dataDescriptor:a}){let{headerView:c,encrypted:d}=i,{dataDescriptorView:u,dataDescriptorOffset:h}=o;(!d||s)&&e!==Mt&&(co(c,10,e),a&&co(u,h,e)),r?a&&(dc(u,h+4,BigInt(t)),dc(u,h+12,BigInt(n))):(co(c,14,t),co(c,18,n),a&&(co(u,h+4,t),co(u,h+8,n)))}function L0t({rawFilename:e,encrypted:t,zip64:n,localExtraFieldZip64Length:i,signature:o,compressedSize:r,uncompressedSize:s,zip64UncompressedSize:a,zip64CompressedSize:c},d,{dataDescriptor:u}){if(u||(t||co(d,14,o),c||co(d,18,r),a||co(d,22,s)),n&&i){let h=30+Fi(e)+4;a&&(dc(d,h,BigInt(s)),h+=8),c&&(dc(d,h,BigInt(r)),h+=8)}}async function W0t(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:L,rawComment:v,rawExtraFieldNTFS:I,rawExtraFieldUnix:X,rawExtraField:N,extendedTimestamp:g,extraFieldExtendedTimestampFlag:C,lastModDate:R,zip64UncompressedSize:G,zip64CompressedSize:P,uncompressedSize:Y,compressedSize:O}=V,k=V.offset>4294967295,D=V.diskNumberStart>65535,w;if(k||D||G||P){let J=4;G&&(J+=8),P&&(J+=8),k&&(J+=8),D&&(J+=4),w=new Uint8Array(J);let ee=Ma(w);ji(ee,0,1),ji(ee,2,J-4);let H=4;G&&(dc(ee,H,BigInt(Y)),H+=8),P&&(dc(ee,H,BigInt(O)),H+=8),k&&(dc(ee,H,BigInt(V.offset)),H+=8),D&&co(ee,H,V.diskNumberStart)}else w=new Uint8Array;V.rawExtraFieldZip64=w,V.zip64Offset=k,V.zip64DiskNumberStart=D;let z;if(g){z=new Uint8Array(9);let J=Ma(z);ji(J,0,21589),ji(J,2,5),ZR(J,4,C),co(J,5,Math.floor(R.getTime()/1e3))}else z=new Uint8Array;V.rawExtraFieldExtendedTimestamp=z,c+=46+Fi(E,v,w,L,I,X,z,N)}let h=new Uint8Array(c),p=Ma(h);await n0(o);let b=0;for(let[V,E]of Array.from(i.values()).entries()){let{offset:L,rawFilename:v,rawExtraFieldZip64:I,rawExtraFieldAES:X,rawExtraFieldExtendedTimestamp:N,rawExtraFieldNTFS:g,rawExtraFieldUnix:C,rawExtraField:R,rawComment:G,versionMadeBy:P,headerArray:Y,headerView:O,zip64UncompressedSize:k,zip64CompressedSize:D,zip64DiskNumberStart:w,zip64Offset:z,internalFileAttributes:J,externalFileAttributes:ee,diskNumberStart:H,uncompressedSize:te,compressedSize:$}=E,be=Fi(I,X,N,g,C,R);co(p,a,33639248),ji(p,a+4,P),k||co(O,18,te),D||co(O,14,$),Zr(h,Y,a+6);let ye=a+30;if(ji(p,ye,be),ye+=2,ji(p,ye,Fi(G)),ye+=2,ji(p,ye,w?65535:H),ye+=2,ji(p,ye,J),ye+=2,ee&&co(p,ye,ee),ye+=4,co(p,ye,z?4294967295:L),ye+=4,Zr(h,v,ye),ye+=Fi(v),Zr(h,I,ye),ye+=Fi(I),Zr(h,X,ye),ye+=Fi(X),Zr(h,N,ye),ye+=Fi(N),Zr(h,g,ye),ye+=Fi(g),Zr(h,C,ye),ye+=Fi(C),Zr(h,R,ye),ye+=Fi(R),Zr(h,G,ye),ye+=Fi(G),a-b>o.availableSize&&(o.availableSize=0,await yg(o,h.slice(b,a)),b=a),a=ye,n.onprogress)try{await n.onprogress(V+1,i.size,new Vx(E))}catch{}}await yg(o,b?h.slice(b):h);let f=o.diskNumber,{availableSize:y}=o;y<22&&f++;let _=pi(e,n,TB);if(d>4294967295||c>4294967295||u>65535||f>65535){if(_===!1)throw new Error(Uq);_=!0}let S=new Uint8Array(_?98:22),A=Ma(S);a=0,_&&(co(A,0,101075792),dc(A,4,BigInt(44)),ji(A,12,45),ji(A,14,45),co(A,16,f),co(A,20,s),dc(A,24,BigInt(u)),dc(A,32,BigInt(u)),dc(A,40,BigInt(c)),dc(A,48,BigInt(d)),co(A,56,117853008),dc(A,64,BigInt(d)+BigInt(c)),co(A,72,f+1),pi(e,n,UAe,!0)&&(f=65535,s=65535),u=65535,d=4294967295,c=4294967295,a+=76),co(A,a,101010256),ji(A,a+4,f),ji(A,a+6,s),ji(A,a+8,u),ji(A,a+10,u),co(A,a+12,c),co(A,a+16,d);let Z=Fi(t);if(Z)if(Z<=65535)ji(A,a+20,Z);else throw new Error(fZe);await yg(o,S),Z&&await yg(o,t)}async function yg(e,t){let{writable:n}=e,i=n.getWriter();try{await i.ready,e.size+=Fi(t),await i.write(t)}finally{i.releaseLock()}}function Mq(e){if(e)return(BigInt(e.getTime())+BigInt(116444736e5))*BigInt(1e4)}function pi(e,t,n,i){let o=t[n]===Mt?e.options[n]:t[n];return o===Mt?i:o}function mZe(e){return e+5*(Math.floor(e/16383)+1)}function ZR(e,t,n){e.setUint8(t,n)}function ji(e,t,n){e.setUint16(t,n,!0)}function co(e,t,n){e.setUint32(t,n,!0)}function dc(e,t,n){e.setBigUint64(t,n,!0)}function Zr(e,t,n){e.set(t,n)}function Ma(e){return new DataView(e.buffer)}function Fi(...e){let t=0;return e.forEach(n=>n&&(t+=n.length)),t}function ZZe({version:e,bitFlag:t,compressionMethod:n,uncompressedSize:i,compressedSize:o,lastModDate:r,rawFilename:s,zip64CompressedSize:a,zip64UncompressedSize:c,extraFieldLength:d}){let u=new Uint8Array(26),h=Ma(u);ji(h,0,e),ji(h,2,t),ji(h,4,n);let p=new Uint32Array(1),b=Ma(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 co(h,6,f),(a||o!==Mt)&&co(h,14,a?4294967295:o),(c||i!==Mt)&&co(h,18,c?4294967295:i),ji(h,22,Fi(s)),ji(h,24,d),{headerArray:u,headerView:h,rawLastModDate:f}}function CZe(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 Tki=x(T(),1);var v0t={};try{Qp({baseURI:v0t.url})}catch{}var $ki=x(T(),1);var Nki=x(T(),1),Yu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function VZe(e){let t;e({wasmURI:()=>(t||(t="data:application/wasm;base64,"+(n=>{n=(s=>{let a=(s=(s+"").replace(/[^A-Za-z0-9+/=]/g,"")).length,c=[];for(let d=0;a>d;d+=4){let u=Yu.indexOf(s[d])<<18|Yu.indexOf(s[d+1])<<12|(63&Yu.indexOf(s[d+2]))<<6|63&Yu.indexOf(s[d+3]);c.push(u>>16&255),s[d+2]!=="="&&c.push(u>>8&255),s[d+3]!=="="&&c.push(255&u)}return new Uint8Array(c)})(n);let i=new Uint8Array(1024),o=0;for(let s=0;s<n.length;){let a=n[s++];if(128&a){let c=3+(127&a),d=n[s++]<<8|n[s++],u=o-d;r(o+c);for(let h=0;c>h;h++)i[o++]=i[u+h]}else{let c=a;r(o+c);for(let d=0;c>d&&s<n.length;d++)i[o++]=n[s++]}}return(s=>{let a="",c=s.length,d=0;for(;c>d+2;d+=3){let h=s[d]<<16|s[d+1]<<8|s[d+2];a+=Yu[h>>18&63]+Yu[h>>12&63]+Yu[h>>6&63]+Yu[63&h]}let u=c-d;if(u===1){let h=s[d]<<16;a+=Yu[h>>18&63]+Yu[h>>12&63]+"=="}else if(u===2){let h=s[d]<<16|s[d+1]<<8;a+=Yu[h>>18&63]+Yu[h>>12&63]+Yu[h>>6&63]+"="}return a})(new Uint8Array(i.buffer.slice(0,o)));function r(s){if(i.length<s){let a=2*i.length;for(;s>a;)a*=2;let c=new Uint8Array(a);c.set(i.subarray(0,o)),i=c}}})("FQBhc20BAAAAAUULYAF/AX9gAn9/AIEABYAACwIDf4IABwEBgAARAQaAAAuDAA6BABUDAGAAgAADgAANAQSBABUDAGAHgwAegAAfEgNCQQcABAEABAgIAAIABQIKAIAAB4EAAwEFgQAHAgICgQAHEAEDAAUGAAMDBQQJBAQJAQaAAAEeAAIEAwIEAgIBBAcDAwQFAXABDQ0FBgEBggKCAgYIgACYIkHQ1QQLB4oEHAZtZW1vcnkCAAxpbmZsYXRlOV9uZXcABw2GAA8HaW5pdAAIEYoAEAdfcmF3AAoQhgAUCXByb2Nlc3MAC4cARgZlbmQADhaGAA8QbGFzdF9jb25zdW1lZAARC4QAGYMAbYUANoMAbAEShQBYhwBrARSFAH+DABMHZ3ppcAAVD4UAFIUAfgEWhgBWgQB9AhgVhQAOjQB8AmRliQB8hQAOggB8AhoQiQAPggB8AhsRigATggB8AhwPhQAUhQB8AR2GAFaBAHwJHwRmcmVlAAIVhQAVjACDCgZtYWxsb2MAAQuCAFUKaWFsaXplAAAZX4AADxZkaXJlY3RfZnVuY3Rpb25fdGFibGUBgAAcG2Vtc2NyaXB0ZW5fc3RhY2tfcmVzdG9yZQAFHI4AGwJnZYAAbw51cnJlbnQABiJfX2N4YYAAWwRjcmVtgAASBl9leGNlcIIAXQZyZWZjb3WAACUtPQkSAQBBAQsMACEiDA8XGR4+NTg7CqHlAkECAAu/JwELfyMAQRBrIgokAAJAjwACEi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gQE8AYCvAEGAUc0CC22BAMcBBIAAAgEIgAAEgQEzgQJLARCAAA6DAAyBnqyAqmuEACSBB3OBAE8BCIAACIEAGIUADIEIt4MADAEggQCUgDKEgQBrAYCBCC8BBIMADIA/SAoBABAMAEGRIQv/gCUfgMDAgIKxBQgJCQoKgEk3gAABAQ2AAAEBDoAAAQEPgAABARCEAAEBEYQAAQEShAABAROEAAEBFIwAAQEVjAABARaMAAEBF4wAAQEYnAABARmcAAEBGpwAAQEbmwABARyBffsEBAQFBYHB1QEHgAABAQiEAAGAXSqCAAEBCowAAYAnsooAAYEBMJkAAYEBTJkAAYEBaLkAAYEBpLkAAYIDdYABzoUBvI0BqJ0BkLwBgAIbHLwAAQEdvAABgA9PgH05A9AqAQ==")),t)})}var Uki=x(T(),1);var wki=x(T(),1),Ns,CR,wu,AY;function Dq(e){if(Ns=e,{malloc:CR,free:wu,memory:AY}=Ns,typeof CR!="function"||typeof wu!="function"||!AY)throw Ns=CR=wu=AY=null,new Error("Invalid WASM module")}function RZe(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=CR(o),this.in=CR(r),this.inBufferSize=r,this._scratch=new Uint8Array(o),e?(this._process=Ns.deflate_process,this._last_consumed=Ns.deflate_last_consumed,this._end=Ns.deflate_end,this.streamHandle=Ns.deflate_new(),t==="gzip"?s=Ns.deflate_init_gzip(this.streamHandle,i):t==="deflate-raw"?s=Ns.deflate_init_raw(this.streamHandle,i):s=Ns.deflate_init(this.streamHandle,i)):t==="deflate64-raw"?(this._process=Ns.inflate9_process,this._last_consumed=Ns.inflate9_last_consumed,this._end=Ns.inflate9_end,this.streamHandle=Ns.inflate9_new(),s=Ns.inflate9_init_raw(this.streamHandle)):(this._process=Ns.inflate_process,this._last_consumed=Ns.inflate_last_consumed,this._end=Ns.inflate_end,this.streamHandle=Ns.inflate_new(),t==="deflate-raw"?s=Ns.inflate_init_raw(this.streamHandle):t==="gzip"?s=Ns.inflate_init_gzip(this.streamHandle):s=Ns.inflate_init(this.streamHandle)),s!==0)throw new Error("init failed:"+s)},transform(s,a){try{let c=s,d=new Uint8Array(AY.buffer),u=this._process,h=this._last_consumed,p=this.out,b=this._scratch,f=0;for(;f<c.length;){let y=Math.min(c.length-f,32768);(!this.in||this.inBufferSize<y)&&(this.in&&wu&&wu(this.in),this.in=CR(y),this.inBufferSize=y),d.set(c.subarray(f,f+y),this.in);let _=u(this.streamHandle,this.in,y,p,o,0),S=_&16777215;if(S&&(b.set(d.subarray(p,p+S),0),a.enqueue(b.slice(0,S))),!e){let Z=_>>24&255,V=Z&128?Z-256:Z;if(V<0)throw new Error("process error:"+V)}let A=h(this.streamHandle);if(A===0)break;f+=A}}catch(c){this._end&&this.streamHandle&&this._end(this.streamHandle),this.in&&wu&&wu(this.in),this.out&&wu&&wu(this.out),a.error(c)}},flush(s){try{let a=new Uint8Array(AY.buffer),c=this._process,d=this.out,u=this._scratch;for(;;){let h=c(this.streamHandle,0,0,d,o,4),p=h&16777215,b=h>>24&255;if(!e){let f=b&128?b-256:b;if(f<0)throw new Error("process error:"+f)}if(p&&(u.set(a.subarray(d,d+p),0),s.enqueue(u.slice(0,p))),b===1||p===0)break}}catch(a){s.error(a)}finally{if(this._end&&this.streamHandle){let a=this._end(this.streamHandle);a!==0&&s.error(new Error("end error:"+a))}this.in&&wu&&wu(this.in),this.out&&wu&&wu(this.out)}}})}var ZY=class{constructor(t="deflate",n){return RZe(!0,t,n)}},CY=class{constructor(t="deflate",n){return RZe(!1,t,n)}};var EZe=!1;async function GZe(e,{baseURI:t}){if(!EZe){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=F0t(e);else throw r}let o=await WebAssembly.instantiate(n);Dq(o.instance.exports),EZe=!0}}function F0t(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 Oq;VZe(Qp);gAe({initModule:e=>{if(!Oq){let{wasmURI:t}=e;typeof t==Nu&&(t=t()),Oq=GZe(t,e)}return Oq}});Qp({CompressionStreamZlib:ZY,DecompressionStreamZlib:CY});var rUi=x(T(),1);function I0t(e){return typeof e=="string"&&(e=document.getElementById(e)),e}var In=I0t;var aUi=x(T(),1);function P0t(e,t){this.position=e,this.headingPitchRange=t}var VY=P0t;var uUi=x(T(),1);function OB(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=[]}OB.prototype.addPlaylistEntry=function(e){this.playlist.push(e)};OB.prototype.play=function(e,t){this.tourStart.raiseEvent();let n=this;WZe.call(this,e,t,function(i){n.playlistIndex=0,i||LZe(n._activeEntries),n.tourEnd.raiseEvent(i)})};OB.prototype.stop=function(){LZe(this._activeEntries)};function LZe(e){for(let t=e.pop();t!==void 0;t=e.pop())t.stop()}function WZe(e,t,n){let i=this.playlist[this.playlistIndex];if(i){let o=X0t.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 X0t(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++,WZe.call(this,e,t,n)}}var RY=OB;var EUi=x(T(),1);var SUi=x(T(),1);var xUi=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}}}}),EY=function(){return performance.now()},N0t=(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=EY()),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})(),VR={Linear:function(e,t){var n=e.length-1,i=n*t,o=Math.floor(i),r=VR.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=VR.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=VR.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=VR.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}}},vZe=(function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e})(),Bq=new N0t,FZe=(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=VR.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=vZe.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=Bq,Bq.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=EY()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var i in this._valuesStartRepeat)this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=t,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var r in this._valuesEnd)o[r]=this._valuesEnd[r];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},e.prototype.startFromCurrentValues=function(t){return this.start(t,!0)},e.prototype._setupProperties=function(t,n,i,o,r){for(var s in i){var a=t[s],c=Array.isArray(a),d=c?"array":typeof a,u=!c&&Array.isArray(i[s]);if(!(d==="undefined"||d==="function")){if(u){var h=i[s];if(h.length===0)continue;for(var p=[a],b=0,f=h.length;b<f;b+=1){var y=this._handleRelativeValue(a,h[b]);if(isNaN(y)){u=!1,console.warn("Found invalid interpolation list. Skipping.");break}p.push(y)}u&&(i[s]=p)}if((d==="object"||c)&&a&&!u){n[s]=c?[]:{};var _=a;for(var S in _)n[s][S]=_[S];o[s]=c?[]:{};var h=i[s];if(!this._isDynamic){var A={};for(var S in h)A[S]=h[S];i[s]=h=A}this._setupProperties(_,n[s],h,o[s],r)}else(typeof n[s]>"u"||r)&&(n[s]=a),c||(n[s]*=1),u?o[s]=i[s].slice().reverse():o[s]=n[s]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(t){return t===void 0&&(t=EY()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=t,this)},e.prototype.resume=function(t){return t===void 0&&(t=EY()),!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=VR.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=EY()),n===void 0&&(n=e.autoStartOnUpdate),this._isPaused)return!0;var r;if(!this._goToEnd&&!this._isPlaying)if(n)this.start(t,!0);else return!1;if(this._goToEnd=!1,t<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var s=t-this._startTime,a=this._duration+((o=this._repeatDelayTime)!==null&&o!==void 0?o:this._delayTime),c=this._duration+this._repeat*a,d=function(){if(i._duration===0||s>c)return 1;var y=Math.trunc(s/a),_=s-y*a,S=Math.min(_/i._duration,1);return S===0&&s===i._duration?1:S},u=d(),h=this._easingFunction(u);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,h),this._onUpdateCallback&&this._onUpdateCallback(this._object,u),this._duration===0||s>=this._duration)if(this._repeat>0){var p=Math.min(Math.trunc((s-this._duration)/a)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=p);for(r in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[r]=="string"&&(this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(this._valuesEnd[r])),this._yoyo&&this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=a*p,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var b=0,f=this._chainedTweens.length;b<f;b++)this._chainedTweens[b].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(t,n,i,o){for(var r in i)if(n[r]!==void 0){var s=n[r]||0,a=i[r],c=Array.isArray(t[r]),d=Array.isArray(a),u=!c&&d;u?t[r]=this._interpolationFunction(a,o):typeof a=="object"&&a?this._updateProperties(t[r],s,a,o):(a=this._handleRelativeValue(s,a),typeof a=="number"&&(t[r]=s+(a-s)*o))}},e.prototype._handleRelativeValue=function(t,n){return typeof n!="string"?n:n.charAt(0)==="+"||n.charAt(0)==="-"?t+parseFloat(n):parseFloat(n)},e.prototype._swapEndStartRepeatValues=function(t){var n=this._valuesStartRepeat[t],i=this._valuesEnd[t];typeof i=="string"?this._valuesStartRepeat[t]=this._valuesStartRepeat[t]+parseFloat(i):this._valuesStartRepeat[t]=this._valuesEnd[t],this._valuesEnd[t]=n},e.autoStartOnUpdate=!1,e})();var mUi=vZe.nextId,i0=Bq,hUi=i0.getAll.bind(i0),fUi=i0.removeAll.bind(i0),pUi=i0.add.bind(i0),bUi=i0.remove.bind(i0),gUi=i0.update.bind(i0);var Y0t={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},Ts=Object.freeze(Y0t);function BB(e,t,n){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=n,this.flyToMode=t}BB.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)}};BB.prototype.stop=function(){l(this.activeCamera)&&this.activeCamera.cancelFlight(),l(this.activeCallback)&&this.activeCallback(!0)};BB.prototype.getCameraOptions=function(e){let t={duration:this.duration};return l(this.activeCallback)&&(t.complete=this.activeCallback),this.flyToMode==="smooth"&&(t.easingFunction=Ts.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=Rt(t,e)),t};var GY=BB;var WUi=x(T(),1);function zq(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}zq.prototype.play=function(e){let t=this;this.activeCallback=e,this.timeout=setTimeout(function(){delete t.activeCallback,e(!1)},this.duration*1e3)};zq.prototype.stop=function(){clearTimeout(this.timeout),l(this.activeCallback)&&this.activeCallback(!0)};var LY=zq;var DZe={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=W0(t),DZe[t]}},$q;typeof DOMParser<"u"&&($q=new DOMParser);var w0t=new qO({stripPrefix:!1,email:!1,replaceFn:function(e){return e.urlMatchType==="scheme"||e.urlMatchType==="www"}}),Gx=32,IZe=2414016,PZe=1,XZe=16093e3,NZe=.1,YZe=[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"],M0t=["http://www.w3.org/2005/Atom"],we={kml:YZe,gx:wZe,atom:M0t,kmlgx:YZe.concat(wZe)},e$={Document:$Ze,Folder:rbt,Placemark:sbt,NetworkLink:pbt,GroundOverlay:mbt,PhotoOverlay:nCe,ScreenOverlay:ubt,Tour:cbt};function o0(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(o0.prototype,{dataSource:{get:function(){return this._dataSource}}});o0.prototype.addNodes=function(e,t){this._stack.push({nodes:e,index:0,processingData:t}),this._used=!0};o0.prototype.addPromise=function(e){this._promises.push(e)};o0.prototype.wait=function(){let e=this._deferred;return this._used||e.resolve(),Promise.all([e.promise,Promise.all(this._promises)])};o0.prototype.process=function(){let e=this._stack.length===1;return e&&(this._started=Uu._getTimestamp()),this._process(e)};o0.prototype._giveUpTime=function(){if(this._timeoutSet)return;this._timeoutSet=!0,this._timeThreshold=50;let e=this;setTimeout(function(){e._timeoutSet=!1,e._started=Uu._getTimestamp(),e._process(!0)},0)};o0.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]};o0.prototype._pop=function(){let e=this._stack;return e.pop(),e.length===0?(this._deferred.resolve(),!1):!0};o0.prototype._process=function(e){let t=this.dataSource,n=this._stack[this._stack.length-1].processingData,i=this._nextNode();for(;l(i);){let o=e$[i.localName];if(l(o)&&(we.kml.indexOf(i.namespaceURI)!==-1||we.gx.indexOf(i.namespaceURI)!==-1)&&(o(t,i,n,this),this._timeoutSet||Uu._getTimestamp()>this._started+this._timeThreshold)){this._giveUpTime();return}i=this._nextNode()}this._pop()&&e&&this._process(!0)};function k0t(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 U0t(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 OZe(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 BZe(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 D0t(e,t){let n=await e.getData(new rY);n=OZe(n),n=BZe(n),t.kml=$q.parseFromString(n,"application/xml")}async function Hq(e,t){let n=DZe.detectFromFilename(e.filename)??"application/octet-stream",i=await e.getData(new iY(n));t[e.filename]=i}function Mu(e,t,n,i){let o=i.keys,r=new WY.default("."),s=e.querySelectorAll(t);for(let a=0;a<s.length;a++){let c=s[a],d=c.getAttribute(n);if(l(d)){let h=new WY.default(d).absoluteTo(r).toString(),p=o.indexOf(h);if(p!==-1){let b=o[p];c.setAttribute(n,i[b]),t==="a"&&c.getAttribute("download")===null&&c.setAttribute("download",b)}}}}function ku(e,t,n,i){let o=e.querySelectorAll(t);for(let r=0;r<o.length;r++){let s=o[r],a=s.getAttribute(n),c=t$(a,i);l(c)&&s.setAttribute(n,c.url)}}function zZe(e,t,n){let i=_a(e,"id");i=l(i)&&i.length!==0?i:zn(),l(n)&&(i=n+i);let o=t.getById(i);return l(o)&&(i=zn(),l(n)&&(i=n+i)),o=t.add(new Oo({id:i})),l(o.kml)||(o.addProperty("kml"),o.kml=new xbt),o}function vY(e,t){return e==="absolute"||e==="relativeToGround"||t==="relativeToSeaFloor"}function JB(e,t){if(!l(e))return m.fromDegrees(0,0,0,t);let n=e.match(/[^\s,\n]+/g);if(!l(n))return m.fromDegrees(0,0,0,t);let i=parseFloat(n[0]),o=parseFloat(n[1]),r=parseFloat(n[2]);return i=isNaN(i)?0:i,o=isNaN(o)?0:o,r=isNaN(r)?0:r,m.fromDegrees(i,o,r,t)}function zB(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++]=JB(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 _a(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 MZe(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 Xf(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 bi(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 Nf(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 t$(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 WY.default(t.getUrlComponent()),s=new WY.default(e);o=n[s.absoluteTo(r)],l(o)&&(i=new We({url:o}))}}return l(i)||(i=t.getDerivedResource({url:e})),i}var Ud={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function Qq(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?(Ud.maximumRed=r,Ud.red=void 0):(Ud.maximumRed=void 0,Ud.red=0),o>0?(Ud.maximumGreen=o,Ud.green=void 0):(Ud.maximumGreen=void 0,Ud.green=0),i>0?(Ud.maximumBlue=i,Ud.blue=void 0):(Ud.maximumBlue=void 0,Ud.blue=0),Ud.alpha=n,U.fromRandom(Ud)):new U(r,o,i,n)}function US(e,t,n){let i=Pn(e,t,n);if(l(i))return Qq(i,Pn(e,"colorMode",n)==="random")}function O0t(e){let t=qi(e,"TimeStamp",we.kmlgx),n=Pn(t,"when",we.kmlgx);if(!l(t)||!l(n)||n.length===0)return;let i=Q.fromIso8601(n),o=new bs;return o.addInterval(new En({start:i,stop:Je.MAXIMUM_VALUE})),o}function B0t(e){let t=qi(e,"TimeSpan",we.kmlgx);if(!l(t))return;let n,i=qi(t,"begin",we.kmlgx),o=l(i)?Q.fromIso8601(i.textContent):void 0,r=qi(t,"end",we.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 bs,n.addInterval(new En({start:o,stop:s}))}else l(o)?(n=new bs,n.addInterval(new En({start:o,stop:Je.MAXIMUM_VALUE}))):l(s)&&(n=new bs,n.addInterval(new En({start:Je.MINIMUM_VALUE,stop:s})));return n}function HZe(){let e=new Oc;return e.width=Gx,e.height=Gx,e.scaleByDistance=new wt(IZe,PZe,XZe,NZe),e.pixelOffsetScaleByDistance=new wt(IZe,PZe,XZe,NZe),e}function n$(){let e=new Yh;return e.outline=!0,e.outlineColor=U.WHITE,e}function KZe(){let e=new Nh;return e.translucencyByDistance=new wt(3e6,1,5e6,0),e.pixelOffset=new M(17,0),e.horizontalOrigin=Ii.LEFT,e.font="16px sans-serif",e.style=ar.FILL_AND_OUTLINE,e}function i$(e,t,n,i,o){let r=Pn(e,"href",we.kml);if(!l(r)||r.length===0)return;if(r.indexOf("root://icons/palette-")===0){let a=r.charAt(21),c=bi(e,"x",we.gx)??0,d=bi(e,"y",we.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=t$(r,n,i);if(o){let a=Pn(e,"refreshMode",we.kml),c=Pn(e,"viewRefreshMode",we.kml);a==="onInterval"||a==="onExpire"?Tt(`kml-refreshMode-${a}`,`KML - Unsupported Icon refreshMode: ${a}`):(c==="onStop"||c==="onRegion")&&Tt(`kml-refreshMode-${c}`,`KML - Unsupported Icon viewRefreshMode: ${c}`);let d=Pn(e,"viewBoundScale",we.kml)??1,u=c==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",h=Pn(e,"viewFormat",we.kml)??u,p=Pn(e,"httpQuery",we.kml);l(h)&&s.setQueryParameters(nu(KB(h))),l(p)&&s.setQueryParameters(nu(KB(p)));let b=t._ellipsoid;return r$(s,t.camera,t.canvas,d,t._lastCameraView.bbox,b),s}return s}function z0t(e,t,n,i,o){let r=bi(t,"scale",we.kml),s=bi(t,"heading",we.kml),a=US(t,"color",we.kml),c=qi(t,"Icon",we.kml),d=i$(c,e,i,o,!1);l(c)&&!l(d)&&(d=!1);let u=bi(c,"x",we.gx),h=bi(c,"y",we.gx),p=bi(c,"w",we.gx),b=bi(c,"h",we.gx),f=qi(t,"hotSpot",we.kml),y=Lx(f,"x"),_=Lx(f,"y"),S=_a(f,"xunits"),A=_a(f,"yunits"),Z=n.billboard;l(Z)||(Z=HZe(),n.billboard=Z),Z.image=d,Z.scale=r,Z.color=a,(l(u)||l(h)||l(p)||l(b))&&(Z.imageSubRegion=new Qe(u,h,p,b)),l(s)&&s!==0&&(Z.rotation=W.toRadians(-s),Z.alignedAxis=m.UNIT_Z),r=r??1;let V,E;l(y)&&(S==="pixels"?V=-y*r:S==="insetPixels"?V=(y-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))&&(Z.pixelOffset=new M(V,E))}function HB(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")z0t(e,a,n,i,o);else if(a.localName==="LabelStyle"){let c=n.label;l(c)||(c=KZe(),n.label=c),c.scale=bi(a,"scale",we.kml)??c.scale,c.fillColor=US(a,"color",we.kml)??c.fillColor,c.text=n.name}else if(a.localName==="LineStyle"){let c=n.polyline;l(c)||(c=new zc,n.polyline=c),c.width=bi(a,"width",we.kml),c.material=US(a,"color",we.kml),l(US(a,"outerColor",we.gx))&&Tt("kml-gx:outerColor","KML - gx:outerColor is not supported in a LineStyle"),l(bi(a,"outerWidth",we.gx))&&Tt("kml-gx:outerWidth","KML - gx:outerWidth is not supported in a LineStyle"),l(bi(a,"physicalWidth",we.gx))&&Tt("kml-gx:physicalWidth","KML - gx:physicalWidth is not supported in a LineStyle"),l(Nf(a,"labelVisibility",we.gx))&&Tt("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$(),n.polygon=c),c.material=US(a,"color",we.kml)??c.material,c.fill=Nf(a,"fill",we.kml)??c.fill,c.outline=Nf(a,"outline",we.kml)??c.outline}else if(a.localName==="BalloonStyle"){let c=Qq(Pn(a,"bgColor",we.kml))??U.WHITE,d=Qq(Pn(a,"textColor",we.kml))??U.BLACK,u=Pn(a,"text",we.kml);n.addProperty("balloonStyle"),n.balloonStyle={bgColor:c,textColor:d,text:u}}else if(a.localName==="ListStyle"){let c=Pn(a,"listItemType",we.kml);(c==="radioFolder"||c==="checkOffOnly")&&Tt(`kml-listStyle-${c}`,`KML - Unsupported ListStyle with listItemType: ${c}`)}}}function H0t(e,t,n,i,o){let r=new Oo,s,a=-1,c=t.childNodes,d=c.length;for(let h=0;h<d;h++){let p=c[h];(p.localName==="Style"||p.localName==="StyleMap")&&(a=h)}if(a!==-1){let h=c[a];if(h.localName==="Style")HB(e,h,r,i,o);else{let p=Xf(h,"Pair",we.kml);for(let b=0;b<p.length;b++){let f=p[b],y=Pn(f,"key",we.kml);if(y==="normal"){let _=Pn(f,"styleUrl",we.kml);if(l(_))s=n.getById(_),l(s)||(s=n.getById(`#${_}`)),l(s)&&r.merge(s);else{let S=qi(f,"Style",we.kml);HB(e,S,r,i,o)}}else Tt(`kml-styleMap-${y}`,`KML - Unsupported StyleMap key: ${y}`)}}}let u=Pn(t,"styleUrl",we.kml);if(l(u)){let h=u;if(u[0]!=="#"&&u.indexOf("#")!==-1){let p=u.split("#"),b=p[0];h=`${i.getDerivedResource({url:b}).getUrlComponent()}#${p[1]}`}s=n.getById(h),l(s)||(s=n.getById(`#${h}`)),l(s)&&r.merge(s)}return r}function K0t(e,t,n){return t.fetchXML().then(function(i){return JZe(e,i,n,t,!0)})}function JZe(e,t,n,i,o,r){let s,a,c,d,u=MZe(t,"Style",we.kml);if(l(u)){let y=u.length;for(s=0;s<y;s++)d=u[s],a=_a(d,"id"),l(a)&&(a=`#${a}`,o&&l(i)&&(a=i.getUrlComponent()+a),l(n.getById(a))||(c=new Oo({id:a}),n.add(c),HB(e,d,c,i,r)))}let h=MZe(t,"StyleMap",we.kml);if(l(h)){let y=h.length;for(s=0;s<y;s++){let _=h[s];if(a=_a(_,"id"),l(a)){let S=Xf(_,"Pair",we.kml);for(let A=0;A<S.length;A++){let Z=S[A],V=Pn(Z,"key",we.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(Z,"styleUrl",we.kml);if(l(E)){E[0]!=="#"&&(E=`#${E}`),o&&l(i)&&(E=i.getUrlComponent()+E);let L=n.getById(E);l(L)&&c.merge(L)}else d=qi(Z,"Style",we.kml),HB(e,d,c,i,r)}}else Tt(`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(K0t(e,A,n))}}}return p}function o$(e,t,n){let i=new ng(e,t.id,["position"]),o=new Dp(t.position);t.polyline=l(n.polyline)?n.polyline.clone():new zc,t.polyline.positions=new tg([i,o])}function jZe(e,t){return!l(e)&&!l(t)||e==="clampToGround"?tt.CLAMP_TO_GROUND:e==="relativeToGround"?tt.RELATIVE_TO_GROUND:e==="absolute"?tt.NONE:t==="clampToSeaFloor"?(Tt("kml-gx:altitudeMode-clampToSeaFloor","KML - <gx:altitudeMode>:clampToSeaFloor is currently not supported, using <kml:altitudeMode>:clampToGround."),tt.CLAMP_TO_GROUND):t==="relativeToSeaFloor"?(Tt("kml-gx:altitudeMode-relativeToSeaFloor","KML - <gx:altitudeMode>:relativeToSeaFloor is currently not supported, using <kml:altitudeMode>:relativeToGround."),tt.RELATIVE_TO_GROUND):(l(e)?Tt("kml-altitudeMode-unknown",`KML - Unknown <kml:altitudeMode>:${e}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`):Tt("kml-gx:altitudeMode-unknown",`KML - Unknown <gx:altitudeMode>:${t}, using <kml:altitudeMode>:CLAMP_TO_GROUND.`),tt.CLAMP_TO_GROUND)}function J0t(e,t,n){return n==="relativeToSeaFloor"||t==="absolute"||t==="relativeToGround"?e:((l(t)&&t!=="clampToGround"||l(n)&&n!=="clampToSeaFloor")&&Tt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${t??n}`),new Dp(e))}function j0t(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")&&Tt("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 jB(e,t,n,i){let o=t.label;l(o)||(o=l(n.label)?n.label.clone():KZe(),t.label=o),o.text=t.name;let r=t.billboard;l(r)||(r=l(n.billboard)?n.billboard.clone():HZe(),t.billboard=r),l(r.image)?r.image.getValue()||(r.image=void 0):r.image=e._pinBuilder.fromColor(U.YELLOW,64);let s=1;l(r.scale)&&(s=r.scale.getValue(),s!==0?o.pixelOffset=new M(s*16+1,0):(o.pixelOffset=void 0,o.horizontalOrigin=void 0)),l(i)&&e._clampToGround&&(r.heightReference=i,o.heightReference=i)}function QZe(e,t){let n=e.path;l(n)||(n=new q0,n.leadTime=0,e.path=n);let i=t.polyline;l(i)&&(n.material=i.material,n.width=i.width)}function Q0t(e,t,n,i,o){let r=Pn(n,"coordinates",we.kml),s=Pn(n,"altitudeMode",we.kml),a=Pn(n,"altitudeMode",we.gx),c=Nf(n,"extrude",we.kml),d=e._ellipsoid,u=JB(r,d);return i.position=u,jB(e,i,o,jZe(s,a)),c&&vY(s,a)&&o$(t,i,o),!0}function kZe(e,t,n,i,o){let r=qi(n,"coordinates",we.kml),s=Pn(n,"altitudeMode",we.kml),a=Pn(n,"altitudeMode",we.gx),c=Nf(n,"extrude",we.kml),d=Nf(n,"tessellate",we.kml),u=vY(s,a),h=bi(n,"drawOrder",we.gx),p=e._ellipsoid,b=zB(r,p),f=o.polyline;if(u&&c){let y=new $0;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 zc;y.clampToGround=!0,i.polyline=y,y.positions=b,l(f)?(y.material=l(f.material)?f.material.color.getValue(Je.MINIMUM_VALUE):U.WHITE,y.width=f.width??1):(y.material=U.WHITE,y.width=1),y.zIndex=h}else l(h)&&Tt("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),e._clampToGround&&!d&&Tt("kml-line-tesselate","Ignoring clampToGround for KML lines without the tessellate flag."),f=l(f)?f.clone():new zc,i.polyline=f,f.positions=j0t(b,s,a,p),(!d||u)&&(f.arcType=on.NONE);return!0}function q0t(e,t,n,i,o){let r=qi(n,"outerBoundaryIs",we.kml),s=qi(r,"LinearRing",we.kml),a=qi(s,"coordinates",we.kml),c=e._ellipsoid,d=zB(a,c),u=Nf(n,"extrude",we.kml),h=Pn(n,"altitudeMode",we.kml),p=Pn(n,"altitudeMode",we.gx),b=vY(h,p),f=l(o.polygon)?o.polygon.clone():n$(),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 Ac(d),S=Xf(n,"innerBoundaryIs",we.kml);for(let A=0;A<S.length;A++){s=Xf(S[A],"LinearRing",we.kml);for(let Z=0;Z<s.length;Z++)a=qi(s[Z],"coordinates",we.kml),d=zB(a,c),l(d)&&_.holes.push(new Ac(d))}f.hierarchy=_}return!0}function $0t(e,t,n,i,o){let r=Pn(n,"altitudeMode",we.kml),s=Pn(n,"altitudeMode",we.gx),a=Xf(n,"coord",we.gx),c=Xf(n,"angles",we.gx),d=Xf(n,"when",we.kml),u=Nf(n,"extrude",we.kml),h=vY(r,s),p=e._ellipsoid;c.length>0&&Tt("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=JB(a[S].textContent,p);f.push(A),y.push(Q.fromIso8601(d[S].textContent))}let _=new sc;return _.addSamples(y,f),i.position=_,jB(e,i,o,jZe(r,s)),QZe(i,o),i.availability=new bs,d.length>0&&i.availability.addInterval(new En({start:y[0],stop:y[y.length-1]})),h&&u&&o$(t,i,o),!0}function UZe(e,t,n,i,o,r,s,a,c){let d=e[0],u=e[e.length-1],h=new sc;h.addSamples(e,t),n.intervals.addInterval(new En({start:d,stop:u,isStartIncluded:c,isStopIncluded:c,data:J0t(h,s,a)})),i.addInterval(new En({start:d,stop:u,isStartIncluded:c,isStopIncluded:c})),o.intervals.addInterval(new En({start:d,stop:u,isStartIncluded:c,isStopIncluded:c,data:r}))}function ebt(e,t,n,i,o){let r=Nf(n,"interpolate",we.gx),s=Xf(n,"Track",we.gx),a,c,d,u=!1,h=new og,p=new bs,b=new oc,f=e._ellipsoid;for(let y=0,_=s.length;y<_;y++){let S=s[y],A=Xf(S,"when",we.kml),Z=Xf(S,"coord",we.gx),V=Pn(S,"altitudeMode",we.kml),E=Pn(S,"altitudeMode",we.gx),L=vY(V,E),v=Nf(S,"extrude",we.kml),I=Math.min(Z.length,A.length),X=[];a=[];for(let N=0;N<I;N++){let g=JB(Z[N].textContent,f);X.push(g),a.push(Q.fromIso8601(A[N].textContent))}r&&(l(c)&&UZe([c,a[0]],[d,X[0]],b,p,h,!1,"absolute",void 0,!1),c=a[I-1],d=X[X.length-1]),UZe(a,X,b,p,h,L&&v,V,E,!0),u=u||L&&v}return i.availability=p,i.position=b,jB(e,i,o),QZe(i,o),u&&(o$(t,i,o),i.polyline.show=h),!0}var qZe={Point:Q0t,LineString:kZe,LinearRing:kZe,Polygon:q0t,Track:$0t,MultiTrack:ebt,MultiGeometry:tbt,Model:nbt};function tbt(e,t,n,i,o,r){let s=n.childNodes,a=!1;for(let c=0,d=s.length;c<d;c++){let u=s.item(c),h=qZe[u.localName];if(l(h)){let p=zZe(u,t,r);p.parent=i,p.name=i.name,p.availability=i.availability,p.description=i.description,p.kml=i.kml,h(e,t,u,p,o)&&(a=!0)}}return a}function nbt(e,t,n,i,o){return Tt("kml-unsupportedGeometry",`KML - Unsupported geometry: ${n.localName}`),!1}function ibt(e,t){let n=qi(e,"ExtendedData",we.kml);if(!l(n))return;l(qi(n,"SchemaData",we.kml))&&Tt("kml-schemaData","KML - SchemaData is unsupported"),l(_a(n,"xmlns:prefix"))&&Tt("kml-extendedData","KML - ExtendedData with xmlns:prefix is unsupported");let i={},o=Xf(n,"Data",we.kml);if(l(o)){let r=o.length;for(let s=0;s<r;s++){let a=o[s],c=_a(a,"name");l(c)&&(i[c]={displayName:Pn(a,"displayName",we.kml),value:Pn(a,"value",we.kml)})}}t.kml.extendedData=i}var Io;typeof document<"u"&&(Io=document.createElement("div"));function obt(e,t,n,i,o){let r,s,a,c=t.kml,d=c.extendedData,u=Pn(e,"description",we.kml),h=t.balloonStyle??n.balloonStyle,p=U.WHITE,b=U.BLACK,f=u;l(h)&&(p=h.bgColor??U.WHITE,b=h.textColor??U.BLACK,f=h.text??u);let y;if(l(f)){if(f=f.replace("$[name]",t.name??""),f=f.replace("$[description]",u??""),f=f.replace("$[address]",c.address??""),f=f.replace("$[Snippet]",c.snippet??""),f=f.replace("$[id]",t.id),f=f.replace("$[geDirections]",""),l(d)){let A=f.match(/\$\[.+?\]/g);if(A!==null)for(r=0;r<A.length;r++){let Z=A[r],V=Z.substr(2,Z.length-3),E=/\/displayName$/.test(V);V=V.replace(/\/displayName$/,""),y=d[V],l(y)&&(y=E?y.displayName:y.value),l(y)&&(f=f.replace(Z,y??""))}}}else if(l(d)&&(a=Object.keys(d),a.length>0)){for(f='<table class="cesium-infoBox-defaultTable cesium-infoBox-defaultTable-lighter"><tbody>',r=0;r<a.length;r++)s=a[r],y=d[s],f+=`<tr><th>${y.displayName??s}</th><td>${y.value??""}</td></tr>`;f+="</tbody></table>"}if(!l(f))return;f=w0t.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&&(Mu(Io,"a","href",i),Mu(Io,"link","href",i),Mu(Io,"area","href",i),Mu(Io,"img","src",i),Mu(Io,"iframe","src",i),Mu(Io,"video","src",i),Mu(Io,"audio","src",i),Mu(Io,"source","src",i),Mu(Io,"track","src",i),Mu(Io,"input","src",i),Mu(Io,"embed","src",i),Mu(Io,"script","src",i),Mu(Io,"video","poster",i)),ku(Io,"a","href",o),ku(Io,"link","href",o),ku(Io,"area","href",o),ku(Io,"img","src",o),ku(Io,"iframe","src",o),ku(Io,"video","src",o),ku(Io,"audio","src",o),ku(Io,"source","src",o),ku(Io,"track","src",o),ku(Io,"input","src",o),ku(Io,"embed","src",o),ku(Io,"script","src",o),ku(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 QB(e,t,n){let i=n.entityCollection,o=n.parentEntity,r=n.sourceResource,s=n.uriResolver,a=zZe(t,i,n.context),c=a.kml,d=H0t(e,t,n.styleCollection,r,s),u=Pn(t,"name",we.kml);a.name=u,a.parent=o;let h=B0t(t);l(h)||(h=O0t(t)),a.availability=h,a$(a);function p(Z){return Z?Z.show&&p(Z.parent):!0}let b=Nf(t,"visibility",we.kml);a.show=p(o)&&(b??!0);let f=qi(t,"author",we.atom),y=c.author;y.name=Pn(f,"name",we.atom),y.uri=Pn(f,"uri",we.atom),y.email=Pn(f,"email",we.atom);let _=qi(t,"link",we.atom),S=c.link;S.href=_a(_,"href"),S.hreflang=_a(_,"hreflang"),S.rel=_a(_,"rel"),S.type=_a(_,"type"),S.title=_a(_,"title"),S.length=_a(_,"length"),c.address=Pn(t,"address",we.kml),c.phoneNumber=Pn(t,"phoneNumber",we.kml),c.snippet=Pn(t,"Snippet",we.kml),ibt(t,a),obt(t,a,d,s,r);let A=e._ellipsoid;return tCe(t,a,A),eCe(t,a,A),l(qi(t,"Region",we.kml))&&Tt("kml-region","KML - Placemark Regions are unsupported"),{entity:a,styleEntity:d}}function $Ze(e,t,n,i){i.addNodes(t.childNodes,n),i.process()}function rbt(e,t,n,i){let o=QB(e,t,n),r=ze(n);r.parentEntity=o.entity,$Ze(e,t,r,i)}function sbt(e,t,n,i){let o=QB(e,t,n),r=o.entity,s=o.styleEntity,a=!1,c=t.childNodes;for(let d=0,u=c.length;d<u&&!a;d++){let h=c.item(d),p=qZe[h.localName];l(p)&&(p(e,n.entityCollection,h,r,s,r.id),a=!0)}a||(r.merge(s),jB(e,r,s))}var abt={FlyTo:dbt,Wait:lbt,SoundCue:Kq,AnimatedUpdate:Kq,TourControl:Kq};function cbt(e,t,n,i){let o=Pn(t,"name",we.kml),r=_a(t,"id"),s=new RY(o,r),a=qi(t,"Playlist",we.gx);if(a){let c=e._ellipsoid,d=a.childNodes;for(let u=0;u<d.length;u++){let h=d[u];if(h.localName){let p=abt[h.localName];p?p(s,h,c):console.log(`Unknown KML Tour playlist entry type ${h.localName}`)}}}e._kmlTours.push(s)}function Kq(e,t){Tt(`KML Tour unsupported node ${t.localName}`)}function lbt(e,t){let n=bi(t,"duration",we.gx);e.addPlaylistEntry(new LY(n))}function dbt(e,t,n){let i=bi(t,"duration",we.gx),o=Pn(t,"flyToMode",we.gx),r={kml:{}};tCe(t,r,n),eCe(t,r,n);let s=r.kml.lookAt||r.kml.camera,a=new GY(i,o,s);e.addPlaylistEntry(a)}function eCe(e,t,n){let i=qi(e,"Camera",we.kml);if(l(i)){let o=bi(i,"longitude",we.kml)??0,r=bi(i,"latitude",we.kml)??0,s=bi(i,"altitude",we.kml)??0,a=bi(i,"heading",we.kml)??0,c=bi(i,"tilt",we.kml)??0,d=bi(i,"roll",we.kml)??0,u=m.fromDegrees(o,r,s,n),h=yc.fromDegrees(a,c-90,d);t.kml.camera=new zN(u,h)}}function tCe(e,t,n){let i=qi(e,"LookAt",we.kml);if(l(i)){let o=bi(i,"longitude",we.kml)??0,r=bi(i,"latitude",we.kml)??0,s=bi(i,"altitude",we.kml)??0,a=bi(i,"heading",we.kml),c=bi(i,"tilt",we.kml),d=bi(i,"range",we.kml)??0;c=W.toRadians(c??0),a=W.toRadians(a??0);let u=new ih(a,c-W.PI_OVER_TWO,d),h=m.fromDegrees(o,r,s,n);t.kml.lookAt=new VY(h,u)}}function ubt(e,t,n,i){let o=n.screenOverlayContainer;if(!l(o))return;let r=n.sourceResource,s=n.uriResolver,a=qi(t,"Icon",we.kml),c=i$(a,e,r,s,!1);if(!l(c))return;let d=document.createElement("img");e._screenOverlays.push(d),d.src=c.url,d.onload=function(){let u=["position: absolute"],h=qi(t,"screenXY",we.kml),p=qi(t,"overlayXY",we.kml),b=qi(t,"size",we.kml),f,y,_,S,A,Z;l(b)&&(f=Lx(b,"x"),y=Lx(b,"y"),_=_a(b,"xunits"),S=_a(b,"yunits"),l(f)&&f!==-1&&f!==0&&(_==="fraction"?A=`width: ${Math.floor(f*100)}%`:_==="pixels"&&(A=`width: ${f}px`),u.push(A)),l(y)&&y!==-1&&y!==0&&(S==="fraction"?Z=`height: ${Math.floor(y*100)}%`:S==="pixels"&&(Z=`height: ${y}px`),u.push(Z))),d.style=u.join(";");let V=0,E=d.height;l(p)&&(f=Lx(p,"x"),y=Lx(p,"y"),_=_a(p,"xunits"),S=_a(p,"yunits"),l(f)&&(_==="fraction"?V=f*d.width:(_==="pixels"||_==="insetPixels")&&(V=f)),l(y)&&(S==="fraction"?E=y*d.height:(S==="pixels"||S==="insetPixels")&&(E=y))),l(h)&&(f=Lx(h,"x"),y=Lx(h,"y"),_=_a(h,"xunits"),S=_a(h,"yunits"),l(f)&&(_==="fraction"?A=`left: calc(${Math.floor(f*100)}% - ${V}px)`:_==="pixels"?A=`left: ${f-V}px`:_==="insetPixels"&&(A=`right: ${f-V}px`),u.push(A)),l(y)&&(S==="fraction"?Z=`bottom: calc(${Math.floor(y*100)}% - ${E}px)`:S==="pixels"?Z=`bottom: ${y-E}px`:S==="insetPixels"&&(Z=`top: ${y-E}px`),u.push(Z))),d.style=u.join(";")},o.appendChild(d)}function mbt(e,t,n,i){let r=QB(e,t,n).entity,s,a=!1,c=e._ellipsoid,d=zB(qi(t,"LatLonQuad",we.gx),c),u=bi(t,"drawOrder",we.kml);if(l(d))s=n$(),s.hierarchy=new Ac(d),s.zIndex=u,r.polygon=s,a=!0;else{s=new wh,s.zIndex=u,r.rectangle=s;let f=qi(t,"LatLonBox",we.kml);if(l(f)){let y=bi(f,"west",we.kml),_=bi(f,"south",we.kml),S=bi(f,"east",we.kml),A=bi(f,"north",we.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 ae(y,_,S,A);let Z=bi(f,"rotation",we.kml);if(l(Z)){let V=W.toRadians(Z);s.rotation=V,s.stRotation=V}}}let h=qi(t,"Icon",we.kml),p=i$(h,e,n.sourceResource,n.uriResolver,!0);if(l(p)){a&&Tt("kml-gx:LatLonQuad","KML - gx:LatLonQuad Icon does not support texture projection.");let f=bi(h,"x",we.gx),y=bi(h,"y",we.gx),_=bi(h,"w",we.gx),S=bi(h,"h",we.gx);(l(f)||l(y)||l(_)||l(S))&&Tt("kml-groundOverlay-xywh","KML - gx:x, gx:y, gx:w, gx:h aren't supported for GroundOverlays"),s.material=p,s.material.color=US(t,"color",we.kml),s.material.transparent=!0}else s.material=US(t,"color",we.kml);let b=Pn(t,"altitudeMode",we.kml);l(b)?b==="absolute"?(s.height=bi(t,"altitude",we.kml),s.zIndex=void 0):b!=="clampToGround"&&Tt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${b}`):(b=Pn(t,"altitudeMode",we.gx),b==="relativeToSeaFloor"?(Tt("kml-altitudeMode-relativeToSeaFloor","KML - altitudeMode relativeToSeaFloor is currently not supported, treating as absolute."),s.height=bi(t,"altitude",we.kml),s.zIndex=void 0):b==="clampToSeaFloor"?Tt("kml-altitudeMode-clampToSeaFloor","KML - altitudeMode clampToSeaFloor is currently not supported, treating as clampToGround."):l(b)&&Tt("kml-altitudeMode-unknown",`KML - Unknown altitudeMode: ${b}`))}function nCe(e,t,n,i){e._unsupportedNode.raiseEvent(e,n.parentEntity,t,n.entityCollection,n.styleCollection,n.sourceResource,n.uriResolver),Tt(`kml-unsupportedFeature-${t.nodeName}`,`KML - Unsupported feature: ${t.nodeName}`)}var Wx={INTERVAL:0,EXPIRE:1,STOP:2};function KB(e){if(!l(e)||e.length===0)return"";let t=e[0];return(t==="&"||t==="?")&&(e=e.substring(1)),e}var hbt=new ae,RR=new pe,Jq=new M,fbt=new m;function r$(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??hbt,l(n)&&(Jq.x=n.clientWidth*.5,Jq.y=n.clientHeight*.5,d=t.pickEllipsoid(Jq,r,fbt)),l(d)?u=r.cartesianToCartographic(d,RR):(u=ae.center(o,RR),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 ae(a(u.longitude-S),s(u.latitude-A),a(u.longitude+S),s(u.latitude+A))}c=c.replace("[bboxWest]",W.toDegrees(o.west).toString()),c=c.replace("[bboxSouth]",W.toDegrees(o.south).toString()),c=c.replace("[bboxEast]",W.toDegrees(o.east).toString()),c=c.replace("[bboxNorth]",W.toDegrees(o.north).toString());let h=W.toDegrees(u.longitude).toString(),p=W.toDegrees(u.latitude).toString();c=c.replace("[lookatLon]",h),c=c.replace("[lookatLat]",p),c=c.replace("[lookatTilt]",W.toDegrees(t.pitch).toString()),c=c.replace("[lookatHeading]",W.toDegrees(t.heading).toString()),c=c.replace("[lookatRange]",m.distance(t.positionWC,d)),c=c.replace("[lookatTerrainLon]",h),c=c.replace("[lookatTerrainLat]",p),c=c.replace("[lookatTerrainAlt]",u.height.toString()),r.cartesianToCartographic(t.positionWC,RR),c=c.replace("[cameraLon]",W.toDegrees(RR.longitude).toString()),c=c.replace("[cameraLat]",W.toDegrees(RR.latitude).toString()),c=c.replace("[cameraAlt]",W.toDegrees(RR.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(nu(c))}function pbt(e,t,n,i){let r=QB(e,t,n).entity,s=n.sourceResource,a=n.uriResolver,c=qi(t,"Link",we.kml);if(l(c)||(c=qi(t,"Url",we.kml)),l(c)){let d=Pn(c,"href",we.kml),u,h;if(l(d)){let p=d;if(d=t$(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",we.kml),u==="onRegion"){Tt("kml-refrehMode-onRegion","KML - Unsupported viewRefreshMode: onRegion");return}h=Pn(c,"viewBoundScale",we.kml)??1;let _=u==="onStop"?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",S=Pn(c,"viewFormat",we.kml)??_,A=Pn(c,"httpQuery",we.kml);l(S)&&d.setQueryParameters(nu(KB(S))),l(A)&&d.setQueryParameters(nu(KB(A)));let Z=e._ellipsoid;r$(d,e.camera,e.canvas,h,e._lastCameraView.bbox,Z)}let b={sourceUri:p,uriResolver:a,context:r.id,screenOverlayContainer:n.screenOverlayContainer},f=new Ya,y=s$(e,f,d,b).then(function(_){let S=e._entityCollection,A=f.values;S.suspendEvents();for(let E=0;E<A.length;E++){let L=A[E];l(L.parent)||(L.parent=r,a$(L)),S.add(L)}S.resumeEvents();let Z=Pn(c,"refreshMode",we.kml),V=bi(c,"refreshInterval",we.kml)??0;if(Z==="onInterval"&&V>0||Z==="onExpire"||u==="onStop"){let E=qi(_,"NetworkLinkControl",we.kml),L=l(E),v=Q.now(),I={id:zn(),href:d,cookie:{},lastUpdated:v,updating:!1,entity:r,viewBoundScale:h,needsUpdate:!1,cameraUpdateTime:v},X=0;if(L&&(I.cookie=nu(Pn(E,"cookie",we.kml)??""),X=bi(E,"minRefreshPeriod",we.kml)??0),Z==="onInterval")L&&(V=Math.max(X,V)),I.refreshMode=Wx.INTERVAL,I.time=V;else if(Z==="onExpire"){let N;if(L&&(N=Pn(E,"expires",we.kml)),l(N))try{let g=Q.fromIso8601(N),C=Q.secondsDifference(g,v);C>0&&C<X&&Q.addSeconds(v,X,g),I.refreshMode=Wx.EXPIRE,I.time=g}catch{Tt("kml-refreshMode-onInterval-onExpire","KML - NetworkLinkControl expires is not a valid date")}else Tt("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=bi(c,"viewRefreshTime",we.kml)??0):Tt("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(_){Tt(`An error occured during loading ${d.url}`),e._error.raiseEvent(e,_)});i.addPromise(y)}}}function bbt(e,t,n,i){let o=e$[t.localName];return l(o)?o(e,t,n,i):nCe(e,t,n,i)}function qq(e,t,n,i,o,r,s){t.removeAll();let a=n.documentElement,c=a.localName==="Document"?a:qi(a,"Document",we.kml),d=Pn(c,"name",we.kml);l(d)||(d=$b(i.getUrlComponent())),l(e._name)||(e._name=d);let u=new Uu._DeferredLoading(e),h=new Ya(e);return Promise.all(JZe(e,n,h,i,!1,o)).then(function(){let p=n.documentElement;if(p.localName==="kml"){let f=p.childNodes;for(let y=0;y<f.length;y++){let _=f[y];if(l(e$[_.localName])){p=_;break}}}let b={parentEntity:void 0,entityCollection:t,styleCollection:h,sourceResource:i,uriResolver:o,context:s,screenOverlayContainer:r};return t.suspendEvents(),bbt(e,p,b,u),t.resumeEvents(),u.wait().then(function(){return n.documentElement})})}async function gbt(e,t,n,i,o){let r=Kt("ThirdParty/Workers/zip-web-worker.js"),s=Kt("ThirdParty/zip-module.wasm");Qp({workerURI:r,wasmURI:s});let a=new wS(new e0(n)),c=await a.getEntries(),d=[],u={},h;for(let p=0;p<c.length;p++){let b=c[p];b.directory||(/\.kml$/i.test(b.filename)&&(!l(h)||!/\//i.test(b.filename))?(l(h)&&d.push(Hq(h,u)),h=b):d.push(Hq(b,u)))}if(l(h)&&d.push(D0t(h,u)),await Promise.all(d),a.close(),!l(u.kml))throw new le("KMZ file does not contain a KML document.");return u.keys=Object.keys(u),qq(e,t,u.kml,i,u,o)}function s$(e,t,n,i){i=i??B.EMPTY_OBJECT;let o=i.sourceUri,r=i.uriResolver,s=i.context,a=i.screenOverlayContainer,c=n;if(typeof n=="string"||n instanceof We){n=We.createIfNeeded(n),c=n.fetchBlob(),o=o??n.clone();let d=e._resourceCredits,u=n.credits;if(l(u)){let h=u.length;for(let p=0;p<h;p++)d.push(u[p])}}else o=o??We.DEFAULT.clone();return o=We.createIfNeeded(o),l(a)&&(a=In(a)),Promise.resolve(c).then(function(d){return d instanceof Blob?k0t(d).then(function(u){return u?gbt(e,t,d,o,a):U0t(d).then(function(h){h=OZe(h),h=BZe(h);let p,b;try{p=$q.parseFromString(h,"application/xml")}catch(f){b=f.toString()}if(l(b)||p.body||p.documentElement.tagName==="parsererror"){let f=l(b)?b:p.documentElement.firstChild.nodeValue;throw f||(f=p.body.innerText),new le(f)}return qq(e,t,p,o,r,a,s)})}):qq(e,t,d,o,r,a,s)}).catch(function(d){return e._error.raiseEvent(e,d),console.log(d),Promise.reject(d)})}function Uu(e){e=e??B.EMPTY_OBJECT;let t=e.camera,n=e.canvas;this._changed=new _e,this._error=new _e,this._loading=new _e,this._refresh=new _e,this._unsupportedNode=new _e,this._clock=void 0,this._entityCollection=new Ya(this),this._name=void 0,this._isLoading=!1,this._pinBuilder=new mg,this._networkLinks=new It,this._entityCluster=new Vu,this.canvas=n,this.camera=t,this._lastCameraView={position:l(t)?m.clone(t.positionWC):void 0,direction:l(t)?m.clone(t.directionWC):void 0,up:l(t)?m.clone(t.upWC):void 0,bbox:l(t)?t.computeViewRectangle():ae.clone(ae.MAX_VALUE)},this._ellipsoid=e.ellipsoid??ie.default;let i=e.credit;typeof i=="string"&&(i=new bt(i)),this._credit=i,this._resourceCredits=[],this._kmlTours=[],this._screenOverlays=[]}Uu.load=function(e,t){return t=t??B.EMPTY_OBJECT,new Uu(t).load(e,t)};Object.defineProperties(Uu.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},refreshEvent:{get:function(){return this._refresh}},unsupportedNodeEvent:{get:function(){return this._unsupportedNode}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){this._entityCluster=e}},credit:{get:function(){return this._credit}},kmlTours:{get:function(){return this._kmlTours}}});Uu.prototype.load=function(e,t){t=t??B.EMPTY_OBJECT,gs.setLoading(this,!0);let n=this._name;this._name=void 0,this._clampToGround=t.clampToGround??!1;let i=this;return s$(this,this._entityCollection,e,t).then(function(){let o,r=i._entityCollection.computeAvailability(),s=r.start,a=r.stop,c=Q.equals(s,Je.MINIMUM_VALUE),d=Q.equals(a,Je.MAXIMUM_VALUE);if(!c||!d){let h;c&&(h=new Date,h.setHours(0,0,0,0),s=Q.fromDate(h)),d&&(h=new Date,h.setHours(24,0,0,0),a=Q.fromDate(h)),o=new Zf,o.startTime=s,o.stopTime=a,o.currentTime=Q.clone(s),o.clockRange=ys.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),gs.setLoading(i,!1),i}).catch(function(o){return gs.setLoading(i,!1),i._error.raiseEvent(i,o),console.log(o),Promise.reject(o)})};Uu.prototype.destroy=function(){for(;this._screenOverlays.length>0;)this._screenOverlays.pop().remove()};function a$(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 ybt(e,t,n,i,o){return function(r){if(!i.contains(t.id))return;let s=!1,a=qi(r,"NetworkLinkControl",we.kml),c=l(a),d=0;if(c){if(l(qi(a,"Update",we.kml))){Tt("kml-networkLinkControl-update","KML - NetworkLinkControl updates aren't supported."),t.updating=!1,i.remove(t.id);return}t.cookie=nu(Pn(a,"cookie",we.kml)??""),d=bi(a,"minRefreshPeriod",we.kml)??0}let u=Q.now(),h=t.refreshMode;if(h===Wx.INTERVAL)l(a)&&(t.time=Math.max(d,t.time));else if(h===Wx.EXPIRE){let v;if(l(a)&&(v=Pn(a,"expires",we.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{Tt("kml-networkLinkControl-expires","KML - NetworkLinkControl expires is not a valid date"),s=!0}else Tt("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,a$(v)),b.add(v)}b.resumeEvents(),s?i.remove(t.id):t.lastUpdated=u;let A=b.computeAvailability(),Z=A.start,V=A.stop,E=Q.equals(Z,Je.MINIMUM_VALUE),L=Q.equals(V,Je.MAXIMUM_VALUE);if(!E||!L){let v=e._clock;(v.startTime!==Z||v.stopTime!==V)&&(v.startTime=Z,v.stopTime=V,e._changed.raiseEvent(e))}t.updating=!1,t.needsUpdate=!1,e._refresh.raiseEvent(e,o.getUrlComponent(!0))}}var jq=new It;Uu.prototype.update=function(e){let t=this._networkLinks;if(t.length===0)return!0;let n=Q.now(),i=this;jq.removeAll();function o(u){let h=u._children,p=h.length;for(let b=0;b<p;++b){let f=h[b];jq.set(f.id,f),o(f)}}let r=!1,s=this._lastCameraView,a=this.camera;l(a)&&!(a.positionWC.equalsEpsilon(s.position,W.EPSILON7)&&a.directionWC.equalsEpsilon(s.direction,W.EPSILON7)&&a.upWC.equalsEpsilon(s.up,W.EPSILON7))&&(s.position=m.clone(a.positionWC),s.direction=m.clone(a.directionWC),s.up=m.clone(a.upWC),s.bbox=a.computeViewRectangle(),r=!0);let c=new It,d=!1;return t.values.forEach(function(u){let h=u.entity;if(!jq.contains(h.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(h),u.updating=!0;let b=new Ya,f=u.href.clone();f.setQueryParameters(u.cookie);let y=i._ellipsoid??ie.default;r$(f,i.camera,i.canvas,u.viewBoundScale,s.bbox,y),s$(i,b,f,{context:h.id}).then(ybt(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 xbt(){this.author={name:void 0,uri:void 0,email:void 0},this.link={href:void 0,hreflang:void 0,rel:void 0,type:void 0,title:void 0,length:void 0},this.address=void 0,this.phoneNumber=void 0,this.snippet=void 0,this.extendedData=void 0}Uu._DeferredLoading=o0;Uu._getTimestamp=Yi;var DS=Uu;var J5i=x(T(),1);function FY(){he.throwInstantiationError()}FY.prototype.update=he.throwInstantiationError;FY.prototype.getBoundingSphere=he.throwInstantiationError;FY.prototype.isDestroyed=he.throwInstantiationError;FY.prototype.destroy=he.throwInstantiationError;var c$=FY;var VDi=x(T(),1);var l$=32,Tbt="http://www.opengis.net/kml/2.2",wf="http://www.google.com/kml/ext/2.2",_bt="http://www.w3.org/2000/xmlns/";function qB(e){this._files={},this._promises=[],this._count=0,this._modelCallback=e}var Sbt=/^data:image\/([^,;]+)/;qB.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(Sbt);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 Abt(e,t){return function(n){e._files[t]=n}}qB.prototype.model=function(e,t){let n=this._modelCallback;if(!l(n))throw new le("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(Abt(this,r))}return o};Object.defineProperties(qB.prototype,{promise:{get:function(){return Promise.all(this._promises)}},files:{get:function(){return this._files}}});function $B(e){this._time=e}$B.prototype.get=function(e,t,n){let i;return l(e)&&(i=l(e.getValue)?e.getValue(this._time,n):e),i??t};$B.prototype.getColor=function(e,t){let n=this.get(e,t);if(l(n))return BS(n)};$B.prototype.getMaterialType=function(e){if(l(e))return e.getType(this._time)};function d$(){this._ids={},this._styles={},this._count=0}d$.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};d$.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 rCe(){this._ids={}}rCe.prototype.get=function(e){if(!l(e))return this.get(zn());let t=this._ids;return l(t[e])?`${e.toString()}-${++t[e]}`:(t[e]=0,e)};function u$(e){e=e??B.EMPTY_OBJECT;let t=e.entities,n=e.kmz??!1,i=u$._createState(e),o=t.values.filter(function(d){return!l(d.parent)}),r=i.kmlDoc,s=r.documentElement;s.setAttributeNS(_bt,"xmlns:gx",wf);let a=r.createElement("Document");s.appendChild(a),aCe(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?Zbt(u,c.files):{kml:u,externalFiles:c.files}})}async function Zbt(e,t){let n=Kt("ThirdParty/Workers/zip-web-worker.js"),i=Kt("ThirdParty/zip-module.wasm");Qp({workerURI:n,wasmURI:i});let o=new yR("application/vnd.google-earth.kmz"),r=new SY(o);await r.add("doc.kml",new oY(e));let s=Object.keys(t);return await sCe(r,s,t,0),await r.close(),{kmz:await o.getData()}}async function sCe(e,t,n,i){if(t.length===i)return;let o=t[i];return await e.add(o,new e0(n[o])),sCe(e,t,n,i+1)}u$._createState=function(e){let t=e.entities,n=new d$,i=t.computeAvailability(),o=l(e.time)?e.time:i.start,r=e.defaultAvailability??i,s=e.sampleDuration??60;r.start===Je.MINIMUM_VALUE?r.stop===Je.MAXIMUM_VALUE?r=new En:Q.addSeconds(r.stop,-10*s,r.start):r.stop===Je.MAXIMUM_VALUE&&Q.addSeconds(r.start,10*s,r.stop);let a=new qB(e.modelCallback);return{kmlDoc:document.implementation.createDocument(Tbt,"kml"),ellipsoid:e.ellipsoid??ie.default,idManager:new rCe,styleCache:n,externalFileHandler:a,time:o,valueGetter:new $B(o),sampleDuration:s,defaultAvailability:new bs([r])}};function aCe(e,t,n){let i=e.kmlDoc,o=e.styleCache,r=e.valueGetter,s=e.idManager,a=n.length,c,d,u;for(let h=0;h<a;++h){let p=n[h];c=[],d=[],u=[],Cbt(e,p,d,u),Vbt(e,p.polyline,d,u),oCe(e,p.rectangle,d,u,c),oCe(e,p.polygon,d,u,c),Lbt(e,p,p.model,d,u);let b,f=p.availability;l(f)&&(b=i.createElement("TimeSpan"),Q.equals(f.start,Je.MINIMUM_VALUE)||b.appendChild(xn(i,"begin",Q.toIso8601(f.start))),Q.equals(f.stop,Je.MAXIMUM_VALUE)||b.appendChild(xn(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(xn(i,"name",p.name)),A.appendChild(xn(i,"visibility",p.show)),A.appendChild(xn(i,"description",p.description)),l(b)&&A.appendChild(b),t.appendChild(A)}let y=d.length;if(y>0){let S=i.createElement("Placemark");S.setAttribute("id",s.get(p.id));let A=p.name,Z=p.label;if(l(Z)){let E=i.createElement("LabelStyle"),L=r.get(Z.text);A=l(L)&&L.length>0?L:A;let v=r.getColor(Z.fillColor);l(v)&&(E.appendChild(xn(i,"color",v)),E.appendChild(xn(i,"colorMode","normal")));let I=r.get(Z.scale);l(I)&&E.appendChild(xn(i,"scale",I)),u.push(E)}S.appendChild(xn(i,"name",A)),S.appendChild(xn(i,"visibility",p.show)),S.appendChild(xn(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 L=0;L<V;++L)E.appendChild(u[L]);S.appendChild(xn(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 L=0;L<y;++L)E.appendChild(d[L]);S.appendChild(E)}}let _=p._children;if(_.length>0){let S=i.createElement("Folder");S.setAttribute("id",s.get(p.id)),S.appendChild(xn(i,"name",p.name)),S.appendChild(xn(i,"visibility",p.show)),S.appendChild(xn(i,"description",p.description)),t.appendChild(S),aCe(e,S,_)}}}var Dd=new m,od=new pe,Yf=new Q;function Cbt(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){cCe(e,t,a,n,i);return}s.get(c,void 0,Dd);let d=xn(o,"coordinates",OS(Dd,r)),u=o.createElement("Point"),h=o.createElement("altitudeMode");h.appendChild(zS(e,a.heightReference)),u.appendChild(h),u.appendChild(d),n.push(u);let p=a instanceof Oc?dCe(e,a):lCe(e,a);i.push(p)}function cCe(e,t,n,i,o){let r=e.kmlDoc,s=e.ellipsoid,a=e.valueGetter,c,d=t.position,u=!0;d instanceof oc?(c=d.intervals,u=!1):c=t.availability??e.defaultAvailability;let h=n instanceof Q0,p,b,f,y=[];for(p=0;p<c.length;++p){let S=c.get(p),A=u?d:S.data,Z=r.createElement("altitudeMode");A instanceof Dp?(A=A._value,Z.appendChild(zS(e,tt.CLAMP_TO_GROUND))):l(n)?Z.appendChild(zS(e,n.heightReference)):Z.appendChild(zS(e,tt.NONE));let V=[],E=[];if(A.isConstant){a.get(A,void 0,Dd);let v=xn(r,"coordinates",OS(Dd,s));V.push(Q.toIso8601(S.start)),E.push(v),V.push(Q.toIso8601(S.stop)),E.push(v)}else if(A instanceof sc)for(f=A._property._times,b=0;b<f.length;++b)V.push(Q.toIso8601(f[b])),A.getValueInReferenceFrame(f[b],Xi.FIXED,Dd),E.push(OS(Dd,s));else if(A instanceof Lu){f=A._times;let v=A._values;for(b=0;b<f.length;++b)V.push(Q.toIso8601(f[b])),m.fromArray(v,b*3,Dd),E.push(OS(Dd,s))}else{let v=e.sampleDuration;S.start.clone(Yf),S.isStartIncluded||Q.addSeconds(Yf,v,Yf);let I=S.stop;for(;Q.lessThan(Yf,I);)A.getValue(Yf,Dd),V.push(Q.toIso8601(Yf)),E.push(OS(Dd,s)),Q.addSeconds(Yf,v,Yf);S.isStopIncluded&&Q.equals(Yf,I)&&(A.getValue(Yf,Dd),V.push(Q.toIso8601(Yf)),E.push(OS(Dd,s)))}let L=r.createElementNS(wf,"Track");L.appendChild(Z);for(let v=0;v<V.length;++v){let I=xn(r,"when",V[v]),X=xn(r,"coord",E[v],wf);L.appendChild(I),L.appendChild(X)}h&&L.appendChild(uCe(e,n)),y.push(L)}if(y.length===1)i.push(y[0]);else if(y.length>1){let S=r.createElementNS(wf,"MultiTrack");for(p=0;p<y.length;++p)S.appendChild(y[p]);i.push(S)}if(l(n)&&!h){let S=n instanceof Oc?dCe(e,n):lCe(e,n);o.push(S)}let _=t.path;if(l(_)){let S=a.get(_.width),A=_.material;if(l(A)||l(S)){let Z=r.createElement("LineStyle");l(S)&&Z.appendChild(xn(r,"width",S)),m$(e,A,Z),o.push(Z)}}}function lCe(e,t){let n=e.kmlDoc,i=e.valueGetter,o=n.createElement("IconStyle"),r=i.getColor(t.color);l(r)&&(o.appendChild(xn(n,"color",r)),o.appendChild(xn(n,"colorMode","normal")));let s=i.get(t.pixelSize);return l(s)&&o.appendChild(xn(n,"scale",s/l$)),o}function dCe(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(xn(n,"href",s));let b=i.get(t.imageSubRegion);l(b)&&(p.appendChild(xn(n,"x",b.x,wf)),p.appendChild(xn(n,"y",b.y,wf)),p.appendChild(xn(n,"w",b.width,wf)),p.appendChild(xn(n,"h",b.height,wf))),r.appendChild(p)}let a=i.getColor(t.color);l(a)&&(r.appendChild(xn(n,"color",a)),r.appendChild(xn(n,"colorMode","normal")));let c=i.get(t.scale);l(c)&&r.appendChild(xn(n,"scale",c));let d=i.get(t.pixelOffset);if(l(d)){c=c??1,M.divideByScalar(d,c,d);let p=i.get(t.width,l$),b=i.get(t.height,l$),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,Dn.CENTER);y===Dn.TOP?d.y+=b:y===Dn.CENTER&&(d.y+=b*.5);let _=n.createElement("hotSpot");_.setAttribute("x",-d.x),_.setAttribute("y",d.y),_.setAttribute("xunits","pixels"),_.setAttribute("yunits","pixels"),r.appendChild(_)}let u=i.get(t.rotation),h=i.get(t.alignedAxis);return l(u)&&m.equals(m.UNIT_Z,h)&&(u=W.toDegrees(-u),u===0&&(u=360),r.appendChild(xn(n,"heading",u))),r}function Vbt(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(xn(o,"tessellate",!0)),u=o.createTextNode("clampToGround")):u=o.createTextNode("absolute"),c.appendChild(u),a.appendChild(c);let h=t.positions,p=s.get(h),b=xn(o,"coordinates",OS(p,r));a.appendChild(b);let f=s.get(t.zIndex);d&&l(f)&&a.appendChild(xn(o,"drawOrder",f,wf)),n.push(a);let y=o.createElement("LineStyle"),_=s.get(t.width);l(_)&&y.appendChild(xn(o,"width",_)),m$(e,t.material,y),i.push(y)}function Rbt(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=[ae.northeast,ae.southeast,ae.southwest,ae.northwest];for(let b=0;b<4;++b)d[b](a,od),c.push(`${W.toDegrees(od.longitude)},${W.toDegrees(od.latitude)},${r}`);let u=xn(i,"coordinates",c.join(" ")),h=i.createElement("outerBoundaryIs"),p=i.createElement("LinearRing");return p.appendChild(u),h.appendChild(p),[h]}function iCe(e,t,n,i){let o=e.kmlDoc,r=e.ellipsoid,s=[],a=t.length;for(let u=0;u<a;++u)pe.fromCartesian(t[u],r,od),s.push(`${W.toDegrees(od.longitude)},${W.toDegrees(od.latitude)},${i?od.height:n}`);let c=xn(o,"coordinates",s.join(" ")),d=o.createElement("LinearRing");return d.appendChild(c),d}function Ebt(e,t,n){let i=e.kmlDoc,o=e.valueGetter,r=o.get(t.height,0),s=o.get(t.perPositionHeight,!1);!s&&n>0&&(r=n);let a=[],c=t.hierarchy,d=o.get(c),u=Array.isArray(d)?d:d.positions,h=i.createElement("outerBoundaryIs");h.appendChild(iCe(e,u,r,s)),a.push(h);let p=d.holes;if(l(p)){let b=p.length;for(let f=0;f<b;++f){let y=i.createElement("innerBoundaryIs");y.appendChild(iCe(e,p[f].positions,r,s)),a.push(y)}}return a}function oCe(e,t,n,i,o){let r=e.kmlDoc,s=e.valueGetter;if(!l(t))return;let a=t instanceof wh;if(a&&s.getMaterialType(t.material)==="Image"){Gbt(e,t,o);return}let c=r.createElement("Polygon"),d=s.get(t.extrudedHeight,0);d>0&&c.appendChild(xn(r,"extrude",!0));let u=a?Rbt(e,t,d):Ebt(e,t,d),h=u.length;for(let _=0;_<h;++_)c.appendChild(u[_]);let p=r.createElement("altitudeMode");p.appendChild(zS(e,t.heightReference)),c.appendChild(p),n.push(c);let b=r.createElement("PolyStyle"),f=s.get(t.fill,!1);f&&b.appendChild(xn(r,"fill",f)),m$(e,t.material,b);let y=s.get(t.outline,!1);if(y){b.appendChild(xn(r,"outline",y));let _=r.createElement("LineStyle"),S=s.get(t.outlineWidth,1);_.appendChild(xn(r,"width",S));let A=s.getColor(t.outlineColor,U.BLACK);_.appendChild(xn(r,"color",A)),_.appendChild(xn(r,"colorMode","normal")),i.push(_)}i.push(b)}function Gbt(e,t,n){let i=e.kmlDoc,o=e.valueGetter,r=e.externalFileHandler,s=i.createElement("GroundOverlay"),a=i.createElement("altitudeMode");a.appendChild(zS(e,t.heightReference)),s.appendChild(a);let c=o.get(t.height);l(c)&&s.appendChild(xn(i,"altitude",c));let d=o.get(t.coordinates),u=i.createElement("LatLonBox");u.appendChild(xn(i,"north",W.toDegrees(d.north))),u.appendChild(xn(i,"south",W.toDegrees(d.south))),u.appendChild(xn(i,"east",W.toDegrees(d.east))),u.appendChild(xn(i,"west",W.toDegrees(d.west))),s.appendChild(u);let h=o.get(t.material),p=r.texture(h.image),b=i.createElement("Icon");b.appendChild(xn(i,"href",p)),s.appendChild(b);let f=h.color;l(f)&&s.appendChild(xn(i,"color",BS(h.color))),n.push(s)}function uCe(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(xn(n,"x",s)),d.appendChild(xn(n,"y",s)),d.appendChild(xn(n,"z",s)),r.appendChild(d)}let a=n.createElement("Link"),c=o.model(t,e.time);return a.appendChild(xn(n,"href",c)),r.appendChild(a),r}function Lbt(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){cCe(e,t,n,i,o);return}let d=uCe(e,n),u=r.createElement("altitudeMode");u.appendChild(zS(e,n.heightReference)),d.appendChild(u),a.get(c,void 0,Dd),pe.fromCartesian(Dd,s,od);let h=r.createElement("Location");h.appendChild(xn(r,"longitude",W.toDegrees(od.longitude))),h.appendChild(xn(r,"latitude",W.toDegrees(od.latitude))),h.appendChild(xn(r,"altitude",od.height)),d.appendChild(h),i.push(d)}function m$(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=BS(U.WHITE);break;case"Color":case"Grid":case"PolylineGlow":case"PolylineArrow":case"PolylineDash":s=BS(r.color);break;case"PolylineOutline":s=BS(r.color),c=BS(r.outlineColor),d=r.outlineWidth,n.appendChild(xn(i,"outerColor",c,wf)),n.appendChild(xn(i,"outerWidth",d,wf));break;case"Stripe":s=BS(r.oddColor);break}l(s)&&(n.appendChild(xn(i,"color",s)),n.appendChild(xn(i,"colorMode","normal")))}function zS(e,t){let n=e.kmlDoc,o=e.valueGetter.get(t,tt.NONE),r;switch(o){case tt.NONE:r=n.createTextNode("absolute");break;case tt.CLAMP_TO_GROUND:r=n.createTextNode("clampToGround");break;case tt.RELATIVE_TO_GROUND:r=n.createTextNode("relativeToGround");break}return r}function OS(e,t){Array.isArray(e)||(e=[e]);let n=e.length,i=[];for(let o=0;o<n;++o)pe.fromCartesian(e[o],t,od),i.push(`${W.toDegrees(od.longitude)},${W.toDegrees(od.latitude)},${od.height}`);return i.join(" ")}function xn(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 BS(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 h$=u$;var Ffo=x(T(),1);var MDi=x(T(),1);var IDi=x(T(),1);var GDi=x(T(),1);async function Wbt(e,t,n,i){return l(i)||(i=!1),Ibt(e,t,n,i)}function vbt(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(hCe(i)):r=o.then(hCe(i)).catch(Pbt(i)),e.shift(),t.push(r),!0}function Fbt(e){return new Promise(function(t){setTimeout(t,e)})}function f$(e,t,n){return e.length?vbt(e,t,n)?f$(e,t,n):Fbt(100).then(()=>f$(e,t,n)):Promise.resolve()}function Ibt(e,t,n,i){let o=e.tilingScheme,r,s=[],a={};for(r=0;r<n.length;++r){let d=o.positionToTileXY(n[r],t);if(!l(d))continue;let u=d.toString();if(!a.hasOwnProperty(u)){let h={x:d.x,y:d.y,level:t,tilingScheme:o,terrainProvider:e,positions:[]};a[u]=h,s.push(h)}a[u].positions.push(n[r])}let c=[];return f$(s,c,i).then(function(){return Promise.all(c).then(function(){return n})})}function mCe(e,t,n){let i=t.interpolateHeight(n,e.longitude,e.latitude);return i===void 0?!1:(e.height=i,!0)}function hCe(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(!mCe(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];mCe(s,i,n)}}):Promise.resolve()}}function Pbt(e){let t=e.positions;return function(){for(let n=0;n<t.length;++n){let i=t[n];i.height=void 0}}}var IY=Wbt;var p$=new M;async function fCe(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,p$);let p=e.loadTileDataAvailability(p$.x,p$.y,1);l(p)&&s.push(p)}let h=i[u];l(h)||(i[u]=h=[]),h.push(d)}await Promise.all(s),await Promise.all(i.map(function(c,d){if(l(c))return IY(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 fCe(e,a,n),t}var HS=fCe;async function b$(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=[ae.center(e),ae.southeast(e),ae.southwest(e),ae.northeast(e),ae.northwest(e)],d=await b$._sampleTerrainMostDetailed(n,c),u=!1,h=d.reduce(function(b,f){return l(f.height)?(u=!0,Math.max(f.height,b)):b},-Number.MAX_VALUE),p=r;return u&&(p.height+=h),p}b$._sampleTerrainMostDetailed=HS;var KS=b$;var tKi=x(T(),1);var yBi=x(T(),1);var lBi=x(T(),1);var UDi=x(T(),1),pCe={NONE:0,LERC:1};Object.freeze(pCe);var ah=pCe;var gOi=x(T(),1);var tOi=x(T(),1);var ODi=x(T(),1),bCe={NONE:0,BITS12:1};Object.freeze(bCe);var ka=bCe;var PY=new m,Xbt=new m,ch=new M,Nbt=new F,Ybt=new F,wbt=Math.pow(2,12);function Lc(e,t,n,i,o,r,s,a,c,d){let u=ka.NONE,h,p;if(l(t)&&l(n)&&l(i)&&l(o)){let b=t.minimum,f=t.maximum,y=m.subtract(f,b,Xbt),_=i-n;Math.max(m.maximumComponent(y),_)<wbt-1?u=ka.BITS12:u=ka.NONE;let A=F.fromScale(y,Nbt);A=F.setTranslation(A,b,A);let Z=F.fromScale(m.fromElements(1/y.x,1/y.y,1/y.z,PY),Ybt);Z=F.multiplyByTranslation(Z,m.negate(b,PY),Z),p=F.clone(o,new F);let V=F.getTranslation(o,PY);V=m.subtract(V,e,PY),p=F.setTranslation(p,V,p),p=F.multiply(p,A,p),h=F.inverseTransformation(o,new F),h=F.multiply(Z,h,h),o=F.multiply(o,A,new F)}this.quantization=u,this.minimumHeight=n,this.maximumHeight=i,this.center=m.clone(e),this.toScaledENU=h,this.fromScaledENU=o,this.matrix=p,this.hasVertexNormals=r??!1,this.hasWebMercatorT=s??!1,this.hasGeodeticSurfaceNormals=a??!1,this.exaggeration=c??1,this.exaggerationRelativeHeight=d??0,this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}Lc.prototype.encode=function(e,t,n,i,o,r,s,a){let c=i.x,d=i.y;if(this.quantization===ka.BITS12){n=F.multiplyByPoint(this.toScaledENU,n,PY),n.x=W.clamp(n.x,0,1),n.y=W.clamp(n.y,0,1),n.z=W.clamp(n.z,0,1);let u=this.maximumHeight-this.minimumHeight,h=W.clamp((o-this.minimumHeight)/u,0,1);M.fromElements(n.x,n.y,ch);let p=cn.compressTextureCoordinates(ch);M.fromElements(n.z,h,ch);let b=cn.compressTextureCoordinates(ch);M.fromElements(c,d,ch);let f=cn.compressTextureCoordinates(ch);if(e[t++]=p,e[t++]=b,e[t++]=f,this.hasWebMercatorT){M.fromElements(s,0,ch);let y=cn.compressTextureCoordinates(ch);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++]=cn.octPackFloat(r)),this.hasGeodeticSurfaceNormals&&(e[t++]=a.x,e[t++]=a.y,e[t++]=a.z),t};var Mbt=new m,gCe=new m;Lc.prototype.addGeodeticSurfaceNormals=function(e,t,n){if(this.hasGeodeticSurfaceNormals)return;let i=this.stride,o=e.length/i;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();let r=this.stride;for(let s=0;s<o;s++){for(let u=0;u<i;u++){let h=s*i+u,p=s*r+u;t[p]=e[h]}let a=this.decodePosition(t,s,Mbt),c=n.geodeticSurfaceNormal(a,gCe),d=s*r+this._offsetGeodeticSurfaceNormal;t[d]=c.x,t[d+1]=c.y,t[d+2]=c.z}};Lc.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]}};Lc.prototype.decodePosition=function(e,t,n){if(l(n)||(n=new m),t*=this.stride,this.quantization===ka.BITS12){let i=cn.decompressTextureCoordinates(e[t],ch);n.x=i.x,n.y=i.y;let o=cn.decompressTextureCoordinates(e[t+1],ch);return n.z=o.x,F.multiplyByPoint(this.fromScaledENU,n,n)}return n.x=e[t],n.y=e[t+1],n.z=e[t+2],m.add(n,this.center,n)};Lc.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,gCe),a=this.decodeHeight(e,t),c=ao.getHeight(a,i,o)-a;n.x+=s.x*c,n.y+=s.y*c,n.z+=s.z*c}return n};Lc.prototype.decodeTextureCoordinates=function(e,t,n){return l(n)||(n=new M),t*=this.stride,this.quantization===ka.BITS12?cn.decompressTextureCoordinates(e[t+2],n):M.fromElements(e[t+4],e[t+5],n)};Lc.prototype.decodeHeight=function(e,t){return t*=this.stride,this.quantization===ka.BITS12?cn.decompressTextureCoordinates(e[t+1],ch).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:e[t+3]};Lc.prototype.decodeWebMercatorT=function(e,t){return t*=this.stride,this.quantization===ka.BITS12?cn.decompressTextureCoordinates(e[t+3],ch).x:e[t+6]};Lc.prototype.getOctEncodedNormal=function(e,t,n){t=t*this.stride+this._offsetVertexNormal;let i=e[t]/256,o=Math.floor(i),r=(i-o)*256;return M.fromElements(o,r,n)};Lc.prototype.decodeNormal=function(e,t,n){let i=t=t*this.stride+this._offsetVertexNormal;return cn.octDecodeFloat(e[i],n)};Lc.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};Lc.prototype._calculateStrideAndOffsets=function(){let e=0;this.quantization===ka.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 e3={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2},t3={compressed0:0,compressed1:1,geodeticSurfaceNormal:2};Lc.prototype.getAttributes=function(e){let t=K.FLOAT,n=K.getSizeInBytes(t),i=this.stride*n,o=0,r=[];function s(a,c){r.push({index:a,vertexBuffer:e,componentDatatype:t,componentsPerAttribute:c,offsetInBytes:o,strideInBytes:i}),o+=c*n}if(this.quantization===ka.NONE){s(e3.position3DAndHeight,4);let a=2;a+=this.hasWebMercatorT?1:0,a+=this.hasVertexNormals?1:0,s(e3.textureCoordAndEncodedNormals,a),this.hasGeodeticSurfaceNormals&&s(e3.geodeticSurfaceNormal,3)}else{let a=this.hasWebMercatorT||this.hasVertexNormals,c=this.hasWebMercatorT&&this.hasVertexNormals;s(t3.compressed0,a?4:3),c&&s(t3.compressed1,1),this.hasGeodeticSurfaceNormals&&s(t3.geodeticSurfaceNormal,3)}return r};Lc.prototype.getAttributeLocations=function(){return this.quantization===ka.NONE?e3:t3};Lc.clone=function(e,t){if(l(e))return l(t)||(t=new Lc),t.quantization=e.quantization,t.minimumHeight=e.minimumHeight,t.maximumHeight=e.maximumHeight,t.center=m.clone(e.center),t.toScaledENU=F.clone(e.toScaledENU),t.fromScaledENU=F.clone(e.fromScaledENU),t.matrix=F.clone(e.matrix),t.hasVertexNormals=e.hasVertexNormals,t.hasWebMercatorT=e.hasWebMercatorT,t.hasGeodeticSurfaceNormals=e.hasGeodeticSurfaceNormals,t.exaggeration=e.exaggeration,t.exaggerationRelativeHeight=e.exaggerationRelativeHeight,t._calculateStrideAndOffsets(),t};var mr=Lc;var r0={};r0.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var g$=new m,kbt=new F,Ubt=new m,Dbt=new m;r0.computeVertices=function(e){let t=Math.cos,n=Math.sin,i=Math.sqrt,o=Math.atan,r=Math.exp,s=W.PI_OVER_TWO,a=W.toRadians,c=e.heightmap,d=e.width,u=e.height,h=e.skirtHeight,p=h>0,b=e.isGeographic??!0,f=e.ellipsoid??ie.default,y=1/f.maximumRadius,_=ae.clone(e.nativeRectangle),S=ae.clone(e.rectangle),A,Z,V,E;l(S)?(A=S.west,Z=S.south,V=S.east,E=S.north):b?(A=a(_.west),Z=a(_.south),V=a(_.east),E=a(_.north)):(A=_.west*y,Z=s-2*o(r(-_.south*y)),V=_.east*y,E=s-2*o(r(-_.north*y)));let L=e.relativeToCenter,v=l(L);L=v?L:m.ZERO;let I=e.includeWebMercatorT??!1,X=e.exaggeration??1,N=e.exaggerationRelativeHeight??0,C=X!==1,R=e.structure??r0.DEFAULT_STRUCTURE,G=R.heightScale??r0.DEFAULT_STRUCTURE.heightScale,P=R.heightOffset??r0.DEFAULT_STRUCTURE.heightOffset,Y=R.elementsPerHeight??r0.DEFAULT_STRUCTURE.elementsPerHeight,O=R.stride??r0.DEFAULT_STRUCTURE.stride,k=R.elementMultiplier??r0.DEFAULT_STRUCTURE.elementMultiplier,D=R.isBigEndian??r0.DEFAULT_STRUCTURE.isBigEndian,w=ae.computeWidth(_),z=ae.computeHeight(_),J=w/(d-1),ee=z/(u-1);b||(w*=y,z*=y);let H=f.radiiSquared,te=H.x,$=H.y,be=H.z,ye=65536,ce=-65536,Ze=dt.eastNorthUpToFixedFrame(L,f),xe=F.inverseTransformation(Ze,kbt),Ge,Ve;I&&(Ge=li.geodeticLatitudeToMercatorAngle(Z),Ve=1/(li.geodeticLatitudeToMercatorAngle(E)-Ge));let Ye=Ubt;Ye.x=Number.POSITIVE_INFINITY,Ye.y=Number.POSITIVE_INFINITY,Ye.z=Number.POSITIVE_INFINITY;let ke=Dbt;ke.x=Number.NEGATIVE_INFINITY,ke.y=Number.NEGATIVE_INFINITY,ke.z=Number.NEGATIVE_INFINITY;let it=Number.POSITIVE_INFINITY,pt=d*u,Vt=h>0?d*2+u*2:0,Ue=pt+Vt,St=new Array(Ue),ht=new Array(Ue),ot=new Array(Ue),Jt=I?new Array(Ue):[],jt=C?new Array(Ue):[],yt=0,Gt=u,ln=0,st=d;p&&(--yt,++Gt,--ln,++st);let Nn=1e-5;for(let Yn=yt;Yn<Gt;++Yn){let Ui=Yn;Ui<0&&(Ui=0),Ui>=u&&(Ui=u-1);let Vi=_.north-ee*Ui;b?Vi=a(Vi):Vi=s-2*o(r(-Vi*y));let ir=(Vi-Z)/(E-Z);ir=W.clamp(ir,0,1);let wr=Yn===yt,Ss=Yn===Gt-1;h>0&&(wr?Vi+=Nn*z:Ss&&(Vi-=Nn*z));let Vr=t(Vi),wn=n(Vi),uo=be*wn,An;I&&(An=(li.geodeticLatitudeToMercatorAngle(Vi)-Ge)*Ve);for(let Uo=ln;Uo<st;++Uo){let Eo=Uo;Eo<0&&(Eo=0),Eo>=d&&(Eo=d-1);let na=Ui*(d*O)+Eo*O,Wi;if(Y===1)Wi=c[na];else{Wi=0;let Xo;if(D)for(Xo=0;Xo<Y;++Xo)Wi=Wi*k+c[na+Xo];else for(Xo=Y-1;Xo>=0;--Xo)Wi=Wi*k+c[na+Xo]}Wi=Wi*G+P,ce=Math.max(ce,Wi),ye=Math.min(ye,Wi);let Go=_.west+J*Eo;b?Go=a(Go):Go=Go*y;let gc=(Go-A)/(V-A);gc=W.clamp(gc,0,1);let ws=Ui*d+Eo;if(h>0){let Xo=Uo===ln,md=Uo===st-1,kg=wr||Ss||Xo||md;if((wr||Ss)&&(Xo||md))continue;kg&&(Wi-=h,Xo?(ws=pt+(u-Ui-1),Go-=Nn*w):Ss?ws=pt+u+(d-Eo-1):md?(ws=pt+u+d+Ui,Go+=Nn*w):wr&&(ws=pt+u+d+u+Eo))}let As=Vr*t(Go),es=Vr*n(Go),C0=te*As,Za=$*es,nm=1/i(C0*As+Za*es+uo*wn),Lo=C0*nm,Ic=Za*nm,ud=uo*nm,$d=new m;$d.x=Lo+As*Wi,$d.y=Ic+es*Wi,$d.z=ud+wn*Wi,F.multiplyByPoint(xe,$d,g$),m.minimumByComponent(g$,Ye,Ye),m.maximumByComponent(g$,ke,ke),it=Math.min(it,Wi),St[ws]=$d,ot[ws]=new M(gc,ir),ht[ws]=Wi,I&&(Jt[ws]=An),C&&(jt[ws]=f.geodeticSurfaceNormal($d))}}let Zi=de.fromPoints(St),Ci;l(S)&&(Ci=$t.fromRectangle(S,ye,ce,f));let Dt;v&&(Dt=new _f(f).computeHorizonCullingPointPossiblyUnderEllipsoid(L,St,ye));let Ro=new au(Ye,ke,L),ki=new mr(L,Ro,it,ce,Ze,!1,I,C,X,N),ri=new Float32Array(Ue*ki.stride),kn=0;for(let Yn=0;Yn<Ue;++Yn)kn=ki.encode(ri,kn,St[Yn],ot[Yn],ht[Yn],void 0,Jt[Yn],jt[Yn]);return{vertices:ri,maximumHeight:ce,minimumHeight:ye,encoding:ki,boundingSphere3D:Zi,orientedBoundingBox:Ci,occludeePointInScaledSpace:Dt}};var ER=r0;var TOi=x(T(),1);function vx(){he.throwInstantiationError()}Object.defineProperties(vx.prototype,{credits:{get:he.throwInstantiationError},waterMask:{get:he.throwInstantiationError}});vx.prototype.interpolateHeight=he.throwInstantiationError;vx.prototype.isChildAvailable=he.throwInstantiationError;vx.prototype.createMesh=he.throwInstantiationError;vx.prototype.upsample=he.throwInstantiationError;vx.prototype.wasCreatedByUpsampling=he.throwInstantiationError;vx.maximumAsynchronousTasks=5;var Od=vx;var zOi=x(T(),1);var FOi=x(T(),1);var Obt=3;function T$(e,t,n){this._vertices=e,this._indices=t,this._encoding=n,this._inverseTransform=new F,this._needsRebuild=!0,this._rootNode=new x$}var Bbt=new Hn("incrementallyBuildTerrainPicker");Object.defineProperties(T$.prototype,{needsRebuild:{get:function(){return this._needsRebuild},set:function(e){this._needsRebuild=e}}});function x$(){this.x=0,this.y=0,this.level=0,this.aabb=yCe(this.x,this.y,this.level),this.intersectingTriangles=new Uint32Array(0),this.children=[],this.buildingChildren=!1}x$.prototype.addChild=function(e){let t=new x$;t.x=this.x*2+(e&1),t.y=this.y*2+(e>>1&1),t.level=this.level+1,t.aabb=yCe(t.x,t.y,t.level),this.children[e]=t};var zbt=new gn,n3=[new m,new m,new m];T$.prototype.rayIntersect=function(e,t,n,i,o){this._needsRebuild&&Hbt(this,t);let r=this._inverseTransform,s=zbt;s.origin=F.multiplyByPoint(r,e.origin,s.origin),s.direction=F.multiplyByPointAsVector(r,e.direction,s.direction);let a=[];return xCe(this._rootNode,s,a),qbt(this,a,e,n,i,o)};function Hbt(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 Kbt=new m,Jbt=new m;function yCe(e,t,n){let i=1/Math.pow(2,n),o=m.fromElements(e*i-.5,t*i-.5,-.5,Kbt),r=m.fromElements((e+1)*i-.5,(t+1)*i-.5,.5,Jbt);return au.fromCorners(o,r)}function jbt(e,t,n,i,o){m.pack(n[0],e,9*o),m.pack(n[1],e,9*o+3),m.pack(n[2],e,9*o+6),t[o]=i}var Qbt=new Or;function xCe(e,t,n){let i=ai.rayAxisAlignedBoundingBox(t,e.aabb,Qbt);if(!l(i))return;if(!e.children.length||e.buildingChildren){n.push({node:e,interval:new Or(i.start,i.stop)});return}for(let r=0;r<e.children.length;r++)xCe(e.children[r],t,n)}function qbt(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=$bt(e,n,d.node,i,o,r);if(a=Math.min(u,a),a!==Number.MAX_VALUE)break}if(a!==Number.MAX_VALUE)return gn.getPoint(n,a)}function $bt(e,t,n,i,o,r){let s=Number.MAX_VALUE,a=e._encoding,c=e._indices,d=e._vertices,u=n.intersectingTriangles.length,p=!(n.level>=Obt)&&!n.buildingChildren,b,f;p&&(b=new Float64Array(u*9),f=new Uint32Array(u));for(let y=0;y<u;y++){let _=n.intersectingTriangles[y],S=y$(a,o,r,t,d,c[3*_],n3[0]),A=y$(a,o,r,t,d,c[3*_+1],n3[1]),Z=y$(a,o,r,t,d,c[3*_+2],n3[2]),V=ai.rayTriangleParametric(t,S,A,Z,i);l(V)&&V<s&&V>=0&&(s=V),p&&jbt(b,f,n3,_,y)}if(p){for(let y=0;y<4;y++)n.addChild(y);tgt(e._inverseTransform,n,f,b)}return s}var egt=new pe;function y$(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,egt);a=n.project(d,s),a=m.fromElements(a.z,a.x,a.y,s);let u=W.TWO_PI*n.ellipsoid.maximumRadius,h=Math.round((i.origin.y-a.y)/u);return a.y+=h*u,a}async function tgt(e,t,n,i){t.buildingChildren=!0;let o=new Float64Array(16);F.pack(e,o,0);let r=new Float64Array(24);for(let u=0;u<4;u++)m.pack(t.children[u].aabb.minimum,r,u*6),m.pack(t.children[u].aabb.maximum,r,u*6+3);let s={aabbs:r,inverseTransform:o,triangleIndices:n,trianglePositions:i},a=[r.buffer,o.buffer,n.buffer,i.buffer],c=Bbt.scheduleTask(s,a);if(!l(c)){t.buildingChildren=!1;return}(await c).intersectingTrianglesArrays.forEach((u,h)=>{l(t.children[h])&&(t.children[h].intersectingTriangles=new Uint32Array(u))}),t.intersectingTriangles=new Uint32Array(0),t.buildingChildren=!1}var XY=T$;function NY(e,t,n,i,o,r,s,a,c,d,u,h,p,b,f,y,_){this.center=e,this.vertices=t,this.stride=u??6,this.indices=n,this.indexCountWithoutSkirts=i,this.vertexCountWithoutSkirts=o,this.minimumHeight=r,this.maximumHeight=s,this.rectangle=a,this.boundingSphere3D=c,this.occludeePointInScaledSpace=d,this.orientedBoundingBox=h,this.encoding=p,this.westIndicesSouthToNorth=b,this.southIndicesEastToWest=f,this.eastIndicesNorthToSouth=y,this.northIndicesWestToEast=_,this._transform=new F,this._lastPickSceneMode=void 0,this._terrainPicker=new XY(t,n,p)}NY.prototype.getTransform=function(e,t){return this._lastPickSceneMode===e?this._transform:(this._terrainPicker.needsRebuild=!0,!l(e)||e===re.SCENE3D?ngt(this,this._transform):lgt(this,t,this._transform))};function ngt(e,t){let n=e.encoding.exaggeration,i=e.encoding.exaggerationRelativeHeight,o=ao.getHeight(e.minimumHeight,n,i),r=ao.getHeight(e.maximumHeight,n,i),s=$t.fromRectangle(e.rectangle,o,r,ie.default,e.orientedBoundingBox);return $t.computeTransformation(s,t),F.getScale(t,_$).z<=W.EPSILON16&&(_$.z=1,F.setScale(t,_$,t)),t}var igt=new m,ogt=new m,rgt=new pe,sgt=new pe,agt=new m,cgt=new m,_$=new m;function lgt(e,t,n){let i=e.encoding.exaggeration,o=e.encoding.exaggerationRelativeHeight,r=ao.getHeight(e.minimumHeight,i,o),s=ao.getHeight(e.maximumHeight,i,o),a=t.project(pe.fromRadians(e.rectangle.west,e.rectangle.south,0,rgt),igt),c=t.project(pe.fromRadians(e.rectangle.east,e.rectangle.north,0,sgt),ogt),d=s-r,u=m.fromElements(c.x-a.x,c.y-a.y,d>0?d:1,agt),h=m.fromElements(a.x+u.x*.5,a.y+u.y*.5,r+u.z*.5,cgt);return F.fromTranslation(h,n),F.setScale(n,u,n),F.multiply(dt.SWIZZLE_3D_TO_2D_MATRIX,n,n),n}NY.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};NY.prototype.updateExaggeration=function(e,t){this._terrainPicker._vertices=this.vertices,this._terrainPicker.needsRebuild=!0,this._lastPickSceneMode=void 0};NY.prototype.updateSceneMode=function(e){this._terrainPicker.needsRebuild=!0,this._lastPickSceneMode=void 0};var uc=NY;function xg(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??ah.NONE;let t=ER.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===ah.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0}Object.defineProperties(xg.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}}});var TCe="createVerticesFromHeightmap",dgt=new Hn(TCe),ugt=new Hn(TCe,Od.maximumAsynchronousTasks);xg.prototype.createMesh=function(e){e=e??B.EMPTY_OBJECT;let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=e.exaggeration??1,s=e.exaggerationRelativeHeight??0,a=e.throttle??!0,c=t.ellipsoid,d=t.tileXYToNativeRectangle(n,i,o),u=t.tileXYToRectangle(n,i,o),h=c.cartographicToCartesian(ae.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?ugt:dgt).scheduleTask({heightmap:this._buffer,structure:p,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:d,rectangle:u,relativeToCenter:h,ellipsoid:c,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof Di,exaggeration:r,exaggerationRelativeHeight:s,encoding:this._encoding});if(!l(_))return;let S=this;return Promise.resolve(_).then(function(A){let Z;S._skirtHeight>0?Z=Mo.getRegularGridAndSkirtIndicesAndEdgeIndices(A.gridWidth,A.gridHeight):Z=Mo.getRegularGridIndicesAndEdgeIndices(A.gridWidth,A.gridHeight);let V=A.gridWidth*A.gridHeight;return S._mesh=new uc(h,new Float32Array(A.vertices),Z.indices,Z.indexCountWithoutSkirts,V,A.minimumHeight,A.maximumHeight,u,de.clone(A.boundingSphere3D),m.clone(A.occludeePointInScaledSpace),A.numberOfAttributes,$t.clone(A.orientedBoundingBox),mr.clone(A.encoding),Z.westIndicesSouthToNorth,Z.southIndicesEastToWest,Z.eastIndicesNorthToSouth,Z.northIndicesWestToEast),S._buffer=void 0,S._mesh})};xg.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(ae.center(d)),h=this._structure,b=Mo.getEstimatedLevelZeroGeometricErrorForAHeightmap(a,this._width,t.getNumberOfXTilesAtLevel(0))/(1<<o);this._skirtHeight=Math.min(b*4,1e3);let f=ER.computeVertices({heightmap:this._buffer,structure:h,includeWebMercatorT:!0,width:this._width,height:this._height,nativeRectangle:c,rectangle:d,relativeToCenter:u,ellipsoid:a,skirtHeight:this._skirtHeight,isGeographic:t.projection instanceof 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 uc(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};xg.prototype.interpolateHeight=function(e,t,n){let i=this._width,o=this._height,r=this._structure,s=r.stride,a=r.elementsPerHeight,c=r.elementMultiplier,d=r.isBigEndian,u=r.heightOffset,h=r.heightScale,p=l(this._mesh),b=this._encoding===ah.LERC;if(!p&&b)return;let y;if(p){let _=this._mesh.vertices,S=this._mesh.encoding;y=_Ce(_,S,u,h,e,i,o,t,n)}else y=mgt(this._buffer,a,c,s,d,e,i,o,t,n),y=y*h+u;return y};xg.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(a))return;let c=this._width,d=this._height,u=this._structure,h=u.stride,p=new this._bufferType(c*d*h),b=a.vertices,f=a.encoding,y=e.tileXYToRectangle(t,n,i),_=e.tileXYToRectangle(o,r,s),S=u.heightOffset,A=u.heightScale,Z=u.elementsPerHeight,V=u.elementMultiplier,E=u.isBigEndian,L=Math.pow(V,Z-1);for(let v=0;v<d;++v){let I=W.lerp(_.north,_.south,v/(d-1));for(let X=0;X<c;++X){let N=W.lerp(_.west,_.east,X/(c-1)),g=_Ce(b,f,S,A,y,c,d,N,I);g=g<u.lowestEncodedHeight?u.lowestEncodedHeight:g,g=g>u.highestEncodedHeight?u.highestEncodedHeight:g,hgt(p,Z,V,L,h,E,v*c+X,g)}}return Promise.resolve(new xg({buffer:p,width:c,height:d,childTileMask:0,structure:this._structure,createdByUpsampling:!0}))};xg.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};xg.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};function mgt(e,t,n,i,o,r,s,a,c,d){let u=(c-r.west)*(s-1)/(r.east-r.west),h=(d-r.south)*(a-1)/(r.north-r.south),p=u|0,b=p+1;b>=s&&(b=s-1,p=s-2);let f=h|0,y=f+1;y>=a&&(y=a-1,f=a-2);let _=u-p,S=h-f;f=a-1-f,y=a-1-y;let A=i3(e,t,n,i,o,f*s+p),Z=i3(e,t,n,i,o,f*s+b),V=i3(e,t,n,i,o,y*s+p),E=i3(e,t,n,i,o,y*s+b);return SCe(_,S,A,Z,V,E)}function _Ce(e,t,n,i,o,r,s,a,c){let d=(a-o.west)*(r-1)/(o.east-o.west),u=(c-o.south)*(s-1)/(o.north-o.south),h=d|0,p=h+1;p>=r&&(p=r-1,h=r-2);let b=u|0,f=b+1;f>=s&&(f=s-1,b=s-2);let y=d-h,_=u-b;b=s-1-b,f=s-1-f;let S=(t.decodeHeight(e,b*r+h)-n)/i,A=(t.decodeHeight(e,b*r+p)-n)/i,Z=(t.decodeHeight(e,f*r+h)-n)/i,V=(t.decodeHeight(e,f*r+p)-n)/i;return SCe(y,_,S,A,Z,V)}function SCe(e,t,n,i,o,r){return t<e?n+e*(i-n)+t*(r-i):n+e*(r-o)+t*(o-n)}function i3(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 hgt(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 Wc=xg;function GR(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(GR.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(){}}});GR.prototype.requestTileGeometry=function(e,t,n,i){return Promise.resolve(new Wc({buffer:new Uint8Array(256),width:16,height:16}))};GR.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};GR.prototype.getTileDataAvailable=function(e,t,n){};GR.prototype.loadTileDataAvailability=function(e,t,n){};var s0=GR;var TBi=x(T(),1),YY=`uniform vec4 u_initialColor;
#if TEXTURE_UNITS > 0
uniform sampler2D u_dayTextures[TEXTURE_UNITS];
uniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];
uniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];
#ifdef APPLY_ALPHA
uniform float u_dayTextureAlpha[TEXTURE_UNITS];
#endif
#ifdef APPLY_DAY_NIGHT_ALPHA
uniform float u_dayTextureNightAlpha[TEXTURE_UNITS];
uniform float u_dayTextureDayAlpha[TEXTURE_UNITS];
#endif
#ifdef APPLY_SPLIT
uniform float u_dayTextureSplit[TEXTURE_UNITS];
#endif
#ifdef APPLY_BRIGHTNESS
uniform float u_dayTextureBrightness[TEXTURE_UNITS];
#endif
#ifdef APPLY_CONTRAST
uniform float u_dayTextureContrast[TEXTURE_UNITS];
#endif
#ifdef APPLY_HUE
uniform float u_dayTextureHue[TEXTURE_UNITS];
#endif
#ifdef APPLY_SATURATION
uniform float u_dayTextureSaturation[TEXTURE_UNITS];
#endif
#ifdef APPLY_GAMMA
uniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];
#endif
#ifdef APPLY_IMAGERY_CUTOUT
uniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];
#endif
#ifdef APPLY_COLOR_TO_ALPHA
uniform vec4 u_colorsToAlpha[TEXTURE_UNITS];
#endif
uniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];
#endif
#if defined(HAS_WATER_MASK) && (defined(SHOW_REFLECTIVE_OCEAN) || defined(APPLY_MATERIAL))
uniform sampler2D u_waterMask;
uniform vec4 u_waterMaskTranslationAndScale;
uniform float u_zoomedOutOceanSpecularIntensity;
#endif
#ifdef SHOW_OCEAN_WAVES
uniform sampler2D u_oceanNormalMap;
#endif
#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)
uniform vec2 u_lightingFadeDistance;
#endif
#ifdef TILE_LIMIT_RECTANGLE
uniform vec4 u_cartographicLimitRectangle;
#endif
#ifdef GROUND_ATMOSPHERE
uniform vec2 u_nightFadeDistance;
#endif
#ifdef ENABLE_CLIPPING_PLANES
uniform highp sampler2D u_clippingPlanes;
uniform mat4 u_clippingPlanesMatrix;
uniform vec4 u_clippingPlanesEdgeStyle;
#endif
#ifdef ENABLE_CLIPPING_POLYGONS
uniform highp sampler2D u_clippingDistance;
in vec2 v_clippingPosition;
flat in int v_regionIndex;
#endif
#if defined(GROUND_ATMOSPHERE) || defined(FOG) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
uniform float u_minimumBrightness;
#endif
// Based on colorCorrect
// The colorCorrect flag can only be true when tileProvider.hue/saturation/brightnessShift
// are nonzero AND when (applyFog || showGroundAtmosphere) in the tile provider
// - The tileProvider.hue/saturation/brightnessShift are just passed through
// from the Globe hue/saturation/brightness, like atmosphereBrightnessShift
// - The applyFog depends on enableFog, and some tile distance from the viewer
// - The showGroundAtmosphere is a flag that is passed through from the Globe,
// and is true by default when the ellipsoid is WGS84
#ifdef COLOR_CORRECT
uniform vec3 u_hsbShift; // Hue, saturation, brightness
#endif
// Based on highlightFillTile
// This is set for terrain tiles when they are "fill" tiles, and
// the terrainProvider.fillHighlightColor was set to a value with
// nonzero alpha
#ifdef HIGHLIGHT_FILL_TILE
uniform vec4 u_fillHighlightColor;
#endif
// Based on translucent
// This is set depending on the GlobeTranslucencyState
#ifdef TRANSLUCENT
uniform vec4 u_frontFaceAlphaByDistance;
uniform vec4 u_backFaceAlphaByDistance;
uniform vec4 u_translucencyRectangle;
#endif
// Based on showUndergroundColor
// This is set when GlobeSurfaceTileProvider.isUndergroundVisible
// returns true, AND the tileProvider.undergroundColor had a value with
// nonzero alpha, and the tileProvider.undergroundColorAlphaByDistance
// was in the right range
#ifdef UNDERGROUND_COLOR
uniform vec4 u_undergroundColor;
uniform vec4 u_undergroundColorAlphaByDistance;
#endif
// Based on enableLighting && hasVertexNormals
// The enableLighting flag is passed in directly from the Globe.
// The hasVertexNormals flag is from the tileProvider
#ifdef ENABLE_VERTEX_LIGHTING
uniform float u_lambertDiffuseMultiplier;
uniform float u_vertexShadowDarkness;
#endif
in vec3 v_positionMC;
in vec3 v_positionEC;
in vec3 v_textureCoordinates;
in vec3 v_normalMC;
in vec3 v_normalEC;
#ifdef APPLY_MATERIAL
in float v_height;
in float v_slope;
in float v_aspect;
#endif
#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
in float v_distance;
#endif
#if defined(GROUND_ATMOSPHERE) || defined(FOG)
in vec3 v_atmosphereRayleighColor;
in vec3 v_atmosphereMieColor;
in float v_atmosphereOpacity;
#endif
#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
float interpolateByDistance(vec4 nearFarScalar, float distance)
{
float startDistance = nearFarScalar.x;
float startValue = nearFarScalar.y;
float endDistance = nearFarScalar.z;
float endValue = nearFarScalar.w;
float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);
return mix(startValue, endValue, t);
}
#endif
#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT) || defined(APPLY_MATERIAL)
vec4 alphaBlend(vec4 sourceColor, vec4 destinationColor)
{
return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);
}
#endif
#ifdef TRANSLUCENT
bool inTranslucencyRectangle()
{
return
v_textureCoordinates.x > u_translucencyRectangle.x &&
v_textureCoordinates.x < u_translucencyRectangle.z &&
v_textureCoordinates.y > u_translucencyRectangle.y &&
v_textureCoordinates.y < u_translucencyRectangle.w;
}
#endif
vec4 sampleAndBlend(
vec4 previousColor,
sampler2D textureToSample,
vec2 tileTextureCoordinates,
vec4 textureCoordinateRectangle,
vec4 textureCoordinateTranslationAndScale,
float textureAlpha,
float textureNightAlpha,
float textureDayAlpha,
float textureBrightness,
float textureContrast,
float textureHue,
float textureSaturation,
float textureOneOverGamma,
float split,
vec4 colorToAlpha,
float nightBlend)
{
// This crazy step stuff sets the alpha to 0.0 if this following condition is true:
// tileTextureCoordinates.s < textureCoordinateRectangle.s ||
// tileTextureCoordinates.s > textureCoordinateRectangle.p ||
// tileTextureCoordinates.t < textureCoordinateRectangle.t ||
// tileTextureCoordinates.t > textureCoordinateRectangle.q
// In other words, the alpha is zero if the fragment is outside the rectangle
// covered by this texture. Would an actual 'if' yield better performance?
vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);
textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;
alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);
textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;
#if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)
textureAlpha *= mix(textureDayAlpha, textureNightAlpha, nightBlend);
#endif
vec2 translation = textureCoordinateTranslationAndScale.xy;
vec2 scale = textureCoordinateTranslationAndScale.zw;
vec2 textureCoordinates = tileTextureCoordinates * scale + translation;
vec4 value = texture(textureToSample, textureCoordinates);
vec3 color = value.rgb;
float alpha = value.a;
#ifdef APPLY_COLOR_TO_ALPHA
vec3 colorDiff = abs(color.rgb - colorToAlpha.rgb);
colorDiff.r = czm_maximumComponent(colorDiff);
alpha = czm_branchFreeTernary(colorDiff.r < colorToAlpha.a, 0.0, alpha);
#endif
#if !defined(APPLY_GAMMA)
vec4 tempColor = czm_gammaCorrect(vec4(color, alpha));
color = tempColor.rgb;
alpha = tempColor.a;
#else
color = pow(color, vec3(textureOneOverGamma));
#endif
#ifdef APPLY_SPLIT
float splitPosition = czm_splitPosition;
// Split to the left
if (split < 0.0 && gl_FragCoord.x > splitPosition) {
alpha = 0.0;
}
// Split to the right
else if (split > 0.0 && gl_FragCoord.x < splitPosition) {
alpha = 0.0;
}
#endif
#ifdef APPLY_BRIGHTNESS
color = mix(vec3(0.0), color, textureBrightness);
#endif
#ifdef APPLY_CONTRAST
color = mix(vec3(0.5), color, textureContrast);
#endif
#ifdef APPLY_HUE
color = czm_hue(color, textureHue);
#endif
#ifdef APPLY_SATURATION
color = czm_saturation(color, textureSaturation);
#endif
float sourceAlpha = alpha * textureAlpha;
float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);
outAlpha += sign(outAlpha) - 1.0;
vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;
// When rendering imagery for a tile in multiple passes,
// some GPU/WebGL implementation combinations will not blend fragments in
// additional passes correctly if their computation includes an unmasked
// divide-by-zero operation,
// even if it's not in the output or if the output has alpha zero.
//
// For example, without sanitization for outAlpha,
// this renders without artifacts:
// if (outAlpha == 0.0) { outColor = vec3(0.0); }
//
// but using czm_branchFreeTernary will cause portions of the tile that are
// alpha-zero in the additional pass to render as black instead of blending
// with the previous pass:
// outColor = czm_branchFreeTernary(outAlpha == 0.0, vec3(0.0), outColor);
//
// So instead, sanitize against divide-by-zero,
// store this state on the sign of outAlpha, and correct on return.
return vec4(outColor, max(outAlpha, 0.0));
}
vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend);
vec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue, float fade);
const float fExposure = 2.0;
vec3 computeEllipsoidPosition()
{
float mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0), 1.0);
vec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);
xy *= czm_viewport.zw * mpp * 0.5;
vec3 direction;
if (czm_orthographicIn3D == 1.0)
{
direction = vec3(0.0, 0.0, -1.0);
}
else
{
direction = normalize(vec3(xy, -czm_currentFrustum.x));
}
czm_ray ray = czm_ray(vec3(0.0), direction);
vec3 ellipsoid_center = czm_view[3].xyz;
czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);
vec3 ellipsoidPosition = czm_pointAlongRay(ray, intersection.start);
return (czm_inverseView * vec4(ellipsoidPosition, 1.0)).xyz;
}
void main()
{
#ifdef TILE_LIMIT_RECTANGLE
if (v_textureCoordinates.x < u_cartographicLimitRectangle.x || u_cartographicLimitRectangle.z < v_textureCoordinates.x ||
v_textureCoordinates.y < u_cartographicLimitRectangle.y || u_cartographicLimitRectangle.w < v_textureCoordinates.y)
{
discard;
}
#endif
#ifdef ENABLE_CLIPPING_PLANES
float clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);
#endif
#if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(HDR)
vec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)); // normalized surface normal in model coordinates
vec3 normalEC = czm_normal3D * normalMC; // normalized surface normal in eye coordinates
#endif
#if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)
float nightBlend = 1.0 - clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0, 0.0, 1.0);
#else
float nightBlend = 0.0;
#endif
// The clamp below works around an apparent bug in Chrome Canary v23.0.1241.0
// where the fragment shader sees textures coordinates < 0.0 and > 1.0 for the
// fragments on the edges of tiles even though the vertex shader is outputting
// coordinates strictly in the 0-1 range.
vec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0), nightBlend);
#ifdef SHOW_TILE_BOUNDARIES
if (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||
v_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))
{
color = vec4(1.0, 0.0, 0.0, 1.0);
}
#endif
#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)
float cameraDist;
if (czm_sceneMode == czm_sceneMode2D)
{
cameraDist = max(czm_frustumPlanes.x - czm_frustumPlanes.y, czm_frustumPlanes.w - czm_frustumPlanes.z) * 0.5;
}
else if (czm_sceneMode == czm_sceneModeColumbusView)
{
cameraDist = -czm_view[3].z;
}
else
{
cameraDist = length(czm_view[3]);
}
float fadeOutDist = u_lightingFadeDistance.x;
float fadeInDist = u_lightingFadeDistance.y;
if (czm_sceneMode != czm_sceneMode3D) {
vec3 radii = czm_ellipsoidRadii;
float maxRadii = max(radii.x, max(radii.y, radii.z));
fadeOutDist -= maxRadii;
fadeInDist -= maxRadii;
}
float fade = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);
#else
float fade = 0.0;
#endif
#if defined(HAS_WATER_MASK) && (defined(SHOW_REFLECTIVE_OCEAN) || defined(APPLY_MATERIAL))
vec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;
vec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;
vec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;
waterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;
float mask = texture(u_waterMask, waterMaskTextureCoordinates).r;
#ifdef SHOW_REFLECTIVE_OCEAN
if (mask > 0.0)
{
mat3 enuToEye = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalEC);
vec2 ellipsoidTextureCoordinates = czm_ellipsoidTextureCoordinates(normalMC);
vec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidTextureCoordinates(normalMC.zyx);
vec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));
color = computeWaterColor(v_positionEC, textureCoordinates, enuToEye, color, mask, fade);
}
#endif
#endif
#ifdef APPLY_MATERIAL
czm_materialInput materialInput;
materialInput.st = v_textureCoordinates.st;
materialInput.normalEC = normalize(v_normalEC);
materialInput.positionToEyeEC = -v_positionEC;
materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalize(v_normalEC));
materialInput.slope = v_slope;
materialInput.height = v_height;
materialInput.aspect = v_aspect;
#ifdef HAS_WATER_MASK
materialInput.waterMask = mask;
#endif
czm_material material = czm_getMaterial(materialInput);
vec4 materialColor = vec4(material.diffuse, material.alpha);
color = alphaBlend(materialColor, color);
#endif
#ifdef ENABLE_VERTEX_LIGHTING
float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalize(v_normalEC)) * u_lambertDiffuseMultiplier + u_vertexShadowDarkness, 0.0, 1.0);
vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);
#elif defined(ENABLE_DAYNIGHT_SHADING)
float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0 + 0.3, 0.0, 1.0);
diffuseIntensity = mix(1.0, diffuseIntensity, fade);
vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);
#else
vec4 finalColor = color;
#endif
#ifdef ENABLE_CLIPPING_PLANES
vec4 clippingPlanesEdgeColor = vec4(1.0);
clippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb;
float clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a;
if (clipDistance < clippingPlanesEdgeWidth)
{
finalColor = clippingPlanesEdgeColor;
}
#endif
#ifdef ENABLE_CLIPPING_POLYGONS
vec2 clippingPosition = v_clippingPosition;
int regionIndex = v_regionIndex;
clipPolygons(u_clippingDistance, CLIPPING_POLYGON_REGIONS_LENGTH, clippingPosition, regionIndex);
#endif
#ifdef HIGHLIGHT_FILL_TILE
finalColor = vec4(mix(finalColor.rgb, u_fillHighlightColor.rgb, u_fillHighlightColor.a), finalColor.a);
#endif
#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)
vec3 atmosphereLightDirection = czm_sunDirectionWC;
#else
vec3 atmosphereLightDirection = czm_lightDirectionWC;
#endif
#if defined(GROUND_ATMOSPHERE) || defined(FOG)
if (!czm_backFacing())
{
bool dynamicLighting = false;
#if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))
dynamicLighting = true;
#endif
vec3 rayleighColor;
vec3 mieColor;
float opacity;
vec3 positionWC;
vec3 lightDirection;
// When the camera is far away (camera distance > nightFadeOutDistance), the scattering is computed in the fragment shader.
// Otherwise, the scattering is computed in the vertex shader.
#ifdef PER_FRAGMENT_GROUND_ATMOSPHERE
positionWC = computeEllipsoidPosition();
lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(positionWC));
computeAtmosphereScattering(
positionWC,
lightDirection,
rayleighColor,
mieColor,
opacity
);
#else
positionWC = v_positionMC;
lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(positionWC));
rayleighColor = v_atmosphereRayleighColor;
mieColor = v_atmosphereMieColor;
opacity = v_atmosphereOpacity;
#endif
#ifdef COLOR_CORRECT
const bool ignoreBlackPixels = true;
rayleighColor = czm_applyHSBShift(rayleighColor, u_hsbShift, ignoreBlackPixels);
mieColor = czm_applyHSBShift(mieColor, u_hsbShift, ignoreBlackPixels);
#endif
vec4 groundAtmosphereColor = computeAtmosphereColor(positionWC, lightDirection, rayleighColor, mieColor, opacity);
// Fog is applied to tiles selected for fog, close to the Earth.
#ifdef FOG
vec3 fogColor = groundAtmosphereColor.rgb;
// If there is lighting, apply that to the fog.
#if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
float darken = clamp(dot(normalize(czm_viewerPositionWC), atmosphereLightDirection), u_minimumBrightness, 1.0);
fogColor *= darken;
#endif
#ifndef HDR
fogColor.rgb = czm_pbrNeutralTonemapping(fogColor.rgb);
fogColor.rgb = czm_inverseGamma(fogColor.rgb);
#endif
finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor.rgb, czm_fogVisualDensityScalar), finalColor.a);
#else
// Apply ground atmosphere. This happens when the camera is far away from the earth.
// The transmittance is based on optical depth i.e. the length of segment of the ray inside the atmosphere.
// This value is larger near the "circumference", as it is further away from the camera. We use it to
// brighten up that area of the ground atmosphere.
const float transmittanceModifier = 0.5;
float transmittance = transmittanceModifier + clamp(1.0 - groundAtmosphereColor.a, 0.0, 1.0);
vec3 finalAtmosphereColor = finalColor.rgb + groundAtmosphereColor.rgb * transmittance;
#if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))
float fadeInDist = u_nightFadeDistance.x;
float fadeOutDist = u_nightFadeDistance.y;
float sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.05, 1.0);
float darken = clamp(dot(normalize(positionWC), atmosphereLightDirection), 0.0, 1.0);
vec3 darkenendGroundAtmosphereColor = mix(groundAtmosphereColor.rgb, finalAtmosphereColor.rgb, darken);
finalAtmosphereColor = mix(darkenendGroundAtmosphereColor, finalAtmosphereColor, sunlitAtmosphereIntensity);
#endif
#ifndef HDR
finalAtmosphereColor.rgb = vec3(1.0) - exp(-fExposure * finalAtmosphereColor.rgb);
#else
finalAtmosphereColor.rgb = czm_saturation(finalAtmosphereColor.rgb, 1.6);
#endif
finalColor.rgb = mix(finalColor.rgb, finalAtmosphereColor.rgb, fade);
#endif
}
#endif
#ifdef UNDERGROUND_COLOR
if (czm_backFacing())
{
float distanceFromEllipsoid = max(czm_eyeHeight, 0.0);
float distance = max(v_distance - distanceFromEllipsoid, 0.0);
float blendAmount = interpolateByDistance(u_undergroundColorAlphaByDistance, distance);
vec4 undergroundColor = vec4(u_undergroundColor.rgb, u_undergroundColor.a * blendAmount);
finalColor = alphaBlend(undergroundColor, finalColor);
}
#endif
#ifdef TRANSLUCENT
if (inTranslucencyRectangle())
{
vec4 alphaByDistance = gl_FrontFacing ? u_frontFaceAlphaByDistance : u_backFaceAlphaByDistance;
finalColor.a *= interpolateByDistance(alphaByDistance, v_distance);
}
#endif
out_FragColor = finalColor;
}
#ifdef SHOW_REFLECTIVE_OCEAN
float waveFade(float edge0, float edge1, float x)
{
float y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
return pow(1.0 - y, 5.0);
}
float linearFade(float edge0, float edge1, float x)
{
return clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);
}
// Based on water rendering by Jonas Wagner:
// http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog
// low altitude wave settings
const float oceanFrequencyLowAltitude = 825000.0;
const float oceanAnimationSpeedLowAltitude = 0.004;
const float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;
const float oceanSpecularIntensity = 0.5;
// high altitude wave settings
const float oceanFrequencyHighAltitude = 125000.0;
const float oceanAnimationSpeedHighAltitude = 0.008;
const float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;
vec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue, float fade)
{
vec3 positionToEyeEC = -positionEyeCoordinates;
float positionToEyeECLength = length(positionToEyeEC);
// The double normalize below works around a bug in Firefox on Android devices.
vec3 normalizedPositionToEyeEC = normalize(normalize(positionToEyeEC));
// Fade out the waves as the camera moves far from the surface.
float waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);
#ifdef SHOW_OCEAN_WAVES
// high altitude waves
float time = czm_frameNumber * oceanAnimationSpeedHighAltitude;
vec4 noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);
vec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);
// low altitude waves
time = czm_frameNumber * oceanAnimationSpeedLowAltitude;
noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);
vec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);
// blend the 2 wave layers based on distance to surface
float highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);
float lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);
vec3 normalTangentSpace =
(highAltitudeFade * normalTangentSpaceHighAltitude) +
(lowAltitudeFade * normalTangentSpaceLowAltitude);
normalTangentSpace = normalize(normalTangentSpace);
// fade out the normal perturbation as we move farther from the water surface
normalTangentSpace.xy *= waveIntensity;
normalTangentSpace = normalize(normalTangentSpace);
#else
vec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);
#endif
vec3 normalEC = enuToEye * normalTangentSpace;
const vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);
// Use diffuse light to highlight the waves
float diffuseIntensity = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * maskValue;
vec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade);
#ifdef SHOW_OCEAN_WAVES
// Where diffuse light is low or non-existent, use wave highlights based solely on
// the wave bumpiness and no particular light direction.
float tsPerturbationRatio = normalTangentSpace.z;
vec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);
#else
vec3 nonDiffuseHighlight = vec3(0.0);
#endif
// Add specular highlights in 3D, and in all modes when zoomed in.
float specularIntensity = czm_getSpecular(czm_lightDirectionEC, normalizedPositionToEyeEC, normalEC, 10.0);
float surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);
float specular = specularIntensity * surfaceReflectance;
#ifdef HDR
specular *= 1.4;
float e = 0.2;
float d = 3.3;
float c = 1.7;
vec3 color = imageryColor.rgb + (c * (vec3(e) + imageryColor.rgb * d) * (diffuseHighlight + nonDiffuseHighlight + specular));
#else
vec3 color = imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular;
#endif
return vec4(color, imageryColor.a);
}
#endif // #ifdef SHOW_REFLECTIVE_OCEAN
`;var SBi=x(T(),1),wY=`#ifdef QUANTIZATION_BITS12
in vec4 compressed0;
in float compressed1;
#else
in vec4 position3DAndHeight;
in vec4 textureCoordAndEncodedNormals;
#endif
#ifdef GEODETIC_SURFACE_NORMALS
in vec3 geodeticSurfaceNormal;
#endif
#ifdef EXAGGERATION
uniform vec2 u_verticalExaggerationAndRelativeHeight;
#endif
uniform vec3 u_center3D;
uniform mat4 u_modifiedModelView;
uniform mat4 u_modifiedModelViewProjection;
uniform vec4 u_tileRectangle;
// Uniforms for 2D Mercator projection
uniform vec2 u_southAndNorthLatitude;
uniform vec2 u_southMercatorYAndOneOverHeight;
out vec3 v_positionMC;
out vec3 v_positionEC;
out vec3 v_textureCoordinates;
out vec3 v_normalMC;
out vec3 v_normalEC;
#ifdef APPLY_MATERIAL
out float v_slope;
out float v_aspect;
out float v_height;
#endif
#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
out float v_distance;
#endif
#if defined(FOG) || defined(GROUND_ATMOSPHERE)
out vec3 v_atmosphereRayleighColor;
out vec3 v_atmosphereMieColor;
out float v_atmosphereOpacity;
#endif
#ifdef ENABLE_CLIPPING_POLYGONS
uniform highp sampler2D u_clippingExtents;
out vec2 v_clippingPosition;
flat out int v_regionIndex;
#endif
// These functions are generated at runtime.
vec4 getPosition(vec3 position, float height, vec2 textureCoordinates);
float get2DYPositionFraction(vec2 textureCoordinates);
vec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)
{
return u_modifiedModelViewProjection * vec4(position, 1.0);
}
float get2DMercatorYPositionFraction(vec2 textureCoordinates)
{
// The width of a tile at level 11, in radians and assuming a single root tile, is
// 2.0 * czm_pi / pow(2.0, 11.0)
// We want to just linearly interpolate the 2D position from the texture coordinates
// when we're at this level or higher. The constant below is the expression
// above evaluated and then rounded up at the 4th significant digit.
const float maxTileWidth = 0.003068;
float positionFraction = textureCoordinates.y;
float southLatitude = u_southAndNorthLatitude.x;
float northLatitude = u_southAndNorthLatitude.y;
if (northLatitude - southLatitude > maxTileWidth)
{
float southMercatorY = u_southMercatorYAndOneOverHeight.x;
float oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;
float currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);
currentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);
positionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);
}
return positionFraction;
}
float get2DGeographicYPositionFraction(vec2 textureCoordinates)
{
return textureCoordinates.y;
}
vec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)
{
float yPositionFraction = get2DYPositionFraction(textureCoordinates);
vec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);
return u_modifiedModelViewProjection * rtcPosition2D;
}
vec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)
{
return getPositionPlanarEarth(position, 0.0, textureCoordinates);
}
vec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)
{
return getPositionPlanarEarth(position, height, textureCoordinates);
}
vec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)
{
// We do not do RTC while morphing, so there is potential for jitter.
// This is unlikely to be noticeable, though.
vec3 position3DWC = position + u_center3D;
float yPositionFraction = get2DYPositionFraction(textureCoordinates);
vec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);
vec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);
vec4 morphPositionEC = czm_modelView * morphPosition;
return czm_projection * morphPositionEC;
}
#ifdef QUANTIZATION_BITS12
uniform vec2 u_minMaxHeight;
uniform mat4 u_scaleAndBias;
#endif
void main()
{
#ifdef QUANTIZATION_BITS12
vec2 xy = czm_decompressTextureCoordinates(compressed0.x);
vec2 zh = czm_decompressTextureCoordinates(compressed0.y);
vec3 position = vec3(xy, zh.x);
float height = zh.y;
vec2 textureCoordinates = czm_decompressTextureCoordinates(compressed0.z);
height = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;
position = (u_scaleAndBias * vec4(position, 1.0)).xyz;
#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)) && defined(INCLUDE_WEB_MERCATOR_Y) || defined(APPLY_MATERIAL)
float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;
float encodedNormal = compressed1;
#elif defined(INCLUDE_WEB_MERCATOR_Y)
float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;
float encodedNormal = 0.0;
#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
float webMercatorT = textureCoordinates.y;
float encodedNormal = compressed0.w;
#else
float webMercatorT = textureCoordinates.y;
float encodedNormal = 0.0;
#endif
#else
// A single float per element
vec3 position = position3DAndHeight.xyz;
float height = position3DAndHeight.w;
vec2 textureCoordinates = textureCoordAndEncodedNormals.xy;
#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)) && defined(INCLUDE_WEB_MERCATOR_Y)
float webMercatorT = textureCoordAndEncodedNormals.z;
float encodedNormal = textureCoordAndEncodedNormals.w;
#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
float webMercatorT = textureCoordinates.y;
float encodedNormal = textureCoordAndEncodedNormals.z;
#elif defined(INCLUDE_WEB_MERCATOR_Y)
float webMercatorT = textureCoordAndEncodedNormals.z;
float encodedNormal = 0.0;
#else
float webMercatorT = textureCoordinates.y;
float encodedNormal = 0.0;
#endif
#endif
vec3 position3DWC = position + u_center3D;
#ifdef GEODETIC_SURFACE_NORMALS
vec3 ellipsoidNormal = geodeticSurfaceNormal;
#else
vec3 ellipsoidNormal = normalize(position3DWC);
#endif
#if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)
float exaggeration = u_verticalExaggerationAndRelativeHeight.x;
float relativeHeight = u_verticalExaggerationAndRelativeHeight.y;
float newHeight = (height - relativeHeight) * exaggeration + relativeHeight;
// stop from going through center of earth
float minRadius = min(min(czm_ellipsoidRadii.x, czm_ellipsoidRadii.y), czm_ellipsoidRadii.z);
newHeight = max(newHeight, -minRadius);
vec3 offset = ellipsoidNormal * (newHeight - height);
position += offset;
position3DWC += offset;
height = newHeight;
#endif
gl_Position = getPosition(position, height, textureCoordinates);
v_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;
v_positionMC = position3DWC; // position in model coordinates
v_textureCoordinates = vec3(textureCoordinates, webMercatorT);
#if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)
vec3 normalMC = czm_octDecode(encodedNormal);
#if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)
vec3 projection = dot(normalMC, ellipsoidNormal) * ellipsoidNormal;
vec3 rejection = normalMC - projection;
normalMC = normalize(projection + rejection * exaggeration);
#endif
v_normalMC = normalMC;
v_normalEC = czm_normal3D * v_normalMC;
#endif
#ifdef ENABLE_CLIPPING_POLYGONS
vec2 sphericalLatLong = czm_approximateSphericalCoordinates(position3DWC);
sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);
vec2 minDistance = vec2(czm_infinity);
v_clippingPosition = vec2(czm_infinity);
v_regionIndex = -1;
for (int regionIndex = 0; regionIndex < CLIPPING_POLYGON_REGIONS_LENGTH; regionIndex++) {
vec4 extents = unpackClippingExtents(u_clippingExtents, regionIndex);
vec2 rectUv = (sphericalLatLong.yx - extents.yx) * extents.wz;
vec2 clamped = clamp(rectUv, vec2(0.0), vec2(1.0));
vec2 distance = abs(rectUv - clamped) * extents.wz;
float threshold = 0.01;
if (minDistance.x > distance.x || minDistance.y > distance.y) {
minDistance = distance;
v_clippingPosition = rectUv;
if (rectUv.x > threshold && rectUv.y > threshold && rectUv.x < 1.0 - threshold && rectUv.y < 1.0 - threshold) {
v_regionIndex = regionIndex;
}
}
}
#endif
#if defined(FOG) || (defined(GROUND_ATMOSPHERE) && !defined(PER_FRAGMENT_GROUND_ATMOSPHERE))
bool dynamicLighting = false;
#if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))
dynamicLighting = true;
#endif
#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)
vec3 atmosphereLightDirection = czm_sunDirectionWC;
#else
vec3 atmosphereLightDirection = czm_lightDirectionWC;
#endif
vec3 lightDirection = czm_branchFreeTernary(dynamicLighting, atmosphereLightDirection, normalize(position3DWC));
computeAtmosphereScattering(
position3DWC,
lightDirection,
v_atmosphereRayleighColor,
v_atmosphereMieColor,
v_atmosphereOpacity
);
#endif
#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)
v_distance = length((czm_modelView3D * vec4(position3DWC, 1.0)).xyz);
#endif
#ifdef APPLY_MATERIAL
float northPoleZ = czm_ellipsoidRadii.z;
vec3 northPolePositionMC = vec3(0.0, 0.0, northPoleZ);
vec3 vectorEastMC = normalize(cross(northPolePositionMC - v_positionMC, ellipsoidNormal));
float dotProd = abs(dot(ellipsoidNormal, v_normalMC));
v_slope = acos(dotProd);
vec3 normalRejected = ellipsoidNormal * dotProd;
vec3 normalProjected = v_normalMC - normalRejected;
vec3 aspectVector = normalize(normalProjected);
v_aspect = acos(dot(aspectVector, vectorEastMC));
float determ = dot(cross(vectorEastMC, aspectVector), ellipsoidNormal);
v_aspect = czm_branchFreeTernary(determ < 0.0, 2.0 * czm_pi - v_aspect, v_aspect);
v_height = height;
#endif
}
`;var ZBi=x(T(),1),LR=`void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity) {
vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
float atmosphereInnerRadius = length(positionWC);
computeScattering(
primaryRay,
length(cameraToPositionWC),
lightDirection,
atmosphereInnerRadius,
rayleighColor,
mieColor,
opacity
);
}
`;var XBi=x(T(),1);var EBi=x(T(),1);var fgt=new M;function pgt(e,t){let n=e.unionClippingRegions,i=e.length,o=as.useFloatTexture(t),r=as.getTextureResolution(e,t,fgt),s=r.x,a=r.y,c=o?ygt(s,a):xgt(s,a);return c+=`
`,c+=n?bgt(i):ggt(i),c}function bgt(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)
{
vec4 position = czm_windowToEyeCoordinates(fragCoord);
vec3 clipNormal = vec3(0.0);
vec3 clipPosition = vec3(0.0);
float clipAmount;
float pixelWidth = czm_metersPerPixel(position);
bool breakAndDiscard = false;
for (int i = 0; i < ${e}; ++i)
{
vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
clipNormal = clippingPlane.xyz;
clipPosition = -clippingPlane.w * clipNormal;
float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
clipAmount = czm_branchFreeTernary(i == 0, amount, min(amount, clipAmount));
if (amount <= 0.0)
{
breakAndDiscard = true;
// HLSL compiler bug if we discard here: https://bugs.chromium.org/p/angleproject/issues/detail?id=1945#c6
break;
}
}
if (breakAndDiscard) {
discard;
}
return clipAmount;
}
`}function ggt(e){return`float clip(vec4 fragCoord, sampler2D clippingPlanes, mat4 clippingPlanesMatrix)
{
bool clipped = true;
vec4 position = czm_windowToEyeCoordinates(fragCoord);
vec3 clipNormal = vec3(0.0);
vec3 clipPosition = vec3(0.0);
float clipAmount = 0.0;
float pixelWidth = czm_metersPerPixel(position);
for (int i = 0; i < ${e}; ++i)
{
vec4 clippingPlane = getClippingPlane(clippingPlanes, i, clippingPlanesMatrix);
clipNormal = clippingPlane.xyz;
clipPosition = -clippingPlane.w * clipNormal;
float amount = dot(clipNormal, (position.xyz - clipPosition)) / pixelWidth;
clipAmount = max(amount, clipAmount);
clipped = clipped && (amount <= 0.0);
}
if (clipped)
{
discard;
}
return clipAmount;
}
`}function ygt(e,t){let n=1/e,i=1/t,o=`${n}`;o.indexOf(".")===-1&&(o+=".0");let r=`${i}`;return r.indexOf(".")===-1&&(r+=".0"),`vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)
{
int pixY = clippingPlaneNumber / ${e};
int pixX = clippingPlaneNumber - (pixY * ${e});
// Sample from center of pixel
float u = (float(pixX) + 0.5) * ${o};
float v = (float(pixY) + 0.5) * ${r};
vec4 plane = texture(packedClippingPlanes, vec2(u, v));
return czm_transformPlane(plane, transform);
}
`}function xgt(e,t){let n=1/e,i=1/t,o=`${n}`;o.indexOf(".")===-1&&(o+=".0");let r=`${i}`;return r.indexOf(".")===-1&&(r+=".0"),`vec4 getClippingPlane(highp sampler2D packedClippingPlanes, int clippingPlaneNumber, mat4 transform)
{
int clippingPlaneStartIndex = clippingPlaneNumber * 2;
int pixY = clippingPlaneStartIndex / ${e};
int pixX = clippingPlaneStartIndex - (pixY * ${e});
// Sample from center of pixel
float u = (float(pixX) + 0.5) * ${o};
float v = (float(pixY) + 0.5) * ${r};
vec4 oct32 = texture(packedClippingPlanes, vec2(u, v)) * 255.0;
vec2 oct = vec2(oct32.x * 256.0 + oct32.y, oct32.z * 256.0 + oct32.w);
vec4 plane;
plane.xyz = czm_octDecode(oct, 65535.0);
plane.w = czm_unpackFloat(texture(packedClippingPlanes, vec2(u + ${o}, v)));
return czm_transformPlane(plane, transform);
}
`}var JS=pgt;function Tgt(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 S$(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}function _gt(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 Sgt(e){return e.webgl2?`void clipPolygons(highp sampler2D clippingDistance, int regionsLength, vec2 clippingPosition, int regionIndex) {
czm_clipPolygons(clippingDistance, regionsLength, clippingPosition, regionIndex);
}`:`void clipPolygons(highp sampler2D clippingDistance, int regionsLength, vec2 clippingPosition, int regionIndex) {
}`}function Agt(e){return e.webgl2?`vec4 unpackClippingExtents(highp sampler2D extentsTexture, int index) {
return czm_unpackClippingExtents(extentsTexture, index);
}`:`vec4 unpackClippingExtents(highp sampler2D extentsTexture, int index) {
return vec4();
}`}function Zgt(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}S$.prototype.getShaderProgram=function(e){let t=e.frameState,n=e.surfaceTile,i=e.numberOfDayTextures,o=e.applyBrightness,r=e.applyContrast,s=e.applyHue,a=e.applySaturation,c=e.applyGamma,d=e.applyAlpha,u=e.applyDayNightAlpha,h=e.applySplit,p=e.hasWaterMask,b=e.showReflectiveOcean,f=e.showOceanWaves,y=e.enableLighting,_=e.dynamicAtmosphereLighting,S=e.dynamicAtmosphereLightingFromSun,A=e.showGroundAtmosphere,Z=e.perFragmentGroundAtmosphere,V=e.hasVertexNormals,E=e.useWebMercatorProjection,L=e.enableFog,v=e.enableClippingPlanes,I=e.clippingPlanes,X=e.enableClippingPolygons,N=e.clippingPolygons,g=e.clippedByBoundaries,C=e.hasImageryLayerCutout,R=e.colorCorrect,G=e.highlightFillTile,P=e.colorToAlpha,Y=e.hasGeodeticSurfaceNormals,O=e.hasExaggeration,k=e.showUndergroundColor,D=e.translucent,w=0,z="",ee=n.renderedMesh.encoding;ee.quantization===ka.BITS12&&(w=1,z="QUANTIZATION_BITS12");let te=0,$="";g&&(te=1,$="TILE_LIMIT_RECTANGLE");let be=0,ye="";C&&(be=1,ye="APPLY_IMAGERY_CUTOUT");let ce=t.mode,Ze=((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|Z<<15|V<<16|E<<17|L<<18|w<<19|h<<20|v<<21|X<<22|te<<23|be<<24|R<<25|G<<26|P<<27|Y<<28|O<<29|k<<30|D<<31)>>>0)+(u?4294967296:0),xe=0;l(I)&&I.length>0&&(xe=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===Ze&&Ve.material===this.material&&Ve.clippingShaderState===xe&&Ve.clippingPolygonShaderState===Ge)return Ve.shaderProgram;let Ye=this._shadersByTexturesFlags[i];if(l(Ye)||(Ye=this._shadersByTexturesFlags[i]=[]),Ve=Ye[Ze],!l(Ve)||Ve.material!==this.material||Ve.clippingShaderState!==xe||Ve.clippingPolygonShaderState!==Ge){let ke=this.baseVertexShaderSource.clone(),it=this.baseFragmentShaderSource.clone();xe!==0&&it.sources.unshift(JS(I,t.context)),Ge!==0&&(it.sources.unshift(Sgt(t.context)),ke.sources.unshift(Agt(t.context))),ke.defines.push(z),it.defines.push(`TEXTURE_UNITS ${i}`,$,ye),o&&it.defines.push("APPLY_BRIGHTNESS"),r&&it.defines.push("APPLY_CONTRAST"),s&&it.defines.push("APPLY_HUE"),a&&it.defines.push("APPLY_SATURATION"),c&&it.defines.push("APPLY_GAMMA"),d&&it.defines.push("APPLY_ALPHA"),u&&it.defines.push("APPLY_DAY_NIGHT_ALPHA"),p&&it.defines.push("HAS_WATER_MASK"),b&&(it.defines.push("SHOW_REFLECTIVE_OCEAN"),ke.defines.push("SHOW_REFLECTIVE_OCEAN")),f&&it.defines.push("SHOW_OCEAN_WAVES"),P&&it.defines.push("APPLY_COLOR_TO_ALPHA"),k&&(ke.defines.push("UNDERGROUND_COLOR"),it.defines.push("UNDERGROUND_COLOR")),D&&(ke.defines.push("TRANSLUCENT"),it.defines.push("TRANSLUCENT")),y&&(V?(ke.defines.push("ENABLE_VERTEX_LIGHTING"),it.defines.push("ENABLE_VERTEX_LIGHTING")):(ke.defines.push("ENABLE_DAYNIGHT_SHADING"),it.defines.push("ENABLE_DAYNIGHT_SHADING"))),_&&(ke.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),it.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),S&&(ke.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"),it.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN"))),A&&(ke.defines.push("GROUND_ATMOSPHERE"),it.defines.push("GROUND_ATMOSPHERE"),Z&&(ke.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"),it.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE"))),ke.defines.push("INCLUDE_WEB_MERCATOR_Y"),it.defines.push("INCLUDE_WEB_MERCATOR_Y"),L&&(ke.defines.push("FOG"),it.defines.push("FOG")),h&&it.defines.push("APPLY_SPLIT"),v&&it.defines.push("ENABLE_CLIPPING_PLANES"),X&&(it.defines.push("ENABLE_CLIPPING_POLYGONS"),ke.defines.push("ENABLE_CLIPPING_POLYGONS"),N.inverse&&it.defines.push("CLIPPING_INVERSE"),it.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${N.extentsCount}`),ke.defines.push(`CLIPPING_POLYGON_REGIONS_LENGTH ${N.extentsCount}`)),R&&it.defines.push("COLOR_CORRECT"),G&&it.defines.push("HIGHLIGHT_FILL_TILE"),Y&&ke.defines.push("GEODETIC_SURFACE_NORMALS"),O&&ke.defines.push("EXAGGERATION");let pt=` vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend)
{
vec4 color = initialColor;
`;C&&(pt+=` vec4 cutoutAndColorResult;
bool texelUnclipped;
`);for(let Ue=0;Ue<i;++Ue)C?pt+=` cutoutAndColorResult = u_dayTextureCutoutRectangles[${Ue}];
texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;
cutoutAndColorResult = sampleAndBlend(
`:pt+=` color = sampleAndBlend(
`,pt+=` color,
u_dayTextures[${Ue}],
u_dayTextureUseWebMercatorT[${Ue}] ? textureCoordinates.xz : textureCoordinates.xy,
u_dayTextureTexCoordsRectangle[${Ue}],
u_dayTextureTranslationAndScale[${Ue}],
${d?`u_dayTextureAlpha[${Ue}]`:"1.0"},
${u?`u_dayTextureNightAlpha[${Ue}]`:"1.0"},
${u?`u_dayTextureDayAlpha[${Ue}]`:"1.0"},
${o?`u_dayTextureBrightness[${Ue}]`:"0.0"},
${r?`u_dayTextureContrast[${Ue}]`:"0.0"},
${s?`u_dayTextureHue[${Ue}]`:"0.0"},
${a?`u_dayTextureSaturation[${Ue}]`:"0.0"},
${c?`u_dayTextureOneOverGamma[${Ue}]`:"0.0"},
${h?`u_dayTextureSplit[${Ue}]`:"0.0"},
${P?`u_colorsToAlpha[${Ue}]`:"vec4(0.0)"},
nightBlend);
`,C&&(pt+=` color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);
`);pt+=` return color;
}`,it.sources.push(pt),ke.sources.push(_gt(ce)),ke.sources.push(Zgt(E));let Vt=qt.fromCache({context:t.context,vertexShaderSource:ke,fragmentShaderSource:it,attributeLocations:ee.getAttributeLocations()});Ve=Ye[Ze]=new Tgt(i,Ze,this.material,Vt,xe,Ge)}return n.surfaceShader=Ve,Ve.shaderProgram};S$.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 me(this)};var MY=S$;var wzi=x(T(),1);var YBi=x(T(),1),ACe={NONE:-1,PARTIAL:0,FULL:1};Object.freeze(ACe);var Nr=ACe;var h3i=x(T(),1);var MBi=x(T(),1),ZCe={START:0,LOADING:1,DONE:2,FAILED:3};Object.freeze(ZCe);var Ua=ZCe;var UBi=x(T(),1),CCe={FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6};Object.freeze(CCe);var Co=CCe;function hr(){this.imagery=[],this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new se(0,0,1,1),this.terrainData=void 0,this.vertexArray=void 0,this.tileBoundingRegion=void 0,this.occludeePointInScaledSpace=new m,this.boundingVolumeSourceTile=void 0,this.boundingVolumeIsFromMesh=!1,this.terrainState=Co.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===Co.RECEIVING||e===Co.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!==Bn.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 m.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=Co.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===Ua.START&&(Cgt(e,t,n),e.state=Ua.LOADING)};hr.processStateMachine=function(e,t,n,i,o,r,s){hr.initialize(e,n,i);let a=e.data;if(e.state===Ua.LOADING&&Vgt(e,t,n,i,o,r),s)return;let c=e.renderable;e.renderable=l(a.vertexArray);let d=a.terrainState===Co.READY;e.upsampledFromParent=l(a.terrainData)&&a.terrainData.wasCreatedByUpsampling();let u=a.processImagery(e,n,t);if(d&&u){let h=e._loadedCallbacks,p={};for(let b in h)h.hasOwnProperty(b)&&(h[b](e)||(p[b]=h[b]));e._loadedCallbacks=p,e.state=Ua.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 h=c[d];if(!l(h.loadingImagery)){r=!1;continue}if(h.loadingImagery.state===Bn.PLACEHOLDER){let b=h.loadingImagery.imageryLayer;if(b.ready){h.freeResources(),c.splice(d,1),b._createTileImagerySkeletons(e,t,d),--d,u=c.length;continue}else r=!1}let p=h.processStateMachine(e,n,i);a=a&&p,s=s||p||l(h.readyImagery),r=r&&l(h.loadingImagery)&&(h.loadingImagery.state===Bn.FAILED||h.loadingImagery.state===Bn.INVALID)}return e.upsampledFromParent=r,e.renderable=e.renderable&&(s||a),a};function VCe(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){VCe(this,!0,e,t)};hr.prototype.removeGeodeticSurfaceNormals=function(e){VCe(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 Cgt(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=Co.FAILED);for(let o=0,r=n.length;o<r;++o){let s=n.get(o);s.show&&s._createTileImagerySkeletons(e,t)}}function Vgt(e,t,n,i,o,r){let s=e.data,a=e.parent;if(s.terrainState===Co.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===Co.FAILED&&Rgt(s,e,t,n,e.x,e.y,e.level),s.terrainState===Co.UNLOADED&&Egt(s,n,e.x,e.y,e.level),s.terrainState===Co.RECEIVED&&Lgt(s,t,n,e.x,e.y,e.level),s.terrainState===Co.TRANSFORMED&&(Wgt(s,t.context,n,e.x,e.y,e.level,r),s.updateExaggeration(e,t,o)),s.terrainState>=Co.RECEIVED&&s.waterMaskTexture===void 0&&n.hasWaterMask)if(s.terrainData.waterMask!==void 0)Fgt(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 Rgt(e,t,n,i,o,r,s){let a=t.parent;if(!a){t.state=Ua.FAILED;return}let c=a.data.terrainData,d=a.x,u=a.y,h=a.level;if(!l(c))return;let p=c.upsample(i.tilingScheme,d,u,h,o,r,s);l(p)&&(e.terrainState=Co.RECEIVING,Promise.resolve(p).then(function(b){l(b)&&(e.terrainData=b,e.terrainState=Co.RECEIVED)}).catch(function(){e.terrainState=Co.FAILED}))}function Egt(e,t,n,i,o){function r(c){if(!l(c)){e.terrainState=Co.UNLOADED,e.request=void 0;return}e.terrainData=c,e.terrainState=Co.RECEIVED,e.request=void 0}function s(c){if(e.request.state===ui.CANCELLED){e.terrainData=void 0,e.terrainState=Co.UNLOADED,e.request=void 0;return}e.terrainState=Co.FAILED,e.request=void 0;let d=`Failed to obtain terrain tile X: ${n} Y: ${i} Level: ${o}. Error message: "${c}"`;t._requestError=Bo.reportError(t._requestError,t,t.errorEvent,d,n,i,o),t._requestError.retry&&a()}function a(){let c=new fr({throttle:!1,throttleByServer:!0,type:ks.TERRAIN});e.request=c;let d=t.requestTileGeometry(n,i,o,c);l(d)?(e.terrainState=Co.RECEIVING,Promise.resolve(d).then(function(u){r(u)}).catch(function(u){s(u)})):(e.terrainState=Co.UNLOADED,e.request=void 0)}a()}var Ggt={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0,throttle:!0};function Lgt(e,t,n,i,o,r){let s=n.tilingScheme,a=Ggt;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=Co.TRANSFORMING,Promise.resolve(d).then(function(u){e.mesh=u,e.terrainState=Co.TRANSFORMED}).catch(function(){e.terrainState=Co.FAILED}))}hr._createVertexArrayForMesh=function(e,t){let n=t.vertices,i=qe.createVertexBuffer({context:e,typedArray:n,usage:Fe.STATIC_DRAW}),o=t.encoding.getAttributes(i),r=t.indices.indexBuffers||{},s=r[e.id];if(!l(s)||s.isDestroyed()){let a=t.indices;s=qe.createIndexBuffer({context:e,typedArray:a,usage:Fe.STATIC_DRAW,indexDatatype:Me.fromSizeInBytes(a.BYTES_PER_ELEMENT)}),s.vertexArrayDestroyable=!1,s.referenceCount=1,r[e.id]=s,t.indices.indexBuffers=r}else++s.referenceCount;return new Mn({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 Wgt(e,t,n,i,o,r,s){e.vertexArray=hr._createVertexArrayForMesh(t,e.mesh),e.terrainState=Co.READY,e.fill=e.fill&&e.fill.destroy(s)}function vgt(e){let t=e.cache.tile_waterMaskData;if(!l(t)){let n=Et.create({context:e,pixelFormat:Ke.LUMINANCE,pixelDatatype:Oe.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});n.referenceCount=1;let i=new Ut({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:kt.LINEAR,magnificationFilter:ni.LINEAR});t={allWaterTexture:n,sampler:i,destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}function Fgt(e,t){let n=t.terrainData.waterMask,i=vgt(e),o,r=n.length;if(n instanceof ImageBitmap)o=Et.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=Et.create({context:e,pixelFormat:Ke.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,se.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 lh=hr;var w3i=x(T(),1);var p3i=x(T(),1),Igt={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7},Sn=Igt;var g3i=x(T(),1),RCe={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>=RCe.RENDERED_AND_KICKED},originalResult:function(e){return e&3},kick:function(e){return e|4}},oi=RCe;function vR(e){this.tile=e,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new se}vR.prototype.update=function(e,t,n){this.changedThisFrame&&(ICe(e,t,this.tile,n),this.changedThisFrame=!1)};vR.prototype.destroy=function(e){this._destroyVertexArray(e),l(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,this.waterMaskTexture.referenceCount===0&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)};vR.prototype._destroyVertexArray=function(e){l(this.vertexArray)&&(l(e)?e.push(this.vertexArray):lh._freeVertexArray(this.vertexArray),this.vertexArray=void 0)};var Pgt=new Ey;vR.updateFillTiles=function(e,t,n,i){let o=e._quadtree,r=o._levelZeroTiles,s=o._lastSelectionFrameNumber,a=Pgt;a.clear();for(let d=0;d<t.length;++d){let u=t[d];l(u.data.vertexArray)&&a.enqueue(t[d])}let c=a.dequeue();for(;c!==void 0;){let d=c.findTileToWest(r),u=c.findTileToSouth(r),h=c.findTileToEast(r),p=c.findTileToNorth(r);Sa(e,n,c,d,s,Sn.EAST,!1,a,i),Sa(e,n,c,u,s,Sn.NORTH,!1,a,i),Sa(e,n,c,h,s,Sn.WEST,!1,a,i),Sa(e,n,c,p,s,Sn.SOUTH,!1,a,i);let b=d.findTileToNorth(r),f=d.findTileToSouth(r),y=h.findTileToNorth(r),_=h.findTileToSouth(r);Sa(e,n,c,b,s,Sn.SOUTHEAST,!1,a,i),Sa(e,n,c,y,s,Sn.SOUTHWEST,!1,a,i),Sa(e,n,c,f,s,Sn.NORTHEAST,!1,a,i),Sa(e,n,c,_,s,Sn.NORTHWEST,!1,a,i),c=a.dequeue()}};function Sa(e,t,n,i,o,r,s,a,c){if(i===void 0)return;let d=i;for(;d&&(d._lastSelectionResultFrame!==o||oi.wasKicked(d._lastSelectionResult)||oi.originalResult(d._lastSelectionResult)===oi.CULLED);){if(s)return;let u=d.parent;if(r>=Sn.NORTHWEST&&u!==void 0)switch(r){case Sn.NORTHWEST:d=d===u.northwestChild?u:void 0;break;case Sn.NORTHEAST:d=d===u.northeastChild?u:void 0;break;case Sn.SOUTHWEST:d=d===u.southwestChild?u:void 0;break;case Sn.SOUTHEAST:d=d===u.southeastChild?u:void 0;break}else d=u}if(d!==void 0){if(d._lastSelectionResult===oi.RENDERED){if(l(d.data.vertexArray))return;Xgt(e,t,n,d,r,o,a,c);return}if(oi.originalResult(i._lastSelectionResult)!==oi.CULLED)switch(r){case Sn.WEST:Sa(e,t,n,i.northwestChild,o,r,!0,a,c),Sa(e,t,n,i.southwestChild,o,r,!0,a,c);break;case Sn.EAST:Sa(e,t,n,i.southeastChild,o,r,!0,a,c),Sa(e,t,n,i.northeastChild,o,r,!0,a,c);break;case Sn.SOUTH:Sa(e,t,n,i.southwestChild,o,r,!0,a,c),Sa(e,t,n,i.southeastChild,o,r,!0,a,c);break;case Sn.NORTH:Sa(e,t,n,i.northeastChild,o,r,!0,a,c),Sa(e,t,n,i.northwestChild,o,r,!0,a,c);break;case Sn.NORTHWEST:Sa(e,t,n,i.northwestChild,o,r,!0,a,c);break;case Sn.NORTHEAST:Sa(e,t,n,i.northeastChild,o,r,!0,a,c);break;case Sn.SOUTHWEST:Sa(e,t,n,i.southwestChild,o,r,!0,a,c);break;case Sn.SOUTHEAST:Sa(e,t,n,i.southeastChild,o,r,!0,a,c);break;default:throw new he("Invalid edge")}}}function Xgt(e,t,n,i,o,r,s,a){let c=i.data;if(c.fill===void 0)c.fill=new vR(i);else if(c.fill.visitedFrame===r)return;c.fill.enqueuedFrame!==r&&(c.fill.enqueuedFrame=r,c.fill.changedThisFrame=!1,s.enqueue(i)),Ngt(e,t,n,i,o,a)}function Ngt(e,t,n,i,o,r){let s=i.data.fill,a,c=n.data.fill;l(c)?(c.visitedFrame=t.frameNumber,c.changedThisFrame&&(ICe(e,t,n,r),c.changedThisFrame=!1),a=n.data.fill.mesh):a=n.data.mesh;let d,u;switch(o){case Sn.WEST:d=s.westMeshes,u=s.westTiles;break;case Sn.SOUTH:d=s.southMeshes,u=s.southTiles;break;case Sn.EAST:d=s.eastMeshes,u=s.eastTiles;break;case Sn.NORTH:d=s.northMeshes,u=s.northTiles;break;case Sn.NORTHWEST:s.changedThisFrame=s.changedThisFrame||s.northwestMesh!==a,s.northwestMesh=a,s.northwestTile=n;return;case Sn.NORTHEAST:s.changedThisFrame=s.changedThisFrame||s.northeastMesh!==a,s.northeastMesh=a,s.northeastTile=n;return;case Sn.SOUTHWEST:s.changedThisFrame=s.changedThisFrame||s.southwestMesh!==a,s.southwestMesh=a,s.southwestTile=n;return;case Sn.SOUTHEAST:s.changedThisFrame=s.changedThisFrame||s.southeastMesh!==a,s.southeastMesh=a,s.southeastTile=n;return}if(n.level<=i.level){s.changedThisFrame=s.changedThisFrame||d[0]!==a||d.length!==1,d[0]=a,u[0]=n,d.length=1,u.length=1;return}let h,p,b,f,y=n.rectangle,_,S=i.rectangle;switch(o){case Sn.WEST:for(_=(S.north-S.south)*W.EPSILON5,h=0;h<u.length&&(b=u[h],f=b.rectangle,!W.greaterThan(y.north,f.south,_));++h);for(p=h;p<u.length&&(b=u[p],f=b.rectangle,!W.greaterThanOrEquals(y.south,f.north,_));++p);break;case Sn.SOUTH:for(_=(S.east-S.west)*W.EPSILON5,h=0;h<u.length&&(b=u[h],f=b.rectangle,!W.lessThan(y.west,f.east,_));++h);for(p=h;p<u.length&&(b=u[p],f=b.rectangle,!W.lessThanOrEquals(y.east,f.west,_));++p);break;case Sn.EAST:for(_=(S.north-S.south)*W.EPSILON5,h=0;h<u.length&&(b=u[h],f=b.rectangle,!W.lessThan(y.south,f.north,_));++h);for(p=h;p<u.length&&(b=u[p],f=b.rectangle,!W.lessThanOrEquals(y.north,f.south,_));++p);break;case Sn.NORTH:for(_=(S.east-S.west)*W.EPSILON5,h=0;h<u.length&&(b=u[h],f=b.rectangle,!W.greaterThan(y.east,f.west,_));++h);for(p=h;p<u.length&&(b=u[p],f=b.rectangle,!W.greaterThanOrEquals(y.west,f.east,_));++p);break}p-h===1?(s.changedThisFrame=s.changedThisFrame||d[h]!==a,d[h]=a,u[h]=n):(s.changedThisFrame=!0,d.splice(h,p-h,a),u.splice(h,p-h,n))}var jS=new pe,Ygt=new pe,WR=new m,V$=new m,A$=new M,Z$=new M,Du=new M;function d3(){this.height=0,this.encodedNormal=new M}function o3(e,t,n,i,o,r,s,a,c){if(l(o))return o;let d;if(l(r)&&l(s))d=(r.height+s.height)*.5;else if(l(r))d=r.height;else if(l(s))d=s.height;else if(l(a))d=a.height;else{let h=e.tile.data.tileBoundingRegion,p=0,b=0;l(h)&&(p=h.minimumHeight,b=h.maximumHeight),d=(p+b)*.5}return PCe(e,t,n,i,d,c),c}var wgt={minimumHeight:0,maximumHeight:0},Mgt=new m,ECe=new d3,GCe=new d3,LCe=new d3,WCe=new d3,kgt=typeof Uint8Array<"u"?new Uint8Array(81):void 0,Ugt={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0};function ICe(e,t,n,i){lh.initialize(n,e.terrainProvider,e._imageryLayers);let o=n.data,r=o.fill,s=n.rectangle,a=t.verticalExaggeration,c=t.verticalExaggerationRelativeHeight,d=a!==1,u=n.tilingScheme.ellipsoid,h=s3(r,u,0,1,r.northwestTile,r.northwestMesh,r.northTiles,r.northMeshes,r.westTiles,r.westMeshes,LCe),p=s3(r,u,0,0,r.southwestTile,r.southwestMesh,r.westTiles,r.westMeshes,r.southTiles,r.southMeshes,ECe),b=s3(r,u,1,0,r.southeastTile,r.southeastMesh,r.southTiles,r.southMeshes,r.eastTiles,r.eastMeshes,GCe),f=s3(r,u,1,1,r.northeastTile,r.northeastMesh,r.eastTiles,r.eastMeshes,r.northTiles,r.northMeshes,WCe);h=o3(r,u,0,1,h,p,f,b,LCe),p=o3(r,u,0,0,p,h,b,f,ECe),b=o3(r,u,1,1,b,p,f,h,GCe),f=o3(r,u,1,1,f,b,h,p,WCe);let y=p.height,_=b.height,S=h.height,A=f.height,Z=Math.min(y,_,S,A),V=Math.max(y,_,S,A),E=(Z+V)*.5,L,v,I=e.getLevelMaximumGeometricError(n.level),X=u.maximumRadius-I,N=Math.acos(X/u.maximumRadius)*4;if(N*=1.5,s.width>N&&V-Z<=I){let R=new Wc({width:9,height:9,buffer:kgt,structure:{heightOffset:V}}),G=Ugt;G.tilingScheme=n.tilingScheme,G.x=n.x,G.y=n.y,G.level=n.level,G.exaggeration=a,G.exaggerationRelativeHeight=c,r.mesh=R._createMeshSync(G)}else{let R=d,G=ae.center(s,Ygt);G.height=E;let P=u.cartographicToCartesian(G,Mgt),Y=new mr(P,void 0,void 0,void 0,void 0,!0,!0,R,a,c),O=5,k;for(k=r.westMeshes,L=0,v=k.length;L<v;++L)O+=k[L].eastIndicesNorthToSouth.length;for(k=r.southMeshes,L=0,v=k.length;L<v;++L)O+=k[L].northIndicesWestToEast.length;for(k=r.eastMeshes,L=0,v=k.length;L<v;++L)O+=k[L].westIndicesSouthToNorth.length;for(k=r.northMeshes,L=0,v=k.length;L<v;++L)O+=k[L].southIndicesEastToWest.length;let D=wgt;D.minimumHeight=Z,D.maximumHeight=V;let w=Y.stride,z=new Float32Array(O*w),J=0,ee=J;J=r3(u,s,Y,z,J,0,1,h.height,h.encodedNormal,1,D),J=c3(r,u,Y,z,J,r.westTiles,r.westMeshes,Sn.EAST,D);let H=J;J=r3(u,s,Y,z,J,0,0,p.height,p.encodedNormal,0,D),J=c3(r,u,Y,z,J,r.southTiles,r.southMeshes,Sn.NORTH,D);let te=J;J=r3(u,s,Y,z,J,1,0,b.height,b.encodedNormal,0,D),J=c3(r,u,Y,z,J,r.eastTiles,r.eastMeshes,Sn.WEST,D);let $=J;J=r3(u,s,Y,z,J,1,1,f.height,f.encodedNormal,1,D),J=c3(r,u,Y,z,J,r.northTiles,r.northMeshes,Sn.SOUTH,D),Z=D.minimumHeight,V=D.maximumHeight;let be=$t.fromRectangle(s,Z,V,n.tilingScheme.ellipsoid),ye=li.geodeticLatitudeToMercatorAngle(s.south),ce=1/(li.geodeticLatitudeToMercatorAngle(s.north)-ye),Ze=(li.geodeticLatitudeToMercatorAngle(G.latitude)-ye)*ce,xe=u.geodeticSurfaceNormalCartographic(jS,V$),Ge=cn.octEncode(xe,A$),Ve=J;Y.encode(z,J*w,be.center,M.fromElements(.5,.5,Du),E,Ge,Ze,xe),++J;let Ye=J,ke=Ye<256?1:2,it=(Ye-1)*3,pt=it*ke,Vt=(z.length-Ye*w)*Float32Array.BYTES_PER_ELEMENT,Ue;if(Vt>=pt){let yt=Ye*w*Float32Array.BYTES_PER_ELEMENT;Ue=Ye<256?new Uint8Array(z.buffer,yt,it):new Uint16Array(z.buffer,yt,it)}else Ue=Ye<256?new Uint8Array(it):new Uint16Array(it);z=new Float32Array(z.buffer,0,Ye*w);let St=0;for(L=0;L<Ye-2;++L)Ue[St++]=Ve,Ue[St++]=L,Ue[St++]=L+1;Ue[St++]=Ve,Ue[St++]=L,Ue[St++]=0;let ht=[];for(L=H;L>=ee;--L)ht.push(L);let ot=[];for(L=te;L>=H;--L)ot.push(L);let Jt=[];for(L=$;L>=te;--L)Jt.push(L);let jt=[];for(jt.push(0),L=Ve-1;L>=$;--L)jt.push(L);r.mesh=new uc(Y.center,z,Ue,it,Ye,Z,V,s,de.fromOrientedBoundingBox(be),Jgt(e,be.center,s,Z,V),Y.stride,be,Y,ht,ot,Jt,jt)}let g=t.context;r._destroyVertexArray(i),r.vertexArray=lh._createVertexArrayForMesh(g,r.mesh),o.processImagery(n,e.terrainProvider,t,!0);let C=r.waterMaskTexture;if(r.waterMaskTexture=void 0,e.terrainProvider.hasWaterMask){let R=o._findAncestorTileWithTerrainData(n);l(R)&&l(R.data.waterMaskTexture)&&(r.waterMaskTexture=R.data.waterMaskTexture,++r.waterMaskTexture.referenceCount,o._computeWaterMaskTranslationAndScale(n,R,r.waterMaskTranslationAndScale))}l(C)&&(--C.referenceCount,C.referenceCount===0&&C.destroy())}function r3(e,t,n,i,o,r,s,a,c,d,u){let h=jS;h.longitude=W.lerp(t.west,t.east,r),h.latitude=W.lerp(t.south,t.north,s),h.height=a;let p=e.cartographicToCartesian(h,WR),b;n.hasGeodeticSurfaceNormals&&(b=e.geodeticSurfaceNormal(p,V$));let f=Z$;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 l3=new ae;function kY(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=ae.clone(e.rectangle,l3),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=ae.clone(e.rectangle,l3),o.west+=W.TWO_PI,o.east+=W.TWO_PI);let s=o.east-o.west,a=(r.west-o.west)/s,c=(r.east-o.west)/s,d=o.north-o.south,u=(r.south-o.south)/d,h=(r.north-o.south)/d,p=(n.x-a)/(c-a),b=(n.y-u)/(h-u);return Math.abs(p)<Math.EPSILON5?p=0:Math.abs(p-1)<Math.EPSILON5&&(p=1),Math.abs(b)<Math.EPSILON5?b=0:Math.abs(b-1)<Math.EPSILON5&&(b=1),i.x=p,i.y=b,i}var Dgt=new M;function C$(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 Ogt=new M,Bgt=new m;function zgt(e,t,n,i,o,r,s,a,c,d){let u=i.encoding,h=i.vertices,p=kY(t,n,u.decodeTextureCoordinates(h,o,Du),Du),b=kY(t,n,u.decodeTextureCoordinates(h,r,Z$),Z$),f;c?f=(s-p.x)/(b.x-p.x):f=(a-p.y)/(b.y-p.y);let y=u.decodeHeight(h,o),_=u.decodeHeight(h,r),S=n.rectangle;jS.longitude=W.lerp(S.west,S.east,s),jS.latitude=W.lerp(S.south,S.north,a),d.height=jS.height=W.lerp(y,_,f);let A;if(u.hasVertexNormals){let Z=u.getOctEncodedNormal(h,o,Dgt),V=u.getOctEncodedNormal(h,r,Ogt),E=cn.octDecode(Z.x,Z.y,WR),L=cn.octDecode(V.x,V.y,Bgt);A=m.lerp(E,L,f,WR),m.normalize(A,A),cn.octEncode(A,d.encodedNormal)}else A=e.geodeticSurfaceNormalCartographic(jS,WR),cn.octEncode(A,d.encodedNormal)}function PCe(e,t,n,i,o,r){r.height=o;let s=t.geodeticSurfaceNormalCartographic(jS,WR);cn.octEncode(s,r.encodedNormal)}function s3(e,t,n,i,o,r,s,a,c,d,u){if(FCe(e,t,a,s,!1,n,i,u)||FCe(e,t,d,c,!0,n,i,u))return u;let p;if(R$(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],C$(r,p,n,i,u),u;let b;if(n===0?i===0?b=a3(e.westMeshes,e.westTiles,Sn.EAST,e.southMeshes,e.southTiles,Sn.NORTH,n,i):b=a3(e.northMeshes,e.northTiles,Sn.SOUTH,e.westMeshes,e.westTiles,Sn.EAST,n,i):i===0?b=a3(e.southMeshes,e.southTiles,Sn.NORTH,e.eastMeshes,e.eastTiles,Sn.WEST,n,i):b=a3(e.eastMeshes,e.eastTiles,Sn.WEST,e.northMeshes,e.northTiles,Sn.SOUTH,n,i),l(b))return PCe(e,t,n,i,b,u),u}function a3(e,t,n,i,o,r,s,a){let c=vCe(e,t,!1,n,s,a),d=vCe(i,o,!0,r,s,a);return l(c)&&l(d)?(c+d)*.5:l(c)?c:d}function c3(e,t,n,i,o,r,s,a,c){for(let d=0;d<r.length;++d)o=Hgt(e,t,n,i,o,r[d],s[d],a,c);return o}function Hgt(e,t,n,i,o,r,s,a,c){let d=r.rectangle;a===Sn.EAST&&e.tile.x===0?(d=ae.clone(r.rectangle,l3),d.west-=W.TWO_PI,d.east-=W.TWO_PI):a===Sn.WEST&&r.x===0&&(d=ae.clone(r.rectangle,l3),d.west+=W.TWO_PI,d.east+=W.TWO_PI);let u=e.tile.rectangle,h,p;o>0&&(n.decodeTextureCoordinates(i,o-1,Du),h=Du.x,p=Du.y);let b,f;switch(a){case Sn.WEST:b=s.westIndicesSouthToNorth,f=!1;break;case Sn.NORTH:b=s.northIndicesWestToEast,f=!0;break;case Sn.EAST:b=s.eastIndicesNorthToSouth,f=!1;break;case Sn.SOUTH:b=s.southIndicesEastToWest,f=!0;break}let y=r,_=e.tile,S=s.encoding,A=s.vertices,Z=n.stride,V,E;S.hasWebMercatorT&&(V=li.geodeticLatitudeToMercatorAngle(u.south),E=1/(li.geodeticLatitudeToMercatorAngle(u.north)-V));for(let L=0;L<b.length;++L){let v=b[L],I=S.decodeTextureCoordinates(A,v,Du);kY(y,_,I,I);let X=I.x,N=I.y,g=f?X:N;if(g<0||g>1||Math.abs(X-h)<W.EPSILON5&&Math.abs(N-p)<W.EPSILON5)continue;let C=Math.abs(X)<W.EPSILON5||Math.abs(X-1)<W.EPSILON5,R=Math.abs(N)<W.EPSILON5||Math.abs(N-1)<W.EPSILON5;if(C&&R)continue;let G=S.decodePosition(A,v,WR),P=S.decodeHeight(A,v),Y;S.hasVertexNormals?Y=S.getOctEncodedNormal(A,v,A$):(Y=A$,Y.x=0,Y.y=0);let O=N;if(S.hasWebMercatorT){let D=W.lerp(u.south,u.north,N);O=(li.geodeticLatitudeToMercatorAngle(D)-V)*E}let k;n.hasGeodeticSurfaceNormals&&(k=t.geodeticSurfaceNormal(G,V$)),n.encode(i,o*Z,G,I,P,Y,O,k),c.minimumHeight=Math.min(c.minimumHeight,P),c.maximumHeight=Math.max(c.maximumHeight,P),++o}return o}function vCe(e,t,n,i,o,r){let s,a,c;n?(s=0,a=e.length,c=1):(s=e.length-1,a=-1,c=-1);for(let d=s;d!==a;d+=c){let u=e[d],h=t[d];if(!R$(h,u))continue;let p;switch(i){case Sn.WEST:p=u.westIndicesSouthToNorth;break;case Sn.SOUTH:p=u.southIndicesEastToWest;break;case Sn.EAST:p=u.eastIndicesNorthToSouth;break;case Sn.NORTH:p=u.northIndicesWestToEast;break}let b=p[n?0:p.length-1];if(l(b))return u.encoding.decodeHeight(u.vertices,b)}}function R$(e,t){return l(t)&&(!l(e.data.fill)||!e.data.fill.changedThisFrame)}function FCe(e,t,n,i,o,r,s,a){let c,d,u,h,p,b=i[o?0:n.length-1],f=n[o?0:n.length-1];if(R$(b,f)&&(r===0?s===0?(c=o?f.northIndicesWestToEast:f.eastIndicesNorthToSouth,d=o,u=o):(c=o?f.eastIndicesNorthToSouth:f.southIndicesEastToWest,d=!o,u=!1):s===0?(c=o?f.westIndicesSouthToNorth:f.northIndicesWestToEast,d=!o,u=!0):(c=o?f.southIndicesEastToWest:f.westIndicesSouthToNorth,d=o,u=!o),c.length>0)){h=o?0:c.length-1,p=c[h],f.encoding.decodeTextureCoordinates(f.vertices,p,Du);let y=kY(b,e.tile,Du,Du);if(y.x===r&&y.y===s)return C$(f,p,r,s,a),!0;if(h=bo(c,d?r:s,function(_,S){f.encoding.decodeTextureCoordinates(f.vertices,_,Du);let A=kY(b,e.tile,Du,Du);return u?d?A.x-r:A.y-s:d?r-A.x:s-A.y}),h<0){if(h=~h,h>0&&h<c.length)return zgt(t,b,e.tile,f,c[h-1],c[h],r,s,d,a),!0}else return C$(f,c[h],r,s,a),!0}return!1}var Kgt=[new m,new m,new m,new m];function Jgt(e,t,n,i,o,r){let s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,c=Kgt;return m.fromRadians(n.west,n.south,o,a,c[0]),m.fromRadians(n.east,n.south,o,a,c[1]),m.fromRadians(n.west,n.north,o,a,c[2]),m.fromRadians(n.east,n.north,o,a,c[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,c,i,r)}var FR=vR;function Cr(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=Cn.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(Cr.prototype._onLayerAdded,this),this._removeLayerRemovedListener=this._imageryLayers.layerRemoved.addEventListener(Cr.prototype._onLayerRemoved,this),this._removeLayerMovedListener=this._imageryLayers.layerMoved.addEventListener(Cr.prototype._onLayerMoved,this),this._removeLayerShownListener=this._imageryLayers.layerShownOrHidden.addEventListener(Cr.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=ae.clone(ae.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._oldVerticalExaggeration=void 0,this._oldVerticalExaggerationRelativeHeight=void 0,this._oldSceneMode=re.SCENE3D}Object.defineProperties(Cr.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){this._baseColor=e,this._firstPassInitialColor=se.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){this._quadtree=e}},tilingScheme:{get:function(){if(l(this._terrainProvider))return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){this._terrainProvider!==e&&(this._terrainProvider=e,l(this._quadtree)&&this._quadtree.invalidateAllTiles())}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){as.setOwner(e,this,"_clippingPlanes")}},clippingPolygons:{get:function(){return this._clippingPolygons},set:function(e){Kh.setOwner(e,this,"_clippingPolygons")}}});function jgt(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}Cr.prototype.update=function(e){this._imageryLayers._update()};function Qgt(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)}}Cr.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile(function(i){i.data.imagery.sort(jgt)})),Qgt(this,e);let t=this._vertexArraysToDestroy,n=t.length;for(let i=0;i<n;++i)lh._freeVertexArray(t[i]);t.length=0};Cr.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};Cr.prototype.endUpdate=function(e){if(!l(this._renderState)){this._renderState=De.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:qa.LESS}}),this._blendRenderState=De.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:qa.LESS_OR_EQUAL},blending:tn.ALPHA_BLEND});let a=ze(this._renderState,!0);a.cull.enabled=!1,this._disableCullingRenderState=De.fromCache(a),a=ze(this._blendRenderState,!0),a.cull.enabled=!1,this._disableCullingBlendRenderState=De.fromCache(a)}this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&FR.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);let t=this.quadtree,n=e.verticalExaggeration,i=e.verticalExaggerationRelativeHeight,o=this._oldVerticalExaggeration!==n||this._oldVerticalExaggerationRelativeHeight!==i;this._oldVerticalExaggeration=n,this._oldVerticalExaggerationRelativeHeight=i,o&&t.forEachLoadedTile(function(a){a.data.updateExaggeration(a,e,t)});let r=this._oldSceneMode!==e.mode;this._oldSceneMode=e.mode,r&&t.forEachLoadedTile(function(a){a.data.updateSceneMode(e.mode)});let s=this._tilesToRenderByTextureCount;for(let a=0,c=s.length;a<c;++a){let d=s[a];if(l(d))for(let u=0,h=d.length;u<h;++u){let p=d[u],b=p.data.tileBoundingRegion;_yt(this,p,e),e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,b.minimumHeight)}}};function MCe(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)}Cr.prototype.updateForPick=function(e){let t=this._drawCommands;for(let n=0,i=this._usedDrawCommands;n<i;++n)MCe(t[n],e)};Cr.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()};Cr.prototype.getLevelMaximumGeometricError=function(e){return l(this._terrainProvider)?this._terrainProvider.getLevelMaximumGeometricError(e):0};Cr.prototype.loadTile=function(e,t){let n=t.data,i=!0,o;l(n)&&(i=n.boundingVolumeSourceTile!==t||t._lastSelectionResult===oi.CULLED_BUT_NEEDED,o=n.terrainState),lh.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)!==Nr.NONE&&n.boundingVolumeSourceTile===t&&(i=!1,lh.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,i))};var qgt=new de,kCe=new ae,$gt=new ae,eyt=new pe;function m3(e,t){if(t.west<t.east)return t;let n=ae.clone(t,$gt);return ae.center(e,eyt).longitude>0?n.east=W.PI:n.west=-W.PI,n}function UCe(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||!ae.equals(e.cartographicLimitRectangle,ae.MAX_VALUE))}Cr.prototype.computeTileVisibility=function(e,t,n){let i=this.computeDistanceToTile(e,t);e._distance=i;let o=UCe(this,t);if(t.fog.enabled&&!o&&W.fog(i,t.fog.density)>=1)return Nr.NONE;let r=e.data,s=r.tileBoundingRegion;if(r.boundingVolumeSourceTile===void 0)return Nr.PARTIAL;let a=t.cullingVolume,c=s.boundingVolume;l(c)||(c=s.boundingSphere),r.clippedByBoundaries=!1;let d=m3(e.rectangle,this.cartographicLimitRectangle),u=ae.simpleIntersection(d,e.rectangle,kCe);if(!l(u))return Nr.NONE;if(ae.equals(u,e.rectangle)||(r.clippedByBoundaries=!0),t.mode!==re.SCENE3D&&(c=qgt,de.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,s.minimumHeight,s.maximumHeight,c),m.fromElements(c.center.z,c.center.x,c.center.y,c.center),t.mode===re.MORPHING&&l(r.renderedMesh)&&(c=de.union(s.boundingSphere,c,c))),!l(c))return Nr.PARTIAL;let h=this._clippingPlanes;if(l(h)&&h.enabled){let _=h.computeIntersectionWithBoundingVolume(c);if(e.isClipped=_!==zt.INSIDE,_===zt.OUTSIDE)return Nr.NONE}let p=this._clippingPolygons;if(l(p)&&p.enabled){let _=p.computeIntersectionWithBoundingVolume(s);e.isClipped=_!==zt.OUTSIDE}let b,f=a.computeVisibility(c);if(f===zt.OUTSIDE?b=Nr.NONE:f===zt.INTERSECTING?b=Nr.PARTIAL:f===zt.INSIDE&&(b=Nr.FULL),b===Nr.NONE)return b;let y=t.mode===re.SCENE3D&&t.camera.frustum instanceof mn;if(t.mode===re.SCENE3D&&!y&&l(n)&&!o){let _=r.occludeePointInScaledSpace;return!l(_)||n.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(_,s.minimumHeight)?b:Nr.NONE}return b};Cr.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 tyt=[],nyt=[];Cr.prototype.canRenderWithoutLosingDetail=function(e,t){let n=e.data,i=tyt;i.length=this._imageryLayers.length;let o=!1,r=!1,s;l(n)&&(o=n.terrainState===Co.READY,r=!0,s=n.imagery);let a,c;for(a=0,c=i.length;a<c;++a)i[a]=r;if(l(s))for(a=0,c=s.length;a<c;++a){let h=s[a],p=h.loadingImagery,b=!l(p)||p.state===Bn.FAILED||p.state===Bn.INVALID,f=(h.loadingImagery||h.readyImagery).imageryLayer._layerIndex;i[f]=b&&i[f]}let d=this.quadtree._lastSelectionFrameNumber,u=nyt;for(u.length=0,u.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);u.length>0;){let h=u.pop(),p=h._lastSelectionResultFrame===d?h._lastSelectionResult:oi.NONE;if(p===oi.RENDERED){let b=h.data;if(!l(b))continue;if(!o&&h.data.terrainState===Co.READY)return!1;let f=h.data.imagery;for(a=0,c=f.length;a<c;++a){let y=f[a],_=y.loadingImagery,S=!l(_)||_.state===Bn.FAILED||_.state===Bn.INVALID,A=(y.loadingImagery||y.readyImagery).imageryLayer._layerIndex;if(S&&!i[A])return!1}}else p===oi.REFINED&&u.push(h.southwestChild,h.southeastChild,h.northwestChild,h.northeastChild)}return!0};var iyt=new m;Cr.prototype.computeTileLoadPriority=function(e,t){let n=e.data;if(n===void 0)return 0;let i=n.tileBoundingRegion.boundingVolume;if(i===void 0)return 0;let o=t.camera.positionWC,r=t.camera.directionWC,s=m.subtract(i.center,o,iyt),a=m.magnitude(s);return a<W.EPSILON5?0:(m.divideByScalar(s,a,s),(1-m.dot(s,r))*e._distance)};var XCe=new F,u3=new F,oyt=new se,ryt=new se,syt=new se,ayt=new m,NCe=new m,cyt=new m,lyt=new m;Cr.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 dyt=[new m,new m,new m,new m];function YCe(e,t,n,i,o,r){let s=e.quadtree._occluders.ellipsoid,a=s.ellipsoid,c=dyt;return m.fromRadians(n.west,n.south,o,a,c[0]),m.fromRadians(n.east,n.south,o,a,c[1]),m.fromRadians(n.west,n.north,o,a,c[2]),m.fromRadians(n.east,n.north,o,a,c[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,c,i,r)}Cr.prototype.computeDistanceToTile=function(e,t){uyt(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 uyt(e,t,n){let i=e.data;i===void 0&&(i=e.data=new lh);let o=e.tilingScheme.ellipsoid;i.tileBoundingRegion===void 0&&(i.tileBoundingRegion=new Au({computeBoundingVolumes:!1,rectangle:e.rectangle,ellipsoid:o,minimumHeight:0,maximumHeight:0}));let r=i.tileBoundingRegion,s=r.minimumHeight,a=r.maximumHeight,c=!1,d=e,u=i.mesh,h=i.terrainData;if(u!==void 0&&u.minimumHeight!==void 0&&u.maximumHeight!==void 0)r.minimumHeight=u.minimumHeight,r.maximumHeight=u.maximumHeight,c=!0;else if(h!==void 0&&h._minimumHeight!==void 0&&h._maximumHeight!==void 0)r.minimumHeight=h._minimumHeight,r.maximumHeight=h._maximumHeight;else{r.minimumHeight=Number.NaN,r.maximumHeight=Number.NaN;let p=e.parent;for(;p!==void 0;){let b=p.data;if(b!==void 0){let f=b.mesh,y=b.terrainData;if(f!==void 0&&f.minimumHeight!==void 0&&f.maximumHeight!==void 0){r.minimumHeight=f.minimumHeight,r.maximumHeight=f.maximumHeight;break}else if(y!==void 0&&y._minimumHeight!==void 0&&y._maximumHeight!==void 0){r.minimumHeight=y._minimumHeight,r.maximumHeight=y._maximumHeight;break}}p=p.parent}d=p}if(d!==void 0){let p=n.verticalExaggeration,b=n.verticalExaggerationRelativeHeight;if(p!==1&&(c=!1,r.minimumHeight=ao.getHeight(r.minimumHeight,p,b),r.maximumHeight=ao.getHeight(r.maximumHeight,p,b)),c)i.boundingVolumeIsFromMesh||(r._orientedBoundingBox=$t.clone(u.orientedBoundingBox,r._orientedBoundingBox),r._boundingSphere=de.clone(u.boundingSphere3D,r._boundingSphere),i.occludeePointInScaledSpace=m.clone(u.occludeePointInScaledSpace,i.occludeePointInScaledSpace),l(i.occludeePointInScaledSpace)||(i.occludeePointInScaledSpace=YCe(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=YCe(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}Cr.prototype.isDestroyed=function(){return!1};Cr.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(),me(this)};function myt(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}}Cr.prototype._onLayerAdded=function(e,t){if(!this.isDestroyed()&&e.show){let n=this._terrainProvider,i=this,o=this._imageryLayersUpdatedEvent,r=function(){e._imageryCache={},i._quadtree.forEachLoadedTile(function(s){if(l(s._loadedCallbacks[e._layerIndex]))return;let a,c=s.data.imagery,d=c.length,u=-1,h=0;for(a=0;a<d;++a){let b=c[a];if((b.readyImagery??b.loadingImagery).imageryLayer===e)u===-1&&(u=a),++h;else if(u!==-1)break}if(u===-1)return;let p=u+h;e._createTileImagerySkeletons(s,n,p)&&(s._loadedCallbacks[e._layerIndex]=myt(h,e,n),s.state=Ua.LOADING)})};if(e.ready){let s=e.imageryProvider;s._reload=r}this._quadtree.forEachLoadedTile(function(s){e._createTileImagerySkeletons(s,n)&&(s.state=Ua.LOADING,s.level!==0&&(s._lastSelectionResultFrame!==i.quadtree._lastSelectionFrameNumber||s._lastSelectionResult!==oi.RENDERED)&&(s.renderable=!1))}),this._layerOrderChanged=!0,o.raiseEvent()}};Cr.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()};Cr.prototype._onLayerMoved=function(e,t,n){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()};Cr.prototype._onLayerShownOrHidden=function(e,t,n){n?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)};var hyt=new F,fyt=new F;function wCe(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,NCe);return F.setTranslation(i,o,XCe),XCe},u_modifiedModelViewProjection:function(){let i=e.context.uniformState.view,o=e.context.uniformState.projection,r=F.multiplyByPoint(i,this.properties.rtc,NCe);return F.setTranslation(i,r,u3),F.multiply(o,u3,u3),u3},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,hyt):F.IDENTITY;return F.inverseTranspose(o,fyt)},u_clippingPlanesEdgeStyle:function(){let i=this.properties.clippingPlanesEdgeColor;return i.alpha=this.properties.clippingPlanesEdgeWidth,i},u_clippingDistance:function(){let i=t._clippingPolygons.clippingTexture;return l(i)?i:e.context.defaultTexture},u_clippingExtents:function(){let i=t._clippingPolygons.extentsTexture;return l(i)?i:e.context.defaultTexture},u_minimumBrightness:function(){return e.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_colorsToAlpha:function(){return this.properties.colorsToAlpha},u_frontFaceAlphaByDistance:function(){return this.properties.frontFaceAlphaByDistance},u_backFaceAlphaByDistance:function(){return this.properties.backFaceAlphaByDistance},u_translucencyRectangle:function(){return this.properties.localizedTranslucencyRectangle},u_undergroundColor:function(){return this.properties.undergroundColor},u_undergroundColorAlphaByDistance:function(){return this.properties.undergroundColorAlphaByDistance},u_lambertDiffuseMultiplier:function(){return this.properties.lambertDiffuseMultiplier},u_vertexShadowDarkness:function(){return this.properties.vertexShadowDarkness},properties:{initialColor:new se(0,0,.5,1),fillHighlightColor:new U(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new M(65e5,9e6),nightFadeDistance:new M(1e7,4e7),atmosphereLightIntensity:10,atmosphereRayleighCoefficient:new m(55e-7,13e-6,284e-7),atmosphereMieCoefficient:new m(21e-6,21e-6,21e-6),atmosphereRayleighScaleHeight:1e4,atmosphereMieScaleHeight:3200,atmosphereMieAnisotropy:.9,hsbShift:new m,center3D:void 0,rtc:new m,modifiedModelView:new F,tileRectangle:new se,verticalExaggerationAndRelativeHeight:new M(1,0),dayTextures:[],dayTextureTranslationAndScale:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureAlpha:[],dayTextureNightAlpha:[],dayTextureDayAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new M,southMercatorYAndOneOverHeight:new M,waterMask:void 0,waterMaskTranslationAndScale:new se,minMaxHeight:new M,scaleAndBias:new F,clippingPlanesEdgeColor:U.clone(U.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new se,frontFaceAlphaByDistance:new se,backFaceAlphaByDistance:new se,localizedTranslucencyRectangle:new se,undergroundColor:U.clone(U.TRANSPARENT),undergroundColorAlphaByDistance:new se,lambertDiffuseMultiplier:0,vertexShadowDarkness:0}};return l(t.materialUniformMap)?Rt(n,t.materialUniformMap):n}function pyt(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=byt(e,r,o),i.wireframeVertexArray.mesh=o}}function byt(e,t,n){let o={indices:n.indices,primitiveType:ve.TRIANGLES};Un.toWireframe(o);let r=o.indices,s=qe.createIndexBuffer({context:e,typedArray:r,usage:Fe.STATIC_DRAW,indexDatatype:Me.fromSizeInBytes(r.BYTES_PER_ELEMENT)});return new Mn({context:e,attributes:t._attributes,indexBuffer:s})}var DCe,OCe,h3;(function(){let e=new Wt({geometry:Ih.fromDimensions({dimensions:new m(2,2,2)})}),t=new Wt({geometry:new Db({radius:1})}),n=new F,i,o;function r(s){return new Ln({geometryInstances:s,appearance:new hn({translucent:!1,flat:!0}),asynchronous:!1})}DCe=function(s,a){return s===i||(h3(),i=s,n=F.fromRotationTranslation(s.halfAxes,s.center,n),e.modelMatrix=n,e.attributes.color=Ht.fromColor(a),o=r(e)),o},OCe=function(s,a){return s===i||(h3(),i=s,n=F.fromTranslation(s.center,n),n=F.multiplyByUniformScale(n,s.radius,n),t.modelMatrix=n,t.attributes.color=Ht.fromColor(a),o=r(t)),o},h3=function(){l(o)&&(o.destroy(),o=void 0,i=void 0)}})();var gyt=new se(0,0,0,0),yyt={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},xyt=U.TRANSPARENT,Tyt=new wt;function _yt(e,t,n){let i=t.data;l(i.vertexArray)||(i.fill===void 0&&(i.fill=new FR(t)),i.fill.update(e,n));let o=n.creditDisplay,r=i.terrainData;if(l(r)&&l(r.credits)){let yt=r.credits;for(let Gt=0,ln=yt.length;Gt<ln;++Gt)o.addCreditToNextFrame(yt[Gt])}let s=Lt.maximumTextureImageUnits,a=i.waterMaskTexture,c=i.waterMaskTranslationAndScale;!l(a)&&l(i.fill)&&(a=i.fill.waterMaskTexture,c=i.fill.waterMaskTranslationAndScale);let d=n.cameraUnderground,u=n.globeTranslucencyState,h=u.translucent,p=u.frontFaceAlphaByDistance,b=u.backFaceAlphaByDistance,f=u.rectangle,y=e.undergroundColor??xyt,_=e.undergroundColorAlphaByDistance??Tyt,S=UCe(e,n)&&n.mode===re.SCENE3D&&y.alpha>0&&(_.nearValue>0||_.farValue>0),A=e.lambertDiffuseMultiplier,Z=e.vertexShadowDarkness,V=e.hasWaterMask&&l(a),E=V&&e.showWaterEffect,L=e.oceanNormalMap,v=E&&l(L),I=e.terrainProvider,X=l(I)&&e.terrainProvider.hasVertexNormals,N=n.fog.enabled&&n.fog.renderable&&!d,g=e.showGroundAtmosphere&&n.mode===re.SCENE3D,C=Cn.castShadows(e.shadows)&&!h,R=Cn.receiveShadows(e.shadows)&&!h,G=e.hueShift,P=e.saturationShift,Y=e.brightnessShift,O=!(W.equalsEpsilon(G,0,W.EPSILON7)&&W.equalsEpsilon(P,0,W.EPSILON7)&&W.equalsEpsilon(Y,0,W.EPSILON7)),k=!1;if(g){let yt=m.magnitude(n.camera.positionWC),Gt=e.nightFadeOutDistance;k=yt>Gt}V&&--s,v&&--s,l(n.shadowState)&&n.shadowState.shadowsEnabled&&--s,l(e.clippingPlanes)&&e.clippingPlanes.enabled&&--s,l(e.clippingPolygons)&&e.clippingPolygons.enabled&&(--s,--s),s-=u.numberOfTextureUniforms;let D=i.renderedMesh,w=D.center,z=D.encoding,J=i.tileBoundingRegion,ee=n.verticalExaggeration,H=n.verticalExaggerationRelativeHeight,te=ee!==1,$=z.hasGeodeticSurfaceNormals,be=oyt,ye=0,ce=0,Ze=0,xe=0,Ge=!1;if(n.mode!==re.SCENE3D){let yt=n.mapProjection,Gt=yt.project(ae.southwest(t.rectangle),cyt),ln=yt.project(ae.northeast(t.rectangle),lyt);if(be.x=Gt.x,be.y=Gt.y,be.z=ln.x,be.w=ln.y,n.mode!==re.MORPHING&&(w=ayt,w.x=0,w.y=(be.z+be.x)*.5,w.z=(be.w+be.y)*.5,be.x-=w.y,be.y-=w.z,be.z-=w.y,be.w-=w.z),n.mode===re.SCENE2D&&z.quantization===ka.BITS12){let st=1/(Math.pow(2,12)-1)*.5,Nn=(be.z-be.x)*st,Zi=(be.w-be.y)*st;be.x-=Nn,be.y-=Zi,be.z+=Nn,be.w+=Zi}yt instanceof li&&(ye=t.rectangle.south,ce=t.rectangle.north,Ze=li.geodeticLatitudeToMercatorAngle(ye),xe=1/(li.geodeticLatitudeToMercatorAngle(ce)-Ze),Ge=!0)}let Ve=yyt;Ve.frameState=n,Ve.surfaceTile=i,Ve.hasWaterMask=V,Ve.showReflectiveOcean=E,Ve.showOceanWaves=v,Ve.enableLighting=e.enableLighting,Ve.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,Ve.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,Ve.showGroundAtmosphere=g,Ve.atmosphereLightIntensity=e.atmosphereLightIntensity,Ve.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,Ve.atmosphereMieCoefficient=e.atmosphereMieCoefficient,Ve.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,Ve.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,Ve.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,Ve.perFragmentGroundAtmosphere=k,Ve.hasVertexNormals=X,Ve.useWebMercatorProjection=Ge,Ve.clippedByBoundaries=i.clippedByBoundaries,Ve.hasGeodeticSurfaceNormals=$,Ve.hasExaggeration=te;let Ye=i.imagery,ke=0,it=Ye.length,pt=e.showSkirts&&!d&&!h,Vt=e.backFaceCulling&&!d&&!h,Ue=Vt?e._renderState:e._disableCullingRenderState,St=Vt?e._blendRenderState:e._disableCullingBlendRenderState,ht=Ue,ot=e._firstPassInitialColor,Jt=n.context;if(l(e._debug.boundingSphereTile)||h3(),e._materialUniformMap!==e.materialUniformMap){e._materialUniformMap=e.materialUniformMap;let yt=e._drawCommands.length;for(let Gt=0;Gt<yt;++Gt)e._uniformMaps[Gt]=wCe(n,e)}do{let yt=0,Gt,ln;if(e._drawCommands.length<=e._usedDrawCommands?(Gt=new et,Gt.owner=t,Gt.cull=!1,Gt.boundingVolume=new de,Gt.orientedBoundingBox=void 0,ln=wCe(n,e),e._drawCommands.push(Gt),e._uniformMaps.push(ln)):(Gt=e._drawCommands[e._usedDrawCommands],ln=e._uniformMaps[e._usedDrawCommands]),Gt.owner=t,++e._usedDrawCommands,t===e._debug.boundingSphereTile){let Za=J.boundingVolume,Zs=J.boundingSphere;l(Za)?DCe(Za,U.RED).update(n):l(Zs)&&OCe(Zs,U.RED).update(n)}let st=ln.properties;se.clone(ot,st.initialColor),st.oceanNormalMap=L,st.lightingFadeDistance.x=e.lightingFadeOutDistance,st.lightingFadeDistance.y=e.lightingFadeInDistance,st.nightFadeDistance.x=e.nightFadeOutDistance,st.nightFadeDistance.y=e.nightFadeInDistance,st.atmosphereLightIntensity=e.atmosphereLightIntensity,st.atmosphereRayleighCoefficient=e.atmosphereRayleighCoefficient,st.atmosphereMieCoefficient=e.atmosphereMieCoefficient,st.atmosphereRayleighScaleHeight=e.atmosphereRayleighScaleHeight,st.atmosphereMieScaleHeight=e.atmosphereMieScaleHeight,st.atmosphereMieAnisotropy=e.atmosphereMieAnisotropy,st.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity;let Nn=d?b:p,Zi=d?p:b;l(Nn)&&(se.fromElements(Nn.near,Nn.nearValue,Nn.far,Nn.farValue,st.frontFaceAlphaByDistance),se.fromElements(Zi.near,Zi.nearValue,Zi.far,Zi.farValue,st.backFaceAlphaByDistance)),se.fromElements(_.near,_.nearValue,_.far,_.farValue,st.undergroundColorAlphaByDistance),U.clone(y,st.undergroundColor),st.lambertDiffuseMultiplier=A,st.vertexShadowDarkness=Z;let Ci=!l(i.vertexArray)&&l(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;Ci&&U.clone(e.fillHighlightColor,st.fillHighlightColor),st.verticalExaggerationAndRelativeHeight.x=ee,st.verticalExaggerationAndRelativeHeight.y=H,st.center3D=D.center,m.clone(w,st.rtc),se.clone(be,st.tileRectangle),st.southAndNorthLatitude.x=ye,st.southAndNorthLatitude.y=ce,st.southMercatorYAndOneOverHeight.x=Ze,st.southMercatorYAndOneOverHeight.y=xe;let Dt=ryt,Ro=m3(t.rectangle,e.cartographicLimitRectangle),ki=syt,ri=m3(t.rectangle,f);m.fromElements(G,P,Y,st.hsbShift);let kn=t.rectangle,Yn=1/kn.width,Ui=1/kn.height;Dt.x=(Ro.west-kn.west)*Yn,Dt.y=(Ro.south-kn.south)*Ui,Dt.z=(Ro.east-kn.west)*Yn,Dt.w=(Ro.north-kn.south)*Ui,se.clone(Dt,st.localizedCartographicLimitRectangle),ki.x=(ri.west-kn.west)*Yn,ki.y=(ri.south-kn.south)*Ui,ki.z=(ri.east-kn.west)*Yn,ki.w=(ri.north-kn.south)*Ui,se.clone(ki,st.localizedTranslucencyRectangle);let Vi=N&&W.fog(t._distance,n.fog.density)>W.EPSILON3;O=O&&(Vi||g);let ir=!1,wr=!1,Ss=!1,Vr=!1,wn=!1,uo=!1,An=!1,Uo=!1,Eo=!1,na=!1;for(;yt<s&&ke<it;){let Za=Ye[ke],Zs=Za.readyImagery;if(++ke,!l(Zs)||Zs.imageryLayer.alpha===0)continue;let nm=Za.useWebMercatorT?Zs.textureWebMercator:Zs.texture,Lo=Zs.imageryLayer;l(Za.textureTranslationAndScale)||(Za.textureTranslationAndScale=Lo._calculateTextureTranslationAndScale(t,Za)),st.dayTextures[yt]=nm,st.dayTextureTranslationAndScale[yt]=Za.textureTranslationAndScale,st.dayTextureTexCoordsRectangle[yt]=Za.textureCoordinateRectangle,st.dayTextureUseWebMercatorT[yt]=Za.useWebMercatorT,st.dayTextureAlpha[yt]=Lo.alpha,uo=uo||st.dayTextureAlpha[yt]!==1,st.dayTextureNightAlpha[yt]=Lo.nightAlpha,An=An||st.dayTextureNightAlpha[yt]!==1,st.dayTextureDayAlpha[yt]=Lo.dayAlpha,An=An||st.dayTextureDayAlpha[yt]!==1,st.dayTextureBrightness[yt]=Lo.brightness,ir=ir||st.dayTextureBrightness[yt]!==ms.DEFAULT_BRIGHTNESS,st.dayTextureContrast[yt]=Lo.contrast,wr=wr||st.dayTextureContrast[yt]!==ms.DEFAULT_CONTRAST,st.dayTextureHue[yt]=Lo.hue,Ss=Ss||st.dayTextureHue[yt]!==ms.DEFAULT_HUE,st.dayTextureSaturation[yt]=Lo.saturation,Vr=Vr||st.dayTextureSaturation[yt]!==ms.DEFAULT_SATURATION,st.dayTextureOneOverGamma[yt]=1/Lo.gamma,wn=wn||st.dayTextureOneOverGamma[yt]!==1/ms.DEFAULT_GAMMA,st.dayTextureSplit[yt]=Lo.splitDirection,Uo=Uo||st.dayTextureSplit[yt]!==0;let Ic=st.dayTextureCutoutRectangles[yt];if(l(Ic)||(Ic=st.dayTextureCutoutRectangles[yt]=new se),se.clone(se.ZERO,Ic),l(Lo.cutoutRectangle)){let Xo=m3(kn,Lo.cutoutRectangle),md=ae.simpleIntersection(Xo,kn,kCe);Eo=l(md)||Eo,Ic.x=(Xo.west-kn.west)*Yn,Ic.y=(Xo.south-kn.south)*Ui,Ic.z=(Xo.east-kn.west)*Yn,Ic.w=(Xo.north-kn.south)*Ui}let ud=st.colorsToAlpha[yt];l(ud)||(ud=st.colorsToAlpha[yt]=new se);let $d=l(Lo.colorToAlpha)&&Lo.colorToAlphaThreshold>0;if(na=na||$d,$d){let Xo=Lo.colorToAlpha;ud.x=Xo.red,ud.y=Xo.green,ud.z=Xo.blue,ud.w=Lo.colorToAlphaThreshold}else ud.w=-1;if(l(Zs.credits)){let Xo=Zs.credits;for(let md=0,kg=Xo.length;md<kg;++md)o.addCreditToNextFrame(Xo[md])}++yt}st.dayTextures.length=yt,st.waterMask=a,se.clone(c,st.waterMaskTranslationAndScale),st.minMaxHeight.x=z.minimumHeight,st.minMaxHeight.y=z.maximumHeight,F.clone(z.matrix,st.scaleAndBias);let Wi=e._clippingPlanes,Go=l(Wi)&&Wi.enabled&&t.isClipped;Go&&(st.clippingPlanesEdgeColor=U.clone(Wi.edgeColor,st.clippingPlanesEdgeColor),st.clippingPlanesEdgeWidth=Wi.edgeWidth);let gc=e._clippingPolygons,ws=l(gc)&&gc.enabled&&t.isClipped;Ve.numberOfDayTextures=yt,Ve.applyBrightness=ir,Ve.applyContrast=wr,Ve.applyHue=Ss,Ve.applySaturation=Vr,Ve.applyGamma=wn,Ve.applyAlpha=uo,Ve.applyDayNightAlpha=An,Ve.applySplit=Uo,Ve.enableFog=Vi,Ve.enableClippingPlanes=Go,Ve.clippingPlanes=Wi,Ve.enableClippingPolygons=ws,Ve.clippingPolygons=gc,Ve.hasImageryLayerCutout=Eo,Ve.colorCorrect=O,Ve.highlightFillTile=Ci,Ve.colorToAlpha=na,Ve.showUndergroundColor=S,Ve.translucent=h;let As=i.renderedMesh.indices.length;pt||(As=i.renderedMesh.indexCountWithoutSkirts),Gt.shaderProgram=e._surfaceShaderSet.getShaderProgram(Ve),Gt.castShadows=C,Gt.receiveShadows=R,Gt.renderState=ht,Gt.primitiveType=ve.TRIANGLES,Gt.vertexArray=i.vertexArray||i.fill.vertexArray,Gt.count=As,Gt.uniformMap=ln,Gt.pass=Le.GLOBE,e._debug.wireframe&&(pyt(Jt,e,t),l(i.wireframeVertexArray)&&(Gt.vertexArray=i.wireframeVertexArray,Gt.primitiveType=ve.LINES,Gt.count=As*2));let es=Gt.boundingVolume,C0=Gt.orientedBoundingBox;n.mode!==re.SCENE3D?(de.fromRectangleWithHeights2D(t.rectangle,n.mapProjection,J.minimumHeight,J.maximumHeight,es),m.fromElements(es.center.z,es.center.x,es.center.y,es.center),n.mode===re.MORPHING&&(es=de.union(J.boundingSphere,es,es))):(Gt.boundingVolume=de.clone(J.boundingSphere,es),Gt.orientedBoundingBox=$t.clone(J.boundingVolume,C0)),Gt.dirty=!0,h&&u.updateDerivedCommands(Gt,n),MCe(Gt,n),ht=St,ot=gyt}while(ke<it)}var UY=Cr;var Ozi=x(T(),1);function BCe(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=ae.clone(ae.MAX_VALUE)}Object.defineProperties(BCe.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=wt.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=wt.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){l(e)||(e=ae.clone(ae.MAX_VALUE)),ae.clone(e,this._rectangle)}}});var DY=BCe;var ZHi=x(T(),1);var Kzi=x(T(),1);var E$=class{constructor(t){this._ellipsoid=new _f(t.ellipsoid,m.ZERO)}get ellipsoid(){return this._ellipsoid}},OY=E$;var tHi=x(T(),1);var G$=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()}},Syt=1e3,L$=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=oi.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this._positionCache=new G$(Syt),this.state=Ua.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 Zyt(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),zCe(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),zCe(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<Ua.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=Ua.START,this.renderable=!1,this.upsampledFromParent=!1;let t=this.data;l(t)&&l(t.freeResources)&&t.freeResources(),f3(this._southwestChild),this._southwestChild=void 0,f3(this._southeastChild),this._southeastChild=void 0,f3(this._northwestChild),this._northwestChild=void 0,f3(this._northeastChild),this._northeastChild=void 0}},Ayt=256;function Zyt(e,t,n,i){let o=n.width/Ayt*i,r=Math.floor(e/o)*o,s=Math.floor(t/o)*o;return`${r.toFixed(10)},${s.toFixed(10)}`}var Cyt=new pe;function zCe(e,t){let n=e.northwestChild.rectangle,i=ae.southeast(n,Cyt),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 f3(e){l(e)&&e.freeResources()}var BY=L$;var oHi=x(T(),1);function p3(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}p3.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head};p3.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(),HCe(this,t)),t=i}};function HCe(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}p3.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))&&HCe(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,this.head=e};var zY=p3;function dh(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 zY,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 OY({ellipsoid:n}),this._tileLoadProgressEvent=new _e,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}Object.defineProperties(dh.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}});dh.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0};function Vyt(e){let t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,JCe(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()}dh.prototype.forEachLoadedTile=function(e){let t=this._tileReplacementQueue.head;for(;l(t);)t.state!==Ua.START&&e(t),t=t.replacementNext};dh.prototype.forEachRenderedTile=function(e){let t=this._tilesRenderedThisFrame;for(let n of t)e(n)};dh.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};dh.prototype.update=function(e){l(this._tileProvider.update)&&this._tileProvider.update(e)};function JCe(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}dh.prototype.beginFrame=function(e){e.passes.render&&(this._tilesInvalidated&&(Vyt(this),this._tilesInvalidated=!1),this._tileProvider.initialize(e),JCe(this),!this._debug.suspendLodUpdate&&(this._tileReplacementQueue.markStartOfRenderFrame(),this._tilesRenderedThisFrame.clear()))};dh.prototype.render=function(e){let t=e.passes,n=this._tileProvider;t.render&&(n.beginUpdate(e),Lyt(this,e),Myt(this,e),n.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&n.updateForPick(e)};function Ryt(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))}dh.prototype.endFrame=function(e){!e.passes.render||e.mode===re.MORPHING||(Xyt(this,e),wyt(this,e),Ryt(this,e))};dh.prototype.isDestroyed=function(){return!1};dh.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var KY,KCe=new pe;function Eyt(e,t){let n=ae.center(e.rectangle,KCe),i=n.longitude-KY.longitude,o=n.latitude-KY.latitude;n=ae.center(t.rectangle,KCe);let r=n.longitude-KY.longitude,s=n.latitude-KY.latitude;return i*i+o*o-(r*r+s*s)}var Gyt=new m,HY=[];function Lyt(e,t){let n=e._debug;if(n.suspendLodUpdate)return;let i=e._tilesToRender;i.length=0;let o=e._tileProvider;if(!l(e._levelZeroTiles)){let h=o.tilingScheme;if(l(h)){let p=o.tilingScheme;e._levelZeroTiles=BY.createLevelZeroTiles(p);let b=e._levelZeroTiles.length;if(HY.length<b){HY=new Array(b);for(let f=0;f<b;++f)HY[f]===void 0&&(HY[f]=new JY)}}else return}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;let r=e._levelZeroTiles,s=r.length>1?e._occluders:void 0;KY=t.camera.positionCartographic,r.sort(Eyt);let a=e._addHeightCallbacks,c=e._removeHeightCallbacks;a.forEach(h=>{let p=r.find(b=>ae.contains(b.rectangle,h.positionCartographic));p&&p._addedCustomData.push(h)}),c.forEach(h=>{let p=r.find(b=>ae.contains(b.rectangle,h.positionCartographic));p&&p._removedCustomData.push(h)}),r.forEach(h=>h.updateCustomData()),a.length=0,c.length=0;let d=t.camera;e._cameraPositionCartographic=d.positionCartographic;let u=F.getTranslation(d.transform,Gyt);e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(u,e._cameraReferenceFrameOriginCartographic);for(let h=0;h<r.length;++h){let p=r[h];e._tileReplacementQueue.markTileRendered(p),p.renderable?vc(e,p,o,t,s,!1,HY[h]):(Tg(e,e._tileLoadQueueHigh,p,t),++n.tilesWaitingForChildren)}e._lastSelectionFrameNumber=t.frameNumber}function Tg(e,t,n,i){n.needsLoading&&(e.tileProvider.computeTileLoadPriority!==void 0&&(n._loadPriority=e.tileProvider.computeTileLoadPriority(n,i)),t.push(n))}function JY(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function jCe(){this.southwest=new JY,this.southeast=new JY,this.northwest=new JY,this.northeast=new JY}jCe.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 v$=new Array(31);for(let e=0;e<v$.length;++e)v$[e]=new jCe;function Wyt(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=Iyt(e,t,n)<e.maximumScreenSpaceError,a=n.southwestChild,c=n.southeastChild,d=n.northwestChild,u=n.northeastChild,h=e._lastSelectionFrameNumber,p=n._lastSelectionResultFrame===h?n._lastSelectionResult:oi.NONE,b=e.tileProvider;if(s||i){let f=oi.originalResult(p)===oi.RENDERED,y=oi.originalResult(p)===oi.CULLED||p===oi.NONE,_=n.state===Ua.DONE,S=f||y||_;if(S||l(b.canRenderWithoutLosingDetail)&&(S=b.canRenderWithoutLosingDetail(n)),S){s&&Tg(e,e._tileLoadQueueMedium,n,t),b3(e,n),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===oi.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=oi.RENDERED,o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}i=!0,s&&Tg(e,e._tileLoadQueueHigh,n,t)}if(b.canRefine(n)){if(a.upsampledFromParent&&c.upsampledFromParent&&d.upsampledFromParent&&u.upsampledFromParent){b3(e,n),Tg(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===oi.RENDERED,o.notYetRenderableCount=n.renderable?0:1,n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=oi.RENDERED,o.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(n);return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=oi.REFINED;let y=e._tilesToRender.length,_=e._tileLoadQueueLow.length,S=e._tileLoadQueueMedium.length,A=e._tileLoadQueueHigh.length,Z=e._tileToUpdateHeights.length;if(vyt(e,a,c,d,u,t,i,o),y!==e._tilesToRender.length){let V=o.allAreRenderable,E=o.anyWereRenderedLastFrame,L=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!==oi.KICKED&&g!==n;)g._lastSelectionResult=oi.kick(g._lastSelectionResult),g=g.parent}e._tilesToRender.length=y,e._tileToUpdateHeights.length=Z,b3(e,n),n._lastSelectionResult=oi.RENDERED;let X=p===oi.RENDERED;!X&&L>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=_,e._tileLoadQueueMedium.length=S,e._tileLoadQueueHigh.length=A,Tg(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&&Tg(e,e._tileLoadQueueLow,n,t)}return}n._lastSelectionResultFrame=t.frameNumber,n._lastSelectionResult=oi.RENDERED,b3(e,n),Tg(e,e._tileLoadQueueHigh,n,t),o.allAreRenderable=n.renderable,o.anyWereRenderedLastFrame=p===oi.RENDERED,o.notYetRenderableCount=n.renderable?0:1}function vyt(e,t,n,i,o,r,s,a){let c=r.camera.positionCartographic,d=e._tileProvider,u=e._occluders,h=v$[t.level],p=h.southwest,b=h.southeast,f=h.northwest,y=h.northeast;c.longitude<t.rectangle.east?c.latitude<t.rectangle.north?(vc(e,t,d,r,u,s,p),vc(e,n,d,r,u,s,b),vc(e,i,d,r,u,s,f),vc(e,o,d,r,u,s,y)):(vc(e,i,d,r,u,s,f),vc(e,t,d,r,u,s,p),vc(e,o,d,r,u,s,y),vc(e,n,d,r,u,s,b)):c.latitude<t.rectangle.north?(vc(e,n,d,r,u,s,b),vc(e,t,d,r,u,s,p),vc(e,o,d,r,u,s,y),vc(e,i,d,r,u,s,f)):(vc(e,o,d,r,u,s,y),vc(e,i,d,r,u,s,f),vc(e,n,d,r,u,s,b),vc(e,t,d,r,u,s,p)),h.combine(a)}function Fyt(e,t){let n=t.rectangle;return l(e._cameraPositionCartographic)&&ae.contains(n,e._cameraPositionCartographic)||l(e._cameraReferenceFrameOriginCartographic)&&ae.contains(n,e._cameraReferenceFrameOriginCartographic)}function vc(e,t,n,i,o,r,s){if(n.computeTileVisibility(t,i,o)!==Nr.NONE)return Wyt(e,i,t,r,s);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),s.allAreRenderable=!0,s.anyWereRenderedLastFrame=!1,s.notYetRenderableCount=0,Fyt(e,t)){(!l(t.data)||!l(t.data.vertexArray))&&Tg(e,e._tileLoadQueueMedium,t,i);let a=e._lastSelectionFrameNumber,c=t._lastSelectionResultFrame===a?t._lastSelectionResult:oi.NONE;c!==oi.CULLED_BUT_NEEDED&&c!==oi.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=oi.CULLED_BUT_NEEDED}else e.preloadSiblings||t.level===0?(Tg(e,e._tileLoadQueueLow,t,i),t._lastSelectionResult=oi.CULLED):t._lastSelectionResult=oi.CULLED;t._lastSelectionResultFrame=i.frameNumber}function Iyt(e,t,n){if(t.mode===re.SCENE2D||t.camera.frustum instanceof mn||t.camera.frustum instanceof rs)return Pyt(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 Pyt(e,t,n){let o=t.camera.frustum,r=o.offCenterFrustum;l(r)&&(o=r);let s=t.context,a=s.drawingBufferWidth,c=s.drawingBufferHeight,d=e._tileProvider.getLevelMaximumGeometricError(n.level),u=Math.max(o.top-o.bottom,o.right-o.left)/Math.max(a,c),h=d/u;return t.fog.enabled&&t.mode!==re.SCENE2D&&(h-=W.fog(n._distance,t.fog.density)*t.fog.sse),h/=t.pixelRatio,h}function b3(e,t){e._tilesToRender.push(t),e._tilesRenderedThisFrame.add(t)}function Xyt(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=Yi()+e._loadQueueTimeSlice,s=e._tileProvider,a=W$(e,t,s,r,n,!1);a=W$(e,t,s,r,i,a),W$(e,t,s,r,o,a)}function Nyt(e,t){return e._loadPriority-t._loadPriority}function W$(e,t,n,i,o,r){n.computeTileLoadPriority!==void 0&&o.sort(Nyt);for(let s=0,a=o.length;s<a&&(Yi()<i||!r);++s){let c=o[s];e._tileReplacementQueue.markTileRendered(c),n.loadTile(t,c),r=!0}return r}var IR=new gn,g3=new pe,Fx=new m,Yyt=[];function wyt(e,t){if(!l(e.tileProvider.tilingScheme))return;let n=Yyt;n.length=0;let i=e._tileToUpdateHeights,o=Yi(),r=e._updateHeightsTimeSlice,s=o+r,a=t.mode,c=t.mapProjection,d=e.tileProvider.tilingScheme.ellipsoid,u;for(;i.length>0;){let h=i[0];if(!l(h.data)||!l(h.data.mesh)){let _=h._lastSelectionResultFrame===e._lastSelectionFrameNumber?h._lastSelectionResult:oi.NONE;(_===oi.RENDERED||_===oi.CULLED_BUT_NEEDED)&&n.push(h),h.clearPositionCache(),i.shift();continue}let p=h.customData;l(h._customDataIterator)||(h._customDataIterator=p.values());let b=h._customDataIterator,f=!1,y;for(;!(y=b.next()).done;){let _=y.value,S=h.data.terrainData,A=l(S)&&S.wasCreatedByUpsampling();if(h.level>_.level&&!A){let Z,V=h.getPositionCacheEntry(_.positionCartographic,e.maximumScreenSpaceError);if(l(V))Z=V;else{if(l(_.positionOnEllipsoidSurface)||(_.positionOnEllipsoidSurface=m.fromRadians(_.positionCartographic.longitude,_.positionCartographic.latitude,0,d)),a===re.SCENE3D){let E=d.geodeticSurfaceNormal(_.positionOnEllipsoidSurface,IR.direction),L=d.getSurfaceNormalIntersectionWithZAxis(_.positionOnEllipsoidSurface,11500,IR.origin);if(!l(L)){let v=0;l(h.data.tileBoundingRegion)&&(v=h.data.tileBoundingRegion.minimumHeight);let I=Math.min(v,-11500),X=m.multiplyByScalar(E,Math.abs(I)+1,Fx);m.subtract(_.positionOnEllipsoidSurface,X,IR.origin)}}else pe.clone(_.positionCartographic,g3),g3.height=-11500,c.project(g3,Fx),m.fromElements(Fx.z,Fx.x,Fx.y,Fx),m.clone(Fx,IR.origin),m.clone(m.UNIT_X,IR.direction);Z=h.data.pick(IR,a,c,!1,Fx),l(Z)&&h.setPositionCacheEntry(_.positionCartographic,e.maximumScreenSpaceError,Z)}if(l(Z)){if(l(_.callback)){let E=d.cartesianToCartographic(Z,g3);_.callback(E)}_.level=h.level}}if(Yi()>=s){f=!0;break}}if(f){h._customDataIterator=b;break}else h._customDataIterator=void 0,i.shift()}for(u=0;u<n.length;u++)i.push(n[u])}function Myt(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 jY=dh;function Mf(e){e=e??ie.default;let t=new s0({ellipsoid:e}),n=new lS;this._ellipsoid=e,this._imageryLayerCollection=n,this._surfaceShaderSet=new MY,this._material=void 0,this._surface=new jY({tileProvider:new UY({terrainProvider:t,imageryLayers:n,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=t,this._terrainProviderChanged=new _e,this._undergroundColor=U.clone(U.BLACK),this._undergroundColorAlphaByDistance=new wt(e.maximumRadius/1e3,0,e.maximumRadius/5,1),this._translucency=new DY,I$(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new We({url:Kt("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this.fillHighlightColor=void 0,this.enableLighting=!1,this.lambertDiffuseMultiplier=.9,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=ie.WGS84.equals(e),this.atmosphereLightIntensity=10,this.atmosphereRayleighCoefficient=new m(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new m(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.lightingFadeOutDistance=W.PI_OVER_TWO*e.minimumRadius,this.lightingFadeInDistance=W.PI*e.minimumRadius,this.nightFadeOutDistance=W.PI_OVER_TWO*e.minimumRadius,this.nightFadeInDistance=5*W.PI_OVER_TWO*e.minimumRadius,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!1,this.shadows=Cn.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(Mf.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=ae.clone(ae.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)&&I$(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,I$(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=wt.clone(e,this._undergroundColorAlphaByDistance)}},translucency:{get:function(){return this._translucency}}});function I$(e){let t=[],n=l(e._material)&&(l(e._material.shaderSource.match(/slope/))||l(e._material.shaderSource.match("normalEC"))),i=[Jh,LR];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(YY),e._surfaceShaderSet.baseVertexShaderSource=new Be({sources:[Jh,LR,wY],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new Be({sources:i,defines:t}),e._surfaceShaderSet.material=e._material}function kyt(e){return function(t,n){let i=de.distanceSquaredTo(t.pickBoundingSphere,e),o=de.distanceSquaredTo(n.pickBoundingSphere,e);return i-o}}var Uyt=[],Dyt={start:0,stop:0};Mf.prototype.pickWorldCoordinates=function(e,t,n,i){n=n??!0;let o=t.mode,r=t.mapProjection,s=Uyt;s.length=0;for(let d of this._surface._tilesRenderedThisFrame){let u=d.data;if(!l(u))continue;let h=u.pickBoundingSphere;if(o!==re.SCENE3D)u.pickBoundingSphere=h=de.fromRectangleWithHeights2D(d.rectangle,r,u.tileBoundingRegion.minimumHeight,u.tileBoundingRegion.maximumHeight,h),m.fromElements(h.center.z,h.center.x,h.center.y,h.center);else if(l(u.renderedMesh))de.clone(u.tileBoundingRegion.boundingSphere,h);else continue;let p=ai.raySphere(e,h,Dyt);l(p)&&s.push(u)}s.sort(kyt(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 Oyt=new pe;Mf.prototype.pick=function(e,t,n){if(n=this.pickWorldCoordinates(e,t,!0,n),l(n)&&t.mode!==re.SCENE3D){n=m.fromElements(n.y,n.z,n.x,n);let i=t.mapProjection.unproject(n,Oyt);n=this._ellipsoid.cartographicToCartesian(i,n)}return n};var Byt=new m,QCe=new m,zyt=new pe,Hyt=new gn;function F$(e,t){return l(e)&&ae.contains(e.rectangle,t)?e:void 0}Mf.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],!ae.contains(n.rectangle,e));++i);if(i>=o)return;let r=n;for(;l(n);)n=F$(n._southwestChild,e)||F$(n._southeastChild,e)||F$(n._northwestChild,e)||n._northeastChild,l(n)&&l(n.data)&&l(n.data.renderedMesh)&&(r=n);if(n=r,!l(n)||!l(n.data)||!l(n.data.renderedMesh))return;let s=this._surface._tileProvider.tilingScheme.projection,a=this._surface._tileProvider.tilingScheme.ellipsoid,c=m.fromRadians(e.longitude,e.latitude,0,a,Byt),d=Hyt,u=a.geodeticSurfaceNormal(c,d.direction),h=a.getSurfaceNormalIntersectionWithZAxis(c,11500,d.origin);if(!l(h)){let b;l(n.data.tileBoundingRegion)&&(b=n.data.tileBoundingRegion.minimumHeight);let f=Math.min(b??0,-11500),y=m.multiplyByScalar(u,Math.abs(f)+1,QCe);m.subtract(c,y,d.origin)}let p=n.data.pick(d,re.SCENE3D,s,!1,QCe);if(l(p))return a.cartesianToCartographic(p,zyt).height};Mf.prototype.update=function(e){this.show&&e.passes.render&&this._surface.update(e)};Mf.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 Et({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))};Mf.prototype.render=function(e){this.show&&(l(this._material)&&this._material.update(e.context),this._surface.render(e))};Mf.prototype.endFrame=function(e){this.show&&e.passes.render&&this._surface.endFrame(e)};Mf.prototype.isDestroyed=function(){return!1};Mf.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(),me(this)};var QY=Mf;var cJi=x(T(),1);var xKi=x(T(),1);var dKi=x(T(),1);var iKi=x(T(),1);function Kyt(e,t,n,i){this.rightAscension=e,this.declination=t,this.rotation=n,this.rotationRate=i}var qY=Kyt;var uVe={},Jyt=32.184,jyt=2451545,qCe=-.0529921,$Ce=-.1059842,eVe=13.0120009,tVe=13.3407154,nVe=.9856003,iVe=26.4057084,oVe=13.064993,rVe=.3287146,sVe=1.7484877,aVe=-.1589763,cVe=.0036096,lVe=.1643573,dVe=12.9590088,P$=new Q;uVe.ComputeMoon=function(e,t){l(e)||(e=Q.now()),P$=Q.addSeconds(e,Jyt,P$);let n=Q.totalDays(P$)-jyt,i=n/ii.DAYS_PER_JULIAN_CENTURY,o=(125.045+qCe*n)*W.RADIANS_PER_DEGREE,r=(250.089+$Ce*n)*W.RADIANS_PER_DEGREE,s=(260.008+eVe*n)*W.RADIANS_PER_DEGREE,a=(176.625+tVe*n)*W.RADIANS_PER_DEGREE,c=(357.529+nVe*n)*W.RADIANS_PER_DEGREE,d=(311.589+iVe*n)*W.RADIANS_PER_DEGREE,u=(134.963+oVe*n)*W.RADIANS_PER_DEGREE,h=(276.617+rVe*n)*W.RADIANS_PER_DEGREE,p=(34.226+sVe*n)*W.RADIANS_PER_DEGREE,b=(15.134+aVe*n)*W.RADIANS_PER_DEGREE,f=(119.743+cVe*n)*W.RADIANS_PER_DEGREE,y=(239.961+lVe*n)*W.RADIANS_PER_DEGREE,_=(25.053+dVe*n)*W.RADIANS_PER_DEGREE,S=Math.sin(o),A=Math.sin(r),Z=Math.sin(s),V=Math.sin(a),E=Math.sin(c),L=Math.sin(d),v=Math.sin(u),I=Math.sin(h),X=Math.sin(p),N=Math.sin(b),g=Math.sin(f),C=Math.sin(y),R=Math.sin(_),G=Math.cos(o),P=Math.cos(r),Y=Math.cos(s),O=Math.cos(a),k=Math.cos(c),D=Math.cos(d),w=Math.cos(u),z=Math.cos(h),J=Math.cos(p),ee=Math.cos(b),H=Math.cos(f),te=Math.cos(y),$=Math.cos(_),be=(269.9949+.0031*i-3.8787*S-.1204*A+.07*Z-.0172*V+.0072*L-.0052*N+.0043*R)*W.RADIANS_PER_DEGREE,ye=(66.5392+.013*i+1.5419*G+.0239*P-.0278*Y+.0068*O-.0029*D+9e-4*w+8e-4*ee-9e-4*$)*W.RADIANS_PER_DEGREE,ce=(38.3213+13.17635815*n-14e-13*n*n+3.561*S+.1208*A-.0642*Z+.0158*V+.0252*E-.0066*L-.0047*v-.0046*I+.0028*X+.0052*N+.004*g+.0019*C-.0044*R)*W.RADIANS_PER_DEGREE,Ze=(13.17635815-14e-13*(2*n)+3.561*G*qCe+.1208*P*$Ce-.0642*Y*eVe+.0158*O*tVe+.0252*k*nVe-.0066*D*iVe-.0047*w*oVe-.0046*z*rVe+.0028*J*sVe+.0052*ee*aVe+.004*H*cVe+.0019*te*lVe-.0044*$*dVe)/86400*W.RADIANS_PER_DEGREE;return l(t)||(t=new qY),t.rightAscension=be,t.declination=ye,t.rotation=ce,t.rotationRate=Ze,t};var $Y=uVe;function mVe(e){(!l(e)||typeof e!="function")&&(e=$Y.ComputeMoon),this._computeFunction=e}var Qyt=new m,qyt=new m,$yt=new m;function ext(e,t,n){let i=Qyt;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=$yt;r.x=o*Math.cos(e),r.y=o*Math.sin(e),r.z=Math.sin(t);let s=m.cross(r,i,qyt);return l(n)||(n=new q),n[0]=i.x,n[1]=s.x,n[2]=r.x,n[3]=i.y,n[4]=s.y,n[5]=r.y,n[6]=i.z,n[7]=s.z,n[8]=r.z,n}var txt=new q,nxt=new Pe;mVe.prototype.evaluate=function(e,t){l(e)||(e=Q.now());let n=this._computeFunction(e),i=ext(n.rightAscension,n.declination,t),o=W.zeroToTwoPi(n.rotation),r=Pe.fromAxisAngle(m.UNIT_Z,o,nxt),s=q.fromQuaternion(Pe.conjugate(r,r),txt);return q.multiply(s,i,i)};var ew=mVe;var HKi=x(T(),1);var _Ki=x(T(),1),PR=`uniform vec3 u_radii;
uniform vec3 u_oneOverEllipsoidRadiiSquared;
in vec3 v_positionEC;
vec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)
{
vec3 positionEC = czm_pointAlongRay(ray, intersection);
vec3 positionMC = (czm_inverseModelView * vec4(positionEC, 1.0)).xyz;
vec3 geodeticNormal = normalize(czm_geodeticSurfaceNormal(positionMC, vec3(0.0), u_oneOverEllipsoidRadiiSquared));
vec3 sphericalNormal = normalize(positionMC / u_radii);
vec3 normalMC = geodeticNormal * side; // normalized surface normal (always facing the viewer) in model coordinates
vec3 normalEC = normalize(czm_normal * normalMC); // normalized surface normal in eye coordinates
vec2 st = czm_ellipsoidTextureCoordinates(sphericalNormal);
vec3 positionToEyeEC = -positionEC;
czm_materialInput materialInput;
materialInput.s = st.s;
materialInput.st = st;
materialInput.str = (positionMC + u_radii) / u_radii;
materialInput.normalEC = normalEC;
materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);
materialInput.positionToEyeEC = positionToEyeEC;
czm_material material = czm_getMaterial(materialInput);
#ifdef ONLY_SUN_LIGHTING
return czm_private_phong(normalize(positionToEyeEC), material, czm_sunDirectionEC);
#else
return czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}
void main()
{
// PERFORMANCE_TODO: When dynamic branching is available, compute ratio of maximum and minimum radii
// in the vertex shader. Only when it is larger than some constant, march along the ray.
// Otherwise perform one intersection test which will be the common case.
// Test if the ray intersects a sphere with the ellipsoid's maximum radius.
// For very oblate ellipsoids, using the ellipsoid's radii for an intersection test
// may cause false negatives. This will discard fragments before marching the ray forward.
float maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;
vec3 direction = normalize(v_positionEC);
vec3 ellipsoidCenter = czm_modelView[3].xyz;
float t1 = -1.0;
float t2 = -1.0;
float b = -2.0 * dot(direction, ellipsoidCenter);
float c = dot(ellipsoidCenter, ellipsoidCenter) - maxRadius * maxRadius;
float discriminant = b * b - 4.0 * c;
if (discriminant >= 0.0) {
t1 = (-b - sqrt(discriminant)) * 0.5;
t2 = (-b + sqrt(discriminant)) * 0.5;
}
if (t1 < 0.0 && t2 < 0.0) {
discard;
}
float t = min(t1, t2);
if (t < 0.0) {
t = 0.0;
}
// March ray forward to intersection with larger sphere and find
czm_ray ray = czm_ray(t * direction, direction);
vec3 ellipsoid_inverseRadii = vec3(1.0 / u_radii.x, 1.0 / u_radii.y, 1.0 / u_radii.z);
czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);
if (czm_isEmpty(intersection))
{
discard;
}
// If the viewer is outside, compute outsideFaceColor, with normals facing outward.
vec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);
// If the viewer either is inside or can see inside, compute insideFaceColor, with normals facing inward.
vec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);
out_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);
out_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);
#if (defined(WRITE_DEPTH) && (__VERSION__ == 300 || defined(GL_EXT_frag_depth)))
t = (intersection.start != 0.0) ? intersection.start : intersection.stop;
vec3 positionEC = czm_pointAlongRay(ray, t);
vec4 positionCC = czm_projection * vec4(positionEC, 1.0);
#ifdef LOG_DEPTH
czm_writeLogDepth(1.0 + positionCC.w);
#else
float z = positionCC.z / positionCC.w;
float n = czm_depthRange.near;
float f = czm_depthRange.far;
gl_FragDepth = (z * (f - n) + f + n) * 0.5;
#endif
#endif
}
`;var AKi=x(T(),1),XR=`in vec3 position;
uniform vec3 u_radii;
out vec3 v_positionEC;
void main()
{
// In the vertex data, the cube goes from (-1.0, -1.0, -1.0) to (1.0, 1.0, 1.0) in model coordinates.
// Scale to consider the radii. We could also do this once on the CPU when using the BoxGeometry,
// but doing it here allows us to change the radii without rewriting the vertex data, and
// allows all ellipsoids to reuse the same vertex data.
vec4 p = vec4(u_radii * position, 1.0);
vec4 pEC = czm_modelView * p;
v_positionEC = pEC.xyz; // position in eye coordinates
gl_Position = czm_projection * pEC;
// With multi-frustum, when the ellipsoid primitive is positioned on the intersection of two frustums
// and close to terrain, the terrain (writes depth) in the closest frustum can overwrite part of the
// ellipsoid (does not write depth) that was rendered in the farther frustum.
//
// Here, we clamp the depth in the vertex shader to avoid being overwritten; however, this creates
// artifacts since some fragments can be alpha blended twice. This is solved by only rendering
// the ellipsoid in the closest frustum to the viewer.
gl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);
czm_vertexLogDepth();
}
`;var X$={position:0};function y3(e){e=e??B.EMPTY_OBJECT,this.center=m.clone(e.center??m.ZERO),this._center=new m,this.radii=m.clone(e.radii),this._radii=new m,this._oneOverEllipsoidRadiiSquared=new m,this._boundingSphere=new de,this.modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this._modelMatrix=new F,this._computedModelMatrix=new F,this.show=e.show??!0,this.material=e.material??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 et({owner:e._owner??this}),this._pickCommand=new et({owner:e._owner??this,pickOnly:!0});let t=this;this._uniforms={u_radii:function(){return t.radii},u_oneOverEllipsoidRadiiSquared:function(){return t._oneOverEllipsoidRadiiSquared}},this._pickUniforms={czm_pickColor:function(){return t._pickId.color}}}function ixt(e){let t=e.cache.ellipsoidPrimitive_vertexArray;if(l(t))return t;let n=xc.createGeometry(xc.fromDimensions({dimensions:new m(2,2,2),vertexFormat:Xe.POSITION_ONLY}));return t=Mn.fromGeometry({context:e,geometry:n,attributeLocations:X$,bufferUsage:Fe.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}y3.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?tn.ALPHA_BLEND:void 0})),l(this._va)||(this._va=ixt(t));let o=!1,r=this.radii;if(!m.equals(this._radii,r)){m.clone(r,this._radii);let y=this._oneOverEllipsoidRadiiSquared;y.x=1/(r.x*r.x),y.y=1/(r.y*r.y),y.z=1/(r.z*r.z),o=!0}(!F.equals(this.modelMatrix,this._modelMatrix)||!m.equals(this.center,this._center))&&(F.clone(this.modelMatrix,this._modelMatrix),m.clone(this.center,this._center),F.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),o=!0),o&&(m.clone(m.ZERO,this._boundingSphere.center),this._boundingSphere.radius=m.maximumComponent(r),de.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere));let s=this._material!==this.material;this._material=this.material,this._material.update(t);let a=this.onlySunLighting!==this._onlySunLighting;this._onlySunLighting=this.onlySunLighting;let c=e.useLogDepth,d=this._useLogDepth!==c;this._useLogDepth=c;let u=this._colorCommand,h,p;(s||a||i||d)&&(h=new Be({sources:[XR]}),p=new Be({sources:[this.material.shaderSource,PR]}),this.onlySunLighting&&p.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&p.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),p.defines.push("LOG_DEPTH")),this._sp=qt.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:h,fragmentShaderSource:p,attributeLocations:X$}),u.vertexArray=this._va,u.renderState=this._rs,u.shaderProgram=this._sp,u.uniformMap=Rt(this._uniforms,this.material._uniforms),u.executeInClosestFrustum=n);let b=e.commandList,f=e.passes;if(f.render&&(u.boundingVolume=this._boundingSphere,u.debugShowBoundingVolume=this.debugShowBoundingVolume,u.modelMatrix=this._computedModelMatrix,u.pass=n?Le.TRANSLUCENT:Le.OPAQUE,b.push(u)),f.pick){let y=this._pickCommand;(!l(this._pickId)||this._id!==this.id)&&(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=t.createPickId({primitive:this,id:this.id})),(s||a||!l(this._pickSP)||d)&&(h=new Be({sources:[XR]}),p=new Be({sources:[this.material.shaderSource,PR],pickColorQualifier:"uniform"}),this.onlySunLighting&&p.defines.push("ONLY_SUN_LIGHTING"),!n&&t.fragmentDepth&&p.defines.push("WRITE_DEPTH"),this._useLogDepth&&(h.defines.push("LOG_DEPTH"),p.defines.push("LOG_DEPTH")),this._pickSP=qt.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:h,fragmentShaderSource:p,attributeLocations:X$}),y.vertexArray=this._va,y.renderState=this._rs,y.shaderProgram=this._pickSP,y.uniformMap=Rt(Rt(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)}};y3.prototype.isDestroyed=function(){return!1};y3.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(),me(this)};var tw=y3;function nw(e){e=e??B.EMPTY_OBJECT;let t=e.textureUrl;l(t)||(t=Kt("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 tw({radii:this.ellipsoid.radii,material:Bi.fromType(Bi.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new ew}Object.defineProperties(nw.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var x3=new q,oxt=new q,rxt=new m,T3=[];nw.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(dt.computeIcrfToFixedMatrix(n,x3))||dt.computeTemeToPseudoFixedMatrix(n,x3);let i=this._axes.evaluate(n,oxt);q.transpose(i,i),q.multiply(x3,i,i);let o=ey.computeMoonPositionInEarthInertialFrame(n,rxt);q.multiplyByVector(x3,o,o),F.fromRotationTranslation(i,o,t.modelMatrix);let r=e.commandList;return e.commandList=T3,T3.length=0,t.update(e),e.commandList=r,T3.length===1?T3[0]:void 0};nw.prototype.isDestroyed=function(){return!1};nw.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),me(this)};var iw=nw;var Qdo=x(T(),1);var dJi=x(T(),1);var N$=[],Y$=[];function sxt(e,t,n,i,o,r){let s=o-i+1,a=r-o,c=N$,d=Y$,u,h;for(u=0;u<s;++u)c[u]=e[i+u];for(h=0;h<a;++h)d[h]=e[o+h+1];u=0,h=0;for(let p=i;p<=r;++p){let b=c[u],f=d[h];u<s&&(h>=a||t(b,f,n)<=0)?(e[p]=b,++u):h<a&&(e[p]=f,++h)}}function w$(e,t,n,i,o){if(i>=o)return;let r=Math.floor((i+o)*.5);w$(e,t,n,i,r),w$(e,t,n,r+1,o),sxt(e,t,n,i,r,o)}function axt(e,t,n){let i=e.length,o=Math.ceil(i*.5);N$.length=o,Y$.length=o,w$(e,t,n,0,i-1),N$.length=0,Y$.length=0}var a0=axt;var xJi=x(T(),1);function dl(e,t){this._occluderPosition=m.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=t}var _3=new m;Object.defineProperties(dl.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){e=m.clone(e,this._cameraPosition);let t=m.subtract(this._occluderPosition,e,_3),n=m.magnitudeSquared(t),i=this._occluderRadius*this._occluderRadius,o,r,s;if(n>i){o=Math.sqrt(n-i),n=1/Math.sqrt(n),r=m.multiplyByScalar(t,n,_3);let a=o*o*n;s=m.add(e,m.multiplyByScalar(r,a,_3),_3)}else o=Number.MAX_VALUE;this._horizonDistance=o,this._horizonPlaneNormal=r,this._horizonPlanePosition=s,this._cameraPosition=e}}});dl.fromBoundingSphere=function(e,t,n){return l(n)?(m.clone(e.center,n._occluderPosition),n._occluderRadius=e.radius,n.cameraPosition=t,n):new dl(e,t)};var fVe=new m;dl.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){let t=m.subtract(e,this._occluderPosition,fVe),n=this._occluderRadius;if(n=m.magnitudeSquared(t)-n*n,n>0)return n=Math.sqrt(n)+this._horizonDistance,t=m.subtract(e,this._cameraPosition,t),n*n>m.magnitudeSquared(t)}return!1};var cxt=new m;dl.prototype.isBoundingSphereVisible=function(e){let t=m.clone(e.center,cxt),n=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){let i=m.subtract(t,this._occluderPosition,fVe),o=this._occluderRadius-n;if(o=m.magnitudeSquared(i)-o*o,n<this._occluderRadius)return o>0?(o=Math.sqrt(o)+this._horizonDistance,i=m.subtract(t,this._cameraPosition,i),o*o+n*n>m.magnitudeSquared(i)):!1;if(o>0){i=m.subtract(t,this._cameraPosition,i);let r=m.magnitudeSquared(i),s=this._occluderRadius*this._occluderRadius,a=n*n;return(this._horizonDistance*this._horizonDistance+s)*a>r*s?!0:(o=Math.sqrt(o)+this._horizonDistance,o*o+a>r)}return!0}return!1};var lxt=new m;dl.prototype.computeVisibility=function(e){let t=m.clone(e.center),n=e.radius;if(n>this._occluderRadius)return Nr.FULL;if(this._horizonDistance!==Number.MAX_VALUE){let i=m.subtract(t,this._occluderPosition,lxt),o=this._occluderRadius-n,r=m.magnitudeSquared(i);if(o=r-o*o,o>0){o=Math.sqrt(o)+this._horizonDistance,i=m.subtract(t,this._cameraPosition,i);let s=m.magnitudeSquared(i);return o*o+n*n<s?Nr.NONE:(o=this._occluderRadius+n,o=r-o*o,o>0?(o=Math.sqrt(o)+this._horizonDistance,s<o*o+n*n?Nr.FULL:Nr.PARTIAL):(i=m.subtract(t,this._horizonPlanePosition,i),m.dot(i,this._horizonPlaneNormal)>-n?Nr.PARTIAL:Nr.FULL))}}return Nr.NONE};var S3=new m;dl.computeOccludeePoint=function(e,t,n){let i=m.clone(t),o=m.clone(e.center),r=e.radius,s=n.length,a=m.normalize(m.subtract(i,o,S3),S3),c=-m.dot(a,o),d=dl._anyRotationVector(o,a,c),u=dl._horizonToPlaneNormalDotProduct(e,a,c,d,n[0]);if(!u)return;let h;for(let b=1;b<s;++b){if(h=dl._horizonToPlaneNormalDotProduct(e,a,c,d,n[b]),!h)return;h<u&&(u=h)}if(u<.0017453283658983088)return;let p=r/u;return m.add(o,m.multiplyByScalar(a,p,S3),S3)};var dxt=[];dl.computeOccludeePointFromRectangle=function(e,t){t=t??ie.default;let n=ae.subsample(e,t,0,dxt),i=de.fromPoints(n),o=m.ZERO;if(!m.equals(o,i.center))return dl.computeOccludeePoint(new de(o,t.minimumRadius),i.center,n)};var uxt=new m;dl._anyRotationVector=function(e,t,n){let i=m.abs(t,uxt),o=i.x>i.y?0:1;(o===0&&i.z>i.x||o===1&&i.z>i.y)&&(o=2);let r=new m,s;o===0?(i.x=e.x,i.y=e.y+1,i.z=e.z+1,s=m.UNIT_X):o===1?(i.x=e.x+1,i.y=e.y,i.z=e.z+1,s=m.UNIT_Y):(i.x=e.x+1,i.y=e.y+1,i.z=e.z,s=m.UNIT_Z);let a=(m.dot(t,i)+n)/-m.dot(t,s);return m.normalize(m.subtract(m.add(i,m.multiplyByScalar(s,a,r),i),e,i),i)};var mxt=new m;dl._rotationVector=function(e,t,n,i,o){let r=m.subtract(i,e,mxt);if(r=m.normalize(r,r),m.dot(t,r)<.9999999847691291){let s=m.cross(t,r,r);if(m.magnitude(s)>W.EPSILON13)return m.normalize(s,new m)}return o};var M$=new m,hxt=new m,A3=new m,hVe=new m;dl._horizonToPlaneNormalDotProduct=function(e,t,n,i,o){let r=m.clone(o,M$),s=m.clone(e.center,hxt),a=e.radius,c=m.subtract(s,r,A3),d=m.magnitudeSquared(c),u=a*a;if(d<u)return!1;let h=d-u,p=Math.sqrt(h),f=1/Math.sqrt(d),_=p*f*p;c=m.normalize(c,c);let S=m.add(r,m.multiplyByScalar(c,_,hVe),hVe),A=Math.sqrt(h-_*_),Z=this._rotationVector(s,t,n,r,i),V=m.fromElements(Z.x*Z.x*c.x+(Z.x*Z.y-Z.z)*c.y+(Z.x*Z.z+Z.y)*c.z,(Z.x*Z.y+Z.z)*c.x+Z.y*Z.y*c.y+(Z.y*Z.z-Z.x)*c.z,(Z.x*Z.z-Z.y)*c.x+(Z.y*Z.z+Z.x)*c.y+Z.z*Z.z*c.z,M$);V=m.normalize(V,V);let E=m.multiplyByScalar(V,A,M$);Z=m.normalize(m.subtract(m.add(S,E,A3),s,A3),A3);let L=m.dot(t,Z);Z=m.normalize(m.subtract(m.subtract(S,E,Z),s,Z),Z);let v=m.dot(t,Z);return L<v?L:v};var ow=dl;var IJi=x(T(),1);var EJi=x(T(),1);function c0(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 Os,this._perspectiveMatrix=new F,this._infinitePerspective=new F}function k$(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(c0.prototype,{projectionMatrix:{get:function(){return k$(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return k$(this),this._infinitePerspective}}});var fxt=new m,pxt=new m,bxt=new m,gxt=new m;c0.prototype.computeCullingVolume=function(e,t,n){let i=this._cullingVolume.planes,o=this.top,r=this.bottom,s=this.right,a=this.left,c=this.near,d=this.far,u=m.cross(t,n,fxt),h=pxt;m.multiplyByScalar(t,c,h),m.add(e,h,h);let p=bxt;m.multiplyByScalar(t,d,p),m.add(e,p,p);let b=gxt;m.multiplyByScalar(u,a,b),m.add(h,b,b),m.subtract(b,e,b),m.normalize(b,b),m.cross(b,n,b),m.normalize(b,b);let f=i[0];return l(f)||(f=i[0]=new se),f.x=b.x,f.y=b.y,f.z=b.z,f.w=-m.dot(b,e),m.multiplyByScalar(u,s,b),m.add(h,b,b),m.subtract(b,e,b),m.cross(n,b,b),m.normalize(b,b),f=i[1],l(f)||(f=i[1]=new se),f.x=b.x,f.y=b.y,f.z=b.z,f.w=-m.dot(b,e),m.multiplyByScalar(n,r,b),m.add(h,b,b),m.subtract(b,e,b),m.cross(u,b,b),m.normalize(b,b),f=i[2],l(f)||(f=i[2]=new se),f.x=b.x,f.y=b.y,f.z=b.z,f.w=-m.dot(b,e),m.multiplyByScalar(n,o,b),m.add(h,b,b),m.subtract(b,e,b),m.cross(b,u,b),m.normalize(b,b),f=i[3],l(f)||(f=i[3]=new se),f.x=b.x,f.y=b.y,f.z=b.z,f.w=-m.dot(b,e),f=i[4],l(f)||(f=i[4]=new se),f.x=t.x,f.y=t.y,f.z=t.z,f.w=-m.dot(t,h),m.negate(t,b),f=i[5],l(f)||(f=i[5]=new se),f.x=b.x,f.y=b.y,f.z=b.z,f.w=-m.dot(b,p),this._cullingVolume};c0.prototype.getPixelDimensions=function(e,t,n,i,o){k$(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};c0.prototype.clone=function(e){return l(e)||(e=new c0),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};c0.prototype.equals=function(e){return l(e)&&e instanceof c0&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};c0.prototype.equalsEpsilon=function(e,t,n){return e===this||l(e)&&e instanceof c0&&W.equalsEpsilon(this.right,e.right,t,n)&&W.equalsEpsilon(this.left,e.left,t,n)&&W.equalsEpsilon(this.top,e.top,t,n)&&W.equalsEpsilon(this.bottom,e.bottom,t,n)&&W.equalsEpsilon(this.near,e.near,t,n)&&W.equalsEpsilon(this.far,e.far,t,n)};var rd=c0;function Bd(e){e=e??B.EMPTY_OBJECT,this._offCenterFrustum=new rd,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=e.near??1,this._near=this.near,this.far=e.far??5e8,this._far=this.far,this.xOffset=e.xOffset??0,this._xOffset=this.xOffset,this.yOffset=e.yOffset??0,this._yOffset=this.yOffset}Bd.packedLength=6;Bd.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};Bd.unpack=function(e,t,n){return t=t??0,l(n)||(n=new Bd),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 kf(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(Bd.prototype,{projectionMatrix:{get:function(){return kf(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return kf(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return kf(this),this._fovy}},sseDenominator:{get:function(){return kf(this),this._sseDenominator}},offCenterFrustum:{get:function(){return kf(this),this._offCenterFrustum}}});Bd.prototype.computeCullingVolume=function(e,t,n){return kf(this),this._offCenterFrustum.computeCullingVolume(e,t,n)};Bd.prototype.getPixelDimensions=function(e,t,n,i,o){return kf(this),this._offCenterFrustum.getPixelDimensions(e,t,n,i,o)};Bd.prototype.clone=function(e){return l(e)||(e=new Bd),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};Bd.prototype.equals=function(e){return!l(e)||!(e instanceof Bd)?!1:(kf(this),kf(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};Bd.prototype.equalsEpsilon=function(e,t,n){return!l(e)||!(e instanceof Bd)?!1:(kf(this),kf(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 Mi=Bd;var KJi=x(T(),1);var XJi=x(T(),1),rw=`in vec2 v_textureCoordinates;
const float M_PI = 3.141592653589793;
float vdcRadicalInverse(int i)
{
float r;
float base = 2.0;
float value = 0.0;
float invBase = 1.0 / base;
float invBi = invBase;
for (int x = 0; x < 100; x++)
{
if (i <= 0)
{
break;
}
r = mod(float(i), base);
value += r * invBi;
invBi *= invBase;
i = int(float(i) * invBase);
}
return value;
}
vec2 hammersley2D(int i, int N)
{
return vec2(float(i) / float(N), vdcRadicalInverse(i));
}
vec3 importanceSampleGGX(vec2 xi, float alphaRoughness, vec3 N)
{
float alphaRoughnessSquared = alphaRoughness * alphaRoughness;
float phi = 2.0 * M_PI * xi.x;
float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (alphaRoughnessSquared - 1.0) * xi.y));
float sinTheta = sqrt(1.0 - cosTheta * cosTheta);
vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);
vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
vec3 tangentX = normalize(cross(upVector, N));
vec3 tangentY = cross(N, tangentX);
return tangentX * H.x + tangentY * H.y + N * H.z;
}
/**
* Estimate the geometric self-shadowing of the microfacets in a surface,
* using the Smith Joint GGX visibility function.
* Note: Vis = G / (4 * NdotL * NdotV)
* see Eric Heitz. 2014. Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs. Journal of Computer Graphics Techniques, 3
* see Real-Time Rendering. Page 331 to 336.
* see https://google.github.io/filament/Filament.md.html#materialsystem/specularbrdf/geometricshadowing(specularg)
*
* @param {float} alphaRoughness The roughness of the material, expressed as the square of perceptual roughness.
* @param {float} NdotL The cosine of the angle between the surface normal and the direction to the light source.
* @param {float} NdotV The cosine of the angle between the surface normal and the direction to the camera.
*/
float smithVisibilityGGX(float alphaRoughness, float NdotL, float NdotV)
{
float alphaRoughnessSq = alphaRoughness * alphaRoughness;
float GGXV = NdotL * sqrt(NdotV * NdotV * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
float GGXL = NdotV * sqrt(NdotL * NdotL * (1.0 - alphaRoughnessSq) + alphaRoughnessSq);
float GGX = GGXV + GGXL; // 2.0 if NdotL = NdotV = 1.0
if (GGX > 0.0)
{
return 0.5 / GGX; // 1/4 if NdotL = NdotV = 1.0
}
return 0.0;
}
vec2 integrateBrdf(float roughness, float NdotV)
{
vec3 V = vec3(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);
float A = 0.0;
float B = 0.0;
const int NumSamples = 1024;
float alphaRoughness = roughness * roughness;
for (int i = 0; i < NumSamples; i++)
{
vec2 xi = hammersley2D(i, NumSamples);
vec3 H = importanceSampleGGX(xi, alphaRoughness, vec3(0.0, 0.0, 1.0));
vec3 L = 2.0 * dot(V, H) * H - V;
float NdotL = clamp(L.z, 0.0, 1.0);
float NdotH = clamp(H.z, 0.0, 1.0);
float VdotH = clamp(dot(V, H), 0.0, 1.0);
if (NdotL > 0.0)
{
float G = smithVisibilityGGX(alphaRoughness, NdotL, NdotV);
float G_Vis = 4.0 * G * VdotH * NdotL / NdotH;
float Fc = pow(1.0 - VdotH, 5.0);
A += (1.0 - Fc) * G_Vis;
B += Fc * G_Vis;
}
}
return vec2(A, B) / float(NumSamples);
}
void main()
{
out_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);
}
`;function sw(){this._colorTexture=void 0,this._drawCommand=void 0}Object.defineProperties(sw.prototype,{colorTexture:{get:function(){return this._colorTexture}}});function yxt(e,t,n){let i=t.createViewportQuadCommand(rw,{framebuffer:n,renderState:De.fromCache({viewport:new Qe(0,0,256,256)})});e._drawCommand=i}sw.prototype.update=function(e){if(!l(this._colorTexture)){let t=e.context,n=new Et({context:t,width:256,height:256,pixelFormat:Ke.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,sampler:Ut.NEAREST});this._colorTexture=n;let i=new os({context:t,colorTextures:[n],destroyAttachments:!1});yxt(this,t,i),this._drawCommand.execute(t),i.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}};sw.prototype.isDestroyed=function(){return!1};sw.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),me(this)};var aw=sw;var Yji=x(T(),1);var sji=x(T(),1);var yVe={};function xxt(e,t,n){let i,o,r;if(e instanceof Mi){let s=Math.tan(.5*e.fovy);return i=e.near,o=e.near*s,r=e.aspectRatio*o,Math.max(t*i/r,n*i/o)}else if(e instanceof rd)return i=e.near,o=e.top,r=e.right,Math.max(t*i/r,n*i/o);return Math.max(t,n)}var Txt=new m,pVe=new m;function xVe(e,t,n,i){if(l(i)&&n(.5)>i){let o=n(0),r=n(1),s=n(.5),a=s-o,c=s-r;return function(d){let u=n(d);if(d<=.5){let p=(u-o)/a;return W.lerp(e,-W.PI_OVER_TWO,p)}let h=(u-r)/c;return W.lerp(-W.PI_OVER_TWO,t,1-h)}}return function(o){return W.lerp(e,t,o)}}function D$(e,t,n,i,o){let r=o,s=Math.max(n,i);if(!l(r)){let a=e.position,c=t,d=e.up,u=e.right,h=e.frustum,p=m.subtract(a,c,Txt),b=m.magnitude(m.multiplyByScalar(d,m.dot(p,d),pVe)),f=m.magnitude(m.multiplyByScalar(u,m.dot(p,u),pVe));r=Math.min(xxt(h,b,f)*.2,1e9)}if(s<r){let d=-Math.pow((r-n)*1e6,.125),u=Math.pow((r-i)*1e6,1/8);return function(h){let p=h*(u-d)+d;return-Math.pow(p,8)/1e6+r}}return function(a){return W.lerp(n,i,a)}}function cw(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 TVe=new m;function _xt(e,t,n,i,o,r,s,a){let c=e.camera,d=m.clone(c.position,TVe),u=c.pitch,h=cw(c.heading,i),p=cw(c.roll,r),b=D$(c,n,d.z,n.z,s),f=xVe(u,o,b,a);function y(_){let S=_.time/t;c.setView({orientation:{heading:W.lerp(h,i,S),pitch:f(S),roll:W.lerp(p,r,S)}}),M.lerp(d,n,S,c.position),c.position.z=b(S)}return y}function Sxt(e,t){e.longitude<t.longitude?e.longitude+=W.TWO_PI:t.longitude+=W.TWO_PI}function Axt(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 Zxt=new pe,Cxt=new pe;function Vxt(e,t,n,i,o,r,s,a,c,d){let u=e.camera,p=e.mapProjection.ellipsoid,b=pe.clone(u.positionCartographic,Zxt),f=u.pitch,y=cw(u.heading,i),_=cw(u.roll,r),S=p.cartesianToCartographic(n,Cxt);b.longitude=W.zeroToTwoPi(b.longitude),S.longitude=W.zeroToTwoPi(S.longitude);let A=!1;if(l(a)){let L=W.zeroToTwoPi(a),v=Math.min(b.longitude,S.longitude),I=Math.max(b.longitude,S.longitude),X=L>=v&&L<=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?Sxt(b,S):Axt(b,S);let Z=D$(u,n,b.height,S.height,s),V=xVe(f,o,Z,d);function E(){let L=b.longitude,v=S.longitude,I=b.latitude,X=S.latitude;return function(g){let C=g.time/t,R=m.fromRadians(W.lerp(L,v,C),W.lerp(I,X,C),Z(C),p);u.setView({destination:R,orientation:{heading:W.lerp(y,i,C),pitch:V(C),roll:W.lerp(_,r,C)}})}}return E()}function Rxt(e,t,n,i,o,r,s){let a=e.camera,c=m.clone(a.position,TVe),d=cw(a.heading,i),u=a.frustum.right-a.frustum.left,h=D$(a,n,u,n.z,s);function p(b){let f=b.time/t;a.setView({orientation:{heading:W.lerp(d,i,f)}}),M.lerp(c,n,f,a.position);let y=h(f),_=a.frustum,S=_.top/_.right,A=(y-(_.right-_.left))*.5;_.right+=A,_.left-=A,_.top=S*_.right,_.bottom=-_.top}return p}var bVe=new pe,Ext=new m;function U$(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function gVe(e,t){function n(){typeof t=="function"&&t(),e.enableInputs=!0}return n}yVe.createTween=function(e,t){t=t??B.EMPTY_OBJECT;let n=t.destination,i=e.mode;if(i===re.MORPHING)return U$();let o=t.convert??!0,r=e.mapProjection,s=r.ellipsoid,a=t.maximumHeight,c=t.flyOverLongitude,d=t.flyOverLongitudeWeight,u=t.pitchAdjustHeight,h=t.easingFunction;o&&i!==re.SCENE3D&&(s.cartesianToCartographic(n,bVe),n=r.project(bVe,Ext));let p=e.camera,b=t.endTransform;l(b)&&p._setTransform(b);let f=t.duration;l(f)||(f=Math.ceil(m.distance(p.position,n)/1e6)+2,f=Math.min(f,3));let y=t.heading??0,_=t.pitch??-W.PI_OVER_TWO,S=t.roll??0,A=e.screenSpaceCameraController;A.enableInputs=!1;let Z=gVe(A,t.complete),V=gVe(A,t.cancel),E=p.frustum,L=e.mode===re.SCENE2D;if(L=L&&M.equalsEpsilon(p.position,n,W.EPSILON6),L=L&&W.equalsEpsilon(Math.max(E.right-E.left,E.top-E.bottom),n.z,W.EPSILON6),L=L||e.mode!==re.SCENE2D&&m.equalsEpsilon(n,p.position,W.EPSILON10),L=L&&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),L)return U$(Z,V);let v=new Array(4);if(v[re.SCENE2D]=Rxt,v[re.SCENE3D]=Vxt,v[re.COLUMBUS_VIEW]=_xt,f<=0)return U$(function(){v[i](e,1,n,y,_,S,a,c,d,u)({time:1}),typeof Z=="function"&&Z()},V);let I=v[i](e,f,n,y,_,S,a,c,d,u);if(!l(h)){let X=p.positionCartographic.height,N=i===re.SCENE3D?s.cartesianToCartographic(n).height:n.z;X>N&&X>11500?h=Ts.CUBIC_OUT:h=Ts.QUINTIC_IN_OUT}return{duration:f,easingFunction:h,startObject:{time:0},stopObject:{time:f},update:I,complete:Z,cancel:V}};var lw=yVe;var cji=x(T(),1),_Ve={ROTATE:0,INFINITE_SCROLL:1};Object.freeze(_Ve);var sd=_Ve;function rn(e){this._scene=e,this._transform=F.clone(F.IDENTITY),this._invTransform=F.clone(F.IDENTITY),this._actualTransform=F.clone(F.IDENTITY),this._actualInvTransform=F.clone(F.IDENTITY),this._transformChanged=!1,this.position=new m,this._position=new m,this._positionWC=new m,this._positionCartographic=new pe,this._oldPositionWC=void 0,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.timeSinceMoved=0,this._lastMovedTimestamp=0,this.direction=new m,this._direction=new m,this._directionWC=new m,this.up=new m,this._up=new m,this._upWC=new m,this.right=new m,this._right=new m,this._rightWC=new m,this.frustum=new Mi,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,GVe(this),this._mode=re.SCENE3D,this._modeChanged=!0;let t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new pe(Math.PI,W.PI_OVER_TWO)),this._max2Dfrustum=void 0,kVe(this,rn.DEFAULT_VIEW_RECTANGLE,this.position,!0);let n=m.magnitude(this.position);n+=n*rn.DEFAULT_VIEW_FACTOR,m.normalize(this.position,this.position),m.multiplyByScalar(this.position,n,this.position)}rn.TRANSFORM_2D=new F(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);rn.TRANSFORM_2D_INVERSE=F.inverseTransformation(rn.TRANSFORM_2D,new F);rn.DEFAULT_VIEW_RECTANGLE=ae.fromDegrees(-95,-20,-70,90);rn.DEFAULT_VIEW_FACTOR=.5;rn.DEFAULT_OFFSET=new ih(0,-W.PI_OVER_FOUR,0);function GVe(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 Gxt(e){if(!l(e._oldPositionWC))e._oldPositionWC=m.clone(e.positionWC,e._oldPositionWC);else{e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;let t=m.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=m.magnitude(t),e._oldPositionWC=m.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=Yi()):e.timeSinceMoved=Math.max(Yi()-e._lastMovedTimestamp,0)/1e3}}rn.prototype.canPreloadFlight=function(){return l(this._currentFlight)&&this._mode!==re.SCENE2D};rn.prototype._updateCameraChanged=function(){let e=this;if(Gxt(e),e._changed.numberOfListeners===0)return;let t=e.percentageChanged,n=e.heading;l(e._changedHeading)||(e._changedHeading=n);let i=Math.abs(e._changedHeading-n)%W.TWO_PI;i=i>W.PI?W.TWO_PI-i:i;let o=i/Math.PI;o>t&&(e._changedHeading=n);let r=e.roll;l(e._changedRoll)||(e._changedRoll=r);let s=Math.abs(e._changedRoll-r)%W.TWO_PI;s=s>W.PI?W.TWO_PI-s:s;let a=s/Math.PI;if(a>t&&(e._changedRoll=r),(a>t||o>t)&&e._changed.raiseEvent(Math.max(a,o)),e._mode===re.SCENE2D){if(!l(e._changedFrustum)){e._changedPosition=m.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone();return}let p=e.position,b=e._changedPosition,f=e.frustum,y=e._changedFrustum,_=p.x+f.left,S=p.x+f.right,A=b.x+y.left,Z=b.x+y.right,V=p.y+f.bottom,E=p.y+f.top,L=b.y+y.bottom,v=b.y+y.top,I=Math.max(_,A),X=Math.min(S,Z),N=Math.max(V,L),g=Math.min(E,v),C;if(I>=X||N>=E)C=1;else{let R=y;_<A&&S>Z&&V<L&&E>v&&(R=f),C=1-(X-I)*(g-N)/((R.right-R.left)*(R.top-R.bottom))}C>t&&(e._changed.raiseEvent(C),e._changedPosition=m.clone(e.position,e._changedPosition),e._changedFrustum=e.frustum.clone(e._changedFrustum));return}if(!l(e._changedDirection)){e._changedPosition=m.clone(e.positionWC,e._changedPosition),e._changedDirection=m.clone(e.directionWC,e._changedDirection);return}let c=W.acosClamped(m.dot(e.directionWC,e._changedDirection)),d;l(e.frustum.fovy)?d=c/(e.frustum.fovy*.5):d=c;let h=m.distance(e.positionWC,e._changedPosition)/e.positionCartographic.height;(d>t||h>t)&&(e._changed.raiseEvent(Math.max(d,h)),e._changedPosition=m.clone(e.positionWC,e._changedPosition),e._changedDirection=m.clone(e.directionWC,e._changedDirection))};function Lxt(e){dt.basisTo2D(e._projection,e._transform,e._actualTransform)}var Wxt=new pe,vxt=new m,Z3=new m,Fxt=new se,Ixt=new se,Pxt=new se,Xxt=new se,Nxt=new se;function Yxt(e){let t=e._projection,n=t.ellipsoid,i=F.getColumn(e._transform,3,Fxt),o=n.cartesianToCartographic(i,Wxt),r=t.project(o,vxt),s=Ixt;s.x=r.z,s.y=r.x,s.z=r.y,s.w=1;let a=se.clone(se.UNIT_X,Nxt),c=se.add(F.getColumn(e._transform,0,Z3),i,Z3);n.cartesianToCartographic(c,o),t.project(o,r);let d=Pxt;d.x=r.z,d.y=r.x,d.z=r.y,d.w=0,m.subtract(d,s,d),d.x=0;let u=Xxt;if(m.magnitudeSquared(d)>W.EPSILON10)m.cross(a,d,u);else{let h=se.add(F.getColumn(e._transform,1,Z3),i,Z3);n.cartesianToCartographic(h,o),t.project(o,r),u.x=r.z,u.y=r.x,u.z=r.y,u.w=0,m.subtract(u,s,u),u.x=0,m.magnitudeSquared(u)<W.EPSILON10&&(se.clone(se.UNIT_Y,d),se.clone(se.UNIT_Z,u))}m.cross(u,a,d),m.normalize(d,d),m.cross(a,d,u),m.normalize(u,u),F.setColumn(e._actualTransform,0,d,e._actualTransform),F.setColumn(e._actualTransform,1,u,e._actualTransform),F.setColumn(e._actualTransform,2,a,e._actualTransform),F.setColumn(e._actualTransform,3,s,e._actualTransform)}var O$=new m;function ml(e){let t=e._mode,n=!1,i=0;t===re.SCENE2D&&(i=e.frustum.right-e.frustum.left,n=i!==e._positionCartographic.height);let o=e._position,r=!m.equals(o,e.position)||n;r&&(o=m.clone(e.position,e._position));let s=e._direction,a=!m.equals(s,e.direction);a&&(m.normalize(e.direction,e.direction),s=m.clone(e.direction,e._direction));let c=e._up,d=!m.equals(c,e.up);d&&(m.normalize(e.up,e.up),c=m.clone(e.up,e._up));let u=e._right,h=!m.equals(u,e.right);h&&(m.normalize(e.right,e.right),u=m.clone(e.right,e._right));let p=e._transformChanged||e._modeChanged;e._transformChanged=!1,p&&(F.inverseTransformation(e._transform,e._invTransform),e._mode===re.COLUMBUS_VIEW||e._mode===re.SCENE2D?F.equals(F.IDENTITY,e._transform)?F.clone(rn.TRANSFORM_2D,e._actualTransform):e._mode===re.COLUMBUS_VIEW?Lxt(e):Yxt(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=O$;f.x=e._positionWC.y,f.y=e._positionWC.z,f.z=e._positionWC.x,t===re.SCENE2D&&(f.z=i),e._projection.unproject(f,e._positionCartographic)}if(a||d||h){let f=m.dot(s,m.cross(c,u,O$));if(Math.abs(1-f)>W.EPSILON2){let y=1/m.magnitudeSquared(c),_=m.dot(c,s)*y,S=m.multiplyByScalar(s,_,O$);c=m.normalize(m.subtract(c,S,e._up),e._up),m.clone(c,e.up),u=m.cross(s,c,e._right),m.clone(u,e.right)}}(a||p)&&(e._directionWC=F.multiplyByPointAsVector(b,s,e._directionWC),m.normalize(e._directionWC,e._directionWC)),(d||p)&&(e._upWC=F.multiplyByPointAsVector(b,c,e._upWC),m.normalize(e._upWC,e._upWC)),(h||p)&&(e._rightWC=F.multiplyByPointAsVector(b,u,e._rightWC),m.normalize(e._rightWC,e._rightWC)),(r||a||d||h||p)&&GVe(e)}function LVe(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 WVe(e){return W.PI_OVER_TWO-W.acosClamped(e.z)}function vVe(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 R3=new F,E3=new F;Object.defineProperties(rn.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return ml(this),this._invTransform}},viewMatrix:{get:function(){return ml(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return ml(this),this._invViewMatrix}},positionCartographic:{get:function(){return ml(this),this._positionCartographic}},positionWC:{get:function(){return ml(this),this._positionWC}},directionWC:{get:function(){return ml(this),this._directionWC}},upWC:{get:function(){return ml(this),this._upWC}},rightWC:{get:function(){return ml(this),this._rightWC}},heading:{get:function(){if(this._mode!==re.MORPHING){let e=this._projection.ellipsoid,t=F.clone(this._transform,R3),n=dt.eastNorthUpToFixedFrame(this.positionWC,e,E3);this._setTransform(n);let i=LVe(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,R3),n=dt.eastNorthUpToFixedFrame(this.positionWC,e,E3);this._setTransform(n);let i=WVe(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,R3),n=dt.eastNorthUpToFixedFrame(this.positionWC,e,E3);this._setTransform(n);let i=vVe(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}}});rn.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&&XVe(this,this.position)};var wxt=new m,Mxt=new m,kxt=new m;rn.prototype._setTransform=function(e){let t=m.clone(this.positionWC,wxt),n=m.clone(this.upWC,Mxt),i=m.clone(this.directionWC,kxt);F.clone(e,this._transform),this._transformChanged=!0,ml(this);let o=this._actualInvTransform;F.multiplyByPoint(o,t,this.position),F.multiplyByPointAsVector(o,i,this.direction),F.multiplyByPointAsVector(o,n,this.up),m.cross(this.direction,this.up,this.right),ml(this)};var Uxt=new M,Dxt=new gn,Oxt=new m,Bxt=new m;function FVe(e){if(!F.equals(F.IDENTITY,e.transform))return m.magnitude(e.position);let t=e._scene,n=t.globe,i=Uxt;i.x=t.drawingBufferWidth/t.pixelRatio/2,i.y=t.drawingBufferHeight/t.pixelRatio/2;let o;if(l(n)){let a=e.getPickRay(i,Dxt);o=n.pickWorldCoordinates(a,t,!0,Oxt)}let r;t.pickPositionSupported&&(r=t.pickPositionWorldCoordinates(i,Bxt));let s;if(l(o)||l(r)){let a=l(r)?m.distance(r,e.positionWC):Number.POSITIVE_INFINITY,c=l(o)?m.distance(o,e.positionWC):Number.POSITIVE_INFINITY;s=Math.min(a,c)}else s=Math.max(e.positionCartographic.height,0);return s}rn.prototype._adjustOrthographicFrustum=function(e){this.frustum instanceof mn&&(!e&&this._positionCartographic.height<15e4||(this.frustum.width=FVe(this)))};var G3=new m,J$=new F,zxt=new F,j$=new Pe,Q$=new q,IVe=new pe;function Hxt(e,t,n){let i=F.clone(e.transform,J$),o=dt.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,zxt);e._setTransform(o),m.clone(m.ZERO,e.position),n.heading=n.heading-W.PI_OVER_TWO;let r=Pe.fromHeadingPitchRoll(n,j$),s=q.fromQuaternion(r,Q$);q.getColumn(s,0,e.direction),q.getColumn(s,2,e.up),m.cross(e.direction,e.up,e.right),e._setTransform(i),e._adjustOrthographicFrustum(!0)}function Kxt(e,t,n,i){let o=F.clone(e.transform,J$);if(e._setTransform(F.IDENTITY),!m.equals(t,e.positionWC)){if(i){let a=e._projection,c=a.ellipsoid.cartesianToCartographic(t,IVe);t=a.project(c,G3)}m.clone(t,e.position)}n.heading=n.heading-W.PI_OVER_TWO;let r=Pe.fromHeadingPitchRoll(n,j$),s=q.fromQuaternion(r,Q$);q.getColumn(s,0,e.direction),q.getColumn(s,2,e.up),m.cross(e.direction,e.up,e.right),e._setTransform(o),e._adjustOrthographicFrustum(!0)}function Jxt(e,t,n,i){let o=F.clone(e.transform,J$);if(e._setTransform(F.IDENTITY),!m.equals(t,e.positionWC)){if(i){let c=e._projection,d=c.ellipsoid.cartesianToCartographic(t,IVe);t=c.project(d,G3)}M.clone(t,e.position);let r=-t.z*.5,s=-r,a=e.frustum;if(s>r){let c=a.top/a.right;a.right=s,a.left=r,a.top=a.right*c,a.bottom=-a.top}}if(e._scene.mapMode2D===sd.ROTATE){n.heading=n.heading-W.PI_OVER_TWO,n.pitch=-W.PI_OVER_TWO,n.roll=0;let r=Pe.fromHeadingPitchRoll(n,j$),s=q.fromQuaternion(r,Q$);q.getColumn(s,2,e.up),m.cross(e.direction,e.up,e.right)}e._setTransform(o)}var jxt=new m,Qxt=new m,qxt=new m;function PVe(e,t,n,i){let o=m.clone(n.direction,jxt),r=m.clone(n.up,Qxt);if(e._scene.mode===re.SCENE3D){let a=e._projection.ellipsoid,c=dt.eastNorthUpToFixedFrame(t,a,R3),d=F.inverseTransformation(c,E3);F.multiplyByPointAsVector(d,o,o),F.multiplyByPointAsVector(d,r,r)}let s=m.cross(o,r,qxt);return i.heading=LVe(o,r),i.pitch=WVe(o),i.roll=vVe(o,r,s),i}var K$={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},NR=new yc;rn.prototype.setView=function(e){e=e??B.EMPTY_OBJECT;let t=e.orientation??B.EMPTY_OBJECT,n=this._mode;if(n===re.MORPHING)return;l(e.endTransform)&&this._setTransform(e.endTransform);let i=e.convert??!0,o=e.destination??m.clone(this.positionWC,G3);l(o)&&l(o.west)&&(o=this.getRectangleCameraCoordinates(o,G3),i=!1),l(t.direction)&&(t=PVe(this,o,t,K$.orientation)),NR.heading=t.heading??0,NR.pitch=t.pitch??-W.PI_OVER_TWO,NR.roll=t.roll??0,n===re.SCENE3D?Hxt(this,o,NR):n===re.SCENE2D?Jxt(this,o,NR,i):Kxt(this,o,NR,i)};var $xt=new m;rn.prototype.flyHome=function(e){let t=this._mode;if(t===re.MORPHING&&this._scene.completeMorph(),t===re.SCENE2D)this.flyTo({destination:rn.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:F.IDENTITY});else if(t===re.SCENE3D){let n=this.getRectangleCameraCoordinates(rn.DEFAULT_VIEW_RECTANGLE),i=m.magnitude(n);i+=i*rn.DEFAULT_VIEW_FACTOR,m.normalize(n,n),m.multiplyByScalar(n,i,n),this.flyTo({destination:n,duration:e,endTransform:F.IDENTITY})}else if(t===re.COLUMBUS_VIEW){let n=this._projection.ellipsoid.maximumRadius,i=new m(0,-1,1);i=m.multiplyByScalar(m.normalize(i,i),5*n,i),this.flyTo({destination:i,duration:e,orientation:{heading:0,pitch:-Math.acos(m.normalize(i,$xt).z),roll:0},endTransform:F.IDENTITY,convert:!1})}};rn.prototype.worldToCameraCoordinates=function(e,t){return l(t)||(t=new se),ml(this),F.multiplyByVector(this._actualInvTransform,e,t)};rn.prototype.worldToCameraCoordinatesPoint=function(e,t){return l(t)||(t=new m),ml(this),F.multiplyByPoint(this._actualInvTransform,e,t)};rn.prototype.worldToCameraCoordinatesVector=function(e,t){return l(t)||(t=new m),ml(this),F.multiplyByPointAsVector(this._actualInvTransform,e,t)};rn.prototype.cameraToWorldCoordinates=function(e,t){return l(t)||(t=new se),ml(this),F.multiplyByVector(this._actualTransform,e,t)};rn.prototype.cameraToWorldCoordinatesPoint=function(e,t){return l(t)||(t=new m),ml(this),F.multiplyByPoint(this._actualTransform,e,t)};rn.prototype.cameraToWorldCoordinatesVector=function(e,t){return l(t)||(t=new m),ml(this),F.multiplyByPointAsVector(this._actualTransform,e,t)};function XVe(e,t){let n=e._scene.mapMode2D===sd.ROTATE,i=e._maxCoord.x,o=e._maxCoord.y,r,s;n?(s=i,r=-s):(s=t.x-i*2,r=t.x+i*2),t.x>i&&(t.x=s),t.x<-i&&(t.x=r),t.y>o&&(t.y=o),t.y<-o&&(t.y=-o)}var SVe=new m;rn.prototype.move=function(e,t){let n=this.position;m.multiplyByScalar(e,t,SVe),m.add(n,SVe,n),this._mode===re.SCENE2D&&XVe(this,n),this._adjustOrthographicFrustum(!0)};rn.prototype.moveForward=function(e){e=e??this.defaultMoveAmount,this._mode===re.SCENE2D?L3(this,e):this.move(this.direction,e)};rn.prototype.moveBackward=function(e){e=e??this.defaultMoveAmount,this._mode===re.SCENE2D?L3(this,-e):this.move(this.direction,-e)};rn.prototype.moveUp=function(e){e=e??this.defaultMoveAmount,this.move(this.up,e)};rn.prototype.moveDown=function(e){e=e??this.defaultMoveAmount,this.move(this.up,-e)};rn.prototype.moveRight=function(e){e=e??this.defaultMoveAmount,this.move(this.right,e)};rn.prototype.moveLeft=function(e){e=e??this.defaultMoveAmount,this.move(this.right,-e)};rn.prototype.lookLeft=function(e){e=e??this.defaultLookAmount,this._mode!==re.SCENE2D&&this.look(this.up,-e)};rn.prototype.lookRight=function(e){e=e??this.defaultLookAmount,this._mode!==re.SCENE2D&&this.look(this.up,e)};rn.prototype.lookUp=function(e){e=e??this.defaultLookAmount,this._mode!==re.SCENE2D&&this.look(this.right,-e)};rn.prototype.lookDown=function(e){e=e??this.defaultLookAmount,this._mode!==re.SCENE2D&&this.look(this.right,e)};var eTt=new Pe,tTt=new q;rn.prototype.look=function(e,t){let n=t??this.defaultLookAmount,i=Pe.fromAxisAngle(e,-n,eTt),o=q.fromQuaternion(i,tTt),r=this.direction,s=this.up,a=this.right;q.multiplyByVector(o,r,r),q.multiplyByVector(o,s,s),q.multiplyByVector(o,a,a)};rn.prototype.twistLeft=function(e){e=e??this.defaultLookAmount,this.look(this.direction,e)};rn.prototype.twistRight=function(e){e=e??this.defaultLookAmount,this.look(this.direction,-e)};var nTt=new Pe,iTt=new q;rn.prototype.rotate=function(e,t){let n=t??this.defaultRotateAmount,i=Pe.fromAxisAngle(e,-n,nTt),o=q.fromQuaternion(i,iTt);q.multiplyByVector(o,this.position,this.position),q.multiplyByVector(o,this.direction,this.direction),q.multiplyByVector(o,this.up,this.up),m.cross(this.direction,this.up,this.right),m.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)};rn.prototype.rotateDown=function(e){e=e??this.defaultRotateAmount,NVe(this,e)};rn.prototype.rotateUp=function(e){e=e??this.defaultRotateAmount,NVe(this,-e)};var oTt=new m,rTt=new m,sTt=new m,AVe=new m;function NVe(e,t){let n=e.position;if(l(e.constrainedAxis)&&!m.equalsEpsilon(e.position,m.ZERO,W.EPSILON2)){let i=m.normalize(n,oTt),o=m.equalsEpsilon(i,e.constrainedAxis,W.EPSILON2),r=m.equalsEpsilon(i,m.negate(e.constrainedAxis,AVe),W.EPSILON2);if(!o&&!r){let s=m.normalize(e.constrainedAxis,rTt),a=m.dot(i,s),c=W.acosClamped(a);t>0&&t>c&&(t=c-W.EPSILON4),a=m.dot(i,m.negate(s,AVe)),c=W.acosClamped(a),t<0&&-t>c&&(t=-c+W.EPSILON4);let d=m.cross(s,i,sTt);e.rotate(d,t)}else(o&&t<0||r&&t>0)&&e.rotate(e.right,t)}else e.rotate(e.right,t)}rn.prototype.rotateRight=function(e){e=e??this.defaultRotateAmount,YVe(this,-e)};rn.prototype.rotateLeft=function(e){e=e??this.defaultRotateAmount,YVe(this,e)};function YVe(e,t){l(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function L3(e,t){let n=e.frustum,i;if(t=t*.5,Math.abs(n.top)+Math.abs(n.bottom)>Math.abs(n.left)+Math.abs(n.right)){let o=n.top-t,r=n.bottom+t,s=e._maxCoord.y;e._scene.mapMode2D===sd.ROTATE&&(s*=e.maximumZoomFactor),r>s&&(r=s,o=-s),o<=r&&(o=1,r=-1),i=n.right/n.top,n.top=o,n.bottom=r,n.right=n.top*i,n.left=-n.right}else{let o=n.right-t,r=n.left+t,s=e._maxCoord.x;e._scene.mapMode2D===sd.ROTATE&&(s*=e.maximumZoomFactor),o>s&&(o=s,r=-s),o<=r&&(o=1,r=-1),i=n.top/n.right,n.right=o,n.left=r,n.top=n.right*i,n.bottom=-n.top}}function wVe(e,t){e.move(e.direction,t)}rn.prototype.zoomIn=function(e){e=e??this.defaultZoomAmount,this._mode===re.SCENE2D?L3(this,e):wVe(this,e)};rn.prototype.zoomOut=function(e){e=e??this.defaultZoomAmount,this._mode===re.SCENE2D?L3(this,-e):wVe(this,-e)};rn.prototype.getMagnitude=function(){if(this._mode===re.SCENE3D)return m.magnitude(this.position);if(this._mode===re.COLUMBUS_VIEW)return Math.abs(this.position.z);if(this._mode===re.SCENE2D)return Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom)};var aTt=new F;rn.prototype.lookAt=function(e,t){let i=this._scene.ellipsoid??ie.default,o=dt.eastNorthUpToFixedFrame(e,i,aTt);this.lookAtTransform(o,t)};var cTt=new m,lTt=new Pe,dTt=new Pe,uTt=new q;function MVe(e,t,n){t=W.clamp(t,-W.PI_OVER_TWO,W.PI_OVER_TWO),e=W.zeroToTwoPi(e)-W.PI_OVER_TWO;let i=Pe.fromAxisAngle(m.UNIT_Y,-t,lTt),o=Pe.fromAxisAngle(m.UNIT_Z,-e,dTt),r=Pe.multiply(o,i,o),s=q.fromQuaternion(r,uTt),a=m.clone(m.UNIT_X,cTt);return q.multiplyByVector(s,a,a),m.negate(a,a),m.multiplyByScalar(a,n,a),a}rn.prototype.lookAtTransform=function(e,t){if(this._setTransform(e),!l(t))return;let n;if(l(t.heading)?n=MVe(t.heading,t.pitch,t.range):n=t,this._mode===re.SCENE2D){M.clone(M.ZERO,this.position),m.negate(n,this.up),this.up.z=0,m.magnitudeSquared(this.up)<W.EPSILON10&&m.clone(m.UNIT_Y,this.up),m.normalize(this.up,this.up),this._setTransform(F.IDENTITY),m.negate(m.UNIT_Z,this.direction),m.cross(this.direction,this.up,this.right),m.normalize(this.right,this.right);let i=this.frustum,o=i.top/i.right;i.right=m.magnitude(n)*.5,i.left=-i.right,i.top=o*i.right,i.bottom=-i.top,this._setTransform(e);return}m.clone(n,this.position),m.negate(this.position,this.direction),m.normalize(this.direction,this.direction),m.cross(this.direction,m.UNIT_Z,this.right),m.magnitudeSquared(this.right)<W.EPSILON10&&m.clone(m.UNIT_X,this.right),m.normalize(this.right,this.right),m.cross(this.right,this.direction,this.up),m.normalize(this.up,this.up),this._adjustOrthographicFrustum(!0)};var dw=new pe,mTt=new pe,hTt=new m,fTt=new m,pTt=new m,bTt=new m,gTt=new m,yTt=new m,xTt=new m,B$=new m,TTt={direction:new m,right:new m,up:new m},ZVe;function ul(e,t,n,i){return Math.abs(m.dot(t,n))/i-m.dot(e,n)}function kVe(e,t,n,i){let o=e._projection.ellipsoid,r=i?e:TTt,{north:s,south:a,west:c}=t,{east:d}=t;c>d&&(d+=W.TWO_PI);let u=(c+d)*.5,h;if(a<-W.PI_OVER_TWO+W.RADIANS_PER_DEGREE&&s>W.PI_OVER_TWO-W.RADIANS_PER_DEGREE)h=0;else{let X=dw;X.longitude=u,X.latitude=s,X.height=0;let N=mTt;N.longitude=u,N.latitude=a,N.height=0;let g=ZVe;(!l(g)||g.ellipsoid!==o)&&(ZVe=g=new z0(void 0,void 0,o)),g.setEndPoints(X,N),h=g.interpolateUsingFraction(.5,dw).latitude}let p=dw;p.longitude=u,p.latitude=h,p.height=0;let b=o.cartographicToCartesian(p,xTt),f=dw;f.longitude=d,f.latitude=s;let y=o.cartographicToCartesian(f,hTt);f.longitude=c;let _=o.cartographicToCartesian(f,pTt);f.longitude=u;let S=o.cartographicToCartesian(f,gTt);f.latitude=a;let A=o.cartographicToCartesian(f,yTt);f.longitude=d;let Z=o.cartographicToCartesian(f,bTt);f.longitude=c;let V=o.cartographicToCartesian(f,fTt);m.subtract(_,b,_),m.subtract(Z,b,Z),m.subtract(y,b,y),m.subtract(V,b,V),m.subtract(S,b,S),m.subtract(A,b,A);let E=o.geodeticSurfaceNormal(b,r.direction);m.negate(E,E);let L=m.cross(E,m.UNIT_Z,r.right);m.normalize(L,L);let v=m.cross(L,E,r.up),I;if(e.frustum instanceof mn){let X=Math.max(m.distance(y,_),m.distance(Z,V)),N=Math.max(m.distance(y,Z),m.distance(_,V)),g,C,R=e.frustum._offCenterFrustum,G=R.right/R.top,P=N*G;X>P?(g=X,C=g/G):(C=N,g=P),I=Math.max(g,C)}else{let X=Math.tan(e.frustum.fovy*.5),N=e.frustum.aspectRatio*X;if(I=Math.max(ul(E,v,_,X),ul(E,v,Z,X),ul(E,v,y,X),ul(E,v,V,X),ul(E,v,S,X),ul(E,v,A,X),ul(E,L,_,N),ul(E,L,Z,N),ul(E,L,y,N),ul(E,L,V,N),ul(E,L,S,N),ul(E,L,A,N)),a<0&&s>0){let g=dw;g.longitude=c,g.latitude=0,g.height=0;let C=o.cartographicToCartesian(g,B$);m.subtract(C,b,C),I=Math.max(I,ul(E,v,C,X),ul(E,L,C,N)),g.longitude=d,C=o.cartographicToCartesian(g,B$),m.subtract(C,b,C),I=Math.max(I,ul(E,v,C,X),ul(E,L,C,N))}}return m.add(b,m.multiplyByScalar(E,-I,B$),n)}var _Tt=new pe,STt=new m,ATt=new m;function ZTt(e,t,n){let i=e._projection;t.west>t.east&&(t=ae.MAX_VALUE);let o=e._actualTransform,r=e._actualInvTransform,s=_Tt;s.longitude=t.east,s.latitude=t.north;let a=i.project(s,STt);F.multiplyByPoint(o,a,a),F.multiplyByPoint(r,a,a),s.longitude=t.west,s.latitude=t.south;let c=i.project(s,ATt);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 CTt=new pe,VTt=new m,RTt=new m;function ETt(e,t,n){let i=e._projection,o=t.east;t.west>t.east&&(e._scene.mapMode2D===sd.INFINITE_SCROLL?o+=W.TWO_PI:(t=ae.MAX_VALUE,o=t.east));let r=CTt;r.longitude=o,r.latitude=t.north;let s=i.project(r,VTt);r.longitude=t.west,r.latitude=t.south;let a=i.project(r,RTt),c=Math.abs(s.x-a.x)*.5,d=Math.abs(s.y-a.y)*.5,u,h,p=e.frustum.right/e.frustum.top,b=d*p;return c>b?(u=c,h=u/p):(h=d,u=b),d=Math.max(2*u,2*h),n.x=(s.x-a.x)*.5+a.x,n.y=(s.y-a.y)*.5+a.y,r=i.unproject(n,r),r.height=d,n=i.project(r,n),n}rn.prototype.getRectangleCameraCoordinates=function(e,t){let n=this._mode;if(l(t)||(t=new m),n===re.SCENE3D)return kVe(this,e,t);if(n===re.COLUMBUS_VIEW)return ZTt(this,e,t);if(n===re.SCENE2D)return ETt(this,e,t)};var GTt=new gn;function LTt(e,t,n,i){n=n??ie.default;let o=e.getPickRay(t,GTt),r=ai.rayEllipsoid(o,n);if(!r)return;let s=r.start>0?r.start:r.stop;return gn.getPoint(o,s,i)}var WTt=new gn;function vTt(e,t,n,i){let r=e.getPickRay(t,WTt).origin;r=m.fromElements(r.y,r.z,0,r);let s=n.unproject(r);if(!(s.latitude<-W.PI_OVER_TWO||s.latitude>W.PI_OVER_TWO))return n.ellipsoid.cartographicToCartesian(s,i)}var FTt=new gn;function ITt(e,t,n,i){let o=e.getPickRay(t,FTt),r=-o.origin.x/o.direction.x;gn.getPoint(o,r,i);let s=n.unproject(new m(i.y,i.z,0));if(!(s.latitude<-W.PI_OVER_TWO||s.latitude>W.PI_OVER_TWO||s.longitude<-Math.PI||s.longitude>Math.PI))return n.ellipsoid.cartographicToCartesian(s,i)}rn.prototype.pickEllipsoid=function(e,t,n){let i=this._scene.canvas;if(!(i.clientWidth===0||i.clientHeight===0)){if(l(n)||(n=new m),t=t??ie.default,this._mode===re.SCENE3D)n=LTt(this,e,t,n);else if(this._mode===re.SCENE2D)n=vTt(this,e,this._projection,n);else if(this._mode===re.COLUMBUS_VIEW)n=ITt(this,e,this._projection,n);else return;return n}};var PTt=new m,XTt=new m,NTt=new m;function YTt(e,t,n){let i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight,s=Math.tan(e.frustum.fovy*.5),a=e.frustum.aspectRatio*s,c=e.frustum.near,d=2/o*t.x-1,u=2/r*(r-t.y)-1,h=e.positionWC;m.clone(h,n.origin);let p=m.multiplyByScalar(e.directionWC,c,PTt);m.add(h,p,p);let b=m.multiplyByScalar(e.rightWC,d*c*a,XTt),f=m.multiplyByScalar(e.upWC,u*c*s,NTt),y=m.add(p,b,n.direction);return m.add(y,f,y),m.subtract(y,h,y),m.normalize(y,y),n}var C3=new m;function wTt(e,t,n){let i=e._scene.canvas,o=i.clientWidth,r=i.clientHeight,s=e.frustum,a=s.offCenterFrustum;l(a)&&(s=a);let c=2/o*t.x-1;c*=(s.right-s.left)*.5;let d=2/r*(r-t.y)-1;d*=(s.top-s.bottom)*.5;let u=n.origin;if(m.clone(e.positionWC,u),m.multiplyByScalar(e.rightWC,c,C3),m.add(C3,u,u),m.multiplyByScalar(e.upWC,d,C3),m.add(C3,u,u),m.clone(e.directionWC,n.direction),e._mode===re.SCENE2D&&e._scene.mapMode2D===sd.INFINITE_SCROLL){let h=e._maxCoord.x;u.y=W.mod(u.y+h,2*h)-h}return n}rn.prototype.getPickRay=function(e,t){l(t)||(t=new gn);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)?YTt(this,e,t):wTt(this,e,t)};var MTt=new m,kTt=new m;rn.prototype.distanceToBoundingSphere=function(e){let t=m.subtract(this.positionWC,e.center,MTt),n=m.multiplyByScalar(this.directionWC,m.dot(t,this.directionWC),kTt);return Math.max(0,m.magnitude(n)-e.radius)};var UTt=new M;rn.prototype.getPixelSize=function(e,t,n){let i=this.distanceToBoundingSphere(e),o=this.frustum.getPixelDimensions(t,n,i,this._scene.pixelRatio,UTt);return Math.max(o.x,o.y)};function DTt(e,t,n,i,o,r){let s=m.clone(t);n.y>i?s.y-=n.y-i:n.y<-i&&(s.y+=-i-n.y),n.z>o?s.z-=n.z-o:n.z<-o&&(s.z+=-o-n.z);function a(c){let d=m.lerp(t,s,c.time,new m);e.worldToCameraCoordinatesPoint(d,e.position)}return{easingFunction:Ts.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:r,update:a}}var OTt=new m,CVe=new m,BTt=new m,zTt=new m;function HTt(e,t){let n=e.position,i=e.direction,o=e.worldToCameraCoordinatesVector(m.UNIT_X,OTt),r=-m.dot(o,n)/m.dot(o,i),s=m.add(n,m.multiplyByScalar(i,r,CVe),CVe);e.cameraToWorldCoordinatesPoint(s,s),n=e.cameraToWorldCoordinatesPoint(e.position,BTt);let a=Math.tan(e.frustum.fovy*.5),c=e.frustum.aspectRatio*a,d=m.magnitude(m.subtract(n,s,zTt)),u=c*d,h=a*d,p=e._maxCoord.x,b=e._maxCoord.y,f=Math.max(u-p,p),y=Math.max(h-b,b);if(n.z<-f||n.z>f||n.y<-y||n.y>y){let _=s.y<-f||s.y>f,S=s.z<-y||s.z>y;if(_||S)return DTt(e,n,s,f,y,t)}}rn.prototype.createCorrectPositionTween=function(e){if(this._mode===re.COLUMBUS_VIEW)return HTt(this,e)};var KTt=new m,Da={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};rn.prototype.cancelFlight=function(){l(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)};rn.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=Da.destination,e.orientation.heading=Da.heading,e.orientation.pitch=Da.pitch,e.orientation.roll=Da.roll,this.setView(e),l(this._currentFlight.complete)&&this._currentFlight.complete(),this._currentFlight=void 0}};rn.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 ae;i&&(t=this.getRectangleCameraCoordinates(t,KTt));let o=e.orientation??B.EMPTY_OBJECT;if(l(o.direction)&&(o=PVe(this,t,o,K$.orientation)),l(e.duration)&&e.duration<=0){let u=K$;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;Da.destination=t,Da.heading=o.heading,Da.pitch=o.pitch,Da.roll=o.roll,Da.duration=e.duration,Da.complete=function(){s===r._currentFlight&&(r._currentFlight=void 0),l(e.complete)&&e.complete()},Da.cancel=e.cancel,Da.endTransform=e.endTransform,Da.convert=i?!1:e.convert,Da.maximumHeight=e.maximumHeight,Da.pitchAdjustHeight=e.pitchAdjustHeight,Da.flyOverLongitude=e.flyOverLongitude,Da.flyOverLongitudeWeight=e.flyOverLongitudeWeight,Da.easingFunction=e.easingFunction;let a=this._scene,c=lw.createTween(a,Da);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=rn.clone(this)),d.setView({destination:t,orientation:o}),this._scene.preloadFlightCullingVolume=d.frustum.computeCullingVolume(d.positionWC,d.directionWC,d.upWC))};function JTt(e,t){let n=e.frustum,i=Math.tan(n.fovy*.5),o=n.aspectRatio*i;return Math.max(t/o,t/i)}function jTt(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 QTt=100;function UVe(e,t,n){n=ih.clone(l(n)?n:rn.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=QTt:e.frustum instanceof mn||e._mode===re.SCENE2D?n.range=jTt(e,s):n.range=JTt(e,s),n.range=W.clamp(n.range,i,o)}return n}rn.prototype.viewBoundingSphere=function(e,t){t=UVe(this,e,t),this.lookAt(e.center,t)};var qTt=new F,$Tt=new m,e_t=new m,t_t=new m,n_t=new m,i_t=new se,o_t=new Pe,r_t=new q;rn.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=UVe(this,e,t.offset),o;n?o=m.multiplyByScalar(m.UNIT_Z,i.range,$Tt):o=MVe(i.heading,i.pitch,i.range);let s=this._scene.ellipsoid??ie.default,a=dt.eastNorthUpToFixedFrame(e.center,s,qTt);F.multiplyByPoint(a,o,o);let c,d;if(!n){if(c=m.subtract(e.center,o,e_t),m.normalize(c,c),d=F.multiplyByPointAsVector(a,m.UNIT_Z,t_t),1-Math.abs(m.dot(c,d))<W.EPSILON6){let h=Pe.fromAxisAngle(c,i.heading,o_t),p=q.fromQuaternion(h,r_t);m.fromCartesian4(F.getColumn(a,1,i_t),d),q.multiplyByVector(p,d,d)}let u=m.cross(c,d,n_t);m.cross(u,c,d),m.normalize(d,d)}this.flyTo({destination:o,orientation:{direction:c,up:d},duration:t.duration,complete:t.complete,cancel:t.cancel,endTransform:t.endTransform,maximumHeight:t.maximumHeight,easingFunction:t.easingFunction,flyOverLongitude:t.flyOverLongitude,flyOverLongitudeWeight:t.flyOverLongitudeWeight,pitchAdjustHeight:t.pitchAdjustHeight})};var VVe=new m,RVe=new m,z$=new m,EVe=new m,uw=[new m,new m,new m,new m];function s_t(e,t){let n=t.radii,i=e.positionWC,o=m.multiplyComponents(t.oneOverRadii,i,VVe),r=m.magnitude(o),s=m.normalize(o,RVe),a,c;m.equalsEpsilon(s,m.UNIT_Z,W.EPSILON10)?(a=new m(0,1,0),c=new m(0,0,1)):(a=m.normalize(m.cross(m.UNIT_Z,s,z$),z$),c=m.normalize(m.cross(s,a,EVe),EVe));let d=Math.sqrt(m.magnitudeSquared(o)-1),u=m.multiplyByScalar(s,1/r,VVe),h=d/r,p=m.multiplyByScalar(a,h,RVe),b=m.multiplyByScalar(c,h,z$),f=m.add(u,b,uw[0]);m.subtract(f,p,f),m.multiplyComponents(n,f,f);let y=m.subtract(u,b,uw[1]);m.subtract(y,p,y),m.multiplyComponents(n,y,y);let _=m.subtract(u,b,uw[2]);m.add(_,p,_),m.multiplyComponents(n,_,_);let S=m.add(u,b,uw[3]);return m.add(S,p,S),m.multiplyComponents(n,S,S),uw}var H$=new M,a_t=new m,Ix=[new pe,new pe,new pe,new pe];function V3(e,t,n,i,o,r){H$.x=e,H$.y=t;let s=i.pickEllipsoid(H$,o,a_t);return l(s)?(Ix[n]=o.cartesianToCartographic(s,Ix[n]),1):(Ix[n]=o.cartesianToCartographic(r[n],Ix[n]),0)}rn.prototype.computeViewRectangle=function(e,t){e=e??ie.default;let n=this.frustum.computeCullingVolume(this.positionWC,this.directionWC,this.upWC),i=new de(m.ZERO,e.maximumRadius);if(n.computeVisibility(i)===zt.OUTSIDE)return;let r=this._scene.canvas,s=r.clientWidth,a=r.clientHeight,c=0,d=s_t(this,e);if(c+=V3(0,0,0,this,e,d),c+=V3(0,a,1,this,e,d),c+=V3(s,a,2,this,e,d),c+=V3(s,0,3,this,e,d),c<2)return ae.MAX_VALUE;t=ae.fromCartographicArray(Ix,t);let u=0,h=Ix[3].longitude;for(let p=0;p<4;++p){let b=Ix[p].longitude,f=Math.abs(b-h);f>W.PI?u+=W.TWO_PI-f:u+=f,h=b}return W.equalsEpsilon(Math.abs(u),W.TWO_PI,W.EPSILON9)&&(t.west=-W.PI,t.east=W.PI,Ix[0].latitude>=0?t.north=W.PI_OVER_TWO:t.south=-W.PI_OVER_TWO),t};rn.prototype.switchToPerspectiveFrustum=function(){if(this._mode===re.SCENE2D||this.frustum instanceof Mi)return;let e=this._scene;this.frustum=new Mi,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=W.toRadians(60)};rn.prototype.switchToOrthographicFrustum=function(){if(this._mode===re.SCENE2D||this.frustum instanceof mn)return;let e=FVe(this),t=this._scene;this.frustum=new mn,this.frustum.aspectRatio=t.drawingBufferWidth/t.drawingBufferHeight,this.frustum.width=e};rn.clone=function(e,t){return l(t)||(t=new rn(e._scene)),m.clone(e.position,t.position),m.clone(e.direction,t.direction),m.clone(e.up,t.up),m.clone(e.right,t.right),F.clone(e._transform,t.transform),t._transformChanged=!0,t.frustum=e.frustum.clone(),t};var To=rn;var Mji=x(T(),1);function c_t(e){this.pass=e.pass,this.commandList=e.commandList,this.camera=e.camera,this.cullingVolume=e.cullingVolume,this.ready=!1}var uh=c_t;var Hji=x(T(),1);var HVe=x(tu(),1),DVe=576,l_t=100,mw="#ffffff",W3="#48b";function KVe(e,t){this.credit=e,this.count=t??1}function d_t(e,t){let n=e.length;for(let i=0;i<n;i++){let o=e[i];if(bt.equals(o,t))return!0}return!1}function u_t(e){let t=e._previousCesiumCredit,n=e._currentCesiumCredit;bt.equals(n,t)||(l(t)&&e._cesiumCreditContainer.removeChild(t.element),l(n)&&e._cesiumCreditContainer.appendChild(n.element),e._previousCesiumCredit=n)}var JVe="cesium-credit-delimiter";function OVe(e){let t=document.createElement("span");return t.textContent=e,t.className=JVe,t}function BVe(e,t){if(l(t)){let n=document.createElement(t);n._creditId=e._creditId,n.appendChild(e),e=n}return e}function zVe(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(OVe(n));else{let u=o[d];u.className!==JVe&&e.replaceChild(OVe(n),u)}}let c=a.element;if(o.length<=r)e.appendChild(BVe(c,i));else{let d=o[r];d._creditId!==a._id&&e.replaceChild(BVe(c,i),d)}}}for(++r;r<o.length;)e.removeChild(o[r])}function m_t(e){let t=e._lightboxCredits,n=e.viewport.clientWidth,i=e.viewport.clientHeight;n!==e._lastViewportWidth&&(n<DVe?(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>=DVe&&i!==e._lastViewportHeight&&(t.style.marginTop=`${Math.floor((i-t.clientHeight)*.5)}px`,e._lastViewportHeight=i)}function h_t(e){let t=`
.cesium-credit-lightbox-overlay {
display: none;
z-index: 1;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(80, 80, 80, 0.8);
}
.cesium-credit-lightbox {
background-color: #303336;
color: ${mw};
position: relative;
min-height: ${l_t}px;
margin: auto;
}
.cesium-credit-lightbox > ul > li a,
.cesium-credit-lightbox > ul > li a:visited,
.cesium-credit-wrapper a,
.cesium-credit-wrapper a:visited {
color: ${mw};
}
.cesium-credit-lightbox > ul > li a:hover {
color: ${W3};
}
.cesium-credit-lightbox.cesium-credit-lightbox-expanded {
border: 1px solid #444;
border-radius: 5px;
max-width: 470px;
}
.cesium-credit-lightbox.cesium-credit-lightbox-mobile {
height: 100%;
width: 100%;
}
.cesium-credit-lightbox-title {
padding: 20px 20px 0 20px;
}
.cesium-credit-lightbox-close {
font-size: 18pt;
cursor: pointer;
position: absolute;
top: 0;
right: 6px;
color: ${mw};
}
.cesium-credit-lightbox-close:hover {
color: ${W3};
}
.cesium-credit-lightbox > ul {
margin: 0;
padding: 12px 20px 12px 40px;
font-size: 13px;
}
.cesium-credit-lightbox > ul > li {
padding-bottom: 6px;
}
.cesium-credit-lightbox > ul > li * {
padding: 0;
margin: 0;
}
.cesium-credit-expand-link {
padding-left: 5px;
cursor: pointer;
text-decoration: underline;
color: ${mw};
}
.cesium-credit-expand-link:hover {
color: ${W3};
}
.cesium-credit-text {
color: ${mw};
}
.cesium-credit-delimiter {
padding: 0 5px;
}
.cesium-credit-textContainer *,
.cesium-credit-logoContainer * {
display: inline;
}
.cesium-credit-textContainer a:hover {
color: ${W3}
}
.cesium-credit-textContainer .cesium-credit-wrapper:first-of-type {
padding-left: 5px;
}
`;function n(r){if(r.shadowRoot)return r.shadowRoot;if(r.getRootNode){let s=r.getRootNode();if(s instanceof ShadowRoot)return s}}let i=n(e)??document.head,o=document.createElement("style");o.innerHTML=t,i.appendChild(o)}function Yr(e,t,n){let i=this;n=n??document.body;let o=document.createElement("div");o.className="cesium-credit-lightbox-overlay",n.appendChild(o);let r=document.createElement("div");r.className="cesium-credit-lightbox",o.appendChild(r);function s(f){r.contains(f.target)||i.hideLightbox()}o.addEventListener("click",s,!1);let a=document.createElement("div");a.className="cesium-credit-lightbox-title",a.textContent="Data provided by:",r.appendChild(a);let c=document.createElement("a");c.onclick=this.hideLightbox.bind(this),c.innerHTML="&times;",c.className="cesium-credit-lightbox-close",r.appendChild(c);let d=document.createElement("ul");r.appendChild(d);let u=document.createElement("div");u.className="cesium-credit-logoContainer",u.style.display="inline",e.appendChild(u);let h=document.createElement("div");h.className="cesium-credit-textContainer",h.style.display="inline",e.appendChild(h);let p=document.createElement("a");p.className="cesium-credit-expand-link",p.onclick=this.showLightbox.bind(this),p.textContent="Data attribution",e.appendChild(p),h_t(e);let b=bt.clone(Yr.cesiumCredit);this._delimiter=t??"\u2022",this._screenContainer=h,this._cesiumCreditContainer=u,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=r,this._creditList=d,this._lightbox=o,this._hideLightbox=s,this._expandLink=p,this._expanded=!1,this._staticCredits=[],this._cesiumCredit=b,this._previousCesiumCredit=void 0,this._currentCesiumCredit=b,this._creditDisplayElementPool=[],this._creditDisplayElementIndex=0,this._currentFrameCredits={screenCredits:new It,lightboxCredits:new It},this._defaultCredit=void 0,this.viewport=n,this.container=e}function jVe(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 KVe(n,i),r.push(o)),++e._creditDisplayElementPoolIndex,t.set(n.id,o)}}Yr.prototype.addCreditToNextFrame=function(e){if(e.isIon()){l(this._defaultCredit)||(this._defaultCredit=bt.clone(QVe())),this._currentCesiumCredit=this._defaultCredit;return}let t;e.showOnScreen?t=this._currentFrameCredits.screenCredits:t=this._currentFrameCredits.lightboxCredits,jVe(this,t,e)};Yr.prototype.addStaticCredit=function(e){let t=this._staticCredits;d_t(t,e)||t.push(e)};Yr.prototype.removeStaticCredit=function(e){let t=this._staticCredits,n=t.indexOf(e);n!==-1&&t.splice(n,1)};Yr.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0};Yr.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1};Yr.prototype.update=function(){this._expanded&&m_t(this)};Yr.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()&&bt.equals(Yr.cesiumCredit,this._cesiumCredit)||jVe(this,s,r,Number.MAX_VALUE)}bt.equals(Yr.cesiumCredit,this._cesiumCredit)||(this._cesiumCredit=bt.clone(Yr.cesiumCredit)),this._currentCesiumCredit=this._cesiumCredit};Yr.prototype.endFrame=function(){let e=this._currentFrameCredits.screenCredits.values;zVe(this._screenContainer,e,this._delimiter,void 0);let t=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=t.length>0?"inline":"none",zVe(this._creditList,t,void 0,"li"),u_t(this)};Yr.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),me(this)};Yr.prototype.isDestroyed=function(){return!1};Yr._cesiumCredit=void 0;Yr._cesiumCreditInitialized=!1;var v3;function QVe(){if(!l(v3)){let e=Kt("Assets/Images/ion-credit.png");e.indexOf("http://")!==0&&e.indexOf("https://")!==0&&e.indexOf("data:")!==0&&(e=new HVe.default(e).path()),v3=new bt(`<a href="https://cesium.com/" target="_blank"><img src="${e}" style="vertical-align: -7px" title="Cesium ion"/></a>`,!0)}return Yr._cesiumCreditInitialized||(Yr._cesiumCredit=v3,Yr._cesiumCreditInitialized=!0),v3}Object.defineProperties(Yr,{cesiumCredit:{get:function(){return QVe(),Yr._cesiumCredit},set:function(e){Yr._cesiumCredit=e,Yr._cesiumCreditInitialized=!0}}});Yr.CreditDisplayElement=KVe;var hw=Yr;var D4i=x(T(),1);var d4i=x(T(),1);var F3=0,f_t=1;function QS(e){let t=e.frustum,n=e.orientation,i=e.origin,o=e.vertexFormat??Xe.DEFAULT,r=e._drawNearPlane??!0,s,a;t instanceof Mi?(s=F3,a=Mi.packedLength):t instanceof mn&&(s=f_t,a=mn.packedLength),this._frustumType=s,this._frustum=t.clone(),this._origin=m.clone(i),this._orientation=Pe.clone(n),this._drawNearPlane=r,this._vertexFormat=o,this._workerName="createFrustumGeometry",this.packedLength=2+a+m.packedLength+Pe.packedLength+Xe.packedLength}QS.pack=function(e,t,n){n=n??0;let i=e._frustumType,o=e._frustum;return t[n++]=i,i===F3?(Mi.pack(o,t,n),n+=Mi.packedLength):(mn.pack(o,t,n),n+=mn.packedLength),m.pack(e._origin,t,n),n+=m.packedLength,Pe.pack(e._orientation,t,n),n+=Pe.packedLength,Xe.pack(e._vertexFormat,t,n),n+=Xe.packedLength,t[n]=e._drawNearPlane?1:0,t};var p_t=new Mi,b_t=new mn,g_t=new Pe,y_t=new m,x_t=new Xe;QS.unpack=function(e,t,n){t=t??0;let i=e[t++],o;i===F3?(o=Mi.unpack(e,t,p_t),t+=Mi.packedLength):(o=mn.unpack(e,t,b_t),t+=mn.packedLength);let r=m.unpack(e,t,y_t);t+=m.packedLength;let s=Pe.unpack(e,t,g_t);t+=Pe.packedLength;let a=Xe.unpack(e,t,x_t);t+=Xe.packedLength;let c=e[t]===1;if(!l(n))return new QS({frustum:o,origin:r,orientation:s,vertexFormat:a,_drawNearPlane:c});let d=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(d),n._frustumType=i,n._origin=m.clone(r,n._origin),n._orientation=Pe.clone(s,n._orientation),n._vertexFormat=Xe.clone(a,n._vertexFormat),n._drawNearPlane=c,n};function YR(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 T_t=new q,__t=new F,q$=new F,qVe=new m,$Ve=new m,eRe=new m,S_t=new m,A_t=new m,Z_t=new m,Px=new Array(3),fw=new Array(4);fw[0]=new se(-1,-1,1,1);fw[1]=new se(1,-1,1,1);fw[2]=new se(1,1,1,1);fw[3]=new se(-1,1,1,1);var tRe=new Array(4);for(let e=0;e<4;++e)tRe[e]=new se;QS._computeNearFarPlanes=function(e,t,n,i,o,r,s,a){let c=q.fromQuaternion(t,T_t),d=r??qVe,u=s??$Ve,h=a??eRe;d=q.getColumn(c,0,d),u=q.getColumn(c,1,u),h=q.getColumn(c,2,h),m.normalize(d,d),m.normalize(u,u),m.normalize(h,h),m.negate(d,d);let p=F.computeView(e,h,u,d,__t),b,f,y=i.projectionMatrix;if(n===F3){let _=F.multiply(y,p,q$);f=F.inverse(_,q$)}else b=F.inverseTransformation(p,q$);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=se.clone(fw[S],tRe[S]);if(l(f)){A=F.multiplyByVector(f,A,A);let Z=1/A.w;m.multiplyByScalar(A,Z,A),m.subtract(A,e,A),m.normalize(A,A);let V=m.dot(h,A);m.multiplyByScalar(A,Px[_]/V,A),m.add(A,e,A)}else{let Z=i.offCenterFrustum;l(Z)&&(i=Z);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}};QS.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);QS._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 bn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:c})});if(l(s.normal)||l(s.tangent)||l(s.bitangent)||l(s.st)){let p=l(s.normal)?new Float32Array(12*a):void 0,b=l(s.tangent)?new Float32Array(12*a):void 0,f=l(s.bitangent)?new Float32Array(12*a):void 0,y=l(s.st)?new Float32Array(8*a):void 0,_=qVe,S=$Ve,A=eRe,Z=m.negate(_,S_t),V=m.negate(S,A_t),E=m.negate(A,Z_t);d=0,r&&(YR(d,p,b,f,y,E,_,S),d+=12),YR(d,p,b,f,y,A,Z,S),d+=12,YR(d,p,b,f,y,Z,E,S),d+=12,YR(d,p,b,f,y,V,E,Z),d+=12,YR(d,p,b,f,y,_,A,S),d+=12,YR(d,p,b,f,y,S,A,Z),l(p)&&(u.normal=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:p})),l(b)&&(u.tangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:b})),l(f)&&(u.bitangent=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:f})),l(y)&&(u.st=new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:2,values:y}))}let h=new Uint16Array(6*a);for(let p=0;p<a;++p){let b=p*6,f=p*4;h[b]=f,h[b+1]=f+1,h[b+2]=f+2,h[b+3]=f,h[b+4]=f+2,h[b+5]=f+3}return new ft({attributes:u,indices:h,primitiveType:ve.TRIANGLES,boundingSphere:de.fromVertices(c)})};var qS=QS;var Z4i=x(T(),1);var $$=0,C_t=1;function pw(e){let t=e.frustum,n=e.orientation,i=e.origin,o=e._drawNearPlane??!0,r,s;t instanceof Mi?(r=$$,s=Mi.packedLength):t instanceof mn&&(r=C_t,s=mn.packedLength),this._frustumType=r,this._frustum=t.clone(),this._origin=m.clone(i),this._orientation=Pe.clone(n),this._drawNearPlane=o,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+s+m.packedLength+Pe.packedLength}pw.pack=function(e,t,n){n=n??0;let i=e._frustumType,o=e._frustum;return t[n++]=i,i===$$?(Mi.pack(o,t,n),n+=Mi.packedLength):(mn.pack(o,t,n),n+=mn.packedLength),m.pack(e._origin,t,n),n+=m.packedLength,Pe.pack(e._orientation,t,n),n+=Pe.packedLength,t[n]=e._drawNearPlane?1:0,t};var V_t=new Mi,R_t=new mn,E_t=new Pe,G_t=new m;pw.unpack=function(e,t,n){t=t??0;let i=e[t++],o;i===$$?(o=Mi.unpack(e,t,V_t),t+=Mi.packedLength):(o=mn.unpack(e,t,R_t),t+=mn.packedLength);let r=m.unpack(e,t,G_t);t+=m.packedLength;let s=Pe.unpack(e,t,E_t);t+=Pe.packedLength;let a=e[t]===1;if(!l(n))return new pw({frustum:o,origin:r,orientation:s,_drawNearPlane:a});let c=i===n._frustumType?n._frustum:void 0;return n._frustum=o.clone(c),n._frustumType=i,n._origin=m.clone(r,n._origin),n._orientation=Pe.clone(s,n._orientation),n._drawNearPlane=a,n};pw.createGeometry=function(e){let t=e._frustumType,n=e._frustum,i=e._origin,o=e._orientation,r=e._drawNearPlane,s=new Float64Array(24);qS._computeNearFarPlanes(i,o,t,n,s);let a=new bn({position:new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:s})}),c,d,u=r?2:1,h=new Uint16Array(8*(u+1)),p=r?0:1;for(;p<2;++p)c=r?p*8:0,d=p*4,h[c]=d,h[c+1]=d+1,h[c+2]=d+1,h[c+3]=d+2,h[c+4]=d+2,h[c+5]=d+3,h[c+6]=d+3,h[c+7]=d;for(p=0;p<2;++p)c=(u+p)*8,d=p*4,h[c]=d,h[c+1]=d+4,h[c+2]=d+1,h[c+3]=d+5,h[c+4]=d+2,h[c+5]=d+6,h[c+6]=d+3,h[c+7]=d+7;return new ft({attributes:a,indices:h,primitiveType:ve.LINES,boundingSphere:de.fromVertices(s)})};var bw=pw;function I3(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 L_t=new m,W_t=new q,v_t=new Pe,F_t=new Mi,I_t=new rd,P_t=new mn,X_t=new rs,N_t=new U,Y_t=[1,1e5];I3.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 Mi?a=F_t:s instanceof rd?a=I_t:s instanceof mn?a=P_t:a=X_t,a=s.clone(a);let c,d=this._frustumSplits;!l(d)||d.length<=1?(d=Y_t,d[0]=this._camera.frustum.near,d[1]=this._camera.frustum.far,c=1):c=d.length-1;let u=r.positionWC,h=r.directionWC,p=r.upWC,b=r.rightWC;b=m.negate(b,L_t);let f=W_t;q.setColumn(f,0,b,f),q.setColumn(f,1,p,f),q.setColumn(f,2,h,f);let y=Pe.fromRotationMatrix(f,v_t);for(t.length=n.length=c,i=0;i<c;++i)a.near=d[i],a.far=d[i+1],t[i]=new Ln({geometryInstances:new Wt({geometry:new qS({origin:u,orientation:y,frustum:a,_drawNearPlane:i===0}),attributes:{color:Ht.fromColor(U.fromAlpha(this._color,.1,N_t))},id:this.id,pickPrimitive:this}),appearance:new hn({translucent:!0,flat:!0}),asynchronous:!1}),n[i]=new Ln({geometryInstances:new Wt({geometry:new bw({origin:u,orientation:y,frustum:a,_drawNearPlane:i===0}),attributes:{color:Ht.fromColor(this._color)},id:this.id,pickPrimitive:this}),appearance:new hn({translucent:!1,flat:!0}),asynchronous:!1})}for(o=t.length,i=0;i<o;++i)n[i].update(e),t[i].update(e)};I3.prototype.isDestroyed=function(){return!1};I3.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 me(this)};var l0=I3;var pQi=x(T(),1);var B4i=x(T(),1),gw=`in vec4 positionEC;
void main()
{
vec3 position;
vec3 direction;
if (czm_orthographicIn3D == 1.0)
{
vec2 uv = (gl_FragCoord.xy - czm_viewport.xy) / czm_viewport.zw;
vec2 minPlane = vec2(czm_frustumPlanes.z, czm_frustumPlanes.y); // left, bottom
vec2 maxPlane = vec2(czm_frustumPlanes.w, czm_frustumPlanes.x); // right, top
position = vec3(mix(minPlane, maxPlane, uv), 0.0);
direction = vec3(0.0, 0.0, -1.0);
}
else
{
position = vec3(0.0);
direction = normalize(positionEC.xyz);
}
czm_ray ray = czm_ray(position, direction);
vec3 ellipsoid_center = czm_view[3].xyz;
czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);
if (!czm_isEmpty(intersection))
{
out_FragColor = vec4(1.0, 1.0, 0.0, 1.0);
}
else
{
discard;
}
czm_writeLogDepth();
}
`;var H4i=x(T(),1),yw=`in vec4 position;
out vec4 positionEC;
void main()
{
positionEC = czm_modelView * position;
gl_Position = czm_projection * positionEC;
czm_vertexLogDepth();
}
`;function Tw(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 xw=an.supportsTypedArrays()?new Float32Array(12):[],nRe=new m,iRe=new m,eee=new m,oRe=new m,P3=new m;function w_t(e,t){let n=e.radii,i=t.camera,o,r,s;if(i.frustum instanceof mn)o=m.ZERO,r=i.rightWC,s=i.upWC;else{let h=i.positionWC,p=m.multiplyComponents(e.oneOverRadii,h,nRe),b=m.normalize(p,iRe),f=m.normalize(m.cross(m.UNIT_Z,p,eee),eee),y=m.normalize(m.cross(b,f,oRe),oRe),_=m.magnitude(p),S=Math.sqrt(_*_-1);o=m.multiplyByScalar(b,1/_,nRe);let A=S/_;r=m.multiplyByScalar(f,A,iRe),s=m.multiplyByScalar(y,A,eee)}let a=m.add(o,s,P3);m.subtract(a,r,a),m.multiplyComponents(n,a,a),m.pack(a,xw,0);let c=m.subtract(o,s,P3);m.subtract(c,r,c),m.multiplyComponents(n,c,c),m.pack(c,xw,3);let d=m.add(o,s,P3);m.add(d,r,d),m.multiplyComponents(n,d,d),m.pack(d,xw,6);let u=m.subtract(o,s,P3);return m.add(u,r,u),m.multiplyComponents(n,u,u),m.pack(u,xw,9),xw}Tw.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 et({renderState:this._rs,boundingVolume:new de(m.ZERO,i.maximumRadius),pass:Le.OPAQUE,owner:this})),!l(this._sp)||this._useLogDepth!==o){this._useLogDepth=o;let s=new Be({sources:[yw]}),a=new Be({sources:[gw]});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=w_t(i,e);if(l(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(r);else{let s=new ft({attributes:{position:new Ie({componentDatatype:K.FLOAT,componentsPerAttribute:3,values:r})},indices:[0,1,2,2,1,3],primitiveType:ve.TRIANGLES});this._va=Mn.fromGeometry({context:t,geometry:s,attributeLocations:{position:0},bufferUsage:Fe.DYNAMIC_DRAW}),this._command.vertexArray=this._va}};Tw.prototype.execute=function(e,t){this._mode===re.SCENE3D&&this._command.execute(e,t)};Tw.prototype.isDestroyed=function(){return!1};Tw.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()};var _w=Tw;var ZQi=x(T(),1);function MR(){}var M_t=/\bgl_FragDepth\b/,k_t=/\bdiscard\b/;function U_t(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"depthOnly");if(l(n))return n;let i=t.fragmentShaderSource,o=!1,r=i.sources;for(let a=0;a<r.length;++a)if(M_t.test(r[a])||k_t.test(r[a])){o=!0;break}let s=i.defines.indexOf("LOG_DEPTH")>=0;if(!o&&!s){let a=`void main()
{
out_FragColor = vec4(1.0);
}
`;i=new Be({sources:[a]})}else if(!o&&s){let a=`void main()
{
out_FragColor = vec4(1.0);
czm_writeLogDepth();
}
`;i=new Be({defines:["LOG_DEPTH"],sources:[a]})}return e.shaderCache.createDerivedShaderProgram(t,"depthOnly",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:i,attributeLocations:t._attributeLocations})}function D_t(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}MR.createDepthOnlyDerivedCommand=function(e,t,n,i){l(i)||(i={});let o=i.depthOnlyCommand?.shaderProgram,r=i.depthOnlyCommand?.renderState;return i.depthOnlyCommand=et.shallowClone(t,i.depthOnlyCommand),!l(o)||i.shaderProgramId!==t.shaderProgram.id?(i.depthOnlyCommand.shaderProgram=U_t(n,t.shaderProgram),i.depthOnlyCommand.renderState=D_t(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.depthOnlyCommand.shaderProgram=o,i.depthOnlyCommand.renderState=r),i};var O_t=/\s+czm_writeLogDepth\(/,B_t=/\s+czm_vertexLogDepth\(/;function z_t(e,t){if(t.fragmentShaderSource.defines.indexOf("LOG_DEPTH_READ_ONLY")>=0)return t;let i=e.shaderCache.getDerivedShaderProgram(t,"logDepth");if(l(i))return i;let o=t._attributeLocations,r=t.vertexShaderSource.clone(),s=t.fragmentShaderSource.clone();r.defines=l(r.defines)?r.defines.slice(0):[],r.defines.push("LOG_DEPTH"),s.defines=l(s.defines)?s.defines.slice(0):[],s.defines.push("LOG_DEPTH");let a=!1,c=r.sources;for(let u=0;u<c.length;++u)if(B_t.test(c[u])){a=!0;break}if(!a){for(let h=0;h<c.length;++h)c[h]=Be.replaceMain(c[h],"czm_log_depth_main");c.push(`
void main()
{
czm_log_depth_main();
czm_vertexLogDepth();
}
`)}c=s.sources,a=!1;for(let u=0;u<c.length;++u)O_t.test(c[u])&&(a=!0);s.defines.indexOf("LOG_DEPTH_WRITE")!==-1&&(a=!0);let d="";if(!a){for(let u=0;u<c.length;u++)c[u]=Be.replaceMain(c[u],"czm_log_depth_main");d=`
void main()
{
czm_log_depth_main();
czm_writeLogDepth();
}
`}return c.push(d),e.shaderCache.createDerivedShaderProgram(t,"logDepth",{vertexShaderSource:r,fragmentShaderSource:s,attributeLocations:o})}MR.createLogDepthCommand=function(e,t,n){l(n)||(n={});let i=n.command?.shaderProgram;return n.command=et.shallowClone(e,n.command),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=z_t(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};function H_t(e,t,n){let i=e.shaderCache.getDerivedShaderProgram(t,"pick");if(l(i))return i;let o=t._attributeLocations,{sources:r,defines:s}=t.fragmentShaderSource,c=r.some(b=>b.includes("out_FragData"))?"out_FragData_0":"out_FragColor",d=`void main ()
{
czm_non_pick_main();
if (${c}.a == 0.0) {
discard;
}
${c} = ${n};
} `,u=r.length,h=new Array(u+1);for(let b=0;b<u;++b)h[b]=Be.replaceMain(r[b],"czm_non_pick_main");h[u]=d;let p=new Be({sources:h,defines:s});return e.shaderCache.createDerivedShaderProgram(t,"pick",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:p,attributeLocations:o})}function rRe(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}MR.createPickDerivedCommand=function(e,t,n,i){l(i)||(i={});let o=i.pickCommand?.shaderProgram,r=i.pickCommand?.renderState;return i.pickCommand=et.shallowClone(t,i.pickCommand),!l(o)||i.shaderProgramId!==t.shaderProgram.id?(i.pickCommand.shaderProgram=H_t(n,t.shaderProgram,t.pickId),i.pickCommand.renderState=rRe(e,t.renderState),i.shaderProgramId=t.shaderProgram.id):(i.pickCommand.shaderProgram=o,i.pickCommand.renderState=r),i};function wR(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 K_t(e){return e.isArray?e.arrayLength:gt.getComponentCount(e.type)}function sRe(e,t,n){return`((${e} - float(${t})) / float(${n}))`}function aRe(e,t){let n=Pt.getMaximum(t);return`(${e}) / float(${n})`}function J_t(e,t){let n="float(value)";if(t.hasValueTransform){let i=t.offset,o=t.scale;n=sRe(n,i,o)}return e.normalized||(n=aRe(n,e.componentType)),n}function j_t(e,t,n){let o=`float(${`value.${n}`})`;if(t.hasValueTransform){let r=t.offset[n],s=t.scale[n];o=sRe(o,r,s)}return e.normalized||(o=aRe(o,e.componentType)),o}function Q_t(e,t,n){let i=n.schemaId,o=n.className,r=n.propertyName,s=`pickMetadata-${i}-${o}-${r}`,a=e.shaderCache.getDerivedShaderProgram(t,s);if(l(a))return a;let c=n.metadataProperty,d=n.classProperty,u=d.getGlslType(),h=["0.0","0.0","0.0","0.0"],p=K_t(d);if(p===1)h[0]=J_t(d,c);else{let _=["x","y","z","w"];for(let S=0;S<p;S++)h[S]=j_t(d,c,_[S])}let b=t.fragmentShaderSource.defines.slice();b.push(gu.METADATA_PICKING_ENABLED),wR(b,gu.METADATA_PICKING_VALUE_TYPE,u),wR(b,gu.METADATA_PICKING_VALUE_STRING,`metadata.${r}`),wR(b,gu.METADATA_PICKING_VALUE_COMPONENT_X,h[0]),wR(b,gu.METADATA_PICKING_VALUE_COMPONENT_Y,h[1]),wR(b,gu.METADATA_PICKING_VALUE_COMPONENT_Z,h[2]),wR(b,gu.METADATA_PICKING_VALUE_COMPONENT_W,h[3]);let f=new Be({sources:t.fragmentShaderSource.sources,defines:b});return e.shaderCache.createDerivedShaderProgram(t,s,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:f,attributeLocations:t._attributeLocations})}MR.createPickMetadataDerivedCommand=function(e,t,n,i){return l(i)||(i={}),i.pickMetadataCommand=et.shallowClone(t,i.pickMetadataCommand),i.pickMetadataCommand.shaderProgram=Q_t(n,t.shaderProgram,t.pickedMetadataInfo),i.pickMetadataCommand.renderState=rRe(e,t.renderState),i.shaderProgramId=t.shaderProgram.id,i};function q_t(e,t){let n=e.shaderCache.getDerivedShaderProgram(t,"HDR");if(l(n))return n;let i=t._attributeLocations,o=t.vertexShaderSource.clone(),r=t.fragmentShaderSource.clone();return o.defines=l(o.defines)?o.defines.slice(0):[],o.defines.push("HDR"),r.defines=l(r.defines)?r.defines.slice(0):[],r.defines.push("HDR"),e.shaderCache.createDerivedShaderProgram(t,"HDR",{vertexShaderSource:o,fragmentShaderSource:r,attributeLocations:i})}MR.createHdrCommand=function(e,t,n){l(n)||(n={});let i=n.command?.shaderProgram;return n.command=et.shallowClone(e,n.command),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.command.shaderProgram=q_t(t,e.shaderProgram),n.shaderProgramId=e.shaderProgram.id):n.command.shaderProgram=i,n};var d0=MR;var WQi=x(T(),1);function X3(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 $_t=new Pe,cRe=new Pe,eSt=new q;function tSt(e,t,n,i){let o=e.direction,r=e.right,s=e.up,a=Pe.fromAxisAngle(o,n,cRe),c=Pe.fromAxisAngle(r,i,$_t),d=Pe.multiply(c,a,c),u=Pe.fromAxisAngle(s,t,cRe);Pe.multiply(u,d,d);let h=q.fromQuaternion(d,eSt);q.multiplyByVector(h,r,r),q.multiplyByVector(h,s,s),q.multiplyByVector(h,o,o)}X3.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;tSt(this._scene.camera,-e,t,n),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma};X3.prototype.isDestroyed=function(){return!1};X3.prototype.destroy=function(){return this._removeListener(),me(this)};var Sw=X3;var NQi=x(T(),1);function tee(){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(tee.prototype,{heightFalloff:{get:function(){return this._heightFalloff},set:function(e){this._heightFalloff=e}}});var nSt=new m;tee.prototype.update=function(e){if(!(e.fog.enabled=this.enabled))return;e.fog.renderable=this.renderable;let n=e.camera,i=n.positionCartographic;if(!l(i)||i.height>this.maxHeight||e.mode!==re.SCENE3D){e.fog.enabled=!1,e.fog.density=0;return}let o=i.height,r=this.density*this.heightScalar*Math.pow(Math.max(o/this.maxHeight,W.EPSILON4),-Math.max(this._heightFalloff,0)),s=m.normalize(n.positionWC,nSt),a=Math.abs(m.dot(n.directionWC,s));r*=1-a,e.fog.density=r,e.fog.visualDensityScalar=this.visualDensityScalar,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness};var Aw=tee;var MQi=x(T(),1);function iSt(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 Zw=iSt;var $Qi=x(T(),1);var mc={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},$S=mc.DERIVED_COMMANDS_MAXIMUM_LENGTH,yRe=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function eA(){this._frontFaceAlphaByDistance=new wt(0,1,0,1),this._backFaceAlphaByDistance=new wt(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=ae.clone(ae.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array($S),this._derivedBlendCommandTypes=new Array($S),this._derivedPickCommandTypes=new Array($S),this._derivedCommandTypesToUpdate=new Array($S),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}Object.defineProperties(eA.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}}});eA.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=lRe(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=lRe(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=dRe(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=dRe(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=aSt(this,e,t),this._sunVisibleThroughGlobe=oSt(this,e),this._environmentVisible=rSt(this,e),this._useDepthPlane=sSt(this,e),this._numberOfTextureUniforms=cSt(this),this._rectangle=ae.clone(t.translucency.rectangle,this._rectangle),lSt(this,e)};function lRe(e,t,n,i){return e?l(n)?(wt.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 dRe(e,t,n){return e&&(n.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function oSt(e,t){let n=e._frontFaceTranslucent,i=e._backFaceTranslucent;return n&&(t.cameraUnderground||i)}function rSt(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}function sSt(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}function aSt(e,t,n){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!n.depthTestAgainstTerrain&&t.mode!==re.SCENE2D&&t.context.depthTexture}function cSt(e){let t=0;return e._frontFaceTranslucent&&++t,e._requiresManualDepthTest&&++t,t}function lSt(e,t){e._derivedCommandsLength=nee(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=nee(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=nee(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<$S;++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=ZSt())}function nee(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?mc.PICK_FRONT_FACE:d?mc.TRANSLUCENT_FRONT_FACE_MANUAL_DEPTH_TEST:mc.TRANSLUCENT_FRONT_FACE,h=i?mc.PICK_BACK_FACE:d?mc.TRANSLUCENT_BACK_FACE_MANUAL_DEPTH_TEST:mc.TRANSLUCENT_BACK_FACE;return t.mode===re.SCENE2D?(o[r++]=mc.DEPTH_ONLY_FRONT_FACE,o[r++]=u,r):(a?(n||(o[r++]=mc.DEPTH_ONLY_FRONT_AND_BACK_FACE),c?(o[r++]=u,o[r++]=h):(o[r++]=h,o[r++]=u)):c?(n||(o[r++]=mc.DEPTH_ONLY_BACK_FACE),o[r++]=mc.OPAQUE_FRONT_FACE,o[r++]=h):(n||(o[r++]=mc.DEPTH_ONLY_FRONT_FACE),o[r++]=mc.OPAQUE_BACK_FACE,o[r++]=u),r)}function mh(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function uRe(e,t){return e.indexOf(t)>-1}function dSt(e,t){mh(e.defines,"TRANSLUCENT"),mh(t.defines,"TRANSLUCENT")}function uSt(e,t){mh(e.defines,"GROUND_ATMOSPHERE"),mh(t.defines,"GROUND_ATMOSPHERE"),mh(e.defines,"FOG"),mh(t.defines,"FOG"),mh(e.defines,"TRANSLUCENT"),mh(t.defines,"TRANSLUCENT")}function iee(e,t){if(uRe(t.defines,"TILE_LIMIT_RECTANGLE")||uRe(t.defines,"ENABLE_CLIPPING_PLANES"))return;let n=`void main()
{
out_FragColor = vec4(1.0);
}
`;t.sources=[n]}function oee(e,t){let n=t.sources,i=n.length;for(let r=0;r<i;++r)n[r]=Be.replaceMain(n[r],"czm_globe_translucency_main");n.push(`
uniform sampler2D u_classificationTexture;
void main()
{
vec2 st = gl_FragCoord.xy / czm_viewport.zw;
#ifdef MANUAL_DEPTH_TEST
float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st));
if (logDepthOrDepth != 0.0)
{
vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);
float depthEC = eyeCoordinate.z / eyeCoordinate.w;
if (v_positionEC.z < depthEC)
{
discard;
}
}
#endif
czm_globe_translucency_main();
vec4 classificationColor = texture(u_classificationTexture, st);
if (classificationColor.a > 0.0)
{
// Reverse premultiplication process to get the correct composited result of the classification primitives
classificationColor.rgb /= classificationColor.a;
}
out_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + out_FragColor * (1.0 - classificationColor.a);
}
`)}function xRe(e,t){oee(e,t),mh(e.defines,"GROUND_ATMOSPHERE"),mh(t.defines,"GROUND_ATMOSPHERE"),mh(e.defines,"FOG"),mh(t.defines,"FOG")}function mSt(e,t){oee(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function hSt(e,t){xRe(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function mRe(e,t){let n=`uniform sampler2D u_classificationTexture;
void main()
{
vec2 st = gl_FragCoord.xy / czm_viewport.zw;
vec4 pickColor = texture(u_classificationTexture, st);
if (pickColor == vec4(0.0))
{
discard;
}
out_FragColor = pickColor;
}
`;t.sources=[n]}function fSt(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 pSt(e){e.cull.face=Pi.BACK,e.cull.enabled=!0}function bSt(e){e.cull.face=Pi.FRONT,e.cull.enabled=!0}function gSt(e){e.cull.face=Pi.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function ySt(e){e.cull.face=Pi.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function xSt(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function hRe(e){e.cull.face=Pi.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=tn.ALPHA_BLEND}function fRe(e){e.cull.face=Pi.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=tn.ALPHA_BLEND}function TSt(e){e.cull.face=Pi.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function _St(e){e.cull.face=Pi.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function SSt(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 kR(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function ASt(e,t,n,i,o){return l(o)?!i&&l(n)?n:Rt(t,o(e),!1):t}function Uf(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}function ZSt(){return[new Uf({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:dSt,getRenderStateFunction:pSt,getUniformMapFunction:void 0}),new Uf({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:uSt,getRenderStateFunction:bSt,getUniformMapFunction:void 0}),new Uf({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:iee,getRenderStateFunction:gSt,getUniformMapFunction:void 0}),new Uf({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:iee,getRenderStateFunction:ySt,getUniformMapFunction:void 0}),new Uf({pass:Le.GLOBE,pickOnly:!1,getShaderProgramFunction:iee,getRenderStateFunction:xSt,getUniformMapFunction:void 0}),new Uf({pass:Le.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:oee,getRenderStateFunction:hRe,getUniformMapFunction:kR}),new Uf({pass:Le.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:xRe,getRenderStateFunction:fRe,getUniformMapFunction:kR}),new Uf({pass:Le.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:mSt,getRenderStateFunction:hRe,getUniformMapFunction:kR}),new Uf({pass:Le.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:hSt,getRenderStateFunction:fRe,getUniformMapFunction:kR}),new Uf({pass:Le.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:mRe,getRenderStateFunction:TSt,getUniformMapFunction:kR}),new Uf({pass:Le.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:mRe,getRenderStateFunction:_St,getUniformMapFunction:kR})]}var pRe=new Array($S),bRe=new Array($S);eA.prototype.updateDerivedCommands=function(e,t){let n=this._derivedCommandTypesToUpdate,i=this._derivedCommandsToUpdateLength;if(i!==0){for(let o=0;o<i;++o)bRe[o]=this._derivedCommandPacks[n[o]],pRe[o]=yRe[n[o]];CSt(this,e,i,n,pRe,bRe,t)}};function CSt(e,t,n,i,o,r,s){let a=t.derivedCommands.globeTranslucency,c=e._derivedCommandsDirty;if(t.dirty||!l(a)||c){t.dirty=!1,l(a)||(a={},t.derivedCommands.globeTranslucency=a);let d=s.frameNumber,u=a.uniformMapDirtyFrame??0,h=a.shaderProgramDirtyFrame??0,p=a.renderStateDirtyFrame??0,b=a.uniformMap!==t.uniformMap,f=a.shaderProgramId!==t.shaderProgram.id,y=a.renderStateId!==t.renderState.id;b&&(a.uniformMapDirtyFrame=d),f&&(a.shaderProgramDirtyFrame=d),y&&(a.renderStateDirtyFrame=d),a.uniformMap=t.uniformMap,a.shaderProgramId=t.shaderProgram.id,a.renderStateId=t.renderState.id;for(let _=0;_<n;++_){let S=r[_],A=i[_],Z=o[_],V=a[Z],E,L,v;l(V)?(E=V.uniformMap,L=V.shaderProgram,v=V.renderState):(E=void 0,L=void 0,v=void 0),V=et.shallowClone(t,V),a[Z]=V;let I=V.derivedCommands.uniformMapDirtyFrame??0,X=V.derivedCommands.shaderProgramDirtyFrame??0,N=V.derivedCommands.renderStateDirtyFrame??0,g=b||I<u,C=f||X<h,R=y||N<p;g&&(V.derivedCommands.uniformMapDirtyFrame=d),C&&(V.derivedCommands.shaderProgramDirtyFrame=d),R&&(V.derivedCommands.renderStateDirtyFrame=d),V.derivedCommands.type=A,V.pass=S.pass,V.pickOnly=S.pickOnly,V.uniformMap=ASt(e,t.uniformMap,E,g,S.getUniformMapFunction),V.shaderProgram=fSt(s.context,t.shaderProgram,L,C,S.getShaderProgramFunction,Z),V.renderState=SSt(t.renderState,v,R,S.getRenderStateFunction,S.renderStateCache)}}}eA.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=yRe[o[a]];n.commandList.push(s[c])}};function TRe(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 gRe(e,t,n,i,o){for(let r=0;r<t;++r)n(e[r],i,o)}var VSt=[mc.OPAQUE_FRONT_FACE,mc.OPAQUE_BACK_FACE],RSt=[mc.DEPTH_ONLY_FRONT_FACE,mc.DEPTH_ONLY_BACK_FACE,mc.DEPTH_ONLY_FRONT_AND_BACK_FACE];eA.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),TRe(s,a,t,i,o,VSt))};eA.prototype.executeGlobeClassificationCommands=function(e,t,n,i,o){let{context:r}=i,{uniformState:s}=r,a=e.commands[Le.GLOBE],c=e.indices[Le.GLOBE],d=e.commands[Le.TERRAIN_CLASSIFICATION],u=e.indices[Le.TERRAIN_CLASSIFICATION];if(c===0||u===0)return;let h=this._frontFaceTranslucent,p=this._backFaceTranslucent;if((!h||!p)&&gRe(d,u,t,i,o),!h&&!p)return;this._globeTranslucencyFramebuffer=n;let b=s.globeDepthTexture,f=o.framebuffer;if(o.framebuffer=n.classificationFramebuffer,TRe(a,c,t,i,o,RSt),r.depthTexture){let y=n.packDepth(r,o);s.globeDepthTexture=y}gRe(d,u,t,i,o),s.globeDepthTexture=b,o.framebuffer=f};var Cw=eA;var T8i=x(T(),1);var t8i=x(T(),1),zd=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
void main()
{
out_FragColor = texture(colorTexture, v_textureCoordinates);
}
`;function u0(){this._numSamples=1,this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._fbo=new yi({depthStencil:!0,createDepthAttachments:!1}),this._fboClassified=new yi({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 si({color:new U(0,0,0,0),owner:this}),this._clearCommand=new si({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(u0.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}});u0.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var ESt={depthMask:!1,stencilTest:{enabled:!0,frontFunction:jn.EQUAL,frontOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.KEEP},backFunction:jn.NEVER,reference:0,mask:Ot.CLASSIFICATION_MASK},blending:tn.ALPHA_BLEND},GSt={depthMask:!1,stencilTest:{enabled:!0,frontFunction:jn.NOT_EQUAL,frontOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.KEEP},backFunction:jn.NEVER,reference:0,mask:Ot.CLASSIFICATION_MASK},blending:tn.ALPHA_BLEND},LSt={depthMask:!0,depthTest:{enabled:!0},stencilTest:Ot.setCesium3DTileBit(),stencilMask:Ot.CESIUM_3D_TILE_MASK,blending:tn.ALPHA_BLEND},WSt=`uniform sampler2D colorTexture;
uniform sampler2D depthTexture;
uniform sampler2D classifiedTexture;
in vec2 v_textureCoordinates;
void main()
{
vec4 color = texture(colorTexture, v_textureCoordinates);
if (color.a == 0.0)
{
discard;
}
bool isClassified = all(equal(texture(classifiedTexture, v_textureCoordinates), vec4(0.0)));
#ifdef UNCLASSIFIED
vec4 highlightColor = czm_invertClassificationColor;
if (isClassified)
{
discard;
}
#else
vec4 highlightColor = vec4(1.0);
if (!isClassified)
{
discard;
}
#endif
out_FragColor = color * highlightColor;
gl_FragDepth = texture(depthTexture, v_textureCoordinates).r;
}
`,vSt=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
void main()
{
vec4 color = texture(colorTexture, v_textureCoordinates);
if (color.a == 0.0)
{
discard;
}
#ifdef UNCLASSIFIED
out_FragColor = color * czm_invertClassificationColor;
#else
out_FragColor = color;
#endif
}
`;u0.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 Et({context:e,width:s,height:a,pixelFormat:Ke.DEPTH_STENCIL,pixelDatatype:Oe.UNSIGNED_INT_24_8}),t>1&&(this._depthStencilRenderbuffer=new ru({context:e,width:s,height:a,format:Cl.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(ESt),this._rsClassified=De.fromCache(GSt),this._rsDefault=De.fromCache(LSt)),!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)?vSt:WSt,u=new Be({defines:["UNCLASSIFIED"],sources:[d]}),h=new Be({sources:[d]});this._unclassifiedCommand=e.createViewportQuadCommand(u,{renderState:l(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(h,{renderState:l(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),l(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),l(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(zd,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}};u0.prototype.prepareTextures=function(e,t){this._fbo._numSamples>1&&this._fbo.prepareTextures(e,t)};u0.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))};u0.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)};u0.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)};u0.prototype.isDestroyed=function(){return!1};u0.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()),me(this)};var UR=u0;var C8i=x(T(),1);function N3(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}Object.defineProperties(N3.prototype,{total:{get:function(){return this._total}}});function Xx(e){let t=new Array(Cc.NUMBER_OF_JOB_TYPES);t[Cc.TEXTURE]=new N3(l(e)?e[Cc.TEXTURE]:10),t[Cc.PROGRAM]=new N3(l(e)?e[Cc.PROGRAM]:10),t[Cc.BUFFER]=new N3(l(e)?e[Cc.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=Yi;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 Vw=Xx;var W8i=x(T(),1);function Y3(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=Yi(),this._lastMsSampleTime=Yi(),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(Y3.prototype,{throttled:{get:function(){return this._throttled},set:function(e){this._throttled!==e&&(e?this._throttledText.nodeValue="(throttled)":this._throttledText.nodeValue="",this._throttled=e)}}});Y3.prototype.update=function(e){let t=Yi(),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}};Y3.prototype.destroy=function(){return me(this)};var _g=Y3;var q$i=x(T(),1);var O8i=x(T(),1);var hc={};hc.decodeRawMetadataValue=function(e,t,n){switch(e){case Pt.INT8:return t.getInt8(n);case Pt.UINT8:return t.getUint8(n);case Pt.INT16:return t.getInt16(n,!0);case Pt.UINT16:return t.getUint16(n,!0);case Pt.INT32:return t.getInt32(n,!0);case Pt.UINT32:return t.getUint32(n,!0);case Pt.INT64:return t.getBigInt64(n,!0);case Pt.UINT64:return t.getBigUint64(n,!0);case Pt.FLOAT32:return t.getFloat32(n,!0);case Pt.FLOAT64:return t.getFloat64(n,!0)}throw new le(`Invalid component type: ${e}`)};hc.decodeRawMetadataValueComponent=function(e,t,n){let i=e.componentType,o=hc.decodeRawMetadataValue(i,t,n);return e.normalized?Pt.normalize(o,i):o};hc.decodeRawMetadataValueElement=function(e,t,n){let i=e.componentType,o=Pt.getSizeInBytes(i),r=e.type,s=gt.getComponentCount(r),a=o*s;if(s>1){let u=Array(s);for(let h=0;h<s;h++){let p=n*a+h*o,b=hc.decodeRawMetadataValueComponent(e,t,p);u[h]=b}return u}let c=n*a;return hc.decodeRawMetadataValueComponent(e,t,c)};hc.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=hc.decodeRawMetadataValueElement(e,n,s);r[s]=a}return r}return hc.decodeRawMetadataValueElement(e,n,0)};hc.convertToObjectType=function(e,t){if(!l(t)||e===gt.SCALAR||e===gt.STRING||e===gt.BOOLEAN||e===gt.ENUM)return t;let n=t.map(i=>Number(i));switch(e){case gt.VEC2:return M.unpack(n,0,new M);case gt.VEC3:return m.unpack(n,0,new m);case gt.VEC4:return se.unpack(n,0,new se);case gt.MAT2:return Oi.unpack(n,0,new Oi);case gt.MAT3:return q.unpack(n,0,new q);case gt.MAT4:return F.unpack(n,0,new F)}throw new le(`Invalid metadata object type: ${e}`)};hc.convertFromObjectType=function(e,t){if(!l(t)||e===gt.SCALAR||e===gt.STRING||e===gt.BOOLEAN||e===gt.ENUM)return t;switch(e){case gt.VEC2:return M.pack(t,Array(2));case gt.VEC3:return m.pack(t,Array(3));case gt.VEC4:return se.pack(t,Array(4));case gt.MAT2:return Oi.pack(t,Array(4));case gt.MAT3:return q.pack(t,Array(9));case gt.MAT4:return F.pack(t,Array(16))}throw new le(`Invalid metadata object type: ${e}`)};hc.decodeMetadataValues=function(e,t,n){let i=hc.decodeRawMetadataValues(e,n);if(t.hasValueTransform){let r=hc.convertFromObjectType(e.type,t.offset),s=hc.convertFromObjectType(e.type,t.scale);i=yp.valueTransformInPlace(i,r,s,Pt.applyValueTransform)}if(e.isArray){let r=e.arrayLength,s=Array(r);for(let a=0;a<r;a++){let c=i[a],d=hc.convertToObjectType(e.type,c);s[a]=d}return s}return hc.convertToObjectType(e.type,i)};var Rw=Object.freeze(hc);var Q8i=x(T(),1);function tA(){this._framebuffer=new yi,this._textureToCopy=void 0,this._copyDepthCommand=void 0}Object.defineProperties(tA.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function FSt(e,t,n){let{width:i,height:o}=n;e._framebuffer.update(t,i,o)}function ISt(e,t,n){l(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(`uniform highp sampler2D colorTexture;
in vec2 v_textureCoordinates;
void main()
{
vec4 globeDepthPacked = texture(czm_globeDepthTexture, v_textureCoordinates);
float globeDepth = czm_unpackDepth(globeDepthPacked);
float depth = texture(colorTexture, v_textureCoordinates).r;
out_FragColor = czm_branchFreeTernary(globeDepth <= 0.0 || globeDepth >= 1.0 || depth < globeDepth && depth > 0.0 && depth < 1.0,
czm_packDepth(depth), globeDepthPacked);
}
`,{renderState:De.fromCache(),uniformMap:{colorTexture:function(){return e._textureToCopy}},owner:e})),e._textureToCopy=n,e._copyDepthCommand.framebuffer=e.framebuffer}tA.prototype.update=function(e,t){FSt(this,e,t),ISt(this,e,t)};var PSt=new se,XSt=new se(1,1/255,1/65025,1/16581375);tA.prototype.getDepth=function(e,t,n){if(!l(this.framebuffer))return;let i=e.readPixels({x:t,y:n,width:1,height:1,framebuffer:this.framebuffer}),o=se.unpack(i,0,PSt);return se.divideByScalar(o,255,o),se.dot(o,XSt)};tA.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)};tA.prototype.isDestroyed=function(){return!1};tA.prototype.destroy=function(){return this._framebuffer.destroy(),l(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=l(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy()),me(this)};var Ew=tA;var C$i=x(T(),1);var s7i=x(T(),1);function Nx(e){e=e||{},this._framebufferManager=new yi({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 si({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,Ke.RGBA);return this._framebufferManager.framebuffer&&(this._framebuffer=this._framebufferManager.framebuffer,this._colorTexture=l(i)?i:this._framebufferManager.getColorTexture(0),this._idTexture=this._framebufferManager.getColorTexture(1),this._depthTexture=this._framebufferManager.getColorTexture(2),this._depthStencilTexture=l(o)?o:this._framebufferManager.getDepthStencilTexture()),c};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,me(this)};var Gw=Nx;var l7i=x(T(),1);function NSt(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 Lw=NSt;var R7i=x(T(),1);var u7i=x(T(),1),Yx=`uniform highp sampler2D u_depthTexture;
in vec2 v_textureCoordinates;
void main()
{
out_FragColor = czm_packDepth(texture(u_depthTexture, v_textureCoordinates).r);
}
`;function m0(){this._picking=!1,this._numSamples=1,this._tempCopyDepthTexture=void 0,this._pickColorFramebuffer=new yi({depthStencil:!0,supportsDepthTexture:!0}),this._outputFramebuffer=new yi({depthStencil:!0,supportsDepthTexture:!0}),this._copyDepthFramebuffer=new yi,this._tempCopyDepthFramebuffer=new yi,this._updateDepthFramebuffer=new yi({createColorAttachments:!1,createDepthAttachments:!1,depthStencil:!0}),this._clearGlobeColorCommand=void 0,this._copyColorCommand=void 0,this._copyDepthCommand=void 0,this._tempCopyDepthCommand=void 0,this._updateDepthCommand=void 0,this._viewport=new Qe,this._rs=void 0,this._rsBlend=void 0,this._rsUpdate=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0,this._clearGlobeDepth=void 0}Object.defineProperties(m0.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 _Re(e,t,n,i,o){let r=e._viewport;r.width=n,r.height=i;let s=!Qe.equals(r,o.viewport),a=s!==e._useScissorTest;e._useScissorTest=s,Qe.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=Qe.clone(o.viewport,e._scissorRectangle),a=!0),(!l(e._rs)||!Qe.equals(r,e._rs.viewport)||a)&&(e._rs=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:tn.ALPHA_BLEND}),e._rsUpdate=De.fromCache({viewport:r,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:jn.EQUAL,frontOperation:{fail:Zt.KEEP,zFail:Zt.KEEP,zPass:Zt.KEEP},backFunction:jn.NEVER,reference:Ot.CESIUM_3D_TILE_MASK,mask:Ot.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(zd,{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(zd,{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 si({color:new U(0,0,0,0),stencil:0,owner:e})),e._clearGlobeColorCommand.framebuffer=e.framebuffer}m0.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),_Re(this,e,s,a,t),e.uniformState.globeDepthTexture=void 0,this._clearGlobeDepth=r};m0.prototype.prepareColorTextures=function(e,t){!this.picking&&this._numSamples>1&&this._outputFramebuffer.prepareTextures(e,t)};m0.prototype.executeCopyDepth=function(e,t){l(this._copyDepthCommand)&&(this.prepareColorTextures(e),this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._copyDepthFramebuffer.getColorTexture())};m0.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),_Re(this,e,s,a,t)}this._tempCopyDepthTexture=i,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t)};m0.prototype.executeCopyColor=function(e,t){l(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)};m0.prototype.clear=function(e,t,n){let i=this._clearGlobeColorCommand;l(i)&&(U.clone(n,i.color),this.colorFramebufferManager.clear(e,i,t))};m0.prototype.isDestroyed=function(){return!1};m0.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()),me(this)};var Ww=m0;var Y7i=x(T(),1);function nA(){this._framebuffer=new yi({depthStencil:!0,supportsDepthTexture:!0}),this._packedDepthFramebuffer=new yi,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new Qe,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}Object.defineProperties(nA.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 YSt(e){e._framebuffer.destroy(),e._packedDepthFramebuffer.destroy()}function wSt(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 MSt(e,t,n,i,o){e._viewport.width=n,e._viewport.height=i;let r=!Qe.equals(e._viewport,o.viewport),s=r!==e._useScissorTest;e._useScissorTest=r,Qe.equals(e._scissorRectangle,o.viewport)||(e._scissorRectangle=Qe.clone(o.viewport,e._scissorRectangle),s=!0),(!l(e._renderState)||!Qe.equals(e._viewport,e._renderState.viewport)||s)&&(e._renderState=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 si({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}nA.prototype.updateAndClear=function(e,t,n,i){let o=t.width,r=t.height;wSt(this,n,o,r,e),MSt(this,n,o,r,i),this._useHdr=e};nA.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)};nA.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this.packedDepthTexture};nA.prototype.isDestroyed=function(){return!1};nA.prototype.destroy=function(){return YSt(this),me(this)};var vw=nA;var a6i=x(T(),1);var M7i=x(T(),1),DR=`#ifdef MRT
layout (location = 0) out vec4 out_FragData_0;
layout (location = 1) out vec4 out_FragData_1;
#else
layout (location = 0) out vec4 out_FragColor;
#endif
uniform vec4 u_bgColor;
uniform sampler2D u_depthTexture;
in vec2 v_textureCoordinates;
void main()
{
if (texture(u_depthTexture, v_textureCoordinates).r < 1.0)
{
#ifdef MRT
out_FragData_0 = u_bgColor;
out_FragData_1 = vec4(u_bgColor.a);
#else
out_FragColor = u_bgColor;
#endif
return;
}
discard;
}
`;var U7i=x(T(),1),Fw=`/**
* Compositing for Weighted Blended Order-Independent Transparency. See:
* - http://jcgt.org/published/0002/02/09/
* - http://casual-effects.blogspot.com/2014/03/weighted-blended-order-independent.html
*/
uniform sampler2D u_opaque;
uniform sampler2D u_accumulation;
uniform sampler2D u_revealage;
in vec2 v_textureCoordinates;
void main()
{
vec4 opaque = texture(u_opaque, v_textureCoordinates);
vec4 accum = texture(u_accumulation, v_textureCoordinates);
float r = texture(u_revealage, v_textureCoordinates).r;
#ifdef MRT
vec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);
#else
vec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);
#endif
out_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;
if (opaque != czm_backgroundColor)
{
out_FragColor.a = 1.0;
}
}
`;function Sg(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 yi({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._alphaFBO=new yi({createColorAttachments:!1,createDepthAttachments:!1,depth:!0}),this._adjustTranslucentFBO=new yi({colorAttachmentsLength:this._translucentMRTSupport?2:1,createColorAttachments:!1}),this._adjustAlphaFBO=new yi({createColorAttachments:!1}),this._opaqueClearCommand=new si({color:new U(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new si({color:new U(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new si({color:new U(0,0,0,0),owner:this}),this._alphaClearCommand=new si({color:new U(1,1,1,1),owner:this}),this._translucentRenderStateCache={},this._alphaRenderStateCache={},this._compositeCommand=void 0,this._adjustTranslucentCommand=void 0,this._adjustAlphaCommand=void 0,this._viewport=new Qe,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function SRe(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function ree(e){e._translucentFBO.destroy(),e._alphaFBO.destroy(),e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO.destroy()}function ARe(e){SRe(e),ree(e)}function kSt(e,t,n,i){SRe(e),e._accumulationTexture=new Et({context:t,width:n,height:i,pixelFormat:Ke.RGBA,pixelDatatype:Oe.FLOAT}),e._revealageTexture=new Et({context:t,pixelFormat:Ke.RGBA,pixelDatatype:Oe.FLOAT,width:n,height:i,flipY:!1})}function USt(e,t){ree(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)&&(ree(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)&&(ARe(e),e._translucentMultipassSupport=!1,i=!1)}return i}Sg.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,kSt(this,e,r,s)),(!l(this._translucentFBO.framebuffer)||c||d)&&!USt(this,e))return;this._useHDR=i;let u=this,h,p;l(this._compositeCommand)||(h=new Be({sources:[Fw]}),this._translucentMRTSupport&&h.defines.push("MRT"),p={u_opaque:function(){return u._opaqueTexture},u_accumulation:function(){return u._accumulationTexture},u_revealage:function(){return u._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(h,{uniformMap:p,owner:this})),l(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(h=new Be({defines:["MRT"],sources:[DR]}),p={u_bgColor:function(){return u._translucentMRTClearCommand.color},u_depthTexture:function(){return u._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(h,{uniformMap:p,owner:this})):this._translucentMultipassSupport&&(h=new Be({sources:[DR]}),p={u_bgColor:function(){return u._translucentMultipassClearCommand.color},u_depthTexture:function(){return u._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(h,{uniformMap:p,owner:this}),p={u_bgColor:function(){return u._alphaClearCommand.color},u_depthTexture:function(){return u._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(h,{uniformMap:p,owner:this}))),this._viewport.width=r,this._viewport.height=s;let b=!Qe.equals(this._viewport,t.viewport),f=b!==this._useScissorTest;this._useScissorTest=b,Qe.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=Qe.clone(t.viewport,this._scissorRectangle),f=!0),(!l(this._rs)||!Qe.equals(this._viewport,this._rs.viewport)||f)&&(this._rs=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 DSt={enabled:!0,color:new U(0,0,0,0),equationRgb:_c.ADD,equationAlpha:_c.ADD,functionSourceRgb:Do.ONE,functionDestinationRgb:Do.ONE,functionSourceAlpha:Do.ZERO,functionDestinationAlpha:Do.ONE_MINUS_SOURCE_ALPHA},OSt={enabled:!0,color:new U(0,0,0,0),equationRgb:_c.ADD,equationAlpha:_c.ADD,functionSourceRgb:Do.ONE,functionDestinationRgb:Do.ONE,functionSourceAlpha:Do.ONE,functionDestinationAlpha:Do.ONE},BSt={enabled:!0,color:new U(0,0,0,0),equationRgb:_c.ADD,equationAlpha:_c.ADD,functionSourceRgb:Do.ZERO,functionDestinationRgb:Do.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:Do.ZERO,functionDestinationAlpha:Do.ONE_MINUS_SOURCE_ALPHA};function see(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 zSt(e,t,n){return see(t,DSt,e._translucentRenderStateCache,n)}function HSt(e,t,n){return see(t,OSt,e._translucentRenderStateCache,n)}function KSt(e,t,n){return see(t,BSt,e._alphaRenderStateCache,n)}var JSt=` vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a;
float ai = czm_out_FragColor.a;
float wzi = czm_alphaWeight(ai);
out_FragData_0 = vec4(Ci * wzi, ai);
out_FragData_1 = vec4(ai * wzi);
`,jSt=` vec3 Ci = czm_out_FragColor.rgb * czm_out_FragColor.a;
float ai = czm_out_FragColor.a;
float wzi = czm_alphaWeight(ai);
out_FragColor = vec4(Ci, ai) * wzi;
`,QSt=` float ai = czm_out_FragColor.a;
out_FragColor = vec4(ai);
`;function aee(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 Be.replaceMain(u,"czm_translucent_main").replace(/out_FragColor/g,"czm_out_FragColor").replace(/layout\s*\(location\s*=\s*0\)\s*out\s+vec4\s+out_FragColor;/g,"").replace(/\bdiscard\b/g,"czm_discard = true").replace(/czm_phong/g,"czm_translucentPhong")}),a.sources.splice(0,0,`#define CESIUM_REDIRECTED_COLOR_OUTPUT
vec4 czm_out_FragColor;
bool czm_discard = false;
`);let c=[...i.matchAll(/out_FragData_(\d+)/g)],d="";for(let u=0;u<c.length;u++){let h=c[u];d=`layout (location = ${h[1]}) out vec4 ${h[0]};
${d}`}return a.sources.push(d),a.sources.push(`void main()
{
czm_translucent_main();
if (czm_discard)
{
discard;
}
${i}}
`),o.createDerivedShaderProgram(t,n,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:a,attributeLocations:s})}function qSt(e,t){return aee(e,t,"translucentMRT",JSt)}function $St(e,t){return aee(e,t,"translucentMultipass",jSt)}function eAt(e,t){return aee(e,t,"alphaMultipass",QSt)}Sg.prototype.createDerivedCommands=function(e,t,n){if(l(n)||(n={}),this._translucentMRTSupport){let a,c;return l(n.translucentCommand)&&(a=n.translucentCommand.shaderProgram,c=n.translucentCommand.renderState),n.translucentCommand=et.shallowClone(e,n.translucentCommand),!l(a)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=qSt(t,e.shaderProgram),n.translucentCommand.renderState=zSt(this,t,e.renderState),n.shaderProgramId=e.shaderProgram.id):(n.translucentCommand.shaderProgram=a,n.translucentCommand.renderState=c),n}let i,o,r,s;return l(n.translucentCommand)&&(i=n.translucentCommand.shaderProgram,o=n.translucentCommand.renderState,r=n.alphaCommand.shaderProgram,s=n.alphaCommand.renderState),n.translucentCommand=et.shallowClone(e,n.translucentCommand),n.alphaCommand=et.shallowClone(e,n.alphaCommand),!l(i)||n.shaderProgramId!==e.shaderProgram.id?(n.translucentCommand.shaderProgram=$St(t,e.shaderProgram),n.translucentCommand.renderState=HSt(this,t,e.renderState),n.alphaCommand.shaderProgram=eAt(t,e.shaderProgram),n.alphaCommand.renderState=KSt(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 tAt(e,t,n,i,o,r){let{context:s,frameState:a}=t,{useLogDepth:c,shadowState:d}=a,u=t._hdr,h=i.framebuffer,p=d.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(s,i),i.framebuffer=e._adjustAlphaFBO.framebuffer,e._adjustAlphaCommand.execute(s,i);let b=e._opaqueFBO.framebuffer;i.framebuffer=e._translucentFBO.framebuffer;for(let f=0;f<o.length;++f){let y=o[f];y=c?y.derivedCommands.logDepth.command:y,y=u?y.derivedCommands.hdr.command:y;let _=p&&y.receiveShadows?y.derivedCommands.oit.shadows.translucentCommand:y.derivedCommands.oit.translucentCommand;n(_,t,i,b)}if(l(r)){let f=r.unclassifiedCommand,y=p&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand;n(y,t,i,b)}i.framebuffer=e._alphaFBO.framebuffer;for(let f=0;f<o.length;++f){let y=o[f];y=c?y.derivedCommands.logDepth.command:y,y=u?y.derivedCommands.hdr.command:y;let _=p&&y.receiveShadows?y.derivedCommands.oit.shadows.alphaCommand:y.derivedCommands.oit.alphaCommand;n(_,t,i,b)}if(l(r)){let f=r.unclassifiedCommand,y=p&&f.receiveShadows?f.derivedCommands.oit.shadows.alphaCommand:f.derivedCommands.oit.alphaCommand;n(y,t,i,b)}i.framebuffer=h}function nAt(e,t,n,i,o,r){let{context:s,frameState:a}=t,{useLogDepth:c,shadowState:d}=a,u=t._hdr,h=i.framebuffer,p=d.lightShadowsEnabled;i.framebuffer=e._adjustTranslucentFBO.framebuffer,e._adjustTranslucentCommand.execute(s,i);let b=e._opaqueFBO.framebuffer;i.framebuffer=e._translucentFBO.framebuffer;for(let f=0;f<o.length;++f){let y=o[f];y=c?y.derivedCommands.logDepth.command:y,y=u?y.derivedCommands.hdr.command:y;let _=p&&y.receiveShadows?y.derivedCommands.oit.shadows.translucentCommand:y.derivedCommands.oit.translucentCommand;n(_,t,i,b)}if(l(r)){let f=r.unclassifiedCommand,y=p&&f.receiveShadows?f.derivedCommands.oit.shadows.translucentCommand:f.derivedCommands.oit.translucentCommand;n(y,t,i,b)}i.framebuffer=h}Sg.prototype.executeCommands=function(e,t,n,i,o){if(this._translucentMRTSupport){nAt(this,e,t,n,i,o);return}tAt(this,e,t,n,i,o)};Sg.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)};Sg.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};Sg.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport};Sg.prototype.isDestroyed=function(){return!1};Sg.prototype.destroy=function(){return ARe(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()),me(this)};var Iw=Sg;var h6i=x(T(),1);function Pw(){this._framebuffer=new yi({color:!1,depthStencil:!0,supportsDepthTexture:!0}),this._passState=void 0}Object.defineProperties(Pw.prototype,{framebuffer:{get:function(){return this._framebuffer.framebuffer}}});function iAt(e){e._framebuffer.destroy()}function oAt(e,t){let n=t.drawingBufferWidth,i=t.drawingBufferHeight;e._framebuffer.update(t,n,i);let o=new Dc(t);o.blendingEnabled=!1,o.scissorTest={enabled:!0,rectangle:new Qe},o.viewport=new Qe,e._passState=o}Pw.prototype.update=function(e,t,n){let i=n.width,o=n.height;this._framebuffer.isDirty(i,o)&&oAt(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};Pw.prototype.isDestroyed=function(){return!1};Pw.prototype.destroy=function(){return iAt(this),me(this)};var Xw=Pw;var C6i=x(T(),1);function iA(e){let t=new Dc(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new Qe},t.viewport=new Qe,this._context=e,this._fb=new yi({depthStencil:!0}),this._passState=t,this._width=0,this._height=0}function ZRe(e,t,n,i,o=1){let r=Math.max(n,i),s=r*r,a=Math.floor(n*.5),c=Math.floor(i*.5),d=0,u=0,h=0,p=-1,b=new Set;for(let f=0;f<s;++f){if(-a<=d&&d<=a&&-c<=u&&u<=c){let y=4*((c-u)*n+d+a),_=U.bytesToRgba(t[y],t[y+1],t[y+2],t[y+3]),S=e.getObjectByPickColor(_);if(l(S)&&(b.add(S),b.size>=o))break}if(d===u||d<0&&-d===u||d>0&&d===1-u){let y=h;h=-p,p=y}d+=h,u+=p}return[...b]}iA.prototype.begin=function(e,t){let n=this._context,{width:i,height:o}=t;return Qe.clone(e,this._passState.scissorTest.rectangle),this._width=i,this._height=o,this._fb.update(n,i,o),this._passState.framebuffer=this._fb.framebuffer,this._passState.viewport.width=i,this._passState.viewport.height=o,this._passState};iA.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=Ke.RGBA;l(s)&&s.numberOfColorAttachments>0&&(a=s.getColorTexture(0).pixelDatatype,c=s.getColorTexture(0).pixelFormat);let d=r.readPixelsToPBO({x:e.x,y:e.y,width:i,height:o,framebuffer:s}),u=nW.create({context:r});try{await u.waitForSignal(b=>t.afterRender.push(b));let h=Ke.createTypedArray(c,a,i,o);return d.getBufferData(h),ZRe(r,h,i,o,n)}catch{throw new le("Async Picking Request Timeout")}finally{u.destroy(),d.destroy()}};iA.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 ZRe(o,r,n,i,t)};iA.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)};iA.prototype.isDestroyed=function(){return!1};iA.prototype.destroy=function(){return this._fb.destroy(),me(this)};var Nw=iA;var v6i=x(T(),1);function Ag(){this._numSamples=1,this._colorFramebuffer=new yi({depthStencil:!0,supportsDepthTexture:!0}),this._idFramebuffer=new yi({depthStencil:!0,supportsDepthTexture:!0}),this._idClearColor=new U(0,0,0,0),this._clearCommand=new si({color:new U(0,0,0,0),depth:1,owner:this})}function rAt(e){e._colorFramebuffer.destroy(),e._idFramebuffer.destroy()}Object.defineProperties(Ag.prototype,{framebuffer:{get:function(){return this._colorFramebuffer.framebuffer}},idFramebuffer:{get:function(){return this._idFramebuffer.framebuffer}},depthStencilTexture:{get:function(){return this._colorFramebuffer.getDepthStencilTexture()}}});Ag.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)};Ag.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)};Ag.prototype.getFramebuffer=function(){return this._colorFramebuffer.framebuffer};Ag.prototype.getIdFramebuffer=function(){return this._idFramebuffer.framebuffer};Ag.prototype.prepareColorTextures=function(e){this._numSamples>1&&this._colorFramebuffer.prepareTextures(e)};Ag.prototype.isDestroyed=function(){return!1};Ag.prototype.destroy=function(){return rAt(this),me(this)};var oA=Ag;var Gqi=x(T(),1);var X6i=x(T(),1);function rA(){}rA.getShadowCastShaderKeyword=function(e,t,n,i){return`castShadow ${e} ${t} ${n} ${i}`};rA.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=Be.findPositionVarying(e),s=l(r);if(t&&!s){let a=o.length;for(let d=0;d<a;++d)o[d]=Be.replaceMain(o[d],"czm_shadow_cast_main");o.push(`out vec3 v_positionEC;
void main()
{
czm_shadow_cast_main();
v_positionEC = (czm_inverseProjection * gl_Position).xyz;
}`)}return new Be({defines:i,sources:o})};rA.createShadowCastFragmentShader=function(e,t,n,i){let o=e.defines.slice(0),r=e.sources.slice(0);o.push("SHADOW_MAP");let s=Be.findPositionVarying(e),a=l(s);a||(s="v_positionEC");let c=r.length;for(let u=0;u<c;++u)r[u]=Be.replaceMain(r[u],"czm_shadow_cast_main");let d="";return t&&(a||(d+=`in vec3 v_positionEC;
`),d+=`uniform vec4 shadowMap_lightPositionEC;
`),i?d+=`void main()
{
`:d+=`void main()
{
czm_shadow_cast_main();
if (out_FragColor.a == 0.0)
{
discard;
}
`,t?d+=` float distance = length(${s});
if (distance >= shadowMap_lightPositionEC.w)
{
discard;
}
distance /= shadowMap_lightPositionEC.w; // radius
out_FragColor = czm_packDepth(distance);
`:n?d+=` out_FragColor = vec4(1.0);
`:d+=` out_FragColor = czm_packDepth(gl_FragCoord.z);
`,d+=`}
`,r.push(d),new Be({defines:o,sources:r})};rA.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}`};rA.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 Be({defines:i,sources:o})};rA.createShadowReceiveFragmentShader=function(e,t,n,i,o){let r=Be.findNormalVarying(e),s=!i&&l(r)||i&&o,a=Be.findPositionVarying(e),c=l(a),d=t._usesDepthTexture,u=t._polygonOffsetSupported,h=t._isPointLight,p=t._isSpotLight,b=t._numberOfCascades>1,f=t.debugCascadeColors,y=t.softShadows,_=h?t._pointBias:i?t._terrainBias:t._primitiveBias,S=e.defines.slice(0),A=e.sources.slice(0),Z=A.length;for(let L=0;L<Z;++L)A[L]=Be.replaceMain(A[L],"czm_shadow_receive_main");h?S.push("USE_CUBE_MAP_SHADOW"):d&&S.push("USE_SHADOW_DEPTH_TEXTURE"),y&&!h&&S.push("USE_SOFT_SHADOWS"),b&&n&&i&&(s?S.push("ENABLE_VERTEX_LIGHTING"):S.push("ENABLE_DAYNIGHT_SHADING")),n&&_.normalShading&&s&&(S.push("USE_NORMAL_SHADING"),_.normalShadingSmooth>0&&S.push("USE_NORMAL_SHADING_SMOOTH"));let V="";h?V+=`uniform samplerCube shadowMap_textureCube;
`:V+=`uniform sampler2D shadowMap_texture;
`;let E;return c?E=` return vec4(${a}, 1.0);
`:E=`#ifndef LOG_DEPTH
return czm_windowToEyeCoordinates(gl_FragCoord);
#else
return vec4(v_logPositionEC, 1.0);
#endif
`,V+=`uniform mat4 shadowMap_matrix;
uniform vec3 shadowMap_lightDirectionEC;
uniform vec4 shadowMap_lightPositionEC;
uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;
uniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;
#ifdef LOG_DEPTH
in vec3 v_logPositionEC;
#endif
vec4 getPositionEC()
{
${E}}
vec3 getNormalEC()
{
${s?` return normalize(${r});
`:` return vec3(1.0);
`}}
void applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL)
{
${_.normalOffset&&s?` float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x;
float normalOffsetScale = 1.0 - nDotL;
vec3 offset = normalOffset * normalOffsetScale * normalEC;
positionEC.xyz += offset;
`:""}}
`,V+=`void main()
{
czm_shadow_receive_main();
vec4 positionEC = getPositionEC();
vec3 normalEC = getNormalEC();
float depth = -positionEC.z;
`,V+=` czm_shadowParameters shadowParameters;
shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;
shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;
shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;
shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;
`,i?V+=` shadowParameters.depthBias *= max(depth * 0.01, 1.0);
`:u||(V+=` shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015);
`),h?V+=` vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz;
float distance = length(directionEC);
directionEC = normalize(directionEC);
float radius = shadowMap_lightPositionEC.w;
// Stop early if the fragment is beyond the point light radius
if (distance > radius)
{
return;
}
vec3 directionWC = czm_inverseViewRotation * directionEC;
shadowParameters.depth = distance / radius;
shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);
shadowParameters.texCoords = directionWC;
float visibility = czm_shadowVisibility(shadowMap_textureCube, shadowParameters);
`:p?V+=` vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);
float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);
applyNormalOffset(positionEC, normalEC, nDotL);
vec4 shadowPosition = shadowMap_matrix * positionEC;
// Spot light uses a perspective projection, so perform the perspective divide
shadowPosition /= shadowPosition.w;
// Stop early if the fragment is not in the shadow bounds
if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))
{
return;
}
shadowParameters.texCoords = shadowPosition.xy;
shadowParameters.depth = shadowPosition.z;
shadowParameters.nDotL = nDotL;
float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters);
`:b?V+=` float maxDepth = shadowMap_cascadeSplits[1].w;
// Stop early if the eye depth exceeds the last cascade
if (depth > maxDepth)
{
return;
}
// Get the cascade based on the eye-space depth
vec4 weights = czm_cascadeWeights(depth);
// Apply normal offset
float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);
applyNormalOffset(positionEC, normalEC, nDotL);
// Transform position into the cascade
vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC;
// Get visibility
shadowParameters.texCoords = shadowPosition.xy;
shadowParameters.depth = shadowPosition.z;
shadowParameters.nDotL = nDotL;
float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters);
// Fade out shadows that are far away
float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z;
float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0);
visibility = mix(visibility, 1.0, fade);
${f?` // Draw cascade colors for debugging
out_FragColor *= czm_cascadeColor(weights);
`:""}`:V+=` float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0);
applyNormalOffset(positionEC, normalEC, nDotL);
vec4 shadowPosition = shadowMap_matrix * positionEC;
// Stop early if the fragment is not in the shadow bounds
if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0))))
{
return;
}
shadowParameters.texCoords = shadowPosition.xy;
shadowParameters.depth = shadowPosition.z;
shadowParameters.nDotL = nDotL;
float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters);
`,V+=` out_FragColor.rgb *= visibility;
}
`,A.push(V),new Be({defines:S,sources:A})};var h0=rA;function f0(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;(an.isEdge()||(an.isChrome()||an.isFirefox())&&an.isWindows()&&!t.depthTexture)&&(n=!1),this._polygonOffsetSupported=n,this._terrainBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.5,normalShading:!0,normalShadingSmooth:.3,depthBias:1e-4},this._primitiveBias={polygonOffset:n,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:.1,normalShading:!0,normalShadingSmooth:.05,depthBias:2e-5},this._pointBias={polygonOffset:!1,polygonOffsetFactor:1.1,polygonOffsetUnits:4,normalOffset:this._normalOffset,normalOffsetScale:0,normalShading:!0,normalShadingSmooth:.1,depthBias:5e-4},this._depthAttachment=void 0,this._colorAttachment=void 0,this._shadowMapMatrix=new F,this._shadowMapTexture=void 0,this._lightDirectionEC=new m,this._lightPositionEC=new se,this._distance=0,this._lightCamera=e.lightCamera,this._shadowMapCamera=new w3,this._shadowMapCullingVolume=void 0,this._sceneCamera=void 0,this._boundingSphere=new de,this._isPointLight=e.isPointLight??!1,this._pointLightRadius=e.pointLightRadius??100,this._cascadesEnabled=this._isPointLight?!1:e.cascadesEnabled??!0,this._numberOfCascades=this._cascadesEnabled?e.numberOfCascades??4:0,this._fitNearFar=!0,this._maximumCascadeDistances=[25,150,700,Number.MAX_VALUE],this._textureSize=new M,this._isSpotLight=!1,this._cascadesEnabled?this._shadowMapCamera.frustum=new rs:l(this._lightCamera.frustum.fov)&&(this._isSpotLight=!0),this._cascadeSplits=[new se,new se],this._cascadeMatrices=[new F,new F,new F,new F],this._cascadeDistances=new se;let i;this._isPointLight?i=6:this._cascadesEnabled?i=this._numberOfCascades:i=1,this._passes=new Array(i);for(let o=0;o<i;++o)this._passes[o]=new sAt(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,lee(this),this._clearCommand=new si({depth:1,color:new U}),this._clearPassState=new Dc(t),this._size=e.size??2048,this.size=this._size}f0.MAXIMUM_DISTANCE=2e4;function sAt(e){this.camera=new w3,this.passState=new Dc(e),this.framebuffer=void 0,this.textureOffsets=void 0,this.commandList=[],this.cullingVolume=void 0}function cee(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 lee(e){let t=!e._usesDepthTexture;e._primitiveRenderState=cee(t,e._primitiveBias),e._terrainRenderState=cee(t,e._terrainBias),e._pointRenderState=cee(t,e._pointBias)}f0.prototype.debugCreateRenderStates=function(){lee(this)};Object.defineProperties(f0.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){mAt(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 dee(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 aAt(e,t){let n=new ru({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Cl.DEPTH_COMPONENT16}),i=new Et({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Ke.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,sampler:Ut.NEAREST}),o=new os({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 cAt(e,t){let n=new Et({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Ke.DEPTH_STENCIL,pixelDatatype:Oe.UNSIGNED_INT_24_8,sampler:Ut.NEAREST}),i=new os({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 lAt(e,t){let n=new ru({context:t,width:e._textureSize.x,height:e._textureSize.y,format:Cl.DEPTH_COMPONENT16}),i=new Br({context:t,width:e._textureSize.x,height:e._textureSize.y,pixelFormat:Ke.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,sampler:Ut.NEAREST}),o=[i.negativeX,i.negativeY,i.negativeZ,i.positiveX,i.positiveY,i.positiveZ];for(let r=0;r<6;++r){let s=new os({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 RRe(e,t){e._isPointLight?lAt(e,t):e._usesDepthTexture?cAt(e,t):aAt(e,t)}function dAt(e,t){e._usesDepthTexture&&e._passes[0].framebuffer.status!==ne.FRAMEBUFFER_COMPLETE&&(e._usesDepthTexture=!1,lee(e),dee(e),RRe(e,t))}function uAt(e,t){(!l(e._passes[0].framebuffer)||e._shadowMapTexture.width!==e._textureSize.x)&&(dee(e),RRe(e,t),dAt(e,t),ERe(e,t))}function ERe(e,t,n){n=n??0,(e._isPointLight||n===0)&&(e._clearCommand.framebuffer=e._passes[n].framebuffer,e._clearCommand.execute(t,e._clearPassState))}function mAt(e,t){e._size=t;let n=e._passes,i=n.length,o=e._textureSize;if(e._isPointLight){t=Lt.maximumCubeMapSize>=t?t:Lt.maximumCubeMapSize,o.x=t,o.y=t;let r=new Qe(0,0,t,t);n[0].passState.viewport=r,n[1].passState.viewport=r,n[2].passState.viewport=r,n[3].passState.viewport=r,n[4].passState.viewport=r,n[5].passState.viewport=r}else i===1?(t=Lt.maximumTextureSize>=t?t:Lt.maximumTextureSize,o.x=t,o.y=t,n[0].passState.viewport=new Qe(0,0,t,t)):i===4&&(t=Lt.maximumTextureSize>=t*2?t:Lt.maximumTextureSize/2,o.x=t*2,o.y=t*2,n[0].passState.viewport=new Qe(0,0,t,t),n[1].passState.viewport=new Qe(t,0,t,t),n[2].passState.viewport=new Qe(0,t,t,t),n[3].passState.viewport=new Qe(t,t,t,t));e._clearPassState.viewport=new Qe(0,0,o.x,o.y);for(let r=0;r<i;++r){let s=n[r],a=s.passState.viewport,c=a.x/o.x,d=a.y/o.y,u=a.width/o.x,h=a.height/o.y;s.textureOffsets=new F(u,0,0,c,0,h,0,d,0,0,1,0,0,0,0,1)}}var hAt=new Qe;function fAt(e,t){let n;e._isPointLight?n=`uniform samplerCube shadowMap_textureCube;
in vec2 v_textureCoordinates;
void main()
{
vec2 uv = v_textureCoordinates;
vec3 dir;
if (uv.y < 0.5)
{
if (uv.x < 0.333)
{
dir.x = -1.0;
dir.y = uv.x * 6.0 - 1.0;
dir.z = uv.y * 4.0 - 1.0;
}
else if (uv.x < 0.666)
{
dir.y = -1.0;
dir.x = uv.x * 6.0 - 3.0;
dir.z = uv.y * 4.0 - 1.0;
}
else
{
dir.z = -1.0;
dir.x = uv.x * 6.0 - 5.0;
dir.y = uv.y * 4.0 - 1.0;
}
}
else
{
if (uv.x < 0.333)
{
dir.x = 1.0;
dir.y = uv.x * 6.0 - 1.0;
dir.z = uv.y * 4.0 - 3.0;
}
else if (uv.x < 0.666)
{
dir.y = 1.0;
dir.x = uv.x * 6.0 - 3.0;
dir.z = uv.y * 4.0 - 3.0;
}
else
{
dir.z = 1.0;
dir.x = uv.x * 6.0 - 5.0;
dir.y = uv.y * 4.0 - 3.0;
}
}
float shadow = czm_unpackDepth(czm_textureCube(shadowMap_textureCube, dir));
out_FragColor = vec4(vec3(shadow), 1.0);
}
`:n=`uniform sampler2D shadowMap_texture;
in vec2 v_textureCoordinates;
void main()
{
${e._usesDepthTexture?` float shadow = texture(shadowMap_texture, v_textureCoordinates).r;
`:` float shadow = czm_unpackDepth(texture(shadowMap_texture, v_textureCoordinates));
`} out_FragColor = vec4(vec3(shadow), 1.0);
}
`;let i=t.createViewportQuadCommand(n,{uniformMap:{shadowMap_texture:function(){return e._shadowMapTexture},shadowMap_textureCube:function(){return e._shadowMapTexture}}});return i.pass=Le.OVERLAY,i}function pAt(e,t){let n=t.context,i=t.context.drawingBufferWidth,o=t.context.drawingBufferHeight,r=Math.min(i,o)*.3,s=hAt;s.x=i-r,s.y=0,s.width=r,s.height=r;let a=e._debugShadowViewCommand;l(a)||(a=fAt(e,n),e._debugShadowViewCommand=a),(!l(a.renderState)||!Qe.equals(a.renderState.viewport,s))&&(a.renderState=De.fromCache({viewport:Qe.clone(s)})),t.commandList.push(e._debugShadowViewCommand)}var p0=new Array(8);p0[0]=new se(-1,-1,-1,1);p0[1]=new se(1,-1,-1,1);p0[2]=new se(1,1,-1,1);p0[3]=new se(-1,1,-1,1);p0[4]=new se(-1,-1,1,1);p0[5]=new se(1,-1,1,1);p0[6]=new se(1,1,1,1);p0[7]=new se(-1,1,1,1);var wx=new F,uee=new Array(8);for(let e=0;e<8;++e)uee[e]=new se;function bAt(e,t){let n=new Wt({geometry:new Ih({minimum:new m(-.5,-.5,-.5),maximum:new m(.5,.5,.5)}),attributes:{color:Ht.fromColor(t)}}),i=new Wt({geometry:new Db({radius:.5}),attributes:{color:Ht.fromColor(t)}});return new Ln({geometryInstances:[n,i],appearance:new hn({translucent:!1,flat:!0}),asynchronous:!1,modelMatrix:e})}var gAt=[U.RED,U.GREEN,U.BLUE,U.MAGENTA],yAt=new m;function xAt(e,t){pAt(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 l0({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 l0({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 l0({camera:e._passes[i].camera,color:gAt[i],updateOnChange:!1})),e._debugCascadeFrustums[i].update(t)}}else if(e._isPointLight){if(!l(e._debugLightFrustum)||e._needsUpdate){let i=e._shadowMapCamera.positionWC,o=Pe.IDENTITY,r=e._pointLightRadius*2,s=m.fromElements(r,r,r,yAt),a=F.fromTranslationQuaternionRotationScale(i,o,s,wx);e._debugLightFrustum=e._debugLightFrustum&&e._debugLightFrustum.destroy(),e._debugLightFrustum=bAt(a,U.YELLOW)}e._debugLightFrustum.update(t)}else(!l(e._debugLightFrustum)||e._needsUpdate)&&(e._debugLightFrustum=new l0({camera:e._shadowMapCamera,color:U.YELLOW,updateOnChange:!1})),e._debugLightFrustum.update(t)}function w3(){this.viewMatrix=new F,this.inverseViewMatrix=new F,this.frustum=void 0,this.positionCartographic=new pe,this.positionWC=new m,this.directionWC=m.clone(m.UNIT_Z),this.upWC=m.clone(m.UNIT_Y),this.rightWC=m.clone(m.UNIT_X),this.viewProjectionMatrix=new F}w3.prototype.clone=function(e){F.clone(e.viewMatrix,this.viewMatrix),F.clone(e.inverseViewMatrix,this.inverseViewMatrix),this.frustum=e.frustum.clone(this.frustum),pe.clone(e.positionCartographic,this.positionCartographic),m.clone(e.positionWC,this.positionWC),m.clone(e.directionWC,this.directionWC),m.clone(e.upWC,this.upWC),m.clone(e.rightWC,this.rightWC)};var TAt=new F(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);w3.prototype.getViewProjection=function(){let e=this.viewMatrix,t=this.frustum.projectionMatrix;return F.multiply(t,e,this.viewProjectionMatrix),F.multiply(TAt,this.viewProjectionMatrix,this.viewProjectionMatrix),this.viewProjectionMatrix};var _At=new Array(5),SAt=new Mi,AAt=new Array(4),GRe=new m,LRe=new m;function ZAt(e,t){let n=e._shadowMapCamera,i=e._sceneCamera,o=i.frustum.near,r=i.frustum.far,s=e._numberOfCascades,a,c=r-o,d=r/o,u=.9,h=!1;t.shadowState.closestObjectSize<200&&(h=!0,u=.9);let p=AAt,b=_At;for(b[0]=o,b[s]=r,a=0;a<s;++a){let N=(a+1)/s,g=o*Math.pow(d,N),C=o+c*N,R=W.lerp(C,g,u);b[a+1]=R,p[a]=R-b[a]}if(h){for(a=0;a<s;++a)p[a]=Math.min(p[a],e._maximumCascadeDistances[a]);let N=b[0];for(a=0;a<s-1;++a)N+=p[a],b[a+1]=N}se.unpack(b,0,e._cascadeSplits[0]),se.unpack(b,1,e._cascadeSplits[1]),se.unpack(p,0,e._cascadeDistances);let f=n.frustum,y=f.left,_=f.right,S=f.bottom,A=f.top,Z=f.near,V=f.far,E=n.positionWC,L=n.directionWC,v=n.upWC,I=i.frustum.clone(SAt),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),C=F.multiply(X,g,wx),R=m.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,GRe),G=m.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,LRe);for(let D=0;D<8;++D){let w=se.clone(p0[D],uee[D]);F.multiplyByVector(C,w,w),m.divideByScalar(w,w.w,w),m.minimumByComponent(w,R,R),m.maximumByComponent(w,G,G)}R.x=Math.max(R.x,0),R.y=Math.max(R.y,0),R.z=0,G.x=Math.min(G.x,1),G.y=Math.min(G.y,1),G.z=Math.min(G.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+G.x*(_-y),O.bottom=S+R.y*(A-S),O.top=S+G.y*(A-S),O.near=Z+R.z*(V-Z),O.far=Z+G.z*(V-Z),P.cullingVolume=Y.frustum.computeCullingVolume(E,L,v);let k=e._cascadeMatrices[a];F.multiply(Y.getViewProjection(),i.inverseViewMatrix,k),F.multiply(P.textureOffsets,k,k)}}var CAt=new F,VAt=new m,RAt=new m,CRe=new m;function EAt(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;m.equalsEpsilon(s,a,W.EPSILON10)&&(a=i.upWC);let c=m.cross(s,a,VAt);a=m.cross(c,s,RAt),m.normalize(a,a),m.normalize(c,c);let d=m.fromElements(0,0,0,CRe),u=F.computeView(d,s,a,c,CAt),h=F.multiply(u,r,wx),p=m.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,GRe),b=m.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,LRe);for(let V=0;V<8;++V){let E=se.clone(p0[V],uee[V]);F.multiplyByVector(h,E,E),m.divideByScalar(E,E.w,E),m.minimumByComponent(E,p,p),m.maximumByComponent(E,b,b)}b.z+=1e3,p.z-=10;let f=CRe;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,Z=n.frustum;Z.left=-_,Z.right=_,Z.bottom=-S,Z.top=S,Z.near=.01,Z.far=A,F.clone(u,n.viewMatrix),F.inverse(u,n.inverseViewMatrix),F.getTranslation(n.inverseViewMatrix,n.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(n.positionWC,n.positionCartographic),m.clone(s,n.directionWC),m.clone(a,n.upWC),m.clone(c,n.rightWC)}var GAt=[new m(-1,0,0),new m(0,-1,0),new m(0,0,-1),new m(1,0,0),new m(0,1,0),new m(0,0,1)],LAt=[new m(0,-1,0),new m(0,0,-1),new m(0,-1,0),new m(0,-1,0),new m(0,0,1),new m(0,-1,0)],WAt=[new m(0,0,1),new m(1,0,0),new m(-1,0,0),new m(0,0,-1),new m(1,0,0),new m(1,0,0)];function vAt(e,t){let n=new Mi;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=GAt[i],o.upWC=LAt[i],o.rightWC=WAt[i],F.computeView(o.positionWC,o.directionWC,o.upWC,o.rightWC,o.viewMatrix),F.inverse(o.viewMatrix,o.inverseViewMatrix),o.frustum=n}}var FAt=new m,IAt=new m,WRe=new de,VRe=WRe.center;function PAt(e,t){let n=e._sceneCamera,i=e._shadowMapCamera,o=WRe;if(e._cascadesEnabled){if(n.frustum.near>=e.maximumDistance){e._outOfView=!0,e._needsUpdate=!1;return}let r=t.mapProjection.ellipsoid.geodeticSurfaceNormal(n.positionWC,FAt),s=m.negate(i.directionWC,IAt),a=m.dot(r,s);if(e.fadingEnabled){let c=W.clamp(a/.1,0,1);e._darkness=W.lerp(1,e.darkness,c)}else e._darkness=e.darkness;if(a<0){e._outOfView=!0,e._needsUpdate=!1;return}e._needsUpdate=!0,e._outOfView=!1}else if(e._isPointLight)o.center=i.positionWC,o.radius=e._pointLightRadius,e._outOfView=t.cullingVolume.computeVisibility(o)===zt.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),de.clone(o,e._boundingSphere);else{let r=i.frustum.far/2,s=m.add(i.positionWC,m.multiplyByScalar(i.directionWC,r,VRe),VRe);o.center=s,o.radius=r,e._outOfView=t.cullingVolume.computeVisibility(o)===zt.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(o),de.clone(o,e._boundingSphere)}}function XAt(e,t){let n=t.camera,i=e._lightCamera,o=e._sceneCamera,r=e._shadowMapCamera;e._cascadesEnabled?m.clone(i.directionWC,r.directionWC):e._isPointLight?m.clone(i.positionWC,r.positionWC):r.clone(i);let s=e._lightDirectionEC;F.multiplyByPointAsVector(n.viewMatrix,r.directionWC,s),m.normalize(s,s),m.negate(s,s),F.multiplyByPoint(n.viewMatrix,r.positionWC,e._lightPositionEC),e._lightPositionEC.w=e._pointLightRadius;let a,c;e._fitNearFar?(a=Math.min(t.shadowState.nearPlane,e.maximumDistance),c=Math.min(t.shadowState.farPlane,e.maximumDistance),c=Math.max(c,a+1)):(a=n.frustum.near,c=e.maximumDistance),e._sceneCamera=To.clone(n,o),n.frustum.clone(e._sceneCamera.frustum),e._sceneCamera.frustum.near=a,e._sceneCamera.frustum.far=c,e._distance=c-a,PAt(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}f0.prototype.update=function(e){if(XAt(this,e),this._needsUpdate)if(uAt(this,e.context),this._isPointLight&&vAt(this,e),this._cascadesEnabled&&(EAt(this,e),this._numberOfCascades>1&&ZAt(this,e)),this._isPointLight)this._shadowMapCullingVolume=Os.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&&xAt(this,e)};f0.prototype.updatePass=function(e,t){ERe(this,e,t)};var NAt=new M;function vRe(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=NAt;return r.x=1/e._textureSize.x,r.y=1/e._textureSize.y,se.fromElements(r.x,r.y,i.depthBias,i.normalShadingSmooth,this.combinedUniforms1)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:function(){return se.fromElements(i.normalOffsetScale,e._distance,e.maximumDistance,e._darkness,this.combinedUniforms2)},combinedUniforms1:new se,combinedUniforms2:new se};return Rt(t,o,!1)}function YAt(e,t,n,i,o,r){let s,a,c;if(l(r)&&(s=r.shaderProgram,a=r.renderState,c=r.uniformMap),r=et.shallowClone(n,r),r.castShadows=!0,r.receiveShadows=!1,!l(s)||o!==n.shaderProgram.id||t){let d=n.shaderProgram,u=n.pass===Le.GLOBE,h=n.pass!==Le.TRANSLUCENT,p=e._isPointLight,b=e._usesDepthTexture,f=h0.getShadowCastShaderKeyword(p,u,b,h);if(s=i.shaderCache.getDerivedShaderProgram(d,f),!l(s)){let _=d.vertexShaderSource,S=d.fragmentShaderSource,A=h0.createShadowCastVertexShader(_,p,u),Z=h0.createShadowCastFragmentShader(S,p,b,h);s=i.shaderCache.createDerivedShaderProgram(d,f,{vertexShaderSource:A,fragmentShaderSource:Z,attributeLocations:d._attributeLocations})}a=e._primitiveRenderState,p?a=e._pointRenderState:u&&(a=e._terrainRenderState),n.renderState.cull.enabled||(a=ze(a,!1),a.cull=ze(a.cull,!1),a.cull.enabled=!1,a=De.fromCache(a)),c=vRe(e,n.uniformMap,u)}return r.shaderProgram=s,r.renderState=a,r.uniformMap=c,r}f0.createReceiveDerivedCommand=function(e,t,n,i,o){l(o)||(o={});let r=e.length>0,s=t.shaderProgram,a=s.vertexShaderSource,c=s.fragmentShaderSource,d=t.pass===Le.GLOBE,u=!1;if(d&&(u=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&r){let h,p;l(o.receiveCommand)&&(h=o.receiveCommand.shaderProgram,p=o.receiveCommand.uniformMap),o.receiveCommand=et.shallowClone(t,o.receiveCommand),o.castShadows=!1,o.receiveShadows=!0;let b=o.receiveShaderCastShadows!==t.castShadows,f=o.receiveShaderProgramId!==t.shaderProgram.id;if(!l(h)||f||n||b){let y=h0.getShadowReceiveShaderKeyword(e[0],t.castShadows,d,u);if(h=i.shaderCache.getDerivedShaderProgram(s,y),!l(h)){let _=h0.createShadowReceiveVertexShader(a,d,u),S=h0.createShadowReceiveFragmentShader(c,e[0],t.castShadows,d,u);h=i.shaderCache.createDerivedShaderProgram(s,y,{vertexShaderSource:_,fragmentShaderSource:S,attributeLocations:s._attributeLocations})}p=vRe(e[0],t.uniformMap,d)}o.receiveCommand.shaderProgram=h,o.receiveCommand.uniformMap=p,o.receiveShaderProgramId=t.shaderProgram.id,o.receiveShaderCastShadows=t.castShadows}return o};f0.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]=YAt(e[c],n,t,i,s,r[c]);o.castShaderProgramId=t.shaderProgram.id}return o};f0.prototype.isDestroyed=function(){return!1};f0.prototype.destroy=function(){dee(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 me(this)};var Zg=f0;var e$i=x(T(),1);var Wqi=x(T(),1),Yw=`uniform sampler2D u_opaqueDepthTexture;
uniform sampler2D u_translucentDepthTexture;
in vec2 v_textureCoordinates;
void main()
{
float opaqueDepth = texture(u_opaqueDepthTexture, v_textureCoordinates).r;
float translucentDepth = texture(u_translucentDepthTexture, v_textureCoordinates).r;
translucentDepth = czm_branchFreeTernary(translucentDepth > opaqueDepth, 1.0, translucentDepth);
out_FragColor = czm_packDepth(translucentDepth);
}
`;var Fqi=x(T(),1),sA=`uniform sampler2D colorTexture;
#ifdef DEBUG_SHOW_DEPTH
uniform sampler2D u_packedTranslucentDepth;
#endif
in vec2 v_textureCoordinates;
void main()
{
#ifdef DEBUG_SHOW_DEPTH
if (v_textureCoordinates.x < 0.5)
{
out_FragColor.rgb = vec3(czm_unpackDepth(texture(u_packedTranslucentDepth, v_textureCoordinates)));
out_FragColor.a = 1.0;
}
#else
vec4 color = texture(colorTexture, v_textureCoordinates);
#ifdef PICK
if (color == vec4(0.0))
{
discard;
}
#else
// Reverse premultiplication process to get the correct composited result of the classification primitives
color.rgb /= color.a;
#endif
out_FragColor = color;
#endif
}
`;var wAt=!1;function Mx(e){this._drawClassificationFBO=new yi({createDepthAttachments:!1}),this._accumulationFBO=new yi({createDepthAttachments:!1}),this._packFBO=new yi,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 si({color:new U(0,0,0,0),owner:this}),this._clearDepthStencilCommand=new si({depth:1,stencil:0,owner:this}),this._supported=e.depthTexture,this._viewport=new Qe,this._rsDepth=void 0,this._rsAccumulate=void 0,this._rsComp=void 0,this._useScissorTest=void 0,this._scissorRectangle=void 0,this._hasTranslucentDepth=!1,this._frustumsDrawn=0}Object.defineProperties(Mx.prototype,{hasTranslucentDepth:{get:function(){return this._hasTranslucentDepth}}});function FRe(e){e._textureToComposite=void 0,e._translucentDepthStencilTexture=e._translucentDepthStencilTexture&&!e._translucentDepthStencilTexture.isDestroyed()&&e._translucentDepthStencilTexture.destroy()}function IRe(e){e._drawClassificationFBO.destroy(),e._accumulationFBO.destroy(),e._packFBO.destroy()}function MAt(e,t,n,i){FRe(e),e._translucentDepthStencilTexture=new Et({context:t,width:n,height:i,pixelFormat:Ke.DEPTH_STENCIL,pixelDatatype:Oe.UNSIGNED_INT_24_8,sampler:Ut.NEAREST})}function kAt(e,t,n,i){IRe(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 UAt(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)&&(MAt(e,t,o,r),kAt(e,t,o,r));let s,a;if(l(e._packDepthCommand)||(s=new Be({sources:[Yw]}),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 Be({sources:[sA]}),a={colorTexture:function(){return e._textureToComposite}},wAt&&(s.defines=["DEBUG_SHOW_DEPTH"],a.u_packedTranslucentDepth=function(){return e._packFBO.getColorTexture()}),e._compositeCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e});let u=e._compositeCommand,h=u.shaderProgram,p=t.shaderCache.createDerivedShaderProgram(h,"pick",{vertexShaderSource:h.vertexShaderSource,fragmentShaderSource:new Be({sources:s.sources,defines:["PICK"]}),attributeLocations:h._attributeLocations}),b=et.shallowClone(u);b.shaderProgram=p,u.derivedCommands.pick=b}l(e._copyCommand)||(s=new Be({sources:[sA]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._copyCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),l(e._accumulateCommand)||(s=new Be({sources:[sA]}),a={colorTexture:function(){return e._drawClassificationFBO.getColorTexture()}},e._accumulateCommand=t.createViewportQuadCommand(s,{uniformMap:a,owner:e})),e._viewport.width=o,e._viewport.height=r;let c=!Qe.equals(e._viewport,n.viewport),d=c!==e._useScissorTest;e._useScissorTest=c,Qe.equals(e._scissorRectangle,n.viewport)||(e._scissorRectangle=Qe.clone(n.viewport,e._scissorRectangle),d=!0),(!l(e._rsDepth)||!Qe.equals(e._viewport,e._rsDepth.viewport)||d)&&(e._rsDepth=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),l(e._packDepthCommand)&&(e._packDepthCommand.renderState=e._rsDepth),(!l(e._rsAccumulate)||!Qe.equals(e._viewport,e._rsAccumulate.viewport)||d)&&(e._rsAccumulate=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:jn.EQUAL,reference:Ot.CESIUM_3D_TILE_MASK}})),l(e._accumulateCommand)&&(e._accumulateCommand.renderState=e._rsAccumulate),(!l(e._rsComp)||!Qe.equals(e._viewport,e._rsComp.viewport)||d)&&(e._rsComp=De.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:tn.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){UAt(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),DAt(this,e,t)};function DAt(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 FRe(this),IRe(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()),me(this)};var ww=Mx;function OAt(){this.command=void 0,this.near=void 0,this.far=void 0}function M3(e,t,n){let i=e.context,o;i.depthTexture&&(o=new Ww);let r;e._useOIT&&i.depthTexture&&(r=new Iw(i));let s=new Dc(i);s.viewport=Qe.clone(n),this.camera=t,this._cameraClone=To.clone(t),this._cameraStartFired=!1,this._cameraMovedTime=void 0,this.viewport=n,this.passState=s,this.pickFramebuffer=new Nw(i),this.pickDepthFramebuffer=new Xw,this.sceneFramebuffer=new oA,this.edgeFramebuffer=new Gw,this.globeDepth=o,this.globeTranslucencyFramebuffer=new vw,this.oit=r,this.translucentTileClassification=new ww(i),this.pickDepths=[],this.frustumCommandsList=[],this.debugFrustumStatistics=void 0,this._commandExtents=[]}var mee=new m,hee=new m;function BAt(e,t,n){let i=Math.max(m.maximumComponent(m.abs(e.position,mee)),m.maximumComponent(m.abs(t.position,hee))),o=1/Math.max(1,i);return m.multiplyByScalar(e.position,o,mee),m.multiplyByScalar(t.position,o,hee),m.equalsEpsilon(mee,hee,n)&&m.equalsEpsilon(e.direction,t.direction,n)&&m.equalsEpsilon(e.up,t.up,n)&&m.equalsEpsilon(e.right,t.right,n)&&F.equalsEpsilon(e.transform,t.transform,n)&&e.frustum.equalsEpsilon(t.frustum,n)}M3.prototype.checkForCameraUpdates=function(e){let t=this.camera,n=this._cameraClone;return BAt(t,n,W.EPSILON15)?(this._cameraStartFired&&Yi()-this._cameraMovedTime>e.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=Yi(),To.clone(t,n),!0)};function zAt(e,t,n,i){let{frameState:o}=t,{camera:r,useLogDepth:s}=o,a=s?t.logarithmicDepthFarToNearRatio:t.farToNearRatio,c=t.mode===re.SCENE2D,d=t.nearToFarDistance2D;i*=1+W.EPSILON2,n=Math.min(Math.max(n,r.frustum.near),r.frustum.far),i=Math.max(Math.min(i,r.frustum.far),n);let u;c?(i=Math.min(i,r.position.z+t.nearToFarDistance2D),n=Math.min(n,i),u=Math.ceil(Math.max(1,i-n)/t.nearToFarDistance2D)):u=Math.ceil(Math.log(i/n)/Math.log(a));let{frustumCommandsList:h}=e;h.length=u;for(let p=0;p<u;++p){let b,f;c?(b=Math.min(i-d,n+p*d),f=Math.min(i,b+d)):(b=Math.max(n,Math.pow(a,p)*n),f=Math.min(i,a*b));let y=h[p];l(y)?(y.near=b,y.far=f):y=h[p]=new Lw(b,f)}}function HAt(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 PRe=new Os,KAt=new Or;M3.prototype.createPotentiallyVisibleSet=function(e){let{frameState:t}=e,{camera:n,commandList:i,shadowState:o}=t,{positionWC:r,directionWC:s,frustum:a}=n,c=e._computeCommandList,d=e._overlayCommandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});let u=this.frustumCommandsList;for(let X=0;X<u.length;++X)for(let N=0;N<Le.NUMBER_OF_PASSES;++N)u[X].indices[N]=0;c.length=0,d.length=0;let h=this._commandExtents,p=h.length,b=0,f=+Number.MAX_VALUE,y=-Number.MAX_VALUE,{shadowsEnabled:_}=o,S=+Number.MAX_VALUE,A=-Number.MAX_VALUE,Z=Number.MAX_VALUE,V=t.mode===re.SCENE3D?t.occluder:void 0,{cullingVolume:E}=t,L=PRe.planes;for(let X=0;X<5;++X)L[X]=E.planes[X];E=PRe;for(let X=0;X<i.length;++X){let N=i[X],{pass:g,boundingVolume:C}=N;if(g===Le.COMPUTE)c.push(N);else if(g===Le.OVERLAY)d.push(N);else{let R,G;if(l(C)){if(!e.isVisible(E,N,V))continue;let Y=C.computePlaneDistances(r,s,KAt);if(R=Y.start,G=Y.stop,f=Math.min(f,R),y=Math.max(y,G),_&&N.receiveShadows&&R<Zg.MAXIMUM_DISTANCE&&!(g===Le.GLOBE&&R<-100&&G>100)){let O=G-R;g!==Le.GLOBE&&R<100&&(Z=Math.min(Z,O)),S=Math.min(S,R),A=Math.max(A,G)}}else N instanceof si?(R=a.near,G=a.far):(R=a.near,G=a.far,f=Math.min(f,R),y=Math.max(y,G));let P=h[b];l(P)||(P=h[b]=new OAt),P.command=N,P.near=R,P.far=G,b++}}_&&(S=Math.min(Math.max(S,a.near),a.far),A=Math.max(Math.min(A,a.far),S),o.nearPlane=S,o.farPlane=A,o.closestObjectSize=Z),zAt(this,e,f,y);for(let X=0;X<b;X++)HAt(this,e,h[X]);if(b<p)for(let X=b;X<p;X++){let N=h[X];if(!l(N.command))break;N.command=void 0}let v=u.length,{frustumSplits:I}=t;I.length=v+1;for(let X=0;X<v;++X)I[X]=u[X].near,X===v-1&&(I[X+1]=u[X].far)};M3.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 aA=M3;var NRe=.1,JAt=new uh({pass:er.MOST_DETAILED_PRELOAD}),jAt=new uh({pass:er.MOST_DETAILED_PICK}),Mw=new uh({pass:er.PICK});function Aa(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;let t=new Qe(0,0,1,1),n=new To(e);n.frustum=new mn({width:NRe,aspectRatio:1,near:.1}),this._pickOffscreenView=new aA(e,n,t)}Aa.prototype.update=function(){this._pickPositionCacheDirty=!0};Aa.prototype.getPickDepth=function(e,t){let n=e.view.pickDepths,i=n[t];return l(i)||(i=new Ew,n[t]=i),i};var QAt=new rs,qAt=new m,k3=new m,$At=new M,eZt=new F;function tZt(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,eZt);r._setTransform(F.IDENTITY);let h=m.clone(r.position,qAt);m.multiplyByScalar(r.right,c,k3),m.add(k3,h,h),m.multiplyByScalar(r.up,d,k3),m.add(k3,h,h),r._setTransform(u),e.mode===re.SCENE2D&&m.fromElements(h.z,h.x,h.y,h);let p=s.getPixelDimensions(o.width,o.height,1,1,$At),b=QAt;return b.right=p.x*.5,b.left=-b.right,b.top=p.y*.5,b.bottom=-b.top,b.near=s.near,b.far=s.far,b.computeCullingVolume(h,r.directionWC,r.upWC)}var nZt=new rd,iZt=new M;function oZt(e,t,n,i,o){let r=e.camera,s=r.frustum,a=s.near,c=Math.tan(s.fovy*.5),d=s.aspectRatio*c,u=2*(t.x-o.x)/o.width-1,h=2*(o.height-t.y-o.y)/o.height-1,p=u*a*d,b=h*a*c,f=s.getPixelDimensions(o.width,o.height,1,1,iZt),y=f.x*n*.5,_=f.y*i*.5,S=nZt;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 U3(e,t,n,i,o){let r=e.camera.frustum;return r instanceof mn||r instanceof rs?tZt(e,t,n,i,o):oZt(e,t,n,i,o)}var kw=new Qe(0,0,3,3),D3=new M,Uw=new U(0,0,0,0);function fee(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 YRe(e,t,n,i,o){let{context:r,frameState:s,defaultView:a}=e,{viewport:c,pickFramebuffer:d}=a;e.view=a,c.x=0,c.y=0,c.width=r.drawingBufferWidth,c.height=r.drawingBufferHeight;let u=a.passState;u.viewport=Qe.clone(c,u.viewport);let h=no.transformWindowToDrawingBuffer(e,t,D3);fee(r.drawingBufferHeight,h,i,o,n),e.jobScheduler.disableThisFrame(),e.updateFrameState(),s.cullingVolume=U3(e,h,n.width,n.height,c),s.invertClassification=!1,s.passes.pick=!0,s.tilesetPassState=Mw,r.uniformState.update(s),e.updateEnvironment(),u=d.begin(n,c),e.updateAndExecuteCommands(u,Uw),e.resolveFramebuffers(u)}function wRe(e){let{context:t}=e;t.endFrame()}Aa.prototype.pickAsync=async function(e,t,n,i,o=1){let{context:r,frameState:s,defaultView:a}=e,{pickFramebuffer:c}=a,d=kw;YRe(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),Tt("picking-async-fallback","Fallback to synchronous picking because async operation requires WebGL2 context.")),wRe(e),u};Aa.prototype.pick=function(e,t,n,i,o=1){let{defaultView:r}=e,{pickFramebuffer:s}=r,a=kw;YRe(e,t,a,n,i);let c=s.end(a,o);return wRe(e),c};Aa.prototype.pickVoxelCoordinate=function(e,t,n,i){let{context:o,frameState:r,defaultView:s}=e,{viewport:a,pickFramebuffer:c}=s;e.view=s,a.x=0,a.y=0,a.width=o.drawingBufferWidth,a.height=o.drawingBufferHeight;let d=s.passState;d.viewport=Qe.clone(a,d.viewport);let u=no.transformWindowToDrawingBuffer(e,t,D3),h=fee(o.drawingBufferHeight,u,n,i,kw);e.jobScheduler.disableThisFrame(),e.updateFrameState(),r.cullingVolume=U3(e,u,h.width,h.height,a),r.invertClassification=!1,r.passes.pickVoxel=!0,r.tilesetPassState=Mw,o.uniformState.update(r),e.updateEnvironment(),d=c.begin(h,a),e.updateAndExecuteCommands(d,Uw),e.resolveFramebuffers(d);let p=c.readCenterPixel(h);return o.endFrame(),p};Aa.prototype.pickMetadata=function(e,t,n){let{context:i,frameState:o,defaultView:r}=e,{viewport:s,pickFramebuffer:a}=r;e.view=r,s.x=0,s.y=0,s.width=i.drawingBufferWidth,s.height=i.drawingBufferHeight;let c=r.passState;c.viewport=Qe.clone(s,c.viewport);let d=no.transformWindowToDrawingBuffer(e,t,D3),u=fee(i.drawingBufferHeight,d,1,1,kw);e.jobScheduler.disableThisFrame(),e.updateFrameState(),o.cullingVolume=U3(e,d,u.width,u.height,s),o.invertClassification=!1,o.passes.pick=!0,o.tilesetPassState=Mw,o.pickingMetadata=!0,o.pickedMetadataInfo=n,i.uniformState.update(o),e.updateEnvironment(),c=a.begin(u,s),e.updateAndExecuteCommands(c,Uw);let h=e._environmentState.useOIT;e._environmentState.useOIT=!1,e.resolveFramebuffers(c),e._environmentState.useOIT=h;let p=a.readCenterPixel(u);return i.endFrame(),o.pickingMetadata=!1,Rw.decodeMetadataValues(n.classProperty,n.metadataProperty,p)};function rZt(e,t){let{defaultView:n,context:i,frameState:o,environmentState:r}=e,{viewport:s,pickDepthFramebuffer:a}=n;e.view=n,s.x=0,s.y=0,s.width=i.drawingBufferWidth,s.height=i.drawingBufferHeight;let c=n.passState;c.viewport=Qe.clone(s,c.viewport),e.clearPasses(o.passes),o.passes.pick=!0,o.passes.depth=!0,o.cullingVolume=U3(e,t,1,1,s),o.tilesetPassState=Mw,e.updateEnvironment(),r.renderTranslucentDepthForPick=!0,c=a.update(i,t,s),e.updateAndExecuteCommands(c,Uw),e.resolveFramebuffers(c),i.endFrame()}var sZt=new Mi,aZt=new rd,cZt=new mn,lZt=new rs;Aa.prototype.pickPositionWorldCoordinates=function(e,t,n){if(!e.useDepthPicking)return;let i=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(i))return m.clone(this._pickPositionCache[i],n);let{context:o,frameState:r,camera:s,defaultView:a}=e,{uniformState:c}=o;e.view=a;let d=no.transformWindowToDrawingBuffer(e,t,D3);e.pickTranslucentDepth?rZt(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(sZt):l(s.frustum.infiniteProjectionMatrix)?u=s.frustum.clone(aZt):l(s.frustum.width)?u=s.frustum.clone(cZt):u=s.frustum.clone(lZt);let{frustumCommandsList:h}=a,p=h.length;for(let b=0;b<p;++b){let y=this.getPickDepth(e,b).getDepth(o,d.x,d.y);if(l(y)&&y>0&&y<1){let _=h[b],S;return e.mode===re.SCENE2D?(S=s.position.z,s.position.z=S-_.near+1,u.far=Math.max(1,_.far-_.near),u.near=1,c.update(r),c.updateFrustum(u)):(u.near=_.near*(b!==0?e.opaqueFrustumNearOffset:1),u.far=_.far,c.updateFrustum(u)),n=no.drawingBufferToWorldCoordinates(e,d,y,n),e.mode===re.SCENE2D&&(s.position.z=S,c.update(r)),this._pickPositionCache[i]=m.clone(n),n}}this._pickPositionCache[i]=void 0};var dZt=new pe;Aa.prototype.pickPosition=function(e,t,n){if(n=this.pickPositionWorldCoordinates(e,t,n),l(n)&&e.mode!==re.SCENE3D){m.fromElements(n.y,n.z,n.x,n);let i=e.mapProjection,o=i.ellipsoid,r=i.unproject(n,dZt);o.cartographicToCartesian(r,n)}return n};function uZt(e,t,n,i,o,r){for(let s of e){let a=s.object,c=s.position,d=s.exclude;if(l(c)&&!l(a))return n.push(s),!0;if(!l(a)||!l(a.primitive)||!d&&(n.push(s),n.length>=t))return!0;let u=a.primitive,h=!1;if(typeof u.getGeometryInstanceAttributes=="function"&&l(a.id)){let p=u.getGeometryInstanceAttributes(a.id);l(p)&&l(p.show)&&(h=!0,p.show=Zn.toValue(!1,p.show),o.push(p))}a instanceof Bs&&(h=!0,a.show=!1,r.push(a)),h||(u.show=!1,i.push(u))}}function MRe(e,t){let n=[],i=[],o=[],r=[];l(t)||(t=Number.MAX_VALUE);let s=e(t);for(;l(s)&&s.length>0&&!uZt(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=Zn.toValue(!0,c.show)}for(let a=0;a<r.length;++a)r[a].show=!0;return n}Aa.prototype.drillPick=function(e,t,n,i,o){return MRe(a=>this.pick(e,t,i,o,a).map(d=>({object:d,position:void 0,exclude:!1})),n).map(a=>a.object)};var XRe=new m,mZt=new m;function hZt(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 kRe(e,t,n,i){let o=t.direction,r=m.mostOrthogonalAxis(o,XRe),s=m.cross(o,r,XRe),a=m.cross(o,s,mZt);return i.position=t.origin,i.direction=o,i.up=a,i.right=s,i.frustum.width=n??NRe,i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC)}function fZt(e,t,n){let i=t.frameState,{ray:o,width:r,tilesets:s}=n,a=e._pickOffscreenView.camera,c=kRe(e,o,r,a),d=JAt;d.camera=a,d.cullingVolume=c;let u=!0,h=s.length;for(let p=0;p<h;++p){let b=s[p];b.show&&t.primitives.contains(b)&&(b.updateForPass(i,d),u=u&&d.ready)}return u&&n._completePick(),u}Aa.prototype.updateMostDetailedRayPicks=function(e){let t=this._mostDetailedRayPicks;for(let n=0;n<t.length;++n)fZt(this,e,t[n])&&t.splice(n--,1)};function URe(e,t,n){for(let i=0;i<e.length;++i){let o=e.get(i);o.show&&(l(o.isCesium3DTileset)?(!l(t)||t.indexOf(o)===-1)&&n.push(o):o instanceof td&&URe(o,t,n))}}function O3(e,t,n,i,o,r){let s=[];if(URe(t.primitives,i,s),s.length===0)return Promise.resolve(r());let a=new hZt(n,o,s);return e._mostDetailedRayPicks.push(a),a.promise.then(function(){return r()})}function pZt(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 bZt(e,t,n,i,o,r,s){let{context:a,frameState:c}=t,d=a.uniformState,u=e._pickOffscreenView;t.view=u,kRe(e,n,o,u.camera);let h=Qe.clone(u.viewport,kw),p=u.pickFramebuffer.begin(h,u.viewport);t.jobScheduler.disableThisFrame(),t.updateFrameState(),c.invertClassification=!1,c.passes.pick=!0,c.passes.offscreen=!0,s?c.tilesetPassState=jAt:c.tilesetPassState=Mw,d.update(c),t.updateEnvironment(),t.updateAndExecuteCommands(p,Uw),t.resolveFramebuffers(p);let b,f=u.pickFramebuffer.end(h,1)[0];if(t.context.depthTexture){let{frustumCommandsList:y}=u,_=y.length;for(let S=0;S<_;++S){let Z=e.getPickDepth(t,S).getDepth(a,0,0);if(l(Z)&&Z>0&&Z<1){let V=y[S],E=V.near*(S!==0?t.opaqueFrustumNearOffset:1),L=V.far,v=E+Z*(L-E);b=gn.getPoint(n,v);break}}}if(t.view=t.defaultView,a.endFrame(),l(f)||l(b))return{object:f,position:b,exclude:!l(b)&&r||pZt(f,i)}}function pee(e,t,n,i,o,r,s,a){return MRe(function(){let d=bZt(e,t,n,o,r,s,a);return d?[d]:void 0},i)}function OR(e,t,n,i,o,r,s){let a=pee(e,t,n,1,i,o,r,s);if(a.length>0)return a[0]}function B3(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)})})}Aa.prototype.pickFromRay=function(e,t,n,i){return OR(this,e,t,n,i,!1,!1)};Aa.prototype.drillPickFromRay=function(e,t,n,i,o){return pee(this,e,t,n,i,o,!1,!1)};Aa.prototype.pickFromRayMostDetailed=function(e,t,n,i){let o=this;return t=gn.clone(t),n=l(n)?n.slice():n,B3(e,O3(o,e,t,n,i,function(){return OR(o,e,t,n,i,!1,!0)}))};Aa.prototype.drillPickFromRayMostDetailed=function(e,t,n,i,o){let r=this;return t=gn.clone(t),i=l(i)?i.slice():i,B3(e,O3(r,e,t,i,o,function(){return pee(r,e,t,n,i,o,!1,!0)}))};var gZt=new m,yZt=new m,xZt=new gn,DRe=new pe;function bee(e,t){let n=e.ellipsoid,i=Ei._defaultMaxTerrainHeight,o=n.geodeticSurfaceNormalCartographic(t,yZt),r=pe.toCartesian(t,n,gZt),s=xZt;s.origin=r,s.direction=o;let a=new gn;return gn.getPoint(s,i,a.origin),m.negate(o,a.direction),a}function ORe(e,t){let n=e.ellipsoid,i=pe.fromCartesian(t,n,DRe);return bee(e,i)}function BRe(e,t){let n=e.ellipsoid;return pe.fromCartesian(t,n,DRe).height}function TZt(e,t,n,i,o){let r=bee(t,n);return O3(e,t,r,i,o,function(){let s=OR(e,t,r,i,o,!0,!0);if(l(s))return BRe(t,s.position)})}function _Zt(e,t,n,i,o,r){let s=ORe(t,n);return O3(e,t,s,i,o,function(){let a=OR(e,t,s,i,o,!0,!0);if(l(a))return m.clone(a.position,r)})}Aa.prototype.sampleHeight=function(e,t,n,i){let o=bee(e,t),r=OR(this,e,o,n,i,!0,!1);if(l(r))return BRe(e,r.position)};Aa.prototype.clampToHeight=function(e,t,n,i,o){let r=ORe(e,t),s=OR(this,e,r,n,i,!0,!1);if(l(s))return m.clone(s.position,o)};Aa.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]=TZt(this,e,t[s],n,i);return B3(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}))};Aa.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]=_Zt(this,e,t[s],n,i,t[s]);return B3(e,Promise.all(r).then(function(s){let a=s.length;for(let c=0;c<a;++c)t[c]=s[c];return t}))};Aa.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()};var Dw=Aa;var Cno=x(T(),1);var $to=x(T(),1);var eeo=x(T(),1),Ow=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
#ifdef AUTO_EXPOSURE
uniform sampler2D autoExposure;
#else
uniform float exposure;
#endif
void main()
{
vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
vec3 color = fragmentColor.rgb;
#ifdef AUTO_EXPOSURE
color /= texture(autoExposure, vec2(0.5)).r;
#else
color *= vec3(exposure);
#endif
color = czm_acesTonemapping(color);
color = czm_inverseGamma(color);
out_FragColor = vec4(color, fragmentColor.a);
}
`;var neo=x(T(),1),Bw=`precision highp float;
uniform sampler2D randomTexture;
uniform sampler2D depthTexture;
uniform float intensity;
uniform float bias;
uniform float lengthCap;
uniform int stepCount;
uniform int directionCount;
vec4 pixelToEye(vec2 screenCoordinate)
{
vec2 uv = screenCoordinate / czm_viewport.zw;
float depth = czm_readDepth(depthTexture, uv);
vec2 xy = 2.0 * uv - vec2(1.0);
vec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);
posEC = posEC / posEC.w;
// Avoid numerical error at far plane
if (depth >= 1.0) {
posEC.z = czm_currentFrustum.y;
}
return posEC;
}
// Reconstruct surface normal in eye coordinates, avoiding edges
vec3 getNormalXEdge(vec3 positionEC)
{
// Find the 3D surface positions at adjacent screen pixels
vec2 centerCoord = gl_FragCoord.xy;
vec3 positionLeft = pixelToEye(centerCoord + vec2(-1.0, 0.0)).xyz;
vec3 positionRight = pixelToEye(centerCoord + vec2(1.0, 0.0)).xyz;
vec3 positionUp = pixelToEye(centerCoord + vec2(0.0, 1.0)).xyz;
vec3 positionDown = pixelToEye(centerCoord + vec2(0.0, -1.0)).xyz;
// Compute potential tangent vectors
vec3 dx0 = positionEC - positionLeft;
vec3 dx1 = positionRight - positionEC;
vec3 dy0 = positionEC - positionDown;
vec3 dy1 = positionUp - positionEC;
// The shorter tangent is more likely to be on the same surface
vec3 dx = length(dx0) < length(dx1) ? dx0 : dx1;
vec3 dy = length(dy0) < length(dy1) ? dy0 : dy1;
return normalize(cross(dx, dy));
}
const float sqrtTwoPi = sqrt(czm_twoPi);
float gaussian(float x, float standardDeviation) {
float argument = x / standardDeviation;
return exp(-0.5 * argument * argument) / (sqrtTwoPi * standardDeviation);
}
void main(void)
{
vec4 positionEC = pixelToEye(gl_FragCoord.xy);
// Exit if we are too close to the back of the frustum, where the depth value is invalid.
float maxValidDepth = czm_currentFrustum.y - lengthCap;
if (-positionEC.z > maxValidDepth)
{
out_FragColor = vec4(1.0);
return;
}
vec3 normalEC = getNormalXEdge(positionEC.xyz);
float gaussianVariance = lengthCap * sqrt(-positionEC.z);
// Choose a step length such that the marching stops just before 3 * variance.
float stepLength = 3.0 * gaussianVariance / (float(stepCount) + 1.0);
float metersPerPixel = czm_metersPerPixel(positionEC, 1.0);
// Minimum step is 1 pixel to avoid double sampling
float pixelsPerStep = max(stepLength / metersPerPixel, 1.0);
stepLength = pixelsPerStep * metersPerPixel;
float angleStepScale = 1.0 / float(directionCount);
float angleStep = angleStepScale * czm_twoPi;
float cosStep = cos(angleStep);
float sinStep = sin(angleStep);
mat2 rotateStep = mat2(cosStep, sinStep, -sinStep, cosStep);
// Initial sampling direction (different for each pixel)
const float randomTextureSize = 255.0;
vec2 randomTexCoord = fract(gl_FragCoord.xy / randomTextureSize);
float randomVal = texture(randomTexture, randomTexCoord).x;
vec2 sampleDirection = vec2(cos(angleStep * randomVal), sin(angleStep * randomVal));
float ao = 0.0;
// Loop over sampling directions
#if __VERSION__ == 300
for (int i = 0; i < directionCount; i++)
{
#else
for (int i = 0; i < 16; i++)
{
if (i >= directionCount) {
break;
}
#endif
sampleDirection = rotateStep * sampleDirection;
float localAO = 0.0;
vec2 radialStep = pixelsPerStep * sampleDirection;
#if __VERSION__ == 300
for (int j = 0; j < stepCount; j++)
{
#else
for (int j = 0; j < 64; j++)
{
if (j >= stepCount) {
break;
}
#endif
// Step along sampling direction, away from output pixel
vec2 samplePixel = floor(gl_FragCoord.xy + float(j + 1) * radialStep) + vec2(0.5);
// Exit if we stepped off the screen
if (clamp(samplePixel, vec2(0.0), czm_viewport.zw) != samplePixel) {
break;
}
// Compute step vector from output point to sampled point
vec4 samplePositionEC = pixelToEye(samplePixel);
vec3 stepVector = samplePositionEC.xyz - positionEC.xyz;
// Estimate the angle from the surface normal.
float dotVal = clamp(dot(normalEC, normalize(stepVector)), 0.0, 1.0);
dotVal = czm_branchFreeTernary(dotVal > bias, dotVal, 0.0);
dotVal = czm_branchFreeTernary(-samplePositionEC.z <= maxValidDepth, dotVal, 0.0);
// Weight contribution based on the distance from the output point
float sampleDistance = length(stepVector);
float weight = gaussian(sampleDistance, gaussianVariance);
localAO += weight * dotVal;
}
ao += localAO;
}
ao *= angleStepScale * stepLength;
ao = 1.0 - clamp(ao, 0.0, 1.0);
ao = pow(ao, intensity);
out_FragColor = vec4(vec3(ao), 1.0);
}
`;var oeo=x(T(),1),zw=`uniform sampler2D colorTexture;
uniform sampler2D ambientOcclusionTexture;
uniform bool ambientOcclusionOnly;
in vec2 v_textureCoordinates;
void main(void)
{
vec4 color = texture(colorTexture, v_textureCoordinates);
vec4 ao = texture(ambientOcclusionTexture, v_textureCoordinates);
out_FragColor = ambientOcclusionOnly ? ao : ao * color;
}
`;var seo=x(T(),1),Hw=`uniform sampler2D colorTexture;
uniform float gradations;
in vec2 v_textureCoordinates;
void main(void)
{
vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
#ifdef CZM_SELECTED_FEATURE
if (czm_selected()) {
out_FragColor = vec4(rgb, 1.0);
return;
}
#endif
float luminance = czm_luminance(rgb);
float darkness = luminance * gradations;
darkness = (darkness - fract(darkness)) / gradations;
out_FragColor = vec4(vec3(darkness), 1.0);
}
`;var ceo=x(T(),1),Kw=`uniform sampler2D colorTexture;
uniform sampler2D bloomTexture;
uniform bool glowOnly;
in vec2 v_textureCoordinates;
void main(void)
{
vec4 color = texture(colorTexture, v_textureCoordinates);
#ifdef CZM_SELECTED_FEATURE
if (czm_selected()) {
out_FragColor = color;
return;
}
#endif
vec4 bloom = texture(bloomTexture, v_textureCoordinates);
out_FragColor = glowOnly ? bloom : bloom + color;
}
`;var deo=x(T(),1),Jw=`uniform sampler2D colorTexture;
uniform float brightness;
in vec2 v_textureCoordinates;
void main(void)
{
vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
vec3 target = vec3(0.0);
out_FragColor = vec4(mix(target, rgb, brightness), 1.0);
}
`;var meo=x(T(),1),jw=`uniform sampler2D colorTexture;
uniform float contrast;
uniform float brightness;
in vec2 v_textureCoordinates;
void main(void)
{
vec3 sceneColor = texture(colorTexture, v_textureCoordinates).xyz;
sceneColor = czm_RGBToHSB(sceneColor);
sceneColor.z += brightness;
sceneColor = czm_HSBToRGB(sceneColor);
float factor = (259.0 * (contrast + 255.0)) / (255.0 * (259.0 - contrast));
sceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5);
out_FragColor = vec4(sceneColor, 1.0);
}
`;var feo=x(T(),1),Qw=`uniform sampler2D colorTexture;
uniform sampler2D blurTexture;
uniform sampler2D depthTexture;
uniform float focalDistance;
in vec2 v_textureCoordinates;
vec4 toEye(vec2 uv, float depth)
{
vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));
vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);
posInCamera = posInCamera / posInCamera.w;
return posInCamera;
}
float computeDepthBlur(float depth)
{
float f;
if (depth < focalDistance)
{
f = (focalDistance - depth) / (focalDistance - czm_currentFrustum.x);
}
else
{
f = (depth - focalDistance) / (czm_currentFrustum.y - focalDistance);
f = pow(f, 0.1);
}
f *= f;
f = clamp(f, 0.0, 1.0);
return pow(f, 0.5);
}
void main(void)
{
float depth = czm_readDepth(depthTexture, v_textureCoordinates);
vec4 posInCamera = toEye(v_textureCoordinates, depth);
float d = computeDepthBlur(-posInCamera.z);
out_FragColor = mix(texture(colorTexture, v_textureCoordinates), texture(blurTexture, v_textureCoordinates), d);
}
`;var beo=x(T(),1),qw=`uniform sampler2D depthTexture;
in vec2 v_textureCoordinates;
void main(void)
{
float depth = czm_readDepth(depthTexture, v_textureCoordinates);
out_FragColor = vec4(vec3(depth), 1.0);
}
`;var yeo=x(T(),1),$w=`uniform sampler2D depthTexture;
uniform float length;
uniform vec4 color;
in vec2 v_textureCoordinates;
void main(void)
{
float directions[3];
directions[0] = -1.0;
directions[1] = 0.0;
directions[2] = 1.0;
float scalars[3];
scalars[0] = 3.0;
scalars[1] = 10.0;
scalars[2] = 3.0;
float padx = czm_pixelRatio / czm_viewport.z;
float pady = czm_pixelRatio / czm_viewport.w;
#ifdef CZM_SELECTED_FEATURE
bool selected = false;
for (int i = 0; i < 3; ++i)
{
float dir = directions[i];
selected = selected || czm_selected(vec2(-padx, dir * pady));
selected = selected || czm_selected(vec2(padx, dir * pady));
selected = selected || czm_selected(vec2(dir * padx, -pady));
selected = selected || czm_selected(vec2(dir * padx, pady));
if (selected)
{
break;
}
}
if (!selected)
{
out_FragColor = vec4(color.rgb, 0.0);
return;
}
#endif
float horizEdge = 0.0;
float vertEdge = 0.0;
for (int i = 0; i < 3; ++i)
{
float dir = directions[i];
float scale = scalars[i];
horizEdge -= texture(depthTexture, v_textureCoordinates + vec2(-padx, dir * pady)).x * scale;
horizEdge += texture(depthTexture, v_textureCoordinates + vec2(padx, dir * pady)).x * scale;
vertEdge -= texture(depthTexture, v_textureCoordinates + vec2(dir * padx, -pady)).x * scale;
vertEdge += texture(depthTexture, v_textureCoordinates + vec2(dir * padx, pady)).x * scale;
}
float len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge);
out_FragColor = vec4(color.rgb, len > length ? color.a : 0.0);
}
`;var Teo=x(T(),1),eM=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
#ifdef AUTO_EXPOSURE
uniform sampler2D autoExposure;
#else
uniform float exposure;
#endif
// See slides 142 and 143:
// http://www.gdcvault.com/play/1012459/Uncharted_2__HDR_Lighting
void main()
{
vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
vec3 color = fragmentColor.rgb;
#ifdef AUTO_EXPOSURE
float exposure = texture(autoExposure, vec2(0.5)).r;
color /= exposure;
#else
color *= vec3(exposure);
#endif
const float A = 0.22; // shoulder strength
const float B = 0.30; // linear strength
const float C = 0.10; // linear angle
const float D = 0.20; // toe strength
const float E = 0.01; // toe numerator
const float F = 0.30; // toe denominator
const float white = 11.2; // linear white point value
vec3 c = ((color * (A * color + C * B) + D * E) / (color * ( A * color + B) + D * F)) - E / F;
float w = ((white * (A * white + C * B) + D * E) / (white * ( A * white + B) + D * F)) - E / F;
c = czm_inverseGamma(c / w);
out_FragColor = vec4(c, fragmentColor.a);
}
`;var Seo=x(T(),1),tM=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
#ifdef AUTO_EXPOSURE
uniform sampler2D autoExposure;
#else
uniform float exposure;
#endif
void main()
{
vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
vec3 color = fragmentColor.rgb;
#ifdef AUTO_EXPOSURE
color /= texture(autoExposure, vec2(0.5)).r;
#else
color *= vec3(exposure);
#endif
color = czm_pbrNeutralTonemapping(color);
color = czm_inverseGamma(color);
out_FragColor = vec4(color, fragmentColor.a);
}
`;var Zeo=x(T(),1),nM=`in vec2 v_textureCoordinates;
uniform sampler2D colorTexture;
const float fxaaQualitySubpix = 0.5;
const float fxaaQualityEdgeThreshold = 0.125;
const float fxaaQualityEdgeThresholdMin = 0.0833;
void main()
{
vec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;
vec4 color = FxaaPixelShader(
v_textureCoordinates,
colorTexture,
fxaaQualityRcpFrame,
fxaaQualitySubpix,
fxaaQualityEdgeThreshold,
fxaaQualityEdgeThresholdMin);
float alpha = texture(colorTexture, v_textureCoordinates).a;
out_FragColor = vec4(color.rgb, alpha);
}
`;var Veo=x(T(),1),kx=`#define SAMPLES 8
uniform float delta;
uniform float sigma;
uniform float direction; // 0.0 for x direction, 1.0 for y direction
uniform sampler2D colorTexture;
#ifdef USE_STEP_SIZE
uniform float stepSize;
#else
uniform vec2 step;
#endif
in vec2 v_textureCoordinates;
// Incremental Computation of the Gaussian:
// https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch40.html
void main()
{
vec2 st = v_textureCoordinates;
vec2 dir = vec2(1.0 - direction, direction);
#ifdef USE_STEP_SIZE
vec2 step = vec2(stepSize * (czm_pixelRatio / czm_viewport.zw));
#else
vec2 step = step;
#endif
vec3 g;
g.x = 1.0 / (sqrt(czm_twoPi) * sigma);
g.y = exp((-0.5 * delta * delta) / (sigma * sigma));
g.z = g.y * g.y;
vec4 result = texture(colorTexture, st) * g.x;
for (int i = 1; i < SAMPLES; ++i)
{
g.xy *= g.yz;
vec2 offset = float(i) * dir * step;
result += texture(colorTexture, st - offset) * g.x;
result += texture(colorTexture, st + offset) * g.x;
}
out_FragColor = result;
}
`;var Eeo=x(T(),1),iM=`uniform sampler2D colorTexture;
uniform sampler2D dirtTexture;
uniform sampler2D starTexture;
uniform vec2 dirtTextureDimensions;
uniform float distortion;
uniform float ghostDispersal;
uniform float haloWidth;
uniform float dirtAmount;
uniform float earthRadius;
uniform float intensity;
in vec2 v_textureCoordinates;
// whether it is in space or not
// 6500000.0 is empirical value
#define DISTANCE_TO_SPACE 6500000.0
// return ndc from world coordinate biased earthRadius
vec4 getNDCFromWC(vec3 WC, float earthRadius)
{
vec4 positionEC = czm_view * vec4(WC, 1.0);
positionEC = vec4(positionEC.x + earthRadius, positionEC.y, positionEC.z, 1.0);
vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
return czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);
}
// Check if current pixel is included Earth
// if then mask it gradually
float isInEarth(vec2 texcoord, vec2 sceneSize)
{
vec2 NDC = texcoord * 2.0 - 1.0;
vec4 earthPosSC = getNDCFromWC(vec3(0.0), 0.0);
vec4 earthPosSCEdge = getNDCFromWC(vec3(0.0), earthRadius * 1.5);
NDC.xy -= earthPosSC.xy;
float X = abs(NDC.x) * sceneSize.x;
float Y = abs(NDC.y) * sceneSize.y;
return clamp(0.0, 1.0, max(sqrt(X * X + Y * Y) / max(abs(earthPosSCEdge.x * sceneSize.x), 1.0) - 0.8 , 0.0));
}
// For Chromatic effect
vec4 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, vec3 distortion, bool isSpace)
{
vec2 sceneSize = czm_viewport.zw;
vec3 color;
if(isSpace)
{
color.r = isInEarth(texcoord + direction * distortion.r, sceneSize) * texture(tex, texcoord + direction * distortion.r).r;
color.g = isInEarth(texcoord + direction * distortion.g, sceneSize) * texture(tex, texcoord + direction * distortion.g).g;
color.b = isInEarth(texcoord + direction * distortion.b, sceneSize) * texture(tex, texcoord + direction * distortion.b).b;
}
else
{
color.r = texture(tex, texcoord + direction * distortion.r).r;
color.g = texture(tex, texcoord + direction * distortion.g).g;
color.b = texture(tex, texcoord + direction * distortion.b).b;
}
return vec4(clamp(color, 0.0, 1.0), 0.0);
}
void main(void)
{
vec4 originalColor = texture(colorTexture, v_textureCoordinates);
vec3 rgb = originalColor.rgb;
bool isSpace = length(czm_viewerPositionWC.xyz) > DISTANCE_TO_SPACE;
// Sun position
vec4 sunPos = czm_morphTime == 1.0 ? vec4(czm_sunPositionWC, 1.0) : vec4(czm_sunPositionColumbusView.zxy, 1.0);
vec4 sunPositionEC = czm_view * sunPos;
vec4 sunPositionWC = czm_eyeToWindowCoordinates(sunPositionEC);
sunPos = czm_viewportOrthographic * vec4(sunPositionWC.xy, -sunPositionWC.z, 1.0);
// If sun is not in the screen space, use original color.
if(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1)))
{
// Lens flare is disabled when not in space until #5932 is fixed.
// https://github.com/CesiumGS/cesium/issues/5932
out_FragColor = originalColor;
return;
}
vec2 texcoord = vec2(1.0) - v_textureCoordinates;
vec2 pixelSize = czm_pixelRatio / czm_viewport.zw;
vec2 invPixelSize = 1.0 / pixelSize;
vec3 distortionVec = pixelSize.x * vec3(-distortion, 0.0, distortion);
// ghost vector to image centre:
vec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal;
vec3 direction = normalize(vec3(ghostVec, 0.0));
// sample ghosts:
vec4 result = vec4(0.0);
vec4 ghost = vec4(0.0);
for (int i = 0; i < 4; ++i)
{
vec2 offset = fract(texcoord + ghostVec * float(i));
// Only bright spots from the centre of the source image
ghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace);
}
result += ghost;
// sample halo
vec2 haloVec = normalize(ghostVec) * haloWidth;
float weightForHalo = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));
weightForHalo = pow(1.0 - weightForHalo, 5.0);
result += textureDistorted(colorTexture, texcoord + haloVec, direction.xy, distortionVec, isSpace) * weightForHalo * 1.5;
// dirt on lens
vec2 dirtTexCoords = (v_textureCoordinates * invPixelSize) / dirtTextureDimensions;
if (dirtTexCoords.x > 1.0)
{
dirtTexCoords.x = mod(floor(dirtTexCoords.x), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.x) : fract(dirtTexCoords.x);
}
if (dirtTexCoords.y > 1.0)
{
dirtTexCoords.y = mod(floor(dirtTexCoords.y), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.y) : fract(dirtTexCoords.y);
}
result += dirtAmount * texture(dirtTexture, dirtTexCoords);
// Rotating starburst texture's coordinate
// dot(czm_view[0].xyz, vec3(0.0, 0.0, 1.0)) + dot(czm_view[1].xyz, vec3(0.0, 1.0, 0.0))
float camrot = czm_view[0].z + czm_view[1].y;
float cosValue = cos(camrot);
float sinValue = sin(camrot);
mat3 rotation = mat3(
cosValue, -sinValue, 0.0,
sinValue, cosValue, 0.0,
0.0, 0.0, 1.0
);
vec3 st1 = vec3(v_textureCoordinates * 2.0 - vec2(1.0), 1.0);
vec3 st2 = vec3((rotation * st1).xy, 1.0);
vec3 st3 = st2 * 0.5 + vec3(0.5);
vec2 lensStarTexcoord = st3.xy;
float weightForLensFlare = length(vec3(sunPos.xy, 0.0));
float oneMinusWeightForLensFlare = max(1.0 - weightForLensFlare, 0.0);
if (!isSpace)
{
result *= oneMinusWeightForLensFlare * intensity * 0.2;
}
else
{
result *= oneMinusWeightForLensFlare * intensity;
result *= texture(starTexture, lensStarTexcoord) * pow(weightForLensFlare, 1.0) * max((1.0 - length(vec3(st1.xy, 0.0))), 0.0) * 2.0;
}
result += texture(colorTexture, v_textureCoordinates);
out_FragColor = result;
}
`;var Leo=x(T(),1),oM=`uniform sampler2D colorTexture;
uniform vec3 white;
in vec2 v_textureCoordinates;
#ifdef AUTO_EXPOSURE
uniform sampler2D autoExposure;
#else
uniform float exposure;
#endif
// See equation 4:
// http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf
void main()
{
vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
vec3 color = fragmentColor.rgb;
#ifdef AUTO_EXPOSURE
float exposure = texture(autoExposure, vec2(0.5)).r;
color /= exposure;
#else
color *= vec3(exposure);
#endif
color = (color * (1.0 + color / white)) / (1.0 + color);
color = czm_inverseGamma(color);
out_FragColor = vec4(color, fragmentColor.a);
}
`;var veo=x(T(),1),rM=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
float rand(vec2 co)
{
return fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);
}
void main(void)
{
float noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;
vec3 rgb = texture(colorTexture, v_textureCoordinates).rgb;
vec3 green = vec3(0.0, 1.0, 0.0);
out_FragColor = vec4((noiseValue + rgb) * green, 1.0);
}
`;var Ieo=x(T(),1),sM=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
#ifdef AUTO_EXPOSURE
uniform sampler2D autoExposure;
#else
uniform float exposure;
#endif
// See equation 3:
// http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf
void main()
{
vec4 fragmentColor = texture(colorTexture, v_textureCoordinates);
vec3 color = fragmentColor.rgb;
#ifdef AUTO_EXPOSURE
float exposure = texture(autoExposure, vec2(0.5)).r;
color /= exposure;
#else
color *= vec3(exposure);
#endif
color = color / (1.0 + color);
color = czm_inverseGamma(color);
out_FragColor = vec4(color, fragmentColor.a);
}
`;var Xeo=x(T(),1),aM=`uniform sampler2D colorTexture;
uniform sampler2D silhouetteTexture;
in vec2 v_textureCoordinates;
void main(void)
{
vec4 silhouetteColor = texture(silhouetteTexture, v_textureCoordinates);
vec4 color = texture(colorTexture, v_textureCoordinates);
out_FragColor = mix(color, silhouetteColor, silhouetteColor.a);
}
`;var Yeo=x(T(),1);/**
* @license
* Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of NVIDIA CORPORATION nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/var cM=`/**
* @license
* Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of NVIDIA CORPORATION nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS \`\`AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// NVIDIA GameWorks Graphics Samples GitHub link: https://github.com/NVIDIAGameWorks/GraphicsSamples
// Original source (archived): https://archive.org/details/nvidiagame-works-graphics-samples-master
// Original FXAA 3.11 shader link: https://github.com/NVIDIAGameWorks/GraphicsSamples/blob/master/samples/es3-kepler/FXAA/FXAA3_11.h
// Shader link in fork: https://github.com/lyntel/GraphicsSamples/blob/3d30817ebeeade64fe6a4fc3aa1fe4265c29b6fd/samples/es3-kepler/FXAA/FXAA3_11.h
// Steps used to integrate into Cesium:
// * The following defines are set:
// #define FXAA_PC 1
// #define FXAA_WEBGL_1 1
// #define FXAA_GREEN_AS_LUMA 1
// #define FXAA_EARLY_EXIT 1
// #define FXAA_GLSL_120 1
// * All other preprocessor directives besides the FXAA_QUALITY__P* directives were removed.
// * Double underscores are invalid for preprocessor directives so replace them with a single underscore. Replace
// /FXAA_QUALITY__P(.*)/g with /FXAA_QUALITY__P$1/.
// * There are no implicit conversions from ivec* to vec* so replace:
// #define FxaaInt2 ivec2
// with
// #define FxaaInt2 vec2
// * The texture2DLod function is only available in vertex shaders so replace:
// #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)
// #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)
// with
// #define FxaaTexTop(t, p) texture(t, p)
// #define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))
// * FXAA_QUALITY_PRESET is prepended in the javascript code. We may want to expose that setting in the future.
// * The following parameters to FxaaPixelShader are unused and can be removed:
// fxaaConsolePosPos
// fxaaConsoleRcpFrameOpt
// fxaaConsoleRcpFrameOpt2
// fxaaConsole360RcpFrameOpt2
// fxaaConsoleEdgeSharpness
// fxaaConsoleEdgeThreshold
// fxaaConsoleEdgeThresholdMi
// fxaaConsole360ConstDir
//
// Choose the quality preset.
// This needs to be compiled into the shader as it effects code.
// Best option to include multiple presets is to
// in each shader define the preset, then include this file.
//
// OPTIONS
// -----------------------------------------------------------------------
// 10 to 15 - default medium dither (10=fastest, 15=highest quality)
// 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)
// 39 - no dither, very expensive
//
// NOTES
// -----------------------------------------------------------------------
// 12 = slightly faster then FXAA 3.9 and higher edge quality (default)
// 13 = about same speed as FXAA 3.9 and better than 12
// 23 = closest to FXAA 3.9 visually and performance wise
// _ = the lowest digit is directly related to performance
// _ = the highest digit is directly related to style
//
//#define FXAA_QUALITY_PRESET 12
#if (FXAA_QUALITY_PRESET == 10)
#define FXAA_QUALITY_PS 3
#define FXAA_QUALITY_P0 1.5
#define FXAA_QUALITY_P1 3.0
#define FXAA_QUALITY_P2 12.0
#endif
#if (FXAA_QUALITY_PRESET == 11)
#define FXAA_QUALITY_PS 4
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 3.0
#define FXAA_QUALITY_P3 12.0
#endif
#if (FXAA_QUALITY_PRESET == 12)
#define FXAA_QUALITY_PS 5
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 4.0
#define FXAA_QUALITY_P4 12.0
#endif
#if (FXAA_QUALITY_PRESET == 13)
#define FXAA_QUALITY_PS 6
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 4.0
#define FXAA_QUALITY_P5 12.0
#endif
#if (FXAA_QUALITY_PRESET == 14)
#define FXAA_QUALITY_PS 7
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 4.0
#define FXAA_QUALITY_P6 12.0
#endif
#if (FXAA_QUALITY_PRESET == 15)
#define FXAA_QUALITY_PS 8
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 2.0
#define FXAA_QUALITY_P6 4.0
#define FXAA_QUALITY_P7 12.0
#endif
#if (FXAA_QUALITY_PRESET == 20)
#define FXAA_QUALITY_PS 3
#define FXAA_QUALITY_P0 1.5
#define FXAA_QUALITY_P1 2.0
#define FXAA_QUALITY_P2 8.0
#endif
#if (FXAA_QUALITY_PRESET == 21)
#define FXAA_QUALITY_PS 4
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 8.0
#endif
#if (FXAA_QUALITY_PRESET == 22)
#define FXAA_QUALITY_PS 5
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 8.0
#endif
#if (FXAA_QUALITY_PRESET == 23)
#define FXAA_QUALITY_PS 6
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 8.0
#endif
#if (FXAA_QUALITY_PRESET == 24)
#define FXAA_QUALITY_PS 7
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 3.0
#define FXAA_QUALITY_P6 8.0
#endif
#if (FXAA_QUALITY_PRESET == 25)
#define FXAA_QUALITY_PS 8
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 2.0
#define FXAA_QUALITY_P6 4.0
#define FXAA_QUALITY_P7 8.0
#endif
#if (FXAA_QUALITY_PRESET == 26)
#define FXAA_QUALITY_PS 9
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 2.0
#define FXAA_QUALITY_P6 2.0
#define FXAA_QUALITY_P7 4.0
#define FXAA_QUALITY_P8 8.0
#endif
#if (FXAA_QUALITY_PRESET == 27)
#define FXAA_QUALITY_PS 10
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 2.0
#define FXAA_QUALITY_P6 2.0
#define FXAA_QUALITY_P7 2.0
#define FXAA_QUALITY_P8 4.0
#define FXAA_QUALITY_P9 8.0
#endif
#if (FXAA_QUALITY_PRESET == 28)
#define FXAA_QUALITY_PS 11
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 2.0
#define FXAA_QUALITY_P6 2.0
#define FXAA_QUALITY_P7 2.0
#define FXAA_QUALITY_P8 2.0
#define FXAA_QUALITY_P9 4.0
#define FXAA_QUALITY_P10 8.0
#endif
#if (FXAA_QUALITY_PRESET == 29)
#define FXAA_QUALITY_PS 12
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.5
#define FXAA_QUALITY_P2 2.0
#define FXAA_QUALITY_P3 2.0
#define FXAA_QUALITY_P4 2.0
#define FXAA_QUALITY_P5 2.0
#define FXAA_QUALITY_P6 2.0
#define FXAA_QUALITY_P7 2.0
#define FXAA_QUALITY_P8 2.0
#define FXAA_QUALITY_P9 2.0
#define FXAA_QUALITY_P10 4.0
#define FXAA_QUALITY_P11 8.0
#endif
#if (FXAA_QUALITY_PRESET == 39)
#define FXAA_QUALITY_PS 12
#define FXAA_QUALITY_P0 1.0
#define FXAA_QUALITY_P1 1.0
#define FXAA_QUALITY_P2 1.0
#define FXAA_QUALITY_P3 1.0
#define FXAA_QUALITY_P4 1.0
#define FXAA_QUALITY_P5 1.5
#define FXAA_QUALITY_P6 2.0
#define FXAA_QUALITY_P7 2.0
#define FXAA_QUALITY_P8 2.0
#define FXAA_QUALITY_P9 2.0
#define FXAA_QUALITY_P10 4.0
#define FXAA_QUALITY_P11 8.0
#endif
#define FxaaBool bool
#define FxaaFloat float
#define FxaaFloat2 vec2
#define FxaaFloat3 vec3
#define FxaaFloat4 vec4
#define FxaaHalf float
#define FxaaHalf2 vec2
#define FxaaHalf3 vec3
#define FxaaHalf4 vec4
#define FxaaInt2 vec2
#define FxaaTex sampler2D
#define FxaaSat(x) clamp(x, 0.0, 1.0)
#define FxaaTexTop(t, p) texture(t, p)
#define FxaaTexOff(t, p, o, r) texture(t, p + (o * r))
FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }
FxaaFloat4 FxaaPixelShader(
//
// Use noperspective interpolation here (turn off perspective interpolation).
// {xy} = center of pixel
FxaaFloat2 pos,
//
// Input color texture.
// {rgb_} = color in linear or perceptual color space
// if (FXAA_GREEN_AS_LUMA == 0)
// {___a} = luma in perceptual color space (not linear)
FxaaTex tex,
//
// Only used on FXAA Quality.
// This must be from a constant/uniform.
// {x_} = 1.0/screenWidthInPixels
// {_y} = 1.0/screenHeightInPixels
FxaaFloat2 fxaaQualityRcpFrame,
//
// Only used on FXAA Quality.
// This used to be the FXAA_QUALITY_SUBPIX define.
// It is here now to allow easier tuning.
// Choose the amount of sub-pixel aliasing removal.
// This can effect sharpness.
// 1.00 - upper limit (softer)
// 0.75 - default amount of filtering
// 0.50 - lower limit (sharper, less sub-pixel aliasing removal)
// 0.25 - almost off
// 0.00 - completely off
FxaaFloat fxaaQualitySubpix,
//
// Only used on FXAA Quality.
// This used to be the FXAA_QUALITY_EDGE_THRESHOLD define.
// It is here now to allow easier tuning.
// The minimum amount of local contrast required to apply algorithm.
// 0.333 - too little (faster)
// 0.250 - low quality
// 0.166 - default
// 0.125 - high quality
// 0.063 - overkill (slower)
FxaaFloat fxaaQualityEdgeThreshold,
//
// Only used on FXAA Quality.
// This used to be the FXAA_QUALITY_EDGE_THRESHOLD_MIN define.
// It is here now to allow easier tuning.
// Trims the algorithm from processing darks.
// 0.0833 - upper limit (default, the start of visible unfiltered edges)
// 0.0625 - high quality (faster)
// 0.0312 - visible limit (slower)
// Special notes when using FXAA_GREEN_AS_LUMA,
// Likely want to set this to zero.
// As colors that are mostly not-green
// will appear very dark in the green channel!
// Tune by looking at mostly non-green content,
// then start at zero and increase until aliasing is a problem.
FxaaFloat fxaaQualityEdgeThresholdMin
) {
/*--------------------------------------------------------------------------*/
FxaaFloat2 posM;
posM.x = pos.x;
posM.y = pos.y;
FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);
#define lumaM rgbyM.y
FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));
FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));
FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));
FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));
/*--------------------------------------------------------------------------*/
FxaaFloat maxSM = max(lumaS, lumaM);
FxaaFloat minSM = min(lumaS, lumaM);
FxaaFloat maxESM = max(lumaE, maxSM);
FxaaFloat minESM = min(lumaE, minSM);
FxaaFloat maxWN = max(lumaN, lumaW);
FxaaFloat minWN = min(lumaN, lumaW);
FxaaFloat rangeMax = max(maxWN, maxESM);
FxaaFloat rangeMin = min(minWN, minESM);
FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;
FxaaFloat range = rangeMax - rangeMin;
FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);
FxaaBool earlyExit = range < rangeMaxClamped;
/*--------------------------------------------------------------------------*/
if(earlyExit)
return rgbyM;
/*--------------------------------------------------------------------------*/
FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));
FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));
FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));
FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));
/*--------------------------------------------------------------------------*/
FxaaFloat lumaNS = lumaN + lumaS;
FxaaFloat lumaWE = lumaW + lumaE;
FxaaFloat subpixRcpRange = 1.0/range;
FxaaFloat subpixNSWE = lumaNS + lumaWE;
FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;
FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;
/*--------------------------------------------------------------------------*/
FxaaFloat lumaNESE = lumaNE + lumaSE;
FxaaFloat lumaNWNE = lumaNW + lumaNE;
FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;
FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;
/*--------------------------------------------------------------------------*/
FxaaFloat lumaNWSW = lumaNW + lumaSW;
FxaaFloat lumaSWSE = lumaSW + lumaSE;
FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);
FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);
FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;
FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;
FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;
FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;
/*--------------------------------------------------------------------------*/
FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;
FxaaFloat lengthSign = fxaaQualityRcpFrame.x;
FxaaBool horzSpan = edgeHorz >= edgeVert;
FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;
/*--------------------------------------------------------------------------*/
if(!horzSpan) lumaN = lumaW;
if(!horzSpan) lumaS = lumaE;
if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;
FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;
/*--------------------------------------------------------------------------*/
FxaaFloat gradientN = lumaN - lumaM;
FxaaFloat gradientS = lumaS - lumaM;
FxaaFloat lumaNN = lumaN + lumaM;
FxaaFloat lumaSS = lumaS + lumaM;
FxaaBool pairN = abs(gradientN) >= abs(gradientS);
FxaaFloat gradient = max(abs(gradientN), abs(gradientS));
if(pairN) lengthSign = -lengthSign;
FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);
/*--------------------------------------------------------------------------*/
FxaaFloat2 posB;
posB.x = posM.x;
posB.y = posM.y;
FxaaFloat2 offNP;
offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;
offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;
if(!horzSpan) posB.x += lengthSign * 0.5;
if( horzSpan) posB.y += lengthSign * 0.5;
/*--------------------------------------------------------------------------*/
FxaaFloat2 posN;
posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;
posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;
FxaaFloat2 posP;
posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;
posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;
FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;
FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));
FxaaFloat subpixE = subpixC * subpixC;
FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));
/*--------------------------------------------------------------------------*/
if(!pairN) lumaNN = lumaSS;
FxaaFloat gradientScaled = gradient * 1.0/4.0;
FxaaFloat lumaMM = lumaM - lumaNN * 0.5;
FxaaFloat subpixF = subpixD * subpixE;
FxaaBool lumaMLTZero = lumaMM < 0.0;
/*--------------------------------------------------------------------------*/
lumaEndN -= lumaNN * 0.5;
lumaEndP -= lumaNN * 0.5;
FxaaBool doneN = abs(lumaEndN) >= gradientScaled;
FxaaBool doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;
FxaaBool doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;
/*--------------------------------------------------------------------------*/
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;
/*--------------------------------------------------------------------------*/
#if (FXAA_QUALITY_PS > 3)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;
/*--------------------------------------------------------------------------*/
#if (FXAA_QUALITY_PS > 4)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;
/*--------------------------------------------------------------------------*/
#if (FXAA_QUALITY_PS > 5)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;
/*--------------------------------------------------------------------------*/
#if (FXAA_QUALITY_PS > 6)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;
/*--------------------------------------------------------------------------*/
#if (FXAA_QUALITY_PS > 7)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;
/*--------------------------------------------------------------------------*/
#if (FXAA_QUALITY_PS > 8)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;
/*--------------------------------------------------------------------------*/
#if (FXAA_QUALITY_PS > 9)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;
/*--------------------------------------------------------------------------*/
#if (FXAA_QUALITY_PS > 10)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;
/*--------------------------------------------------------------------------*/
#if (FXAA_QUALITY_PS > 11)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;
/*--------------------------------------------------------------------------*/
#if (FXAA_QUALITY_PS > 12)
if(doneNP) {
if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));
if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));
if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;
if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;
doneN = abs(lumaEndN) >= gradientScaled;
doneP = abs(lumaEndP) >= gradientScaled;
if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;
if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;
doneNP = (!doneN) || (!doneP);
if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;
if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;
/*--------------------------------------------------------------------------*/
}
#endif
/*--------------------------------------------------------------------------*/
}
#endif
/*--------------------------------------------------------------------------*/
}
#endif
/*--------------------------------------------------------------------------*/
}
#endif
/*--------------------------------------------------------------------------*/
}
#endif
/*--------------------------------------------------------------------------*/
}
#endif
/*--------------------------------------------------------------------------*/
}
#endif
/*--------------------------------------------------------------------------*/
}
#endif
/*--------------------------------------------------------------------------*/
}
#endif
/*--------------------------------------------------------------------------*/
}
#endif
/*--------------------------------------------------------------------------*/
}
/*--------------------------------------------------------------------------*/
FxaaFloat dstN = posM.x - posN.x;
FxaaFloat dstP = posP.x - posM.x;
if(!horzSpan) dstN = posM.y - posN.y;
if(!horzSpan) dstP = posP.y - posM.y;
/*--------------------------------------------------------------------------*/
FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;
FxaaFloat spanLength = (dstP + dstN);
FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;
FxaaFloat spanLengthRcp = 1.0/spanLength;
/*--------------------------------------------------------------------------*/
FxaaBool directionN = dstN < dstP;
FxaaFloat dst = min(dstN, dstP);
FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;
FxaaFloat subpixG = subpixF * subpixF;
FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;
FxaaFloat subpixH = subpixG * fxaaQualitySubpix;
/*--------------------------------------------------------------------------*/
FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;
FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);
if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;
if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;
return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);
}
`;var Heo=x(T(),1);function cA(){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 yi,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new M,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}Object.defineProperties(cA.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 zRe(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 SZt(e,t){zRe(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 yi,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 HRe(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 AZt(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 ZZt(e,t){let n=`uniform sampler2D colorTexture;
in vec2 v_textureCoordinates;
float sampleTexture(vec2 offset) {
`;return e===0?n+=` vec4 color = texture(colorTexture, v_textureCoordinates + offset);
return czm_luminance(color.rgb);
`:n+=` return texture(colorTexture, v_textureCoordinates + offset).r;
`,n+=`}
`,n+=`uniform vec2 colorTextureDimensions;
uniform vec2 minMaxLuminance;
uniform sampler2D previousLuminance;
void main() {
float color = 0.0;
float xStep = 1.0 / colorTextureDimensions.x;
float yStep = 1.0 / colorTextureDimensions.y;
int count = 0;
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 3; ++j) {
vec2 offset;
offset.x = -xStep + float(i) * xStep;
offset.y = -yStep + float(j) * yStep;
if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) {
continue;
}
color += sampleTexture(offset);
++count;
}
}
if (count > 0) {
color /= float(count);
}
`,e===t-1&&(n+=` float previous = texture(previousLuminance, vec2(0.5)).r;
color = clamp(color, minMaxLuminance.x, minMaxLuminance.y);
color = previous + (color - previous) / (60.0 * 1.5);
color = clamp(color, minMaxLuminance.x, minMaxLuminance.y);
`),n+=` out_FragColor = vec4(color);
}
`,n}function CZt(e,t){HRe(e);let n=e._framebuffers,i=n.length,o=new Array(i);for(let r=0;r<i;++r)o[r]=t.createViewportQuadCommand(ZZt(r,i),{framebuffer:n[r].framebuffer,uniformMap:AZt(e,r)});e._commands=o}cA.prototype.clear=function(e){let t=this._framebuffers;if(!l(t))return;let n=this._clearCommand;l(n)||(n=this._clearCommand=new si({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)};cA.prototype.update=function(e){let t=e.drawingBufferWidth,n=e.drawingBufferHeight;(t!==this._width||n!==this._height)&&(this._width=t,this._height=n,SZt(this,e),CZt(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};cA.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)};cA.prototype.isDestroyed=function(){return!1};cA.prototype.destroy=function(){return zRe(this),HRe(this),me(this)};var lM=cA;var bto=x(T(),1);var Jeo=x(T(),1),VZt={NEAREST:0,LINEAR:1},Ou=VZt;function lA(e){e=e??B.EMPTY_OBJECT;let{name:t=zn(),fragmentShader:n,uniforms:i,textureScale:o=1,forcePowerOfTwo:r=!1,sampleMode:s=Ou.NEAREST,pixelFormat:a=Ke.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 h=new Dc;h.scissorTest={enabled:!0,rectangle:l(u)?Qe.clone(u):new Qe},this._passState=h,this._ready=!1,this._name=t,this._logDepthChanged=void 0,this._useLogDepth=void 0,this._selectedIdTexture=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0,this._textureCache=void 0,this._index=void 0,this.enabled=!0,this._enabled=!0}Object.defineProperties(lA.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 RZt=/uniform\s+sampler2D\s+depthTexture/g;lA.prototype._isSupported=function(e){return!RZt.test(this._fragmentShader)||e.depthTexture};function EZt(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 Et&&!l(e._textureCache.getStageByName(n))&&(e._texturesToRelease.push(a),delete s[n],delete s[`${n}Dimensions`]),r instanceof Et&&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 GZt(e,t){return function(){let n=e._actualUniforms[t];return typeof n=="function"?n():n}}function LZt(e,t){return function(){let n=e[t]();if(l(n))return n.dimensions}}function WZt(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]=GZt(e,r),n[r]=EZt(e,i,r)):(t[r]=i[r],n[r]=i[r]),o[r]=i[r];let s=t[r]();(typeof s=="string"||s instanceof Et||s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement)&&(t[`${r}Dimensions`]=LZt(t,r))}e._uniforms={},Object.defineProperties(e._uniforms,n),e._uniformMap=Rt(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 vZt(e,t){return e=e.replace(/in\s+vec2\s+v_textureCoordinates;/g,""),`#define CZM_SELECTED_FEATURE
uniform sampler2D czm_idTexture;
uniform sampler2D czm_selectedIdTexture;
uniform float czm_selectedIdTextureStep;
in vec2 v_textureCoordinates;
bool czm_selected(vec2 offset)
{
bool selected = false;
vec4 id = texture(czm_idTexture, v_textureCoordinates + offset);
for (int i = 0; i < ${t}; ++i)
{
vec4 selectedId = texture(czm_selectedIdTexture, vec2((float(i) + 0.5) * czm_selectedIdTextureStep, 0.5));
if (all(equal(id, selectedId)))
{
return true;
}
}
return false;
}
bool czm_selected()
{
return czm_selected(vec2(0.0));
}
${e}`}function FZt(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=vZt(n,o)}let i=new Be({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[n]});e._command=t.createViewportQuadCommand(i,{uniformMap:e._uniformMap,owner:e})}function IZt(e){let t=e._sampleMode,n,i;t===Ou.LINEAR?(n=kt.LINEAR,i=ni.LINEAR):(n=kt.NEAREST,i=ni.NEAREST);let o=e._sampler;(!l(o)||o.minificationFilter!==n||o.magnificationFilter!==i)&&(e._sampler=new Ut({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:i}))}function PZt(e,t){return function(n){e._texturesToCreate.push({name:t,source:n})}}function XZt(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function NZt(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 Et({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]=XZt(e,d);else if(typeof d=="string"){let h=new We({url:d});s.push(h.fetchImage().then(PZt(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 KRe(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 Et&&(l(t.getStageByName(n[o]))||r.destroy(),e._dirtyUniforms.push(o))}}function YZt(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 wZt(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 Et({context:t,pixelFormat:Ke.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,source:{arrayBufferView:s,width:1,height:1},sampler:Ut.NEAREST});return}let o=0,r=new Uint8Array(i*4);for(let s=0;s<n.length;++s){let a=n[s];if(l(a.pickIds)){let c=a.pickIds,d=c.length;for(let u=0;u<d;++u){let h=c[u].color;r[o]=U.floatToByte(h.red),r[o+1]=U.floatToByte(h.green),r[o+2]=U.floatToByte(h.blue),r[o+3]=U.floatToByte(h.alpha),o+=4}}else if(l(a.pickId)){let c=a.pickId.color;r[o]=U.floatToByte(c.red),r[o+1]=U.floatToByte(c.green),r[o+2]=U.floatToByte(c.blue),r[o+3]=U.floatToByte(c.alpha),o+=4}}e._selectedIdTexture=new Et({context:t,pixelFormat:Ke.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,source:{arrayBufferView:r,width:i,height:1},sampler:Ut.NEAREST})}lA.prototype.update=function(e,t){if(this.enabled!==this._enabled&&!this.enabled&&KRe(this),this._enabled=this.enabled,!this._enabled||(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=YZt(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,wZt(this,e),WZt(this),NZt(this,e),FZt(this,e),IZt(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 Qe(0,0,i.width,i.height)}))),this._command.renderState=o};lA.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,Ut.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)};lA.prototype.isDestroyed=function(){return!1};lA.prototype.destroy=function(){return KRe(this),me(this)};var Vo=lA;var Sto=x(T(),1);function dA(e){e=e??B.EMPTY_OBJECT,this._stages=e.stages,this._inputPreviousStageTexture=e.inputPreviousStageTexture??!0;let t=e.name;l(t)||(t=zn()),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(dA.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}}});dA.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};dA.prototype.get=function(e){return this._stages[e]};function MZt(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}dA.prototype.update=function(e,t){this._selectedDirty=MZt(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)}};dA.prototype.isDestroyed=function(){return!1};dA.prototype.destroy=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)e[n].destroy();return me(this)};var Hd=dA;var $r={};function gee(e){let o=`#define USE_STEP_SIZE
${kx}`,r=new Vo({name:`${e}_x_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:0},sampleMode:Ou.LINEAR}),s=new Vo({name:`${e}_y_direction`,fragmentShader:o,uniforms:{delta:1,sigma:2,stepSize:1,direction:1},sampleMode:Ou.LINEAR}),a={};return Object.defineProperties(a,{delta:{get:function(){return r.uniforms.delta},set:function(c){let d=r.uniforms,u=s.uniforms;d.delta=u.delta=c}},sigma:{get:function(){return r.uniforms.sigma},set:function(c){let d=r.uniforms,u=s.uniforms;d.sigma=u.sigma=c}},stepSize:{get:function(){return r.uniforms.stepSize},set:function(c){let d=r.uniforms,u=s.uniforms;d.stepSize=u.stepSize=c}}}),new Hd({name:e,stages:[r,s],uniforms:a})}$r.createBlurStage=function(){return gee("czm_blur")};$r.createDepthOfFieldStage=function(){let e=gee("czm_depth_of_field_blur"),t=new Vo({name:"czm_depth_of_field_composite",fragmentShader:Qw,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 Hd({name:"czm_depth_of_field",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})};$r.isDepthOfFieldSupported=function(e){return e.context.depthTexture};$r.createEdgeDetectionStage=function(){let e=zn();return new Vo({name:`czm_edge_detection_${e}`,fragmentShader:$w,uniforms:{length:.25,color:U.clone(U.BLACK)}})};$r.isEdgeDetectionSupported=function(e){return e.context.depthTexture};function kZt(e){if(!l(e))return $r.createEdgeDetectionStage();let t=new Hd({name:"czm_edge_detection_multiple",stages:e,inputPreviousStageTexture:!1}),n={},i="",o="";for(let a=0;a<e.length;++a)i+=`uniform sampler2D edgeTexture${a};
`,o+=` vec4 edge${a} = texture(edgeTexture${a}, v_textureCoordinates);
if (edge${a}.a > 0.0)
{
color = edge${a};
break;
}
`,n[`edgeTexture${a}`]=e[a].name;let r=`${i}in vec2 v_textureCoordinates;
void main() {
vec4 color = vec4(0.0);
for (int i = 0; i < ${e.length}; i++)
{
${o} }
out_FragColor = color;
}
`,s=new Vo({name:"czm_edge_detection_combine",fragmentShader:r,uniforms:n});return new Hd({name:"czm_edge_detection_composite",stages:[t,s]})}$r.createSilhouetteStage=function(e){let t=kZt(e),n=new Vo({name:"czm_silhouette_color_edges",fragmentShader:aM,uniforms:{silhouetteTexture:t.name}});return new Hd({name:"czm_silhouette",stages:[t,n],inputPreviousStageTexture:!1,uniforms:t.uniforms})};$r.isSilhouetteSupported=function(e){return e.context.depthTexture};$r.createBloomStage=function(){let e=new Vo({name:"czm_bloom_contrast_bias",fragmentShader:jw,uniforms:{contrast:128,brightness:-.3}}),t=gee("czm_bloom_blur"),n=new Hd({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),i=new Vo({name:"czm_bloom_generate_composite",fragmentShader:Kw,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 Hd({name:"czm_bloom",stages:[n,i],inputPreviousStageTexture:!1,uniforms:o})};$r.createAmbientOcclusionStage=function(){let e=new Vo({name:"czm_ambient_occlusion_generate",fragmentShader:Bw,uniforms:{intensity:3,bias:.1,lengthCap:.26,directionCount:8,stepCount:32,randomTexture:void 0}}),t=new Vo({name:"czm_ambient_occlusion_composite",fragmentShader:zw,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 Hd({name:"czm_ambient_occlusion",stages:[e,t],inputPreviousStageTexture:!1,uniforms:n})};$r.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var UZt=`#define FXAA_QUALITY_PRESET 39
${cM}
${nM}`;$r.createFXAAStage=function(){return new Vo({name:"czm_FXAA",fragmentShader:UZt,sampleMode:Ou.LINEAR})};$r.createAcesTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
`:"";return t+=Ow,new Vo({name:"czm_aces",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};$r.createFilmicTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
`:"";return t+=eM,new Vo({name:"czm_filmic",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};$r.createPbrNeutralTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
`:"";return t+=tM,new Vo({name:"czm_pbr_neutral",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};$r.createReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
`:"";return t+=sM,new Vo({name:"czm_reinhard",fragmentShader:t,uniforms:{autoExposure:void 0,exposure:1}})};$r.createModifiedReinhardTonemappingStage=function(e){let t=e?`#define AUTO_EXPOSURE
`:"";return t+=oM,new Vo({name:"czm_modified_reinhard",fragmentShader:t,uniforms:{white:U.WHITE,autoExposure:void 0,exposure:1}})};$r.createAutoExposureStage=function(){return new lM};$r.createBlackAndWhiteStage=function(){return new Vo({name:"czm_black_and_white",fragmentShader:Hw,uniforms:{gradations:5}})};$r.createBrightnessStage=function(){return new Vo({name:"czm_brightness",fragmentShader:Jw,uniforms:{brightness:.5}})};$r.createNightVisionStage=function(){return new Vo({name:"czm_night_vision",fragmentShader:rM})};$r.createDepthViewStage=function(){return new Vo({name:"czm_depth_view",fragmentShader:qw})};$r.createLensFlareStage=function(){return new Vo({name:"czm_lens_flare",fragmentShader:iM,uniforms:{dirtTexture:Kt("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:Kt("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,dirtAmount:.4,earthRadius:ie.WGS84.maximumRadius}})};var Bu=$r;var ano=x(T(),1);function Cg(e){this._collection=e,this._framebuffers=[],this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0,this._updateDependencies=!1}function uM(e){for(;l(e.length);)e=e.get(e.length-1);return e.name}function yee(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[uM(a)]=!0}let s=i.uniforms;if(l(s)){let a=Object.getOwnPropertyNames(s),c=a.length;for(let d=0;d<c;++d){let u=s[a[d]];if(typeof u=="string"){let h=e.getStageByName(u);l(h)&&(r[uM(h)]=!0)}}}return i.name}function dM(e,t,n,i,o){if(l(i.enabled)&&!i.enabled||l(i._isSupported)&&!i._isSupported(t))return o;let r=o,s=!l(i.inputPreviousStageTexture)||i.inputPreviousStageTexture,a=o,c=i.length;for(let h=0;h<c;++h){let p=i.get(h);l(p.length)?a=dM(e,t,n,p,o):a=yee(e,t,n,p,o),s&&(o=a)}let d,u;if(s)for(d=1;d<c;++d)u=uM(i.get(d)),l(n[u])||(n[u]={}),n[u][r]=!0;else for(d=1;d<c;++d){u=uM(i.get(d));let h=n[u];for(let p=0;p<d;++p)h[uM(i.get(p))]=!0}return a}function DZt(e,t){let n={};if(l(e.ambientOcclusion)){let i=e.ambientOcclusion,o=e.bloom,r=e._tonemapping,s=e.fxaa,a=dM(e,t,n,i,void 0);a=dM(e,t,n,o,a),a=yee(e,t,n,r,a),a=dM(e,t,n,e,a),yee(e,t,n,s,a)}else dM(e,t,n,e,void 0);return n}function OZt(e,t,n){let o=e._collection.getStageByName(t),r=o._textureScale,s=o._forcePowerOfTwo,a=o._pixelFormat,c=o._pixelDatatype,d=o._clearColor,u,h,p=e._framebuffers,b=p.length;for(u=0;u<b;++u){if(h=p[u],r!==h.textureScale||s!==h.forcePowerOfTwo||a!==h.pixelFormat||c!==h.pixelDatatype||!U.equals(d,h.clearColor))continue;let f=h.stages,y=f.length,_=!1;for(let S=0;S<y;++S)if(n[f[S]]){_=!0;break}if(!_)break}return l(h)&&u<b?(h.stages.push(t),h):(h={textureScale:r,forcePowerOfTwo:s,pixelFormat:a,pixelDatatype:c,clearColor:d,stages:[t],buffer:new yi({pixelFormat:a,pixelDatatype:c}),clear:void 0},p.push(h),h)}function BZt(e,t){let n=DZt(e._collection,t);for(let i in n)n.hasOwnProperty(i)&&(e._stageNameToFramebuffer[i]=OZt(e,i,n[i]))}function xee(e){let t=e._framebuffers,n=t.length;for(let i=0;i<n;++i)t[i].buffer.destroy()}function zZt(e,t){let n=e._width,i=e._height,o=e._framebuffers,r=o.length;for(let s=0;s<r;++s){let a=o[s],c=a.textureScale,d=Math.ceil(n*c),u=Math.ceil(i*c),h=Math.min(d,u);a.forcePowerOfTwo&&(W.isPowerOfTwo(h)||(h=W.nextPowerOfTwo(h)),d=h,u=h),a.buffer.update(t,d,u),a.clear=new si({color:a.clearColor,framebuffer:a.buffer.framebuffer})}}Cg.prototype.updateDependencies=function(){this._updateDependencies=!0};Cg.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)&&(xee(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),!n&&!a)return;this._framebuffers.length===0&&BZt(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,xee(this),zZt(this,e))};Cg.prototype.clear=function(e){let t=this._framebuffers;for(let n=0;n<t.length;++n)t[n].clear.execute(e)};Cg.prototype.getStageByName=function(e){return this._collection.getStageByName(e)};Cg.prototype.getOutputTexture=function(e){return this._collection.getOutputTexture(e)};Cg.prototype.getFramebuffer=function(e){let t=this._stageNameToFramebuffer[e];if(l(t))return t.buffer.framebuffer};Cg.prototype.isDestroyed=function(){return!1};Cg.prototype.destroy=function(){return xee(this),me(this)};var uA=Cg;var lno=x(T(),1),JRe={REINHARD:"REINHARD",MODIFIED_REINHARD:"MODIFIED_REINHARD",FILMIC:"FILMIC",ACES:"ACES",PBR_NEUTRAL:"PBR_NEUTRAL"};Object.freeze(JRe);var Vg=JRe;var Tee=[];function ad(){let e=Bu.createFXAAStage(),t=Bu.createAmbientOcclusionStage(),n=Bu.createBloomStage();this._autoExposureEnabled=!1,this._autoExposure=Bu.createAutoExposureStage(),this._exposure=1,this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=Vg.PBR_NEUTRAL;let i=this._tonemapping;e.enabled=!1,t.enabled=!1,n.enabled=!1,i.enabled=!1;let o=new uA(this),r={},s=Tee;for(s.push(e,t,n,i);s.length>0;){let c=s.pop();r[c.name]=c,c._textureCache=o;let d=c.length;if(l(d))for(let u=0;u<d;++u)s.push(c.get(u))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;let a=this;t.uniforms.randomTexture=function(){return a._randomTexture},this._ao=t,this._bloom=n,this._fxaa=e,this._aoEnabled=void 0,this._bloomEnabled=void 0,this._tonemappingEnabled=void 0,this._fxaaEnabled=void 0,this._activeStagesChanged=!1,this._stagesRemoved=!1,this._textureCacheDirty=!1,this._stageNames=r,this._textureCache=o}Object.defineProperties(ad.prototype,{ready:{get:function(){let e=!1,t=this._stages,n=t.length;for(let a=n-1;a>=0;--a){let c=t[a];e=e||c.ready&&c.enabled}let i=this._fxaa,o=this._ao,r=this._bloom,s=this._tonemapping;return e=e||i.ready&&i.enabled,e=e||o.ready&&o.enabled,e=e||r.ready&&r.enabled,e=e||s.ready&&s.enabled,e}},fxaa:{get:function(){return this._fxaa}},ambientOcclusion:{get:function(){return this._ao}},bloom:{get:function(){return this._bloom}},length:{get:function(){return _ee(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 Vg.REINHARD:n=Bu.createReinhardTonemappingStage(t);break;case Vg.MODIFIED_REINHARD:n=Bu.createModifiedReinhardTonemappingStage(t);break;case Vg.FILMIC:n=Bu.createFilmicTonemappingStage(t);break;case Vg.PBR_NEUTRAL:n=Bu.createPbrNeutralTonemappingStage(t);break;default:n=Bu.createAcesTonemappingStage(t);break}if(t){let i=this._autoExposure;n.uniforms.autoExposure=function(){return i.outputTexture}}else n.uniforms.exposure=this._exposure;this._tonemapper=e,this._tonemapping=n,l(this._stageNames)&&(this._stageNames[n.name]=n,n._textureCache=this._textureCache),this._textureCacheDirty=!0}},exposure:{get:function(){return this._exposure},set:function(e){this._tonemapping.uniforms.exposure=e,this._exposure=e}}});function _ee(e){if(!e._stagesRemoved)return;e._stagesRemoved=!1;let t=[],n=e._stages;for(let i=0,o=0;i<n.length;++i){let r=n[i];r&&(r._index=o++,t.push(r))}e._stages=t}ad.prototype.add=function(e){let t=this._stageNames,n=Tee;for(n.push(e);n.length>0;){let o=n.pop();t[o.name]=o,o._textureCache=this._textureCache;let r=o.length;if(l(r))for(let s=0;s<r;++s)n.push(o.get(s))}let i=this._stages;return e._index=i.length,i.push(e),this._textureCacheDirty=!0,e};ad.prototype.remove=function(e){if(!this.contains(e))return!1;let t=this._stageNames,n=Tee;for(n.push(e);n.length>0;){let i=n.pop();delete t[i.name];let o=i.length;if(l(o))for(let r=0;r<o;++r)n.push(i.get(r))}return this._stages[e._index]=void 0,this._stagesRemoved=!0,this._textureCacheDirty=!0,e._index=void 0,e._textureCache=void 0,e.destroy(),!0};ad.prototype.contains=function(e){return l(e)&&l(e._index)&&e._textureCache===this._textureCache};ad.prototype.get=function(e){return _ee(this),this._stages[e]};ad.prototype.removeAll=function(){let e=this._stages,t=e.length;for(let n=0;n<t;++n)this.remove(e[n]);e.length=0};ad.prototype.getStageByName=function(e){return this._stageNames[e]};ad.prototype.update=function(e,t,n){_ee(this);let i=this._activeStages,o=this._activeStages=this._previousActiveStages;this._previousActiveStages=i;let r=this._stages;o.length=r.length;let s=0;for(let S=0;S<r.length;++S){let A=r[S];A.ready&&A.enabled&&A._isSupported(e)&&(o[s++]=A)}o.length=s;let a=s!==i.length;if(!a){for(let S=0;S<s;++S)if(o[S]!==i[S]){a=!0;break}}let c=this._ao,d=this._bloom,u=this._autoExposure,h=this._tonemapping,p=this._fxaa;h.enabled=n;let b=c.enabled&&c._isSupported(e),f=d.enabled&&d._isSupported(e),y=h.enabled&&h._isSupported(e),_=p.enabled&&p._isSupported(e);if((a||this._textureCacheDirty||b!==this._aoEnabled||f!==this._bloomEnabled||y!==this._tonemappingEnabled||_!==this._fxaaEnabled)&&(this._textureCache.updateDependencies(),this._aoEnabled=b,this._bloomEnabled=f,this._tonemappingEnabled=y,this._fxaaEnabled=_,this._textureCacheDirty=!1),l(this._randomTexture)&&!b&&(this._randomTexture.destroy(),this._randomTexture=void 0),!l(this._randomTexture)&&b){let A=new Uint8Array(196608);for(let Z=0;Z<196608;Z+=3)A[Z]=Math.floor(Math.random()*255);this._randomTexture=new Et({context:e,pixelFormat:Ke.RGB,pixelDatatype:Oe.UNSIGNED_BYTE,source:{arrayBufferView:A,width:256,height:256},sampler:new Ut({wrapS:un.REPEAT,wrapT:un.REPEAT,minificationFilter:kt.NEAREST,magnificationFilter:ni.NEAREST})})}this._textureCache.update(e),p.update(e,t),c.update(e,t),d.update(e,t),h.update(e,t),this._autoExposureEnabled&&u.update(e,t);for(let S=0;S<r.length;++S)r[S].update(e,t);s=0;for(let S=0;S<r.length;++S){let A=r[S];A.ready&&A.enabled&&A._isSupported(e)&&s++}a=s!==o.length,a&&this.update(e,t,n)};ad.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)};function mA(e){for(;l(e.length);)e=e.get(e.length-1);return e.outputTexture}ad.prototype.getOutputTexture=function(e){let t=this.getStageByName(e);if(l(t))return mA(t)};function b0(e,t,n,i,o){if(l(e.execute)){e.execute(t,n,i,o);return}if(e.inputPreviousStageTexture){b0(e.get(0),t,n,i,o);for(let r=1;r<e.length;++r)b0(e.get(r),t,mA(e.get(r-1)),i,o)}else for(let r=0;r<e.length;++r)b0(e.get(r),t,n,i,o)}ad.prototype.execute=function(e,t,n,i){let o=this._activeStages,r=o.length,s=this._fxaa,a=this._ao,c=this._bloom,d=this._autoExposure,u=this._tonemapping,h=a.enabled&&a._isSupported(e),p=c.enabled&&c._isSupported(e),b=this._autoExposureEnabled,f=u.enabled&&u._isSupported(e),y=s.enabled&&s._isSupported(e);if(!y&&!h&&!p&&!f&&r===0)return;let _=t;h&&a.ready&&(b0(a,e,_,n,i),_=mA(a)),p&&c.ready&&(b0(c,e,_,n,i),_=mA(c)),b&&d.ready&&b0(d,e,_,n,i),f&&u.ready&&(b0(u,e,_,n,i),_=mA(u));let S=_;if(r>0){b0(o[0],e,_,n,i);for(let A=1;A<r;++A)b0(o[A],e,mA(o[A-1]),n,i);S=mA(o[r-1])}y&&s.ready&&b0(s,e,S,n,i)};ad.prototype.copy=function(e,t){if(!l(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(zd,{uniformMap:{colorTexture:function(){return n.outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};ad.prototype.isDestroyed=function(){return!1};ad.prototype.destroy=function(){return this._fxaa.destroy(),this._ao.destroy(),this._bloom.destroy(),this._autoExposure.destroy(),this._tonemapping.destroy(),this.removeAll(),this._textureCache=this._textureCache&&this._textureCache.destroy(),me(this)};var mM=ad;var iio=x(T(),1);var wno=x(T(),1);var Rno=x(T(),1),jRe={SHIFT:0,CTRL:1,ALT:2};Object.freeze(jRe);var Oa=jRe;var Gno=x(T(),1),QRe={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(QRe);var Vn=QRe;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 Ree(e,t){let n=e;return l(t)&&(n+=`+${t}`),n}function hA(e){if(e.shiftKey)return Oa.SHIFT;if(e.ctrlKey)return Oa.CTRL;if(e.altKey)return Oa.ALT}var _s={LEFT:0,MIDDLE:1,RIGHT:2};function zu(e,t,n,i){function o(r){i(e,r)}n.addEventListener(t,o,{capture:!1,passive:!1}),e._removalFunctions.push(function(){n.removeEventListener(t,o,!1)})}function HZt(e){let t=e._element,n=l(t.disableRootEvents)?t:document;an.supportsPointerEvents()?(zu(e,"pointerdown",t,$Zt),zu(e,"pointerup",t,a1e),zu(e,"pointermove",t,eCt),zu(e,"pointercancel",t,a1e)):(zu(e,"mousedown",t,c1e),zu(e,"mouseup",n,l1e),zu(e,"mousemove",n,d1e),zu(e,"touchstart",t,QZt),zu(e,"touchend",n,n1e),zu(e,"touchmove",n,qZt),zu(e,"touchcancel",n,n1e)),zu(e,"dblclick",t,JZt);let i;"onwheel"in t?i="wheel":document.onmousewheel!==void 0?i="mousewheel":i="DOMMouseScroll",zu(e,i,t,jZt)}function KZt(e){let t=e._removalFunctions;for(let n=0;n<t.length;++n)t[n]()}var qRe={position:new M};function Eee(e){e._lastSeenTouchEvent=Yi()}function Gee(e){return Yi()-e._lastSeenTouchEvent>Df.mouseEmulationIgnoreMilliseconds}function Vee(e,t,n){let i=e.x-t.x,o=e.y-t.y;return Math.sqrt(i*i+o*o)<n}function c1e(e,t){if(!Gee(e))return;let n=t.button;e._buttonDown[n]=!0;let i;if(n===_s.LEFT)i=Vn.LEFT_DOWN;else if(n===_s.MIDDLE)i=Vn.MIDDLE_DOWN;else if(n===_s.RIGHT)i=Vn.RIGHT_DOWN;else return;let o=Ux(e,t,e._primaryPosition);M.clone(o,e._primaryStartPosition),M.clone(o,e._primaryPreviousPosition);let r=hA(t),s=e.getInputAction(i,r);l(s)&&(M.clone(o,qRe.position),s(qRe),t.preventDefault())}var $Re={position:new M},e1e={position:new M};function See(e,t,n,i){let o=hA(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)&&(M.clone(a,$Re.position),r($Re)),l(s)){let c=e._primaryStartPosition;Vee(c,a,e._clickPixelTolerance)&&(M.clone(a,e1e.position),s(e1e))}}}function l1e(e,t){if(!Gee(e))return;let n=t.button;n!==_s.LEFT&&n!==_s.MIDDLE&&n!==_s.RIGHT||(e._buttonDown[_s.LEFT]&&(See(e,Vn.LEFT_UP,Vn.LEFT_CLICK,t),e._buttonDown[_s.LEFT]=!1),e._buttonDown[_s.MIDDLE]&&(See(e,Vn.MIDDLE_UP,Vn.MIDDLE_CLICK,t),e._buttonDown[_s.MIDDLE]=!1),e._buttonDown[_s.RIGHT]&&(See(e,Vn.RIGHT_UP,Vn.RIGHT_CLICK,t),e._buttonDown[_s.RIGHT]=!1))}var Aee={startPosition:new M,endPosition:new M};function d1e(e,t){if(!Gee(e))return;let n=hA(t),i=Ux(e,t,e._primaryPosition),o=e._primaryPreviousPosition,r=e.getInputAction(Vn.MOUSE_MOVE,n);l(r)&&(M.clone(o,Aee.startPosition),M.clone(i,Aee.endPosition),r(Aee)),M.clone(i,o),(e._buttonDown[_s.LEFT]||e._buttonDown[_s.MIDDLE]||e._buttonDown[_s.RIGHT])&&t.preventDefault()}var t1e={position:new M};function JZt(e,t){let n=t.button,i;if(n===_s.LEFT)i=Vn.LEFT_DOUBLE_CLICK;else return;let o=hA(t),r=e.getInputAction(i,o);l(r)&&(Ux(e,t,t1e.position),r(t1e))}function jZt(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=hA(t),o=e.getInputAction(Vn.WHEEL,i);l(o)&&(o(n),t.preventDefault())}function QZt(e,t){Eee(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 M));z3(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,c.set(s,M.clone(a.get(s)))}function n1e(e,t){Eee(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);z3(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,c.remove(s)}var i1e={position:new M},Zee={position1:new M,position2:new M},o1e={position:new M},r1e={position:new M},s1e={position:new M};function z3(e,t){let n=hA(t),i=e._positions,o=i.length,r,s,a=e._isPinching;if(o!==1&&e._buttonDown[_s.LEFT]){if(e._buttonDown[_s.LEFT]=!1,l(e._touchHoldTimer)&&(clearTimeout(e._touchHoldTimer),e._touchHoldTimer=void 0),r=e.getInputAction(Vn.LEFT_UP,n),l(r)&&(M.clone(e._primaryPosition,o1e.position),r(o1e)),o===0&&!e._isTouchHolding&&(s=e.getInputAction(Vn.LEFT_CLICK,n),l(s))){let c=e._primaryStartPosition,d=e._previousPositions.values[0];Vee(c,d,e._clickPixelTolerance)&&(M.clone(e._primaryPosition,r1e.position),s(r1e))}e._isTouchHolding=!1}if(o===0&&a&&(e._isPinching=!1,r=e.getInputAction(Vn.PINCH_END,n),l(r)&&r()),o===1&&!a){let c=i.values[0];M.clone(c,e._primaryPosition),M.clone(c,e._primaryStartPosition),M.clone(c,e._primaryPreviousPosition),e._buttonDown[_s.LEFT]=!0,r=e.getInputAction(Vn.LEFT_DOWN,n),l(r)&&(M.clone(c,i1e.position),r(i1e)),e._touchHoldTimer=setTimeout(function(){if(!e.isDestroyed()&&(e._touchHoldTimer=void 0,e._isTouchHolding=!0,s=e.getInputAction(Vn.RIGHT_CLICK,n),l(s))){let d=e._primaryStartPosition,u=e._previousPositions.values[0];Vee(d,u,e._holdPixelTolerance)&&(M.clone(e._primaryPosition,s1e.position),s(s1e))}},Df.touchHoldDelayMilliseconds),t.preventDefault()}o===2&&!a&&(e._isPinching=!0,r=e.getInputAction(Vn.PINCH_START,n),l(r)&&(M.clone(i.values[0],Zee.position1),M.clone(i.values[1],Zee.position2),r(Zee),t.preventDefault()))}function qZt(e,t){Eee(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)}u1e(e,t);let c=e._previousPositions;for(i=0;i<o;++i)r=n[i],s=r.identifier,M.clone(a.get(s),c.get(s))}var Cee={startPosition:new M,endPosition:new M},hM={distance:{startPosition:new M,endPosition:new M},angleAndHeight:{startPosition:new M,endPosition:new M}};function u1e(e,t){let n=hA(t),i=e._positions,o=e._previousPositions,r=i.length,s;if(r===1&&e._buttonDown[_s.LEFT]){let a=i.values[0];M.clone(a,e._primaryPosition);let c=e._primaryPreviousPosition;s=e.getInputAction(Vn.MOUSE_MOVE,n),l(s)&&(M.clone(c,Cee.startPosition),M.clone(a,Cee.endPosition),s(Cee)),M.clone(a,c),t.preventDefault()}else if(r===2&&e._isPinching&&(s=e.getInputAction(Vn.PINCH_MOVE,n),l(s))){let a=i.values[0],c=i.values[1],d=o.values[0],u=o.values[1],h=c.x-a.x,p=c.y-a.y,b=Math.sqrt(h*h+p*p)*.25,f=u.x-d.x,y=u.y-d.y,_=Math.sqrt(f*f+y*y)*.25,S=(c.y+a.y)*.125,A=(u.y+d.y)*.125,Z=Math.atan2(p,h),V=Math.atan2(y,f);M.fromElements(0,_,hM.distance.startPosition),M.fromElements(0,b,hM.distance.endPosition),M.fromElements(V,A,hM.angleAndHeight.startPosition),M.fromElements(Z,S,hM.angleAndHeight.endPosition),s(hM)}}function $Zt(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 M)),z3(e,t),e._previousPositions.set(i,M.clone(n.get(i)))}else c1e(e,t)}function a1e(e,t){if(t.pointerType==="touch"){let n=e._positions,i=t.pointerId;n.remove(i),z3(e,t),e._previousPositions.remove(i)}else l1e(e,t)}function eCt(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),u1e(e,t);let r=e._previousPositions;M.clone(n.get(i),r.get(i))}else d1e(e,t)}function Df(e){this._inputEvents={},this._buttonDown={[_s.LEFT]:!1,[_s.MIDDLE]:!1,[_s.RIGHT]:!1},this._isPinching=!1,this._isTouchHolding=!1,this._lastSeenTouchEvent=-Df.mouseEmulationIgnoreMilliseconds,this._primaryStartPosition=new M,this._primaryPosition=new M,this._primaryPreviousPosition=new M,this._positions=new It,this._previousPositions=new It,this._removalFunctions=[],this._touchHoldTimer=void 0,this._clickPixelTolerance=5,this._holdPixelTolerance=25,this._element=e??document,HZt(this)}Df.prototype.setInputAction=function(e,t,n){let i=Ree(t,n);this._inputEvents[i]=e};Df.prototype.getInputAction=function(e,t){let n=Ree(e,t);return this._inputEvents[n]};Df.prototype.removeInputAction=function(e,t){let n=Ree(e,t);delete this._inputEvents[n]};Df.prototype.isDestroyed=function(){return!1};Df.prototype.destroy=function(){return KZt(this),me(this)};Df.mouseEmulationIgnoreMilliseconds=800;Df.touchHoldDelayMilliseconds=1500;var Hu=Df;function fA(e){this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}fA.prototype.completeMorph=function(){l(this._completeMorph)&&this._completeMorph()};fA.prototype.morphTo2D=function(e,t){l(this._completeMorph)&&this._completeMorph();let n=this._scene;this._previousMode=n.mode,this._morphToOrthographic=n.camera.frustum instanceof mn,!(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?FCt(this,e):MCt(this,e,t),e===0&&l(this._completeMorph)&&this._completeMorph())};var tCt=new m,nCt=new m,iCt=new m,oCt=new m,rCt=new m,sCt=new m,aCt=new m,cCt=new pe,lCt=new F,dCt=new Mi,uCt=new mn,mCt={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};fA.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=tCt,o=nCt,r=iCt;if(e>0)i.x=0,i.y=-1,i.z=1,i=m.multiplyByScalar(m.normalize(i,i),5*t.maximumRadius,i),m.negate(m.normalize(i,o),o),m.cross(m.UNIT_X,o,r);else{let d=n.camera;if(this._previousMode===re.SCENE2D)m.clone(d.position,i),i.z=d.frustum.right-d.frustum.left,m.negate(m.UNIT_Z,o),m.clone(m.UNIT_Y,r);else{m.clone(d.positionWC,i),m.clone(d.directionWC,o),m.clone(d.upWC,r);let u=t.scaleToGeodeticSurface(i,aCt),h=dt.eastNorthUpToFixedFrame(u,t,lCt);F.inverseTransformation(h,h),n.mapProjection.project(t.cartesianToCartographic(i,cCt),i),F.multiplyByPointAsVector(h,o,o),F.multiplyByPointAsVector(h,r,r)}}let s;this._morphToOrthographic?(s=uCt,s.width=n.camera.frustum.right-n.camera.frustum.left,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight):(s=dCt,s.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,s.fov=W.toRadians(60));let a=mCt;a.position=i,a.direction=o,a.up=r,a.frustum=s;let c=UCt(a);fM(this,c),this._previousMode===re.SCENE2D?kCt(this,e,a,c):(a.position2D=F.multiplyByPoint(To.TRANSFORM_2D,i,oCt),a.direction2D=F.multiplyByPointAsVector(To.TRANSFORM_2D,o,rCt),a.up2D=F.multiplyByPointAsVector(To.TRANSFORM_2D,r,sCt),n._mode=re.MORPHING,S1e(this,e,a,c)),e===0&&l(this._completeMorph)&&this._completeMorph()};var vee={position:new m,direction:new m,up:new m,frustum:void 0},h1e=new Mi;fA.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)ACt(this,e,t);else{let i;e>0?(i=vee,m.fromDegrees(0,0,5*t.maximumRadius,t,i.position),m.negate(i.position,i.direction),m.normalize(i.direction,i.direction),m.clone(m.UNIT_Z,i.up)):i=f1e(this,t);let o,r=n.camera;r.frustum instanceof mn?o=r.frustum.clone():(o=h1e,o.aspectRatio=n.drawingBufferWidth/n.drawingBufferHeight,o.fov=W.toRadians(60)),i.frustum=o;let s=Z1e(i);fM(this,s),Wee(this,e,i,s)}e===0&&l(this._completeMorph)&&this._completeMorph()}};fA.prototype.isDestroyed=function(){return!1};fA.prototype.destroy=function(){return H3(this),me(this)};function fM(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new Hu(e._scene.canvas);let n=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=n,e._morphHandler.setInputAction(n,Vn.LEFT_DOWN),e._morphHandler.setInputAction(n,Vn.MIDDLE_DOWN),e._morphHandler.setInputAction(n,Vn.RIGHT_DOWN),e._morphHandler.setInputAction(n,Vn.WHEEL)}}function H3(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 hCt=new pe,fCt=new m,pCt=new F;function f1e(e,t){let n=e._scene,i=n.camera,o=vee,r=o.position,s=o.direction,a=o.up,c=n.mapProjection.unproject(i.position,hCt);t.cartographicToCartesian(c,r);let d=t.scaleToGeodeticSurface(r,fCt),u=dt.eastNorthUpToFixedFrame(d,t,pCt);return F.multiplyByPointAsVector(u,i.direction,s),F.multiplyByPointAsVector(u,i.up,a),o}var bCt=new m,gCt=new m,yCt=new m,xCt=new m,TCt=new m,_Ct=new m;function Wee(e,t,n,i){t*=.5;let o=e._scene,r=o.camera,s=m.clone(r.position,bCt),a=m.clone(r.direction,gCt),c=m.clone(r.up,yCt),d=F.multiplyByPoint(To.TRANSFORM_2D_INVERSE,n.position,xCt),u=F.multiplyByPointAsVector(To.TRANSFORM_2D_INVERSE,n.direction,TCt),h=F.multiplyByPointAsVector(To.TRANSFORM_2D_INVERSE,n.up,_Ct);function p(f){hh(s,d,f.time,r.position),hh(a,u,f.time,r.direction),hh(c,h,f.time,r.up),m.cross(r.direction,r.up,r.right),m.normalize(r.right,r.right)}let b=o.tweens.add({duration:t,easingFunction:Ts.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:p,complete:function(){A1e(e,o,0,1,t,i)}});e._currentTweens.push(b)}var SCt=new mn,p1e=new m,b1e=new m,g1e=new m,Fee=new m,y1e=new m,x1e=new m;function ACt(e,t,n){t/=3;let i=e._scene,o=i.camera,r;t>0?(r=vee,m.fromDegrees(0,0,5*n.maximumRadius,n,r.position),m.negate(r.position,r.direction),m.normalize(r.direction,r.direction),m.clone(m.UNIT_Z,r.up)):(o.position.z=o.frustum.right-o.frustum.left,r=f1e(e,n));let s;e._morphToOrthographic?(s=SCt,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.width=o.frustum.right-o.frustum.left):(s=h1e,s.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,s.fov=W.toRadians(60)),r.frustum=s;let a=Z1e(r);fM(e,a);let c;e._morphToOrthographic?c=function(){Wee(e,t,r,a)}:c=function(){_1e(e,t,r,function(){Wee(e,t,r,a)})},t>0?(i._mode=re.SCENE2D,o.flyTo({duration:t,destination:m.fromDegrees(0,0,5*n.maximumRadius,n,Fee),complete:function(){i._mode=re.MORPHING,c()}})):c()}function hh(e,t,n,i){return m.lerp(e,t,n,i)}function T1e(e,t,n,i,o){let r=e._scene,s=r.camera;if(s.frustum instanceof mn)return;let a=s.frustum.fov,c=W.RADIANS_PER_DEGREE*.5,d=n.position.z*Math.tan(a*.5);s.frustum.far=d/Math.tan(c*.5)+1e7;function u(p){s.frustum.fov=W.lerp(a,c,p.time);let b=d/Math.tan(s.frustum.fov*.5);i(s,b)}let h=r.tweens.add({duration:t,easingFunction:Ts.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:u,complete:function(){s.frustum=n.frustum.clone(),o(e)}});e._currentTweens.push(h)}var ZCt=new m,CCt=new m,VCt=new m,Lee=new m,RCt=new m,ECt=new m,GCt=new rs,LCt=new gn,WCt=new m,vCt={position:void 0,direction:void 0,up:void 0,frustum:void 0};function FCt(e,t){t*=.5;let n=e._scene,i=n.camera,o=m.clone(i.position,ZCt),r=m.clone(i.direction,CCt),s=m.clone(i.up,VCt),a=m.negate(m.UNIT_Z,RCt),c=m.clone(m.UNIT_Y,ECt),d=Lee;if(t>0)m.clone(m.ZERO,Lee),d.z=5*n.ellipsoid.maximumRadius;else{m.clone(o,Lee);let _=LCt;F.multiplyByPoint(To.TRANSFORM_2D,o,_.origin),F.multiplyByPointAsVector(To.TRANSFORM_2D,r,_.direction);let S=n.globe;if(l(S)){let A=S.pickWorldCoordinates(_,n,!0,WCt);l(A)&&(F.multiplyByPoint(To.TRANSFORM_2D_INVERSE,A,d),d.z+=m.distance(o,d))}}let u=GCt;u.right=d.z*.5,u.left=-u.right,u.top=u.right*(n.drawingBufferHeight/n.drawingBufferWidth),u.bottom=-u.top;let h=vCt;h.position=d,h.direction=a,h.up=c,h.frustum=u;let p=C1e(h);fM(e,p);function b(_){hh(o,d,_.time,i.position),hh(r,a,_.time,i.direction),hh(s,c,_.time,i.up),m.cross(i.direction,i.up,i.right),m.normalize(i.right,i.right),i._adjustOrthographicFrustum(!0)}function f(_,S){_.position.z=S}let y=n.tweens.add({duration:t,easingFunction:Ts.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:b,complete:function(){T1e(e,t,h,f,p)}});e._currentTweens.push(y)}var m1e=new pe,ICt={position:new m,direction:new m,up:new m,position2D:new m,direction2D:new m,up2D:new m,frustum:new rs},PCt={position:new m,direction:new m,up:new m,frustum:void 0},XCt=new m,NCt=new gn,YCt=new F,wCt=new m;function MCt(e,t,n){t*=.5;let i=e._scene,o=i.camera,r=ICt;if(t>0)m.clone(m.ZERO,r.position),r.position.z=5*n.maximumRadius,m.negate(m.UNIT_Z,r.direction),m.clone(m.UNIT_Y,r.up);else{n.cartesianToCartographic(o.positionWC,m1e),i.mapProjection.project(m1e,r.position),m.negate(m.UNIT_Z,r.direction),m.clone(m.UNIT_Y,r.up);let h=NCt;m.clone(r.position2D,h.origin);let p=m.clone(o.directionWC,h.direction),b=n.scaleToGeodeticSurface(o.positionWC,wCt),f=dt.eastNorthUpToFixedFrame(b,n,YCt);F.inverseTransformation(f,f),F.multiplyByPointAsVector(f,p,p),F.multiplyByPointAsVector(To.TRANSFORM_2D,p,p);let y=i.globe;if(l(y)){let _=y.pickWorldCoordinates(h,i,!0,XCt);if(l(_)){let S=m.distance(r.position2D,_);_.x+=S,m.clone(_,r.position2D)}}}function s(h,p){h.position.x=p}F.multiplyByPoint(To.TRANSFORM_2D,r.position,r.position2D),F.multiplyByPointAsVector(To.TRANSFORM_2D,r.direction,r.direction2D),F.multiplyByPointAsVector(To.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=PCt;F.multiplyByPoint(To.TRANSFORM_2D_INVERSE,r.position2D,c.position),m.clone(r.direction,c.direction),m.clone(r.up,c.up),c.frustum=a;let d=C1e(c);fM(e,d);function u(){T1e(e,t,r,s,d)}S1e(e,t,r,u)}function _1e(e,t,n,i){let o=e._scene,r=o.camera,s=r.frustum.right-r.frustum.left;r.frustum=n.frustum.clone();let a=r.frustum.fov,c=W.RADIANS_PER_DEGREE*.5,d=s*Math.tan(a*.5);r.frustum.far=d/Math.tan(c*.5)+1e7,r.frustum.fov=c;function u(p){r.frustum.fov=W.lerp(c,a,p.time),r.position.z=d/Math.tan(r.frustum.fov*.5)}let h=o.tweens.add({duration:t,easingFunction:Ts.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:u,complete:function(){i(e)}});e._currentTweens.push(h)}function kCt(e,t,n,i){t*=.5;let o=e._scene,r=o.camera,s=m.clone(n.position,Fee),a=m.clone(n.direction,y1e),c=m.clone(n.up,x1e);o._mode=re.MORPHING;function d(){r.frustum=n.frustum.clone();let u=m.clone(r.position,p1e),h=m.clone(r.direction,b1e),p=m.clone(r.up,g1e);u.z=s.z;function b(y){hh(u,s,y.time,r.position),hh(h,a,y.time,r.direction),hh(p,c,y.time,r.up),m.cross(r.direction,r.up,r.right),m.normalize(r.right,r.right)}let f=o.tweens.add({duration:t,easingFunction:Ts.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:b,complete:function(){i(e)}});e._currentTweens.push(f)}e._morphToOrthographic?d():_1e(e,0,n,d)}function S1e(e,t,n,i){let o=e._scene,r=o.camera,s=m.clone(r.position,p1e),a=m.clone(r.direction,b1e),c=m.clone(r.up,g1e),d=m.clone(n.position2D,Fee),u=m.clone(n.direction2D,y1e),h=m.clone(n.up2D,x1e);function p(f){hh(s,d,f.time,r.position),hh(a,u,f.time,r.direction),hh(c,h,f.time,r.up),m.cross(r.direction,r.up,r.right),m.normalize(r.right,r.right),r._adjustOrthographicFrustum(!0)}let b=o.tweens.add({duration:t,easingFunction:Ts.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:p,complete:function(){A1e(e,o,1,0,t,i)}});e._currentTweens.push(b)}function A1e(e,t,n,i,o,r){let s={object:t,property:"morphTime",startValue:n,stopValue:i,duration:o,easingFunction:Ts.QUARTIC_OUT};l(r)&&(s.complete=function(){r(e)});let a=t.tweens.addProperty(s);e._currentTweens.push(a)}function Z1e(e){return function(t){let n=t._scene;n._mode=re.SCENE3D,n.morphTime=re.getMorphTime(re.SCENE3D),H3(t);let i=n.camera;(t._previousMode!==re.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,m.clone(e.position,i.position),m.clone(e.direction,i.direction),m.clone(e.up,i.up),m.cross(i.direction,i.up,i.right),m.normalize(i.right,i.right),i.frustum=e.frustum.clone());let o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);let r=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,re.SCENE3D,r)}}function C1e(e){return function(t){let n=t._scene;n._mode=re.SCENE2D,n.morphTime=re.getMorphTime(re.SCENE2D),H3(t);let i=n.camera;m.clone(e.position,i.position),i.position.z=n.ellipsoid.maximumRadius*2,m.clone(e.direction,i.direction),m.clone(e.up,i.up),m.cross(i.direction,i.up,i.right),m.normalize(i.right,i.right),i.frustum=e.frustum.clone();let o=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,re.SCENE2D,o)}}function UCt(e){return function(t){let n=t._scene;n._mode=re.COLUMBUS_VIEW,n.morphTime=re.getMorphTime(re.COLUMBUS_VIEW),H3(t);let i=n.camera;(t._previousModeMode!==re.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,m.clone(e.position,i.position),m.clone(e.direction,i.direction),m.clone(e.up,i.up),m.cross(i.direction,i.up,i.right),m.normalize(i.right,i.right));let o=i.frustum;n.frameState.useLogDepth&&(o.near=.1,o.far=1e10);let r=l(t._completeMorph);t._completeMorph=void 0,n.camera.update(n.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,re.COLUMBUS_VIEW,r)}}var pM=fA;var Qio=x(T(),1);var pio=x(T(),1);var rio=x(T(),1),V1e={LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4};Object.freeze(V1e);var $i=V1e;function Ba(e,t){let n=`${e}`;return l(t)&&(n+=`+${t}`),n}function DCt(e,t){M.clone(e.distance.startPosition,t.distance.startPosition),M.clone(e.distance.endPosition,t.distance.endPosition),M.clone(e.angleAndHeight.startPosition,t.angleAndHeight.startPosition),M.clone(e.angleAndHeight.endPosition,t.angleAndHeight.endPosition)}function R1e(e,t,n){let i=Ba($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 M;let d=e._movement[i];l(d)||(d=e._movement[i]={}),d.distance={startPosition:new M,endPosition:new M},d.angleAndHeight={startPosition:new M,endPosition:new M},d.prevAngle=0,e._eventHandler.setInputAction(function(u){e._buttonsDown++,r[i]=!0,a[i]=new Date,M.lerp(u.position1,u.position2,.5,s[i])},Vn.PINCH_START,t),e._eventHandler.setInputAction(function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),r[i]=!1,c[i]=new Date},Vn.PINCH_END,t),e._eventHandler.setInputAction(function(u){if(r[i]){o[i]?(DCt(u,d),o[i]=!1,d.prevAngle=d.angleAndHeight.startPosition.x):(M.clone(u.distance.endPosition,d.distance.endPosition),M.clone(u.angleAndHeight.endPosition,d.angleAndHeight.endPosition));let h=d.angleAndHeight.endPosition.x,p=d.prevAngle,b=Math.PI*2;for(;h>=p+Math.PI;)h-=b;for(;h<p-Math.PI;)h+=b;d.angleAndHeight.endPosition.x=-h*n.clientWidth/12,d.angleAndHeight.startPosition.x=-p*n.clientWidth/12}},Vn.PINCH_MOVE,t)}function E1e(e,t){let n=Ba($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 M,endPosition:new M,valid:!1}),s.startPosition=new M,M.clone(M.ZERO,s.startPosition),s.endPosition=new M,e._eventHandler.setInputAction(function(c){let d=7.5*W.toRadians(c);i[n]=o[n]=new Date,s.endPosition.x=0,s.endPosition.y=d,M.clone(s.endPosition,a.endPosition),a.valid=!0,r[n]=!1},Vn.WHEEL,t)}function BR(e,t,n){let i=Ba(n,t),o=e._isDown,r=e._eventStartPosition,s=e._pressTime;o[i]=!1,r[i]=new M;let a=e._lastMovement[i];l(a)||(a=e._lastMovement[i]={startPosition:new M,endPosition:new M,valid:!1});let c,d;n===$i.LEFT_DRAG?(c=Vn.LEFT_DOWN,d=Vn.LEFT_UP):n===$i.RIGHT_DRAG?(c=Vn.RIGHT_DOWN,d=Vn.RIGHT_UP):n===$i.MIDDLE_DRAG&&(c=Vn.MIDDLE_DOWN,d=Vn.MIDDLE_UP),e._eventHandler.setInputAction(function(u){e._buttonsDown++,a.valid=!1,o[i]=!0,s[i]=new Date,M.clone(u.position,r[i])},c,t),e._eventHandler.setInputAction(function(){Iee(Ba(n,void 0),e);for(let u of Object.values(Oa)){let h=Ba(n,u);Iee(h,e)}},d,t)}function Iee(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 G1e(e,t){M.clone(e.startPosition,t.startPosition),M.clone(e.endPosition,t.endPosition)}function OCt(e,t,n){let i=n._isDown,o=!1,r=Ba(e,t);for(let[c,d]of Object.entries(i))c.startsWith(e)&&d&&c!==r&&(o=!0,Iee(c,n));if(!o)return;let s=n._pressTime,a=n._lastMovement[r];l(a)||(a=n._lastMovement[r]={startPosition:new M,endPosition:new M,valid:!1}),n._buttonsDown++,a.valid=!1,i[r]=!0,s[r]=new Date}function L1e(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=Ba(a,t);n[c]=!0,l(e._lastMovement[c])||(e._lastMovement[c]={startPosition:new M,endPosition:new M,valid:!1}),l(e._movement[c])||(e._movement[c]={startPosition:new M,endPosition:new M})}}e._eventHandler.setInputAction(function(s){for(let a in $i)if($i.hasOwnProperty(a)){let c=$i[a];if(l(c)){let d=Ba(c,t);OCt(c,t,e),r[d]&&(n[d]?(G1e(i[d],o[d]),o[d].valid=!0,G1e(s,i[d]),n[d]=!1):M.clone(s.endPosition,i[d].endPosition))}}M.clone(s.endPosition,e._currentMousePosition)},Vn.MOUSE_MOVE,t)}function fh(e){this._eventHandler=new Hu(e),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new M,E1e(this,void 0),R1e(this,void 0,e),BR(this,void 0,$i.LEFT_DRAG),BR(this,void 0,$i.RIGHT_DRAG),BR(this,void 0,$i.MIDDLE_DRAG),L1e(this,void 0);for(let t in Oa)if(Oa.hasOwnProperty(t)){let n=Oa[t];l(n)&&(E1e(this,n),R1e(this,n,e),BR(this,n,$i.LEFT_DRAG),BR(this,n,$i.RIGHT_DRAG),BR(this,n,$i.MIDDLE_DRAG),L1e(this,n))}}Object.defineProperties(fh.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){let e=!this._update[Ba($i.WHEEL)]||!this._update[Ba($i.WHEEL,Oa.SHIFT)]||!this._update[Ba($i.WHEEL,Oa.CTRL)]||!this._update[Ba($i.WHEEL,Oa.ALT)];return this._buttonsDown>0||e}}});fh.prototype.isMoving=function(e,t){let n=Ba(e,t);return!this._update[n]};fh.prototype.getMovement=function(e,t){let n=Ba(e,t);return this._movement[n]};fh.prototype.getLastMovement=function(e,t){let n=Ba(e,t),i=this._lastMovement[n];if(i.valid)return i};fh.prototype.isButtonDown=function(e,t){let n=Ba(e,t);return this._isDown[n]};fh.prototype.getStartMousePosition=function(e,t){if(e===$i.WHEEL)return this._currentMousePosition;let n=Ba(e,t);return this._eventStartPosition[n]};fh.prototype.getButtonPressTime=function(e,t){let n=Ba(e,t);return this._pressTime[n]};fh.prototype.getButtonReleaseTime=function(e,t){let n=Ba(e,t);return this._releaseTime[n]};fh.prototype.reset=function(){for(let e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)};fh.prototype.isDestroyed=function(){return!1};fh.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),me(this)};var bM=fh;var Zio=x(T(),1);function K3(e,t,n,i,o,r,s,a,c,d){this._tweens=e,this._tweenjs=t,this._startObject=ze(n),this._stopObject=ze(i),this._duration=o,this._delay=r,this._easingFunction=s,this._update=a,this._complete=c,this.cancel=d,this.needsStart=!0}Object.defineProperties(K3.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}}});K3.prototype.cancelTween=function(){this._tweens.remove(this)};function Of(){this._tweens=[]}Object.defineProperties(Of.prototype,{length:{get:function(){return this._tweens.length}}});Of.prototype.add=function(e){if(e=e??B.EMPTY_OBJECT,e.duration===0)return l(e.complete)&&e.complete(),new K3(this);let t=e.duration/ii.SECONDS_PER_MILLISECOND,n=e.delay??0,i=n/ii.SECONDS_PER_MILLISECOND,o=e.easingFunction??Ts.LINEAR_NONE,r=e.startObject,s=new FZe(r);s.to(ze(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 K3(this,s,e.startObject,e.stopObject,e.duration,n,o,e.update,e.complete,e.cancel);return this._tweens.push(a),a};Of.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})};Of.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})};Of.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})};Of.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};Of.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};Of.prototype.contains=function(e){return l(e)&&this._tweens.indexOf(e)!==-1};Of.prototype.get=function(e){return this._tweens[e]};Of.prototype.update=function(e){let t=this._tweens,n=0;for(e=l(e)?e/ii.SECONDS_PER_MILLISECOND:Yi();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 pA=Of;function yM(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:Oa.CTRL},{eventType:$i.RIGHT_DRAG,modifier:Oa.CTRL}],this.lookEventTypes={eventType:$i.LEFT_DRAG,modifier:Oa.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 bM(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 pA,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new M(-1,-1),this._tiltCenter=new m,this._rotateMousePosition=new M(-1,-1),this._rotateStartPosition=new m,this._strafeStartPosition=new m,this._strafeMousePosition=new M,this._strafeEndMousePosition=new M,this._zoomMouseStart=new M(-1,-1),this._zoomWorldPosition=new m,this._useZoomWorldPosition=!1,this._panLastMousePosition=new M,this._panLastWorldPosition=new m,this._tiltCVOffMap=!1,this._looking=!1,this._rotating=!1,this._strafing=!1,this._zoomingOnVector=!1,this._zoomingUnderground=!1,this._rotatingZoom=!1,this._adjustedHeightForTerrain=!1,this._cameraUnderground=!1;let n=e.mapProjection;this._maxCoord=n.project(new pe(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 BCt(e,t){if(e<0)return 0;let n=(1-t)*25;return Math.exp(-n*e)}function zCt(e){return M.equalsEpsilon(e.startPosition,e.endPosition,W.EPSILON14)}var HCt=.4;function KCt(e,t,n,i,o,r,s){let a=r[s];l(a)||(a=r[s]={startPosition:new M,endPosition:new M,motion:new M,inertiaEnabled:!0});let c=e.getButtonPressTime(t,n),d=e.getButtonReleaseTime(t,n),u=c&&d&&(d.getTime()-c.getTime())/1e3,p=d&&(new Date().getTime()-d.getTime())/1e3;if(c&&d&&u<HCt){let b=BCt(p,i),f=e.getLastMovement(t,n);if(!l(f)||zCt(f)||!a.inertiaEnabled||(a.motion.x=(f.endPosition.x-f.startPosition.x)*.5,a.motion.y=(f.endPosition.y-f.startPosition.y)*.5,a.startPosition=M.clone(f.startPosition,a.startPosition),a.endPosition=M.multiplyByScalar(a.motion,b,a.endPosition),a.endPosition=M.add(a.startPosition,a.endPosition,a.endPosition),isNaN(a.endPosition.x)||isNaN(a.endPosition.y)||M.distance(a.startPosition,a.endPosition)<.5))return;if(!e.isButtonDown(t,n)){let y=e.getStartMousePosition(t,n);o(r,y,a)}}}function JCt(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 W1e=[];function cd(e,t,n,i,o,r){if(!l(n))return;let s=e._aggregator;Array.isArray(n)||(W1e[0]=n,n=W1e);let a=n.length;for(let c=0;c<a;++c){let d=n[c],u=l(d.eventType)?d.eventType:d,h=d.modifier,p=s.isMoving(u,h)&&s.getMovement(u,h),b=s.getStartMousePosition(u,h);e.enableInputs&&t&&(p?(i(e,b,p),JCt(e,r)):o<1&&KCt(s,u,h,o,i,e,r))}}var J3=new gn,jCt=new m,QCt=new M,qCt=new m,$Ct=new M,eVt=new m,tVt=new m,nVt=new m,iVt=new m,D1e=new m,oVt=new m,rVt=new m,sVt=new m,aVt=new m,cVt=new m,lVt=new m,dVt=new m,uVt=new m,mVt=new m,hVt=new m,bA=new m,v1e=new m,F1e=new m,Pee={orientation:new yc};function Dee(e,t,n,i,o,r){let s=1;l(r)&&(s=W.clamp(Math.abs(r),.25,1));let a=n.endPosition.y-n.startPosition.y,d=a>0?e.minimumZoomDistance*s:0,u=e.maximumZoomDistance,h=o-d,p=i*h;p=W.clamp(p,e._minimumZoomRate,e._maximumZoomRate);let b=a/e._scene.canvas.clientHeight;b=Math.min(b,e.maximumMovementRatio);let f=p*b;if(e.enableCollisionDetection||e.minimumZoomDistance===0||!l(e._globe)){if(f>0&&Math.abs(o-d)<1||f<0&&Math.abs(o-u)<1)return;o-f<d?f=o-d-1:o-f>u&&(f=o-u)}let y=e._scene,_=y.camera,S=y.mode,A=Pee.orientation;A.heading=_.heading,A.pitch=_.pitch,A.roll=_.roll;let Z=n.inertiaEnabled??M.equals(t,e._zoomMouseStart),V=e._zoomingOnVector,E=e._rotatingZoom,L;if(Z||(e._zoomMouseStart=M.clone(t,e._zoomMouseStart),l(e._globe)&&S===re.SCENE2D?(L=_.getPickRay(t,J3).origin,L=m.fromElements(L.y,L.z,L.x)):l(e._globe)&&(L=Rg(e,t,jCt)),l(L)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=m.clone(L,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,V=e._zoomingOnVector=!1,E=e._rotatingZoom=!1,e._zoomingUnderground=e._cameraUnderground),!e._useZoomWorldPosition){_.zoomIn(f);return}let v=S===re.COLUMBUS_VIEW;if(_.positionCartographic.height<2e6&&(E=!0),!Z||E){if(S===re.SCENE2D){let I=e._zoomWorldPosition,X=_.position;if(!m.equals(I,X)&&_.positionCartographic.height<e._maxCoord.x*2){let N=_.position.x,g=m.subtract(I,X,qCt);m.normalize(g,g);let C=m.distance(I,X)*f/(_.getMagnitude()*.5);_.move(g,C*.5),(_.position.x<0&&N>0||_.position.x>0&&N<0)&&(L=_.getPickRay(t,J3).origin,L=m.fromElements(L.y,L.z,L.x),e._zoomWorldPosition=m.clone(L,e._zoomWorldPosition))}}else if(S===re.SCENE3D){let I=m.normalize(_.position,D1e);if(e._cameraUnderground||e._zoomingUnderground||_.positionCartographic.height<3e3&&Math.abs(m.dot(_.direction,I))<.6)v=!0;else{let X=y.canvas,N=$Ct;N.x=X.clientWidth/2,N.y=X.clientHeight/2;let g=Rg(e,N,eVt);if(!l(g))v=!0;else if(_.positionCartographic.height<1e6)if(m.dot(_.direction,I)>=-.5)v=!0;else{let C=rVt;m.clone(_.position,C);let R=e._zoomWorldPosition,G=oVt;if(G=m.normalize(R,G),m.dot(G,I)<0)return;let P=hVt,Y=cVt;m.clone(_.direction,Y),m.add(C,m.multiplyByScalar(Y,1e3,bA),P);let O=lVt,k=dVt;m.subtract(R,C,O),m.normalize(O,k);let D=m.dot(I,k);if(D>=0){e._zoomMouseStart.x=-1;return}let w=Math.acos(-D),z=m.magnitude(C),J=m.magnitude(R),ee=z-f,H=m.magnitude(O),te=Math.asin(W.clamp(H/J*Math.sin(w),-1,1)),$=Math.asin(W.clamp(ee/J*Math.sin(w),-1,1)),be=te-$+w,ye=sVt;m.normalize(C,ye);let ce=aVt;ce=m.cross(k,ye,ce),ce=m.normalize(ce,ce),m.normalize(m.cross(ye,ce,bA),Y),m.multiplyByScalar(m.normalize(P,bA),m.magnitude(P)-f,P),m.normalize(C,C),m.multiplyByScalar(C,ee,C);let Ze=uVt;m.multiplyByScalar(m.add(m.multiplyByScalar(ye,Math.cos(be)-1,v1e),m.multiplyByScalar(Y,Math.sin(be),F1e),bA),ee,Ze),m.add(C,Ze,C),m.normalize(P,ye),m.normalize(m.cross(ye,ce,bA),Y);let xe=mVt;m.multiplyByScalar(m.add(m.multiplyByScalar(ye,Math.cos(be)-1,v1e),m.multiplyByScalar(Y,Math.sin(be),F1e),bA),m.magnitude(P),xe),m.add(P,xe,P),m.clone(C,_.position),m.normalize(m.subtract(P,C,bA),_.direction),m.clone(_.direction,_.direction),m.cross(_.direction,_.up,_.right),m.cross(_.right,_.direction,_.up),_.setView(Pee);return}else{let C=m.normalize(g,tVt),R=m.normalize(e._zoomWorldPosition,nVt),G=m.dot(R,C);if(G>0&&G<1){let P=W.acosClamped(G),Y=m.cross(R,C,iVt),O=Math.abs(P)>W.toRadians(20)?_.positionCartographic.height*.75:_.positionCartographic.height-f,k=f/O;_.rotate(Y,P*k)}}}}e._rotatingZoom=!v}if(!Z&&v||V){let I,X=no.worldToWindowCoordinates(y,e._zoomWorldPosition,QCt);S!==re.COLUMBUS_VIEW&&M.equals(t,e._zoomMouseStart)&&l(X)?I=_.getPickRay(X,J3):I=_.getPickRay(t,J3);let N=I.direction;(S===re.COLUMBUS_VIEW||S===re.SCENE2D)&&m.fromElements(N.y,N.z,N.x,N),_.move(N,f),e._zoomingOnVector=!0}else _.zoomIn(f);e._cameraUnderground||_.setView(Pee)}var fVt=new gn,pVt=new gn,bVt=new m;function gVt(e,t,n){let o=e._scene.camera,r=o.getPickRay(n.startPosition,fVt).origin,s=o.getPickRay(n.endPosition,pVt).origin;r=m.fromElements(r.y,r.z,r.x,r),s=m.fromElements(s.y,s.z,s.x,s);let a=m.subtract(r,s,bVt),c=m.magnitude(a);c>0&&(m.normalize(a,a),o.move(a,c))}function I1e(e,t,n){l(n.distance)&&(n=n.distance);let o=e._scene.camera;Dee(e,t,n,e.zoomFactor,o.getMagnitude())}var yVt=new M,xVt=new M;function P1e(e,t,n){if(l(n.angleAndHeight)){TVt(e,t,n.angleAndHeight);return}let i=e._scene,o=i.camera,r=i.canvas,s=r.clientWidth,a=r.clientHeight,c=yVt;c.x=2/s*n.startPosition.x-1,c.y=2/a*(a-n.startPosition.y)-1,c=M.normalize(c,c);let d=xVt;d.x=2/s*n.endPosition.x-1,d.y=2/a*(a-n.endPosition.y)-1,d=M.normalize(d,d);let u=W.acosClamped(c.x);c.y<0&&(u=W.TWO_PI-u);let h=W.acosClamped(d.x);d.y<0&&(h=W.TWO_PI-h);let p=h-u;o.twistRight(p)}function TVt(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 _Vt(e){let t=e._scene.mapMode2D===sd.ROTATE;F.equals(F.IDENTITY,e._scene.camera.transform)?(cd(e,e.enableTranslate,e.translateEventTypes,gVt,e.inertiaTranslate,"_lastInertiaTranslateMovement"),cd(e,e.enableZoom,e.zoomEventTypes,I1e,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&cd(e,e.enableRotate,e.tiltEventTypes,P1e,e.inertiaSpin,"_lastInertiaTiltMovement")):(cd(e,e.enableZoom,e.zoomEventTypes,I1e,e.inertiaZoom,"_lastInertiaZoomMovement"),t&&cd(e,e.enableRotate,e.translateEventTypes,P1e,e.inertiaSpin,"_lastInertiaSpinMovement"))}var O1e=new gn,SVt=new m,AVt=new m;function Rg(e,t,n){let i=e._scene,o=e._globe,r=i.camera,s;if(i.pickPositionSupported&&(s=i.pickPositionWorldCoordinates(t,SVt)),!l(o))return m.clone(s,n);let a=!e._cameraUnderground,c=r.getPickRay(t,O1e),d=o.pickWorldCoordinates(c,i,a,AVt),u=l(s)?m.distance(s,r.positionWC):Number.POSITIVE_INFINITY,h=l(d)?m.distance(d,r.positionWC):Number.POSITIVE_INFINITY;return u<h?m.clone(s,n):m.clone(d,n)}var ZVt=new pe;function nz(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,ZVt);l(c)&&(r=c.height)}else r=i.position.z;let s=e._scene.globeHeight??0;return Math.abs(s-r)}var CVt=new m;function B1e(e,t){let n=t.origin,i=t.direction,o=nz(e),r=m.normalize(n,CVt),s=Math.abs(m.dot(r,i));return s=Math.max(s,.5)*2,o*s}function z1e(e,t,n,i){let o=m.distance(t.origin,n),r=nz(e),s=W.clamp(r*5,e._minimumUndergroundPickDistance,e._maximumUndergroundPickDistance);return o>s&&(o=Math.min(o,r/5),o=Math.max(o,100)),gn.getPoint(t,o,i)}function H1e(e,t,n,i){let o;return l(n)?(o=m.distance(t.origin,n),o>e._maximumUndergroundPickDistance&&(o=nz(e))):o=nz(e),gn.getPoint(t,o,i)}var VVt=new M;function K1e(e,t){let n=t.endPosition,i=M.subtract(t.endPosition,t.startPosition,VVt),o=e._strafeEndMousePosition;M.add(o,i,o),t.endPosition=o,Oee(e,t,e._strafeStartPosition),t.endPosition=n}var X1e=new gn,RVt=new gn,Xee=new m,EVt=new m,GVt=new m,LVt=new m,WVt=new nn(m.UNIT_X,0),vVt=new M,FVt=new M;function IVt(e,t,n){if(m.equals(t,e._translateMousePosition)||(e._looking=!1),m.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking){Ju(e,t,n);return}if(e._strafing){K1e(e,n);return}let o=e._scene.camera,r=e._cameraUnderground,s=M.clone(n.startPosition,vVt),a=M.clone(n.endPosition,FVt),c=o.getPickRay(s,X1e),d=m.clone(m.ZERO,LVt),u=m.UNIT_X,h;if(o.position.z<e._minimumPickingTerrainHeight&&(h=Rg(e,s,Xee),l(h)&&(d.x=h.x)),r||d.x>o.position.z&&l(h)){let Z=h;r&&(Z=H1e(e,c,h,Xee)),M.clone(t,e._strafeMousePosition),M.clone(t,e._strafeEndMousePosition),m.clone(Z,e._strafeStartPosition),e._strafing=!0,Oee(e,n,e._strafeStartPosition);return}let p=nn.fromPointNormal(d,u,WVt);c=o.getPickRay(s,X1e);let b=ai.rayPlane(c,p,Xee),f=o.getPickRay(a,RVt),y=ai.rayPlane(f,p,EVt);if(!l(b)||!l(y)){e._looking=!0,Ju(e,t,n),M.clone(t,e._translateMousePosition);return}let _=m.subtract(b,y,GVt),S=_.x;_.x=_.y,_.y=_.z,_.z=S;let A=m.magnitude(_);A>W.EPSILON6&&(m.normalize(_,_),o.move(_,A))}var J1e=new M,q3=new gn,$3=new m,PVt=new m,j1e=new F,XVt=new F,NVt=new m,YVt=new nn(m.UNIT_X,0),Nee=new m,Mee=new pe,Q1e=new F,wVt=new Pe,MVt=new q,ez=new m;function kVt(e,t,n){if(l(n.angleAndHeight)&&(n=n.angleAndHeight),M.equals(t,e._tiltCenterMousePosition)||(e._tiltCVOffMap=!1,e._looking=!1),e._looking){Ju(e,t,n);return}let o=e._scene.camera;e._tiltCVOffMap||!e.onMap()||Math.abs(o.position.z)>e._minimumPickingTerrainHeight?(e._tiltCVOffMap=!0,UVt(e,t,n)):DVt(e,t,n)}function UVt(e,t,n){let i=e._scene,o=i.camera,r=i.canvas,s=J1e;s.x=r.clientWidth/2,s.y=r.clientHeight/2;let a=o.getPickRay(s,q3),c=m.UNIT_X,d=a.origin,u=a.direction,h,p=m.dot(c,u);if(Math.abs(p)>W.EPSILON6&&(h=-m.dot(c,d)/p),!l(h)||h<=0){e._looking=!0,Ju(e,t,n),M.clone(t,e._tiltCenterMousePosition);return}let b=m.multiplyByScalar(u,h,$3);m.add(d,b,b);let f=i.mapProjection,y=f.ellipsoid;m.fromElements(b.y,b.z,b.x,b);let _=f.unproject(b,Mee);y.cartographicToCartesian(_,b);let S=dt.eastNorthUpToFixedFrame(b,y,j1e),A=e._globe,Z=e._ellipsoid;e._globe=void 0,e._ellipsoid=ie.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let V=F.clone(o.transform,Q1e);o._setTransform(S),Ku(e,t,n,m.UNIT_Z),o._setTransform(V),e._globe=A,e._ellipsoid=Z;let E=Z.maximumRadius;e._rotateFactor=1/E,e._rotateRateRangeAdjustment=E}function DVt(e,t,n){let i=e._scene,o=i.camera,r=e._cameraUnderground,s,a,c=m.UNIT_X;if(M.equals(t,e._tiltCenterMousePosition))s=m.clone(e._tiltCenter,$3);else{if(o.position.z<e._minimumPickingTerrainHeight&&(s=Rg(e,t,$3)),!l(s)){a=o.getPickRay(t,q3);let g=a.origin,C=a.direction,R,G=m.dot(c,C);if(Math.abs(G)>W.EPSILON6&&(R=-m.dot(c,g)/G),!l(R)||R<=0){e._looking=!0,Ju(e,t,n),M.clone(t,e._tiltCenterMousePosition);return}s=m.multiplyByScalar(C,R,$3),m.add(g,s,s)}r&&(l(a)||(a=o.getPickRay(t,q3)),z1e(e,a,s,s)),M.clone(t,e._tiltCenterMousePosition),m.clone(s,e._tiltCenter)}let d=i.canvas,u=J1e;u.x=d.clientWidth/2,u.y=e._tiltCenterMousePosition.y,a=o.getPickRay(u,q3);let h=m.clone(m.ZERO,NVt);h.x=s.x;let p=nn.fromPointNormal(h,c,YVt),b=ai.rayPlane(a,p,PVt),f=o._projection,y=f.ellipsoid;m.fromElements(s.y,s.z,s.x,s);let _=f.unproject(s,Mee);y.cartographicToCartesian(_,s);let S=dt.eastNorthUpToFixedFrame(s,y,j1e),A;l(b)?(m.fromElements(b.y,b.z,b.x,b),_=f.unproject(b,Mee),y.cartographicToCartesian(_,b),A=dt.eastNorthUpToFixedFrame(b,y,XVt)):A=S;let Z=e._globe,V=e._ellipsoid;e._globe=void 0,e._ellipsoid=ie.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let E=m.UNIT_Z,L=F.clone(o.transform,Q1e);o._setTransform(S);let v=m.cross(m.UNIT_Z,m.normalize(o.position,Nee),Nee),I=m.dot(o.right,v);if(Ku(e,t,n,E,!1,!0),o._setTransform(A),I<0){let g=n.startPosition.y-n.endPosition.y;(r&&g<0||!r&&g>0)&&(E=void 0);let C=o.constrainedAxis;o.constrainedAxis=void 0,Ku(e,t,n,E,!0,!1),o.constrainedAxis=C}else Ku(e,t,n,E,!0,!1);if(l(o.constrainedAxis)){let g=m.cross(o.direction,o.constrainedAxis,ez);m.equalsEpsilon(g,m.ZERO,W.EPSILON6)||(m.dot(g,o.right)<0&&m.negate(g,g),m.cross(g,o.direction,o.up),m.cross(o.direction,o.up,o.right),m.normalize(o.up,o.up),m.normalize(o.right,o.right))}o._setTransform(L),e._globe=Z,e._ellipsoid=V;let X=V.maximumRadius;e._rotateFactor=1/X,e._rotateRateRangeAdjustment=X;let N=m.clone(o.positionWC,Nee);if(e.enableCollisionDetection&&Hee(e,!0),!m.equals(o.positionWC,N)){o._setTransform(A),o.worldToCameraCoordinatesPoint(N,N);let g=m.magnitudeSquared(N);m.magnitudeSquared(o.position)>g&&(m.normalize(o.position,o.position),m.multiplyByScalar(o.position,Math.sqrt(g),o.position));let C=m.angleBetween(N,o.position),R=m.cross(N,o.position,N);m.normalize(R,R);let G=Pe.fromAxisAngle(R,C,wVt),P=q.fromQuaternion(G,MVt);q.multiplyByVector(P,o.direction,o.direction),q.multiplyByVector(P,o.up,o.up),m.cross(o.direction,o.up,o.right),m.cross(o.right,o.direction,o.up),o._setTransform(L)}}var q1e=new M,$1e=new gn,eEe=new m;function OVt(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=q1e,a.x=r.clientWidth/2,a.y=r.clientHeight/2);let c=o.getPickRay(a,$1e),d=c.origin,u=c.direction,h=o.position.z,p;h<e._minimumPickingTerrainHeight&&(p=Rg(e,a,eEe));let b;if(l(p)&&(b=m.distance(d,p)),s){let f=B1e(e,c,h);l(b)?b=Math.min(b,f):b=f}if(!l(b)){let f=m.UNIT_X;b=-m.dot(f,d)/m.dot(f,u)}Dee(e,t,n,e.zoomFactor,b)}function BVt(e){let n=e._scene.camera;if(!F.equals(F.IDENTITY,n.transform))cd(e,e.enableRotate,e.rotateEventTypes,Ku,e.inertiaSpin,"_lastInertiaSpinMovement"),cd(e,e.enableZoom,e.zoomEventTypes,nEe,e.inertiaZoom,"_lastInertiaZoomMovement");else{let i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),cd(e,e.enableTilt,e.tiltEventTypes,kVt,e.inertiaSpin,"_lastInertiaTiltMovement"),cd(e,e.enableTranslate,e.translateEventTypes,IVt,e.inertiaTranslate,"_lastInertiaTranslateMovement"),cd(e,e.enableZoom,e.zoomEventTypes,OVt,e.inertiaZoom,"_lastInertiaZoomMovement"),cd(e,e.enableLook,e.lookEventTypes,Ju),!e._aggregator.anyButtonDown&&!i.contains(e._tween)){let o=n.createCorrectPositionTween(e.bounceAnimationTime);l(o)&&(e._tween=i.add(o))}i.update()}}var zVt=new gn,HVt=new nn(m.UNIT_X,0),KVt=new m,JVt=new m;function Oee(e,t,n){let i=e._scene,o=i.camera,r=o.getPickRay(t.endPosition,zVt),s=m.clone(o.direction,JVt);i.mode===re.COLUMBUS_VIEW&&m.fromElements(s.z,s.x,s.y,s);let a=nn.fromPointNormal(n,s,HVt),c=ai.rayPlane(r,a,KVt);l(c)&&(s=m.subtract(n,c,s),i.mode===re.COLUMBUS_VIEW&&m.fromElements(s.y,s.z,s.x,s),m.add(o.position,s,o.position))}var N1e=new m,tEe=new pe,kee=new m,Uee=new ie,jVt=new m,QVt=new m,qVt=new m;function $Vt(e,t,n){let o=e._scene.camera,r=e._cameraUnderground,s=e._ellipsoid;if(!F.equals(o.transform,F.IDENTITY)){Ku(e,t,n);return}let a,c,d=s.geodeticSurfaceNormal(o.position,jVt);if(M.equals(t,e._rotateMousePosition)){if(e._looking)Ju(e,t,n,d);else if(e._rotating)Ku(e,t,n);else if(e._strafing)K1e(e,n);else{if(m.magnitude(o.position)<m.magnitude(e._rotateStartPosition))return;a=m.magnitude(e._rotateStartPosition),c=kee,c.x=c.y=c.z=a,s=ie.fromCartesian3(c,Uee),wee(e,t,n,s)}return}e._looking=!1,e._rotating=!1,e._strafing=!1;let u=s.cartesianToCartographic(o.positionWC,tEe).height,h=e._globe;if(l(h)&&u<e._minimumPickingTerrainHeight){let p=Rg(e,n.startPosition,qVt);if(l(p)){let b=!1,f=o.getPickRay(n.startPosition,O1e);if(r)b=!0,H1e(e,f,p,p);else{let y=s.geodeticSurfaceNormal(p,QVt);Math.abs(m.dot(f.direction,y))<.05?b=!0:b=m.magnitude(o.position)<m.magnitude(p)}b?(M.clone(t,e._strafeEndMousePosition),m.clone(p,e._strafeStartPosition),e._strafing=!0,Oee(e,n,e._strafeStartPosition)):(a=m.magnitude(p),c=kee,c.x=c.y=c.z=a,s=ie.fromCartesian3(c,Uee),wee(e,t,n,s),m.clone(p,e._rotateStartPosition))}else e._looking=!0,Ju(e,t,n,d)}else l(o.pickEllipsoid(n.startPosition,e._ellipsoid,N1e))?(wee(e,t,n,e._ellipsoid),m.clone(N1e,e._rotateStartPosition)):u>e._minimumTrackBallHeight?(e._rotating=!0,Ku(e,t,n)):(e._looking=!0,Ju(e,t,n,d));M.clone(t,e._rotateMousePosition)}function Ku(e,t,n,i,o,r){o=o??!1,r=r??!1;let s=e._scene,a=s.camera,c=s.canvas,d=a.constrainedAxis;l(i)&&(a.constrainedAxis=i);let u=m.magnitude(a.position),h=e._rotateFactor*(u-e._rotateRateRangeAdjustment);h>e._maximumRotateRate&&(h=e._maximumRotateRate),h<e._minimumRotateRate&&(h=e._minimumRotateRate);let p=(n.startPosition.x-n.endPosition.x)/c.clientWidth,b=(n.startPosition.y-n.endPosition.y)/c.clientHeight;p=Math.min(p,e.maximumMovementRatio),b=Math.min(b,e.maximumMovementRatio);let f=h*p*Math.PI*2,y=h*b*Math.PI;if(l(i)&&l(e.maximumTiltAngle)){let _=e.maximumTiltAngle,S=m.dot(a.direction,i),A=Math.PI-Math.acos(S)+y;A>_&&(y-=A-_)}o||a.rotateRight(f),r||a.rotateUp(y),a.constrainedAxis=d}var Yee=se.clone(se.UNIT_W),Y1e=se.clone(se.UNIT_W),j3=new m,zR=new m,Q3=new m,w1e=new m,eRt=new M,tRt=new M,nRt=new M,iRt=new M,oRt=new gn;function wee(e,t,n,i){let o=e._scene,r=o.camera,s=M.clone(n.startPosition,eRt),a=M.clone(n.endPosition,tRt),c=i.cartesianToCartographic(r.positionWC,tEe).height,d,u;if(!n.inertiaEnabled&&c<e._minimumPickingTerrainHeight&&(d=m.clone(e._panLastWorldPosition,Yee),!l(e._globe)&&!M.equalsEpsilon(s,e._panLastMousePosition)&&(d=Rg(e,s,Yee)),!l(e._globe)&&l(d))){let h=m.subtract(d,r.positionWC,zR),p=m.multiplyByScalar(r.directionWC,m.dot(r.directionWC,h),zR),b=m.magnitude(p),f=r.frustum.getPixelDimensions(o.drawingBufferWidth,o.drawingBufferHeight,b,o.pixelRatio,iRt),y=M.subtract(a,s,nRt),_=m.multiplyByScalar(r.rightWC,y.x*f.x,zR),S=m.normalize(r.positionWC,D1e),A=r.getPickRay(a,oRt).direction,Z=m.subtract(A,m.projectVector(A,r.rightWC,Q3),Q3),V=m.angleBetween(Z,r.directionWC),E=1;l(r.frustum.fov)&&(E=Math.max(Math.tan(V),.1));let L=Math.abs(m.dot(r.directionWC,S)),v=-y.y*f.y*2/Math.sqrt(E)*(1-L),I=m.multiplyByScalar(A,v,Q3);L=Math.abs(m.dot(r.upWC,S));let X=m.multiplyByScalar(r.upWC,-y.y*(1-L)*f.y,w1e);u=m.add(d,_,Y1e),u=m.add(u,I,u),u=m.add(u,X,u),m.clone(u,e._panLastWorldPosition),M.clone(a,e._panLastMousePosition)}if((!l(d)||!l(u))&&(d=r.pickEllipsoid(s,i,Yee),u=r.pickEllipsoid(a,i,Y1e)),!l(d)||!l(u)){e._rotating=!0,Ku(e,t,n);return}if(d=r.worldToCameraCoordinates(d,d),u=r.worldToCameraCoordinates(u,u),l(r.constrainedAxis)){let h=r.constrainedAxis,p=m.mostOrthogonalAxis(h,j3);m.cross(p,h,p),m.normalize(p,p);let b=m.cross(h,p,zR),f=m.magnitude(d),y=m.dot(h,d),_=Math.acos(y/f),S=m.multiplyByScalar(h,y,Q3);m.subtract(d,S,S),m.normalize(S,S);let A=m.magnitude(u),Z=m.dot(h,u),V=Math.acos(Z/A),E=m.multiplyByScalar(h,Z,w1e);m.subtract(u,E,E),m.normalize(E,E);let L=Math.acos(m.dot(S,p));m.dot(S,b)<0&&(L=W.TWO_PI-L);let v=Math.acos(m.dot(E,p));m.dot(E,b)<0&&(v=W.TWO_PI-v);let I=L-v,X;m.equalsEpsilon(h,r.position,W.EPSILON2)?X=r.right:X=m.cross(h,r.position,j3);let N=m.cross(h,X,j3),g=m.dot(N,m.subtract(d,h,zR)),C=m.dot(N,m.subtract(u,h,zR)),R;g>0&&C>0?R=V-_:g>0&&C<=0?m.dot(r.position,h)>0?R=-_-V:R=_+V:R=_-V,r.rotateRight(I),r.rotateUp(R)}else{m.normalize(d,d),m.normalize(u,u);let h=m.dot(d,u),p=m.cross(d,u,j3);if(h<1&&!m.equalsEpsilon(p,m.ZERO,W.EPSILON14)){let b=Math.acos(h);r.rotate(p,b)}}}var rRt=new m,sRt=new pe,M1e=0;function nEe(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=q1e,d.x=a.clientWidth/2,d.y=a.clientHeight/2);let u=s.getPickRay(d,$1e),h,p=o.cartesianToCartographic(s.position,sRt).height,b=Math.abs(M1e)<e.minimumPickingTerrainDistanceWithInertia;(i?b:p<e._minimumPickingTerrainHeight)&&(h=Rg(e,d,eEe));let y;if(l(h)&&(y=m.distance(u.origin,h)),!l(e._globe)&&l(y)&&s.getMagnitude()<y&&(h=void 0,y=void 0),l(y)&&(M1e=y),c){let S=B1e(e,u,p);l(y)?y=Math.min(y,S):y=S}l(y)||(y=p);let _=m.normalize(s.position,rRt);Dee(e,t,n,e.zoomFactor,y,m.dot(_,s.direction))}var iEe=new M,tz=new gn,gM=new m,aRt=new m,oEe=new F,cRt=new F,rEe=new F,lRt=new Pe,dRt=new q,Bee=new pe,zee=new m;function uRt(e,t,n){let o=e._scene.camera;if(!F.equals(o.transform,F.IDENTITY))return;if(l(n.angleAndHeight)&&(n=n.angleAndHeight),M.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e._looking){let a=e._ellipsoid.geodeticSurfaceNormal(o.position,zee);Ju(e,t,n,a);return}let s=e._ellipsoid.cartesianToCartographic(o.position,Bee);e._tiltOnEllipsoid||s.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,hRt(e,t,n)):fRt(e,t,n)}var mRt=new pe;function hRt(e,t,n){let i=e._ellipsoid,o=e._scene,r=o.camera,s=e.minimumZoomDistance*.25,a=i.cartesianToCartographic(r.positionWC,mRt).height;if(a-s-1<W.EPSILON3&&n.endPosition.y-n.startPosition.y<0)return;let c=o.canvas,d=iEe;d.x=c.clientWidth/2,d.y=c.clientHeight/2;let u=r.getPickRay(d,tz),h,p=ai.rayEllipsoid(u,i);if(l(p))h=gn.getPoint(u,p.start,gM);else if(a>e._minimumTrackBallHeight){let A=ai.grazingAltitudeLocation(u,i);if(!l(A))return;let Z=i.cartesianToCartographic(A,Bee);Z.height=0,h=i.cartographicToCartesian(Z,gM)}else{e._looking=!0;let A=e._ellipsoid.geodeticSurfaceNormal(r.position,zee);Ju(e,t,n,A),M.clone(t,e._tiltCenterMousePosition);return}let b=dt.eastNorthUpToFixedFrame(h,i,oEe),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,rEe);r._setTransform(b),Ku(e,t,n,m.UNIT_Z),r._setTransform(_),e._globe=f,e._ellipsoid=y;let S=y.maximumRadius;e._rotateFactor=1/S,e._rotateRateRangeAdjustment=S}function fRt(e,t,n){let i=e._ellipsoid,o=e._scene,r=o.camera,s=e._cameraUnderground,a,c,d;if(M.equals(t,e._tiltCenterMousePosition))a=m.clone(e._tiltCenter,gM);else{if(a=Rg(e,t,gM),!l(a)){if(c=r.getPickRay(t,tz),d=ai.rayEllipsoid(c,i),!l(d)){if(i.cartesianToCartographic(r.position,Bee).height<=e._minimumTrackBallHeight){e._looking=!0;let C=e._ellipsoid.geodeticSurfaceNormal(r.position,zee);Ju(e,t,n,C),M.clone(t,e._tiltCenterMousePosition)}return}a=gn.getPoint(c,d.start,gM)}s&&(l(c)||(c=r.getPickRay(t,tz)),z1e(e,c,a,a)),M.clone(t,e._tiltCenterMousePosition),m.clone(a,e._tiltCenter)}let u=o.canvas,h=iEe;h.x=u.clientWidth/2,h.y=e._tiltCenterMousePosition.y,c=r.getPickRay(h,tz);let p=m.magnitude(a),b=m.fromElements(p,p,p,kee),f=ie.fromCartesian3(b,Uee);if(d=ai.rayEllipsoid(c,f),!l(d))return;let y=m.magnitude(c.origin)>p?d.start:d.stop,_=gn.getPoint(c,y,aRt),S=dt.eastNorthUpToFixedFrame(a,i,oEe),A=dt.eastNorthUpToFixedFrame(_,f,cRt),Z=e._globe,V=e._ellipsoid;e._globe=void 0,e._ellipsoid=ie.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;let E=m.UNIT_Z,L=F.clone(r.transform,rEe);r._setTransform(A);let v=m.cross(_,r.positionWC,ez);if(m.dot(r.rightWC,v)<0){let g=n.startPosition.y-n.endPosition.y;(s&&g<0||!s&&g>0)&&(E=void 0);let C=r.constrainedAxis;r.constrainedAxis=void 0,Ku(e,t,n,E,!0,!1),r.constrainedAxis=C}else Ku(e,t,n,E,!0,!1);if(r._setTransform(S),Ku(e,t,n,E,!1,!0),l(r.constrainedAxis)){let g=m.cross(r.direction,r.constrainedAxis,ez);m.equalsEpsilon(g,m.ZERO,W.EPSILON6)||(m.dot(g,r.right)<0&&m.negate(g,g),m.cross(g,r.direction,r.up),m.cross(r.direction,r.up,r.right),m.normalize(r.up,r.up),m.normalize(r.right,r.right))}r._setTransform(L),e._globe=Z,e._ellipsoid=V;let X=V.maximumRadius;e._rotateFactor=1/X,e._rotateRateRangeAdjustment=X;let N=m.clone(r.positionWC,ez);if(e.enableCollisionDetection&&Hee(e,!0),!m.equals(r.positionWC,N)){r._setTransform(A),r.worldToCameraCoordinatesPoint(N,N);let g=m.magnitudeSquared(N);m.magnitudeSquared(r.position)>g&&(m.normalize(r.position,r.position),m.multiplyByScalar(r.position,Math.sqrt(g),r.position));let C=m.angleBetween(N,r.position),R=m.cross(N,r.position,N);m.normalize(R,R);let G=Pe.fromAxisAngle(R,C,lRt),P=q.fromQuaternion(G,dRt);q.multiplyByVector(P,r.direction,r.direction),q.multiplyByVector(P,r.up,r.up),m.cross(r.direction,r.up,r.right),m.cross(r.right,r.direction,r.up),r._setTransform(L)}}var pRt=new M,bRt=new M,k1e=new gn,U1e=new gn,gRt=new m,yRt=new m;function Ju(e,t,n,i){let r=e._scene.camera,s=pRt;s.x=n.startPosition.x,s.y=0;let a=bRt;a.x=n.endPosition.x,a.y=0;let c=r.getPickRay(s,k1e),d=r.getPickRay(a,U1e),u=0,h,p;r.frustum instanceof mn?(h=c.origin,p=d.origin,m.add(r.direction,h,h),m.add(r.direction,p,p),m.subtract(h,r.position,h),m.subtract(p,r.position,p),m.normalize(h,h),m.normalize(p,p)):(h=c.direction,p=d.direction);let b=m.dot(h,p);b<1&&(u=Math.acos(b)),u=n.startPosition.x>n.endPosition.x?-u:u;let f=e._horizontalRotationAxis;if(l(i)?r.look(i,-u):l(f)?r.look(f,-u):r.lookLeft(u),s.x=0,s.y=n.startPosition.y,a.x=0,a.y=n.endPosition.y,c=r.getPickRay(s,k1e),d=r.getPickRay(a,U1e),u=0,r.frustum instanceof mn?(h=c.origin,p=d.origin,m.add(r.direction,h,h),m.add(r.direction,p,p),m.subtract(h,r.position,h),m.subtract(p,r.position,p),m.normalize(h,h),m.normalize(p,p)):(h=c.direction,p=d.direction),b=m.dot(h,p),b<1&&(u=Math.acos(b)),u=n.startPosition.y>n.endPosition.y?-u:u,i=i??f,l(i)){let y=r.direction,_=m.negate(i,gRt),S=m.equalsEpsilon(y,i,W.EPSILON2),A=m.equalsEpsilon(y,_,W.EPSILON2);if(!S&&!A){b=m.dot(y,i);let Z=W.acosClamped(b);u>0&&u>Z&&(u=Z-W.EPSILON4),b=m.dot(y,_),Z=W.acosClamped(b),u<0&&-u>Z&&(u=-Z+W.EPSILON4);let V=m.cross(i,y,yRt);r.look(V,u)}else(S&&u<0||A&&u>0)&&r.look(r.right,-u)}else r.lookUp(u)}function xRt(e){cd(e,e.enableRotate,e.rotateEventTypes,$Vt,e.inertiaSpin,"_lastInertiaSpinMovement"),cd(e,e.enableZoom,e.zoomEventTypes,nEe,e.inertiaZoom,"_lastInertiaZoomMovement"),cd(e,e.enableTilt,e.tiltEventTypes,uRt,e.inertiaSpin,"_lastInertiaTiltMovement"),cd(e,e.enableLook,e.lookEventTypes,Ju)}var TRt=new F,_Rt=new pe;function Hee(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,TRt),c=m.magnitude(o.position),o._setTransform(F.IDENTITY));let d=_Rt;i===re.SCENE3D?r.cartesianToCartographic(o.position,d):s.unproject(o.position,d);let u=!1;if(d.height<e._minimumCollisionTerrainHeight){let h=e._scene.globeHeight;if(l(h)){let p=h+e.minimumZoomDistance,b=h-e._lastGlobeHeight,f=b/e._lastGlobeHeight;d.height<p&&(t||Math.abs(f)<=.1)&&(d.height=p,i===re.SCENE3D?r.cartographicToCartesian(d,o.position):s.project(d,o.position),u=!0),t||Math.abs(f)<=.1?e._lastGlobeHeight=h:e._lastGlobeHeight+=b*.1}}l(a)&&(o._setTransform(a),u&&(m.normalize(o.position,o.position),m.negate(o.position,o.direction),m.multiplyByScalar(o.position,Math.max(c,e.minimumZoomDistance),o.position),m.normalize(o.direction,o.direction),m.cross(o.direction,o.up,o.right),m.cross(o.right,o.direction,o.up)))}yM.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 SRt=new m,ARt=new m;yM.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=ao.getHeight(this.minimumCollisionTerrainHeight,o,r),this._minimumPickingTerrainHeight=ao.getHeight(this.minimumPickingTerrainHeight,o,r),this._minimumTrackBallHeight=ao.getHeight(this.minimumTrackBallHeight,o,r),this._cameraUnderground=e.cameraUnderground&&l(this._globe);let s=this._ellipsoid.maximumRadius;this._rotateFactor=1/s,this._rotateRateRangeAdjustment=s,this._adjustedHeightForTerrain=!1;let a=m.clone(t.positionWC,SRt),c=m.clone(t.directionWC,ARt);if(i===re.SCENE2D?_Vt(this):i===re.COLUMBUS_VIEW?(this._horizontalRotationAxis=m.UNIT_Z,BVt(this)):i===re.SCENE3D&&(this._horizontalRotationAxis=void 0,xRt(this)),this.enableCollisionDetection&&!this._adjustedHeightForTerrain){let d=!m.equals(a,t.positionWC)||!m.equals(c,t.directionWC);Hee(this,d)}this._aggregator.reset()};yM.prototype.isDestroyed=function(){return!1};yM.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),me(this)};var xM=yM;var Too=x(T(),1);var $io=x(T(),1),TM=`uniform sampler2D colorTexture;
uniform sampler2D colorTexture2;
uniform vec2 center;
uniform float radius;
in vec2 v_textureCoordinates;
void main()
{
vec4 color0 = texture(colorTexture, v_textureCoordinates);
vec4 color1 = texture(colorTexture2, v_textureCoordinates);
float x = length(gl_FragCoord.xy - center) / radius;
float t = smoothstep(0.5, 0.8, x);
out_FragColor = mix(color0 + color1, color1, t);
}
`;var too=x(T(),1),_M=`uniform sampler2D colorTexture;
uniform float avgLuminance;
uniform float threshold;
uniform float offset;
in vec2 v_textureCoordinates;
float key(float avg)
{
float guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));
return max(0.0, guess) + 0.1;
}
// See section 9. "The bright-pass filter" of Realtime HDR Rendering
// http://www.cg.tuwien.ac.at/research/publications/2007/Luksch_2007_RHR/Luksch_2007_RHR-RealtimeHDR%20.pdf
void main()
{
vec4 color = texture(colorTexture, v_textureCoordinates);
vec3 xyz = czm_RGBToXYZ(color.rgb);
float luminance = xyz.r;
float scaledLum = key(avgLuminance) * luminance / avgLuminance;
float brightLum = max(scaledLum - threshold, 0.0);
float brightness = brightLum / (offset + brightLum);
xyz.r = brightness;
out_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);
}
`;function Eg(){this._sceneFramebuffer=new oA;let e=.125,t=new Array(6);t[0]=new Vo({fragmentShader:zd,textureScale:e,forcePowerOfTwo:!0,sampleMode:Ou.LINEAR});let n=t[1]=new Vo({fragmentShader:_M,uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:e,forcePowerOfTwo:!0}),i=this;this._delta=1,this._sigma=2,this._blurStep=new M,t[2]=new Vo({fragmentShader: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 Vo({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 Vo({fragmentShader:zd,sampleMode:Ou.LINEAR}),this._uCenter=new M,this._uRadius=void 0,t[5]=new Vo({fragmentShader:TM,uniforms:{center:function(){return i._uCenter},radius:function(){return i._uRadius},colorTexture2:function(){return i._sceneFramebuffer.framebuffer.getColorTexture(0)}}}),this._stages=new Hd({stages:t});let o=new uA(this),r=t.length;for(let s=0;s<r;++s)t[s]._textureCache=o;this._textureCache=o,this.length=t.length}Eg.prototype.get=function(e){return this._stages.get(e)};Eg.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 ZRt=new se,sEe=new M,CRt=new M,aEe=new F;function VRt(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,aEe),d=F.multiplyByPoint(r,o,ZRt),u=dt.pointToGLWindowCoordinates(s,c,o,sEe);d.x+=W.SOLAR_RADIUS;let h=dt.pointToGLWindowCoordinates(a,c,d,d),p=M.magnitude(M.subtract(h,u,h))*30*2,b=CRt;b.x=p,b.y=p,e._uCenter=M.clone(u,e._uCenter),e._uRadius=Math.max(b.x,b.y)*.15;let f=t.drawingBufferWidth,y=t.drawingBufferHeight,_=e._stages,S=_.get(0),A=S.outputTexture.width,Z=S.outputTexture.height,V=new Qe;V.width=A,V.height=Z,c=F.computeViewportTransformation(V,0,1,aEe),u=dt.pointToGLWindowCoordinates(s,c,o,sEe),b.x*=A/f,b.y*=Z/y;let E=S.scissorRectangle;E.x=Math.max(u.x-b.x*.5,0),E.y=Math.max(u.y-b.y*.5,0),E.width=Math.min(b.x,f),E.height=Math.min(b.y,y);for(let L=1;L<4;++L)Qe.clone(E,_.get(L).scissorRectangle)}Eg.prototype.clear=function(e,t,n){this._sceneFramebuffer.clear(e,t,n),this._textureCache.clear(e)};Eg.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),VRt(this,t,n),o};Eg.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)};Eg.prototype.copy=function(e,t){if(!l(this._copyColorCommand)){let n=this;this._copyColorCommand=e.createViewportQuadCommand(zd,{uniformMap:{colorTexture:function(){return n._stages.get(n._stages.length-1).outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)};Eg.prototype.isDestroyed=function(){return!1};Eg.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),me(this)};var SM=Eg;var Roo=x(T(),1);function cEe(){this._cachedShowFrustumsShaders={}}function RRt(e){let t={},n=e.vertexAttributes;for(let i in n)n.hasOwnProperty(i)&&(t[i]=n[i].index);return t}function ERt(e,t){let n=e.context,i=t,o=i.fragmentShaderSource.clone(),r=[];o.sources=o.sources.map(function(u){u=Be.replaceMain(u,"czm_Debug_main");let h=/out_FragData_(\d+)/g,p;for(;(p=h.exec(u))!==null;)r.indexOf(p[1])===-1&&r.push(p[1]);return u});let s=r.length,a="";a+=`uniform vec3 debugShowCommandsColor;
`,a+=`uniform vec3 debugShowFrustumsColor;
`,a+=`void main()
{
czm_Debug_main();
`;let c;if(s>0)for(c=0;c<s;++c)a+=` out_FragData_${r[c]}.rgb *= debugShowCommandsColor;
`,a+=` out_FragData_${r[c]}.rgb *= debugShowFrustumsColor;
`;else a+=` out_FragColor.rgb *= debugShowCommandsColor;
`,a+=` out_FragColor.rgb *= debugShowFrustumsColor;
`;a+="}",o.sources.push(a);let d=RRt(i);return qt.fromCache({context:n,vertexShaderSource:i.vertexShaderSource,fragmentShaderSource:o,attributeLocations:d})}var AM=new U;function GRt(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?(AM.red=t.debugOverlappingFrustums&1?1:0,AM.green=t.debugOverlappingFrustums&2?1:0,AM.blue=t.debugOverlappingFrustums&4?1:0,AM.alpha=1,AM):U.WHITE}),n}var LRt=new et;cEe.prototype.executeDebugShowFrustumsCommand=function(e,t,n){let i=t.shaderProgram.id,o=this._cachedShowFrustumsShaders[i];l(o)||(o=ERt(e,t.shaderProgram),this._cachedShowFrustumsShaders[i]=o);let r=et.shallowClone(t,LRt);r.shaderProgram=o,r.uniformMap=GRt(e,t),r.execute(e.context,n)};var ZM=cEe;var Foo=x(T(),1);function gA(e,t,n){this._primitive=e,this._tileIndex=t,this._sampleIndex=n,this._metadata={},this._orientedBoundingBox=new $t}gA.fromKeyframeNode=function(e,t,n,i){let o=new gA(e,t,n),{spatialNode:r,content:s}=i;return o._metadata=WRt(e,s,n),o._orientedBoundingBox=FRt(e,r,n,o._orientedBoundingBox),o};function WRt(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=gt.getComponentCount(o[a]),u=r[a].slice(n*d,(n+1)*d);s[c]=u}return s}var lEe=new m,vRt=new m;function FRt(e,t,n,i){let o=t.dimensions,r=o.x*o.y,s=Math.floor(n/r),a=n-s*r,c=Math.floor(a/o.x),d=a-c*o.x,u=m.fromElements(d,c,s,lEe),h=m.divideComponents(m.subtract(u,e._paddingBefore,lEe),e.dimensions,vRt);return e._shape.computeOrientedBoundingBoxForSample(t,e.dimensions,h,i)}Object.defineProperties(gA.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()}}});gA.prototype.hasProperty=function(e){return l(this._metadata[e])};gA.prototype.getNames=function(){return Object.keys(this._metadata)};gA.prototype.getProperty=function(e){return this._metadata[e]};var CM=gA;var flo=x(T(),1);var _so=x(T(),1);var Yoo=x(T(),1);function IRt(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,fe.FRAGMENT),d&&n.addDefine("STATISTICS",void 0,fe.FRAGMENT);for(let g=0;g<c;g++){let C=i[g],R=iz(o[g]),G=`PropertyStatistics_${C}`,P=`PropertyStatistics_${C}`;n.addStruct(G,P,fe.FRAGMENT),n.addStructField(G,R,"min"),n.addStructField(G,R,"max")}let u="MetadataStatistics",h="MetadataStatistics",p="metadataStatistics";n.addStruct(u,h,fe.FRAGMENT);for(let g=0;g<c;g++){let C=i[g],R=`PropertyStatistics_${C}`,G=C;n.addStructField(u,R,G)}let b="Metadata",f="Metadata",y="metadata";n.addStruct(b,f,fe.FRAGMENT);for(let g=0;g<c;g++){let C=iz(o[g]);n.addStructField(b,C,i[g])}let _="Attributes",S="Attributes",A="attributes";n.addStruct(_,S,fe.FRAGMENT),n.addStructField(_,"vec3","positionEC"),n.addStructField(_,"vec3","normalEC");let Z="Voxel",V="Voxel",E="voxel";n.addStruct(Z,V,fe.FRAGMENT),n.addStructField(Z,"vec3","viewDirUv"),n.addStructField(Z,"float","travelDistance"),n.addStructField(Z,"int","stepCount"),n.addStructField(Z,"int","tileIndex"),n.addStructField(Z,"int","sampleIndex"),n.addStructField(Z,"float","distanceToDepthBuffer");let L="FragmentInput";n.addStruct(L,"FragmentInput",fe.FRAGMENT),n.addStructField(L,h,p),n.addStructField(L,f,y),n.addStructField(L,S,A),n.addStructField(L,V,E);let I="Properties",X="Properties",N="properties";n.addStruct(I,X,fe.FRAGMENT);for(let g=0;g<c;g++){let C=iz(o[g]);n.addStructField(I,C,i[g])}{let g="clearProperties";n.addFunction(g,`${X} clearProperties()`,fe.FRAGMENT),n.addFunctionLines(g,[`${X} ${N};`]);for(let C=0;C<c;C++){let R=iz(o[C],r[C]);n.addFunctionLines(g,[`${N}.${i[C]} = ${R}(0.0);`])}n.addFunctionLines(g,[`return ${N};`])}{let g="sumProperties";n.addFunction(g,`${X} sumProperties(${X} propertiesA, ${X} propertiesB)`,fe.FRAGMENT),n.addFunctionLines(g,[`${X} ${N};`]);for(let C=0;C<c;C++){let R=i[C];n.addFunctionLines(g,[`${N}.${R} = propertiesA.${R} + propertiesB.${R};`])}n.addFunctionLines(g,[`return ${N};`])}{let g="scaleProperties";n.addFunction(g,`${X} scaleProperties(${X} ${N}, float scale)`,fe.FRAGMENT),n.addFunctionLines(g,[`${X} scaledProperties = ${N};`]);for(let C=0;C<c;C++)n.addFunctionLines(g,[`scaledProperties.${i[C]} *= scale;`]);n.addFunctionLines(g,["return scaledProperties;"])}{let g="mixProperties";n.addFunction(g,`${X} mixProperties(${X} propertiesA, ${X} propertiesB, float mixFactor)`,fe.FRAGMENT),n.addFunctionLines(g,[`${X} ${N};`]);for(let C=0;C<c;C++){let R=i[C];n.addFunctionLines(g,[`${N}.${R} = mix(propertiesA.${R}, propertiesB.${R}, mixFactor);`])}n.addFunctionLines(g,[`return ${N};`])}{let g="copyPropertiesToMetadata";n.addFunction(g,`void copyPropertiesToMetadata(in ${X} ${N}, inout ${f} ${y})`,fe.FRAGMENT);for(let C=0;C<c;C++){let R=i[C];n.addFunctionLines(g,[`${y}.${R} = ${N}.${R};`])}}if(d){let g="setStatistics";n.addFunction(g,`void setStatistics(inout ${h} ${p})`,fe.FRAGMENT);for(let C=0;C<c;C++){let R=i[C],G=o[C],P=gt.getComponentCount(G);for(let Y=0;Y<P;Y++){let O=XRt(G,Y),k=s[C][Y],D=a[C][Y];!l(k)||!l(D)||n.addFunctionLines(g,[`${p}.${R}.min${O} = ${dEe(k)};`,`${p}.${R}.max${O} = ${dEe(D)};`])}}}{let g="getPropertiesFromMegatextureAtUv";n.addFunction(g,`${X} getPropertiesFromMegatextureAtUv(vec3 texcoord)`,fe.FRAGMENT),n.addFunctionLines(g,[`${X} ${N};`]);for(let C=0;C<c;C++){let R=o[C],G=r[C],P=PRt(R,G);n.addFunctionLines(g,[`properties.${i[C]} = texture(u_megatextureTextures[${C}], texcoord)${P};`])}n.addFunctionLines(g,[`return ${N};`])}}function iz(e){if(e===gt.SCALAR)return"float";if(e===gt.VEC2)return"vec2";if(e===gt.VEC3)return"vec3";if(e===gt.VEC4)return"vec4"}function PRt(e){if(e===gt.SCALAR)return".r";if(e===gt.VEC2)return".ra";if(e===gt.VEC3)return".rgb";if(e===gt.VEC4)return""}function dEe(e){let t=e.toString();return t.indexOf(".")===-1&&(t=`${e}.0`),t}function XRt(e,t){return e===gt.SCALAR?"":`[${t}]`}var VM=IRt;var nro=x(T(),1);function Bf(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?uEe:mEe,this._float32View=void 0,this._clippingPlanesTexture=void 0,l(t))for(let o=0;o<t.length;++o)this.add(t[o])}function uEe(e){return e===zt.OUTSIDE}function mEe(e){return e===zt.INSIDE}Object.defineProperties(Bf.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?uEe:mEe)}},texture:{get:function(){return this._clippingPlanesTexture}},clippingPlanesState:{get:function(){return this._unionClippingRegions?this._planes.length:-this._planes.length}}});Bf.prototype.add=function(e){let t=this._planes.length;e.index=t,this._planes.push(e),this.planeAdded.raiseEvent(e,t)};Bf.prototype.get=function(e){return this._planes[e]};function hEe(e,t){for(let n=0;n<e.length;++n)if(nn.equals(e[n],t))return n;return-1}Bf.prototype.contains=function(e){return hEe(this._planes,e)!==-1};Bf.prototype.remove=function(e){let t=this._planes,n=hEe(t,e);if(n===-1)return!1;e instanceof zs&&(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 zs&&(r.index=o)}return t.length=i,this.planeRemoved.raiseEvent(e,n),!0};Bf.prototype.removeAll=function(){let e=this._planes;for(let t=0;t<e.length;++t){let n=e[t];n instanceof zs&&(n.onChangeCallback=void 0,n.index=-1),this.planeRemoved.raiseEvent(n,t)}this._planes=[]};var NRt=new nn(m.fromElements(1,0,0),0);function YRt(e,t){let n=e._float32View,i=e._planes,o=0;for(let r=0;r<i.length;++r){let{normal:s,distance:a}=MRt(i[r],t,NRt);n[o]=s.x,n[o+1]=s.y,n[o+2]=s.z,n[o+3]=a,o+=4}}var Kee=new se,wRt=new m;function MRt(e,t,n){let{normal:i,distance:o}=e,r=se.fromElements(i.x,i.y,i.z,o,Kee),s=F.multiplyByVector(t,r,Kee),a=m.fromCartesian4(s,wRt);return s=se.divideByScalar(s,m.magnitude(a),Kee),nn.fromCartesian4(s,n)}function fEe(e,t){return t.x=Math.min(e,Lt.maximumTextureSize),t.y=Math.ceil(e/t.x),t}var kRt=new M;Bf.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=fEe(i,kRt);s.y*=2,n=new Et({context:e.context,width:s.x,height:s.y,pixelFormat:Ke.RGBA,pixelDatatype:Oe.FLOAT,sampler:Ut.NEAREST,flipY:!1}),this._float32View=new Float32Array(s.x*s.y*4),this._clippingPlanesTexture=n}let{width:o,height:r}=n;YRt(this,t),n.copyFrom({source:{width:o,height:r,arrayBufferView:this._float32View}})};Bf.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=fEe(o,n);return r.y*=2,r};Bf.prototype.isDestroyed=function(){return!1};Bf.prototype.destroy=function(){return this._clippingPlanesTexture=this._clippingPlanesTexture&&this._clippingPlanesTexture.destroy(),me(this)};var Gg=Bf;var sso=x(T(),1);var oro=x(T(),1),RM=`struct Ray {
vec3 pos;
vec3 dir;
};
float minComponent(in vec3 v) {
return min(min(v.x, v.y), v.z);
}
float maxComponent(in vec3 v) {
return max(max(v.x, v.y), v.z);
}
`;var sro=x(T(),1),EM=`// See Intersection.glsl for the definition of intersectScene
// See IntersectionUtils.glsl for the definition of nextIntersection
// See convertLocalToBoxUv.glsl, convertLocalToCylinderUv.glsl, or convertLocalToEllipsoidUv.glsl
// for the definitions of convertLocalToShapeSpaceDerivative and getTileAndUvCoordinate.
// The appropriate functions are selected based on the VoxelPrimitive shape type,
// and added to the shader in Scene/VoxelRenderResources.js.
// See Octree.glsl for the definitions of TraversalData, SampleData,
// traverseOctreeFromBeginning, and traverseOctreeFromExisting
// See Megatexture.glsl for the definition of accumulatePropertiesFromMegatexture
#define STEP_COUNT_MAX 1000 // Harcoded value because GLSL doesn't like variable length loops
#if defined(PICKING_VOXEL)
#define ALPHA_ACCUM_MAX 0.1
#else
#define ALPHA_ACCUM_MAX 0.98 // Must be > 0.0 and <= 1.0
#endif
uniform mat4 u_transformPositionViewToLocal;
uniform mat3 u_transformDirectionViewToLocal;
uniform vec3 u_cameraPositionLocal;
uniform vec3 u_cameraDirectionLocal;
uniform float u_stepSize;
#if defined(PICKING)
uniform vec4 u_pickColor;
#endif
vec3 getSampleSize(in int level) {
vec3 sampleCount = exp2(float(level)) * vec3(u_dimensions);
vec3 sampleSizeUv = 1.0 / sampleCount;
return scaleShapeUvToShapeSpace(sampleSizeUv);
}
#define MINIMUM_STEP_SCALAR (0.02)
#define SHIFT_FRACTION (0.001)
/**
* Given a coordinate within a tile, and sample spacings along a ray through
* the coordinate, find the distance to the points where the ray entered and
* exited the voxel cell, along with the surface normals at those points.
* The surface normals are returned in shape space coordinates.
*/
RayShapeIntersection getVoxelIntersection(in vec3 tileUv, in vec3 sampleSizeAlongRay) {
vec3 voxelCoord = tileUv * vec3(u_dimensions);
vec3 directions = sign(sampleSizeAlongRay);
vec3 positiveDirections = max(directions, 0.0);
vec3 entryCoord = mix(ceil(voxelCoord), floor(voxelCoord), positiveDirections);
vec3 exitCoord = entryCoord + directions;
vec3 distanceFromEntry = -abs((entryCoord - voxelCoord) * sampleSizeAlongRay);
float lastEntry = maxComponent(distanceFromEntry);
bvec3 isLastEntry = equal(distanceFromEntry, vec3(lastEntry));
vec3 entryNormal = -1.0 * vec3(isLastEntry) * directions;
vec4 entry = vec4(entryNormal, lastEntry);
vec3 distanceToExit = abs((exitCoord - voxelCoord) * sampleSizeAlongRay);
float firstExit = minComponent(distanceToExit);
bvec3 isFirstExit = equal(distanceToExit, vec3(firstExit));
vec3 exitNormal = vec3(isFirstExit) * directions;
vec4 exit = vec4(exitNormal, firstExit);
return RayShapeIntersection(entry, exit);
}
vec4 getStepSize(in SampleData sampleData, in Ray viewRay, in RayShapeIntersection shapeIntersection, in mat3 jacobianT, in float currentT) {
vec3 gradient = viewRay.dir * jacobianT;
vec3 sampleSizeAlongRay = getSampleSize(sampleData.tileCoords.w) / gradient;
RayShapeIntersection voxelIntersection = getVoxelIntersection(sampleData.tileUv, sampleSizeAlongRay);
// Transform normal from shape space to Cartesian space to eye space
vec3 voxelNormal = jacobianT * voxelIntersection.entry.xyz;
voxelNormal = normalize(czm_normal * voxelNormal);
// Compare with the shape intersection, to choose the appropriate normal
vec4 voxelEntry = vec4(voxelNormal, currentT + voxelIntersection.entry.w);
vec4 entry = intersectionMax(shapeIntersection.entry, voxelEntry);
float fixedStep = minComponent(abs(sampleSizeAlongRay)) * u_stepSize;
float shift = fixedStep * SHIFT_FRACTION;
float dt = voxelIntersection.exit.w + shift;
if ((currentT + dt) > shapeIntersection.exit.w) {
// Stop at end of shape
dt = shapeIntersection.exit.w - currentT + shift;
}
float stepSize = clamp(dt, fixedStep * MINIMUM_STEP_SCALAR, fixedStep + shift);
return vec4(entry.xyz, stepSize);
}
vec2 packIntToVec2(int value) {
float shifted = float(value) / 255.0;
float lowBits = fract(shifted);
float highBits = floor(shifted) / 255.0;
return vec2(highBits, lowBits);
}
vec2 packFloatToVec2(float value) {
float lowBits = fract(value);
float highBits = floor(value) / 255.0;
return vec2(highBits, lowBits);
}
int getSampleIndex(in SampleData sampleData) {
// tileUv = 1.0 is a valid coordinate but sampleIndex = u_inputDimensions is not.
// (tileUv = 1.0 corresponds to the far edge of the last sample, at index = u_inputDimensions - 1).
// Clamp to [0, voxelDimensions - 0.5) to avoid numerical error before flooring
vec3 maxCoordinate = vec3(u_inputDimensions) - vec3(0.5);
vec3 inputCoordinate = clamp(sampleData.inputCoordinate, vec3(0.0), maxCoordinate);
ivec3 sampleIndex = ivec3(floor(inputCoordinate));
// Convert to a 1D index for lookup in a 1D data array
return sampleIndex.x + u_inputDimensions.x * (sampleIndex.y + u_inputDimensions.y * sampleIndex.z);
}
/**
* Compute the view ray at the current fragment, in the local coordinates of the shape.
*/
Ray getViewRayLocal() {
vec4 eyeCoordinates = czm_windowToEyeCoordinates(gl_FragCoord);
vec3 origin;
vec3 direction;
if (czm_orthographicIn3D == 1.0) {
eyeCoordinates.z = 0.0;
origin = (u_transformPositionViewToLocal * eyeCoordinates).xyz;
direction = u_cameraDirectionLocal;
} else {
origin = u_cameraPositionLocal;
direction = u_transformDirectionViewToLocal * normalize(eyeCoordinates.xyz);
}
return Ray(origin, direction);
}
Ray getViewRayEC() {
vec4 eyeCoordinates = czm_windowToEyeCoordinates(gl_FragCoord);
vec3 viewPosEC = (czm_orthographicIn3D == 1.0)
? vec3(eyeCoordinates.xy, 0.0)
: vec3(0.0);
vec3 viewDirEC = normalize(eyeCoordinates.xyz);
return Ray(viewPosEC, viewDirEC);
}
void main()
{
Ray viewRayLocal = getViewRayLocal();
Ray viewRayEC = getViewRayEC();
Intersections ix;
vec2 screenCoord = (gl_FragCoord.xy - czm_viewport.xy) / czm_viewport.zw; // [0,1]
RayShapeIntersection shapeIntersection = intersectScene(screenCoord, viewRayLocal, viewRayEC, ix);
// Exit early if the scene was completely missed.
if (shapeIntersection.entry.w == NO_HIT) {
discard;
}
float currentT = shapeIntersection.entry.w;
float endT = shapeIntersection.exit.w;
vec3 positionEC = viewRayEC.pos + currentT * viewRayEC.dir;
TileAndUvCoordinate tileAndUv = getTileAndUvCoordinate(positionEC);
vec3 positionLocal = viewRayLocal.pos + currentT * viewRayLocal.dir;
mat3 jacobianT = convertLocalToShapeSpaceDerivative(positionLocal);
// Traverse the tree from the start position
TraversalData traversalData;
SampleData sampleDatas[SAMPLE_COUNT];
traverseOctreeFromBeginning(tileAndUv, traversalData, sampleDatas);
vec4 step = getStepSize(sampleDatas[0], viewRayLocal, shapeIntersection, jacobianT, currentT);
FragmentInput fragmentInput;
#if defined(STATISTICS)
setStatistics(fragmentInput.metadataStatistics);
#endif
czm_modelMaterial materialOutput;
vec4 colorAccum = vec4(0.0);
for (int stepCount = 0; stepCount < STEP_COUNT_MAX; ++stepCount) {
// Read properties from the megatexture based on the traversal state
Properties properties = accumulatePropertiesFromMegatexture(sampleDatas);
// Prepare the custom shader inputs
copyPropertiesToMetadata(properties, fragmentInput.metadata);
fragmentInput.attributes.positionEC = positionEC;
// Re-normalize normals: some shape intersections may have been scaled to encode positive/negative shapes
fragmentInput.attributes.normalEC = normalize(step.xyz);
fragmentInput.voxel.viewDirUv = viewRayLocal.dir;
fragmentInput.voxel.travelDistance = step.w;
fragmentInput.voxel.stepCount = stepCount;
fragmentInput.voxel.tileIndex = sampleDatas[0].megatextureIndex;
fragmentInput.voxel.sampleIndex = getSampleIndex(sampleDatas[0]);
fragmentInput.voxel.distanceToDepthBuffer = ix.distanceToDepthBuffer - currentT;
// Run the custom shader
fragmentMain(fragmentInput, materialOutput);
// Sanitize the custom shader output
vec4 color = vec4(materialOutput.diffuse, materialOutput.alpha);
color.rgb = max(color.rgb, vec3(0.0));
color.a = clamp(color.a, 0.0, 1.0);
// Pre-multiplied alpha blend
colorAccum += (1.0 - colorAccum.a) * vec4(color.rgb * color.a, color.a);
// Stop traversing if the alpha has been fully saturated
if (colorAccum.a > ALPHA_ACCUM_MAX) {
colorAccum.a = ALPHA_ACCUM_MAX;
break;
}
if (step.w == 0.0) {
// Shape is infinitely thin. The ray may have hit the edge of a
// foreground voxel. Step ahead slightly to check for more voxels
step.w = 0.001;
}
// Keep raymarching
currentT += step.w;
// Check if there's more intersections.
if (currentT > endT) {
#if (INTERSECTION_COUNT == 1)
break;
#else
shapeIntersection = nextIntersection(ix);
if (shapeIntersection.entry.w == NO_HIT) {
break;
} else {
// Found another intersection. Resume raymarching there
currentT = shapeIntersection.entry.w;
endT = shapeIntersection.exit.w;
}
#endif
}
positionEC = viewRayEC.pos + currentT * viewRayEC.dir;
tileAndUv = getTileAndUvCoordinate(positionEC);
positionLocal = viewRayLocal.pos + currentT * viewRayLocal.dir;
jacobianT = convertLocalToShapeSpaceDerivative(positionLocal);
// Traverse the tree from the current ray position.
// This is similar to traverseOctreeFromBeginning but is faster when the ray is in the same tile as the previous step.
traverseOctreeFromExisting(tileAndUv, traversalData, sampleDatas);
step = getStepSize(sampleDatas[0], viewRayLocal, shapeIntersection, jacobianT, currentT);
}
// Convert the alpha from [0,ALPHA_ACCUM_MAX] to [0,1]
colorAccum.a /= ALPHA_ACCUM_MAX;
#if defined(PICKING)
// If alpha is 0.0 there is nothing to pick
if (colorAccum.a == 0.0) {
discard;
}
out_FragColor = u_pickColor;
#elif defined(PICKING_VOXEL)
// If alpha is 0.0 there is nothing to pick
if (colorAccum.a == 0.0) {
discard;
}
vec2 megatextureId = packIntToVec2(sampleDatas[0].megatextureIndex);
vec2 sampleIndex = packIntToVec2(getSampleIndex(sampleDatas[0]));
out_FragColor = vec4(megatextureId, sampleIndex);
#else
out_FragColor = colorAccum;
#endif
}
`;var cro=x(T(),1),GM=`in vec2 position;
uniform vec4 u_ndcSpaceAxisAlignedBoundingBox;
void main() {
vec2 aabbMin = u_ndcSpaceAxisAlignedBoundingBox.xy;
vec2 aabbMax = u_ndcSpaceAxisAlignedBoundingBox.zw;
vec2 translation = 0.5 * (aabbMax + aabbMin);
vec2 scale = 0.5 * (aabbMax - aabbMin);
gl_Position = vec4(position * scale + translation, 0.0, 1.0);
}
`;var dro=x(T(),1),LM=`/* Intersection defines
#define INTERSECTION_COUNT ###
*/
#define NO_HIT (-czm_infinity)
#define INF_HIT (czm_infinity * 0.5)
struct RayShapeIntersection {
vec4 entry;
vec4 exit;
};
vec4 intersectionMin(in vec4 intersect0, in vec4 intersect1)
{
if (intersect0.w == NO_HIT) {
return intersect1;
} else if (intersect1.w == NO_HIT) {
return intersect0;
}
return (intersect0.w <= intersect1.w) ? intersect0 : intersect1;
}
vec4 intersectionMax(in vec4 intersect0, in vec4 intersect1)
{
return (intersect0.w >= intersect1.w) ? intersect0 : intersect1;
}
RayShapeIntersection intersectIntersections(in Ray ray, in RayShapeIntersection intersect0, in RayShapeIntersection intersect1)
{
bool missed = (intersect0.entry.w == NO_HIT) ||
(intersect1.entry.w == NO_HIT) ||
(intersect0.exit.w < intersect1.entry.w) ||
(intersect0.entry.w > intersect1.exit.w);
if (missed) {
vec4 miss = vec4(normalize(ray.dir), NO_HIT);
return RayShapeIntersection(miss, miss);
}
vec4 entry = intersectionMax(intersect0.entry, intersect1.entry);
vec4 exit = intersectionMin(intersect0.exit, intersect1.exit);
return RayShapeIntersection(entry, exit);
}
struct Intersections {
// Don't access these member variables directly - call the functions instead.
// Store an array of ray-surface intersections. Each intersection is composed of:
// .xyz for the surface normal at the intersection point
// .w for the T value
// The scale of the normal encodes the shape intersection type:
// length(intersection.xyz) = 1: positive shape entry
// length(intersection.xyz) = 2: positive shape exit
// length(intersection.xyz) = 3: negative shape entry
// length(intersection.xyz) = 4: negative shape exit
// INTERSECTION_COUNT is the number of ray-*shape* (volume) intersections,
// so we need twice as many to track ray-*surface* intersections
vec4 intersections[INTERSECTION_COUNT * 2];
float distanceToDepthBuffer;
#if (INTERSECTION_COUNT > 1)
// Maintain state for future nextIntersection calls
int index;
int surroundCount;
bool surroundIsPositive;
#endif
};
RayShapeIntersection getFirstIntersection(in Intersections ix)
{
return RayShapeIntersection(ix.intersections[0], ix.intersections[1]);
}
vec4 encodeIntersectionType(vec4 intersection, int index, bool entry)
{
float scale = float(index > 0) * 2.0 + float(!entry) + 1.0;
return vec4(intersection.xyz * scale, intersection.w);
}
// Use defines instead of real functions because WebGL1 cannot access array with non-constant index.
#define setIntersection(/*inout Intersections*/ ix, /*int*/ index, /*float*/ t, /*bool*/ positive, /*bool*/ enter) (ix).intersections[(index)] = vec4(0.0, float(!positive) * 2.0 + float(!enter) + 1.0, 0.0, (t))
#define setIntersectionPair(/*inout Intersections*/ ix, /*int*/ index, /*vec2*/ entryExit) (ix).intersections[(index) * 2 + 0] = vec4(0.0, float((index) > 0) * 2.0 + 1.0, 0.0, (entryExit).x); (ix).intersections[(index) * 2 + 1] = vec4(0.0, float((index) > 0) * 2.0 + 2.0, 0.0, (entryExit).y)
#define setSurfaceIntersection(/*inout Intersections*/ ix, /*int*/ index, /*vec4*/ intersection, /*bool*/ positive, /*bool*/ enter) (ix).intersections[(index)] = encodeIntersectionType((intersection), int(!positive), (enter))
#define setShapeIntersection(/*inout Intersections*/ ix, /*int*/ index, /*RayShapeIntersection*/ intersection) (ix).intersections[(index) * 2 + 0] = encodeIntersectionType((intersection).entry, (index), true); (ix).intersections[(index) * 2 + 1] = encodeIntersectionType((intersection).exit, (index), false)
#if (INTERSECTION_COUNT > 1)
void initializeIntersections(inout Intersections ix) {
// Sort the intersections from min T to max T with bubble sort.
// Note: If this sorting function changes, some of the intersection test may
// need to be updated. Search for "bubble sort" to find those areas.
const int sortPasses = INTERSECTION_COUNT * 2 - 1;
for (int n = sortPasses; n > 0; --n) {
for (int i = 0; i < sortPasses; ++i) {
// The loop should be: for (i = 0; i < n; ++i) {...} but WebGL1 cannot
// loop with non-constant condition, so it has to break early instead
if (i >= n) { break; }
vec4 intersect0 = ix.intersections[i + 0];
vec4 intersect1 = ix.intersections[i + 1];
bool inOrder = intersect0.w <= intersect1.w;
ix.intersections[i + 0] = inOrder ? intersect0 : intersect1;
ix.intersections[i + 1] = inOrder ? intersect1 : intersect0;
}
}
// Prepare initial state for nextIntersection
ix.index = 0;
ix.surroundCount = 0;
ix.surroundIsPositive = false;
}
#endif
#if (INTERSECTION_COUNT > 1)
RayShapeIntersection nextIntersection(inout Intersections ix) {
vec4 surfaceIntersection = vec4(0.0, 0.0, 0.0, NO_HIT);
RayShapeIntersection shapeIntersection = RayShapeIntersection(surfaceIntersection, surfaceIntersection);
const int passCount = INTERSECTION_COUNT * 2;
if (ix.index == passCount) {
return shapeIntersection;
}
for (int i = 0; i < passCount; ++i) {
// The loop should be: for (i = ix.index; i < passCount; ++i) {...} but WebGL1 cannot
// loop with non-constant condition, so it has to continue instead.
if (i < ix.index) {
continue;
}
ix.index = i + 1;
surfaceIntersection = ix.intersections[i];
int intersectionType = int(length(surfaceIntersection.xyz) - 0.5);
bool currShapeIsPositive = intersectionType < 2;
bool enter = intersectionType % 2 == 0;
ix.surroundCount += enter ? +1 : -1;
ix.surroundIsPositive = currShapeIsPositive ? enter : ix.surroundIsPositive;
// entering positive or exiting negative
if (ix.surroundCount == 1 && ix.surroundIsPositive && enter == currShapeIsPositive) {
shapeIntersection.entry = surfaceIntersection;
}
// exiting positive or entering negative after being inside positive
bool exitPositive = !enter && currShapeIsPositive && ix.surroundCount == 0;
bool enterNegativeFromPositive = enter && !currShapeIsPositive && ix.surroundCount == 2 && ix.surroundIsPositive;
if (exitPositive || enterNegativeFromPositive) {
shapeIntersection.exit = surfaceIntersection;
// entry and exit have been found, so the loop can stop
if (exitPositive) {
// After exiting positive shape there is nothing left to intersect, so jump to the end index.
ix.index = passCount;
}
break;
}
}
return shapeIntersection;
}
#endif
// NOTE: initializeIntersections, nextIntersection aren't even declared unless INTERSECTION_COUNT > 1
`;var mro=x(T(),1),WM=`// See IntersectionUtils.glsl for the definitions of Ray, Intersections,
// setIntersectionPair, INF_HIT, NO_HIT
/* intersectDepth defines (set in Scene/VoxelRenderResources.js)
#define DEPTH_INTERSECTION_INDEX ###
*/
void intersectDepth(in vec2 screenCoord, in Ray ray, inout Intersections ix) {
float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, screenCoord));
float entry;
float exit;
if (logDepthOrDepth != 0.0) {
// Calculate how far the ray must travel before it hits the depth buffer.
vec4 eyeCoordinateDepth = czm_screenToEyeCoordinates(screenCoord, logDepthOrDepth);
eyeCoordinateDepth /= eyeCoordinateDepth.w;
entry = dot(eyeCoordinateDepth.xyz - ray.pos, ray.dir);
exit = +INF_HIT;
} else {
// There's no depth at this location.
entry = NO_HIT;
exit = NO_HIT;
}
ix.distanceToDepthBuffer = entry;
#if defined(DEPTH_TEST)
setIntersectionPair(ix, DEPTH_INTERSECTION_INDEX, vec2(entry, exit));
#endif
}
`;var fro=x(T(),1),vM=`// See IntersectionUtils.glsl for the definitions of Ray, Intersections, INF_HIT,
// NO_HIT, setShapeIntersection
/* Clipping plane defines (set in Scene/VoxelRenderResources.js)
#define CLIPPING_PLANES_UNION
#define CLIPPING_PLANES_COUNT
#define CLIPPING_PLANES_INTERSECTION_INDEX
*/
uniform sampler2D u_clippingPlanesTexture;
uniform mat4 u_clippingPlanesMatrix;
// Plane is in Hessian Normal Form
vec4 intersectPlane(in Ray ray, in vec4 plane) {
vec3 n = plane.xyz; // normal
float w = plane.w; // -dot(pointOnPlane, normal)
float a = dot(ray.pos, n);
float b = dot(ray.dir, n);
float t = -(w + a) / b;
return vec4(n, t);
}
#ifdef CLIPPING_PLANES
void intersectClippingPlanes(in Ray ray, inout Intersections ix) {
vec4 backSide = vec4(-ray.dir, -INF_HIT);
vec4 farSide = vec4(ray.dir, +INF_HIT);
RayShapeIntersection clippingVolume;
#if (CLIPPING_PLANES_COUNT == 1)
// Union and intersection are the same when there's one clipping plane, and the code
// is more simplified.
vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, 0);
vec4 intersection = intersectPlane(ray, planeUv);
bool reflects = dot(ray.dir, intersection.xyz) < 0.0;
clippingVolume.entry = reflects ? backSide : intersection;
clippingVolume.exit = reflects ? intersection : farSide;
setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);
#elif defined(CLIPPING_PLANES_UNION)
vec4 firstTransmission = vec4(ray.dir, +INF_HIT);
vec4 lastReflection = vec4(-ray.dir, -INF_HIT);
for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {
vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i);
vec4 intersection = intersectPlane(ray, planeUv);
if (dot(ray.dir, planeUv.xyz) > 0.0) {
firstTransmission = intersection.w <= firstTransmission.w ? intersection : firstTransmission;
} else {
lastReflection = intersection.w >= lastReflection.w ? intersection : lastReflection;
}
}
clippingVolume.entry = backSide;
clippingVolume.exit = lastReflection;
setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 0, clippingVolume);
clippingVolume.entry = firstTransmission;
clippingVolume.exit = farSide;
setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX + 1, clippingVolume);
#else // intersection
vec4 lastTransmission = vec4(ray.dir, -INF_HIT);
vec4 firstReflection = vec4(-ray.dir, +INF_HIT);
for (int i = 0; i < CLIPPING_PLANES_COUNT; i++) {
vec4 planeUv = getClippingPlane(u_clippingPlanesTexture, i);
vec4 intersection = intersectPlane(ray, planeUv);
if (dot(ray.dir, planeUv.xyz) > 0.0) {
lastTransmission = intersection.w > lastTransmission.w ? intersection : lastTransmission;
} else {
firstReflection = intersection.w < firstReflection.w ? intersection: firstReflection;
}
}
if (lastTransmission.w < firstReflection.w) {
clippingVolume.entry = lastTransmission;
clippingVolume.exit = firstReflection;
} else {
clippingVolume.entry = vec4(-ray.dir, NO_HIT);
clippingVolume.exit = vec4(ray.dir, NO_HIT);
}
setShapeIntersection(ix, CLIPPING_PLANES_INTERSECTION_INDEX, clippingVolume);
#endif
}
#endif
`;var bro=x(T(),1),HR=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT,
// RayShapeIntersection
vec4 transformNormalToEC(in vec4 intersection) {
return vec4(normalize(czm_normal * intersection.xyz), intersection.w);
}
RayShapeIntersection transformNormalsToEC(in RayShapeIntersection ix) {
return RayShapeIntersection(transformNormalToEC(ix.entry), transformNormalToEC(ix.exit));
}
vec4 intersectLongitude(in Ray ray, in float angle, in bool positiveNormal) {
float normalSign = positiveNormal ? 1.0 : -1.0;
vec2 planeNormal = vec2(-sin(angle), cos(angle)) * normalSign;
vec2 position = ray.pos.xy;
vec2 direction = ray.dir.xy;
float approachRate = dot(direction, planeNormal);
float distance = -dot(position, planeNormal);
float t = (approachRate == 0.0)
? NO_HIT
: distance / approachRate;
return vec4(planeNormal, 0.0, t);
}
RayShapeIntersection intersectHalfSpace(in Ray ray, in float angle, in bool positiveNormal)
{
vec4 intersection = intersectLongitude(ray, angle, positiveNormal);
vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
bool hitFront = (intersection.w > 0.0) == (dot(ray.pos.xy, intersection.xy) > 0.0);
if (!hitFront) {
return RayShapeIntersection(intersection, farSide);
} else {
return RayShapeIntersection(-1.0 * farSide, intersection);
}
}
void intersectFlippedWedge(in Ray ray, in vec2 minMaxAngle, out RayShapeIntersection intersections[2])
{
intersections[0] = transformNormalsToEC(intersectHalfSpace(ray, minMaxAngle.x, false));
intersections[1] = transformNormalsToEC(intersectHalfSpace(ray, minMaxAngle.y, true));
}
bool hitPositiveHalfPlane(in Ray ray, in vec4 intersection, in bool positiveNormal) {
float normalSign = positiveNormal ? 1.0 : -1.0;
vec2 planeDirection = vec2(intersection.y, -intersection.x) * normalSign;
vec2 hit = ray.pos.xy + intersection.w * ray.dir.xy;
return dot(hit, planeDirection) > 0.0;
}
void intersectHalfPlane(in Ray ray, in float angle, out RayShapeIntersection intersections[2]) {
vec4 intersection = intersectLongitude(ray, angle, true);
vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
bool hitPositiveSide = hitPositiveHalfPlane(ray, intersection, true);
farSide = transformNormalToEC(farSide);
if (hitPositiveSide) {
intersection = transformNormalToEC(intersection);
intersections[0].entry = -1.0 * farSide;
intersections[0].exit = vec4(-1.0 * intersection.xyz, intersection.w);
intersections[1].entry = intersection;
intersections[1].exit = farSide;
} else {
vec4 miss = vec4(normalize(czm_normal * ray.dir), NO_HIT);
intersections[0].entry = -1.0 * farSide;
intersections[0].exit = farSide;
intersections[1].entry = miss;
intersections[1].exit = miss;
}
}
RayShapeIntersection intersectRegularWedge(in Ray ray, in vec2 minMaxAngle)
{
// Note: works for maxAngle > minAngle + pi, where the "regular wedge"
// is actually a negative volume.
// Compute intersections with the two planes.
// Normals will point toward the "outside" (negative space)
vec4 intersect1 = intersectLongitude(ray, minMaxAngle.x, false);
vec4 intersect2 = intersectLongitude(ray, minMaxAngle.y, true);
// Choose intersection with smallest T as the "first", the other as "last"
// Note: first or last could be in the "shadow" wedge, beyond the tip
bool inOrder = intersect1.w <= intersect2.w;
vec4 first = inOrder ? intersect1 : intersect2;
vec4 last = inOrder ? intersect2 : intersect1;
bool firstIsAhead = first.w >= 0.0;
bool startedInsideFirst = dot(ray.pos.xy, first.xy) < 0.0;
bool exitFromInside = firstIsAhead == startedInsideFirst;
bool lastIsAhead = last.w > 0.0;
bool startedOutsideLast = dot(ray.pos.xy, last.xy) >= 0.0;
bool enterFromOutside = lastIsAhead == startedOutsideLast;
vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
vec4 miss = vec4(normalize(ray.dir), NO_HIT);
if (exitFromInside && enterFromOutside) {
// Ray crosses both faces of negative wedge, exiting then entering the positive shape
return transformNormalsToEC(RayShapeIntersection(first, last));
} else if (!exitFromInside && enterFromOutside) {
// Ray starts inside wedge. last is in shadow wedge, and first is actually the entry
return transformNormalsToEC(RayShapeIntersection(-1.0 * farSide, first));
} else if (exitFromInside && !enterFromOutside) {
// First intersection was in the shadow wedge, so last is actually the exit
return transformNormalsToEC(RayShapeIntersection(last, farSide));
} else { // !exitFromInside && !enterFromOutside
// Both intersections were in the shadow wedge
return transformNormalsToEC(RayShapeIntersection(miss, miss));
}
}
`;var yro=x(T(),1),FM=`// See IntersectionUtils.glsl for the definitions of Ray, RayShapeIntersection,
// NO_HIT, Intersections
/* Box defines (set in Scene/VoxelBoxShape.js)
#define BOX_INTERSECTION_INDEX ### // always 0
*/
uniform sampler2D u_renderBoundPlanesTexture;
RayShapeIntersection intersectBoundPlanes(in Ray ray) {
vec4 lastEntry = vec4(ray.dir, -INF_HIT);
vec4 firstExit = vec4(-ray.dir, +INF_HIT);
for (int i = 0; i < 6; i++) {
vec4 boundPlane = getBoundPlane(u_renderBoundPlanesTexture, i);
vec4 intersection = intersectPlane(ray, boundPlane);
if (dot(ray.dir, boundPlane.xyz) < 0.0) {
lastEntry = intersection.w > lastEntry.w ? intersection : lastEntry;
} else {
firstExit = intersection.w < firstExit.w ? intersection: firstExit;
}
}
if (lastEntry.w < firstExit.w) {
return RayShapeIntersection(lastEntry, firstExit);
} else {
return RayShapeIntersection(vec4(-ray.dir, NO_HIT), vec4(ray.dir, NO_HIT));
}
}
void intersectShape(in Ray rayUV, in Ray rayEC, inout Intersections ix)
{
RayShapeIntersection intersection = intersectBoundPlanes(rayEC);
setShapeIntersection(ix, BOX_INTERSECTION_INDEX, intersection);
}
`;var Tro=x(T(),1),IM=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, Intersections,
// RayShapeIntersection, setSurfaceIntersection, setShapeIntersection,
// intersectIntersections
// See IntersectLongitude.glsl for the definitions of intersectHalfPlane,
// intersectFlippedWedge, intersectRegularWedge
/* Cylinder defines (set in Scene/VoxelCylinderShape.js)
#define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN
#define CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT
#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE
#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF
#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF
#define CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO
#define CYLINDER_INTERSECTION_INDEX_RADIUS_MAX
#define CYLINDER_INTERSECTION_INDEX_RADIUS_MIN
#define CYLINDER_INTERSECTION_INDEX_ANGLE
*/
// Cylinder uniforms
uniform vec2 u_cylinderRenderRadiusMinMax;
#if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE)
uniform vec2 u_cylinderRenderAngleMinMax;
#endif
uniform sampler2D u_renderBoundPlanesTexture;
RayShapeIntersection intersectBoundPlanes(in Ray ray) {
vec4 lastEntry = vec4(ray.dir, -INF_HIT);
vec4 firstExit = vec4(-ray.dir, +INF_HIT);
for (int i = 0; i < 2; i++) {
vec4 boundPlane = getBoundPlane(u_renderBoundPlanesTexture, i);
vec4 intersection = intersectPlane(ray, boundPlane);
if (dot(ray.dir, boundPlane.xyz) < 0.0) {
lastEntry = intersection.w > lastEntry.w ? intersection : lastEntry;
} else {
firstExit = intersection.w < firstExit.w ? intersection: firstExit;
}
}
if (lastEntry.w < firstExit.w) {
return RayShapeIntersection(lastEntry, firstExit);
} else {
return RayShapeIntersection(vec4(-ray.dir, NO_HIT), vec4(ray.dir, NO_HIT));
}
}
/**
* Find the intersection of a ray with a right cylindrical surface of a given radius
* about the z-axis.
*/
RayShapeIntersection intersectCylinder(in Ray ray, in float radius, in bool convex)
{
vec2 position = ray.pos.xy;
vec2 direction = ray.dir.xy;
float a = dot(direction, direction);
float b = dot(position, direction);
float c = dot(position, position) - radius * radius;
float determinant = b * b - a * c;
if (determinant < 0.0) {
vec4 miss = vec4(normalize(ray.dir), NO_HIT);
return RayShapeIntersection(miss, miss);
}
determinant = sqrt(determinant);
float t1 = (-b - determinant) / a;
float t2 = (-b + determinant) / a;
float signFlip = convex ? 1.0 : -1.0;
vec3 normal1 = vec3((position + t1 * direction) * signFlip, 0.0);
vec3 normal2 = vec3((position + t2 * direction) * signFlip, 0.0);
// Return normals in eye coordinates
vec4 intersect1 = vec4(normalize(czm_normal * normal1), t1);
vec4 intersect2 = vec4(normalize(czm_normal * normal2), t2);
return RayShapeIntersection(intersect1, intersect2);
}
/**
* Find the intersection of a ray with a right cylindrical solid of given
* radius and height bounds. NOTE: The shape is assumed to be convex.
*/
RayShapeIntersection intersectBoundedCylinder(in Ray ray, in Ray rayEC, in float radius)
{
RayShapeIntersection cylinderIntersection = intersectCylinder(ray, radius, true);
RayShapeIntersection heightBoundsIntersection = intersectBoundPlanes(rayEC);
return intersectIntersections(ray, cylinderIntersection, heightBoundsIntersection);
}
void intersectShape(in Ray ray, in Ray rayEC, inout Intersections ix)
{
RayShapeIntersection outerIntersect = intersectBoundedCylinder(ray, rayEC, u_cylinderRenderRadiusMinMax.y);
setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MAX, outerIntersect);
if (outerIntersect.entry.w == NO_HIT) {
return;
}
#if defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT)
// When the cylinder is perfectly thin it's necessary to sandwich the
// inner cylinder intersection inside the outer cylinder intersection.
// Without this special case,
// [outerMin, outerMax, innerMin, innerMax] will bubble sort to
// [outerMin, innerMin, outerMax, innerMax] which will cause the back
// side of the cylinder to be invisible because it will think the ray
// is still inside the inner (negative) cylinder after exiting the
// outer (positive) cylinder.
// With this special case,
// [outerMin, innerMin, innerMax, outerMax] will bubble sort to
// [outerMin, innerMin, innerMax, outerMax] which will work correctly.
// Note: If initializeIntersections() changes its sorting function
// from bubble sort to something else, this code may need to change.
RayShapeIntersection innerIntersect = intersectCylinder(ray, 1.0, false);
setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true); // positive, enter
setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true); // negative, enter
setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false); // negative, exit
setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false); // positive, exit
#elif defined(CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN)
RayShapeIntersection innerIntersect = intersectCylinder(ray, u_cylinderRenderRadiusMinMax.x, false);
setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_RADIUS_MIN, innerIntersect);
#endif
#if defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF)
RayShapeIntersection wedgeIntersect = intersectRegularWedge(ray, u_cylinderRenderAngleMinMax);
setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE, wedgeIntersect);
#elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF)
RayShapeIntersection wedgeIntersects[2];
intersectFlippedWedge(ray, u_cylinderRenderAngleMinMax, wedgeIntersects);
setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersects[0]);
setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]);
#elif defined(CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO)
RayShapeIntersection wedgeIntersects[2];
intersectHalfPlane(ray, u_cylinderRenderAngleMinMax.x, wedgeIntersects);
setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 0, wedgeIntersects[0]);
setShapeIntersection(ix, CYLINDER_INTERSECTION_INDEX_ANGLE + 1, wedgeIntersects[1]);
#endif
}
`;var Sro=x(T(),1),PM=`// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT, INF_HIT, Intersections,
// RayShapeIntersection, setSurfaceIntersection, setShapeIntersection
// See IntersectLongitude.glsl for the definitions of intersectHalfPlane,
// intersectFlippedWedge, intersectRegularWedge
/* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js)
#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE
#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO
#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF
#define ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF
#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF
#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF
#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF
#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF
#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF
#define ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF
#define ELLIPSOID_INTERSECTION_INDEX_LONGITUDE
#define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX
#define ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN
#define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX
#define ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN
*/
#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE)
uniform vec2 u_ellipsoidRenderLongitudeMinMax;
#endif
uniform float u_eccentricitySquared;
uniform vec2 u_ellipsoidRenderLatitudeSinMinMax;
uniform vec2 u_clipMinMaxHeight; // Values are negative: clipHeight - maxShapeHeight
RayShapeIntersection intersectZPlane(in Ray ray, in float z) {
float t = -ray.pos.z / ray.dir.z;
bool startsOutside = sign(ray.pos.z) == sign(z);
bool entry = (t >= 0.0) != startsOutside;
vec4 intersect = vec4(0.0, 0.0, z, t);
vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
if (entry) {
return RayShapeIntersection(intersect, farSide);
} else {
return RayShapeIntersection(-1.0 * farSide, intersect);
}
}
RayShapeIntersection intersectHeight(in Ray ray, in float height, in bool convex)
{
// Scale the ray by the ellipsoid axes to make it a unit sphere
// Note: approximating ellipsoid + height as an ellipsoid
vec3 radiiCorrection = vec3(1.0) / (u_ellipsoidRadii + height);
vec3 position = ray.pos * radiiCorrection;
vec3 direction = ray.dir * radiiCorrection;
float a = dot(direction, direction); // ~ 1.0 (or maybe 4.0 if ray is scaled)
float b = dot(direction, position); // roughly inside [-1.0, 1.0] when zoomed in
float c = dot(position, position) - 1.0; // ~ 0.0 when zoomed in.
float determinant = b * b - a * c; // ~ b * b when zoomed in
if (determinant < 0.0) {
vec4 miss = vec4(normalize(direction), NO_HIT);
return RayShapeIntersection(miss, miss);
}
determinant = sqrt(determinant);
// Compute larger root using standard formula
float signB = b < 0.0 ? -1.0 : 1.0;
// The other root may suffer from subtractive cancellation in the standard formula.
// Compute it from the first root instead.
float t1 = (-b - signB * determinant) / a;
float t2 = c / (a * t1);
float tmin = min(t1, t2);
float tmax = max(t1, t2);
float directionScale = convex ? 1.0 : -1.0;
vec3 d1 = directionScale * (position + tmin * direction);
vec3 d2 = directionScale * (position + tmax * direction);
// Return normals in eye coordinates. Use spherical approximation for the normal.
vec3 normal1 = normalize(czm_normal * d1);
vec3 normal2 = normalize(czm_normal * d2);
return RayShapeIntersection(vec4(normal1, tmin), vec4(normal2, tmax));
}
/**
* Given a circular cone around the z-axis, with apex at the origin,
* find the parametric distance(s) along a ray where that ray intersects
* the cone.
* The cone opening angle is described by the squared cosine of
* its half-angle (the angle between the Z-axis and the surface)
*/
vec2 intersectDoubleEndedCone(in Ray ray, in float cosSqrHalfAngle)
{
vec3 o = ray.pos;
vec3 d = ray.dir;
float sinSqrHalfAngle = 1.0 - cosSqrHalfAngle;
float aSin = d.z * d.z * sinSqrHalfAngle;
float aCos = -dot(d.xy, d.xy) * cosSqrHalfAngle;
float a = aSin + aCos;
float bSin = d.z * o.z * sinSqrHalfAngle;
float bCos = -dot(o.xy, d.xy) * cosSqrHalfAngle;
float b = bSin + bCos;
float cSin = o.z * o.z * sinSqrHalfAngle;
float cCos = -dot(o.xy, o.xy) * cosSqrHalfAngle;
float c = cSin + cCos;
// determinant = b * b - a * c. But bSin * bSin = aSin * cSin.
// Avoid subtractive cancellation by expanding to eliminate these terms
float determinant = 2.0 * bSin * bCos + bCos * bCos - aSin * cCos - aCos * cSin - aCos * cCos;
if (determinant < 0.0) {
return vec2(NO_HIT);
} else if (a == 0.0) {
// Ray is parallel to cone surface
return (b == 0.0)
? vec2(NO_HIT) // Ray is on cone surface
: vec2(-0.5 * c / b, NO_HIT);
}
determinant = sqrt(determinant);
// Compute larger root using standard formula
float signB = b < 0.0 ? -1.0 : 1.0;
float t1 = (-b - signB * determinant) / a;
// The other root may suffer from subtractive cancellation in the standard formula.
// Compute it from the first root instead.
float t2 = c / (a * t1);
float tmin = min(t1, t2);
float tmax = max(t1, t2);
return vec2(tmin, tmax);
}
/**
* Given a point on a conical surface, find the surface normal at that point.
*/
vec3 getConeNormal(in vec3 p, in bool convex) {
// Start with radial component pointing toward z-axis
vec2 radial = -abs(p.z) * normalize(p.xy);
// Z component points toward opening of cone
float zSign = (p.z < 0.0) ? -1.0 : 1.0;
float z = length(p.xy) * zSign;
// Flip normal if shape is convex
float flip = (convex) ? -1.0 : 1.0;
return normalize(vec3(radial, z) * flip);
}
/**
* Compute the shift between the ellipsoid origin and the apex of a cone of latitude
*/
float getLatitudeConeShift(in float sinLatitude) {
// Find prime vertical radius of curvature:
// the distance along the ellipsoid normal to the intersection with the z-axis
float x2 = u_eccentricitySquared * sinLatitude * sinLatitude;
float primeVerticalRadius = u_ellipsoidRadii.x * inversesqrt(1.0 - x2);
// Compute a shift from the origin to the intersection of the cone with the z-axis
return primeVerticalRadius * u_eccentricitySquared * sinLatitude;
}
void intersectFlippedCone(in Ray ray, in float cosHalfAngle, out RayShapeIntersection intersections[2]) {
// Shift the ray to account for the latitude cone not being centered at the Earth center
ray.pos.z += getLatitudeConeShift(cosHalfAngle);
float cosSqrHalfAngle = cosHalfAngle * cosHalfAngle;
vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);
vec4 miss = vec4(normalize(ray.dir), NO_HIT);
vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
// Initialize output with no intersections
intersections[0].entry = -1.0 * farSide;
intersections[0].exit = farSide;
intersections[1].entry = miss;
intersections[1].exit = miss;
if (intersect.x == NO_HIT) {
return;
}
// Find the points of intersection
float tmin = intersect.x;
float tmax = intersect.y;
vec3 p0 = ray.pos + tmin * ray.dir;
vec3 p1 = ray.pos + tmax * ray.dir;
vec4 intersect0 = vec4(getConeNormal(p0, true), tmin);
vec4 intersect1 = vec4(getConeNormal(p1, true), tmax);
bool p0InShadowCone = sign(p0.z) != sign(cosHalfAngle);
bool p1InShadowCone = sign(p1.z) != sign(cosHalfAngle);
if (p0InShadowCone && p1InShadowCone) {
// no valid intersections
} else if (p0InShadowCone) {
intersections[0].exit = intersect1;
} else if (p1InShadowCone) {
intersections[0].entry = intersect0;
} else {
intersections[0].exit = intersect0;
intersections[1].entry = intersect1;
intersections[1].exit = farSide;
}
}
RayShapeIntersection intersectRegularCone(in Ray ray, in float cosHalfAngle, in bool convex) {
// Shift the ray to account for the latitude cone not being centered at the Earth center
ray.pos.z += getLatitudeConeShift(cosHalfAngle);
float cosSqrHalfAngle = cosHalfAngle * cosHalfAngle;
vec2 intersect = intersectDoubleEndedCone(ray, cosSqrHalfAngle);
vec4 miss = vec4(normalize(ray.dir), NO_HIT);
vec4 farSide = vec4(normalize(ray.dir), INF_HIT);
if (intersect.x == NO_HIT) {
return RayShapeIntersection(miss, miss);
}
// Find the points of intersection
float tmin = intersect.x;
float tmax = intersect.y;
vec3 p0 = ray.pos + tmin * ray.dir;
vec3 p1 = ray.pos + tmax * ray.dir;
vec4 intersect0 = vec4(getConeNormal(p0, convex), tmin);
vec4 intersect1 = vec4(getConeNormal(p1, convex), tmax);
bool p0InShadowCone = sign(p0.z) != sign(cosHalfAngle);
bool p1InShadowCone = sign(p1.z) != sign(cosHalfAngle);
if (p0InShadowCone && p1InShadowCone) {
return RayShapeIntersection(miss, miss);
} else if (p0InShadowCone) {
return RayShapeIntersection(intersect1, farSide);
} else if (p1InShadowCone) {
return RayShapeIntersection(-1.0 * farSide, intersect0);
} else {
return RayShapeIntersection(intersect0, intersect1);
}
}
void intersectShape(in Ray ray, in Ray rayEC, inout Intersections ix) { // Outer ellipsoid
RayShapeIntersection outerIntersect = intersectHeight(ray, u_clipMinMaxHeight.y, true);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX, outerIntersect);
// Exit early if the outer ellipsoid was missed.
if (outerIntersect.entry.w == NO_HIT) {
return;
}
// Inner ellipsoid
RayShapeIntersection innerIntersect = intersectHeight(ray, u_clipMinMaxHeight.x, false);
if (innerIntersect.entry.w == NO_HIT) {
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN, innerIntersect);
} else {
// When the ellipsoid is large and thin it's possible for floating point math
// to cause the ray to intersect the inner ellipsoid before the outer ellipsoid.
// To prevent this from happening, clamp innerIntersect to outerIntersect and
// sandwich the inner ellipsoid intersection inside the outer ellipsoid intersection.
// Without this special case,
// [outerMin, outerMax, innerMin, innerMax] will bubble sort to
// [outerMin, innerMin, outerMax, innerMax] which will cause the back
// side of the ellipsoid to be invisible because it will think the ray
// is still inside the inner (negative) ellipsoid after exiting the
// outer (positive) ellipsoid.
// With this special case,
// [outerMin, innerMin, innerMax, outerMax] will bubble sort to
// [outerMin, innerMin, innerMax, outerMax] which will work correctly.
// Note: If initializeIntersections() changes its sorting function
// from bubble sort to something else, this code may need to change.
innerIntersect.entry.w = max(innerIntersect.entry.w, outerIntersect.entry.w);
innerIntersect.exit.w = min(innerIntersect.exit.w, outerIntersect.exit.w);
setSurfaceIntersection(ix, 0, outerIntersect.entry, true, true); // positive, enter
setSurfaceIntersection(ix, 1, innerIntersect.entry, false, true); // negative, enter
setSurfaceIntersection(ix, 2, innerIntersect.exit, false, false); // negative, exit
setSurfaceIntersection(ix, 3, outerIntersect.exit, true, false); // positive, exit
}
// Bottom cone
#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF)
RayShapeIntersection bottomConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeSinMinMax.x, false);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);
#elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF)
RayShapeIntersection bottomConeIntersection = intersectZPlane(ray, -1.0);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN, bottomConeIntersection);
#elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF)
RayShapeIntersection bottomConeIntersections[2];
intersectFlippedCone(ray, u_ellipsoidRenderLatitudeSinMinMax.x, bottomConeIntersections);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 0, bottomConeIntersections[0]);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN + 1, bottomConeIntersections[1]);
#endif
// Top cone
#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF)
RayShapeIntersection topConeIntersections[2];
intersectFlippedCone(ray, u_ellipsoidRenderLatitudeSinMinMax.y, topConeIntersections);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 0, topConeIntersections[0]);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX + 1, topConeIntersections[1]);
#elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF)
RayShapeIntersection topConeIntersection = intersectZPlane(ray, 1.0);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);
#elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF)
RayShapeIntersection topConeIntersection = intersectRegularCone(ray, u_ellipsoidRenderLatitudeSinMinMax.y, false);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX, topConeIntersection);
#endif
// Wedge
#if defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO)
RayShapeIntersection wedgeIntersects[2];
intersectHalfPlane(ray, u_ellipsoidRenderLongitudeMinMax.x, wedgeIntersects);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersects[0]);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]);
#elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF)
RayShapeIntersection wedgeIntersect = intersectRegularWedge(ray, u_ellipsoidRenderLongitudeMinMax);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE, wedgeIntersect);
#elif defined(ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF)
RayShapeIntersection wedgeIntersects[2];
intersectFlippedWedge(ray, u_ellipsoidRenderLongitudeMinMax, wedgeIntersects);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 0, wedgeIntersects[0]);
setShapeIntersection(ix, ELLIPSOID_INTERSECTION_INDEX_LONGITUDE + 1, wedgeIntersects[1]);
#endif
}
`;var Zro=x(T(),1),yA=`// Main intersection function for Voxel scenes.
// See IntersectBox.glsl, IntersectCylinder.glsl, or IntersectEllipsoid.glsl
// for the definition of intersectShape. The appropriate function is selected
// based on the VoxelPrimitive shape type, and added to the shader in
// Scene/VoxelRenderResources.js.
// See also IntersectClippingPlane.glsl and IntersectDepth.glsl.
// See IntersectionUtils.glsl for the definitions of Ray, NO_HIT,
// getFirstIntersection, initializeIntersections, nextIntersection.
/* Intersection defines (set in Scene/VoxelRenderResources.js)
#define INTERSECTION_COUNT ###
*/
RayShapeIntersection intersectScene(in vec2 screenCoord, in Ray ray, in Ray rayEC, out Intersections ix) {
// Do a ray-shape intersection to find the exact starting and ending points.
intersectShape(ray, rayEC, ix);
// Exit early if the positive shape was completely missed or behind the ray.
RayShapeIntersection intersection = getFirstIntersection(ix);
if (intersection.entry.w == NO_HIT) {
// Positive shape was completely missed - so exit early.
return intersection;
}
// Clipping planes
#if defined(CLIPPING_PLANES)
intersectClippingPlanes(ray, ix);
#endif
// Depth
intersectDepth(screenCoord, rayEC, ix);
// Find the first intersection that's in front of the ray
#if (INTERSECTION_COUNT > 1)
initializeIntersections(ix);
for (int i = 0; i < INTERSECTION_COUNT; ++i) {
intersection = nextIntersection(ix);
if (intersection.exit.w > 0.0) {
// Set start to 0.0 when ray is inside the shape.
intersection.entry.w = max(intersection.entry.w, 0.0);
break;
}
}
#else
// Set start to 0.0 when ray is inside the shape.
intersection.entry.w = max(intersection.entry.w, 0.0);
#endif
return intersection;
}
`;var Vro=x(T(),1),XM=`uniform vec3 u_boxLocalToShapeUvScale;
uniform ivec4 u_cameraTileCoordinates;
uniform vec3 u_cameraTileUv;
uniform mat3 u_boxEcToXyz;
mat3 convertLocalToShapeSpaceDerivative(in vec3 positionLocal) {
// For BOX, local space = shape space, so the Jacobian is the identity matrix.
return mat3(1.0);
}
vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
return shapeUv / u_boxLocalToShapeUvScale;
}
vec3 convertEcToDeltaTile(in vec3 positionEC) {
vec3 dPosition = u_boxEcToXyz * positionEC;
return u_boxLocalToShapeUvScale * dPosition * float(1 << u_cameraTileCoordinates.w);
}
TileAndUvCoordinate getTileAndUvCoordinate(in vec3 positionEC) {
vec3 deltaTileCoordinate = convertEcToDeltaTile(positionEC);
vec3 tileUvSum = u_cameraTileUv + deltaTileCoordinate;
ivec3 tileCoordinate = u_cameraTileCoordinates.xyz + ivec3(floor(tileUvSum));
tileCoordinate = min(max(ivec3(0), tileCoordinate), ivec3((1 << u_cameraTileCoordinates.w) - 1));
ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
vec3 tileUv = clamp(tileUvSum - vec3(tileCoordinateChange), 0.0, 1.0);
return TileAndUvCoordinate(ivec4(tileCoordinate, u_cameraTileCoordinates.w), tileUv);
}
`;var Ero=x(T(),1),NM=`uniform vec3 u_cylinderLocalToShapeUvScale; // x = radius scale, y = angle scale, z = height scale
uniform float u_cylinderShapeUvAngleRangeOrigin;
uniform mat3 u_cylinderEcToRadialTangentUp;
uniform ivec4 u_cameraTileCoordinates;
uniform vec3 u_cameraTileUv;
uniform vec3 u_cameraShapePosition; // (radial distance, angle, height) of camera in shape space
mat3 convertLocalToShapeSpaceDerivative(in vec3 position) {
vec3 radial = normalize(vec3(position.xy, 0.0));
vec3 z = vec3(0.0, 0.0, 1.0);
vec3 east = normalize(vec3(-position.y, position.x, 0.0));
return mat3(radial, east / length(position.xy), z);
}
vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
float radius = shapeUv.x / u_cylinderLocalToShapeUvScale.x;
float angle = shapeUv.y * czm_twoPi / u_cylinderLocalToShapeUvScale.y;
float height = shapeUv.z / u_cylinderLocalToShapeUvScale.z;
return vec3(radius, angle, height);
}
/**
* Computes the change in polar coordinates given a change in position.
* @param {vec2} dPosition The change in position in Cartesian coordinates.
* @param {float} cameraRadialDistance The radial distance of the camera from the origin.
* @return {vec2} The change in polar coordinates (radial distance, angle).
*/
vec2 computePolarChange(in vec2 dPosition, in float cameraRadialDistance) {
float dAngle = atan(dPosition.y, cameraRadialDistance + dPosition.x);
// Find the direction of the radial axis at the output angle, in Cartesian coordinates
vec2 outputRadialAxis = vec2(cos(dAngle), sin(dAngle));
float sinHalfAngle = sin(dAngle / 2.0);
float versine = 2.0 * sinHalfAngle * sinHalfAngle;
float dRadial = dot(dPosition, outputRadialAxis) - cameraRadialDistance * versine;
return vec2(dRadial, dAngle);
}
vec3 convertEcToDeltaShape(in vec3 positionEC) {
// 1. Rotate to radial, tangent, and up coordinates
vec3 rtu = u_cylinderEcToRadialTangentUp * positionEC;
// 2. Compute change in angular and radial coordinates.
vec2 dPolar = computePolarChange(rtu.xy, u_cameraShapePosition.x);
return vec3(dPolar.xy, rtu.z);
}
vec3 convertEcToDeltaTile(in vec3 positionEC) {
vec3 deltaShape = convertEcToDeltaShape(positionEC);
// Convert to tileset coordinates in [0, 1]
float dx = u_cylinderLocalToShapeUvScale.x * deltaShape.x;
float dy = deltaShape.y / czm_twoPi;
#if defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE)
// Wrap to ensure dy is not crossing through the unoccupied angle range, where
// angle to tile coordinate conversions would be more complicated
float cameraUvAngle = (u_cameraShapePosition.y + czm_pi) / czm_twoPi;
float cameraUvAngleShift = fract(cameraUvAngle - u_cylinderShapeUvAngleRangeOrigin);
float rawOutputUvAngle = cameraUvAngleShift + dy;
float rotation = floor(rawOutputUvAngle);
dy -= rotation;
#endif
dy *= u_cylinderLocalToShapeUvScale.y;
float dz = u_cylinderLocalToShapeUvScale.z * deltaShape.z;
// Convert to tile coordinate changes
return vec3(dx, dy, dz) * float(1 << u_cameraTileCoordinates.w);
}
TileAndUvCoordinate getTileAndUvCoordinate(in vec3 positionEC) {
vec3 deltaTileCoordinate = convertEcToDeltaTile(positionEC);
vec3 tileUvSum = u_cameraTileUv + deltaTileCoordinate;
ivec3 tileCoordinate = u_cameraTileCoordinates.xyz + ivec3(floor(tileUvSum));
int maxTileCoordinate = (1 << u_cameraTileCoordinates.w) - 1;
tileCoordinate.x = min(max(0, tileCoordinate.x), maxTileCoordinate);
tileCoordinate.z = min(max(0, tileCoordinate.z), maxTileCoordinate);
#if (!defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE))
ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
if (tileCoordinate.y < 0) {
tileCoordinate.y += (maxTileCoordinate + 1);
} else if (tileCoordinate.y > maxTileCoordinate) {
tileCoordinate.y -= (maxTileCoordinate + 1);
}
#else
tileCoordinate.y = min(max(0, tileCoordinate.y), maxTileCoordinate);
ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
#endif
vec3 tileUv = tileUvSum - vec3(tileCoordinateChange);
tileUv.x = clamp(tileUv.x, 0.0, 1.0);
#if (!defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE))
// If there is only one tile spanning 2*PI angle, the coordinate wraps around
tileUv.y = (u_cameraTileCoordinates.w == 0) ? fract(tileUv.y) : clamp(tileUv.y, 0.0, 1.0);
#else
tileUv.y = clamp(tileUv.y, 0.0, 1.0);
#endif
tileUv.z = clamp(tileUv.z, 0.0, 1.0);
return TileAndUvCoordinate(ivec4(tileCoordinate, u_cameraTileCoordinates.w), tileUv);
}
`;var Lro=x(T(),1),YM=`/* Ellipsoid defines (set in Scene/VoxelEllipsoidShape.js)
#define ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE
#define ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE
*/
uniform vec3 u_cameraPositionCartographic; // (longitude, latitude, height) in radians and meters
uniform vec2 u_ellipsoidCurvatureAtLatitude;
uniform mat3 u_ellipsoidEcToEastNorthUp;
uniform vec3 u_ellipsoidRadii;
uniform vec2 u_evoluteScale; // (radii.x ^ 2 - radii.z ^ 2) * vec2(1.0, -1.0) / radii;
uniform vec3 u_ellipsoidInverseRadiiSquared;
#if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)
uniform float u_ellipsoidShapeUvLongitudeRangeOrigin;
#endif
uniform vec3 u_ellipsoidLocalToShapeUvScale; // x = longitude scale, y = latitude scale, z = height scale
uniform ivec4 u_cameraTileCoordinates;
uniform vec3 u_cameraTileUv;
// robust iterative solution without trig functions
// https://github.com/0xfaded/ellipse_demo/issues/1
// https://stackoverflow.com/questions/22959698/distance-from-given-point-to-given-ellipse
// Extended to return radius of curvature along with the point
vec3 nearestPointAndRadiusOnEllipse(vec2 pos, vec2 radii) {
vec2 p = abs(pos);
vec2 inverseRadii = 1.0 / radii;
// We describe the ellipse parametrically: v = radii * vec2(cos(t), sin(t))
// but store the cos and sin of t in a vec2 for efficiency.
// Initial guess: t = pi/4
vec2 tTrigs = vec2(0.7071067811865476);
// Initial guess of point on ellipsoid
vec2 v = radii * tTrigs;
// Center of curvature of the ellipse at v
vec2 evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs;
const int iterations = 3;
for (int i = 0; i < iterations; ++i) {
// Find the (approximate) intersection of p - evolute with the ellipsoid.
vec2 q = normalize(p - evolute) * length(v - evolute);
// Update the estimate of t.
tTrigs = (q + evolute) * inverseRadii;
tTrigs = normalize(clamp(tTrigs, 0.0, 1.0));
v = radii * tTrigs;
evolute = u_evoluteScale * tTrigs * tTrigs * tTrigs;
}
return vec3(v * sign(pos), length(v - evolute));
}
mat3 convertLocalToShapeSpaceDerivative(in vec3 position) {
vec3 east = normalize(vec3(-position.y, position.x, 0.0));
// Convert the 3D position to a 2D position relative to the ellipse (radii.x, radii.z)
// (assume radii.y == radii.x) and find the nearest point on the ellipse and its normal
float distanceFromZAxis = length(position.xy);
vec2 posEllipse = vec2(distanceFromZAxis, position.z);
vec3 surfacePointAndRadius = nearestPointAndRadiusOnEllipse(posEllipse, u_ellipsoidRadii.xz);
vec2 surfacePoint = surfacePointAndRadius.xy;
vec2 normal2d = normalize(surfacePoint * u_ellipsoidInverseRadiiSquared.xz);
vec3 north = vec3(-normal2d.y * normalize(position.xy), abs(normal2d.x));
float heightSign = length(posEllipse) < length(surfacePoint) ? -1.0 : 1.0;
float height = heightSign * length(posEllipse - surfacePoint);
vec3 up = normalize(cross(east, north));
return mat3(east / distanceFromZAxis, north / (surfacePointAndRadius.z + height), up);
}
vec3 scaleShapeUvToShapeSpace(in vec3 shapeUv) {
// Convert from [0, 1] to radians [-pi, pi]
float longitude = shapeUv.x * czm_twoPi;
#if defined (ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE)
longitude /= u_ellipsoidLocalToShapeUvScale.x;
#endif
// Convert from [0, 1] to radians [-pi/2, pi/2]
float latitude = shapeUv.y * czm_pi;
#if defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE)
latitude /= u_ellipsoidLocalToShapeUvScale.y;
#endif
float height = shapeUv.z / u_ellipsoidLocalToShapeUvScale.z;
return vec3(longitude, latitude, height);
}
vec3 convertEcToDeltaShape(in vec3 positionEC) {
vec3 enu = u_ellipsoidEcToEastNorthUp * positionEC;
// 1. Compute the change in longitude from the camera to the ENU point
// First project the camera and ENU positions to the equatorial XY plane,
// positioning the camera on the +x axis, so that enu.x projects along the +y axis
float cosLatitude = cos(u_cameraPositionCartographic.y);
float sinLatitude = sin(u_cameraPositionCartographic.y);
float primeVerticalRadius = 1.0 / u_ellipsoidCurvatureAtLatitude.x;
vec2 cameraXY = vec2((primeVerticalRadius + u_cameraPositionCartographic.z) * cosLatitude, 0.0);
// Note precision loss in positionXY.x if length(enu) << length(cameraXY)
vec2 positionXY = cameraXY + vec2(-enu.y * sinLatitude + enu.z * cosLatitude, enu.x);
float dLongitude = atan(positionXY.y, positionXY.x);
// 2. Find the longitude component of positionXY, by rotating about Z until the y component is zero.
// Use the versine to compute the change in x directly from the change in angle:
// versine(angle) = 2 * sin^2(angle/2)
float sinHalfLongitude = sin(dLongitude / 2.0);
float dx = length(positionXY) * 2.0 * sinHalfLongitude * sinHalfLongitude;
// Rotate longitude component back to ENU North and Up, and remove from enu
enu += vec3(-enu.x, -dx * sinLatitude, dx * cosLatitude);
// 3. Compute the change in latitude from the camera to the ENU point.
// First project the camera and ENU positions to the meridional ZX plane,
// positioning the camera on the +Z axis, so that enu.y maps to the +X axis.
float meridionalRadius = 1.0 / u_ellipsoidCurvatureAtLatitude.y;
vec2 cameraZX = vec2(meridionalRadius + u_cameraPositionCartographic.z, 0.0);
vec2 positionZX = cameraZX + vec2(enu.z, enu.y);
float dLatitude = atan(positionZX.y, positionZX.x);
// 4. Compute the change in height above the ellipsoid
// Find the change in enu.z associated with rotating the point to the latitude of the camera
float sinHalfLatitude = sin(dLatitude / 2.0);
float dz = length(positionZX) * 2.0 * sinHalfLatitude * sinHalfLatitude;
// The remaining change in enu.z is the change in height above the ellipsoid
float dHeight = enu.z + dz;
return vec3(dLongitude, dLatitude, dHeight);
}
vec3 convertEcToDeltaTile(in vec3 positionEC) {
vec3 deltaShape = convertEcToDeltaShape(positionEC);
// Convert to tileset coordinates in [0, 1]
float dx = deltaShape.x / czm_twoPi;
#if (defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE))
// Wrap to ensure dx is not crossing through the unoccupied angle range, where
// angle to tile coordinate conversions would be more complicated
float cameraUvLongitude = (u_cameraPositionCartographic.x + czm_pi) / czm_twoPi;
float cameraUvLongitudeShift = fract(cameraUvLongitude - u_ellipsoidShapeUvLongitudeRangeOrigin);
float rawOutputUvLongitude = cameraUvLongitudeShift + dx;
float rotation = floor(rawOutputUvLongitude);
dx -= rotation;
dx *= u_ellipsoidLocalToShapeUvScale.x;
#endif
float dy = deltaShape.y / czm_pi;
#if (defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE))
dy *= u_ellipsoidLocalToShapeUvScale.y;
#endif
float dz = u_ellipsoidLocalToShapeUvScale.z * deltaShape.z;
// Convert to tile coordinate changes
return vec3(dx, dy, dz) * float(1 << u_cameraTileCoordinates.w);
}
TileAndUvCoordinate getTileAndUvCoordinate(in vec3 positionEC) {
vec3 deltaTileCoordinate = convertEcToDeltaTile(positionEC);
vec3 tileUvSum = u_cameraTileUv + deltaTileCoordinate;
ivec3 tileCoordinate = u_cameraTileCoordinates.xyz + ivec3(floor(tileUvSum));
int maxTileCoordinate = (1 << u_cameraTileCoordinates.w) - 1;
tileCoordinate.y = min(max(0, tileCoordinate.y), maxTileCoordinate);
tileCoordinate.z = min(max(0, tileCoordinate.z), maxTileCoordinate);
#if (!defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE))
ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
if (tileCoordinate.x < 0) {
tileCoordinate.x += (maxTileCoordinate + 1);
} else if (tileCoordinate.x > maxTileCoordinate) {
tileCoordinate.x -= (maxTileCoordinate + 1);
}
#else
tileCoordinate.x = min(max(0, tileCoordinate.x), maxTileCoordinate);
ivec3 tileCoordinateChange = tileCoordinate - u_cameraTileCoordinates.xyz;
#endif
vec3 tileUv = tileUvSum - vec3(tileCoordinateChange);
#if (!defined(ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE))
// If there is only one tile spanning 2*PI angle, the coordinate wraps around
tileUv.x = (u_cameraTileCoordinates.w == 0) ? fract(tileUv.x) : clamp(tileUv.x, 0.0, 1.0);
#else
tileUv.x = clamp(tileUv.x, 0.0, 1.0);
#endif
tileUv.y = clamp(tileUv.y, 0.0, 1.0);
tileUv.z = clamp(tileUv.z, 0.0, 1.0);
return TileAndUvCoordinate(ivec4(tileCoordinate, u_cameraTileCoordinates.w), tileUv);
}
`;var vro=x(T(),1),wM=`// These octree flags must be in sync with GpuOctreeFlag in VoxelTraversal.js
#define OCTREE_FLAG_INTERNAL 0
#define OCTREE_FLAG_LEAF 1
#define OCTREE_FLAG_PACKED_LEAF_FROM_PARENT 2
#define OCTREE_MAX_LEVELS 32 // Harcoded value because GLSL doesn't like variable length loops
uniform sampler2D u_octreeInternalNodeTexture;
uniform vec2 u_octreeInternalNodeTexelSizeUv;
uniform int u_octreeInternalNodeTilesPerRow;
#if (SAMPLE_COUNT > 1)
uniform sampler2D u_octreeLeafNodeTexture;
uniform vec2 u_octreeLeafNodeTexelSizeUv;
uniform int u_octreeLeafNodeTilesPerRow;
#endif
uniform ivec3 u_dimensions; // does not include padding, and is in the z-up orientation
uniform ivec3 u_inputDimensions; // includes padding, and is in the orientation of the input data
#if defined(PADDING)
uniform ivec3 u_paddingBefore;
#endif
struct OctreeNodeData {
int data;
int flag;
};
struct TraversalData {
ivec4 octreeCoords;
int parentOctreeIndex;
};
struct TileAndUvCoordinate {
ivec4 tileCoords;
vec3 tileUv;
};
struct SampleData {
int megatextureIndex;
ivec4 tileCoords;
vec3 tileUv;
vec3 inputCoordinate;
#if (SAMPLE_COUNT > 1)
float weight;
#endif
};
int normU8_toInt(in float value) {
return int(value * 255.0);
}
int normU8x2_toInt(in vec2 value) {
return int(value.x * 255.0) + 256 * int(value.y * 255.0);
}
float normU8x2_toFloat(in vec2 value) {
return float(normU8x2_toInt(value)) / 65535.0;
}
OctreeNodeData getOctreeNodeData(in vec2 octreeUv) {
vec4 texData = texture(u_octreeInternalNodeTexture, octreeUv);
OctreeNodeData data;
data.data = normU8x2_toInt(texData.xy);
data.flag = normU8x2_toInt(texData.zw);
return data;
}
OctreeNodeData getOctreeChildData(in int parentOctreeIndex, in ivec3 childCoord) {
int childIndex = childCoord.z * 4 + childCoord.y * 2 + childCoord.x;
int octreeCoordX = (parentOctreeIndex % u_octreeInternalNodeTilesPerRow) * 9 + 1 + childIndex;
int octreeCoordY = parentOctreeIndex / u_octreeInternalNodeTilesPerRow;
vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);
return getOctreeNodeData(octreeUv);
}
int getOctreeParentIndex(in int octreeIndex) {
int octreeCoordX = (octreeIndex % u_octreeInternalNodeTilesPerRow) * 9;
int octreeCoordY = octreeIndex / u_octreeInternalNodeTilesPerRow;
vec2 octreeUv = u_octreeInternalNodeTexelSizeUv * vec2(float(octreeCoordX) + 0.5, float(octreeCoordY) + 0.5);
vec4 parentData = texture(u_octreeInternalNodeTexture, octreeUv);
int parentOctreeIndex = normU8x2_toInt(parentData.xy);
return parentOctreeIndex;
}
vec3 getTileUv(in TileAndUvCoordinate tileAndUv, in ivec4 octreeCoords) {
int levelDifference = tileAndUv.tileCoords.w - octreeCoords.w;
float scalar = exp2(-1.0 * float(levelDifference));
vec3 originShift = vec3(tileAndUv.tileCoords.xyz - (octreeCoords.xyz << levelDifference)) * scalar;
return tileAndUv.tileUv * scalar + originShift;
}
vec3 getClampedTileUv(in TileAndUvCoordinate tileAndUv, in ivec4 octreeCoords) {
vec3 tileUv = getTileUv(tileAndUv, octreeCoords);
return clamp(tileUv, vec3(0.0), vec3(1.0));
}
void addSampleCoordinates(in TileAndUvCoordinate tileAndUv, inout SampleData sampleData) {
vec3 tileUv = getClampedTileUv(tileAndUv, sampleData.tileCoords);
vec3 inputCoordinate = tileUv * vec3(u_dimensions);
#if defined(PADDING)
inputCoordinate += vec3(u_paddingBefore);
#endif
#if defined(Y_UP_METADATA_ORDER)
#if defined(SHAPE_BOX)
float inputY = inputCoordinate.y;
inputCoordinate.y = inputCoordinate.z;
// u_inputDimensions.z is the y-up dimension along the 3D Tiles y-axis.
inputCoordinate.z = float(u_inputDimensions.z) - inputY;
#elif defined(SHAPE_CYLINDER)
float angle = inputCoordinate.y;
float height = inputCoordinate.z;
#if (!defined(CYLINDER_HAS_SHAPE_BOUNDS_ANGLE))
// Account for the different 0-angle convention in glTF vs 3DTiles
if (sampleData.tileCoords.w == 0) {
float angleCount = float(u_inputDimensions.z);
angle = mod(angle + angleCount / 2.0, angleCount);
}
#endif
inputCoordinate.y = height;
inputCoordinate.z = angle;
#endif
#endif
sampleData.tileUv = tileUv;
sampleData.inputCoordinate = inputCoordinate;
}
void getOctreeLeafSampleData(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleData) {
sampleData.megatextureIndex = data.data;
sampleData.tileCoords = (data.flag == OCTREE_FLAG_PACKED_LEAF_FROM_PARENT)
? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
: octreeCoords;
}
#if (SAMPLE_COUNT > 1)
void getOctreeLeafSampleDatas(in OctreeNodeData data, in ivec4 octreeCoords, out SampleData sampleDatas[SAMPLE_COUNT]) {
int leafIndex = data.data;
int leafNodeTexelCount = 2;
// Adding 0.5 moves to the center of the texel
float leafCoordXStart = float((leafIndex % u_octreeLeafNodeTilesPerRow) * leafNodeTexelCount) + 0.5;
float leafCoordY = float(leafIndex / u_octreeLeafNodeTilesPerRow) + 0.5;
// Get an interpolation weight and a flag to determine whether to read the parent texture
vec2 leafUv0 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 0.0, leafCoordY);
vec4 leafData0 = texture(u_octreeLeafNodeTexture, leafUv0);
float lerp = normU8x2_toFloat(leafData0.xy);
sampleDatas[0].weight = 1.0 - lerp;
sampleDatas[1].weight = lerp;
// TODO: this looks wrong? Should be comparing to OCTREE_FLAG_PACKED_LEAF_FROM_PARENT
sampleDatas[0].tileCoords = (normU8_toInt(leafData0.z) == 1)
? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
: octreeCoords;
sampleDatas[1].tileCoords = (normU8_toInt(leafData0.w) == 1)
? ivec4(octreeCoords.xyz / 2, octreeCoords.w - 1)
: octreeCoords;
// Get megatexture indices for both samples
vec2 leafUv1 = u_octreeLeafNodeTexelSizeUv * vec2(leafCoordXStart + 1.0, leafCoordY);
vec4 leafData1 = texture(u_octreeLeafNodeTexture, leafUv1);
sampleDatas[0].megatextureIndex = normU8x2_toInt(leafData1.xy);
sampleDatas[1].megatextureIndex = normU8x2_toInt(leafData1.zw);
}
#endif
OctreeNodeData traverseOctreeDownwards(in ivec4 tileCoordinate, inout TraversalData traversalData) {
OctreeNodeData childData;
for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {
// tileCoordinate.xyz is defined at the level of detail tileCoordinate.w.
// Find the corresponding coordinate at the level traversalData.octreeCoords.w
int level = traversalData.octreeCoords.w + 1;
int levelDifference = tileCoordinate.w - level;
ivec3 coordinateAtLevel = tileCoordinate.xyz >> levelDifference;
traversalData.octreeCoords = ivec4(coordinateAtLevel, level);
ivec3 childCoordinate = coordinateAtLevel & 1;
childData = getOctreeChildData(traversalData.parentOctreeIndex, childCoordinate);
if (childData.flag != OCTREE_FLAG_INTERNAL) {
// leaf tile - stop traversing
break;
}
traversalData.parentOctreeIndex = childData.data;
}
return childData;
}
/**
* Transform a given position to an octree tile coordinate and a position within that tile,
* and find the corresponding megatexture index and texture coordinates
*/
void traverseOctreeFromBeginning(in TileAndUvCoordinate tileAndUv, out TraversalData traversalData, out SampleData sampleDatas[SAMPLE_COUNT]) {
traversalData.octreeCoords = ivec4(0);
traversalData.parentOctreeIndex = 0;
OctreeNodeData nodeData = getOctreeNodeData(vec2(0.0));
if (nodeData.flag != OCTREE_FLAG_LEAF) {
nodeData = traverseOctreeDownwards(tileAndUv.tileCoords, traversalData);
}
#if (SAMPLE_COUNT == 1)
getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);
addSampleCoordinates(tileAndUv, sampleDatas[0]);
#else
getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);
addSampleCoordinates(tileAndUv, sampleDatas[0]);
addSampleCoordinates(tileAndUv, sampleDatas[1]);
#endif
}
bool insideTile(in ivec4 tileCoordinate, in ivec4 octreeCoords) {
int levelDifference = tileCoordinate.w - octreeCoords.w;
if (levelDifference < 0) {
return false;
}
ivec3 coordinateAtLevel = tileCoordinate.xyz >> levelDifference;
return coordinateAtLevel == octreeCoords.xyz;
}
void traverseOctreeFromExisting(in TileAndUvCoordinate tileAndUv, inout TraversalData traversalData, inout SampleData sampleDatas[SAMPLE_COUNT]) {
ivec4 tileCoords = tileAndUv.tileCoords;
if (insideTile(tileCoords, traversalData.octreeCoords)) {
for (int i = 0; i < SAMPLE_COUNT; i++) {
addSampleCoordinates(tileAndUv, sampleDatas[i]);
}
return;
}
// Go up tree until we find a parent tile containing tileCoords.
// Assumes all parents are available all they way up to the root.
for (int i = 0; i < OCTREE_MAX_LEVELS; ++i) {
traversalData.octreeCoords.xyz /= 2;
traversalData.octreeCoords.w -= 1;
if (insideTile(tileCoords, traversalData.octreeCoords)) {
break;
}
traversalData.parentOctreeIndex = getOctreeParentIndex(traversalData.parentOctreeIndex);
}
// Go down tree
OctreeNodeData nodeData = traverseOctreeDownwards(tileCoords, traversalData);
#if (SAMPLE_COUNT == 1)
getOctreeLeafSampleData(nodeData, traversalData.octreeCoords, sampleDatas[0]);
addSampleCoordinates(tileAndUv, sampleDatas[0]);
#else
getOctreeLeafSampleDatas(nodeData, traversalData.octreeCoords, sampleDatas);
addSampleCoordinates(tileAndUv, sampleDatas[0]);
addSampleCoordinates(tileAndUv, sampleDatas[1]);
#endif
}
`;var Iro=x(T(),1),MM=`// See Octree.glsl for the definitions of SampleData
/* Megatexture defines (set in Scene/VoxelRenderResources.js)
#define SAMPLE_COUNT ###
#define PADDING
*/
uniform ivec3 u_megatextureTileCounts; // number of tiles in the megatexture, along each axis
vec3 index1DTo3DTexCoord(int index)
{
int tilesPerZ = u_megatextureTileCounts.x * u_megatextureTileCounts.y;
int iz = index / tilesPerZ;
int remainder = index - iz * tilesPerZ;
int iy = remainder / u_megatextureTileCounts.x;
int ix = remainder - iy * u_megatextureTileCounts.x;
return vec3(ix, iy, iz) / vec3(u_megatextureTileCounts);
}
Properties getPropertiesFromMegatexture(in SampleData sampleData) {
int tileIndex = sampleData.megatextureIndex;
vec3 voxelCoord = sampleData.inputCoordinate;
// UV coordinate of the lower corner of the tile in the megatexture
vec3 tileUvOffset = index1DTo3DTexCoord(tileIndex);
// Voxel location
vec3 tileDimensions = vec3(u_inputDimensions);
vec3 clampedVoxelCoord = clamp(voxelCoord, vec3(0.5), tileDimensions - vec3(0.5));
vec3 voxelUv = clampedVoxelCoord / tileDimensions / vec3(u_megatextureTileCounts);
return getPropertiesFromMegatextureAtUv(tileUvOffset + voxelUv);
}
// Convert an array of sample datas to a final weighted properties.
Properties accumulatePropertiesFromMegatexture(in SampleData sampleDatas[SAMPLE_COUNT]) {
#if (SAMPLE_COUNT == 1)
return getPropertiesFromMegatexture(sampleDatas[0]);
#else
// When more than one sample is taken the accumulator needs to start at 0
Properties properties = clearProperties();
for (int i = 0; i < SAMPLE_COUNT; ++i) {
float weight = sampleDatas[i].weight;
// Avoid reading the megatexture when the weight is 0 as it can be costly.
if (weight > 0.0) {
Properties tempProperties = getPropertiesFromMegatexture(sampleDatas[i]);
tempProperties = scaleProperties(tempProperties, weight);
properties = sumProperties(properties, tempProperties);
}
}
return properties;
#endif
}
`;var Xro=x(T(),1),pEe={Z_UP:0,Y_UP:1};Object.freeze(pEe);var g0=pEe;function URt(e){let t=new M0;this.shaderBuilder=t;let n=e._customShader,i=Rt(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,fe.FRAGMENT)}t.addUniform("sampler3D","u_megatextureTextures[METADATA_COUNT]",fe.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([GM]),e.provider.metadataOrder===g0.Y_UP&&t.addDefine("Y_UP_METADATA_ORDER",void 0,fe.FRAGMENT);let d=e._provider.shape;d==="BOX"?t.addDefine("SHAPE_BOX",void 0,fe.FRAGMENT):d==="CYLINDER"?t.addDefine("SHAPE_CYLINDER",void 0,fe.FRAGMENT):d==="ELLIPSOID"&&t.addDefine("SHAPE_ELLIPSOID",void 0,fe.FRAGMENT),t.addFragmentLines([n.fragmentShaderText,"#line 0",wM,RM,MM,LM,vM,WM]),s>0&&(t.addDefine("CLIPPING_PLANES",void 0,fe.FRAGMENT),t.addDefine("CLIPPING_PLANES_COUNT",s,fe.FRAGMENT),r.unionClippingRegions&&t.addDefine("CLIPPING_PLANES_UNION",void 0,fe.FRAGMENT)),e._depthTest&&t.addDefine("DEPTH_TEST",void 0,fe.FRAGMENT),d==="BOX"?t.addFragmentLines([XM,FM,yA]):d==="CYLINDER"?t.addFragmentLines([NM,HR,IM,yA]):d==="ELLIPSOID"&&t.addFragmentLines([YM,HR,PM,yA]),t.addFragmentLines([EM]);let u=e._shape,h=u.shaderDefines;for(let f in h)if(h.hasOwnProperty(f)){let y=h[f];l(y)&&(y=y===!0?void 0:y,t.addDefine(f,y,fe.FRAGMENT))}let p=u.shaderMaximumIntersectionsLength;s>0&&(t.addDefine("CLIPPING_PLANES_INTERSECTION_INDEX",p,fe.FRAGMENT),s===1?p+=1:r.unionClippingRegions?p+=2:p+=1),e._depthTest&&(t.addDefine("DEPTH_INTERSECTION_INDEX",p,fe.FRAGMENT),p+=1),t.addDefine("INTERSECTION_COUNT",p,fe.FRAGMENT),(!m.equals(e.paddingBefore,m.ZERO)||!m.equals(e.paddingAfter,m.ZERO))&&t.addDefine("PADDING",void 0,fe.FRAGMENT),e._useLogDepth&&t.addDefine("LOG_DEPTH_READ_ONLY",void 0,fe.FRAGMENT);let b=e._traversal;t.addDefine("SAMPLE_COUNT",`${b._sampleCount}`,fe.FRAGMENT)}var kM=URt;var bEe=new M;function DRt(e,t){let n=new kM(e);VM(n,e);let{shaderBuilder:i,clippingPlanes:o,clippingPlanesLength:r,renderBoundPlanes:s,renderBoundPlanesLength:a}=n;if(r>0){let Z="getClippingPlane",V=`vec4 ${Z}(highp sampler2D packedPlanes, int planeNumber)`,E=as.getTextureResolution(o,t,bEe),L=gEe(E);i.addFunction(Z,V,fe.FRAGMENT),i.addFunctionLines(Z,[L])}if(a>0){let Z="getBoundPlane",V=`vec4 ${Z}(highp sampler2D packedPlanes, int planeNumber)`,E=Gg.getTextureResolution(s,t,bEe),L=gEe(E);i.addFunction(Z,V,fe.FRAGMENT),i.addFunctionLines(Z,[L])}let c=i.clone();c.addDefine("PICKING",void 0,fe.FRAGMENT);let d=i.clone();d.addDefine("PICKING_VOXEL",void 0,fe.FRAGMENT);let u=i.buildShaderProgram(t),h=c.buildShaderProgram(t),p=d.buildShaderProgram(t),b=De.fromCache({cull:{enabled:!0,face:Pi.BACK},depthTest:{enabled:!1},depthMask:!1,blending:tn.PRE_MULTIPLIED_ALPHA_BLEND}),f=t.getViewportQuadVertexArray(),y=e._depthTest,_=new et({vertexArray:f,primitiveType:ve.TRIANGLES,renderState:b,shaderProgram:u,uniformMap:n.uniformMap,modelMatrix:e._compoundModelMatrix,pass:Le.VOXELS,executeInClosestFrustum:!0,owner:this,cull:y,occlude:y}),S=et.shallowClone(_,new et);S.shaderProgram=h,S.pickOnly=!0;let A=et.shallowClone(_,new et);if(A.shaderProgram=p,A.pickOnly=!0,l(e._drawCommand)){let Z=e._drawCommand;Z.shaderProgram=Z.shaderProgram&&Z.shaderProgram.destroy()}if(l(e._drawCommandPick)){let Z=e._drawCommandPick;Z.shaderProgram=Z.shaderProgram&&Z.shaderProgram.destroy()}if(l(e._drawCommandPickVoxel)){let Z=e._drawCommandPickVoxel;Z.shaderProgram=Z.shaderProgram&&Z.shaderProgram.destroy()}e._drawCommand=_,e._drawCommandPick=S,e._drawCommandPickVoxel=A}function gEe(e){let t=e.x,n=e.y,i=1/t,o=1/n,r=`${i}`;r.indexOf(".")===-1&&(r+=".0");let s=`${o}`;return s.indexOf(".")===-1&&(s+=".0"),`int pixY = planeNumber / ${t};
int pixX = planeNumber - (pixY * ${t});
// Sample from center of pixel
float u = (float(pixX) + 0.5) * ${r};
float v = (float(pixY) + 0.5) * ${s};
return texture(packedPlanes, vec2(u, v));`}var UM=DRt;var zso=x(T(),1);var Aso=x(T(),1),yEe={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(yEe);var KR=yEe;var Xso=x(T(),1);var Cso=x(T(),1);function ORt(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 DM=ORt;function JR(){this._defaultTexture=void 0,this._textures={},this._loadedImages=[],this._lastUpdatedFrame=-1}JR.prototype.getTexture=function(e){return this._textures[e]};function BRt(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})}JR.prototype.loadTexture2D=function(e,t){l(t.typedArray)?this._loadedImages.push({id:e,textureUniform:t}):BRt(this,e,t)};function zRt(e,t,n){let{id:i,textureUniform:o,image:r}=t,s=n.webgl2?oz(o,r,n):HRt(o,r,n),a=e._textures[i];l(a)&&a!==n.defaultTexture&&a.destroy(),e._textures[i]=s}function oz(e,t,n){let{typedArray:i,sampler:o}=e,r=l(i)?TEe(e,n):new Et({context:n,source:t,sampler:o});return xEe(o)&&r.generateMipmap(),r}function HRt(e,t,n){let{typedArray:i,sampler:o}=e,r=xEe(o),s=o.wrapS===un.REPEAT||o.wrapS===un.MIRRORED_REPEAT||o.wrapT===un.REPEAT||o.wrapT===un.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 h=DM(i,a,c),p=Sy(h);return oz({sampler:o},p,n)}}else{let h=Sy(t);return oz(e,h,n)}else return oz(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."),TEe(e,n)}function xEe(e){return[kt.NEAREST_MIPMAP_NEAREST,kt.NEAREST_MIPMAP_LINEAR,kt.LINEAR_MIPMAP_NEAREST,kt.LINEAR_MIPMAP_LINEAR].includes(e.minificationFilter)}function TEe(e,t){let{pixelFormat:n,pixelDatatype:i,width:o,height:r,typedArray:s,sampler:a}=e;return new Et({context:t,pixelFormat:n,pixelDatatype:i,source:{arrayBufferView:s,width:o,height:r},sampler:a,flipY:!1})}JR.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];zRt(this,o,t)}n.length=0};JR.prototype.isDestroyed=function(){return!1};JR.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 me(this)};var OM=JR;function BM(e){e=e??B.EMPTY_OBJECT,this.mode=e.mode??Zb.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 OM,this._defaultTexture=void 0,this.uniformMap=KRt(this),this.usedVariablesVertex={attributeSet:{},featureIdSet:{},metadataSet:{}},this.usedVariablesFragment={attributeSet:{},featureIdSet:{},metadataSet:{},materialSet:{}},QRt(this),qRt(this)}function KRt(e){let t=e.uniforms,n={};for(let i in t)if(t.hasOwnProperty(i)){let o=t[i];o.type===KR.SAMPLER_2D?(e._textureManager.loadTexture2D(i,o.value),n[i]=JRt(e,i)):n[i]=jRt(e,i)}return n}function JRt(e,t){return function(){return e._textureManager.getTexture(t)??e._defaultTexture}}function jRt(e,t){return function(){return e.uniforms[t].value}}function xA(e,t,n){let i;for(;(i=t.exec(e))!==null;){let o=i[1];n[o]=!0}}function QRt(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,xA(r,t,o),o=e.usedVariablesVertex.featureIdSet,xA(r,n,o),o=e.usedVariablesVertex.metadataSet,xA(r,i,o));let s=e.fragmentShaderText;if(l(s)){o=e.usedVariablesFragment.attributeSet,xA(s,t,o),o=e.usedVariablesFragment.featureIdSet,xA(s,n,o),o=e.usedVariablesFragment.metadataSet,xA(s,i,o);let a=/material\.(\w+)/g,c=e.usedVariablesFragment.materialSet;xA(s,a,c)}}function _Ee(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 hl(e,t,n,i){if(e.hasOwnProperty(t)){let o=`${_Ee(t)} is not available in the ${i} shader. Did you mean ${_Ee(n)} instead?`;throw new he(o)}}function qRt(e){let t=e.usedVariablesVertex.attributeSet;hl(t,"position","positionMC","vertex"),hl(t,"normal","normalMC","vertex"),hl(t,"tangent","tangentMC","vertex"),hl(t,"bitangent","bitangentMC","vertex"),hl(t,"positionWC","positionMC","vertex"),hl(t,"positionEC","positionMC","vertex"),hl(t,"normalEC","normalMC","vertex"),hl(t,"tangentEC","tangentMC","vertex"),hl(t,"bitangentEC","bitangentMC","vertex");let n=e.usedVariablesFragment.attributeSet;hl(n,"position","positionEC","fragment"),hl(n,"normal","normalEC","fragment"),hl(n,"tangent","tangentEC","fragment"),hl(n,"bitangent","bitangentEC","fragment"),hl(n,"normalMC","normalEC","fragment"),hl(n,"tangentMC","tangentEC","fragment"),hl(n,"bitangentMC","bitangentEC","fragment")}BM.prototype.setUniform=function(e,t){let n=this.uniforms[e];n.type===KR.SAMPLER_2D?this._textureManager.loadTexture2D(e,t):l(t.clone)?n.value=t.clone(n.value):n.value=t};BM.prototype.update=function(e){this._defaultTexture=e.context.defaultTexture,this._textureManager.update(e)};BM.prototype.isDestroyed=function(){return!1};BM.prototype.destroy=function(){this._textureManager=this._textureManager&&this._textureManager.destroy(),me(this)};var TA=BM;var eao=x(T(),1);function Lg(e){let{loader:t,metadata:n}=e;this._loader=t,this._metadata=n,this._resourcesLoaded=!1,this._ready=!1}Object.defineProperties(Lg.prototype,{ready:{get:function(){return this._ready}},metadata:{get:function(){return this._metadata}}});Lg.fromMetadataArray=function(e){return new Lg({metadata:e})};Lg.fromGltf=async function(e){let t=new mu({gltfResource:e,releaseGltfJson:!1,loadAttributesAsTypedArray:!0});try{await t.load()}catch(n){throw t.destroy(),n}return new Lg({loader:t})};Lg.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=$Rt(r,i,e),this._ready=!0;return}this._resourcesLoaded=n.process(t)}};function $Rt(e,t,n){let{className:i,names:o,types:r,componentTypes:s}=n.provider,a=t.propertyAttributes.find(u=>u.class.id===i),{properties:c}=a,d=new Array(o.length);for(let u=0;u<e.length;u++){let h=c[o[u]].attribute,p=e.find(_=>_.name===h);if(!l(p))continue;let b=Pt.toComponentDatatype(s[u]),f=gt.getComponentCount(r[u]),y=p.count*f;d[u]=K.createArrayBufferView(b,p.typedArray.buffer,p.typedArray.byteOffset+p.byteOffset,y)}return d}Lg.prototype.isDestroyed=function(){return!1};Lg.prototype.destroy=function(){return this._loader=this._loader&&this._loader.destroy(),me(this)};var _A=Lg;var kao=x(T(),1);var dao=x(T(),1);function fl(){this._orientedBoundingBox=new $t,this._boundingSphere=new de,this._boundTransform=new F,this._shapeTransform=new F,this._minBounds=fl.DefaultMinBounds.clone(),this._maxBounds=fl.DefaultMaxBounds.clone(),this._renderMinBounds=fl.DefaultMinBounds.clone(),this._renderMaxBounds=fl.DefaultMaxBounds.clone();let{DefaultMinBounds:e,DefaultMaxBounds:t}=fl,n=[new zs(m.negate(m.UNIT_X,new m),e.x),new zs(m.negate(m.UNIT_Y,new m),e.y),new zs(m.negate(m.UNIT_Z,new m),e.z),new zs(m.UNIT_X,-t.x),new zs(m.UNIT_Y,-t.y),new zs(m.UNIT_Z,-t.z)];this._renderBoundPlanes=new Gg({planes:n}),this._localToShapeUvTranslate=new m,this._shaderUniforms={boxEcToXyz:new q,boxLocalToShapeUvScale:new m},this._shaderDefines={BOX_INTERSECTION_INDEX:void 0},this._shaderMaximumIntersectionsLength=0}Object.defineProperties(fl.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 e1t=new m,t1t=new m,n1t=new q,i1t=new m,o1t=new m;fl.prototype.update=function(e,t,n,i,o){i=i??t.clone(i1t),o=o??n.clone(o1t),t=m.clone(t,this._minBounds),n=m.clone(n,this._maxBounds);let r=m.clamp(t,i,o,this._renderMinBounds),s=m.clamp(n,i,o,this._renderMaxBounds),a=F.getScale(e,t1t);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=Qee(r,s,this._shapeTransform,this._orientedBoundingBox),this._boundTransform=F.fromRotationTranslation(this._orientedBoundingBox.halfAxes,this._orientedBoundingBox.center,this._boundTransform),this._boundingSphere=de.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere);let d=this._shaderUniforms,u=this._shaderDefines;for(let y in u)u.hasOwnProperty(y)&&(u[y]=void 0);let h=0;u.BOX_INTERSECTION_INDEX=h,h+=1;let p=t,b=n,f=m.fromElements(Jee(p.x,b.x),Jee(p.y,b.y),Jee(p.z,b.z),d.boxLocalToShapeUvScale);return this._localToShapeUvTranslate=m.negate(m.multiplyComponents(f,p,this._localToShapeUvTranslate),this._localToShapeUvTranslate),this._shaderMaximumIntersectionsLength=h,!0};function Jee(e,t){return W.equalsEpsilon(e,t,W.EPSILON7)?1:1/(t-e)}var r1t=new F;fl.prototype.updateViewTransforms=function(e){let t=this._shaderUniforms,n=F.inverse(this._shapeTransform,r1t),i=F.getMatrix3(n,t.boxEcToXyz),o=e.context.uniformState.inverseViewRotation;q.multiply(i,o,t.boxEcToXyz)};fl.prototype.convertLocalToShapeUvSpace=function(e,t){let{boxLocalToShapeUvScale:n}=this._shaderUniforms,i=this._localToShapeUvTranslate;return m.add(m.multiplyComponents(e,n,t),i,t)};var rz=new m,jee=new m;fl.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=this._minBounds,s=this._maxBounds,a=1/Math.pow(2,e),c=m.fromElements(W.lerp(r.x,s.x,a*t),W.lerp(r.y,s.y,a*n),W.lerp(r.z,s.z,a*i),rz),d=m.fromElements(W.lerp(r.x,s.x,a*(t+1)),W.lerp(r.y,s.y,a*(n+1)),W.lerp(r.z,s.z,a*(i+1)),jee);return Qee(c,d,this._shapeTransform,o)};var SEe=new m;fl.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=m.divideComponents(m.ONE,t,SEe),s=m.multiplyByScalar(r,o,SEe),a=m.multiplyByScalar(m.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,rz),o,rz),c=m.add(a,s,jee),d=this._minBounds,u=this._maxBounds,h=m.fromElements(W.lerp(d.x,u.x,a.x),W.lerp(d.y,u.y,a.y),W.lerp(d.z,u.z,a.z),rz),p=m.fromElements(W.lerp(d.x,u.x,c.x),W.lerp(d.y,u.y,c.y),W.lerp(d.z,u.z,c.z),jee);return Qee(h,p,this._shapeTransform,i)};fl.DefaultMinBounds=Object.freeze(new m(-1,-1,-1));fl.DefaultMaxBounds=Object.freeze(new m(1,1,1));var AEe=new m;function Qee(e,t,n,i){let o=fl.DefaultMinBounds,r=fl.DefaultMaxBounds;if(m.equals(e,o)&&m.equals(t,r))i.center=F.getTranslation(n,i.center),i.halfAxes=F.getMatrix3(n,i.halfAxes);else{let a=F.getScale(n,AEe),c=m.midpoint(e,t,e1t);i.center=F.multiplyByPoint(n,c,i.center),a=m.fromElements(a.x*.5*(t.x-e.x),a.y*.5*(t.y-e.y),a.z*.5*(t.z-e.z),AEe);let d=F.getRotation(n,n1t);i.halfAxes=q.setScale(d,a,i.halfAxes)}return i}var SA=fl;var Sao=x(T(),1);function ju(){this._orientedBoundingBox=new $t,this._boundingSphere=new de,this._boundTransform=new F,this._shapeTransform=new F,this._minBounds=ju.DefaultMinBounds.clone(),this._maxBounds=ju.DefaultMaxBounds.clone();let{DefaultMinBounds:e,DefaultMaxBounds:t}=ju,n=[new zs(m.negate(m.UNIT_Z,new m),e.z),new zs(m.UNIT_Z,-t.z)];this._renderBoundPlanes=new Gg({planes:n}),this._localToShapeUvTranslate=new m,this._shaderUniforms={cameraShapePosition:new m,cylinderEcToRadialTangentUp:new q,cylinderRenderRadiusMinMax:new M,cylinderRenderAngleMinMax:new M,cylinderLocalToShapeUvScale:new m,cylinderShapeUvAngleRangeOrigin:0},this._shaderDefines={CYLINDER_HAS_SHAPE_BOUNDS_ANGLE:void 0,CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN:void 0,CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF:void 0,CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF:void 0,CYLINDER_INTERSECTION_INDEX_RADIUS_MAX:void 0,CYLINDER_INTERSECTION_INDEX_RADIUS_MIN:void 0,CYLINDER_INTERSECTION_INDEX_ANGLE:void 0},this._shaderMaximumIntersectionsLength=0}Object.defineProperties(ju.prototype,{orientedBoundingBox:{get:function(){return this._orientedBoundingBox}},renderBoundPlanes:{get:function(){return this._renderBoundPlanes}},boundingSphere:{get:function(){return this._boundingSphere}},boundTransform:{get:function(){return this._boundTransform}},shapeTransform:{get:function(){return this._shapeTransform}},shaderUniforms:{get:function(){return this._shaderUniforms}},shaderDefines:{get:function(){return this._shaderDefines}},shaderMaximumIntersectionsLength:{get:function(){return this._shaderMaximumIntersectionsLength}}});var s1t=new m,a1t=new m,c1t=new m,l1t=new m,d1t=new m,u1t=new F,m1t=new m,ZEe=new M;ju.prototype.update=function(e,t,n,i,o){i=i??t.clone(a1t),o=o??n.clone(c1t),t=m.clone(t,this._minBounds),n=m.clone(n,this._maxBounds);let{DefaultMinBounds:r,DefaultMaxBounds:s}=ju,a=s.y-r.y,c=.5*a,d=W.EPSILON10,u=W.EPSILON10;t.x=Math.max(0,t.x),n.x=Math.max(0,n.x),t.y=W.negativePiToPi(t.y),n.y=W.negativePiToPi(n.y),i.y=W.negativePiToPi(i.y),o.y=W.negativePiToPi(o.y);let h=m.maximumByComponent(t,i,l1t),p=m.minimumByComponent(n,o,d1t),b=F.getScale(e,s1t);if(p.x===0||h.x>p.x||h.z>p.z||W.equalsEpsilon(b.x,0,void 0,d)||W.equalsEpsilon(b.y,0,void 0,d)||W.equalsEpsilon(b.z,0,void 0,d))return!1;let f=this._renderBoundPlanes;f.get(0).distance=h.z,f.get(1).distance=-p.z,this._shapeTransform=F.clone(e,this._shapeTransform),this._orientedBoundingBox=ete(h,p,this._shapeTransform,this._orientedBoundingBox),this._boundTransform=F.fromRotationTranslation(this._orientedBoundingBox.halfAxes,this._orientedBoundingBox.center,this._boundTransform),this._boundingSphere=de.fromOrientedBoundingBox(this._orientedBoundingBox,this._boundingSphere);let y=n.y<t.y,_=n.y-t.y+y*a,S=p.y<h.y,A=p.y-h.y+S*a,Z=A>=c-u&&A<a-u,V=A>u&&A<c-u,E=A<=u,L=Z||V||E,v=this._shaderUniforms,I=this._shaderDefines;for(let J in I)I.hasOwnProperty(J)&&(I[J]=void 0);let X=0;I.CYLINDER_INTERSECTION_INDEX_RADIUS_MAX=X,X+=1,_<a-u&&(I.CYLINDER_HAS_SHAPE_BOUNDS_ANGLE=!0),h.x!==r.x&&(I.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_MIN=!0,I.CYLINDER_INTERSECTION_INDEX_RADIUS_MIN=X,X+=1),v.cylinderRenderRadiusMinMax=M.fromElements(h.x,p.x,v.cylinderRenderRadiusMinMax),h.x===p.x&&(I.CYLINDER_HAS_RENDER_BOUNDS_RADIUS_FLAT=!0);let N=n.x-t.x,g=0,C=1;N!==0&&(g=1/N,C=-t.x*g);let R=n.z-t.z,G=0,P=1;R!==0&&(G=1/R,P=-t.z*G),L&&(I.CYLINDER_HAS_RENDER_BOUNDS_ANGLE=!0,I.CYLINDER_INTERSECTION_INDEX_ANGLE=X,Z?(I.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_UNDER_HALF=!0,X+=1):V?(I.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_OVER_HALF=!0,X+=2):E&&(I.CYLINDER_HAS_RENDER_BOUNDS_ANGLE_RANGE_EQUAL_ZERO=!0,X+=2),v.cylinderRenderAngleMinMax=M.fromElements(h.y,p.y,v.cylinderRenderAngleMinMax));let Y=(t.y-r.y)/a,O=(n.y-r.y)/a,k=1-_/a,D=(O+.5*k)%1;v.cylinderShapeUvAngleRangeOrigin=D;let w=0,z=1;if(_>u){w=a/_;let J=Y-D;z=-w*(J-Math.floor(J))}return v.cylinderLocalToShapeUvScale=m.fromElements(g,w,G,v.cylinderLocalToShapeUvScale),this._localToShapeUvTranslate=m.fromElements(C,z,P,this._localToShapeUvTranslate),this._shaderMaximumIntersectionsLength=X,!0};var h1t=new q,f1t=new q,p1t=new F;ju.prototype.updateViewTransforms=function(e){let t=this._shaderUniforms,n=F.inverse(this._shapeTransform,u1t),i=F.multiplyByPoint(n,e.camera.positionWC,m1t);t.cameraShapePosition=m.fromElements(M.magnitude(i),Math.atan2(i.y,i.x),i.z,t.cameraShapePosition);let o=M.normalize(M.fromCartesian3(i,ZEe),ZEe),r=q.fromRowMajorArray([o.x,o.y,0,-o.y,o.x,0,0,0,1],h1t),s=e.context.uniformState.inverseView,a=F.multiplyTransformation(n,s,p1t),c=F.getMatrix3(a,f1t);t.cylinderEcToRadialTangentUp=q.multiply(r,c,t.cylinderEcToRadialTangentUp)};ju.prototype.convertLocalToShapeUvSpace=function(e,t){let n=Math.hypot(e.x,e.y),i=Math.atan2(e.y,e.x),o=e.z,{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,m.fromElements(n,i,o,t)};var sz=new m,$ee=new m;ju.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=this._minBounds,s=this._maxBounds,a=1/Math.pow(2,e),c=m.fromElements(W.lerp(r.x,s.x,t*a),W.lerp(r.y,s.y,n*a),W.lerp(r.z,s.z,i*a),sz),d=m.fromElements(W.lerp(r.x,s.x,(t+1)*a),W.lerp(r.y,s.y,(n+1)*a),W.lerp(r.z,s.z,(i+1)*a),$ee);return ete(c,d,this._shapeTransform,o)};var CEe=new m;ju.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=m.divideComponents(m.ONE,t,CEe),s=m.multiplyByScalar(r,o,CEe),a=m.multiplyByScalar(m.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,sz),o,sz),c=m.add(a,s,$ee),d=this._minBounds,u=this._maxBounds,h=m.fromElements(W.lerp(d.x,u.x,a.x),W.lerp(d.y,u.y,a.y),W.lerp(d.z,u.z,a.z),sz),p=m.fromElements(W.lerp(d.x,u.x,c.x),W.lerp(d.y,u.y,c.y),W.lerp(d.z,u.z,c.z),$ee);return ete(h,p,this._shapeTransform,i)};ju.DefaultMinBounds=Object.freeze(new m(0,-W.PI,-1));ju.DefaultMaxBounds=Object.freeze(new m(1,+W.PI,1));var b1t=5,g1t=new Array(b1t),y1t=new m,x1t=new q,T1t=new F,_1t=new F,S1t=new F,qee=new F,A1t=new m,Z1t=new m,C1t=new m,REe=new Array(8);for(let e=0;e<8;e++)REe[e]=new m;function VEe(e,t,n){return Math.abs(se.dot(e,t))<n}function V1t(e){let t=F.getColumn(e,0,A1t),n=F.getColumn(e,1,Z1t),i=F.getColumn(e,2,C1t),o=W.EPSILON4;return VEe(t,n,o)&&VEe(n,i,o)}function R1t(e,t){let n=REe;m.fromElements(-.5,-.5,-.5,n[0]),m.fromElements(-.5,-.5,.5,n[1]),m.fromElements(-.5,.5,-.5,n[2]),m.fromElements(-.5,.5,.5,n[3]),m.fromElements(.5,-.5,-.5,n[4]),m.fromElements(.5,-.5,.5,n[5]),m.fromElements(.5,.5,-.5,n[6]),m.fromElements(.5,.5,.5,n[7]);for(let i=0;i<8;++i)F.multiplyByPoint(e,n[i],n[i]);return $t.fromPoints(n,t)}var E1t=new m;function ete(e,t,n,i){let o=e.x,r=t.x,s=e.y,a=t.y<s?t.y+W.TWO_PI:t.y,c=e.z,d=t.z,u=a-s,h=s+u*.5,p=g1t,b=0;p[b++]=s,p[b++]=a,p[b++]=h,u>W.PI&&(p[b++]=h-W.PI_OVER_TWO,p[b++]=h+W.PI_OVER_TWO);let f=Number.POSITIVE_INFINITY,y=Number.POSITIVE_INFINITY,_=Number.NEGATIVE_INFINITY,S=Number.NEGATIVE_INFINITY;for(let Y=0;Y<b;++Y){let O=p[Y]-h,k=Math.cos(O),D=Math.sin(O),w=k*o,z=D*o,J=k*r,ee=D*r;f=Math.min(f,w,J),y=Math.min(y,z,ee),_=Math.max(_,w,J),S=Math.max(S,z,ee)}let A=_-f,Z=S-y,V=d-c,E=(f+_)*.5,L=(y+S)*.5,v=(c+d)*.5,I=m.fromElements(E,L,v,y1t),X=q.fromRotationZ(h,x1t),N=m.fromElements(A,Z,V,E1t),g=F.fromScale(N,S1t),C=F.fromRotation(X,_1t),R=F.fromTranslation(I,T1t),G=F.multiplyTransformation(C,F.multiplyTransformation(R,g,qee),qee),P=F.multiplyTransformation(n,G,qee);return V1t(P)?$t.fromTransformation(P,i):R1t(P,i)}var AA=ju;var Xao=x(T(),1);function ph(){this._orientedBoundingBox=new $t,this._boundingSphere=new de,this._boundTransform=new F,this._shapeTransform=new F,this._rectangle=new ae,this._minimumHeight=ph.DefaultMinBounds.z,this._maximumHeight=ph.DefaultMaxBounds.z,this._ellipsoid=new ie,this._translation=new m,this._rotation=new q,this._localToShapeUvTranslate=new m,this._shaderUniforms={cameraPositionCartographic:new m,ellipsoidEcToEastNorthUp:new q,ellipsoidRadii:new m,eccentricitySquared:0,evoluteScale:new M,ellipsoidCurvatureAtLatitude:new M,ellipsoidInverseRadiiSquared:new m,ellipsoidRenderLongitudeMinMax:new M,ellipsoidShapeUvLongitudeRangeOrigin:0,ellipsoidShapeUvLongitudeMinMaxMid:new m,ellipsoidLocalToShapeUvScale:new m,ellipsoidRenderLatitudeSinMinMax:new M,clipMinMaxHeight:new M},this._shaderDefines={ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF:void 0,ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF:void 0,ELLIPSOID_HAS_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(ph.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 G1t=new m,L1t=new m,W1t=new m,v1t=new m,F1t=new m,I1t=new m,P1t=new m,X1t=new m,EEe=new m,GEe=new m,N1t=new ae;ph.prototype.update=function(e,t,n,i,o){let{DefaultMinBounds:r,DefaultMaxBounds:s}=ph;i=i??r,o=o??s;let a=W.EPSILON10,c=W.EPSILON10,d=W.EPSILON10,u=W.EPSILON3,h=F.getScale(e,X1t),p=m.clone(r,G1t);p.z=-m.minimumComponent(h);let b=m.clamp(t,p,s,L1t),f=m.clamp(n,p,s,W1t),y=m.clamp(i,p,s,v1t),_=m.clamp(o,p,s,F1t),S=m.maximumByComponent(b,y,I1t),A=m.minimumByComponent(f,_,P1t),Z=m.add(h,m.fromElements(f.z,f.z,f.z,EEe),EEe),V=m.add(h,m.fromElements(A.z,A.z,A.z,GEe),GEe);if(S.y>A.y||S.y===s.y||A.y===r.y||S.z>A.z||W.equalsEpsilon(V,m.ZERO,void 0,a))return!1;this._rectangle=ae.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(h,this._ellipsoid),this._minimumHeight=b.z,this._maximumHeight=f.z;let E=ae.fromRadians(S.x,S.y,A.x,A.y,N1t);this._orientedBoundingBox=tte(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 L=s.x-r.x,v=.5*L,I=A.x<S.x,X=A.x-S.x+I*L,N=X<=c,g=X>=v-c&&X<L-c,C=X>c&&X<v-c,R=N||g||C,G=f.x<b.x,P=f.x-b.x+G*L,Y=P>v+c&&P<L-c,O=P>=v-c&&P<=v+c,k=P<v-c,D=Y||O||k,w=A.y<-u,z=A.y>=-u&&A.y<=+u,J=A.y>+u&&A.y<s.y-d,ee=w||z||J,H=S.y>r.y+d&&S.y<-u,te=S.y>=-u&&S.y<=+u,$=S.y>+u,be=H||te||$,ye=ee||be,ce=f.y-b.y,Ze=f.y<-u,xe=f.y>=-u&&f.y<=+u,Ge=f.y>+u&&f.y<s.y-d,Ve=Ze||xe||Ge,Ye=b.y>r.y+d&&b.y<-u,ke=b.y>=-u&&b.y<=+u,it=b.y>+u,Vt=Ve||(Ye||ke||it),Ue=this._shaderUniforms,St=this._shaderDefines;for(let Ci in St)St.hasOwnProperty(Ci)&&(St[Ci]=void 0);Ue.ellipsoidRadii=m.clone(Z,Ue.ellipsoidRadii);let{x:ht,z:ot}=Ue.ellipsoidRadii,Jt=ot/ht;Ue.eccentricitySquared=1-Jt*Jt,Ue.evoluteScale=M.fromElements((ht*ht-ot*ot)/ht,(ot*ot-ht*ht)/ot,Ue.evoluteScale),Ue.ellipsoidInverseRadiiSquared=m.divideComponents(m.ONE,m.multiplyComponents(Ue.ellipsoidRadii,Ue.ellipsoidRadii,Ue.ellipsoidInverseRadiiSquared),Ue.ellipsoidInverseRadiiSquared);let jt=0;St.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MAX=jt,jt+=1,St.ELLIPSOID_INTERSECTION_INDEX_HEIGHT_MIN=jt,jt+=1,Ue.clipMinMaxHeight=M.fromElements(S.z-f.z,A.z-f.z,Ue.clipMinMaxHeight);let yt=f.z-b.z,Gt=yt===0?0:1/yt;R&&(St.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE=!0,St.ELLIPSOID_INTERSECTION_INDEX_LONGITUDE=jt,g?(St.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_UNDER_HALF=!0,jt+=1):C?(St.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_OVER_HALF=!0,jt+=2):N&&(St.ELLIPSOID_HAS_RENDER_BOUNDS_LONGITUDE_RANGE_EQUAL_ZERO=!0,jt+=2),Ue.ellipsoidRenderLongitudeMinMax=M.fromElements(S.x,A.x,Ue.ellipsoidRenderLongitudeMinMax));let ln=0,st=1;if(D){St.ELLIPSOID_HAS_SHAPE_BOUNDS_LONGITUDE=!0;let Ci=(b.x-r.x)/L,Dt=(f.x-r.x)/L,Ro=1-P/L,ki=(Dt+.5*Ro)%1;if(Ue.ellipsoidShapeUvLongitudeRangeOrigin=ki,P>c){ln=L/P;let ri=Ci-ki;st=-ln*(ri-Math.floor(ri))}}ye&&(be&&(St.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN=!0,St.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MIN=jt,H?(St.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_UNDER_HALF=!0,jt+=1):te?(St.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_EQUAL_HALF=!0,jt+=1):$&&(St.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MIN_OVER_HALF=!0,jt+=2)),ee&&(St.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX=!0,St.ELLIPSOID_INTERSECTION_INDEX_LATITUDE_MAX=jt,w?(St.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_UNDER_HALF=!0,jt+=2):z?(St.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_EQUAL_HALF=!0,jt+=1):J&&(St.ELLIPSOID_HAS_RENDER_BOUNDS_LATITUDE_MAX_OVER_HALF=!0,jt+=1)),Ue.ellipsoidRenderLatitudeSinMinMax=M.fromElements(Math.sin(S.y),Math.sin(A.y),Ue.ellipsoidRenderLatitudeSinMinMax));let Nn=0,Zi=1;return Vt&&(St.ELLIPSOID_HAS_SHAPE_BOUNDS_LATITUDE=!0,ce>d&&(Nn=(s.y-r.y)/ce,Zi=(r.y-b.y)/ce)),Ue.ellipsoidLocalToShapeUvScale=m.fromElements(ln,Nn,Gt,Ue.ellipsoidLocalToShapeUvScale),this._localToShapeUvTranslate=m.fromElements(st,Zi,0,this._localToShapeUvTranslate),this._shaderMaximumIntersectionsLength=jt,!0};var Y1t=new pe,w1t=new m,M1t=new F,LEe=new q;ph.prototype.updateViewTransforms=function(e){let t=this._shaderUniforms,n=this._ellipsoid,i=e.camera.positionWC,o=n.cartesianToCartographic(i,Y1t);m.fromElements(o.longitude,o.latitude,o.height,t.cameraPositionCartographic);let r=m.fromRadians(o.longitude,o.latitude,0,n,w1t);t.ellipsoidCurvatureAtLatitude=n.getLocalCurvature(r,t.ellipsoidCurvatureAtLatitude);let s=dt.eastNorthUpToFixedFrame(r,n,M1t),a=F.getRotation(s,LEe),c=e.context.uniformState.viewRotation,d=q.multiply(c,a,LEe);t.ellipsoidEcToEastNorthUp=q.transpose(d,t.ellipsoidEcToEastNorthUp)};var NEe=new ae;ph.prototype.computeOrientedBoundingBoxForTile=function(e,t,n,i,o){let r=1/Math.pow(2,e),s=t*r,a=(t+1)*r,c=n*r,d=(n+1)*r,u=i*r,h=(i+1)*r,p=ae.subsection(this._rectangle,s,c,a,d,NEe),b=W.lerp(this._minimumHeight,this._maximumHeight,u),f=W.lerp(this._minimumHeight,this._maximumHeight,h);return tte(p,b,f,this._ellipsoid,this._translation,this._rotation,o)};var k1t=new M,U1t=new M,zM=new M,WEe=new M,vEe=new M,HM=new M;function D1t(e,t,n,i){let o=M.abs(e,k1t),r=M.fromElements(1/t.x,1/t.y,U1t),s=M.fromElements(Math.SQRT1_2,Math.SQRT1_2,zM),a=M.multiplyComponents(t,s,WEe),c=M.fromElements(n.x*s.x*s.x*s.x,n.y*s.y*s.y*s.y,vEe);for(let d=0;d<3;++d){let u=M.magnitude(M.subtract(a,c,HM)),h=M.normalize(M.subtract(o,c,HM),HM),p=M.multiplyByScalar(h,u,HM);s=M.multiplyComponents(M.add(p,c,zM),r,zM),s=M.normalize(M.clamp(s,M.ZERO,M.ONE,zM),zM),a=M.multiplyComponents(t,s,WEe),c=M.fromElements(n.x*s.x*s.x*s.x,n.y*s.y*s.y*s.y,vEe)}return m.fromElements(Math.sign(e.x)*a.x,Math.sign(e.y)*a.y,M.magnitude(M.subtract(a,c,HM)),i)}var O1t=new M,FEe=new M,B1t=new m,IEe=new M;ph.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=M.fromElements(d,e.z,FEe),h=D1t(u,M.fromElements(i.x,i.z,O1t),o,B1t),p=M.normalize(M.fromElements(h.x*r.x,h.y*r.z,IEe),IEe),b=Math.atan2(p.y,p.x),f=M.magnitude(u)<M.magnitude(h)?-1:1,y=M.subtract(u,h,FEe),_=f*M.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,m.fromElements(n,b,_,t)};var PEe=new m,XEe=new m,z1t=new m;ph.prototype.computeOrientedBoundingBoxForSample=function(e,t,n,i){let o=1/Math.pow(2,e.level),r=m.divideComponents(m.ONE,t,PEe),s=m.multiplyByScalar(r,o,PEe),a=m.multiplyByScalar(m.fromElements(e.x+n.x,e.y+n.y,e.z+n.z,XEe),o,XEe),c=m.add(a,s,z1t),d=ae.subsection(this._rectangle,a.x,a.y,c.x,c.y,NEe),u=W.lerp(this._minimumHeight,this._maximumHeight,a.z),h=W.lerp(this._minimumHeight,this._maximumHeight,c.z);return tte(d,u,h,this._ellipsoid,this._translation,this._rotation,i)};function tte(e,t,n,i,o,r,s){return s=$t.fromRectangle(e,t,n,i,s),s.center=m.add(s.center,o,s.center),s.halfAxes=q.multiply(s.halfAxes,r,s.halfAxes),s}ph.DefaultMinBounds=Object.freeze(new m(-W.PI,-W.PI_OVER_TWO,-ie.WGS84.minimumRadius));ph.DefaultMaxBounds=Object.freeze(new m(W.PI,W.PI_OVER_TWO,10*ie.WGS84.maximumRadius));var ZA=ph;var Kd={BOX:"BOX",ELLIPSOID:"ELLIPSOID",CYLINDER:"CYLINDER"};Kd.getMinBounds=function(e){switch(e){case Kd.BOX:return SA.DefaultMinBounds;case Kd.ELLIPSOID:return ZA.DefaultMinBounds;case Kd.CYLINDER:return AA.DefaultMinBounds}};Kd.getMaxBounds=function(e){switch(e){case Kd.BOX:return SA.DefaultMaxBounds;case Kd.ELLIPSOID:return ZA.DefaultMaxBounds;case Kd.CYLINDER:return AA.DefaultMaxBounds}};Kd.getShapeConstructor=function(e){switch(e){case Kd.BOX:return SA;case Kd.ELLIPSOID:return ZA;case Kd.CYLINDER:return AA}};Object.freeze(Kd);var fc=Kd;var Yco=x(T(),1);var Bao=x(T(),1);function zf(e){this._comparator=e.comparator,this._maximumLength=e.maximumLength,this._array=l(e.maximumLength)?new Array(e.maximumLength):[],this._length=0}Object.defineProperties(zf.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}}});zf.prototype.clone=function(){let e=this._maximumLength,t=this._comparator,n=this._array,i=this._length,o=new zf({comparator:t,maximumLength:e});o._length=i;for(let r=0;r<i;r++)o._array[r]=n[r];return o};zf.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};zf.prototype.resort=function(){let e=this._length;for(let t=0;t<e;t++)YEe(this,t)};zf.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++,YEe(this,i),t};zf.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],wEe(this,0)),this._array[e-1]=void 0,t};zf.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=nte(this,1,2)?1:2;t=this._array[n],this._array[n]=this._array[e-1],e>=4&&wEe(this,n)}return this._array[e-1]=void 0,t};zf.prototype.getMinimum=function(){if(this._length!==0)return this._array[0]};zf.prototype.getMaximum=function(){let e=this._length;if(e!==0)return e<=2?this._array[e-1]:this._array[nte(this,1,2)?1:2]};function az(e,t,n){let i=e._array,o=i[t];i[t]=i[n],i[n]=o}function KM(e,t,n){return e._comparator(e._array[t],e._array[n])<0}function nte(e,t,n){return e._comparator(e._array[t],e._array[n])>0}function YEe(e,t){if(t===0)return;let n=Math.floor(W.log2(t+1))%2===0,i=Math.floor((t-1)/2),o=KM(e,t,i);for(o!==n&&(az(e,t,i),t=i);t>=3;){let r=Math.floor((t-3)/4);if(KM(e,t,r)!==o)break;az(e,t,r),t=r}}function wEe(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){KM(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;KM(e,u,r)===i&&(r=u)}}if(KM(e,r,t)===i&&(az(e,r,t),r!==o&&r!==s)){let a=Math.floor((r-1)/2);nte(e,r,a)===i&&az(e,r,a)}t=r}}var Wg=zf;var Hao=x(T(),1),ite=Object.freeze({UNLOADED:0,RECEIVING:1,PROCESSING:2,LOADED:3,FAILED:4,UNAVAILABLE:5});function JM(e,t){this.spatialNode=e,this.keyframe=t,this.state=ite.UNLOADED,this.content=void 0,this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1}JM.prototype.unload=function(){this.content=this.content&&this.content.destroy(),this.spatialNode=void 0,this.state=ite.UNLOADED,this.megatextureIndex=-1,this.priority=-Number.MAX_VALUE,this.highPriorityFrameNumber=-1};JM.priorityComparator=function(e,t){return e.priority-t.priority};JM.searchComparator=function(e,t){return e.keyframe-t.keyframe};JM.LoadState=ite;var Po=JM;var lco=x(T(),1);function y0(e,t,n,i,o=134217728,r){let s=H1t(i),a=K1t(n),c=n*Pt.getSizeInBytes(i),d=y0.get3DTextureDimension(t,c,o,r),u=m.divideComponents(d,t,new m);this.channelCount=n,this.componentType=i,this.textureMemoryByteLength=c*d.x*d.y*d.z,this.tileCounts=m.clone(u,new m),this.voxelCountPerTile=m.clone(t,new m),this.maximumTileCount=u.x*u.y*u.z,this.texture=new iW({context:e,pixelFormat:a,pixelDatatype:s,flipY:!1,width:d.x,height:d.y,depth:d.z,sampler:new Ut({wrapR:un.CLAMP_TO_EDGE,wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:kt.LINEAR,magnificationFilter:ni.LINEAR})}),this.nodes=new Array(this.maximumTileCount);for(let h=0;h<this.maximumTileCount;h++)this.nodes[h]=new J1t(h);for(let h=0;h<this.maximumTileCount;h++){let p=this.nodes[h];p.previousNode=h>0?this.nodes[h-1]:void 0,p.nextNode=h<this.maximumTileCount-1?this.nodes[h+1]:void 0}this.occupiedList=void 0,this.emptyList=this.nodes[0],this.occupiedCount=0,this._nearestSampling=!1}Object.defineProperties(y0.prototype,{nearestSampling:{get:function(){return this._nearestSampling},set:function(e){this._nearestSampling!==e&&(e?this.texture.sampler=Ut.NEAREST:this.texture.sampler=new Ut({wrapR:un.CLAMP_TO_EDGE,wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:kt.LINEAR,magnificationFilter:ni.LINEAR}),this._nearestSampling=e)}}});function H1t(e){if(e===Pt.FLOAT32||e===Pt.FLOAT64)return Oe.FLOAT;if(e===Pt.UINT8)return Oe.UNSIGNED_BYTE}function K1t(e){switch(e){case 1:return Ke.RED;case 2:return Ke.RG;case 3:return Ke.RGB;case 4:return Ke.RGBA}}function J1t(e){this.index=e,this.nextNode=void 0,this.previousNode=void 0}y0.prototype.add=function(e){if(this.isFull())throw new he("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};y0.prototype.remove=function(e){if(e<0||e>=this.maximumTileCount)throw new he("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--};y0.prototype.isFull=function(){return this.emptyList===void 0};y0.get3DTextureDimension=function(e,t,n,i){let{maximum3DTextureSize:o}=Lt;if(m.maximumComponent(e)>o)throw new le("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 le("Not enough texture memory available to create a megatexture with the given tile dimensions.");l(i)?i=Math.min(i,s):i=s;let a=Object.entries(e).sort((u,h)=>h[1]-u[1]),c=a.map(([u,h])=>Math.floor(o/h));for(let u=0;u<3;u++){let h=MEe(c);if(h<i)break;let p=c.slice();p.splice(u,1);let b=p[0]*p[1],f=h-i,y=Math.floor(f/b);c[u]-=y}MEe(c)>s&&(c[2]=Math.floor(s/(c[0]*c[1])));let d=new m;for(let u=0;u<3;u++){let[h,p]=a[u];d[h]=c[u]*p}return d};function MEe(e){return e.reduce((t,n)=>t*n)}y0.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)};y0.prototype.isDestroyed=function(){return!1};y0.prototype.destroy=function(){return this.texture=this.texture&&this.texture.destroy(),me(this)};var jM=y0;var xco=x(T(),1);function bh(e,t,n,i,o,r,s){this.children=void 0,this.parent=o,this.level=e,this.x=t,this.y=n,this.z=i,this.dimensions=m.clone(s),this.keyframeNodes=[],this.renderableKeyframeNodes=[],this.renderableKeyframeNodeLerp=0,this.renderableKeyframeNodePrevious=void 0,this.renderableKeyframeNodeNext=void 0,this.orientedBoundingBox=new $t,this.approximateVoxelSize=0,this.screenSpaceError=0,this.visitedFrameNumber=-1,this.computeBoundingVolumes(r)}var j1t=new m;bh.prototype.computeBoundingVolumes=function(e){this.orientedBoundingBox=e.computeOrientedBoundingBoxForTile(this.level,this.x,this.y,this.z,this.orientedBoundingBox);let t=q.getScale(this.orientedBoundingBox.halfAxes,j1t),n=2*m.maximumComponent(t);this.approximateVoxelSize=n/m.minimumComponent(this.dimensions)};bh.prototype.constructChildNodes=function(e){let{level:t,x:n,y:i,z:o}=this,r=n*2,s=i*2,a=o*2,c=s+1,d=r+1,u=a+1,h=t+1,p=[[h,r,s,a],[h,d,s,a],[h,r,c,a],[h,d,c,a],[h,r,s,u],[h,d,s,u],[h,r,c,u],[h,d,c,u]];this.children=p.map(([b,f,y,_])=>new bh(b,f,y,_,this,e,this.dimensions))};bh.prototype.visibility=function(e,t){let n=this.orientedBoundingBox;return e.cullingVolume.computeVisibilityWithPlaneMask(n,t)};bh.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 kEe={keyframe:0};function QM(e,t){return kEe.keyframe=e,bo(t,kEe,Po.searchComparator)}bh.prototype.computeSurroundingRenderableKeyframeNodes=function(e){let t=this,n=t.level,i=Math.floor(e),o=Math.ceil(e),r,s,a=+Number.MAX_VALUE,c=+Number.MAX_VALUE;for(;l(t);){let{renderableKeyframeNodes:h}=t;if(h.length>=1){let p=Q1t(i,h),b=h[p],f=o===i||i<b.keyframe?p:Math.min(p+1,h.length-1),y=h[f],_=i-b.keyframe,S=UEe(n-t.level,_);S<a&&(a=S,r=b);let A=y.keyframe-o,Z=UEe(n-t.level,A);if(Z<c&&(c=Z,s=y),_===0&&A===0)break}t=t.parent}if(this.renderableKeyframeNodePrevious=r,this.renderableKeyframeNodeNext=s,!l(r)||!l(s))return;let d=r.keyframe,u=s.keyframe;this.renderableKeyframeNodeLerp=d===u?0:W.clamp((e-d)/(u-d),0,1)};function Q1t(e,t){let n=QM(e,t);return n<0?W.clamp(~n-1,0,t.length-1):n}function UEe(e,t){let n=Math.exp(e*4),i=t>=0?1:-200;return e*n+t*i}bh.prototype.isVisited=function(e){return this.visitedFrameNumber===e};bh.prototype.createKeyframeNode=function(e){let t=QM(e,this.keyframeNodes);if(t<0){t=~t;let n=new Po(this,e);this.keyframeNodes.splice(t,0,n)}};bh.prototype.destroyKeyframeNode=function(e,t){let n=e.keyframe,i=QM(n,this.keyframeNodes);if(i<0)throw new he("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=QM(n,this.renderableKeyframeNodes);if(o<0)throw new he("Renderable keyframe node does not exist.");this.renderableKeyframeNodes.splice(o,1)}e.unload()};bh.prototype.addKeyframeNodeToMegatextures=function(e,t){if(e.megatextureIndex!==-1||e.content.metadata.length!==t.length)throw new he("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=QM(e.keyframe,i);if(o>=0)throw new he("Keyframe already renderable");o=~o,i.splice(o,0,e)};bh.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 qM=bh;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],Z=gt.getComponentCount(A),V=c[S];this.megatextures[S]=new jM(t,s,Z,V,i,d),this.textureMemoryByteLength+=this.megatextures[S].textureMemoryByteLength}let u=this.megatextures[0].maximumTileCount;this._simultaneousRequestCount=0,this._debugPrint=!1,this._calculateStatistics=this._primitive._calculateStatistics??!1,this._frameNumber=0;let h=e._shape;this.rootNode=new qM(0,0,0,0,void 0,h,r),this._priorityQueue=new Wg({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,ote(p,1,n-2,0);let b=9,f=2048,y=Math.floor(f/b),_=Math.ceil(u/y);this.internalNodeTexture=new Et({context:t,pixelFormat:Ke.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,flipY:!1,width:f,height:_,sampler:new Ut({minificationFilter:kt.NEAREST,magnificationFilter:ni.NEAREST})}),this.internalNodeTilesPerRow=y,this.internalNodeTexelSizeUv=new M(1/f,1/_),this.leafNodeTexture=void 0,this.leafNodeTilesPerRow=void 0,this.leafNodeTexelSizeUv=new M}Dx.prototype.findKeyframeNode=function(e){return this._keyframeNodesInMegatexture.find(function(t){return t.megatextureIndex===e})};function ote(e,t,n,i){if(t>n)return;let o=Math.floor((t+n)/2);e[o]=i,ote(e,t,o-1,i+1),ote(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,h=(d?2:1)*(u?2:1);this._sampleCount=h;let p=h>=2;if(p&&!l(this.leafNodeTexture)){let Z=Math.floor(512),V=Math.ceil(s/Z);this.leafNodeTexture=new Et({context:r,pixelFormat:Ke.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,flipY:!1,width:1024,height:V,sampler:new Ut({minificationFilter:kt.NEAREST,magnificationFilter:ni.NEAREST})}),this.leafNodeTexelSizeUv=M.fromElements(1/1024,1/V,this.leafNodeTexelSizeUv),this.leafNodeTilesPerRow=Z}else!p&&l(this.leafNodeTexture)&&(this.leafNodeTexture=this.leafNodeTexture.destroy());if(this._keyframeLocation=W.clamp(t,0,a-1),n&&DEe(this,this.rootNode),i)return;this._frameNumber=e.frameNumber;let b=Yi();eEt(this,e),tEt(this,e);let f=Yi();sEt(this,h,c);let y=Yi(),_=o.loadProgress.numberOfListeners>0||o.allTilesLoaded.numberOfListeners>0||o.initialTilesLoaded.numberOfListeners>0;if(this._debugPrint||this._calculateStatistics||_){let S=f-b,A=y-f,Z=y-b;rEt(this,e,S,A,Z)}};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(),me(this)};function DEe(e,t){if(t.computeBoundingVolumes(e._primitive._shape),l(t.children))for(let n=0;n<8;n++){let i=t.children[n];DEe(e,i)}}function q1t(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 $1t(e){return e/(1+e)}function eEt(e,t){let n=e._frameNumber,i=e._priorityQueue;i.reset(),OEe(e.rootNode,Os.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 tEt(e,t){let n=e.megatextures[0],i=n.occupiedCount,o=e._keyframeNodesInMegatexture;o.length=i,o.sort(nEt);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&&q1t(e,u),u.state===Po.LoadState.PROCESSING)){let{content:h}=u;if(h.update(e._primitive,t),!h.ready)continue;if(!iEt(h.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 nEt(e,t){return e.highPriorityFrameNumber===t.highPriorityFrameNumber?t.priority-e.priority:t.highPriorityFrameNumber-e.highPriorityFrameNumber}function iEt(e,t){let n=t._primitive.provider.types.length;if(!Array.isArray(e)||e.length!==n)return!1;let{megatextures:i}=t;for(let o=0;o<n;o++){let{voxelCountPerTile:r,channelCount:s}=i[o],{x:a,y:c,z:d}=r,u=a*c*d,h=e[o],p=u*s;if(h.length!==p)return!1}return!0}function OEe(e,t,n,i){let{camera:o,context:r,pixelRatio:s,frameNumber:a}=i,{positionWC:c,frustum:d}=o,h=r.drawingBufferHeight/s/d.sseDenominator;if(e.computeScreenSpaceError(c,h),t=e.visibility(i,t),t===Os.MASK_OUTSIDE)return;e.visitedFrameNumber=a;let p=n._primitive,b=p._shape,f=p.screenSpaceError,y=n._priorityQueue,_=n._keyframeCount,S=W.clamp(Math.floor(n._keyframeLocation),0,_-2),A=S+1;if(_===1)e.createKeyframeNode(0);else if(e.keyframeNodes.length!==_)for(let v=0;v<_;v++)e.createKeyframeNode(v);let{screenSpaceError:Z,keyframeNodes:V}=e,E=$1t(Z),L=!1;for(let v=0;v<V.length;v++){let I=V[v];I.priority=10*E+oEt(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&&(L=!0)}if(Z<f||!L){e.children=void 0;return}l(e.children)||e.constructChildNodes(b);for(let v=0;v<8;v++){let I=e.children[v];OEe(I,t,n,i)}}function oEt(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 rEt(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 L=0;L<a;L++){let v=new Array(r).fill(0);c[L]=v,d[L]=0}function h(L){let v=L.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(L.children))for(let I=0;I<8;I++){let X=L.children[I];h(X)}}h(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,Z=Math.round(i*100)/100,V=Math.round(o*100)/100,E=`LOAD: ${A} | OCT: ${Z} | ALL: ${V}`;console.log(`${_} || ${S} || ${E}`)}var cz={INTERNAL:0,LEAF:1,PACKED_LEAF_FROM_PARENT:2};function sEt(e,t,n){let i=e._primitive._screenSpaceError,o=e._keyframeLocation,r=e._frameNumber,s=t>=2,a=0,c=0,d=[],u=[];function h(b,f,y,_,S){let A=!1;if(l(b.children))for(let Z=0;Z<8;Z++){let V=b.children[Z];V.computeSurroundingRenderableKeyframeNodes(o),V.isRenderable(r)&&(A=!0)}if(A){d[S]=cz.INTERNAL<<16|f,d[y]=_,a++,_=f,S=_*9+1;for(let Z=0;Z<8;Z++){let V=b.children[Z];f=a,y=f*9+0,h(V,f,y,_,S+Z)}}else{if(e._primitive.tileVisible.raiseEvent(),s){let Z=c*5,V=b.renderableKeyframeNodePrevious,E=b.level-V.spatialNode.level,L=V.spatialNode.parent,v=l(L)?L.renderableKeyframeNodePrevious:V,I=aEt(b,i,n),X=E,N=1,g=V.megatextureIndex,C=v.megatextureIndex;u[Z+0]=I,u[Z+1]=X,u[Z+2]=N,u[Z+3]=g,u[Z+4]=C,d[S]=cz.LEAF<<16|c}else{let Z=b.renderableKeyframeNodePrevious,E=b.level-Z.spatialNode.level===0?cz.LEAF:cz.PACKED_LEAF_FROM_PARENT;d[S]=E<<16|Z.megatextureIndex}c++}}let p=e.rootNode;p.computeSurroundingRenderableKeyframeNodes(o),p.isRenderable(r)&&h(p,0,0,0,0),cEt(d,9,e.internalNodeTilesPerRow,e.internalNodeTexture),s&&lEt(u,2,e.leafNodeTilesPerRow,e.leafNodeTexture)}function aEt(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 cEt(e,t,n,i){let o=Ke.componentsLength(i.pixelFormat),r=Math.ceil(e.length/t),s=Math.max(1,t*Math.min(r,n)),a=Math.max(1,Math.ceil(r/n)),c=new Uint8Array(s*a*o);for(let h=0;h<e.length;h++){let p=e[h],b=h*o;for(let f=0;f<o;f++)c[b+f]=p>>>f*8&255}let u={source:{arrayBufferView:c,width:s,height:a},xOffset:0,yOffset:0};i.copyFrom(u)}function lEt(e,t,n,i){let o=Ke.componentsLength(i.pixelFormat),r=5,s=Math.ceil(e.length/r),a=Math.max(1,t*Math.min(s,n)),c=Math.max(1,Math.ceil(s/n)),d=new Uint8Array(a*c*o);for(let p=0;p<s;p++){let b=e[p*r+0],f=e[p*r+1],y=e[p*r+2],_=e[p*r+3],S=e[p*r+4],A=W.clamp(Math.floor(65536*b),0,65535);d[p*8+0]=A>>>0&255,d[p*8+1]=A>>>8&255,d[p*8+2]=f&255,d[p*8+3]=y&255,d[p*8+4]=_>>>0&255,d[p*8+5]=_>>>8&255,d[p*8+6]=S>>>0&255,d[p*8+7]=S>>>8&255}let h={source:{arrayBufferView:d,width:a,height:c},xOffset:0,yOffset:0};i.copyFrom(h)}var $M=Dx;function x0(e){e=e??B.EMPTY_OBJECT,this._ready=!1,this._provider=e.provider??x0.DefaultProvider,this._traversal=void 0,this._statistics=new gf,this._calculateStatistics=e.calculateStatistics??!1,this._shape=void 0,this._shapeVisible=!1,this._dimensions=new m,this._inputDimensions=new m,this._paddingBefore=new m,this._paddingAfter=new m,this._availableLevels=1,this._minBounds=new m,this._minBoundsOld=new m,this._maxBounds=new m,this._maxBoundsOld=new m,this._minClippingBounds=new m,this._minClippingBoundsOld=new m,this._maxClippingBounds=new m,this._maxClippingBoundsOld=new m,this._verticalExaggeration=1,this._verticalExaggerationRelativeHeight=0,this._clippingPlanes=void 0,this._clippingPlanesState=0,this._clippingPlanesEnabled=!1,this._modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this._modelMatrixOld=F.clone(this._modelMatrix),this._customShader=e.customShader??x0.DefaultCustomShader,this._customShaderCompilationEvent=new _e,this._shaderDirty=!0,this._drawCommand=void 0,this._drawCommandPick=void 0,this._pickId=void 0,this._clock=e.clock,this._transformPositionLocalToWorld=new F,this._transformPositionWorldToLocal=new F,this._transformPlaneLocalToView=new F,this._transformDirectionWorldToLocal=new q,this._nearestSampling=!1,this._levelBlendFactor=0,this._stepSizeMultiplier=1,this._depthTest=!0,this._useLogDepth=void 0,this._screenSpaceError=4,this._debugPolylines=new lf,this._debugDraw=!1,this._disableRender=!1,this._disableUpdate=!1,this._uniforms={octreeInternalNodeTexture:void 0,octreeInternalNodeTilesPerRow:0,octreeInternalNodeTexelSizeUv:new M,octreeLeafNodeTexture:void 0,octreeLeafNodeTilesPerRow:0,octreeLeafNodeTexelSizeUv:new M,megatextureTextures:[],megatextureTileCounts:new m,dimensions:new m,inputDimensions:new m,paddingBefore:new m,paddingAfter:new m,transformPositionViewToLocal:new F,transformDirectionViewToLocal:new q,cameraPositionLocal:new m,cameraDirectionLocal:new m,cameraTileCoordinates:new se,cameraTileUv:new m,ndcSpaceAxisAlignedBoundingBox:new se,clippingPlanesTexture:void 0,clippingPlanesMatrix:new F,renderBoundPlanesTexture:void 0,stepSize:0,pickColor:new U},this._shapeDefinesOld={},this._uniformMap={};let t=this._uniforms,n=this._uniformMap;for(let o in t)if(t.hasOwnProperty(o)){let r=`u_${o}`;n[r]=function(){return t[o]}}this.tileLoad=new _e,this.tileVisible=new _e,this.tileFailed=new _e,this.tileUnload=new _e,this.loadProgress=new _e,this.allTilesLoaded=new _e,this.initialTilesLoaded=new _e;let i=this._provider;dEt(this,i)}function dEt(e,t){let{shape:n,minBounds:i=fc.getMinBounds(n),maxBounds:o=fc.getMaxBounds(n)}=t;e.minBounds=i,e.maxBounds=o,e.minClippingBounds=i.clone(),e.maxClippingBounds=o.clone(),zEe(e);let r=fc.getShapeConstructor(n);e._shape=new r,e._shapeVisible=HEe(e)}Object.defineProperties(x0.prototype,{ready:{get:function(){return this._ready}},provider:{get:function(){return this._provider}},boundingSphere:{get:function(){return this._shape.boundingSphere}},orientedBoundingBox:{get:function(){return this._shape.orientedBoundingBox}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=F.clone(e,this._modelMatrix)}},shape:{get:function(){return this._provider.shape}},dimensions:{get:function(){return this._dimensions}},inputDimensions:{get:function(){return this._inputDimensions}},paddingBefore:{get:function(){return this._paddingBefore}},paddingAfter:{get:function(){return this._paddingAfter}},minimumValues:{get:function(){return this._provider.minimumValues}},maximumValues:{get:function(){return this._provider.maximumValues}},show:{get:function(){return!this._disableRender},set:function(e){this._disableRender=!e}},disableUpdate:{get:function(){return this._disableUpdate},set:function(e){this._disableUpdate=e}},debugDraw:{get:function(){return this._debugDraw},set:function(e){this._debugDraw=e}},depthTest:{get:function(){return this._depthTest},set:function(e){this._depthTest!==e&&(this._depthTest=e,this._shaderDirty=!0)}},nearestSampling:{get:function(){return this._nearestSampling},set:function(e){this._nearestSampling=e}},levelBlendFactor:{get:function(){return this._levelBlendFactor},set:function(e){this._levelBlendFactor=W.clamp(e,0,1)}},screenSpaceError:{get:function(){return this._screenSpaceError},set:function(e){this._screenSpaceError=e}},stepSize:{get:function(){return this._stepSizeMultiplier},set:function(e){this._stepSizeMultiplier=e}},minBounds:{get:function(){return this._minBounds},set:function(e){this._minBounds=m.clone(e,this._minBounds)}},maxBounds:{get:function(){return this._maxBounds},set:function(e){this._maxBounds=m.clone(e,this._maxBounds)}},minClippingBounds:{get:function(){return this._minClippingBounds},set:function(e){this._minClippingBounds=m.clone(e,this._minClippingBounds)}},maxClippingBounds:{get:function(){return this._maxClippingBounds},set:function(e){this._maxClippingBounds=m.clone(e,this._maxClippingBounds)}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){as.setOwner(e,this,"_clippingPlanes")}},customShader:{get:function(){return this._customShader},set:function(e){if(this._customShader!==e){let t=this._uniformMap,i=this._customShader.uniformMap;for(let o in i)i.hasOwnProperty(o)&&delete t[o];l(e)?this._customShader=e:this._customShader=x0.DefaultCustomShader,this._shaderDirty=!0}}},customShaderCompilationEvent:{get:function(){return this._customShaderCompilationEvent}},statistics:{get:function(){return this._statistics}}});var uEt=new se,mEt=new se,hEt=new F,fEt=new F,pEt=new m,bEt=new se;x0.prototype.update=function(e){let t=this._provider,n=this._uniforms;this._customShader.update(e);let i=e.context;if(!this._ready){AEt(this,t,i),e.afterRender.push(()=>(this._ready=!0,!0));return}let o=zEe(this),r=SEt(this,e);if((o||r)&&(this._shapeVisible=HEe(this),FEt(this)&&(this._shaderDirty=!0)),!this._shapeVisible)return;this._shape.updateViewTransforms(e);let s=IEt(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&&UEt(this,e),this._disableRender))return;this._useLogDepth!==e.useLogDepth&&(this._useLogDepth=e.useLogDepth,this._shaderDirty=!0),PEt(this,e)&&(this._shaderDirty=!0);let u=a.leafNodeTexture;l(u)&&(n.octreeLeafNodeTexture=a.leafNodeTexture,n.octreeLeafNodeTexelSizeUv=M.clone(a.leafNodeTexelSizeUv,n.octreeLeafNodeTexelSizeUv),n.octreeLeafNodeTilesPerRow=a.leafNodeTilesPerRow),this._shaderDirty&&(UM(this,i),this._shaderDirty=!1);let h=i.uniformState.viewProjection,{orientedBoundingBox:p}=this._shape,b=YEt(p,h,mEt);if(b.x===1||b.y===1||b.z===-1||b.w===-1)return;n.ndcSpaceAxisAlignedBoundingBox=se.clone(b,n.ndcSpaceAxisAlignedBoundingBox);let y=i.uniformState.inverseView,_=F.multiplyTransformation(this._transformPositionWorldToLocal,y,n.transformPositionViewToLocal);this._transformPlaneLocalToView=F.transpose(_,this._transformPlaneLocalToView);let S=i.uniformState.inverseViewRotation;n.transformDirectionViewToLocal=q.multiply(this._transformDirectionWorldToLocal,S,n.transformDirectionViewToLocal),n.cameraPositionLocal=F.multiplyByPoint(this._transformPositionWorldToLocal,e.camera.positionWC,n.cameraPositionLocal),n.cameraDirectionLocal=q.multiplyByVector(this._transformDirectionWorldToLocal,e.camera.directionWC,n.cameraDirectionLocal);let A=xEt(this,n.cameraPositionLocal,bEt);n.cameraTileCoordinates=se.fromElements(Math.floor(A.x),Math.floor(A.y),Math.floor(A.z),A.w,n.cameraTileCoordinates),n.cameraTileUv=m.fromElements(A.x-Math.floor(A.x),A.y-Math.floor(A.y),A.z-Math.floor(A.z),n.cameraTileUv),n.stepSize=this._stepSizeMultiplier,gEt(this),yEt(this,e);let Z=e.passes.pick?this._drawCommandPick:e.passes.pickVoxel?this._drawCommandPickVoxel:this._drawCommand;Z.boundingVolume=this._shape.boundingSphere,e.commandList.push(Z)};function gEt(e){let{megatextures:t}=e._traversal;for(let n=0;n<t.length;++n)t[n].nearestSampling=e._nearestSampling}function yEt(e,t){let n=e._uniforms,{renderBoundPlanes:i}=e._shape;l(i)&&(i.update(t,e._transformPlaneLocalToView),n.renderBoundPlanesTexture=i.texture)}function xEt(e,t,n){let i=e._shape.convertLocalToShapeUvSpace(t,pEt),o=e._availableLevels,r=2**(o-1);return se.fromElements(i.x*r,i.y*r,i.z*r,o-1,n)}var TEt=new m,rte=new m,_Et=new pe;function SEt(e,t){let{verticalExaggeration:n,verticalExaggerationRelativeHeight:i}=t;return e._verticalExaggeration===n&&e._verticalExaggerationRelativeHeight===i?!1:(e._verticalExaggeration=n,e._verticalExaggerationRelativeHeight=i,!0)}function AEt(e,t,n){let i=e._uniforms;e._pickId=n.createPickId({primitive:e}),i.pickColor=U.clone(e._pickId.color,i.pickColor);let{shaderDefines:o,shaderUniforms:r}=e._shape;e._shapeDefinesOld=ze(o,!0);let s=e._uniformMap;for(let c in r)if(r.hasOwnProperty(c)){let d=`u_${c}`;s[d]=function(){return r[c]}}if(e._dimensions=m.clone(t.dimensions,e._dimensions),i.dimensions=m.clone(e._dimensions,i.dimensions),e._paddingBefore=m.clone(t.paddingBefore??m.ZERO,e._paddingBefore),i.paddingBefore=m.clone(e._paddingBefore,i.paddingBefore),e._paddingAfter=m.clone(t.paddingAfter??m.ZERO,e._paddingAfter),i.paddingAfter=m.clone(e._paddingAfter,i.paddingAfter),e._inputDimensions=m.add(e._dimensions,e._paddingBefore,e._inputDimensions),e._inputDimensions=m.add(e._inputDimensions,e._paddingAfter,e._inputDimensions),t.metadataOrder===g0.Y_UP){let c=e._inputDimensions.y;e._inputDimensions.y=e._inputDimensions.z,e._inputDimensions.z=c}i.inputDimensions=m.clone(e._inputDimensions,i.inputDimensions),e._availableLevels=t.availableLevels??1;let a=t.keyframeCount??1;e._traversal=new $M(e,n,a),e.statistics.texturesByteLength=e._traversal.textureMemoryByteLength,vEt(e._traversal,i)}function zEe(e){return e9(e,"_modelMatrix","_modelMatrixOld")+e9(e,"_minBounds","_minBoundsOld")+e9(e,"_maxBounds","_maxBoundsOld")+e9(e,"_minClippingBounds","_minClippingBoundsOld")+e9(e,"_maxClippingBounds","_maxClippingBoundsOld")>0}function e9(e,t,n){let i=e[t],o=e[n],r=!i.equals(o);return r&&i.clone(o),r?1:0}var ZEt=new m,CEt=new m,VEt=new m,REt=new m,EEt=new F,GEt=new F;function HEe(e){let t=e._verticalExaggeration,n=e._verticalExaggerationRelativeHeight,i=m.clone(e._minBounds,ZEt),o=m.clone(e._maxBounds,CEt),r=m.clone(e._minClippingBounds,VEt),s=m.clone(e._maxClippingBounds,REt),a=F.clone(e._modelMatrix,EEt);if(e.shape===fc.ELLIPSOID)i.z=ao.getHeight(e._minBounds.z,t,n),o.z=ao.getHeight(e._maxBounds.z,t,n),r.z=ao.getHeight(e._minClippingBounds.z,t,n),s.z=ao.getHeight(e._maxClippingBounds.z,t,n);else{let f=m.fromElements(1,1,t,TEt);F.multiplyByScale(a,f,a),F.multiplyByTranslation(a,WEt(e),a)}let c=e._provider,d=c.shapeTransform??F.IDENTITY,u=c.globalTransform??F.IDENTITY,h=F.multiplyTransformation(u,a,GEt);F.multiplyTransformation(h,d,h);let p=e._shape;return p.update(h,i,o,r,s)?(e._transformPositionLocalToWorld=F.clone(p.shapeTransform,e._transformPositionLocalToWorld),e._transformPositionWorldToLocal=F.inverse(e._transformPositionLocalToWorld,e._transformPositionWorldToLocal),e._transformDirectionWorldToLocal=F.getMatrix3(e._transformPositionWorldToLocal,e._transformDirectionWorldToLocal),!0):!1}var LEt=new m;function WEt(e){let t=e._verticalExaggeration,n=e._verticalExaggerationRelativeHeight,{shapeTransform:i=F.IDENTITY,globalTransform:o=F.IDENTITY}=e._provider,r=F.getTranslation(i,rte),s=F.multiplyByPoint(e._modelMatrix,r,rte),a=F.multiplyByPoint(o,s,rte),d=ie.WGS84.cartesianToCartographic(a,_Et),u=0;l(d)&&(u=d.height);let h=ao.getHeight(u,t,n);return m.fromElements(0,0,(h-u)/t,LEt)}function vEt(e,t){t.octreeInternalNodeTexture=e.internalNodeTexture,t.octreeInternalNodeTexelSizeUv=M.clone(e.internalNodeTexelSizeUv,t.octreeInternalNodeTexelSizeUv),t.octreeInternalNodeTilesPerRow=e.internalNodeTilesPerRow;let{megatextures:n}=e,i=n[0];t.megatextureTextures=new Array(n.length);for(let o=0;o<n.length;o++)t.megatextureTextures[o]=n[o].texture;t.megatextureTileCounts=m.clone(i.tileCounts,t.megatextureTileCounts)}function FEt(e){let{shaderDefines:t}=e._shape,n=Object.keys(t).some(i=>t[i]!==e._shapeDefinesOld[i]);return n&&(e._shapeDefinesOld=ze(t,!0)),n}function IEt(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 PEt(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)}x0.prototype.isDestroyed=function(){return!1};x0.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(),me(this)};var BEe=new Array(new se(-1,-1,-1,1),new se(1,-1,-1,1),new se(-1,1,-1,1),new se(1,1,-1,1),new se(-1,-1,1,1),new se(1,-1,1,1),new se(-1,1,1,1),new se(1,1,1,1)),XEt=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),NEt=new Array(new se,new se,new se,new se,new se,new se,new se,new se);function YEt(e,t,n){let i=F.fromRotationTranslation(e.halfAxes,e.center,hEt),o=F.multiply(t,i,fEt),r=+Number.MAX_VALUE,s=-Number.MAX_VALUE,a=+Number.MAX_VALUE,c=-Number.MAX_VALUE,d,u=NEt,h=BEe.length;for(d=0;d<h;d++)F.multiplyByVector(o,BEe[d],u[d]);for(d=0;d<h;d++){let p=u[d];if(p.z>=-p.w){let b=p.x/p.w,f=p.y/p.w;r=Math.min(r,b),s=Math.max(s,b),a=Math.min(a,f),c=Math.max(c,f)}else for(let b=0;b<3;b++){let f=XEt[d*3+b],y=u[f];if(y.z>=-y.w){let _=p.z+p.w,S=y.z+y.w,A=_/(_-S),Z=se.lerp(p,y,A,uEt),V=Z.x/Z.w,E=Z.y/Z.w;r=Math.min(r,V),s=Math.max(s,V),a=Math.min(a,E),c=Math.max(c,E)}}}return r=W.clamp(r,-1,1),a=W.clamp(a,-1,1),s=W.clamp(s,-1,1),c=W.clamp(c,-1,1),n=se.fromElements(r,a,s,c,n),n}var ste=3e7,wEt=new m(ste,0,0),MEt=new m(0,ste,0),kEt=new m(0,0,ste);function UEt(e,t){let n=e._traversal,i=e._debugPolylines;i.removeAll();function o(c,d,u,h){i.add({positions:[c,d],width:h,material:Bi.fromType("Color",{color:u})})}function r(c,d,u){let h=c.computeCorners();o(h[0],h[1],d,u),o(h[2],h[3],d,u),o(h[4],h[5],d,u),o(h[6],h[7],d,u),o(h[0],h[2],d,u),o(h[4],h[6],d,u),o(h[1],h[3],d,u),o(h[5],h[7],d,u),o(h[0],h[4],d,u),o(h[2],h[6],d,u),o(h[1],h[5],d,u),o(h[3],h[7],d,u)}function s(c){if(!n.isRenderable(c))return;let d=c.level,h=Math.max(1,5/Math.pow(2,d)),b=[U.RED,U.LIME,U.BLUE][d%3];if(r(c.orientedBoundingBox,b,h),l(c.children))for(let f=0;f<8;f++)s(c.children[f])}r(e._shape.orientedBoundingBox,U.WHITE,5),s(n.rootNode);let a=10;o(m.ZERO,wEt,U.RED,a),o(m.ZERO,MEt,U.LIME,a),o(m.ZERO,kEt,U.BLUE,a),i.update(t)}x0.DefaultCustomShader=new TA({fragmentShaderText:`void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
{
material.diffuse = vec3(1.0);
material.alpha = 1.0;
}`});function KEe(){this.ready=!0,this.shape=fc.BOX,this.dimensions=new m(1,1,1),this.names=["data"],this.types=[gt.SCALAR],this.componentTypes=[Pt.FLOAT32],this.maximumTileCount=1}KEe.prototype.requestData=function(e){if((l(e)?e.tileLevel??0:0)>=1)return;let n=new _A({metadata:[new Float32Array(1)]});return Promise.resolve(n)};x0.DefaultProvider=new KEe;var Ox=x0;var glo=x(T(),1);function DEt(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 t9=DEt;var xlo=x(T(),1);function OEt(e,t,n,i,o){this.schemaId=e,this.className=t,this.propertyName=n,this.classProperty=i,this.metadataProperty=o}var n9=OEt;var Slo=x(T(),1);function BEt(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 i9=BEt;var dz=function(e){return function(){e.frameState.afterRender.push(function(){e.requestRender()})}};function gi(e){e=e??B.EMPTY_OBJECT;let t=e.canvas,n=e.creditContainer,i=e.creditViewport,o=e.contextOptions instanceof tW;if(o)this._context=e.contextOptions.createSceneContext(t);else{let d=ze(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=zn(),this._jobScheduler=new Vw,this._frameState=new Zw(r,new hw(n,"\u2022",i),this._jobScheduler),this._frameState.scene3DOnly=e.scene3DOnly??!1,this._removeCreditContainer=!s,this._creditContainer=n,this._canvas=t,this._computeEngine=new K1(r),this._ellipsoid=e.ellipsoid??ie.default,this._globe=void 0,this._globeTranslucencyState=new Cw,this._primitives=new td({countReferences:o}),this._groundPrimitives=new td({countReferences:o}),this._globeHeight=void 0,this._globeHeightDirty=!0,this._cameraUnderground=!1,this._removeUpdateHeightCallback=void 0,this._logDepthBuffer=gi.defaultLogDepthBuffer&&r.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new pA,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=e.orderIndependentTranslucency??!0,this._executeOITFunction=void 0,this._depthPlane=new _w(e.depthPlaneEllipsoidOffset),this._clearColorCommand=new si({color:new U,stencil:0,owner:this}),this._depthClearCommand=new si({depth:1,owner:this}),this._stencilClearCommand=new si({stencil:0}),this._classificationStencilClearCommand=new si({stencil:0,renderState:De.fromCache({stencilMask:Ot.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._transitioner=new pM(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 ZM,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 Aw,this.fog.enabled=ie.WGS84.equals(this._ellipsoid),ie.WGS84.equals(this._ellipsoid)||(To.DEFAULT_VIEW_RECTANGLE=ae.fromDegrees(-45,-45,45,45)),this._shadowMapCamera=new To(this),this.shadowMap=new Zg({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 UR,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new mM,this._brdfLutGenerator=new aw,this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new xM(this),this._cameraUnderground=!1,this._mapMode2D=e.mapMode2D??sd.INFINITE_SCROLL,this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostProcessSelected:!1,useWebVR:!1},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=e.requestRenderMode??!1,this._renderRequested=!0,this.maximumRenderTimeChange=e.maximumRenderTimeChange??0,this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=Mc.requestCompletedEvent.addEventListener(dz(this)),this._removeTaskProcessorListenerCallback=Hn.taskCompletedEvent.addEventListener(dz(this)),this._removeGlobeCallbacks=[],this._removeTerrainProviderReadyListener=void 0;let a=new Qe(0,0,r.drawingBufferWidth,r.drawingBufferHeight),c=new To(this);this._logDepthBuffer&&(c.frustum.near=.1,c.frustum.far=1e10),this.preloadFlightCamera=new To(this),this.preloadFlightCullingVolume=void 0,this._picking=new Dw(this),this._defaultView=new aA(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 w0,this._enableEdgeVisibility=!1,eGe(this,0,Q.now()),this.updateFrameState(),this.initializeFrame()}gi.defaultLogDepthBuffer=!0;function zEt(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(dz(e))),n.push(t.terrainProviderChanged.addEventListener(dz(e)))),e._removeGlobeCallbacks=n}Object.defineProperties(gi.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 Lt.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return Lt.maximumCubeMapSize}},pickPositionSupported:{get:function(){return this._context.depthTexture}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return kh.isSupported(this._context)}},ellipsoid:{get:function(){return this._ellipsoid}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,zEt(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 To(this),l(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new Sw(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,Lt.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}}});gi.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 HEt(e,t){let n=e.pickedMetadataInfo,i=t.pickedMetadataInfo;return n?.schemaId!==i?.schemaId||n?.className!==i?.className||n?.propertyName!==i?.propertyName}function JEe(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=d0.createPickDerivedCommand(e,t,o,c.picking)),i.pickingMetadata&&t.pickMetadataAllowed&&(t.pickedMetadataInfo=i.pickedMetadataInfo,l(t.pickedMetadataInfo)&&(c.pickingMetadata=d0.createPickMetadataDerivedCommand(e,t,o,c.pickingMetadata))),t.pickOnly||(c.depth=d0.createDepthOnlyDerivedCommand(e,t,o,c.depth)),c.originalCommand=t,e._hdr&&(c.hdr=d0.createHdrCommand(t,o,c.hdr),t=c.hdr.command,c=t.derivedCommands),a&&t.receiveShadows&&(c.shadows=Zg.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))}gi.prototype.updateDerivedCommands=function(e){let{derivedCommands:t}=e;if(!l(t))return;let n=this._frameState,{shadowState:i,useLogDepth:o}=this._frameState,r=this._context,s=!1,a=i.lastDirtyTime;e.lastDirtyTime!==a&&(e.lastDirtyTime=a,e.dirty=!0,s=!0);let c=this._hdr,d=l(t.logDepth),u=l(t.hdr),h=l(t.originalCommand),p=o&&!d,b=c&&!u,f=(!o||!c)&&!h,y=n.pickingMetadata&&HEt(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=Zg.createCastDerivedCommand(S,e,s,r,t.shadows)),(d||p)&&(t.logDepth=d0.createLogDepthCommand(e,r,t.logDepth),JEe(this,t.logDepth.command,s)),(h||f)&&JEe(this,e,s)};var KEt=new uh({pass:er.RENDER}),ate=new uh({pass:er.PRELOAD}),cte=new uh({pass:er.PRELOAD_FLIGHT}),JEt=new uh({pass:er.REQUEST_RENDER_MODE_DEFER_CHECK}),jEe=new de,lte;function jEt(e){if(!(e._mode!==re.SCENE3D||!e.globe?.show||e._cameraUnderground||e._globeTranslucencyState.translucent))return jEe.radius=e.ellipsoid.minimumRadius+e.frameState.minimumTerrainHeight,lte=ow.fromBoundingSphere(jEe,e.camera.positionWC,lte),lte}gi.prototype.clearPasses=function(e){e.render=!1,e.pick=!1,e.pickVoxel=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1};function eGe(e,t,n){let i=e._frameState;i.frameNumber=t,i.time=Q.clone(n,i.time)}gi.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=jEt(this),t.minimumTerrainHeight=0,t.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,t.invertClassification=this.invertClassification,t.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof mn||this.camera.frustum instanceof rs),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),UR.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};gi.prototype.isVisible=function(e,t,n){if(!l(t))return!1;let{boundingVolume:i}=t;return!l(i)||!t.cull?!0:e.computeVisibility(i)===zt.OUTSIDE?!1:!l(n)||!t.occlude||!i.isOccluded(n)};var lz=new F(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);lz=F.inverseTransformation(lz,lz);function QEt(e,t,n,i){let o=t._frameState,r=o.context,s=e.boundingVolume;l(t._debugVolume)&&t._debugVolume.destroy();let a=m.clone(s.center);if(o.mode!==re.SCENE3D){a=F.multiplyByPoint(lz,a,a);let f=o.mapProjection,y=f.unproject(a);a=f.ellipsoid.cartographicToCartesian(y)}let c,d,{radius:u}=s;l(u)?(c=wa.createGeometry(new wa({radii:new m(u,u,u),vertexFormat:hn.FLAT_VERTEX_FORMAT})),d=F.fromTranslation(a)):(c=xc.createGeometry(xc.fromDimensions({dimensions:new m(2,2,2),vertexFormat:hn.FLAT_VERTEX_FORMAT})),d=F.fromRotationTranslation(s.halfAxes,a,new F)),t._debugVolume=new Ln({geometryInstances:new Wt({geometry:Un.toWireframe(c),modelMatrix:d,attributes:{color:new Ht(1,0,0,1)}}),appearance:new hn({flat:!0,translucent:!1}),asynchronous:!1});let h=o.commandList,p=o.commandList=[];t._debugVolume.update(o),e=p[0],o.useLogDepth&&(e=d0.createLogDepthCommand(e,r).command);let b;l(i)&&(b=n.framebuffer,n.framebuffer=i),e.execute(r,n),l(b)&&(n.framebuffer=b),o.commandList=h}function Qu(e,t,n,i){let o=t._frameState,r=t._context;if(l(t.debugCommandFilter)&&!t.debugCommandFilter(e))return;if(e instanceof si){e.execute(r,n);return}e.debugShowBoundingVolume&&l(e.boundingVolume)&&QEt(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 QEe(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 tGe(e,t,n){return t.boundingVolume.distanceSquaredTo(n)-e.boundingVolume.distanceSquaredTo(n)}var qEt=new m;function qEe(e,t){let n=m.subtract(e,t,qEt),i=Math.max(0,m.magnitude(n));return i*i}function $Et(e,t,n){let i=e.boundingVolume,o=t.boundingVolume;return qEe(o.center,n)-qEe(i.center,n)}function eGt(e,t,n){return e.boundingVolume.distanceSquaredTo(n)-t.boundingVolume.distanceSquaredTo(n)+W.EPSILON12}function tGt(e,t,n,i,o){a0(i,tGe,e.camera.positionWC),l(o)&&t(o.unclassifiedCommand,e,n);for(let r=0;r<i.length;++r)t(i[r],e,n)}function nGt(e,t,n,i,o){a0(i,eGt,e.camera.positionWC),l(o)&&t(o.unclassifiedCommand,e,n);for(let r=0;r<i.length;++r)t(i[r],e,n)}function iGt(e,t,n){e.context.uniformState.updatePass(Le.VOXELS);let i=n.commands[Le.VOXELS];i.length=n.indices[Le.VOXELS],a0(i,tGe,e.camera.positionWC);for(let o=0;o<i.length;++o)Qu(i[o],e,t)}function oGt(e,t,n){e.context.uniformState.updatePass(Le.GAUSSIAN_SPLATS);let i=n.commands[Le.GAUSSIAN_SPLATS];i.length=n.indices[Le.GAUSSIAN_SPLATS],a0(i,$Et,e.camera.positionWC);for(let o=0;o<i.length;++o)Qu(i[o],e,t)}var rGt=new Mi,sGt=new rd,aGt=new mn,cGt=new rs;function lGt(e){let{frustum:t}=e;return l(t.fov)?t.clone(rGt):l(t.infiniteProjectionMatrix)?t.clone(sGt):l(t.width)?t.clone(aGt):t.clone(cGt)}function dGt(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?tGt:nGt}function uGt(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=dGt(e);o.uniformState.updatePass(Le.TRANSLUCENT);let u=n.commands[Le.TRANSLUCENT];u.length=n.indices[Le.TRANSLUCENT],d(e,Qu,t,u,c)}function mGt(e,t,n){let{translucentTileClassification:i,globeDepth:o}=e._view;if(!(n.indices[Le.CESIUM_3D_TILE_CLASSIFICATION]>0)||!i.isSupported())return;let s=n.commands[Le.TRANSLUCENT];i.executeTranslucentCommands(e,Qu,t,s,o.depthStencilTexture),i.executeClassificationCommands(e,Qu,t,n)}function hGt(e,t,n){e.context.uniformState.updatePass(Le.CESIUM_3D_TILE_EDGES);let i=t.framebuffer;e.context.uniformState.edgeColorTexture=e.context.defaultTexture,e.context.uniformState.edgeIdTexture=e.context.defaultTexture,e.context.uniformState.edgeDepthTexture=e.context.defaultTexture,e._enableEdgeVisibility&&l(e._view)&&l(e._view.edgeFramebuffer)&&(t.framebuffer=e._view.edgeFramebuffer.framebuffer);let o=n.commands[Le.CESIUM_3D_TILE_EDGES],r=n.indices[Le.CESIUM_3D_TILE_EDGES];e._enableEdgeVisibility&&l(e._view)&&l(e._view.edgeFramebuffer)&&e._view.edgeFramebuffer.getClearCommand(new U(0,0,0,0)).execute(e.context,t);for(let s=0;s<r;++s)Qu(o[s],e,t);t.framebuffer=i}function ute(e,t){let{camera:n,context:i,frameState:o}=e,{uniformState:r}=i;r.updateCamera(n);let s=lGt(n);s.near=n.frustum.near,s.far=n.frustum.far;let a=o.passes,c=a.pick||a.pickVoxel;c||fGt(e,t);let{clearGlobeDepth:d,renderTranslucentDepthForPick:u,useDepthPlane:h,useGlobeDepthFramebuffer:p,useInvertClassification:b,usePostProcessSelected:f}=e._environmentState,{globeDepth:y,globeTranslucencyFramebuffer:_,sceneFramebuffer:S,frustumCommandsList:A}=e._view,Z=A.length,V=e._globeTranslucencyState,E=e._depthClearCommand,L=e._stencilClearCommand,v=e._classificationStencilClearCommand,I=e._depthPlane,X=n.position.z;function N(C,R){r.updatePass(R);let G=C.commands[R],P=C.indices[R];for(let Y=0;Y<P;++Y)Qu(G[Y],e,t);return P}function g(C,R){r.updatePass(R);let G=C.commands[R],P=C.indices[R];for(let Y=0;Y<P;++Y)QEe(G[Y],e,t)}for(let C=0;C<Z;++C){let R=Z-C-1,G=A[R];e.mode===re.SCENE2D?(n.position.z=X-G.near+1,s.far=Math.max(1,G.far-G.near),s.near=1,r.update(o),r.updateFrustum(s)):(s.near=R!==0?G.near*e.opaqueFrustumNearOffset:G.near,s.far=G.far,r.updateFrustum(s)),E.execute(i,t),i.stencilBuffer&&L.execute(i,t),V.translucent?(r.updatePass(Le.GLOBE),V.executeGlobeCommands(G,Qu,_,e,t)):N(G,Le.GLOBE),p&&y.executeCopyDepth(i,t),u||(V.translucent?(r.updatePass(Le.TERRAIN_CLASSIFICATION),V.executeGlobeClassificationCommands(G,Qu,_,e,t)):N(G,Le.TERRAIN_CLASSIFICATION)),d&&(E.execute(i,t),h&&I.execute(i,t));let P;if(hGt(e,t,G),e._enableEdgeVisibility&&l(e._view)&&l(e._view.edgeFramebuffer)){let O=e._view.edgeFramebuffer.colorTexture;l(O)?e.context.uniformState.edgeColorTexture=O:e.context.uniformState.edgeColorTexture=e.context.defaultTexture;let k=e._view.edgeFramebuffer.idTexture;l(k)?e.context.uniformState.edgeIdTexture=k:e.context.uniformState.edgeIdTexture=e.context.defaultTexture;let D=e._view.edgeFramebuffer.depthTexture;l(D)?e.context.uniformState.edgeDepthTexture=D:e.context.uniformState.edgeDepthTexture=e.context.defaultTexture}else e.context.uniformState.edgeColorTexture=e.context.defaultTexture,e.context.uniformState.edgeIdTexture=e.context.defaultTexture,e.context.uniformState.edgeDepthTexture=e.context.defaultTexture;if(!b||c||u)P=N(G,Le.CESIUM_3D_TILE),P>0&&(p&&(y.prepareColorTextures(i,d),y.executeUpdateDepth(i,t,y.depthStencilTexture)),u||(P=N(G,Le.CESIUM_3D_TILE_CLASSIFICATION)));else{e._invertClassification.clear(i,t);let O=t.framebuffer;t.framebuffer=e._invertClassification._fbo.framebuffer,P=N(G,Le.CESIUM_3D_TILE),p&&(e._invertClassification.prepareTextures(i),y.executeUpdateDepth(i,t,e._invertClassification._fbo.getDepthStencilTexture())),P=N(G,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(G,Le.CESIUM_3D_TILE_CLASSIFICATION)}if(P>0&&i.stencilBuffer&&L.execute(i,t),iGt(e,t,G),N(G,Le.OPAQUE),oGt(e,t,G),R!==0&&e.mode!==re.SCENE2D&&(s.near=G.near,r.updateFrustum(s)),uGt(e,t,G),mGt(e,t,G),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?G.near*e.opaqueFrustumNearOffset:G.near,s.far=G.far,r.updateFrustum(s),V.translucent?(r.updatePass(Le.GLOBE),V.executeGlobeCommands(G,QEe,_,e,t)):g(G,Le.GLOBE),d&&(E.framebuffer=t.framebuffer,E.execute(i,t),E.framebuffer=void 0),d&&h&&I.execute(i,t),g(G,Le.CESIUM_3D_TILE),g(G,Le.OPAQUE),g(G,Le.TRANSLUCENT),t.framebuffer=Y}}function fGt(e,t){let{context:n,environmentState:i,view:o}=e;if(n.uniformState.updatePass(Le.ENVIRONMENT),l(i.skyBoxCommand)&&Qu(i.skyBoxCommand,e,t),i.isSkyAtmosphereVisible&&Qu(i.skyAtmosphereCommand,e,t),i.isSunVisible&&(i.sunDrawCommand.execute(n,t),e.sunBloom&&!i.useWebVR)){let s;i.useGlobeDepthFramebuffer?s=o.globeDepth.framebuffer:i.usePostProcess?s=o.sceneFramebuffer.framebuffer:s=i.originalFramebuffer,e._sunPostProcess.execute(n),e._sunPostProcess.copy(n,s),t.framebuffer=s}i.isMoonVisible&&i.moonCommand.execute(n,t);let r=e.frameState.panoramaCommandList;for(let s=r.length-1;s>=0;s--){let a=r[s];l(a.shaderProgram)?Qu(r[s],e,t):r.splice(s,1)}}function nGe(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 pGt(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 bGt(e,t,n){let{shadowMapCullingVolume:i,isPointLight:o,passes:r}=n,s=r.length,a=[Le.GLOBE,Le.CESIUM_3D_TILE,Le.OPAQUE,Le.TRANSLUCENT];for(let c=0;c<t.length;++c){let d=t[c];if(e.updateDerivedCommands(d),!(!d.castShadows||a.indexOf(d.pass)<0||!e.isVisible(i,d)))if(o)for(let u=0;u<s;++u)r[u].commandList.push(d);else if(s===1)r[0].commandList.push(d);else{let u=!1;for(let h=s-1;h>=0;--h){let p=r[h].cullingVolume;if(e.isVisible(p,d))r[h].commandList.push(d),u=!0;else if(u)break}}}}function iGe(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;bGt(e,n,c);for(let u=0;u<d.length;++u){let h=c.passes[u],{camera:p,commandList:b}=h;s.updateCamera(p),c.updatePass(r,u);for(let f=0;f<b.length;++f){let y=b[f];s.updatePass(y.pass);let _=y.derivedCommands.shadows.castCommands[a];Qu(_,e,h.passState)}}}}var gGt=new m;gi.prototype.updateAndExecuteCommands=function(e,t){LGt(this,e,t),this._environmentState.useWebVR?yGt(this,e,t):this._frameState.mode!==re.SCENE2D||this._mapMode2D===sd.ROTATE?Bx(!0,this,e):RGt(this,e)};function yGt(e,t){let n=e._view,i=n.camera,r=e._environmentState.renderTranslucentDepthForPick;oGe(e),n.createPotentiallyVisibleSet(e),nGe(e),r||iGe(e);let s=t.viewport;s.x=0,s.y=0,s.width=s.width*.5;let a=To.clone(i,e._cameraVR);a.frustum=i.frustum;let c=i.frustum.near,d=c*(e.focalLength??5),u=e.eyeSeparation??d/30,h=m.multiplyByScalar(a.right,u*.5,gGt);i.frustum.aspectRatio=s.width/s.height;let p=.5*u*c/d;m.add(a.position,h,i.position),i.frustum.xOffset=p,ute(e,t),s.x=s.width,m.subtract(a.position,h,i.position),i.frustum.xOffset=-p,ute(e,t),To.clone(a,i)}var xGt=new pe(Math.PI,W.PI_OVER_TWO),TGt=new m,_Gt=new m,SGt=new F,AGt=new F,ZGt=new m,CGt=new m,VGt=new Qe;function RGt(e,t){let{frameState:n,camera:i}=e,{uniformState:o}=e.context,r=t.viewport,s=Qe.clone(r,VGt);t.viewport=s;let a=xGt,c=TGt;e.mapProjection.project(a,c);let u=m.clone(i.position,_Gt),h=F.clone(i.transform,AGt),p=i.frustum.clone();i._setTransform(F.IDENTITY);let b=F.computeViewportTransformation(s,0,1,SGt),f=i.frustum.projectionMatrix,y=i.positionWC.y,_=m.fromElements(W.sign(y)*c.x-y,0,-i.positionWC.x,ZGt),S=dt.pointToGLWindowCoordinates(f,b,_,CGt);S.x=Math.floor(S.x);let A=s.x,Z=s.width;if(y===0||S.x<=A||S.x>=A+Z)Bx(!0,e,t);else if(Math.abs(A+Z*.5-S.x)<1)s.width=S.x-s.x,i.position.x*=W.sign(i.position.x),i.frustum.right=0,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),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+Z*.5){s.width=S.x-A;let V=i.frustum.right;i.frustum.right=c.x-y,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Bx(!0,e,t),s.x=S.x,s.width=A+Z-S.x,i.position.x=-i.position.x,i.frustum.left=-i.frustum.right,i.frustum.right=V-i.frustum.right*2,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),Bx(!1,e,t)}else{s.x=S.x,s.width=A+Z-S.x;let V=i.frustum.left;i.frustum.left=-c.x-y,n.cullingVolume=i.frustum.computeCullingVolume(i.positionWC,i.directionWC,i.upWC),o.update(n),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(h),m.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),oGe(t),i.createPotentiallyVisibleSet(t),e&&(nGe(t),o||iGe(t)),ute(t,n)}var $Ee=new Os;gi.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 mn||!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(hb.fromGlobeFlags(a)),n.isReadyForAtmosphere=n.isReadyForAtmosphere||!a.show||a._surface._tilesToRender.length>0;else{let S=r.dynamicLighting;s.setDynamicLighting(S),n.isReadyForAtmosphere=!0}n.skyAtmosphereCommand=s.update(e,a),l(n.skyAtmosphereCommand)&&this.updateDerivedCommands(n.skyAtmosphereCommand)}else n.skyAtmosphereCommand=void 0;n.skyBoxCommand=l(this.skyBox)?this.skyBox.update(e,this._hdr):void 0;let _=l(this.sun)?this.sun.update(e,t.passState,this._hdr):void 0;n.sunDrawCommand=l(_)?_.drawCommand:void 0,n.sunComputeCommand=l(_)?_.computeCommand:void 0,n.moonCommand=l(this.moon)?this.moon.update(e):void 0}let d=n.clearGlobeDepth=l(a)&&a.show&&(!a.depthTestAgainstTerrain||this.mode===re.SCENE2D);(n.useDepthPlane=d&&this.mode===re.SCENE3D&&c.useDepthPlane)&&this._depthPlane.update(e),n.renderTranslucentDepthForPick=!1,n.useWebVR=this._useWebVR&&this.mode!==re.SCENE2D&&!o;let h=e.mode===re.SCENE3D&&!c.sunVisibleThroughGlobe?e.occluder:void 0,p=e.cullingVolume,b=$Ee.planes;for(let _=0;_<5;++_)b[_]=p.planes[_];p=$Ee,n.isSkyAtmosphereVisible=l(n.skyAtmosphereCommand)&&n.isReadyForAtmosphere,n.isSunVisible=this.isVisible(p,n.sunDrawCommand,h),n.isMoonVisible=this.isVisible(p,n.moonCommand,h);let f=this.specularEnvironmentMaps,y=this._specularEnvironmentCubeMap;l(f)&&y?.url!==f?(y=y&&y.destroy(),this._specularEnvironmentCubeMap=new kh(f)):!l(f)&&l(y)&&(y.destroy(),this._specularEnvironmentCubeMap=void 0),l(this._specularEnvironmentCubeMap)&&this._specularEnvironmentCubeMap.update(e)};function EGt(e){let t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new l0({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 GGt(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 oGe(e){let t=e._frameState;t.edgeVisibilityRequested=!1,e._groundPrimitives.update(t),e._primitives.update(t),t.edgeVisibilityRequested&&e._enableEdgeVisibility===!1&&(e._enableEdgeVisibility=!0),EGt(e),GGt(e),e._globe&&e._globe.render(t)}function LGt(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 SM:l(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy()),e._sunBloom=e.sunBloom):!l(e.sun)&&l(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy(),e._sunBloom=!1);let u=e._clearColorCommand;U.clone(n,u.color),u.execute(i,t);let h=r.useGlobeDepthFramebuffer=l(s.globeDepth);h&&(s.globeDepth.update(i,t,s.viewport,e.msaaSamples,e._hdr,r.clearGlobeDepth),s.globeDepth.clear(i,t,n));let p=s.oit,b=r.useOIT=!c&&l(p)&&p.isSupported();b&&(p.update(i,t,s.globeDepth.colorFramebufferManager,e._hdr,e.msaaSamples),p.clear(i,t,n),r.useOIT=p.isSupported());let f=e.postProcessStages,y=r.usePostProcess=!c&&(e._hdr||f.length>0||f.ambientOcclusion.enabled||f.fxaa.enabled||f.bloom.enabled);r.usePostProcessSelected=!1,y&&(s.sceneFramebuffer.update(i,s.viewport,e._hdr,e.msaaSamples),s.sceneFramebuffer.clear(i,t,n),f.update(i,o.useLogDepth,e._hdr),f.clear(i),y=r.usePostProcess=f.ready,r.usePostProcessSelected=y&&f.hasSelected),r.isSunVisible&&e.sunBloom&&!d?(t.framebuffer=e._sunPostProcess.update(t),e._sunPostProcess.clear(i,t,n)):h?t.framebuffer=s.globeDepth.framebuffer:y&&(t.framebuffer=s.sceneFramebuffer.framebuffer),l(t.framebuffer)&&u.execute(i,t);let _=r.useInvertClassification=!c&&l(t.framebuffer)&&e.invertClassification;if(!c&&e._enableEdgeVisibility&&s.edgeFramebuffer.update(i,s.viewport,e._hdr),_){let A;if(o.invertClassificationColor.alpha===1&&h&&(A=s.globeDepth.framebuffer),l(A)||i.depthTexture){if(e._invertClassification.previousFramebuffer=A,e._invertClassification.update(i,e.msaaSamples,s.globeDepth.colorFramebufferManager),e._invertClassification.clear(i,t),o.invertClassificationColor.alpha<1&&b){let Z=e._invertClassification.unclassifiedCommand,V=Z.derivedCommands;V.oit=p.createDerivedCommands(Z,i,V.oit)}}else r.useInvertClassification=!1}e._globeTranslucencyState.translucent&&s.globeTranslucencyFramebuffer.updateAndClear(e._hdr,s.viewport,i,t)}gi.prototype.resolveFramebuffers=function(e){let t=this._context,n=this._environmentState,i=this._view,{globeDepth:o,translucentTileClassification:r}=i;l(o)&&o.prepareColorTextures(t);let{useOIT:s,useGlobeDepthFramebuffer:a,usePostProcess:c,originalFramebuffer:d}=n,u=a?o.colorFramebufferManager:void 0,h=i.sceneFramebuffer._colorFramebuffer,p=i.sceneFramebuffer.idFramebuffer;if(s&&(e.framebuffer=c?h.framebuffer:d,i.oit.execute(t,e)),r.hasTranslucentDepth&&r.isSupported()&&r.execute(this,e),c){i.sceneFramebuffer.prepareColorTextures(t);let b=h;a&&!s&&(b=u);let f=this.postProcessStages,y=b.getColorTexture(0),_=p.getColorTexture(0),S=(u??h).getDepthStencilTexture();f.execute(t,y,S,_),f.copy(t,d)}!s&&!c&&a&&(e.framebuffer=d,o.executeCopyColor(t,e))};function WGt(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 vGt(e){if(e.mode===re.MORPHING)return;let t=e.camera.positionCartographic;return e.getHeight(t)}function rGe(e,t,n){let i=Number.NEGATIVE_INFINITY;if(e instanceof td){let o=e.length;for(let r=0;r<o;++r){let s=e.get(r),a=rGe(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}gi.prototype.getHeight=function(e,t){if(!l(e))return;let n=t===tt.CLAMP_TO_TERRAIN||t===tt.RELATIVE_TO_TERRAIN,i=t===tt.CLAMP_TO_3D_TILE||t===tt.RELATIVE_TO_3D_TILE;if(!l(e))return;let o=Number.NEGATIVE_INFINITY;if(!n){let s=rGe(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 dte=new pe;gi.prototype.updateHeight=function(e,t,n){let i=this._ellipsoid,o=b=>{pe.clone(e,dte);let f;l(b)&&(f=b.height),l(f)||(f=this.getHeight(e,n)),l(f)&&(dte.height=f,t(dte))},r=n===tt.CLAMP_TO_TERRAIN||n===tt.RELATIVE_TO_TERRAIN,s=n===tt.CLAMP_TO_3D_TILE||n===tt.RELATIVE_TO_3D_TILE,a;!s&&l(this.globe)&&(a=this.globe._surface.updateHeight(e,o));let c={},d=b=>{if(r||b.isDestroyed()||!b.isCesium3DTileset)return;let f=b.updateHeight(e,o,i);c[b.id]=f};if(!r){let b=this.primitives.length;for(let f=0;f<b;++f){let y=this.primitives.get(f);d(y)}}let u=this.primitives.primitiveAdded.addEventListener(d),h=this.primitives.primitiveRemoved.addEventListener(b=>{b.isDestroyed()||!b.isCesium3DTileset||(l(c[b.id])&&c[b.id](),delete c[b.id])});return()=>{a=a&&a(),Object.values(c).forEach(b=>b()),c={},u(),h()}};function FGt(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}gi.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=vGt(this),this._globeHeightDirty=!1;let e=this.camera.positionCartographic;this._removeUpdateHeightCallback=this.updateHeight(e,t=>{this.isDestroyed()||(this._globeHeight=t.height)})}this._cameraUnderground=FGt(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),l(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};function IGt(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 _g({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 PGt(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 XGt(e){e.primitives.postPassesUpdate(e._frameState),Mc.update()}var NGt=new U;function YGt(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=KEt;let r=e.backgroundColor??U.BLACK;e._hdr&&(r=U.clone(r,NGt),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 w0?m.negate(i.sunDirectionWC,e._shadowMapCamera.direction):m.clone(e.light.direction,e._shadowMapCamera.direction),t.shadowMaps.push(s)),e._computeCommandList.length=0,e._overlayCommandList.length=0;let a=o.viewport;a.x=0,a.y=0,a.width=n.drawingBufferWidth,a.height=n.drawingBufferHeight;let c=o.passState;c.framebuffer=void 0,c.blendingEnabled=void 0,c.scissorTest=void 0,c.viewport=Qe.clone(a,c.viewport),n.beginFrame(),l(e.globe)&&e.globe.beginFrame(t),e.updateEnvironment(),e.updateAndExecuteCommands(c,r),e.resolveFramebuffers(c),c.framebuffer=void 0,pGt(e,c),l(e.globe)&&(e.globe.endFrame(t),e.globe.tilesLoaded||(e._renderRequested=!0)),n.endFrame()}function CA(e,t){try{t(e)}catch(n){if(e._renderError.raiseEvent(e,n),e.rethrowRenderErrors)throw n}}function wGt(e){return e._picking.updateMostDetailedRayPicks(e)}gi.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);eGe(this,o,e),t.newFrame=!0}CA(this,PGt),this.primitives.show&&(CA(this,wGt),CA(this,MGt),CA(this,kGt),i||CA(this,UGt)),this._postUpdate.raiseEvent(this,e),i&&(this._preRender.raiseEvent(this,e),t.creditDisplay.beginFrame(),CA(this,YGt)),IGt(this,i),CA(this,XGt),WGt(this),i&&(this._postRender.raiseEvent(this,e),t.creditDisplay.endFrame())};gi.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)};gi.prototype.requestRender=function(){this._renderRequested=!0};gi.prototype.clampLineWidth=function(e){return Math.max(Lt.minimumAliasedLineWidth,Math.min(e,Lt.maximumAliasedLineWidth))};gi.prototype.pick=function(e,t,n){return this._picking.pick(this,e,t,n,1)[0]};gi.prototype.pickAsync=async function(e,t,n){return(await this._picking.pickAsync(this,e,t,n,1))[0]};gi.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 CM.fromKeyframeNode(o,s,c,a)};gi.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=t9(s,t,n,i);if(!l(a))return;let c=i9(r,n,i);if(!l(c))return;let d=new n9(t,n,i,a,c);return this._picking.pickMetadata(this,e,d)};gi.prototype.pickMetadataSchema=function(e){let t=this.pick(e);return l(t)?t.detail?.model?.structuralMetadata?.schema:void 0};gi.prototype.pickPositionWorldCoordinates=function(e,t){return this._picking.pickPositionWorldCoordinates(this,e,t)};gi.prototype.pickPosition=function(e,t){return this._picking.pickPosition(this,e,t)};gi.prototype.drillPick=function(e,t,n,i){return this._picking.drillPick(this,e,t,n,i)};function MGt(e){let t=e._frameState;ate.camera=t.camera,ate.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,ate)}function kGt(e){let t=e._frameState;if(!t.camera.canPreloadFlight())return;cte.camera=e.preloadFlightCamera,cte.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,cte)}function UGt(e){e.primitives.updateForPass(e._frameState,JEt)}gi.prototype.pickFromRay=function(e,t,n){return this._picking.pickFromRay(this,e,t,n)};gi.prototype.drillPickFromRay=function(e,t,n,i){return this._picking.drillPickFromRay(this,e,t,n,i)};gi.prototype.pickFromRayMostDetailed=function(e,t,n){return this._picking.pickFromRayMostDetailed(this,e,t,n)};gi.prototype.drillPickFromRayMostDetailed=function(e,t,n,i){return this._picking.drillPickFromRayMostDetailed(this,e,t,n,i)};gi.prototype.sampleHeight=function(e,t,n){return this._picking.sampleHeight(this,e,t,n)};gi.prototype.clampToHeight=function(e,t,n,i){return this._picking.clampToHeight(this,e,t,n,i)};gi.prototype.sampleHeightMostDetailed=function(e,t,n){return this._picking.sampleHeightMostDetailed(this,e,t,n)};gi.prototype.clampToHeightMostDetailed=function(e,t,n){return this._picking.clampToHeightMostDetailed(this,e,t,n)};gi.prototype.cartesianToCanvasCoordinates=function(e,t){return no.worldToWindowCoordinates(this,e,t)};gi.prototype.completeMorph=function(){this._transitioner.completeMorph()};gi.prototype.morphTo2D=function(e){e=e??2,this._transitioner.morphTo2D(e,this._ellipsoid)};gi.prototype.morphToColumbusView=function(e){e=e??2,this._transitioner.morphToColumbusView(e,this._ellipsoid)};gi.prototype.morphTo3D=function(e){e=e??2,this._transitioner.morphTo3D(e,this._ellipsoid)};function DGt(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()})}gi.prototype.setTerrain=function(e){return DGt(this,e),e};gi.prototype.isDestroyed=function(){return!1};gi.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),me(this)};var o9=gi;var Euo=x(T(),1);var $do=x(T(),1),jR=`float interpolateByDistance(vec4 nearFarScalar, float distance)
{
float startDistance = nearFarScalar.x;
float startValue = nearFarScalar.y;
float endDistance = nearFarScalar.z;
float endValue = nearFarScalar.w;
float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);
return mix(startValue, endValue, t);
}
void computeAtmosphereScattering(vec3 positionWC, vec3 lightDirection, out vec3 rayleighColor, out vec3 mieColor, out float opacity, out float underTranslucentGlobe)
{
float ellipsoidRadiiDifference = czm_ellipsoidRadii.x - czm_ellipsoidRadii.z;
// Adjustment to the atmosphere radius applied based on the camera height.
float distanceAdjustMin = czm_ellipsoidRadii.x / 4.0;
float distanceAdjustMax = czm_ellipsoidRadii.x;
float distanceAdjustModifier = ellipsoidRadiiDifference / 2.0;
float distanceAdjust = distanceAdjustModifier * clamp((czm_eyeHeight - distanceAdjustMin) / (distanceAdjustMax - distanceAdjustMin), 0.0, 1.0);
// Since atmosphere scattering assumes the atmosphere is a spherical shell, we compute an inner radius of the atmosphere best fit
// for the position on the ellipsoid.
float radiusAdjust = (ellipsoidRadiiDifference / 4.0) + distanceAdjust;
float atmosphereInnerRadius = (length(czm_viewerPositionWC) - czm_eyeHeight) - radiusAdjust;
// Setup the primary ray: from the camera position to the vertex position.
vec3 cameraToPositionWC = positionWC - czm_viewerPositionWC;
vec3 cameraToPositionWCDirection = normalize(cameraToPositionWC);
czm_ray primaryRay = czm_ray(czm_viewerPositionWC, cameraToPositionWCDirection);
underTranslucentGlobe = 0.0;
// Brighten the sky atmosphere under the Earth's atmosphere when translucency is enabled.
#if defined(GLOBE_TRANSLUCENT)
// Check for intersection with the inner radius of the atmopshere.
czm_raySegment primaryRayEarthIntersect = czm_raySphereIntersectionInterval(primaryRay, vec3(0.0), atmosphereInnerRadius + radiusAdjust);
if (primaryRayEarthIntersect.start > 0.0 && primaryRayEarthIntersect.stop > 0.0) {
// Compute position on globe.
vec3 direction = normalize(positionWC);
czm_ray ellipsoidRay = czm_ray(positionWC, -direction);
czm_raySegment ellipsoidIntersection = czm_rayEllipsoidIntersectionInterval(ellipsoidRay, vec3(0.0), czm_ellipsoidInverseRadii);
vec3 onEarth = positionWC - (direction * ellipsoidIntersection.start);
// Control the color using the camera angle.
float angle = dot(normalize(czm_viewerPositionWC), normalize(onEarth));
// Control the opacity using the distance from Earth.
opacity = interpolateByDistance(vec4(0.0, 1.0, czm_ellipsoidRadii.x, 0.0), length(czm_viewerPositionWC - onEarth));
vec3 horizonColor = vec3(0.1, 0.2, 0.3);
vec3 nearColor = vec3(0.0);
rayleighColor = mix(nearColor, horizonColor, exp(-angle) * opacity);
// Set the traslucent flag to avoid alpha adjustment in computeFinalColor funciton.
underTranslucentGlobe = 1.0;
return;
}
#endif
computeScattering(
primaryRay,
length(cameraToPositionWC),
lightDirection,
atmosphereInnerRadius,
rayleighColor,
mieColor,
opacity
);
// Alter the opacity based on how close the viewer is to the ground.
// (0.0 = At edge of atmosphere, 1.0 = On ground)
float cameraHeight = czm_eyeHeight + atmosphereInnerRadius;
float atmosphereOuterRadius = atmosphereInnerRadius + ATMOSPHERE_THICKNESS;
opacity = clamp((atmosphereOuterRadius - cameraHeight) / (atmosphereOuterRadius - atmosphereInnerRadius), 0.0, 1.0);
// Alter alpha based on time of day (0.0 = night , 1.0 = day)
float nightAlpha = (u_radiiAndDynamicAtmosphereColor.z != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0;
opacity *= pow(nightAlpha, 0.5);
}
`;var tuo=x(T(),1),r9=`in vec3 v_outerPositionWC;
uniform vec3 u_hsbShift;
#ifndef PER_FRAGMENT_ATMOSPHERE
in vec3 v_mieColor;
in vec3 v_rayleighColor;
in float v_opacity;
in float v_translucent;
#endif
void main (void)
{
float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(v_outerPositionWC, lightEnum);
vec3 mieColor;
vec3 rayleighColor;
float opacity;
float translucent;
#ifdef PER_FRAGMENT_ATMOSPHERE
computeAtmosphereScattering(
v_outerPositionWC,
lightDirection,
rayleighColor,
mieColor,
opacity,
translucent
);
#else
mieColor = v_mieColor;
rayleighColor = v_rayleighColor;
opacity = v_opacity;
translucent = v_translucent;
#endif
vec4 color = computeAtmosphereColor(v_outerPositionWC, lightDirection, rayleighColor, mieColor, opacity);
#ifndef HDR
color.rgb = czm_pbrNeutralTonemapping(color.rgb);
color.rgb = czm_inverseGamma(color.rgb);
#endif
#ifdef COLOR_CORRECT
const bool ignoreBlackPixels = true;
color.rgb = czm_applyHSBShift(color.rgb, u_hsbShift, ignoreBlackPixels);
#endif
// For the parts of the sky atmosphere that are not behind a translucent globe,
// we mix in the default opacity so that the sky atmosphere still appears at distance.
// This is needed because the opacity in the sky atmosphere is initially adjusted based
// on the camera height.
if (translucent == 0.0) {
color.a = mix(color.b, 1.0, color.a) * smoothstep(0.0, 1.0, czm_morphTime);
}
out_FragColor = color;
}
`;var iuo=x(T(),1),s9=`in vec4 position;
out vec3 v_outerPositionWC;
#ifndef PER_FRAGMENT_ATMOSPHERE
out vec3 v_mieColor;
out vec3 v_rayleighColor;
out float v_opacity;
out float v_translucent;
#endif
void main(void)
{
vec4 positionWC = czm_model * position;
float lightEnum = u_radiiAndDynamicAtmosphereColor.z;
vec3 lightDirection = czm_getDynamicAtmosphereLightDirection(positionWC.xyz, lightEnum);
#ifndef PER_FRAGMENT_ATMOSPHERE
computeAtmosphereScattering(
positionWC.xyz,
lightDirection,
v_rayleighColor,
v_mieColor,
v_opacity,
v_translucent
);
#endif
v_outerPositionWC = positionWC.xyz;
vec4 positionEC = czm_modelView * position;
gl_Position = czm_projection * positionEC;
}
`;function QR(e){e=e??ie.WGS84,this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;let t=1.025,n=m.multiplyByScalar(e.radii,t,new m);this._scaleMatrix=F.fromScale(n),this._modelMatrix=new F,this._command=new et({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new m(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new m(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new m;let i=new m;i.x=e.maximumRadius*t,i.y=e.maximumRadius,i.z=0,this._radiiAndDynamicAtmosphereColor=i;let o=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return o._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return o._hueSaturationBrightness.x=o.hueShift,o._hueSaturationBrightness.y=o.saturationShift,o._hueSaturationBrightness.z=o.brightnessShift,o._hueSaturationBrightness},u_atmosphereLightIntensity:function(){return o.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return o.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return o.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return o.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return o.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return o.atmosphereMieAnisotropy}}}Object.defineProperties(QR.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});QR.prototype.setDynamicLighting=function(e){this._radiiAndDynamicAtmosphereColor.z=e};var mte=new F;QR.prototype.update=function(e,t){if(!this.show)return;let n=e.mode;if(n!==re.SCENE3D&&n!==re.MORPHING||!e.passes.render)return;let i=F.fromRotationTranslation(e.context.uniformState.inverseViewRotation,m.ZERO,mte),o=F.multiplyTransformation(i,to.Y_UP_TO_Z_UP,mte),r=F.multiply(this._scaleMatrix,o,mte);F.clone(r,this._modelMatrix);let s=e.context,a=OGt(this),c=e.globeTranslucencyState.translucent,d=this.perFragmentAtmosphere||c||!l(t)||!t.show,u=this._command;if(!l(u.vertexArray)){let p=wa.createGeometry(new wa({radii:new m(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:Xe.POSITION_ONLY}));u.vertexArray=Mn.fromGeometry({context:s,geometry:p,attributeLocations:Un.createAttributeLocations(p),bufferUsage:Fe.STATIC_DRAW}),u.renderState=De.fromCache({cull:{enabled:!0,face:Pi.FRONT},blending:tn.ALPHA_BLEND,depthMask:!1})}let h=a|d<<2|c<<3;if(h!==this._flags){this._flags=h;let p=[];a&&p.push("COLOR_CORRECT"),d&&p.push("PER_FRAGMENT_ATMOSPHERE"),c&&p.push("GLOBE_TRANSLUCENT");let b=new Be({defines:p,sources:[Jh,jR,s9]}),f=new Be({defines:p,sources:[Jh,jR,r9]});this._spSkyAtmosphere=qt.fromCache({context:s,vertexShaderSource:b,fragmentShaderSource:f}),u.shaderProgram=this._spSkyAtmosphere}return u};function OGt(e){return!(W.equalsEpsilon(e.hueShift,0,W.EPSILON7)&&W.equalsEpsilon(e.saturationShift,0,W.EPSILON7)&&W.equalsEpsilon(e.brightnessShift,0,W.EPSILON7))}QR.prototype.isDestroyed=function(){return!1};QR.prototype.destroy=function(){let e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyAtmosphere=this._spSkyAtmosphere&&this._spSkyAtmosphere.destroy(),me(this)};var a9=QR;var dmo=x(T(),1);var omo=x(T(),1);var Luo=x(T(),1),c9=`uniform samplerCube u_cubeMap;
in vec3 v_texCoord;
void main()
{
vec4 color = czm_textureCube(u_cubeMap, normalize(v_texCoord));
out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);
}
`;var vuo=x(T(),1),l9=`in vec3 position;
out vec3 v_texCoord;
void main()
{
vec3 p = czm_viewRotation * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));
gl_Position = czm_projection * vec4(p, 1.0);
v_texCoord = position.xyz;
}
`;var Iuo=x(T(),1),d9=`uniform mat3 u_cubeMapPanoramaTransform;
in vec3 position;
out vec3 v_texCoord;
void main()
{
vec3 p = czm_viewRotation * (u_cubeMapPanoramaTransform * (czm_entireFrustum.y * position));
gl_Position = czm_projection * vec4(p, 1.0);
v_texCoord = position.xyz;
}
`;function u9(e){this.sources=e.sources,this._sources=void 0,this._transform=e.transform,this.show=e.show??!0,this._returnCommand=e.returnCommand??!1,this._addToPanoramaCommandList=!this._returnCommand,this._command=new et({modelMatrix:F.clone(F.IDENTITY),owner:this,pass:Le.ENVIRONMENT}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0,this._hasError=!1,this._error=void 0;let t=e.credit;typeof t=="string"&&(t=new bt(t)),this._credit=t}Object.defineProperties(u9.prototype,{transform:{get:function(){return this._transform}},credit:{get:function(){return l(this._credit)?this._credit:void 0}}});u9.prototype.update=function(e,t){let n=this,{mode:i,passes:o,context:r,panoramaCommandList:s}=e;if(!this.show||i!==re.SCENE3D&&i!==re.MORPHING||!o.render)return;if(this._hasError){let c=this._error;throw this._hasError=!1,this._error=void 0,c}if(this._sources!==this.sources){this._sources=this.sources;let c=this.sources;typeof c.positiveX=="string"?rW(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 Br({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=xc.createGeometry(xc.fromDimensions({dimensions:new m(2,2,2),vertexFormat:Xe.POSITION_ONLY})),d=this._attributeLocations=Un.createAttributeLocations(c);a.vertexArray=Mn.fromGeometry({context:r,geometry:c,attributeLocations:d,bufferUsage:Fe.STATIC_DRAW}),a.renderState=De.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:tn.ALPHA_BLEND}),this._addToPanoramaCommandList=!0}if(!l(a.shaderProgram)||this._useHdr!==t){let c=new Be({defines:[t?"HDR":""],sources:[c9]});a.shaderProgram=qt.fromCache({context:r,vertexShaderSource:l(this._transform)?d9:l9,fragmentShaderSource:c,attributeLocations:this._attributeLocations}),this._useHdr=t,this._addToPanoramaCommandList=!0}if(l(this._cubeMap)){if(this.show&&l(this._credit)&&!this._returnCommand&&e.creditDisplay.addCreditToNextFrame(this._credit),this._returnCommand)return a;this._addToPanoramaCommandList&&(s.push(a),this._addToPanoramaCommandList=!1)}};u9.prototype.isDestroyed=function(){return!1};u9.prototype.destroy=function(){let e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),me(this)};var VA=u9;function RA(e){this._sources=e.sources,this._show=e.show??!0,this._panorama=new VA({sources:this._sources,show:this._show,returnCommand:!0})}Object.defineProperties(RA.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}}});RA.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)};RA.prototype.isDestroyed=function(){return!1};RA.prototype.destroy=function(){return this._panorama=this._panorama&&this._panorama.destroy(),me(this)};function qR(e){return Kt(`Assets/Textures/SkyBox/tycho2t3_80_${e}.jpg`)}RA.createEarthSkyBox=function(){return new RA({sources:{positiveX:qR("px"),negativeX:qR("mx"),positiveY:qR("py"),negativeY:qR("my"),positiveZ:qR("pz"),negativeZ:qR("mz")}})};var m9=RA;var Bmo=x(T(),1);var mmo=x(T(),1),h9=`uniform sampler2D u_texture;
in vec2 v_textureCoordinates;
void main()
{
vec4 color = texture(u_texture, v_textureCoordinates);
out_FragColor = czm_gammaCorrect(color);
}
`;var fmo=x(T(),1),f9=`uniform float u_radiusTS;
in vec2 v_textureCoordinates;
vec2 rotate(vec2 p, vec2 direction)
{
return vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);
}
vec4 addBurst(vec2 position, vec2 direction, float lengthScalar)
{
vec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);
float radius = length(rotatedPosition) * lengthScalar;
float burst = 1.0 - smoothstep(0.0, 0.55, radius);
return vec4(burst);
}
void main()
{
float lengthScalar = 2.0 / sqrt(2.0);
vec2 position = v_textureCoordinates - vec2(0.5);
float radius = length(position) * lengthScalar;
float surface = step(radius, u_radiusTS);
vec4 color = vec4(vec2(1.0), surface + 0.2, surface);
float glow = 1.0 - smoothstep(0.0, 0.55, radius);
color.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;
vec4 burst = vec4(0.0);
// The following loop has been manually unrolled for speed, to
// avoid sin() and cos().
//
//for (float i = 0.4; i < 3.2; i += 1.047) {
// vec2 direction = vec2(sin(i), cos(i));
// burst += 0.4 * addBurst(position, direction, lengthScalar);
//
// direction = vec2(sin(i - 0.08), cos(i - 0.08));
// burst += 0.3 * addBurst(position, direction, lengthScalar);
//}
burst += 0.4 * addBurst(position, vec2(0.38942, 0.92106), lengthScalar); // angle == 0.4
burst += 0.4 * addBurst(position, vec2(0.99235, 0.12348), lengthScalar); // angle == 0.4 + 1.047
burst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar); // angle == 0.4 + 1.047 * 2.0
burst += 0.3 * addBurst(position, vec2(0.31457, 0.94924), lengthScalar); // angle == 0.4 - 0.08
burst += 0.3 * addBurst(position, vec2(0.97931, 0.20239), lengthScalar); // angle == 0.4 + 1.047 - 0.08
burst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar); // angle == 0.4 + 1.047 * 2.0 - 0.08
// End of manual loop unrolling.
color += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;
out_FragColor = clamp(color, vec4(0.0), vec4(1.0));
}
`;var bmo=x(T(),1),p9=`in vec2 direction;
uniform float u_size;
out vec2 v_textureCoordinates;
void main()
{
vec4 position;
if (czm_morphTime == 1.0)
{
position = vec4(czm_sunPositionWC, 1.0);
}
else
{
position = vec4(czm_sunPositionColumbusView.zxy, 1.0);
}
vec4 positionEC = czm_view * position;
vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);
vec2 halfSize = vec2(u_size * 0.5);
halfSize *= ((direction * 2.0) - 1.0);
gl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);
v_textureCoordinates = direction;
}
`;function g9(){this.show=!0,this._drawCommand=new et({primitiveType:ve.TRIANGLES,boundingVolume:new de,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new de,this._boundingVolume2D=new de,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;let e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(g9.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var BGt=new M,zGt=new M,HGt=new se,b9=new se;g9.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 Et({context:o,width:V,height:V,pixelFormat:Ke.RGBA,pixelDatatype:E}),this._glowLengthTS=this._glowFactor*5,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;let L=this,v={u_radiusTS:function(){return L._radiusTS}};this._commands.computeCommand=new xl({fragmentShaderSource:f9,outputTexture:this._texture,uniformMap:v,persists:!1,owner:this,postExecute:function(){L._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 L=qe.createVertexBuffer({context:o,typedArray:E,usage:Fe.STATIC_DRAW}),v=[{index:V.direction,vertexBuffer:L,componentsPerAttribute:2,normalize:!0,componentDatatype:K.UNSIGNED_BYTE}],I=qe.createIndexBuffer({context:o,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Fe.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT});a.vertexArray=new Mn({context:o,attributes:v,indexBuffer:I}),a.shaderProgram=qt.fromCache({context:o,vertexShaderSource:p9,fragmentShaderSource:h9,attributeLocations:V}),a.renderState=De.fromCache({blending:tn.ALPHA_BLEND}),a.uniformMap=this._uniformMap}let c=o.uniformState.sunPositionWC,d=o.uniformState.sunPositionColumbusView,u=this._boundingVolume,h=this._boundingVolume2D;m.clone(c,u.center),h.center.x=d.z,h.center.y=d.x,h.center.z=d.y,u.radius=W.SOLAR_RADIUS+W.SOLAR_RADIUS*this._glowLengthTS,h.radius=u.radius,i===re.SCENE3D?de.clone(u,a.boundingVolume):i===re.COLUMBUS_VIEW&&de.clone(h,a.boundingVolume);let p=no.computeActualEllipsoidPosition(e,c,b9),b=m.magnitude(m.subtract(p,e.camera.position,b9)),f=o.uniformState.projection,y=HGt;y.x=0,y.y=0,y.z=-b,y.w=1;let _=F.multiplyByVector(f,y,b9),S=no.clipToGLWindowCoordinates(t.viewport,_,BGt);y.x=W.SOLAR_RADIUS;let A=F.multiplyByVector(f,y,b9),Z=no.clipToGLWindowCoordinates(t.viewport,A,zGt);return this._size=M.magnitude(M.subtract(Z,S,b9)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands};g9.prototype.isDestroyed=function(){return!1};g9.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(),me(this)};var y9=g9;var jho=x(T(),1);var vho=x(T(),1);var cGe=x(lU(),1);var Hmo=x(T(),1);function KGt(e,t,n){return` float clipDistance = clip(gl_FragCoord, ${e}, ${t});
vec4 clippingPlanesEdgeColor = vec4(1.0);
clippingPlanesEdgeColor.rgb = ${n}.rgb;
float clippingPlanesEdgeWidth = ${n}.a;
if (clipDistance > 0.0 && clipDistance < clippingPlanesEdgeWidth)
{
out_FragColor = clippingPlanesEdgeColor;
}
`}var x9=KGt;var jmo=x(T(),1);var JGt={modifyFragmentShader:function(t){return t=Be.replaceMain(t,"czm_splitter_main"),t+=`uniform float czm_splitDirection;
void main()
{
#ifndef SHADOW_MAP
if (czm_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
if (czm_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
#endif
czm_splitter_main();
}
`,t},addUniforms:function(t,n){n.czm_splitDirection=function(){return t.splitDirection}}},$R=JGt;var EA={NEEDS_DECODE:0,DECODING:1,READY:2,FAILED:3};function T9(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=EA.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=Cn.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??Er.NONE,this._splittingEnabled=!1,this._error=void 0,jGt(this,e)}Object.defineProperties(T9.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 jGt(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=Oh.getBinaryProperties(n.pointsLength,n.batchTableJson,n.batchTableBinary)),l(n.draco)){let a=n.draco;e._decodingState=EA.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 QGt=new m,qGt=new m,$Gt=new m,sGe,uz;function eLt(e){if(!l(uz)){sGe=new cGe.default(0),uz=new Array(e);for(let t=0;t<e;++t)uz[t]=sGe.random()}return uz}function tLt(e){let n=e.length/3,i=Math.min(n,20),o=eLt(20),r=Number.MAX_VALUE,s=-Number.MAX_VALUE,a=m.fromElements(r,r,r,QGt),c=m.fromElements(s,s,s,qGt);for(let u=0;u<i;++u){let h=Math.floor(o[u]*n),p=m.unpack(e,h*3,$Gt);m.minimumByComponent(a,p,a),m.maximumByComponent(c,p,c)}let d=de.fromCornerPoints(a,c);return d.radius+=W.EPSILON2,d}function aGe(e,t){let n=K.fromTypedArray(e);return n===K.INT||n===K.UNSIGNED_INT||n===K.DOUBLE?(Tt("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 nLt=new se,iLt=new se,oLt=new U,lGe=0,mz=1,gte=2,dGe=3,rLt=4,hte=new F,sLt=new F;function aLt(e,t){let n=t.context,i=e._parsedContent,o=e._pointsLength,r=i.positions,s=i.colors,a=i.normals,c=i.batchIds,d=i.styleableProperties,u=l(d),h=e._isQuantized,p=e._isQuantizedDraco,b=e._isOctEncoded16P,f=e._isOctEncodedDraco,y=e._quantizedRange,_=e._octEncodedRange,S=e._isRGB565,A=e._isTranslucent,Z=e._hasColors,V=e._hasNormals,E=e._hasBatchIds,L,v,I=[],X={};if(e._styleableShaderAttributes=X,u){let k=rLt;for(let D in d)if(d.hasOwnProperty(D)){let w=d[D],z=aGe(w.typedArray,D);L=w.componentCount,v=K.fromTypedArray(z);let J=qe.createVertexBuffer({context:n,typedArray:z,usage:Fe.STATIC_DRAW});e._geometryByteLength+=J.sizeInBytes;let ee={index:k,vertexBuffer:J,componentsPerAttribute:L,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0};I.push(ee),X[D]={location:k,componentCount:L},++k}}let N=qe.createVertexBuffer({context:n,typedArray:r.typedArray,usage:Fe.STATIC_DRAW});e._geometryByteLength+=N.sizeInBytes;let g;Z&&(g=qe.createVertexBuffer({context:n,typedArray:s.typedArray,usage:Fe.STATIC_DRAW}),e._geometryByteLength+=g.sizeInBytes);let C;V&&(C=qe.createVertexBuffer({context:n,typedArray:a.typedArray,usage:Fe.STATIC_DRAW}),e._geometryByteLength+=C.sizeInBytes);let R;E&&(c.typedArray=aGe(c.typedArray,"batchIds"),R=qe.createVertexBuffer({context:n,typedArray:c.typedArray,usage:Fe.STATIC_DRAW}),e._geometryByteLength+=R.sizeInBytes);let G=[];if(h?v=K.UNSIGNED_SHORT:p?v=y<=255?K.UNSIGNED_BYTE:K.UNSIGNED_SHORT:v=K.FLOAT,G.push({index:lGe,vertexBuffer:N,componentsPerAttribute:3,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0}),e._cull&&(h||p?e._boundingSphere=de.fromCornerPoints(m.ZERO,e._quantizedVolumeScale):e._boundingSphere=tLt(r.typedArray)),Z)if(S)G.push({index:mz,vertexBuffer:g,componentsPerAttribute:1,componentDatatype:K.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0});else{let k=A?4:3;G.push({index:mz,vertexBuffer:g,componentsPerAttribute:k,componentDatatype:K.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0})}V&&(b?(L=2,v=K.UNSIGNED_BYTE):f?(L=2,v=_<=255?K.UNSIGNED_BYTE:K.UNSIGNED_SHORT):(L=3,v=K.FLOAT),G.push({index:gte,vertexBuffer:C,componentsPerAttribute:L,componentDatatype:v,normalize:!1,offsetInBytes:0,strideInBytes:0})),E&&G.push({index:dGe,vertexBuffer:R,componentsPerAttribute:1,componentDatatype:K.fromTypedArray(c.typedArray),normalize:!1,offsetInBytes:0,strideInBytes:0}),u&&(G=G.concat(I));let P=new Mn({context:n,attributes:G}),Y={depthTest:{enabled:!0}},O={depthTest:{enabled:!0},depthMask:!1,blending:tn.ALPHA_BLEND};e._opaquePass===Le.CESIUM_3D_TILE&&(Y.stencilTest=Ot.setCesium3DTileBit(),Y.stencilMask=Ot.CESIUM_3D_TILE_MASK,O.stencilTest=Ot.setCesium3DTileBit(),O.stencilMask=Ot.CESIUM_3D_TILE_MASK),e._opaqueRenderState=De.fromCache(Y),e._translucentRenderState=De.fromCache(O),e._drawCommand=new et({boundingVolume:new de,cull:e._cull,modelMatrix:new F,primitiveType:ve.POINTS,vertexArray:P,count:o,shaderProgram:void 0,uniformMap:void 0,renderState:A?e._translucentRenderState:e._opaqueRenderState,pass:A?Le.TRANSLUCENT:e._opaquePass,owner:e,castShadows:!1,receiveShadows:!1,pickId:e._pickIdLoaded()})}function cLt(e,t){let n=t.context,i=e._isQuantized,o=e._isQuantizedDraco,r=e._isOctEncodedDraco,s={u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier:function(){let a=nLt;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 mn?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,oLt);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,hte);let d=F.multiply(hte,a.modelMatrix,hte);return F.inverseTranspose(d,sLt)}};$R.addUniforms(e,s),(i||o||r)&&(s=Rt(s,{u_quantizedVolumeScaleAndOctEncodedRange:function(){let a=iLt;if(l(e._quantizedVolumeScale)){let c=m.clone(e._quantizedVolumeScale,a);m.divideByScalar(c,e._quantizedRange,a)}return a.w=e._octEncodedRange,a}})),l(e._uniformMapLoaded)&&(s=e._uniformMapLoaded(s)),e._drawCommand.uniformMap=s}function fte(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 pte(e,t){e=e.slice(e.indexOf(`
`));let n=/czm_3dtiles_builtin_property_(\w+)/g,i=n.exec(e);for(;i!==null;){let o=i[1];t.indexOf(o)===-1&&t.push(o),i=n.exec(e)}}function bte(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 lLt={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 dLt(e,t,n){let i,o,r,s=t.context,a=l(n),c=e._isQuantized,d=e._isQuantizedDraco,u=e._isOctEncoded16P,h=e._isOctEncodedDraco,p=e._isRGB565,b=e._isTranslucent,f=e._hasColors,y=e._hasNormals,_=e._hasBatchIds,S=e._backFaceCulling,A=e._normalShading,Z=e._drawCommand.vertexArray,V=e.clippingPlanes,E=e._attenuation,L,v,I,X=b,N=ze(lLt),g={},C=e._styleableShaderAttributes;for(o in C)C.hasOwnProperty(o)&&(r=C[o],N[o]=`czm_3dtiles_property_${r.location}`,g[r.location]=r);if(a){let ce={translucent:!1},Ze="(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)";L=n.getColorShaderFunction(`getColorFromStyle${Ze}`,N,ce),v=n.getShowShaderFunction(`getShowFromStyle${Ze}`,N,ce),I=n.getPointSizeShaderFunction(`getPointSizeFromStyle${Ze}`,N,ce),l(L)&&ce.translucent&&(X=!0)}e._styleTranslucent=X;let R=l(L),G=l(v),P=l(I),Y=e.isClipped,O=[],k=[];R&&(fte(L,O),pte(L,k)),G&&(fte(v,O),pte(v,k)),P&&(fte(I,O),pte(I,k));let D=k.indexOf("COLOR")>=0,w=k.indexOf("NORMAL")>=0;if(w&&!y)throw new le("Style references the NORMAL semantic but the point cloud does not have normals");for(o in C)if(C.hasOwnProperty(o)){r=C[o];let ce=O.indexOf(r.location)>=0,Ze=bte(Z,r.location);Ze.enabled=ce}let z=f&&(!R||D);if(f){let ce=bte(Z,mz);ce.enabled=z}let J=y&&(A||S||w);if(y){let ce=bte(Z,gte);ce.enabled=J}let ee={a_position:lGe};z&&(ee.a_color=mz),J&&(ee.a_normal=gte),_&&(ee.a_batchId=dGe);let H="",te=O.length;for(i=0;i<te;++i){let ce=O[i];r=g[ce];let Ze=r.componentCount,xe=`czm_3dtiles_property_${ce}`,Ge;Ze===1?Ge="float":Ge=`vec${Ze}`,H+=`in ${Ge} ${xe};
`,ee[xe]=r.location}cLt(e,t);let $=`in vec3 a_position;
out vec4 v_color;
uniform vec4 u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier;
uniform vec4 u_constantColor;
uniform vec4 u_highlightColor;
`;$+=`float u_pointSize;
float tiles3d_tileset_time;
`,E&&($+=`float u_geometricError;
float u_depthMultiplier;
`),$+=H,z&&(b?$+=`in vec4 a_color;
`:p?$+=`in float a_color;
const float SHIFT_RIGHT_11 = 1.0 / 2048.0;
const float SHIFT_RIGHT_5 = 1.0 / 32.0;
const float SHIFT_LEFT_11 = 2048.0;
const float SHIFT_LEFT_5 = 32.0;
const float NORMALIZE_6 = 1.0 / 64.0;
const float NORMALIZE_5 = 1.0 / 32.0;
`:$+=`in vec3 a_color;
`),J&&(u||h?$+=`in vec2 a_normal;
`:$+=`in vec3 a_normal;
`),_&&($+=`in float a_batchId;
`),(c||d||h)&&($+=`uniform vec4 u_quantizedVolumeScaleAndOctEncodedRange;
`),R&&($+=L),G&&($+=v),P&&($+=I),$+=`void main()
{
u_pointSize = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.x;
tiles3d_tileset_time = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.y;
`,E&&($+=` u_geometricError = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.z;
u_depthMultiplier = u_pointSizeAndTimeAndGeometricErrorAndDepthMultiplier.w;
`),z?b?$+=` vec4 color = a_color;
`:p?$+=` float compressed = a_color;
float r = floor(compressed * SHIFT_RIGHT_11);
compressed -= r * SHIFT_LEFT_11;
float g = floor(compressed * SHIFT_RIGHT_5);
compressed -= g * SHIFT_LEFT_5;
float b = compressed;
vec3 rgb = vec3(r * NORMALIZE_5, g * NORMALIZE_6, b * NORMALIZE_5);
vec4 color = vec4(rgb, 1.0);
`:$+=` vec4 color = vec4(a_color, 1.0);
`:$+=` vec4 color = u_constantColor;
`,c||d?$+=` vec3 position = a_position * u_quantizedVolumeScaleAndOctEncodedRange.xyz;
`:$+=` vec3 position = a_position;
`,$+=` vec3 position_absolute = vec3(czm_model * vec4(position, 1.0));
`,J?(u?$+=` vec3 normal = czm_octDecode(a_normal);
`:h?$+=` vec3 normal = czm_octDecode(a_normal, u_quantizedVolumeScaleAndOctEncodedRange.w).zxy;
`:$+=` vec3 normal = a_normal;
`,$+=` vec3 normalEC = czm_normal * normal;
`):$+=` vec3 normal = vec3(1.0);
`,R&&($+=` color = getColorFromStyle(position, position_absolute, color, normal);
`),G&&($+=` float show = float(getShowFromStyle(position, position_absolute, color, normal));
`),P?$+=` gl_PointSize = getPointSizeFromStyle(position, position_absolute, color, normal) * czm_pixelRatio;
`:E?$+=` vec4 positionEC = czm_modelView * vec4(position, 1.0);
float depth = -positionEC.z;
gl_PointSize = min((u_geometricError / depth) * u_depthMultiplier, u_pointSize);
`:$+=` gl_PointSize = u_pointSize;
`,$+=` color = color * u_highlightColor;
`,J&&A&&($+=` float diffuseStrength = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC);
diffuseStrength = max(diffuseStrength, 0.4);
color.xyz *= diffuseStrength * czm_lightColor;
`),$+=` v_color = color;
gl_Position = czm_modelViewProjection * vec4(position, 1.0);
`,J&&S&&($+=` float visible = step(-normalEC.z, 0.0);
gl_Position *= visible;
gl_PointSize *= visible;
`),G&&($+=` gl_Position.w *= float(show);
gl_PointSize *= float(show);
`),$+=`}
`;let be=`in vec4 v_color;
`;Y&&(be+=`uniform highp sampler2D u_clippingPlanes;
uniform mat4 u_clippingPlanesMatrix;
uniform vec4 u_clippingPlanesEdgeStyle;
`,be+=`
`,be+=JS(V,s),be+=`
`),be+=`void main()
{
out_FragColor = czm_gammaCorrect(v_color);
`,Y&&(be+=x9("u_clippingPlanes","u_clippingPlanesMatrix","u_clippingPlanesEdgeStyle")),be+=`}
`,e.splitDirection!==Er.NONE&&(be=$R.modifyFragmentShader(be)),l(e._vertexShaderLoaded)&&($=e._vertexShaderLoaded($)),l(e._fragmentShaderLoaded)&&(be=e._fragmentShaderLoaded(be));let ye=e._drawCommand;l(ye.shaderProgram)&&ye.shaderProgram.destroy(),ye.shaderProgram=qt.fromCache({context:s,vertexShaderSource:$,fragmentShaderSource:be,attributeLocations:ee});try{ye.shaderProgram._bind()}catch{throw new le("Error generating style shader: this may be caused by a type mismatch, index out-of-bounds, or other syntax error.")}}function uLt(e,t){if(e._decodingState===EA.READY)return!1;if(e._decodingState===EA.NEEDS_DECODE){let n=e._parsedContent,i=n.draco,o=ab.decodePointCloud(i,t);l(o)&&(e._decodingState=EA.DECODING,o.then(function(r){e._decodingState=EA.READY;let s=l(r.POSITION)?r.POSITION.array:void 0,a=l(r.RGB)?r.RGB.array:void 0,c=l(r.RGBA)?r.RGBA.array:void 0,d=l(r.NORMAL)?r.NORMAL.array:void 0,u=l(r.BATCH_ID)?r.BATCH_ID.array:void 0,h=l(s)&&l(r.POSITION.data.quantization),p=l(d)&&l(r.NORMAL.data.quantization);if(h){let _=r.POSITION.data.quantization,S=_.range;e._quantizedVolumeScale=m.fromElements(S,S,S),e._quantizedVolumeOffset=m.unpack(_.minValues),e._quantizedRange=(1<<_.quantizationBits)-1,e._isQuantizedDraco=!0}p&&(e._octEncodedRange=(1<<r.NORMAL.data.quantization.quantizationBits)-1,e._isOctEncodedDraco=!0);let b=n.styleableProperties,f=i.batchTableProperties;for(let _ in f)if(f.hasOwnProperty(_)){let S=r[_];l(b)||(b={}),b[_]={typedArray:S.array,componentCount:S.data.componentsPerAttribute}}l(s)&&(n.positions={typedArray:s});let y=c??a;l(y)&&(n.colors={typedArray:y}),l(d)&&(n.normals={typedArray:d}),l(u)&&(n.batchIds={typedArray:u}),n.styleableProperties=b}).catch(function(r){e._decodingState=EA.FAILED,e._error=r}))}return!0}var mLt=new se,hLt=new m;T9.prototype.update=function(e){let t=e.context;if(l(this._error)){let d=this._error;throw this._error=void 0,d}if(uLt(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)||(aLt(this,e),o=!0,i=!0,this._ready=!0,this._parsedContent=void 0),o){F.clone(this.modelMatrix,this._modelMatrix);let d=this._drawCommand.modelMatrix;if(F.clone(this._modelMatrix,d),l(this._rtcCenter)&&F.multiplyByTranslation(d,this._rtcCenter,d),l(this._quantizedVolumeOffset)&&F.multiplyByTranslation(d,this._quantizedVolumeOffset,d),e.mode!==re.SCENE3D){let h=e.mapProjection,p=F.getColumn(d,3,mLt);se.equals(p,se.UNIT_W)||dt.basisTo2D(h,d,d)}let u=this._drawCommand.boundingVolume;if(de.clone(this._boundingSphere,u),this._cull){let h=u.center;F.multiplyByPoint(d,h,h);let p=F.getScale(d,hLt);u.radius*=m.maximumComponent(p)}}this.clippingPlanesDirty&&(this.clippingPlanesDirty=!1,i=!0),this._attenuation!==this.attenuation&&(this._attenuation=this.attenuation,i=!0),this.backFaceCulling!==this._backFaceCulling&&(this._backFaceCulling=this.backFaceCulling,i=!0),this.normalShading!==this._normalShading&&(this._normalShading=this.normalShading,i=!0),(this._style!==this.style||this.styleDirty)&&(this._style=this.style,this.styleDirty=!1,i=!0);let r=this.splitDirection!==Er.NONE;this._splittingEnabled!==r&&(this._splittingEnabled=r,i=!0),i&&dLt(this,e,this._style),this._drawCommand.castShadows=Cn.castShadows(this.shadows),this._drawCommand.receiveShadows=Cn.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)};T9.prototype.isDestroyed=function(){return!1};T9.prototype.destroy=function(){let e=this._drawCommand;return l(e)&&(e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy()),me(this)};var _9=T9;function LA(e){e=e??B.EMPTY_OBJECT,this.show=e.show??!0,this.modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this.shadows=e.shadows??Cn.ENABLED,this.maximumMemoryUsage=e.maximumMemoryUsage??256,this.shading=new Ap(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 gb,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(LA.prototype,{clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){as.setOwner(e,this,"_clippingPlanes")}},totalMemoryUsageInBytes:{get:function(){return this._totalMemoryUsageInBytes}},boundingSphere:{get:function(){if(l(this._lastRenderedFrame))return this._lastRenderedFrame.pointCloud.boundingSphere}}});function fLt(e){return`uniform vec4 czm_pickColor;
${e}`}function pLt(e){return function(t){return Rt(t,{czm_pickColor:function(){return e._pickId.color}})}}function bLt(){return"czm_pickColor"}LA.prototype.makeStyleDirty=function(){this._styleDirty=!0};LA.prototype._getAverageLoadTime=function(){return this._runningLength===0?.05:this._runningAverage};var gLt=new Q;function xte(e){let t=e._clock,n=t.canAnimate&&t.shouldAnimate,i=t.multiplier;return n?i:0}function GA(e,t){return e._intervals.indexOf(t.start)}function yLt(e,t){let n=e._intervals,i=e._clock,o=xte(e);if(o===0)return;let r=e._getAverageLoadTime(),s=Q.addSeconds(i.currentTime,r*o,gLt),a=n.indexOf(s),c=GA(e,t);return a===c&&(o>=0?++a:--a),n.get(a)}function xLt(e){let t=e._intervals,i=e._clock.currentTime,o=t.indexOf(i);return t.get(o)}function TLt(e,t,n){let i=xte(e),o=GA(e,t),r=GA(e,n);return i>=0?o>=r:o<=r}function mGe(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 _Lt(e,t,n){let i=GA(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:Yi(),sequential:!0,ready:!1,touchedFrameNumber:n.frameNumber,uri:c},o[i]=r,We.fetchArrayBuffer({url:c}).then(function(d){r.pointCloud=new _9({arrayBuffer:d,cull:!0,fragmentShaderLoaded:fLt,uniformMapLoaded:pLt(e),pickIdLoaded:bLt})}).catch(mGe(e,c))}return r}function SLt(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 ALt(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(hGe(e,t,n,i),o.ready&&(t.ready=!0,e._totalMemoryUsageInBytes+=o.geometryByteLength,r.length=s,t.sequential)){let a=(Yi()-t.timestamp)/1e3;SLt(e,a)}}t.touchedFrameNumber=i.frameNumber}var ZLt=new F;function CLt(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 VLt(e){let t=e.shading;return l(t)&&l(t.maximumAttenuation)?t.maximumAttenuation:10}var RLt=new Ap;function hGe(e,t,n,i){let o=e.shading??RLt,r=t.pointCloud,s=t.transform??F.IDENTITY;r.modelMatrix=F.multiplyTransformation(e.modelMatrix,s,ZLt),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=CLt(e,r),r.geometricErrorScale=o.geometricErrorScale,r.maximumAttenuation=VLt(e);try{r.update(i)}catch(a){mGe(e,t.uri)(a)}t.touchedFrameNumber=i.frameNumber}function yte(e,t,n,i){let o=_Lt(e,t,i);ALt(e,o,n,i)}function ELt(e){return function(t){return t.touchedFrameNumber<e.frameNumber}}function fGe(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 GLt(e,t){let n=GA(e,t),i=e._frames[n];if(l(i)&&i.ready)return i}function uGe(e,t,n,i,o){return l(n)?n.ready?!0:(yte(e,t,i,o),n.ready):!1}function LLt(e,t,n,i,o){let r,s,a,c=e._intervals,d=e._frames,u=GA(e,n),h=GA(e,t);if(u>=h){for(r=u;r>=h;--r)if(s=c.get(r),a=d[r],uGe(e,s,a,i,o))return s}else for(r=u;r<=h;++r)if(s=c.get(r),a=d[r],uGe(e,s,a,i,o))return s;return t}function WLt(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 e1={timeSinceLoad:0,isClipped:!1,clippingPlanesDirty:!1};LA.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)&&WLt(this,o,s),e1.timeSinceLoad=t,e1.isClipped=r;let a=this.shading,c=this._pointCloudEyeDomeLighting,d=e.commandList,u=d.length,h=this._previousInterval,p=this._nextInterval,b=xLt(this);if(!l(b))return;let f=!1,y=xte(this),_=y===0;y!==this._clockMultiplier&&(f=!0,this._clockMultiplier=y),(!l(h)||_)&&(h=b),(!l(p)||f||TLt(this,b,p))&&(p=yLt(this,b)),h=LLt(this,h,b,e1,e);let S=GLt(this,h);l(S)||(yte(this,h,e1,e),S=this._lastRenderedFrame),l(S)&&hGe(this,S,e1,e),l(p)&&yte(this,p,e1,e);let A=this;l(S)&&!l(this._lastRenderedFrame)&&e.afterRender.push(function(){return!0}),l(S)&&S!==this._lastRenderedFrame&&A.frameChanged.numberOfListeners>0&&e.afterRender.push(function(){return A.frameChanged.raiseEvent(A),!0}),this._previousInterval=h,this._nextInterval=p,this._lastRenderedFrame=S;let Z=this._totalMemoryUsageInBytes,V=this.maximumMemoryUsage*1024*1024;Z>V&&fGe(this,ELt(e));let L=d.length-u;l(a)&&a.attenuation&&a.eyeDomeLighting&&L>0&&c.update(e,u,a,this.boundingSphere)};LA.prototype.isDestroyed=function(){return!1};LA.prototype.destroy=function(){return fGe(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),me(this)};var t1=LA;function gGe(e,t){if(l(t)){let n=t.clock;l(n)&&n.getValue(e)}}function vLt(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 yGe(e){let t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,l(e._scene)&&(e._scene.pixelRatio=t),t}function xGe(e){let t=e._canvas,n=t.clientWidth,i=t.clientHeight,o=yGe(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 TGe(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 Ko(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=an.supportsImageRenderingPixelated();this._supportsImageRenderingPixelated=o,o&&(i.style.imageRendering=an.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,h=t.useBrowserRecommendedResolution??!0;this._element=n,this._container=e,this._canvas=i,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=d,this._creditContainer=c,this._innerCreditContainer=a,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=u,this._resolutionScale=1,this._useBrowserRecommendedResolution=h,this._forceResize=!1,this._entityView=void 0,this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._trackedEntityChanged=new _e,this._allowDataSourcesToSuspendAnimation=!0,this._clock=l(t.clock)?t.clock:new Af,l(t.shouldAnimate)&&(this._clock.shouldAnimate=t.shouldAnimate),xGe(this);try{let p=t.ellipsoid??ie.default,b=new o9({canvas:i,contextOptions:t.contextOptions,creditContainer:a,creditViewport:d,ellipsoid:p,mapProjection:t.mapProjection,orderIndependentTranslucency:t.orderIndependentTranslucency,scene3DOnly:t.scene3DOnly??!1,shadows:t.shadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples});this._scene=b,b.camera.constrainedAxis=m.UNIT_Z,yGe(this),TGe(this);let f=t.globe;l(f)||(f=new QY(p)),f!==!1&&(b.globe=f,b.globe.shadows=t.terrainShadows??Cn.RECEIVE_ONLY);let y=t.skyBox;!l(y)&&ie.WGS84.equals(p)&&(y=m9.createEarthSkyBox()),y!==!1&&(b.skyBox=y,b.sun=new y9,ie.WGS84.equals(p)&&(b.moon=new iw));let _=t.skyAtmosphere;!l(_)&&ie.WGS84.equals(p)&&(_=new a9(p),_.show=t.globe!==!1&&f.show),_!==!1&&(b.skyAtmosphere=_);let S=t.baseLayer;t.globe!==!1&&S!==!1&&(l(S)||(S=ms.fromWorldImagery()),b.imageryLayers.add(S)),l(t.terrainProvider)&&t.globe!==!1&&(b.terrainProvider=t.terrainProvider),l(t.terrain)&&t.globe!==!1&&b.setTerrain(t.terrain),this._screenSpaceEventHandler=new Hu(i),l(t.sceneMode)&&(t.sceneMode===re.SCENE2D&&this._scene.morphTo2D(0),t.sceneMode===re.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=t.useDefaultRenderLoop??!0,this._targetFrameRate=void 0,this.targetFrameRate=t.targetFrameRate;let A=this;this._onRenderError=function(I,X){A._useDefaultRenderLoop=!1,A._renderLoopRunning=!1,A._showRenderLoopErrors&&A.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,X)},b.renderError.addEventListener(this._onRenderError);let Z=t.dataSources,V=!1;l(Z)||(Z=new KX,V=!0);let E=new NN({scene:b,dataSourceCollection:Z}),L=new vr;this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=t.automaticallyTrackDataSourceClocks??!0,this._dataSourceCollection=Z,this._destroyDataSourceCollection=V,this._dataSourceDisplay=E,this._eventHelper=L,this._canAnimateUpdateCallback=this._updateCanAnimate,L.add(this._clock.onTick,Ko.prototype._onTick,this),L.add(b.morphStart,Ko.prototype._clearTrackedObject,this),L.add(Z.dataSourceAdded,Ko.prototype._onDataSourceAdded,this),L.add(Z.dataSourceRemoved,Ko.prototype._onDataSourceRemoved,this),L.add(b.postRender,Ko.prototype._postRender,this);let v=Z.length;for(let I=0;I<v;I++)this._dataSourceAdded(Z,Z.get(I));this._dataSourceAdded(void 0,E.defaultDataSource),L.add(Z.dataSourceAdded,Ko.prototype._dataSourceAdded,this),L.add(Z.dataSourceRemoved,Ko.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(Ko.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&&vLt(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,Tte(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,gGe(this.clock,e))}}});Ko.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=Cp(n);d||(typeof n=="string"&&(n=new Error(n)),t=Cp({name:n.name,message:n.message}),f=n.stack),typeof console<"u"&&console.error(`${e}
${t}
${f}`);let y=document.createElement("div");y.className="cesium-widget-errorPanel-message-details collapsed";let _=document.createElement("span");_.className="cesium-widget-errorPanel-more-details",_.appendChild(document.createTextNode("See more...")),y.appendChild(_),y.onclick=function(S){y.removeChild(_),y.appendChild(document.createTextNode(f)),y.className="cesium-widget-errorPanel-message-details",r.className="cesium-widget-errorPanel-content expanded",y.onclick=void 0},a.appendChild(y)}b.innerHTML=`<p>${t}</p>`}let h=document.createElement("div");h.className="cesium-widget-errorPanel-buttonPanel",r.appendChild(h);let p=document.createElement("button");p.setAttribute("type","button"),p.className="cesium-button",p.appendChild(document.createTextNode("OK")),p.onclick=function(){l(c)&&l(window.removeEventListener)&&window.removeEventListener("resize",c,!1),i.removeChild(o)},h.appendChild(p),i.appendChild(o)};Ko.prototype.isDestroyed=function(){return!1};Ko.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()),me(this)};Ko.prototype.resize=function(){let e=this._canvas;!this._forceResize&&this._canvasClientWidth===e.clientWidth&&this._canvasClientHeight===e.clientHeight&&this._lastDevicePixelRatio===window.devicePixelRatio||(this._forceResize=!1,xGe(this),TGe(this),this._scene.requestRender())};Ko.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();let e=this._clock.tick();this._scene.render(e)}else this._clock.tick()};Ko.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(Ko.prototype._onEntityCollectionChanged,this)};Ko.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(Ko.prototype._onEntityCollectionChanged,this),l(this.trackedEntity)&&n.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0)};Ko.prototype._updateCanAnimate=function(e){this._clock.canAnimate=e};var FLt=new de;Ko.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??FLt)===xt.DONE&&i.update(t)}};Ko.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)}};Ko.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};Ko.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&gGe(this.clock,e)};Ko.prototype._onDataSourceAdded=function(e,t){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,Ko.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};Ko.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}};Ko.prototype.zoomTo=function(e,t){return _Ge(this,e,{offset:t},!1)};Ko.prototype.flyTo=function(e,t){return _Ge(this,e,t,!0)};function _Ge(e,t,n,i){Tte(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 ms){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 KS(a,e.scene)}).then(function(a){e._zoomPromise===o&&(e._zoomTarget=a)});return}if(r instanceof Js||r instanceof t1||r instanceof Ox||r instanceof Ks){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 S9(e){e._zoomPromise=void 0,e._zoomTarget=void 0,e._zoomOptions=void 0}function Tte(e){let t=e._zoomPromise;l(t)&&(S9(e),e._completeZoom(!1))}Ko.prototype._postRender=function(){ILt(this),PLt(this)};var pGe=new de;function ILt(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 ih(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)),S9(e)}if(t instanceof t1){if(l(t.boundingSphere)){s(t.boundingSphere);return}let u=t.frameChanged.addEventListener(function(h){s(h.boundingSphere),u()});return}if(t instanceof Js||t instanceof Ox){s(t.boundingSphere);return}if(t instanceof Ks){s(t.boundingVolume);return}if(t instanceof pe){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)),S9(e);return}let a=t,c=[];for(let u=0,h=a.length;u<h;u++){let p=e._dataSourceDisplay.getBoundingSphere(a[u],!1,pGe);if(p===xt.PENDING)return;p!==xt.FAILED&&c.push(de.clone(pGe))}if(c.length===0){Tte(e);return}e.trackedEntity=void 0;let d=de.fromBoundingSpheres(c);e._zoomIsFlight?(S9(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),S9(e),e._completeZoom(!0))}var bGe=new de;function PLt(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,bGe);if(r===xt.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!==xt.FAILED?bGe:void 0;e._entityView=new wN(t,o,o.ellipsoid),e._entityView.update(n,a),e._needTrackedEntityUpdate=!1}var A9=Ko;var spo=x(T(),1);var wfo=x(T(),1);function o1(e,t){this._tilingScheme=e,this._maximumLevel=t,this._rootNodes=[]}var WA=new ae;function XLt(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}o1.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)XLt(e,b,p,s)||s.push(new n1(r,void 0,0,b,p));r.tileXYToRectangle(t,n,e,WA);let a=WA.west,c=WA.north;r.tileXYToRectangle(i,o,e,WA);let d=WA.east,u=WA.south,h=new kLt(e,a,u,d,c);for(let p=0;p<s.length;++p){let b=s[p];_te(b.extent,h)&&ULt(this._maximumLevel,b,h)}};o1.prototype.computeMaximumLevelAtPosition=function(e){let t;for(let n=0;n<this._rootNodes.length;++n){let i=this._rootNodes[n];if(i1(i.extent,e)){t=i;break}}return l(t)?Z9(void 0,t,e):-1};var NLt=[],YLt=[],wLt=new ae,MLt=new ae;o1.prototype.computeBestAvailableLevelOverRectangle=function(e){let t=NLt;t.length=0,e.east<e.west?(t.push(ae.fromRadians(-Math.PI,e.south,e.east,e.north,wLt)),t.push(ae.fromRadians(e.west,e.south,Math.PI,e.north,MLt))):t.push(e);let n=YLt;n.length=0;let i;for(i=0;i<this._rootNodes.length;++i)C9(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 SGe=new pe;o1.prototype.isTileAvailable=function(e,t,n){let i=this._tilingScheme.tileXYToRectangle(t,n,e,WA);return ae.center(i,SGe),this.computeMaximumLevelAtPosition(SGe)>=e};o1.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 n1(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(n1.prototype,{nw:{get:function(){return this._nw||(this._nw=new n1(this.tilingScheme,this,this.level+1,this.x*2,this.y*2)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new n1(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new n1(this.tilingScheme,this,this.level+1,this.x*2,this.y*2+1)),this._sw}},se:{get:function(){return this._se||(this._se=new n1(this.tilingScheme,this,this.level+1,this.x*2+1,this.y*2+1)),this._se}}});function kLt(e,t,n,i,o){this.level=e,this.west=t,this.south=n,this.east=i,this.north=o}function _te(e,t){let n=Math.max(e.west,t.west),i=Math.max(e.south,t.south),o=Math.min(e.east,t.east),r=Math.min(e.north,t.north);return i<r&&n<o}function ULt(e,t,n){for(;t.level<e;)if(hz(t.nw.extent,n))t=t.nw;else if(hz(t.ne.extent,n))t=t.ne;else if(hz(t.sw.extent,n))t=t.sw;else if(hz(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=bo(t.rectangles,n.level,DLt);i<0&&(i=~i),t.rectangles.splice(i,0,n)}}function DLt(e,t){return e.level-t}function hz(e,t){return t.west>=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function i1(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function Z9(e,t,n){let i=0,o=!1;for(;!o;){let r=t._nw&&i1(t._nw.extent,n),s=t._ne&&i1(t._ne.extent,n),a=t._sw&&i1(t._sw.extent,n),c=t._se&&i1(t._se.extent,n);if(r+s+a+c>1){r&&(i=Math.max(i,Z9(t,t._nw,n))),s&&(i=Math.max(i,Z9(t,t._ne,n))),a&&(i=Math.max(i,Z9(t,t._sw,n))),c&&(i=Math.max(i,Z9(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];i1(a,n)&&(i=a.level)}t=t.parent}return i}function C9(e,t,n){if(!t)return;let i,o=!1;for(i=0;i<n.length;++i)o=o||_te(t.extent,n[i]);if(!o)return;let r=t.rectangles;for(i=0;i<r.length;++i){let s=r[i];e[s.level]||(e[s.level]=n),e[s.level]=OLt(e[s.level],s)}C9(e,t._nw,n),C9(e,t._ne,n),C9(e,t._sw,n),C9(e,t._se,n)}function OLt(e,t){let n=[];for(let i=0;i<e.length;++i){let o=e[i];_te(o,t)?(o.west<t.west&&n.push(new ae(o.west,o.south,t.west,o.north)),o.east>t.east&&n.push(new ae(t.east,o.south,o.east,o.north)),o.south<t.south&&n.push(new ae(Math.max(t.west,o.west),o.south,Math.min(t.east,o.east),t.south)),o.north>t.north&&n.push(new ae(Math.max(t.west,o.west),t.north,Math.min(t.east,o.east),o.north))):n.push(o)}return n}var Hf=o1;var BLt=15;function AGe(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}AGe.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 zLt(e,t){let n=t.copyrightText;l(n)&&(e.credit=new bt(n));let i=t.spatialReference,o=i.latestWkid??i.wkid,r=t.extent,s={ellipsoid:e.ellipsoid};if(o===4326)s.rectangle=ae.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 M(r.xmin,r.ymin),s.rectangleNortheastInMeters=new M(r.xmax,r.ymax),e.tilingScheme=new Fs(s)}else throw new le("Invalid spatial reference");let a=t.tileInfo;if(!l(a))throw new le("tileInfo is required");e.width=a.rows+1,e.height=a.cols+1,e.encoding=a.format==="LERC"?ah.LERC:ah.NONE,e.lodCount=a.lods.length-1,(e.hasAvailability=t.capabilities.indexOf("Tilemap")!==-1)&&(e.tilesAvailable=new Hf(e.tilingScheme,e.lodCount),e.tilesAvailable.addAvailableTileRange(0,0,0,e.tilingScheme.getNumberOfXTilesAtLevel(0),e.tilingScheme.getNumberOfYTilesAtLevel(0)),e.tilesAvailabilityLoaded=new Hf(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 HLt(e,t,n){try{let i=await t.fetchJson();zLt(e,i)}catch(i){let o=`An error occurred while accessing ${t}.`;throw Bo.reportError(void 0,n,l(n)?n._errorEvent:void 0,o),i}}function zx(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(zx.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}}});zx.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 AGe(t);await HLt(o,i);let r=new zx(t);return o.build(r),r._resource=n,r};zx.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(Ste(this,n+1,e*2,t*2))){let h=ZGe(this,n+1,e*2,t*2);s=h.promise,a=h.request}let c=o.fetchArrayBuffer();if(!l(c)||!l(s))return;let d=this,u=this._tilesAvailable;return Promise.all([c,s]).then(function(h){return new Wc({buffer:h[0],width:d._width,height:d._height,childTileMask:r?u.computeChildMaskForTile(n,e,t):BLt,structure:d._terrainDataStructure,encoding:d._encoding})}).catch(async function(h){if(l(a)&&a.state===ui.CANCELLED){i.cancel();try{await i.deferred?.promise}catch{}return i.state=ui.CANCELLED,Promise.reject(h)}return Promise.reject(h)})};function Ste(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}zx.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};zx.prototype.getTileDataAvailable=function(e,t,n){if(!this._hasAvailability)return;let i=Ste(this,n,e,t);if(l(i))return i;ZGe(this,n,e,t)};zx.prototype.loadTileDataAvailability=function(e,t,n){};function KLt(e,t,n,i){let o=t-1,r=n-1,s=i[e.y*t+e.x],a=[],c={startX:e.x,startY:e.y,endX:0,endY:0},d=new M(e.x+1,e.y+1),u=!1,h=!1;for(;!(u&&h);){let p=d.x,b=h?d.y+1:d.y;if(!u){for(let f=e.y;f<b;++f)if(i[f*t+d.x]!==s){u=!0;break}u?(a.push(new M(d.x,e.y)),--d.x,--p,c.endX=d.x):d.x===o?(c.endX=d.x,u=!0):++d.x}if(!h){let f=d.y*t;for(let y=e.x;y<=p;++y)if(i[f+y]!==s){h=!0;break}h?(a.push(new M(e.x,d.y)),--d.y,c.endY=d.y):d.y===r?(c.endY=d.y,h=!0):++d.y}}return{endingIndices:a,range:c,value:s}}function JLt(e,t,n,i,o){let r=[];if(o.every(function(c){return c===o[0]}))return o[0]===1&&r.push({startX:e,startY:t,endX:e+n-1,endY:t+i-1}),r;let a=[new M(0,0)];for(;a.length>0;){let c=a.pop(),d=KLt(c,n,i,o);if(d.value===1){let h=d.range;h.startX+=e,h.endX+=e,h.startY+=t,h.endY+=t,r.push(h)}let u=d.endingIndices;u.length>0&&(a=a.concat(u))}return r}function ZGe(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 fr({throttle:!1,throttleByServer:!0,type:ks.TERRAIN}),h=e._resource.getDerivedResource({url:a,request:d}).fetchJson();return l(h)?(h=h.then(function(p){let b=JLt(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 Ste(e,t,n,i)}),c[a]={promise:h,request:d},h=h.finally(function(p){return delete c[a],p}),{promise:h,request:d}):{}}var Ate=zx;var hpo=x(T(),1);var CGe="https://dev.virtualearth.net/REST/v1/Locations";function Zte(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:CGe,queryParameters:n}),this._credit=new bt('<img src="http://dev.virtualearth.net/Branding/logo_powered_by.png"/>',!1)}Object.defineProperties(Zte.prototype,{url:{get:function(){return CGe}},key:{get:function(){return this._key}},credit:{get:function(){return this._credit}}});Zte.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:ae.fromDegrees(a,s,d,c)}})})};var Cte=Zte;var bpo=x(T(),1);function Vte(){}Object.defineProperties(Vte.prototype,{credit:{get:function(){}}});Vte.prototype.geocode=function(e){let t=e.match(/[^\s,\n]+/g);if(t.length===2||t.length===3){let n=+t[0],i=+t[1],o=t.length===3?+t[2]:300;if(isNaN(n)&&isNaN(i)){let r=/^(\d+.?\d*)([nsew])/i;for(let s=0;s<t.length;++s){let a=t[s].match(r);r.test(t[s])&&a.length===3&&(/^[ns]/i.test(a[2])?i=/^[n]/i.test(a[2])?+a[1]:-a[1]:/^[ew]/i.test(a[2])&&(n=/^[e]/i.test(a[2])?+a[1]:-a[1]))}}if(!isNaN(n)&&!isNaN(i)&&!isNaN(o)){let r={displayName:e,destination:m.fromDegrees(n,i,o)};return Promise.resolve([r])}}return Promise.resolve([])};var Rte=Vte;var Cpo=x(T(),1);var jLt=new se,VGe=new m,r1=new m;function QLt(e){let t=e.points,n=e.times;if(t.length<3){let i=n[0],o=1/(n[1]-i),r=t[0],s=t[1];return function(a,c){l(c)||(c=new m);let d=(a-i)*o;return m.lerp(r,s,d,c)}}return function(i,o){l(o)||(o=new m);let r=e._lastTimeIndex=e.findTimeInterval(i,e._lastTimeIndex),s=(i-n[r])/(n[r+1]-n[r]),a=jLt;a.z=s,a.y=s*s,a.x=a.y*s,a.w=1;let c,d,u,h,p;return r===0?(c=t[0],d=t[1],u=e.firstTangent,h=m.subtract(t[2],c,VGe),m.multiplyByScalar(h,.5,h),p=F.multiplyByVector(Iy.hermiteCoefficientMatrix,a,a)):r===t.length-2?(c=t[r],d=t[r+1],h=e.lastTangent,u=m.subtract(d,t[r-1],VGe),m.multiplyByScalar(u,.5,u),p=F.multiplyByVector(Iy.hermiteCoefficientMatrix,a,a)):(c=t[r-1],d=t[r],u=t[r+1],h=t[r+2],p=F.multiplyByVector(Hx.catmullRomCoefficientMatrix,a,a)),o=m.multiplyByScalar(c,p.x,o),m.multiplyByScalar(d,p.y,r1),m.add(o,r1,o),m.multiplyByScalar(u,p.z,r1),m.add(o,r1,o),m.multiplyByScalar(h,p.w,r1),m.add(o,r1,o)}}var qLt=new m,$Lt=new m;function Hx(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=qLt,m.multiplyByScalar(t[1],2,i),m.subtract(i,t[2],i),m.subtract(i,t[0],i),m.multiplyByScalar(i,.5,i)),!l(o))){let r=t.length-1;o=$Lt,m.multiplyByScalar(t[r-1],2,o),m.subtract(t[r],o,o),m.add(o,t[r-2],o),m.multiplyByScalar(o,.5,o)}this._times=n,this._points=t,this._firstTangent=m.clone(i),this._lastTangent=m.clone(o),this._evaluateFunction=QLt(this),this._lastTimeIndex=0}Object.defineProperties(Hx.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}}});Hx.catmullRomCoefficientMatrix=new F(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0);Hx.prototype.findTimeInterval=xo.prototype.findTimeInterval;Hx.prototype.wrapTime=xo.prototype.wrapTime;Hx.prototype.clampTime=xo.prototype.clampTime;Hx.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var Ete=Hx;var g0o=x(T(),1);var Jpo=x(T(),1);var Gte={},eWt={positions:void 0,normals:void 0,indices:void 0,edgeIndicesWest:void 0,edgeIndicesSouth:void 0,edgeIndicesEast:void 0,edgeIndicesNorth:void 0},tWt=new pe,nWt=new m,iWt=new F,oWt=new F,rWt=new F,sWt=new m,aWt=new m,cWt=new m,lWt=new m,dWt=new pe,uWt=new M,V9=new m,mWt=new M,hWt=new m,fWt=new m,fz=function(e,t){return e-t};Gte.createMesh=async function(e){e=e??B.EMPTY_OBJECT;let{exaggeration:t=1,exaggerationRelativeHeight:n=0,hasVertexNormals:i,hasWebMercatorT:o,gltf:r,minimumHeight:s,maximumHeight:a,skirtHeight:c}=e,u=t!==1,h=de.clone(e.boundingSphere,new de),p=$t.clone(e.orientedBoundingBox,new $t),b=m.clone(e.horizonOcclusionPoint,new m),f=ie.clone(e.ellipsoid,new ie),y=ae.clone(e.rectangle,new ae);await(r.extensionsRequired!==void 0&&r.extensionsRequired.indexOf("EXT_meshopt_compression")!==-1?yy.ready:Promise.resolve(void 0));let A=y.west,Z=y.south,V=y.north,E=y.width,L=y.height,v=ae.center(y,tWt);v.height=.5*(s+a);let I=pe.toCartesian(v,f,nWt),X=dt.eastNorthUpToFixedFrame(I,f,iWt),N=F.inverseTransformation(X,oWt),g=F.unpack(r.nodes[0].matrix,0,rWt);g=F.multiply(to.Y_UP_TO_Z_UP,g,g);let C=HWt(r,i,eWt),R=Mo.getSkirtVertexCount(C.edgeIndicesWest,C.edgeIndicesSouth,C.edgeIndicesEast,C.edgeIndicesNorth),G=C.positions,P=C.normals,Y=C.indices,O=G.length/3,k=O+R,D=Y.length,w=Mo.getSkirtIndexCountWithFilledCorners(R),z=k<=65535?Uint16Array:Uint32Array,J=new z(D+w);J.set(Y);let ee=new z(C.edgeIndicesWest),H=new z(C.edgeIndicesSouth),te=new z(C.edgeIndicesEast),$=new z(C.edgeIndicesNorth),be=new z(ee).sort(),ye=new z(H).sort(),ce=new z(te).sort(),Ze=new z($).sort(),xe=li.geodeticLatitudeToMercatorAngle(Z),Ve=1/(li.geodeticLatitudeToMercatorAngle(V)-xe),Ye=m.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,sWt),ke=m.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,aWt),it=new mr(h.center,void 0,void 0,void 0,void 0,i,o,u,t,n),pt=it.stride,Vt=new Float32Array(k*pt),Ue=0;for(let ht=0;ht<O;ht++){let ot=m.unpack(G,ht*3,cWt),Jt=F.multiplyByPoint(g,ot,lWt),jt=pe.fromCartesian(Jt,f,dWt),{longitude:yt,latitude:Gt,height:ln}=jt,st=(yt-A)/E,Nn=(Gt-Z)/L;st=W.clamp(st,0,1),Nn=W.clamp(Nn,0,1),bo(be,ht,fz)>=0?st=0:bo(ce,ht,fz)>=0&&(st=1),bo(ye,ht,fz)>=0?Nn=0:bo(Ze,ht,fz)>=0&&(Nn=1);let Zi=M.fromElements(st,Nn,uWt),Ci;if(i){let ri=m.unpack(P,ht*3,V9);ri=F.multiplyByPointAsVector(g,ri,V9),ri=m.normalize(ri,V9),Ci=cn.octEncode(ri,mWt)}let Dt;o&&(Dt=(li.geodeticLatitudeToMercatorAngle(Gt)-xe)*Ve);let Ro;u&&(Ro=f.geodeticSurfaceNormal(Jt,hWt)),Ue=it.encode(Vt,Ue,Jt,Zi,ln,Ci,Dt,Ro);let ki=F.multiplyByPoint(N,Jt,fWt);Ye=m.minimumByComponent(ki,Ye,Ye),ke=m.maximumByComponent(ki,ke,ke)}let St=new uc(m.clone(it.center,new m),Vt,J,D,O,s,a,y,de.clone(h,new de),m.clone(b,new m),pt,$t.clone(p,new $t),it,ee,H,te,$);return FGe(St,y,f,Ye,ke,X,N,c),Promise.resolve(St)};var pWt=new M,bWt=new M,gWt=new Array(6),yWt=new M,xWt=new M,TWt=new M,_Wt=new m,SWt=new m,AWt=new m,ZWt=new pe,CWt=new m,VWt=new pe,RWt=new pe,RGe=new m,EWt=new m,GWt=new m,LWt=new m,WWt=new m,vWt=new m,FWt=new m,IWt=new m,PWt=new F,XWt=new F,EGe=new M,NWt=new M,YWt=new m,wWt=new de,MWt=new $t,kWt=new au,GGe=new m,LGe=new M,UWt=new M,WGe=new m,DWt=new m;function OWt(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);yy.decodeVertexBuffer(new Uint8Array(u.buffer),o,c,a);let h=(1<<u.BYTES_PER_ELEMENT*8)-1,p=new Float32Array(o*3);for(let b=0;b<o;b++)p[b*3+0]=u[b*4+0]/h,p[b*3+1]=u[b*4+1]/h,p[b*3+2]=u[b*4+2]/h;return p}function BWt(e){let t=e.meshes[0].primitives[0],n=e.accessors[t.attributes.NORMAL],i=e.bufferViews[n.bufferView],o=n.count,r=i.extensions?i.extensions.EXT_meshopt_compression:void 0;if(r===void 0){let h=e.buffers[i.buffer].extras._pipeline.source;return new Float32Array(h.buffer,h.byteOffset+(i.byteOffset??0)+(n.byteOffset??0),o*3)}let s=e.buffers[r.buffer].extras._pipeline.source,a=new Uint8Array(s.buffer,s.byteOffset+(r.byteOffset??0)+(n.byteOffset??0),r.byteLength),c=r.byteStride,d=new Int8Array(o*c);yy.decodeVertexBuffer(new Uint8Array(d.buffer),o,c,a);let u=new Float32Array(o*3);for(let h=0;h<o;h++){let p=Math.max(d[h*4+0]/127,-1),b=Math.max(d[h*4+1]/127,-1),f=1-(Math.abs(p)+Math.abs(b));if(f<0){let _=p,S=b;p=(1-Math.abs(S))*W.signNotZero(_),b=(1-Math.abs(_))*W.signNotZero(S)}let y=V9;y.x=p,y.y=b,y.z=f,y=m.normalize(y,V9),u[h*3+0]=y.x,u[h*3+1]=y.y,u[h*3+2]=y.z}return u}function zWt(e){let t=e.meshes[0].primitives[0],n=e.accessors[t.indices],i=e.bufferViews[n.bufferView],o=n.count,r=n.componentType===K.UNSIGNED_SHORT?Uint16Array:Uint32Array,s=i.extensions?i.extensions.EXT_meshopt_compression:void 0;if(s===void 0){let u=e.buffers[i.buffer].extras._pipeline.source;return new r(u.buffer,u.byteOffset+(i.byteOffset??0)+(n.byteOffset??0),o)}let a=e.buffers[s.buffer].extras._pipeline.source,c=new Uint8Array(a.buffer,a.byteOffset+(s.byteOffset??0)+(n.byteOffset??0),s.byteLength),d=new r(o);return yy.decodeIndexBuffer(new Uint8Array(d.buffer),o,s.byteStride,c),d}function pz(e,t){let n=e.meshes[0].primitives[0],i=e.accessors[n.extensions.CESIUM_tile_edges[t]],o=e.bufferViews[i.bufferView],r=i.count,s=i.componentType===K.UNSIGNED_SHORT?Uint16Array:Uint32Array,a=o.extensions?o.extensions.EXT_meshopt_compression:void 0;if(a===void 0){let p=e.buffers[o.buffer].extras._pipeline.source;return new s(p.buffer,p.byteOffset+(o.byteOffset??0)+(i.byteOffset??0),r)}let c=e.buffers[a.buffer].extras._pipeline.source,d=new Uint8Array(c.buffer,c.byteOffset+(a.byteOffset??0)+(i.byteOffset??0),a.byteLength),u=new s(r),h=a.byteStride;return yy.decodeIndexSequence(new Uint8Array(u.buffer),r,h,d),u}function HWt(e,t,n){return n.positions=OWt(e),n.normals=t?BWt(e):void 0,n.indices=zWt(e),n.edgeIndicesWest=pz(e,"left"),n.edgeIndicesSouth=pz(e,"bottom"),n.edgeIndicesEast=pz(e,"right"),n.edgeIndicesNorth=pz(e,"top"),n}Gte.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),h=u.hasVertexNormals,p=u.hasWebMercatorT,b=u.exaggeration,f=u.exaggerationRelativeHeight,_=b!==1,S=ae.clone(e.rectangle,new ae),A=ie.clone(e.ellipsoid),Z=[],V=[],E=[],L=[],v=[],I=[],X=[],N=[];svt(t,n,s,a,c,d,u,L,v,I,X,N,Z,E,V);let g=ae.center(S,ZWt);g.height=.5*(i+o);let C=pe.toCartesian(g,A,CWt),R=Z.length,G=new mr(C,void 0,void 0,void 0,void 0,h,p,_,b,f),P=G.stride,Y=Mo.getSkirtVertexCount(v,I,X,N),O=R+Y,k=L.length,D=Mo.getSkirtIndexCountWithFilledCorners(Y),w=k+D,z=O<=65535?Uint16Array:Uint32Array,J=new z(w);J.set(L);let ee=new z(v),H=new z(I),te=new z(X),$=new z(N),be=new Float32Array(O*P),ye=0,ce=dt.eastNorthUpToFixedFrame(C,A,PWt),Ze=F.inverseTransformation(ce,XWt),xe=S.west,Ge=S.east,Ve=S.south,Ye=S.north,ke=li.geodeticLatitudeToMercatorAngle(Ve),pt=1/(li.geodeticLatitudeToMercatorAngle(Ye)-ke),Vt=Number.POSITIVE_INFINITY,Ue=Number.NEGATIVE_INFINITY,St=m.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,FWt),ht=m.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,IWt);for(let ln=0;ln<R;ln++){let st=Z[ln],Nn=a[st*3+0],Zi=a[st*3+1],Ci=a[st*3+2],Dt=NWt;Dt.x=V[ln*2+0],Dt.y=V[ln*2+1];let Ro=Dt.x,ki=Dt.y,ri=E[ln*2+0],kn=E[ln*2+1],Yn=1-ri-kn,Ui=u.decodeHeight(d,Nn),Vi=u.decodeHeight(d,Zi),ir=u.decodeHeight(d,Ci),wr=Ui*ri+Vi*kn+ir*Yn;Vt=Math.min(wr,Vt),Ue=Math.max(wr,Ue);let Ss=W.lerp(xe,Ge,Ro),Vr=W.lerp(Ve,Ye,ki),wn=pe.fromRadians(Ss,Vr,wr,RWt),uo=pe.toCartesian(wn,A,EWt),An=F.multiplyByPoint(Ze,uo,LWt);St=m.minimumByComponent(An,St,St),ht=m.maximumByComponent(An,ht,ht);let Uo;if(h){let Wi=u.decodeNormal(d,Nn,_Wt),Go=u.decodeNormal(d,Zi,SWt),gc=u.decodeNormal(d,Ci,AWt),ws=m.fromElements(Wi.x*ri+Go.x*kn+gc.x*Yn,Wi.y*ri+Go.y*kn+gc.y*Yn,Wi.z*ri+Go.z*kn+gc.z*Yn,GGe);ws=m.normalize(ws,GGe),Uo=cn.octEncode(ws,UWt)}let Eo;p&&(Eo=(li.geodeticLatitudeToMercatorAngle(Vr)-ke)*pt);let na;_&&(na=A.geodeticSurfaceNormal(uo,DWt)),ye=G.encode(be,ye,uo,Dt,wr,Uo,Eo,na)}let ot=$t.fromRectangle(S,Vt,Ue,A,MWt),Jt=de.fromVertices(be,G.center,P,wWt),yt=new _f(A).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(G.center,be,P,G.center,Vt,YWt),Gt=new uc(m.clone(G.center,new m),be,J,k,R,Vt,Ue,S,de.clone(Jt),m.clone(yt),P,$t.clone(ot),G,ee,H,te,$);return FGe(Gt,S,A,St,ht,ce,Ze,r),Gt};function FGe(e,t,n,i,o,r,s,a){let{encoding:c}=e,d=c.stride,u=e.vertices,{hasVertexNormals:h,hasWebMercatorT:p,exaggeration:b,exaggerationRelativeHeight:f}=c,_=b!==1,S=e.vertexCountWithoutSkirts,A=S*d,Z=u.length/d,V=Z-S,E=e.indices,L=e.indexCountWithoutSkirts,v=e.westIndicesSouthToNorth,I=e.southIndicesEastToWest,X=e.eastIndicesNorthToSouth,N=e.northIndicesWestToEast;Mo.addSkirtIndicesWithFilledCorners(v,I,X,N,S,E,L);let g=0,C=g+v.length,R=C+I.length,G=R+X.length,P=[v,I,X,N],Y=[g,C,R,G],O=[-1,0,1,0],k=[0,-1,0,1],D=m.clone(i,WWt),w=m.clone(o,vWt),z=e.maximumHeight,J=e.minimumHeight-a;for(let te=0;te<V;te++){let $=0;for($=0;$<3&&!(te<Y[$+1]);$++);let be=P[$][te-Y[$]],ye=c.decodeTextureCoordinates(u,be,EGe),ce=1e-4,Ze=ye.x+O[$]*ce,xe=ye.y+k[$]*ce,Ge=W.lerp(t.west,t.east,Ze),Ve=W.clamp(W.lerp(t.south,t.north,xe),-W.PI_OVER_TWO,+W.PI_OVER_TWO),ke=c.decodeHeight(u,be)-a,it=pe.fromRadians(Ge,Ve,ke,VWt),pt=pe.toCartesian(it,n,RGe),Vt;h&&(Vt=c.getOctEncodedNormal(u,be,LGe));let Ue;p&&(Ue=c.decodeWebMercatorT(u,be));let St;_&&(St=n.geodeticSurfaceNormal(pt,WGe)),A=c.encode(u,A,pt,ye,ke,Vt,Ue,St);let ht=F.multiplyByPoint(s,pt,GWt);m.minimumByComponent(ht,D,D),m.maximumByComponent(ht,w,w)}let ee=au.fromCorners(D,w,kWt),H=new mr(c.center,ee,J,z,r,c.hasVertexNormals,c.hasWebMercatorT,_,b,f);if(c.quantization!==H.quantization){let te=H,$=te.stride,be=new Float32Array(Z*$),ye=0;for(let ce=0;ce<Z;ce++)ye=te.encode(be,ye,c.decodePosition(u,ce,RGe),c.decodeTextureCoordinates(u,ce,EGe),c.decodeHeight(u,ce),c.hasVertexNormals?c.getOctEncodedNormal(u,ce,LGe):void 0,c.hasWebMercatorT?c.decodeWebMercatorT(u,ce):void 0,c.hasGeodeticSurfaceNormals?c.decodeGeodeticSurfaceNormal(u,ce,WGe):void 0);e.vertices=be,e.stride=$,e.encoding=te}return e}var Lte=0,KWt=1,Wte=2,vte=3,JWt=4,jWt=new m,QWt=[new m,new m,new m,new m,new m,new m],qWt=[new M,new M,new M,new M,new M,new M],$Wt=[new m,new m,new m,new m,new m,new m],evt=[new M,new M,new M,new M,new M,new M];function vGe(e,t,n,i){switch(n){case Lte:return W.sign(i.x-e.x);case Wte:return W.sign(t.x-i.x);case vte:return W.sign(i.y-e.y);default:return W.sign(t.y-i.y)}}function tvt(e,t,n,i,o,r){let s,a,c;switch(n){case Lte:s=(e.x-i.x)/(o.x-i.x),a=e.x,c=i.y+(o.y-i.y)*s;break;case Wte:s=(t.x-i.x)/(o.x-i.x),a=t.x,c=i.y+(o.y-i.y)*s;break;case vte:s=(e.y-i.y)/(o.y-i.y),a=i.x+(o.x-i.x)*s,c=e.y;break;default:s=(t.y-i.y)/(o.y-i.y),a=i.x+(o.x-i.x)*s,c=t.y;break}return m.fromElements(a,c,s,r)}var nvt={length:0,coordinates:[new M,new M,new M,new M,new M,new M],barycentricCoordinates:[new m,new m,new m,new m,new m,new m]};function ivt(e,t,n,i,o,r,s,a){let c=0,d=qWt,u=QWt,h=3,p=evt;M.clone(o,p[0]),M.clone(r,p[1]),M.clone(s,p[2]);let b=$Wt;m.fromElements(1,0,0,b[0]),m.fromElements(0,1,0,b[1]),m.fromElements(0,0,1,b[2]);for(let f=0;f<t;f++){let y=(e+f)%JWt,_=d,S=u;d=p,u=b,c=h,p=_,b=S,h=0;let A=c-1,Z=d[A],V=u[A],E=vGe(n,i,y,Z);for(let L=0;L<c;L++){let v=d[L],I=u[L],X=vGe(n,i,y,v);if(E*X===-1){let N=tvt(n,i,y,Z,v,jWt),{x:g,y:C,z:R}=N,G=1-R,P=V.x*G+I.x*R,Y=V.y*G+I.y*R,O=V.z*G+I.z*R;M.fromElements(g,C,p[h]),m.fromElements(P,Y,O,b[h]),h++}X>=0&&(M.clone(v,p[h]),m.clone(I,b[h]),h++),A=L,Z=v,V=I,E=X}if(h===0)break}a.length=h;for(let f=0;f<h;f++)M.clone(p[f],a.coordinates[f]),m.clone(b[f],a.barycentricCoordinates[f]);return a}function ovt(e,t,n,i,o,r,s,a){return ivt(e?t?vte:Lte:t?Wte:KWt,2,n,i,o,r,s,a)}var rvt=[[],[0],[1],[0,1],[2],[0,2],[1,2],[0,1,2]];function svt(e,t,n,i,o,r,s,a,c,d,u,h,p,b,f){let y={},_=e?.5:0,S=e?1:.5,A=t?.5:0,Z=t?1:.5,V=pWt;V.x=_,V.y=A;let E=bWt;E.x=S,E.y=Z;let L=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,yWt),C=s.decodeTextureCoordinates(r,X,xWt),R=s.decodeTextureCoordinates(r,N,TWt),G=ovt(e,t,V,E,g,C,R,nvt),P=G.length;if(P<3)continue;let Y=gWt;for(let w=0;w<P;w++){let z=G.barycentricCoordinates[w],J=z.x,ee=z.y,H=z.z,te=Math.ceil(J)|Math.ceil(ee)<<1|Math.ceil(H)<<2,$=rvt[te],be,ye=!1;if($.length===1){let ce=$[0],xe=i[v+ce];be=y[xe],be===void 0&&(ye=!0,be=L++,y[xe]=be)}else if($.length===2){let ce=$[0],Ze=$[1],xe=i[v+ce],Ge=i[v+Ze],Ve=G.barycentricCoordinates[(w+P-1)%P],Ye=Math.ceil(Ve.x)|Math.ceil(Ve.y)<<1|Math.ceil(Ve.z)<<2,ke=te===Ye,it=Math.min(xe,Ge),pt=Math.max(xe,Ge),Vt=o+2*(it*o+pt),Ue=Vt+0,St=Vt+1,ht=y[Ue],ot=y[St],Jt=!ke==(ht===void 0||ot===void 0);if(be=Jt?ht:ot,be===void 0){ye=!0,be=L++;let jt=Jt?Ue:St;y[jt]=be}}else ye=!0,be=L++;if(Y[w]=be,ye){let ce=v/3;p.push(ce);let Ze=G.coordinates[w],xe=(Ze.x-_)/(S-_),Ge=(Ze.y-A)/(Z-A);f.push(xe,Ge),b.push(J,ee),xe===0?c.push(be):xe===1&&u.push(be),Ge===0?d.push(be):Ge===1&&h.push(be)}}let O=Y[0],k=Y[1],D=Y[2];a.push(O,k,D);for(let w=3;w<P;w++)k=D,D=Y[w],a.push(O,k,D)}c.sort(function(v,I){return f[v*2+1]-f[I*2+1]}),d.sort(function(v,I){return f[I*2+0]-f[v*2+0]}),u.sort(function(v,I){return f[I*2+1]-f[v*2+1]}),h.sort(function(v,I){return f[v*2+0]-f[I*2+0]})}var s1=Gte;var e0o=x(T(),1);var bz={};bz.clipTriangleAtAxisAlignedThreshold=function(e,t,n,i,o,r){l(r)?r.length=0:r=[];let s,a,c;t?(s=n<e,a=i<e,c=o<e):(s=n>e,a=i>e,c=o>e);let d=s+a+c,u,h,p,b,f,y;return d===1?s?(u=(e-n)/(i-n),h=(e-n)/(o-n),r.push(1),r.push(2),h!==1&&(r.push(-1),r.push(0),r.push(2),r.push(h)),u!==1&&(r.push(-1),r.push(0),r.push(1),r.push(u))):a?(p=(e-i)/(o-i),b=(e-i)/(n-i),r.push(2),r.push(0),b!==1&&(r.push(-1),r.push(1),r.push(0),r.push(b)),p!==1&&(r.push(-1),r.push(1),r.push(2),r.push(p))):c&&(f=(e-o)/(n-o),y=(e-o)/(i-o),r.push(0),r.push(1),y!==1&&(r.push(-1),r.push(2),r.push(1),r.push(y)),f!==1&&(r.push(-1),r.push(2),r.push(0),r.push(f))):d===2?!s&&n!==e?(b=(e-i)/(n-i),f=(e-o)/(n-o),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(b),r.push(-1),r.push(2),r.push(0),r.push(f)):!a&&i!==e?(y=(e-o)/(i-o),u=(e-n)/(i-n),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(y),r.push(-1),r.push(0),r.push(1),r.push(u)):!c&&o!==e&&(h=(e-n)/(o-n),p=(e-i)/(o-i),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(h),r.push(-1),r.push(1),r.push(2),r.push(p)):d!==3&&(r.push(0),r.push(1),r.push(2)),r};bz.computeBarycentricCoordinates=function(e,t,n,i,o,r,s,a,c){let d=n-s,u=s-o,h=r-a,p=i-a,b=1/(h*d+u*p),f=t-a,y=e-s,_=(h*y+u*f)*b,S=(-p*y+d*f)*b,A=1-_-S;return l(c)?(c.x=_,c.y=S,c.z=A,c):new m(_,S,A)};bz.computeLineSegmentLineSegmentIntersection=function(e,t,n,i,o,r,s,a,c){let d=(s-o)*(t-r)-(a-r)*(e-o),u=(n-e)*(t-r)-(i-t)*(e-o),h=(a-r)*(n-e)-(s-o)*(i-t);if(h===0)return;let p=d/h,b=u/h;if(p>=0&&p<=1&&b>=0&&b<=1)return l(c)||(c=new M),c.x=e+p*(n-e),c.y=t+p*(i-t),c};var Kf=bz;function Fg(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=$t.clone(e.orientedBoundingBox,new $t),this._horizonOcclusionPoint=m.clone(e.horizonOcclusionPoint,new m),this._hasVertexNormals=e.requestVertexNormals??!1,this._hasWaterMask=e.requestWaterMask??!1,this._hasWebMercatorT=!0,this._credits=e.credits,this._childTileMask=e.childTileMask??15,this._gltf=e.gltf,this._mesh=void 0,this._waterMask=e.waterMask}Object.defineProperties(Fg.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}}});Fg.prototype.interpolateHeight=function(e,t,n){let i=this._mesh;return i===void 0?void 0:PGe(i,e,t,n)};Fg.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 IGe="createVerticesFromCesium3DTilesTerrain",avt=new Hn(IGe),cvt=new Hn(IGe,Od.maximumAsynchronousTasks);Fg.prototype.createMesh=function(e){e=e??B.EMPTY_OBJECT;let n=e.throttle??!0?cvt:avt,i=e.tilingScheme,o=i.ellipsoid,r=e.x,s=e.y,a=e.level,c=i.tileXYToRectangle(r,s,a,new ae),d=this._gltf,u=n.scheduleTask({ellipsoid:o,rectangle:c,hasVertexNormals:this._hasVertexNormals,hasWaterMask:this._hasWaterMask,hasWebMercatorT:this._hasWebMercatorT,gltf:d,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,boundingSphere:this._boundingSphere,orientedBoundingBox:this._orientedBoundingBox,horizonOcclusionPoint:this._horizonOcclusionPoint,skirtHeight:this._skirtHeight,exaggeration:e.exaggeration,exaggerationRelativeHeight:e.exaggerationRelativeHeight});if(!l(u))return;let h=this;return Promise.resolve(u).then(function(p){let b=p,f=mr.clone(b.encoding,new mr),y=new Float32Array(b.verticesBuffer),_=y.length/f.stride,S=b.vertexCountWithoutSkirts,A=_<=65535?Uint16Array:Uint32Array,Z=new A(b.indicesBuffer),V=new A(b.westIndicesBuffer),E=new A(b.eastIndicesBuffer),L=new A(b.southIndicesBuffer),v=new A(b.northIndicesBuffer),I=b.indexCountWithoutSkirts,X=h._minimumHeight,N=h._maximumHeight,g=m.clone(f.center,new m),C=de.clone(h._boundingSphere,new de),R=m.clone(h._horizonOcclusionPoint,new m),G=$t.clone(h._orientedBoundingBox,new $t),P=new uc(g,y,Z,I,S,X,N,c,C,R,f.stride,G,f,V,L,E,v);return h._mesh=P,Promise.resolve(P)})};Fg.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 ae),a=s1.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)})};Fg.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;return a===void 0?void 0:gz(!1,a,this._skirtHeight,this._credits,e,t,n,i,o,r,s)};Fg.prototype._upsampleSync=function(e,t,n,i,o,r,s){let a=this._mesh;return a===void 0?void 0:gz(!0,a,this._skirtHeight,this._credits,e,t,n,i,o,r,s)};Fg.prototype.wasCreatedByUpsampling=function(){return!1};function vg(e){e=e??B.EMPTY_OBJECT,this._mesh=e.terrainMesh,this._skirtHeight=e.skirtHeight,this._credits=e.credits}vg.prototype.createMesh=function(e){return e=e??B.EMPTY_OBJECT,Promise.resolve(this._mesh)};vg.prototype.upsample=function(e,t,n,i,o,r,s){return gz(!1,this._mesh,this._skirtHeight,this._credits,e,t,n,i,o,r,s)};vg.prototype._upsampleSync=function(e,t,n,i,o,r,s){return gz(!0,this._mesh,this._skirtHeight,this._credits,e,t,n,i,o,r,s)};vg.prototype.interpolateHeight=function(e,t,n){let i=this._mesh;return PGe(i,e,t,n)};vg.prototype.wasCreatedByUpsampling=function(){return!0};vg.prototype.isChildAvailable=function(e,t,n,i){return!1};Object.defineProperties(vg.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var lvt=new Hn("upsampleVerticesFromCesium3DTilesTerrain",Od.maximumAsynchronousTasks);function gz(e,t,n,i,o,r,s,a,c,d,u){if(u-a>1)throw new he("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 ae),_=o.ellipsoid,S={isEastChild:b,isNorthChild:f,rectangle:y,ellipsoid:_,skirtHeight:p,parentVertices:t.vertices,parentIndices:t.indices,parentVertexCountWithoutSkirts:t.vertexCountWithoutSkirts,parentIndexCountWithoutSkirts:t.indexCountWithoutSkirts,parentMinimumHeight:t.minimumHeight,parentMaximumHeight:t.maximumHeight,parentEncoding:t.encoding};if(e){let Z=s1.upsampleMesh(S),V=new vg({terrainMesh:Z,skirtHeight:p,credits:i});return Promise.resolve(V)}let A=lvt.scheduleTask(S);if(A!==void 0)return A.then(function(Z){let V=mr.clone(Z.encoding,new mr),E=V.stride,L=new Float32Array(Z.verticesBuffer),v=L.length/E,I=Z.vertexCountWithoutSkirts,X=v<=65535?Uint16Array:Uint32Array,N=new X(Z.indicesBuffer),g=new X(Z.westIndicesBuffer),C=new X(Z.eastIndicesBuffer),R=new X(Z.southIndicesBuffer),G=new X(Z.northIndicesBuffer),P=Z.indexCountWithoutSkirts,Y=Z.minimumHeight,O=Z.maximumHeight,k=m.clone(V.center,new m),D=de.clone(Z.boundingSphere,new de),w=m.clone(Z.horizonOcclusionPoint,new m),z=$t.clone(Z.orientedBoundingBox,new $t),J=new uc(k,L,N,P,I,Y,O,y,D,w,E,z,V,g,R,C,G),ee=new vg({terrainMesh:J,skirtHeight:p,credits:i});return Promise.resolve(ee)})}var dvt=new M,uvt=new M,mvt=new M,hvt=new m;function PGe(e,t,n,i){let o=W.clamp((n-t.west)/t.width,0,1),r=W.clamp((i-t.south)/t.height,0,1),{vertices:s,encoding:a,indices:c}=e;for(let d=0;d<e.indexCountWithoutSkirts;d+=3){let u=c[d],h=c[d+1],p=c[d+2],b=a.decodeTextureCoordinates(s,u,dvt),f=a.decodeTextureCoordinates(s,h,uvt),y=a.decodeTextureCoordinates(s,p,mvt),_=Math.min(b.x,f.x,y.x),S=Math.max(b.x,f.x,y.x),A=Math.min(b.y,f.y,y.y),Z=Math.max(b.y,f.y,y.y);if(o>=_&&o<=S&&r>=A&&r<=Z){let V=Kf.computeBarycentricCoordinates(o,r,b.x,b.y,f.x,f.y,y.x,y.y,hvt);if(V.x>=0&&V.y>=0&&V.z>=0){let E=a.decodeHeight(s,u),L=a.decodeHeight(s,h),v=a.decodeHeight(s,p);return V.x*E+V.y*L+V.z*v}}}return 0}var R9=Fg;var B0o=x(T(),1);function T0(e){e=e??B.EMPTY_OBJECT;let t=e.credit;typeof t=="string"&&(t=new bt(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 vA({provider:this}),this._tileset0=void 0,this._tileset1=void 0,this._resource=void 0,this._requestVertexNormals=e.requestVertexNormals??!1,this._requestWaterMask=e.requestWaterMask??!1}T0.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 le("Could not load tileset JSON",u)}let o=new T0(t);o._tileCredits=n.credits,o._resource=n;let r=i.root.children,s=r[0],a=r[1],c=i.schema,d=Ml.fromJson(c);return o._tileset0=new Ip(n,s,d),o._tileset1=new Ip(n,a,d),o};T0.fromIonAssetId=async function(e,t){let n=await ss.fromAssetId(e);return T0.fromUrl(n,t)};var fvt=new Array(3);T0.prototype.requestTileGeometry=async function(e,t,n,i){let o=NGe(n,e),r=o===0?this._tileset0:this._tileset1,s=YGe(r,n,e,t),a=s.getSubtreeCoordinates(),c=this._subtreeCache,d=c.find(o,a),u=this._requestWaterMask,h=this,p;if(d===void 0){let A=r.subtreeUriTemplate.getDerivedResource({templateValues:a.getTemplateValues()});p=r.baseResource.getDerivedResource({url:A.url}).fetchArrayBuffer().then(async function(V){if(d=c.find(o,a),d===void 0){let E=new Uint8Array(V);d=await db.fromSubtreeJson(h._resource,void 0,E,r,a),c.addSubtree(o,d)}return d})}else p=Promise.resolve(d);let b=r.contentUriTemplates[0].getDerivedResource({templateValues:s.getTemplateValues()}),f=r.baseResource.getDerivedResource({url:b.url}),y=f.fetchArrayBuffer();if(y===void 0)return;let _=y.then(A=>u_(new Uint8Array(A))),S=fvt;S[0]=p,S[1]=_,S[2]=u?_.then(A=>pvt(A,f)):void 0;try{let A=await Promise.all(S),Z=A[0],V=A[1],E=A[2],L=Z.getTileMetadataView(s),v=L.getPropertyBySemantic(Cm.TILE_MINIMUM_HEIGHT),I=L.getPropertyBySemantic(Cm.TILE_MAXIMUM_HEIGHT),X=L.getPropertyBySemantic(Cm.TILE_BOUNDING_SPHERE),N=de.unpack(X,0,new de),g=L.getPropertyBySemantic(Cm.TILE_HORIZON_OCCLUSION_POINT),R=h._tilingScheme.tileXYToRectangle(e,t,n,new ae),G=h._ellipsoid,P=$t.fromRectangle(R,v,I,G,new $t),Y=h.getLevelMaximumGeometricError(n)*5,O=yz(r,Z,s,0,0),k=yz(r,Z,s,1,0),D=yz(r,Z,s,0,1),w=yz(r,Z,s,1,1),z=(O?1:0)|(k?2:0)|(D?4:0)|(w?8:0),J=new R9({gltf:V,minimumHeight:v,maximumHeight:I,boundingSphere:N,orientedBoundingBox:P,horizonOcclusionPoint:g,skirtHeight:Y,requestVertexNormals:h._requestVertexNormals,childTileMask:z,credits:h._tileCredits,waterMask:E});return Promise.resolve(J)}catch(A){console.log(`Could not load subtree: ${o} ${a.level} ${a.x} ${a.y}: ${A}`),console.log(`Could not load tile: ${o} ${s.level} ${s.x} ${s.y}: ${A}`);return}};T0.prototype.getTileDataAvailable=function(e,t,n){let i=this._subtreeCache,o=NGe(n,e),r=o===0?this._tileset0:this._tileset1,s=YGe(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 NGe(e,t){let n=1<<e;return t/n|0}function YGe(e,t,n,i){let o=1<<t,r=t,s=n%o,a=o-i-1,{subdivisionScheme:c,subtreeLevels:d}=e;return new Pp({subdivisionScheme:c,subtreeLevels:d,level:r,x:s,y:a})}async function pvt(e,t){let n=e.extensions?.EXT_structural_metadata;if(!l(n)||!l(n.propertyTextures))return;let i=new Ay({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 he(`Expected a propertyTexture with a class ${r.id}`);let c=a.properties[s.id],d=e.textures[c.index],u=e.images[d.source]?.bufferView,h=vi.getBufferViewLoader({gltf:e,bufferViewId:u,gltfResource:t,baseResource:t});return await h.load(),await cb({uint8Array:new Uint8Array(h.typedArray),format:"image/png",flipY:!1,skipColorSpaceConversion:!0})}function yz(e,t,n,i,o){let r=n.isBottomOfSubtree(),a=Fte(e,1,i,o),c=n.getDescendantCoordinates(a);return r?t.childSubtreeIsAvailableAtCoordinates(c):t.tileIsAvailableAtCoordinates(c)}function Fte(e,t,n,i){let{subdivisionScheme:o,subtreeLevels:r}=e;return new Pp({subdivisionScheme:o,subtreeLevels:r,level:t,x:n,y:i})}T0.prototype.loadTileDataAvailability=function(e,t,n){};T0.prototype.getLevelMaximumGeometricError=function(e){let t=this._ellipsoid;return Mo.getEstimatedLevelZeroGeometricErrorForAHeightmap(t,64,2)/(1<<e)};Object.defineProperties(T0.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 bvt(e,t,n){this.rootId=e,this.subtree=t,this.stamp=n}function vA(e){this._maximumSubtreeCount=e.maximumSubtreeCount??0,this._subtreeRequestCounter=0,this._queue=new Wg({comparator:vA.comparator}),this._provider=e.provider}vA.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};vA.prototype.addSubtree=function(e,t){let n=new bvt(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()};vA.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}};vA.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=Fte(r,0,0,0),c=this.find(o,a);if(c===void 0)return;let d=c.implicitCoordinates,u=d.x,h=d.y,p=d.level,b=-W.PI,f=+W.PI,y=W.lerp(b,f,o/2),_=W.lerp(b,f,(o+1)/2),S=-W.PI*.5,A=+W.PI*.5,Z=0,V=0,E=!0;for(;E;){let v=1/(1<<p),I=(_-y)*v,X=y+u*I,N=(A-S)*v,g=S+h*N;Z=(t-X)/I,V=(n-g)/N;let C=XGe(r,d,Z,V,s);if(c.childSubtreeIsAvailableAtCoordinates(C)){let R=this.find(o,C);if(R!==void 0)c=R,d=c.implicitCoordinates,u=d.x,h=d.y,p=d.level;else return C}else E=!1}let L;for(let v=0;v<s;v++){let I=XGe(r,d,Z,V,v);if(c.tileIsAvailableAtCoordinates(I))L=I;else break}return L};function XGe(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=Fte(e,o,s,a);return t.getDescendantCoordinates(c)}vA.prototype.computeMaximumLevelAtPosition=function(e){let t=this._computeMaximumImplicitTileCoordinatesAtPosition(e);return t===void 0?0:t.level};var Ite=T0;var Wbo=x(T(),1);var sbo=x(T(),1);function Kx(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=Tz(e.westIndices,o,t),this._southIndices=Tz(e.southIndices,r,t),this._eastIndices=Tz(e.eastIndices,o,t),this._northIndices=Tz(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(Kx.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 xz=[];function Tz(e,t,n){xz.length=e.length;let i=!1;for(let o=0,r=e.length;o<r;++o)xz[o]=e[o],i=i||o>0&&t(e[o-1],e[o])>0;return i?(xz.sort(t),Me.createTypedArray(n,xz)):e}var wGe="createVerticesFromQuantizedTerrainMesh",gvt=new Hn(wGe),yvt=new Hn(wGe,Od.maximumAsynchronousTasks);Kx.prototype.createMesh=function(e){e=e??B.EMPTY_OBJECT;let t=e.tilingScheme,n=e.x,i=e.y,o=e.level,r=e.exaggeration??1,s=e.exaggerationRelativeHeight??0,a=e.throttle??!0,c=t.ellipsoid,d=t.tileXYToRectangle(n,i,o),h=(a?yvt:gvt).scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:d,relativeToCenter:this._boundingSphere.center,ellipsoid:c,exaggeration:r,exaggerationRelativeHeight:s});if(!l(h))return;let p=this;return Promise.resolve(h).then(function(b){let f=p._quantizedVertices.length/3,y=f+p._westIndices.length+p._southIndices.length+p._eastIndices.length+p._northIndices.length,_=Me.createTypedArray(y,b.indices),S=new Float32Array(b.vertices),A=b.center,Z=b.minimumHeight,V=b.maximumHeight,E=p._boundingSphere,L=p._orientedBoundingBox,v=m.clone(b.occludeePointInScaledSpace)??p._horizonOcclusionPoint,I=b.vertexStride,X=mr.clone(b.encoding);return p._mesh=new uc(A,S,_,b.indexCountWithoutSkirts,f,Z,V,d,E,v,I,L,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 xvt=new Hn("upsampleQuantizedTerrainMesh",Od.maximumAsynchronousTasks);Kx.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,d=n*2===r,u=e.ellipsoid,h=e.tileXYToRectangle(o,r,s),p=xvt.scheduleTask({vertices:a.vertices,vertexCountWithoutSkirts:a.vertexCountWithoutSkirts,indices:a.indices,indexCountWithoutSkirts:a.indexCountWithoutSkirts,encoding:a.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:d,childRectangle:h,ellipsoid:u});if(!l(p))return;let b=Math.min(this._westSkirtHeight,this._eastSkirtHeight);b=Math.min(b,this._southSkirtHeight),b=Math.min(b,this._northSkirtHeight);let f=c?b*.5:this._westSkirtHeight,y=d?b*.5:this._southSkirtHeight,_=c?this._eastSkirtHeight:b*.5,S=d?this._northSkirtHeight:b*.5,A=this._credits;return Promise.resolve(p).then(function(Z){let V=new Uint16Array(Z.vertices),E=Me.createTypedArray(V.length/3,Z.indices),L;return l(Z.encodedNormals)&&(L=new Uint8Array(Z.encodedNormals)),new Kx({quantizedVertices:V,indices:E,encodedNormals:L,minimumHeight:Z.minimumHeight,maximumHeight:Z.maximumHeight,boundingSphere:de.clone(Z.boundingSphere),orientedBoundingBox:$t.clone(Z.orientedBoundingBox),horizonOcclusionPoint:m.clone(Z.horizonOcclusionPoint),westIndices:Z.westIndices,southIndices:Z.southIndices,eastIndices:Z.eastIndices,northIndices:Z.northIndices,westSkirtHeight:f,southSkirtHeight:y,eastSkirtHeight:_,northSkirtHeight:S,childTileMask:0,credits:A,createdByUpsampling:!0})})};var Pte=32767,MGe=new m;Kx.prototype.interpolateHeight=function(e,t,n){let i=W.clamp((t-e.west)/e.width,0,1);i*=Pte;let o=W.clamp((n-e.south)/e.height,0,1);return o*=Pte,l(this._mesh)?Avt(this,i,o):Zvt(this,i,o)};function kGe(e,t,n,i,o,r,s,a){let c=Math.min(n,o,s),d=Math.max(n,o,s),u=Math.min(i,r,a),h=Math.max(i,r,a);return e>=c&&e<=d&&t>=u&&t<=h}var Tvt=new M,_vt=new M,Svt=new M;function Avt(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,c=s.length;a<c;a+=3){let d=s[a],u=s[a+1],h=s[a+2],p=r.decodeTextureCoordinates(o,d,Tvt),b=r.decodeTextureCoordinates(o,u,_vt),f=r.decodeTextureCoordinates(o,h,Svt);if(kGe(t,n,p.x,p.y,b.x,b.y,f.x,f.y)){let y=Kf.computeBarycentricCoordinates(t,n,p.x,p.y,b.x,b.y,f.x,f.y,MGe);if(y.x>=-1e-15&&y.y>=-1e-15&&y.z>=-1e-15){let _=r.decodeHeight(o,d),S=r.decodeHeight(o,u),A=r.decodeHeight(o,h);return y.x*_+y.y*S+y.z*A}}}}function Zvt(e,t,n){let i=e._uValues,o=e._vValues,r=e._heightValues,s=e._indices;for(let a=0,c=s.length;a<c;a+=3){let d=s[a],u=s[a+1],h=s[a+2],p=i[d],b=i[u],f=i[h],y=o[d],_=o[u],S=o[h];if(kGe(t,n,p,y,b,_,f,S)){let A=Kf.computeBarycentricCoordinates(t,n,p,y,b,_,f,S,MGe);if(A.x>=-1e-15&&A.y>=-1e-15&&A.z>=-1e-15){let Z=A.x*r[d]+A.y*r[u]+A.z*r[h];return W.lerp(e._minimumHeight,e._maximumHeight,Z/Pte)}}}}Kx.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};Kx.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var FA=Kx;function Cvt(e){this.resource=e.resource,this.version=e.version,this.isHeightmap=e.isHeightmap,this.tileUrlTemplates=e.tileUrlTemplates,this.availability=e.availability,this.hasVertexNormals=e.hasVertexNormals,this.hasWaterMask=e.hasWaterMask,this.hasMetadata=e.hasMetadata,this.availabilityLevels=e.availabilityLevels,this.availabilityTilesLoaded=e.availabilityTilesLoaded,this.littleEndianExtensionSize=e.littleEndianExtensionSize,this.availabilityPromiseCache={}}function DGe(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=[]}DGe.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 OGe(e,t,n){if(!t.format){let y="The tile format is not specified in the layer.json file.";throw e.previousError=Bo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new le(y)}if(!t.tiles||t.tiles.length===0){let y="The layer.json file does not specify any tile URL templates.";throw e.previousError=Bo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new le(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=Bo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new le(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 Fs({numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});else{let y=`The projection "${t.projection}" is invalid or not supported.`;throw e.previousError=Bo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new le(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=Bo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,y),new le(y)}let u;l(t.extensions)&&t.extensions.indexOf("octvertexnormals")!==-1?i=!0:l(t.extensions)&&t.extensions.indexOf("vertexnormals")!==-1&&(i=!0,s=!1),l(t.extensions)&&t.extensions.indexOf("watermask")!==-1&&(o=!0),l(t.extensions)&&t.extensions.indexOf("metadata")!==-1&&(r=!0);let h=t.metadataAvailability,p=t.available,b;if(l(p)&&!l(h)){b=new Hf(e.tilingScheme,p.length);for(let y=0;y<p.length;++y){let _=p[y],S=e.tilingScheme.getNumberOfYTilesAtLevel(y);l(e.overallAvailability[y])||(e.overallAvailability[y]=[]);for(let A=0;A<_.length;++A){let Z=_[A],V=S-Z.endY-1,E=S-Z.startY-1;e.overallAvailability[y].push([Z.startX,V,Z.endX,E]),b.addAvailableTileRange(y,Z.startX,V,Z.endX,E)}}}else l(h)&&(u=new Hf(e.tilingScheme,d),b=new Hf(e.tilingScheme,d),e.overallAvailability[0]=[[0,0,1,0]],b.addAvailableTileRange(0,0,0,1,0));e.hasWaterMask=e.hasWaterMask||o,e.hasVertexNormals=e.hasVertexNormals||i,e.hasMetadata=e.hasMetadata||r,l(t.attribution)&&(e.attribution.length>0&&(e.attribution+=" "),e.attribution+=t.attribution),e.layers.push(new Cvt({resource:e.lastResource,version:t.version,isHeightmap:a,tileUrlTemplates:c,availability:b,hasVertexNormals:i,hasWaterMask:o,hasMetadata:r,availabilityLevels:h,availabilityTilesLoaded:u,littleEndianExtensionSize:s}));let f=t.parentUrl;return l(f)?l(b)?(e.lastResource=e.lastResource.getDerivedResource({url:f}),e.lastResource.appendForwardSlash(),e.layerJsonResource=e.lastResource.getDerivedResource({url:"layer.json"}),await Yte(e),!0):(console.log("A layer.json can't have a parentUrl if it does't have an available array."),!0):!0}function Vvt(e,t,n){let i=`An error occurred while accessing ${e.layerJsonResource.url}.`;if(l(t)&&(i+=`
${t.message}`),e.previousError=Bo.reportError(e.previousError,n,l(n)?n._errorEvent:void 0,i),e.previousError.retry)return Yte(e,n);throw new le(i)}async function Rvt(e,t,n){await OGe(e,t,n);let i=e.overallAvailability.length;if(i>0){let o=e.availability=new Hf(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 bt(e.attribution);e.tileCredits.push(o)}return!0}async function Yte(e,t){try{let n=await e.layerJsonResource.fetchJson();return Rvt(e,n,t)}catch(n){return l(n)&&n.statusCode===404?(await OGe(e,{tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]},t),!0):Vvt(e,n,t)}}function Jf(e){e=e??B.EMPTY_OBJECT,this._heightmapWidth=void 0,this._heightmapStructure=void 0,this._hasWaterMask=!1,this._hasVertexNormals=!1,this._hasMetadata=!1,this._scheme=void 0,this._ellipsoid=e.ellipsoid,this._requestVertexNormals=e.requestVertexNormals??!1,this._requestWaterMask=e.requestWaterMask??!1,this._requestMetadata=e.requestMetadata??!0,this._errorEvent=new _e;let t=e.credit;typeof t=="string"&&(t=new bt(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 Xte={OCT_VERTEX_NORMALS:1,WATER_MASK:2,METADATA:4};function UGe(e){return!l(e)||e.length===0?{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:`application/vnd.quantized-mesh;extensions=${e.join("-")},application/octet-stream;q=0.9,*/*;q=0.01`}}function Evt(e,t,n,i,o){let r=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new Wc({buffer:r,childTileMask:new Uint8Array(t,r.byteLength,1)[0],waterMask:new Uint8Array(t,r.byteLength+1,t.byteLength-r.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}function Gvt(e,t,n,i,o,r){let s=r.littleEndianExtensionSize,a=0,c=3,d=c+1,u=Float64Array.BYTES_PER_ELEMENT*c,h=Float64Array.BYTES_PER_ELEMENT*d,b=Uint16Array.BYTES_PER_ELEMENT*3,f=3,y=Uint16Array.BYTES_PER_ELEMENT,_=y*f,S=new DataView(t),A=new m(S.getFloat64(a,!0),S.getFloat64(a+8,!0),S.getFloat64(a+16,!0));a+=u;let Z=S.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let V=S.getFloat32(a,!0);a+=Float32Array.BYTES_PER_ELEMENT;let E=new de(new m(S.getFloat64(a,!0),S.getFloat64(a+8,!0),S.getFloat64(a+16,!0)),S.getFloat64(a+u,!0));a+=h;let L=new m(S.getFloat64(a,!0),S.getFloat64(a+8,!0),S.getFloat64(a+16,!0));a+=u;let v=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let I=new Uint16Array(t,a,v*3);a+=v*b,v>64*1024&&(y=Uint32Array.BYTES_PER_ELEMENT,_=y*f);let X=I.subarray(0,v),N=I.subarray(v,2*v),g=I.subarray(v*2,3*v);cn.zigZagDeltaDecode(X,N,g),a%y!==0&&(a+=y-a%y);let C=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let R=Me.createTypedArrayFromArrayBuffer(v,t,a,C*f);a+=C*_;let G=0,P=R.length;for(let ce=0;ce<P;++ce){let Ze=R[ce];R[ce]=G-Ze,Ze===0&&++G}let Y=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let O=Me.createTypedArrayFromArrayBuffer(v,t,a,Y);a+=Y*y;let k=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let D=Me.createTypedArrayFromArrayBuffer(v,t,a,k);a+=k*y;let w=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let z=Me.createTypedArrayFromArrayBuffer(v,t,a,w);a+=w*y;let J=S.getUint32(a,!0);a+=Uint32Array.BYTES_PER_ELEMENT;let ee=Me.createTypedArrayFromArrayBuffer(v,t,a,J);a+=J*y;let H,te;for(;a<S.byteLength;){let ce=S.getUint8(a,!0);a+=Uint8Array.BYTES_PER_ELEMENT;let Ze=S.getUint32(a,s);if(a+=Uint32Array.BYTES_PER_ELEMENT,ce===Xte.OCT_VERTEX_NORMALS&&e._requestVertexNormals)H=new Uint8Array(t,a,v*2);else if(ce===Xte.WATER_MASK&&e._requestWaterMask)te=new Uint8Array(t,a,Ze);else if(ce===Xte.METADATA&&e._requestMetadata){let xe=S.getUint32(a,!0);if(xe>0){let Ve=xr(new Uint8Array(t),a+Uint32Array.BYTES_PER_ELEMENT,xe).available;if(l(Ve))for(let Ye=0;Ye<Ve.length;++Ye){let ke=n+Ye+1,it=Ve[Ye],pt=e._tilingScheme.getNumberOfYTilesAtLevel(ke);for(let Vt=0;Vt<it.length;++Vt){let Ue=it[Vt],St=pt-Ue.endY-1,ht=pt-Ue.startY-1;e.availability.addAvailableTileRange(ke,Ue.startX,St,Ue.endX,ht),r.availability.addAvailableTileRange(ke,Ue.startX,St,Ue.endX,ht)}}}r.availabilityTilesLoaded.addAvailableTileRange(n,i,o,i,o)}a+=Ze}let $=e.getLevelMaximumGeometricError(n)*5,be=e._tilingScheme.tileXYToRectangle(i,o,n),ye=$t.fromRectangle(be,Z,V,e._tilingScheme.ellipsoid);return new FA({center:A,minimumHeight:Z,maximumHeight:V,boundingSphere:E,orientedBoundingBox:ye,horizonOcclusionPoint:L,quantizedVertices:I,encodedNormals:H,indices:R,westIndices:O,southIndices:D,eastIndices:z,northIndices:ee,westSkirtHeight:$,southSkirtHeight:$,eastSkirtHeight:$,northSkirtHeight:$,childTileMask:e.availability.computeChildMaskForTile(n,i,o),waterMask:te,credits:e._tileCredits})}Jf.prototype.requestTileGeometry=function(e,t,n,i){let o=this._layers,r,s=o.length,a=!1,c=Promise.resolve();if(s===1)r=o[0];else for(let d=0;d<s;++d){let u=o[d];if(!l(u.availability)||u.availability.isTileAvailable(n,e,t)){r=u;break}let h=wte(this,e,t,n,u,d===0);h.result&&(a=!0,c=c.then(()=>h.promise))}return!l(r)&&a?c.then(()=>new Promise(d=>{setTimeout(()=>{let u=this.requestTileGeometry(e,t,n,i);d(u)},0)})):BGe(this,e,t,n,r,i)};function BGe(e,t,n,i,o,r){if(!l(o))return Promise.reject(new le("Terrain tile doesn't exist"));let s=o.tileUrlTemplates;if(s.length===0)return;let a;!e._scheme||e._scheme==="tms"?a=e._tilingScheme.getNumberOfYTilesAtLevel(i)-n-1:a=n;let c=[];e._requestVertexNormals&&o.hasVertexNormals&&c.push(o.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&o.hasWaterMask&&c.push("watermask"),e._requestMetadata&&o.hasMetadata&&c.push("metadata");let d,u,h=s[(t+a+i)%s.length],p=o.resource;l(p._ionEndpoint)&&!l(p._ionEndpoint.externalType)?(c.length!==0&&(u={extensions:c.join("-")}),d=UGe(void 0)):d=UGe(c);let b=p.getDerivedResource({url:h,templateValues:{version:o.version,z:i,x:t,y:a},queryParameters:u,headers:d,request:r}).fetchArrayBuffer();if(l(b))return b.then(function(f){return l(f)?l(e._heightmapStructure)?Evt(e,f,i,t,n):Gvt(e,f,i,t,n,o):Promise.reject(new le("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 ss.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 DGe(t);i.lastResource=n,i.layerJsonResource=i.lastResource.getDerivedResource({url:"layer.json"}),await Yte(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(wte(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=wte(this,e,t,n,i[r],r===0);if(l(s.promise))return s.promise}};function Nte(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 wte(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=Nte(o,t,n,i);for(;l(u);){if(d.isTileAvailable(u.level,u.x,u.y)&&!c.isTileAvailable(u.level,u.x,u.y)){let h;if(!r&&(s=`${u.level}-${u.x}-${u.y}`,h=o.availabilityPromiseCache[s],!l(h))){let p=new fr({throttle:!1,throttleByServer:!0,type:ks.TERRAIN});h=BGe(e,u.x,u.y,u.level,o,p),l(h)&&(o.availabilityPromiseCache[s]=h,h.then(a))}return{result:!0,promise:h}}u=Nte(o,u.x,u.y,u.level)}return{result:!1}}Jf._getAvailabilityTile=Nte;var IA=Jf;var wbo=x(T(),1);function Ig(e){e=e??B.EMPTY_OBJECT;let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new nd(n),this._workerName="createCircleGeometry"}Ig.packedLength=nd.packedLength;Ig.pack=function(e,t,n){return nd.pack(e._ellipseGeometry,t,n)};var zGe=new nd({center:new m,semiMajorAxis:1,semiMinorAxis:1}),Fc={center:new m,radius:void 0,ellipsoid:ie.clone(ie.default),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new Xe,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};Ig.unpack=function(e,t,n){let i=nd.unpack(e,t,zGe);return Fc.center=m.clone(i._center,Fc.center),Fc.ellipsoid=ie.clone(i._ellipsoid,Fc.ellipsoid),Fc.ellipsoid=ie.clone(i._ellipsoid,zGe._ellipsoid),Fc.height=i._height,Fc.extrudedHeight=i._extrudedHeight,Fc.granularity=i._granularity,Fc.vertexFormat=Xe.clone(i._vertexFormat,Fc.vertexFormat),Fc.stRotation=i._stRotation,Fc.shadowVolume=i._shadowVolume,l(n)?(Fc.semiMajorAxis=i._semiMajorAxis,Fc.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new nd(Fc),n):(Fc.radius=i._semiMajorAxis,new Ig(Fc))};Ig.createGeometry=function(e){return nd.createGeometry(e._ellipseGeometry)};Ig.createShadowVolume=function(e,t,n){let i=e._ellipseGeometry._granularity,o=e._ellipseGeometry._ellipsoid,r=t(i,o),s=n(i,o);return new Ig({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:o,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:r,height:s,vertexFormat:Xe.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(Ig.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var Mte=Ig;var zbo=x(T(),1);function a1(e){e=e??B.EMPTY_OBJECT;let t=e.radius,n={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new vu(n),this._workerName="createCircleOutlineGeometry"}a1.packedLength=vu.packedLength;a1.pack=function(e,t,n){return vu.pack(e._ellipseGeometry,t,n)};var Lvt=new vu({center:new m,semiMajorAxis:1,semiMinorAxis:1}),qu={center:new m,radius:void 0,ellipsoid:ie.clone(ie.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};a1.unpack=function(e,t,n){let i=vu.unpack(e,t,Lvt);return qu.center=m.clone(i._center,qu.center),qu.ellipsoid=ie.clone(i._ellipsoid,qu.ellipsoid),qu.height=i._height,qu.extrudedHeight=i._extrudedHeight,qu.granularity=i._granularity,qu.numberOfVerticalLines=i._numberOfVerticalLines,l(n)?(qu.semiMajorAxis=i._semiMajorAxis,qu.semiMinorAxis=i._semiMinorAxis,n._ellipseGeometry=new vu(qu),n):(qu.radius=i._semiMajorAxis,new a1(qu))};a1.createGeometry=function(e){return vu.createGeometry(e._ellipseGeometry)};var kte=a1;var ngo=x(T(),1);function c1(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 bt(n)),this._credit=n}Object.defineProperties(c1.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}}});c1.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 Wc({buffer:c,width:r,height:s})})};c1.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};c1.prototype.getTileDataAvailable=function(e,t,n){};c1.prototype.loadTileDataAvailability=function(e,t,n){};var Ute=c1;var ogo=x(T(),1);function HGe(e){this.proxy=e}HGe.prototype.getURL=function(e){let t=this.proxy.indexOf("?")===-1?"?":"";return this.proxy+t+encodeURIComponent(e)};var Dte=HGe;var sgo=x(T(),1),KGe={SEARCH:0,AUTOCOMPLETE:1};Object.freeze(KGe);var Jx=KGe;var ugo=x(T(),1);function _z(){he.throwInstantiationError()}Object.defineProperties(_z.prototype,{credit:{get:he.throwInstantiationError}});_z.getCreditsFromResult=function(e){if(l(e.attributions))return e.attributions.map(bt.getIonCredit)};_z.prototype.geocode=he.throwInstantiationError;var l1=_z;var fgo=x(T(),1);function JGe(){he.throwInstantiationError()}JGe.createGeometry=function(e){he.throwInstantiationError()};var Ote=JGe;var Pgo=x(T(),1),Xvt=x(Bte(),1);var Sgo=x(T(),1);var ygo=x(T(),1);function Wvt(e,t){return(e&t)!==0}var pl=Wvt;var vvt=[1,2,4,8],jGe=15,Fvt=16,Ivt=64,Pvt=128;function _0(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}_0.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 _0(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t};_0.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()};_0.prototype.hasSubtree=function(){return pl(this._bits,Fvt)};_0.prototype.hasImagery=function(){return pl(this._bits,Ivt)};_0.prototype.hasTerrain=function(){return pl(this._bits,Pvt)};_0.prototype.hasChildren=function(){return pl(this._bits,jGe)};_0.prototype.hasChild=function(e){return pl(this._bits,vvt[e])};_0.prototype.getChildBitmask=function(){return this._bits&jGe};var G9=_0;function Nvt(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 Yvt=Nvt(`E\xF4\xBD\vy\xE2jE"\x92,\xCDq\xF8IFgQ\0B%\xC6\xE8a,f)\b\xC64\xDCjb%y
wmi\xD6\xF0\x9Ck\x93\xA1\xBDNu\xE0A[\xDF@V\f\xD9\xBBr\x9B\x81|3S\xEEOl\xD4q\xB0{\xC0\x7FEVZ\xADwUe\v3\x92*\xACl5\xC50s\xF83>mF8J\xB4\xDD\xF0.\xDDu\xDA\x8CDt"\xFAa"\f3"So\xAF9D\v\x8C9\xD99L\xB9\xBF\x7F\xAB\\\x8CP_\x9F"ux\xE9\x07q\x91h;\xC1\xC4\x9B\x7F\xF0<VqH\x82'UfYNe\x98u\xA3aF}a?A\0\x9F\xD7\xB44M\xCE\x87F\xB0\xD5\xB8\x8A'{\x8B\xDC+\xBBMg0\xC8\xD1\xF6\\\x8FP\xFA[/F\x9Bn5/'C.\xEB
\f^\xA5s\x1Be4\xE5l.jC'c#U\xA9?q{gC}:\xAF\xCD\xE2TU\x9C\xFDK\xC6\xE2\x9F/(\xED\xCB\\\xC6-f\x07\x88\xA7;/*"N\xB0k.\xDD\r\x95}}G\xBAC\xB2\xB2+>M\xAA>}\xE6\xCEI\x89\xC6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BD\x88\xF7_H\xB1~\xC0XL?f\xF9>\xE1e\xC0p\xA7\xCF8i\xAF\xF0VldI\x9C'\xADxtO\xC2\x87\xDEV9\0\xDAw\v\xCB-\x1B\x89\xFB5O\xF5\bQ\`\xC1
ZGM&30x\xDA\xC0\x9CFG\xE2[y\`In7gS
>\xE9\xECF9\xB2\xF14\r\xC6\x84Sun\xE1\fY\xD9\xDE)\x85{II\xA5wy\xBEIV.6\xE7\v:\xBBOb{\xD2M1\x95/\xBD8{\xA8O!\xE1\xECFpv\x95})"x\x88
\x90\xDD\x9D\\\xDA\xDEQ\xCF\xF0\xFCYRe|3\xDF\xF3H\xDA\xBB*u\xDB\`\xB2\xD4\xFC\xED\x1B\xEC\x7F5\xA8\xFF(1\x07-\xC8\xDC\x88F|\x8A["`);function $u(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($u.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}}});$u.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 $u;i._resource=n;try{await wvt(i),await i.getQuadTreePacket("",i._quadPacketVersion)}catch(o){let r=`An error occurred while accessing ${qGe(i,"",1).url}: ${o}`;throw new le(r)}return i};$u.tileXYToQuadKey=function(e,t,n){let i="";for(let o=n;o>=0;--o){let r=1<<o,s=0;pl(t,r)?pl(e,r)&&(s|=1):(s|=2,pl(e,r)||(s|=1)),i+=s}return i};$u.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];pl(s,2)?pl(s,1)||(t|=r):(n|=r,pl(s,1)&&(t|=r))}return{x:t,y:n,level:i}};$u.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 QGe=new Hn("decodeGoogleEarthEnterprisePacket");$u.prototype.getQuadTreePacket=function(e,t,n){t=t??1,e=e??"";let o=qGe(this,e,t,n).fetchArrayBuffer();if(!l(o))return;let r=this._tileInfo,s=this.key;return o.then(function(a){return QGe.scheduleTask({buffer:a,quadKey:e,type:"Metadata",key:s},[a]).then(function(d){let u,h=-1;if(e!==""){h=e.length+1;let f=d[e];u=r[e],u._bits|=f._bits,delete d[e]}let p=Object.keys(d);p.sort(function(f,y){return f.length-y.length});let b=p.length;for(let f=0;f<b;++f){let y=p[f];if(d[y]!==null){let S=G9.clone(d[y]),A=y.length;if(A===h)S.setParent(u);else if(A>1){let Z=r[y.substring(0,y.length-1)];S.setParent(Z)}r[y]=S}else r[y]=null}})})};$u.prototype.populateSubtree=function(e,t,n,i){let o=$u.tileXYToQuadKey(e,t,n);return Kte(this,o,i)};function Kte(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 fr({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),Kte(e,t,s)});if(!l(r)||!r.hasSubtree())return Promise.reject(new le(`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 fr({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),Kte(e,t,s)}).finally(function(){delete a[o]})}$u.prototype.getTileInformation=function(e,t,n){let i=$u.tileXYToQuadKey(e,t,n);return this._tileInfo[i]};$u.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]};function qGe(e,t,n,i){return e._resource.getDerivedResource({url:`flatfile?q2-0${t}-q.${n.toString()}`,request:i})}var zte,Hte;function wvt(e){let t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!l(Hte)){let n=Kt("ThirdParty/google-earth-dbroot-parser.js"),i=window.cesiumGoogleEarthDbRootParser;Hte=cT(n).then(function(){zte=window.cesiumGoogleEarthDbRootParser(Xvt),l(i)?window.cesiumGoogleEarthDbRootParser=i:delete window.cesiumGoogleEarthDbRootParser})}return Hte.then(function(){return t.fetchArrayBuffer()}).then(function(n){let i=zte.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 QGe.scheduleTask({buffer:c,type:"DbRoot",key:a},[c])}).then(function(n){let i=zte.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 bt(d.value))}}).catch(function(){console.log(`Failed to retrieve ${t.url}. Using defaults.`),e.key=Yvt})}var Pg=$u;var qgo=x(T(),1);function PA(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(PA.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var tLe="createVerticesFromGoogleEarthEnterpriseBuffer",Mvt=new Hn(tLe),kvt=new Hn(tLe,Od.maximumAsynchronousTasks),$Ge=new ae,Sz=new ae;PA.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,$Ge),t.tileXYToRectangle(n,i,o,Sz);let d=c.cartographicToCartesian(ae.center(Sz)),h=40075.16/(1<<o);this._skirtHeight=Math.min(h*8,1e3);let b=(a?kvt:Mvt).scheduleTask({buffer:this._buffer,nativeRectangle:$Ge,rectangle:Sz,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 uc(d,new Float32Array(y.vertices),new Uint16Array(y.indices),y.indexCountWithoutSkirts,y.vertexCountWithoutSkirts,y.minimumHeight,y.maximumHeight,Sz,de.clone(y.boundingSphere3D),m.clone(y.occludeePointInScaledSpace),y.numberOfAttributes,$t.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})};PA.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)?zvt(this,i,o):Jvt(this,i,o,e)};var Uvt=new Hn("upsampleQuantizedTerrainMesh",Od.maximumAsynchronousTasks);PA.prototype.upsample=function(e,t,n,i,o,r,s){let a=this._mesh;if(!l(this._mesh))return;let c=t*2!==o,d=n*2===r,u=e.ellipsoid,h=e.tileXYToRectangle(o,r,s),p=Uvt.scheduleTask({vertices:a.vertices,indices:a.indices,indexCountWithoutSkirts:a.indexCountWithoutSkirts,vertexCountWithoutSkirts:a.vertexCountWithoutSkirts,encoding:a.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:d,childRectangle:h,ellipsoid:u});if(!l(p))return;let b=this;return p.then(function(f){let y=new Uint16Array(f.vertices),_=Me.createTypedArray(y.length/3,f.indices),S=b._skirtHeight;return new FA({quantizedVertices:y,indices:_,minimumHeight:f.minimumHeight,maximumHeight:f.maximumHeight,boundingSphere:de.clone(f.boundingSphere),orientedBoundingBox:$t.clone(f.orientedBoundingBox),horizonOcclusionPoint:m.clone(f.horizonOcclusionPoint),westIndices:f.westIndices,southIndices:f.southIndices,eastIndices:f.eastIndices,northIndices:f.northIndices,westSkirtHeight:S,southSkirtHeight:S,eastSkirtHeight:S,northSkirtHeight:S,childTileMask:0,createdByUpsampling:!0,credits:b._credits})})};PA.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};PA.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var Dvt=new M,Ovt=new M,Bvt=new M,nLe=new m;function zvt(e,t,n){let i=e._mesh,o=i.vertices,r=i.encoding,s=i.indices;for(let a=0,c=s.length;a<c;a+=3){let d=s[a],u=s[a+1],h=s[a+2],p=r.decodeTextureCoordinates(o,d,Dvt),b=r.decodeTextureCoordinates(o,u,Ovt),f=r.decodeTextureCoordinates(o,h,Bvt),y=Kf.computeBarycentricCoordinates(t,n,p.x,p.y,b.x,b.y,f.x,f.y,nLe);if(y.x>=-1e-15&&y.y>=-1e-15&&y.z>=-1e-15){let _=r.decodeHeight(o,d),S=r.decodeHeight(o,u),A=r.decodeHeight(o,h);return y.x*_+y.y*S+y.z*A}}}var Hvt=Uint16Array.BYTES_PER_ELEMENT,eLe=Uint32Array.BYTES_PER_ELEMENT,Jte=Int32Array.BYTES_PER_ELEMENT,Kvt=Float32Array.BYTES_PER_ELEMENT,jte=Float64Array.BYTES_PER_ELEMENT;function Jvt(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+=eLe;d+=eLe,d+=2*jte;let u=W.toRadians(c.getFloat64(d,!0)*180);d+=jte;let h=W.toRadians(c.getFloat64(d,!0)*180);d+=jte;let p=i.width/u/2,b=i.height/h/2,f=c.getInt32(d,!0);d+=Jte;let y=c.getInt32(d,!0)*3;d+=Jte,d+=Jte;let _=new Array(f),S=new Array(f),A=new Array(f),Z;for(Z=0;Z<f;++Z)_[Z]=s+c.getUint8(d++)*p,S[Z]=a+c.getUint8(d++)*b,A[Z]=c.getFloat32(d,!0)*6371010,d+=Kvt;let V=new Array(y);for(Z=0;Z<y;++Z)V[Z]=c.getUint16(d,!0),d+=Hvt;for(Z=0;Z<y;Z+=3){let E=V[Z],L=V[Z+1],v=V[Z+2],I=_[E],X=_[L],N=_[v],g=S[E],C=S[L],R=S[v],G=Kf.computeBarycentricCoordinates(t,n,I,g,X,C,N,R,nLe);if(G.x>=-1e-15&&G.y>=-1e-15&&G.z>=-1e-15)return G.x*A[E]+G.y*A[L]+G.z*A[v]}}var d1=PA;var byo=x(T(),1);var gh={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},Az=new Q;function Zz(){this._terrainCache={},this._lastTidy=Q.now()}Zz.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:Q.now()}};Zz.prototype.get=function(e){let n=this._terrainCache[e];if(l(n))return delete this._terrainCache[e],n.buffer};Zz.prototype.tidy=function(){if(Q.now(Az),Q.secondsDifference(Az,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(Az,r.timestamp)>10&&delete e[o]}Q.clone(Az,this._lastTidy)}};function jx(e){e=e??B.EMPTY_OBJECT,this._tilingScheme=new zi({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new ae(-W.PI,-W.PI,W.PI,W.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new bt(t)),this._credit=t,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new Zz,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new _e}Object.defineProperties(jx.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(){}}});jx.fromMetadata=function(e,t){if(!e.terrainPresent)throw new le(`The server ${e.url} doesn't have terrain`);let n=new jx(t);return n._metadata=e,n};var jvt=new Hn("decodeGoogleEarthEnterprisePacket");function iLe(e,t,n){let i=t.getChildBitmask();if(t.terrainState===gh.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}jx.prototype.requestTileGeometry=function(e,t,n,i){let o=Pg.tileXYToQuadKey(e,t,n),r=this._terrainCache,s=this._metadata,a=s.getTileInformationFromQuadKey(o);if(!l(a))return Promise.reject(new le("Terrain tile doesn't exist"));let c=a.terrainState;l(c)||(c=a.terrainState=gh.UNKNOWN);let d=r.get(o);if(l(d)){let S=s.providers[a.terrainProvider];return Promise.resolve(new d1({buffer:d,childTileMask:iLe(o,a,s),credits:l(S)?[S]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold}))}if(r.tidy(),a.ancestorHasTerrain){if(c===gh.NONE)return Promise.reject(new le("Terrain tile doesn't exist"))}else return Promise.resolve(new Wc({buffer:new Uint8Array(256),width:16,height:16}));let u,h=o,p=-1;switch(c){case gh.SELF:p=a.terrainVersion;break;case gh.PARENT:h=h.substring(0,h.length-1),u=s.getTileInformationFromQuadKey(h),p=u.terrainVersion;break;case gh.UNKNOWN:a.hasTerrain()?p=a.terrainVersion:(h=h.substring(0,h.length-1),u=s.getTileInformationFromQuadKey(h),l(u)&&u.hasTerrain()&&(p=u.terrainVersion));break}if(p<0)return Promise.reject(new le("Terrain tile doesn't exist"));let b=this._terrainPromises,f=this._terrainRequests,y,_;if(l(b[h]))y=b[h],_=f[h];else{_=i;let S=Qvt(this,h,p,_).fetchArrayBuffer();if(!l(S))return;y=S.then(function(A){return l(A)?jvt.scheduleTask({buffer:A,type:"Terrain",key:s.key},[A]).then(function(Z){let V=s.getTileInformationFromQuadKey(h);V.terrainState=gh.SELF,r.add(h,Z[0]);let E=V.terrainProvider,L=Z.length-1;for(let v=0;v<L;++v){let I=h+v.toString(),X=s.getTileInformationFromQuadKey(I);l(X)&&(r.add(I,Z[v+1]),X.terrainState=gh.PARENT,X.terrainProvider===0&&(X.terrainProvider=E))}}):Promise.reject(new le("Failed to load terrain."))}),b[h]=y,f[h]=_,y=y.finally(function(){delete b[h],delete f[h]})}return y.then(function(){let S=r.get(o);if(l(S)){let A=s.providers[a.terrainProvider];return new d1({buffer:S,childTileMask:iLe(o,a,s),credits:l(A)?[A]:void 0,negativeAltitudeExponentBias:s.negativeAltitudeExponentBias,negativeElevationThreshold:s.negativeAltitudeThreshold})}return Promise.reject(new le("Failed to load terrain."))}).catch(function(S){return _.state===ui.CANCELLED?(i.state=_.state,Promise.reject(S)):(a.terrainState=gh.NONE,Promise.reject(S))})};jx.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};jx.prototype.getTileDataAvailable=function(e,t,n){let i=this._metadata,o=Pg.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===gh.NONE)return!1;if((!l(s)||s===gh.UNKNOWN)&&(r.terrainState=gh.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 fr({throttle:!1,throttleByServer:!0,type:ks.TERRAIN});i.populateSubtree(e,t,n,s)}return!1};jx.prototype.loadTileDataAvailability=function(e,t,n){};function Qvt(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 Qte=jx;var Ayo=x(T(),1);var qvt="https://maps.googleapis.com/maps/api/geocode/json",oLe='<img alt="Google" src="https://assets.ion.cesium.com/google-credit.png" style="vertical-align:-5px">';function qte(e){e=e??B.EMPTY_OBJECT;let t=e.key;this._resource=new We({url:qvt,queryParameters:{key:t}}),this._credit=new bt(oLe,!0)}Object.defineProperties(qte.prototype,{credit:{get:function(){return this._credit}}});qte.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 le(`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:ae.fromDegrees(r.lng,r.lat,s.lng,s.lat),attribution:{html:oLe,collapsible:!1}}})};var $te=qte;var Eyo=x(T(),1);var $s={};$s.ExportStatus=Object.freeze({NotStarted:"NotStarted",InProgress:"InProgress",Complete:"Complete",Invalid:"Invalid"});$s.ExportType=Object.freeze({IMODEL:"IMODEL",CESIUM:"CESIUM","3DTILES":"3DTILES"});$s.RealityDataType=Object.freeze({Cesium3DTiles:"Cesium3DTiles",PNTS:"PNTS",RealityMesh3DTiles:"RealityMesh3DTiles",Terrain3DTiles:"Terrain3DTiles",GaussianSplat3DTiles:"GS_3DT",KML:"KML",GeoJSON:"GeoJSON",Unstructured:"Unstructured"});$s.defaultAccessToken=void 0;$s.defaultShareKey=void 0;$s._getAuthorizationHeader=function(){return l($s.defaultShareKey)?`Basic ${$s.defaultShareKey}`:`Bearer ${$s.defaultAccessToken}`};$s.apiEndpoint=new We({url:"https://api.bentley.com"});$s.getExports=async function(e,t){let n=new We({url:`${$s.apiEndpoint}mesh-export`,headers:{Authorization:$s._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json",Prefer:"return=representation"},queryParameters:{iModelId:e,exportType:$s.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 le(`Unauthorized, bad token, wrong scopes or headers bad. ${r}`)}else{if(i.statusCode===403)throw console.error(o.error.code,o.error.message),new le("Not allowed, forbidden");if(i.statusCode===422)throw new le(`Unprocessable Entity:${o.error.code} ${o.error.message}`);if(i.statusCode===429)throw new le("Too many requests")}throw new le(`Unknown request failure ${i.statusCode}`)}};$s.getRealityDataMetadata=async function(e,t){let n=new We({url:`${$s.apiEndpoint}reality-management/reality-data/${t}`,headers:{Authorization:$s._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 le(`Unauthorized, bad token, wrong scopes or headers bad. ${r}`)}else{if(i.statusCode===403)throw console.error(o.error.code,o.error.message),new le("Not allowed, forbidden");if(i.statusCode===404)throw new le(`Reality data not found: ${e}, ${t}`);if(i.statusCode===422)throw new le(`Unprocessable Entity:${o.error.code} ${o.error.message}`);if(i.statusCode===429)throw new le("Too many requests")}throw new le(`Unknown request failure ${i.statusCode}`)}};$s.getRealityDataURL=async function(e,t,n){let i=new We({url:`${$s.apiEndpoint}reality-management/reality-data/${t}/readaccess`,headers:{Authorization:$s._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 le(`Unauthorized, bad token, wrong scopes or headers bad. ${s}`)}else{if(o.statusCode===403)throw console.error(r.error.code,r.error.message),new le("Not allowed, forbidden");if(o.statusCode===404)throw new le(`Reality data not found: ${e}, ${t}`);if(o.statusCode===422)throw new le(`Unprocessable Entity:${r.error.code} ${r.error.message}`);if(o.statusCode===429)throw new le("Too many requests")}throw new le(`Unknown request failure ${o.statusCode}`)}};var ea=$s;var Wyo=x(T(),1);var L9={};L9.type=void 0;L9.getRequiredDataPoints=he.throwInstantiationError;L9.interpolateOrderZero=he.throwInstantiationError;L9.interpolate=he.throwInstantiationError;var ene=L9;var Fyo=x(T(),1),rLe={GOOGLE:"GOOGLE",BING:"BING",DEFAULT:"DEFAULT"};Object.freeze(rLe);var Xg=rLe;var jyo=x(T(),1);var Myo=x(T(),1);function tne(e){this._url=We.createIfNeeded(e),this._url.appendForwardSlash()}Object.defineProperties(tne.prototype,{url:{get:function(){return this._url}},credit:{get:function(){}}});tne.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=ae.fromDegrees(s[0],s[1],s[2],s[3]);else{let a=o.geometry.coordinates[0],c=o.geometry.coordinates[1];r=m.fromDegrees(a,c)}return{displayName:o.properties.label,destination:r,attributions:i.attributions}})})};var W9=tne;function $vt(e){if(!Object.values(Xg).some(t=>t===e))throw new he(`Invalid geocodeProviderType: "${e}"`)}var sLe=Object.freeze({[Xg.GOOGLE]:"google",[Xg.BING]:"bing",[Xg.DEFAULT]:void 0});function eFt(e){return sLe[e]}function tFt(e){return Object.entries(sLe).find(t=>t[1]===e)[0]}function nne(e){e=e??B.EMPTY_OBJECT;let t=e.geocodeProviderType??Xg.DEFAULT,n=e.accessToken??Uh.defaultAccessToken,i=We.createIfNeeded(e.server??Uh.defaultServer);i.appendForwardSlash();let o=Uh.getDefaultTokenCredit(n);l(o)&&e.scene.frameState.creditDisplay.addStaticCredit(bt.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 W9(r),this.geocodeProviderType=t}Object.defineProperties(nne.prototype,{credit:{get:function(){}},geocodeProviderType:{get:function(){return tFt(this._pelias.url.queryParameters.geocoder)},set:function(e){$vt(e);let t={...this._pelias.url.queryParameters,geocoder:eFt(e)};l(t.geocoder)||delete t.geocoder,this._pelias.url.setQueryParameters(t)}}});nne.prototype.geocode=async function(e,t){return this._pelias.geocode(e,t)};var XA=nne;var $yo=x(T(),1);var ine=class{constructor(){Qt(this,"ellipsoid")}project(t,n){he.throwInstantiationError()}unproject(t,n){he.throwInstantiationError()}},one=ine;var rxo=x(T(),1);function u1(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(u1.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}});u1.prototype.findTimeInterval=xo.prototype.findTimeInterval;u1.prototype.wrapTime=xo.prototype.wrapTime;u1.prototype.clampTime=xo.prototype.clampTime;u1.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 rne=u1;var hxo=x(T(),1);function sne(e,t,n){e=We.createIfNeeded(e),e.appendForwardSlash(),e.setQueryParameters({key:t}),this._url=e,this._params=n??{},this._credit=new bt('Geodata copyright <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors',!1)}Object.defineProperties(sne.prototype,{url:{get:function(){return this._url}},params:{get:function(){return this._params}},credit:{get:function(){return this._credit}}});sne.prototype.geocode=async function(e){return this._url.getDerivedResource({url:"json",queryParameters:Rt(this._params,{q:e})}).fetchJson().then(function(n){return n.results.map(function(i){let o,r=i.bounds;if(l(r))o=ae.fromDegrees(r.southwest.lng,r.southwest.lat,r.northeast.lng,r.northeast.lat);else{let{lng:s,lat:a}=i.geometry;o=m.fromDegrees(s,a)}return{displayName:i.formatted,destination:o}})})};var ane=sne;var bxo=x(T(),1);var nFt={packedLength:void 0,pack:he.throwInstantiationError,unpack:he.throwInstantiationError},cne=nFt;var xxo=x(T(),1);var iFt={packedInterpolationLength:void 0,convertPackedArrayForInterpolation:he.throwInstantiationError,unpackInterpolationResult:he.throwInstantiationError},lne=iFt;var Sxo=x(T(),1);function aLe(){he.throwInstantiationError()}aLe.prototype.getURL=he.throwInstantiationError;var dne=aLe;var wxo=x(T(),1);function oFt(e,t,n,i,o,r,s){let a=Ki.numberOfPoints(e,t,o),c,d=n.red,u=n.green,h=n.blue,p=n.alpha,b=i.red,f=i.green,y=i.blue,_=i.alpha;if(U.equals(n,i)){for(c=0;c<a;c++)r[s++]=U.floatToByte(d),r[s++]=U.floatToByte(u),r[s++]=U.floatToByte(h),r[s++]=U.floatToByte(p);return s}let S=(b-d)/a,A=(f-u)/a,Z=(y-h)/a,V=(_-p)/a,E=s;for(c=0;c<a;c++)r[E++]=U.floatToByte(d+c*S),r[E++]=U.floatToByte(u+c*A),r[E++]=U.floatToByte(h+c*Z),r[E++]=U.floatToByte(p+c*V);return E}function v9(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??on.GEODESIC,this._granularity=e.granularity??W.RADIANS_PER_DEGREE,this._ellipsoid=e.ellipsoid??ie.default,this._workerName="createSimplePolylineGeometry";let o=1+t.length*m.packedLength;o+=l(n)?1+n.length*U.packedLength:1,this.packedLength=o+ie.packedLength+3}v9.pack=function(e,t,n){n=n??0;let i,o=e._positions,r=o.length;for(t[n++]=r,i=0;i<r;++i,n+=m.packedLength)m.pack(o[i],t,n);let s=e._colors;for(r=l(s)?s.length:0,t[n++]=r,i=0;i<r;++i,n+=U.packedLength)U.pack(s[i],t,n);return ie.pack(e._ellipsoid,t,n),n+=ie.packedLength,t[n++]=e._colorsPerVertex?1:0,t[n++]=e._arcType,t[n]=e._granularity,t};v9.unpack=function(e,t,n){t=t??0;let i,o=e[t++],r=new Array(o);for(i=0;i<o;++i,t+=m.packedLength)r[i]=m.unpack(e,t);o=e[t++];let s=o>0?new Array(o):void 0;for(i=0;i<o;++i,t+=U.packedLength)s[i]=U.unpack(e,t);let a=ie.unpack(e,t);t+=ie.packedLength;let c=e[t++]===1,d=e[t++],u=e[t];return l(n)?(n._positions=r,n._colors=s,n._ellipsoid=a,n._colorsPerVertex=c,n._arcType=d,n._granularity=u,n):new v9({positions:r,colors:s,ellipsoid:a,colorsPerVertex:c,arcType:d,granularity:u})};var Cz=new Array(2),Vz=new Array(2),rFt={positions:Cz,height:Vz,ellipsoid:void 0,minDistance:void 0,granularity:void 0};v9.createGeometry=function(e){let t=e._positions,n=e._colors,i=e._colorsPerVertex,o=e._arcType,r=e._granularity,s=e._ellipsoid,a=W.chordLength(r,s.maximumRadius),c=l(n)&&!i,d,u=t.length,h,p,b,f,y=0;if(o===on.GEODESIC||o===on.RHUMB){let V,E,L;o===on.GEODESIC?(V=W.chordLength(r,s.maximumRadius),E=Ki.numberOfPoints,L=Ki.generateArc):(V=r,E=Ki.numberOfPointsRhumbLine,L=Ki.generateRhumbArc);let v=Ki.extractHeights(t,s),I=rFt;if(o===on.GEODESIC?I.minDistance=a:I.granularity=r,I.ellipsoid=s,c){let X=0;for(d=0;d<u-1;d++)X+=E(t[d],t[d+1],V)+1;h=new Float64Array(X*3),b=new Uint8Array(X*4),I.positions=Cz,I.height=Vz;let N=0;for(d=0;d<u-1;++d){Cz[0]=t[d],Cz[1]=t[d+1],Vz[0]=v[d],Vz[1]=v[d+1];let g=L(I);if(l(n)){let C=g.length/3;f=n[d];for(let R=0;R<C;++R)b[N++]=U.floatToByte(f.red),b[N++]=U.floatToByte(f.green),b[N++]=U.floatToByte(f.blue),b[N++]=U.floatToByte(f.alpha)}h.set(g,y),y+=g.length}}else if(I.positions=t,I.height=v,h=new Float64Array(L(I)),l(n)){for(b=new Uint8Array(h.length/3*4),d=0;d<u-1;++d){let N=t[d],g=t[d+1],C=n[d],R=n[d+1];y=oFt(N,g,C,R,a,b,y)}let X=n[u-1];b[y++]=U.floatToByte(X.red),b[y++]=U.floatToByte(X.green),b[y++]=U.floatToByte(X.blue),b[y++]=U.floatToByte(X.alpha)}}else{p=c?u*2-2:u,h=new Float64Array(p*3),b=l(n)?new Uint8Array(p*4):void 0;let V=0,E=0;for(d=0;d<u;++d){let L=t[d];if(c&&d>0&&(m.pack(L,h,V),V+=3,f=n[d-1],b[E++]=U.floatToByte(f.red),b[E++]=U.floatToByte(f.green),b[E++]=U.floatToByte(f.blue),b[E++]=U.floatToByte(f.alpha)),c&&d===u-1)break;m.pack(L,h,V),V+=3,l(n)&&(f=n[d],b[E++]=U.floatToByte(f.red),b[E++]=U.floatToByte(f.green),b[E++]=U.floatToByte(f.blue),b[E++]=U.floatToByte(f.alpha))}}let _=new bn;_.position=new Ie({componentDatatype:K.DOUBLE,componentsPerAttribute:3,values:h}),l(n)&&(_.color=new Ie({componentDatatype:K.UNSIGNED_BYTE,componentsPerAttribute:4,values:b,normalize:!0})),p=h.length/3;let S=(p-1)*2,A=Me.createTypedArray(p,S),Z=0;for(d=0;d<p-1;++d)A[Z++]=d,A[Z++]=d+1;return new ft({attributes:_,indices:A,primitiveType:ve.LINES,boundingSphere:de.fromPoints(t)})};var une=v9;var Bxo=x(T(),1);function m1(e){let t=e.radius??1,i={radii:new m(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new wa(i),this._workerName="createSphereGeometry"}m1.packedLength=wa.packedLength;m1.pack=function(e,t,n){return wa.pack(e._ellipsoidGeometry,t,n)};var sFt=new wa,Qx={radius:void 0,radii:new m,vertexFormat:new Xe,stackPartitions:void 0,slicePartitions:void 0};m1.unpack=function(e,t,n){let i=wa.unpack(e,t,sFt);return Qx.vertexFormat=Xe.clone(i._vertexFormat,Qx.vertexFormat),Qx.stackPartitions=i._stackPartitions,Qx.slicePartitions=i._slicePartitions,l(n)?(m.clone(i._radii,Qx.radii),n._ellipsoidGeometry=new wa(Qx),n):(Qx.radius=i._radii.x,new m1(Qx))};m1.createGeometry=function(e){return wa.createGeometry(e._ellipsoidGeometry)};var F9=m1;var Kxo=x(T(),1);var mne=class{constructor(t){Qt(this,"ellipsoid");Qt(this,"rectangle");Qt(this,"projection")}getNumberOfXTilesAtLevel(t){he.throwInstantiationError()}getNumberOfYTilesAtLevel(t){he.throwInstantiationError()}rectangleToNativeRectangle(t,n){he.throwInstantiationError()}tileXYToNativeRectangle(t,n,i,o){he.throwInstantiationError()}tileXYToRectangle(t,n,i,o){he.throwInstantiationError()}positionToTileXY(t,n,i){he.throwInstantiationError()}},hne=mne;var uTo=x(T(),1);function aFt(e,t){this.rectangle=e,this.maxLevel=t}function cLe(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=[]}cLe.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 cFt(e,t){let n=t.getElementsByTagName("SRS")[0].textContent;if(n==="EPSG:4326")e.tilingScheme=new zi({ellipsoid:e.ellipsoid});else throw new le(`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"))),h=parseInt(s.getAttribute("maxlevel"),10);e.rectangles.push(new aFt(new ae(a,c,d,u),h))}}function lFt(e,t,n){let i=`An error occurred while accessing ${e.url}`;throw l(t)&&l(t.message)&&(i=`${i}: ${t.message}`),Bo.reportError(void 0,n,l(n)?n._errorEvent:void 0,i),new le(i)}async function dFt(e,t,n){try{let i=await t.fetchXML();cFt(e,i)}catch(i){lFt(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 bt(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 cLe(t),i=We.createIfNeeded(e);await dFt(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 Wc({buffer:Ah(c),width:a._heightmapWidth,height:a._heightmapHeight,childTileMask:uFt(a,e,t,n),structure:a._terrainDataStructure})})};qx.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)};var lLe=new ae;function uFt(e,t,n,i){let o=e._tilingScheme,r=e._rectangles,s=o.tileXYToRectangle(t,n,i),a=0;for(let c=0;c<r.length&&a!==15;++c){let d=r[c];if(d.maxLevel<=i)continue;let u=d.rectangle,h=ae.intersection(u,s,lLe);l(h)&&(Rz(o,u,t*2,n*2,i+1)&&(a|=4),Rz(o,u,t*2+1,n*2,i+1)&&(a|=8),Rz(o,u,t*2,n*2+1,i+1)&&(a|=1),Rz(o,u,t*2+1,n*2+1,i+1)&&(a|=2))}return a}function Rz(e,t,n,i,o){let r=e.tileXYToRectangle(n,i,o);return l(ae.intersection(r,t,lLe))}qx.prototype.getTileDataAvailable=function(e,t,n){};qx.prototype.loadTileDataAvailability=function(e,t,n){};var fne=qx;var yTo=x(T(),1);function NA(e){e=e??B.EMPTY_OBJECT,this._clock=void 0,this._element=void 0,this._clockSubscription=void 0,this._seekFunction=void 0,this._lastPlaybackRate=void 0,this.clock=e.clock,this.element=e.element,this.epoch=e.epoch??Je.MINIMUM_VALUE,this.tolerance=e.tolerance??1,this._seeking=!1,this._seekFunction=void 0,this._firstTickAfterSeek=!1}Object.defineProperties(NA.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(NA.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=mFt(this),e.addEventListener("seeked",this._seekFunction,!1)),this._element=e,this._seeking=!1,this._firstTickAfterSeek=!1)}}});NA.prototype.destroy=function(){return this.element=void 0,this.clock=void 0,me(this)};NA.prototype.isDestroyed=function(){return!1};NA.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};NA.prototype._onTick=function(e){let t=this._element;if(!l(t)||t.readyState<2)return;let n=t.paused,i=e.shouldAnimate;if(i===n&&(i?t.play():t.pause()),this._seeking||this._firstTickAfterSeek){this._firstTickAfterSeek=!1;return}this._trySetPlaybackRate(e);let o=e.currentTime,r=this.epoch??Je.MINIMUM_VALUE,s=Q.secondsDifference(o,r),a=t.duration,c,d=t.currentTime;t.loop?(s=s%a,s<0&&(s=a-s),c=s):s>a?c=a:s<0?c=0:c=s;let u=i?this.tolerance??1:.001;Math.abs(c-d)>u&&(this._seeking=!0,t.currentTime=c)};function mFt(e){return function(){e._seeking=!1,e._firstTickAfterSeek=!0}}var pne=NA;var TTo=x(T(),1),dLe={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(dLe);var bne=dLe;var ZTo=x(T(),1);function hFt(e){return e=e??B.EMPTY_OBJECT,IA.fromIonAssetId(2426648,{requestVertexNormals:e.requestVertexNormals??!1})}var I9=hFt;var GTo=x(T(),1);function fFt(e){return e=e??B.EMPTY_OBJECT,IA.fromIonAssetId(1,{requestVertexNormals:e.requestVertexNormals??!1,requestWaterMask:e.requestWaterMask??!1,ellipsoid:ie.WGS84})}var YA=fFt;var vTo=x(T(),1);var pFt=1953029805,bFt=2917034100;function gne(e,t){if(gne.passThroughDataForTesting)return t;let n=e.byteLength;if(n===0||n%4!==0)throw new le("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===pFt||o===bFt)return t;let r=new DataView(e),s=0,a=t.byteLength,c=a-a%8,d=n,u,h=8;for(;s<c;)for(h=(h+8)%24,u=h;s<c&&u<d;)i.setUint32(s,i.getUint32(s,!0)^r.getUint32(u,!0),!0),i.setUint32(s+4,i.getUint32(s+4,!0)^r.getUint32(u+4,!0),!0),s+=8,u+=24;if(s<a)for(u>=d&&(h=(h+8)%24,u=h);s<a;)i.setUint8(s,i.getUint8(s)^r.getUint8(u)),s++,u++}gne.passThroughDataForTesting=!1;var P9=gne;var NTo=x(T(),1);var gFt=new m;function yFt(e,t,n,i){let o=gT(e,t,n,i,gFt);return l(o)?o.x>0&&o.y>0&&o.z>0:!1}var yne=yFt;var wTo=x(T(),1);function xFt(e){return e<=.04045?e*.07739938080495357:Math.pow((e+.055)*.9478672985781991,2.4)}var wA=xFt;var UTo=x(T(),1);function TFt(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 xne=TFt;var OTo=x(T(),1);function _Ft(e,t,n){return function(){n.apply(e,arguments),t.apply(e,arguments)}}var X9=_Ft;var zTo=x(T(),1),N9=`uniform sampler2D u_noiseTexture;
uniform vec3 u_noiseTextureDimensions;
uniform float u_noiseDetail;
in vec2 v_offset;
in vec3 v_maximumSize;
in vec4 v_color;
in float v_slice;
in float v_brightness;
float wrap(float value, float rangeLength) {
if(value < 0.0) {
float absValue = abs(value);
float modValue = mod(absValue, rangeLength);
return mod(rangeLength - modValue, rangeLength);
}
return mod(value, rangeLength);
}
vec3 wrapVec(vec3 value, float rangeLength) {
return vec3(wrap(value.x, rangeLength),
wrap(value.y, rangeLength),
wrap(value.z, rangeLength));
}
vec2 voxelToUV(vec3 voxelIndex) {
float textureSliceWidth = u_noiseTextureDimensions.x;
float noiseTextureRows = u_noiseTextureDimensions.y;
float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
float textureSliceWidthSquared = textureSliceWidth * textureSliceWidth;
vec2 inverseNoiseTextureDimensions = vec2(noiseTextureRows / textureSliceWidthSquared,
inverseNoiseTextureRows / textureSliceWidth);
vec3 wrappedIndex = wrapVec(voxelIndex, textureSliceWidth);
float column = mod(wrappedIndex.z, textureSliceWidth * inverseNoiseTextureRows);
float row = floor(wrappedIndex.z / textureSliceWidth * noiseTextureRows);
float xPixelCoord = wrappedIndex.x + column * textureSliceWidth;
float yPixelCoord = wrappedIndex.y + row * textureSliceWidth;
return vec2(xPixelCoord, yPixelCoord) * inverseNoiseTextureDimensions;
}
// Interpolate a voxel with its neighbor (along the positive X-axis)
vec4 lerpSamplesX(vec3 voxelIndex, float x) {
vec2 uv0 = voxelToUV(voxelIndex);
vec2 uv1 = voxelToUV(voxelIndex + vec3(1.0, 0.0, 0.0));
vec4 sample0 = texture(u_noiseTexture, uv0);
vec4 sample1 = texture(u_noiseTexture, uv1);
return mix(sample0, sample1, x);
}
vec4 sampleNoiseTexture(vec3 position) {
float textureSliceWidth = u_noiseTextureDimensions.x;
vec3 recenteredPos = position + vec3(textureSliceWidth / 2.0);
vec3 lerpValue = fract(recenteredPos);
vec3 voxelIndex = floor(recenteredPos);
vec4 xLerp00 = lerpSamplesX(voxelIndex, lerpValue.x);
vec4 xLerp01 = lerpSamplesX(voxelIndex + vec3(0.0, 0.0, 1.0), lerpValue.x);
vec4 xLerp10 = lerpSamplesX(voxelIndex + vec3(0.0, 1.0, 0.0), lerpValue.x);
vec4 xLerp11 = lerpSamplesX(voxelIndex + vec3(0.0, 1.0, 1.0), lerpValue.x);
vec4 yLerp0 = mix(xLerp00, xLerp10, lerpValue.y);
vec4 yLerp1 = mix(xLerp01, xLerp11, lerpValue.y);
return mix(yLerp0, yLerp1, lerpValue.z);
}
// Intersection with a unit sphere with radius 0.5 at center (0, 0, 0).
bool intersectSphere(vec3 origin, vec3 dir, float slice,
out vec3 point, out vec3 normal) {
float A = dot(dir, dir);
float B = dot(origin, dir);
float C = dot(origin, origin) - 0.25;
float discriminant = (B * B) - (A * C);
if(discriminant < 0.0) {
return false;
}
float root = sqrt(discriminant);
float t = (-B - root) / A;
if(t < 0.0) {
t = (-B + root) / A;
}
point = origin + t * dir;
if(slice >= 0.0) {
point.z = (slice / 2.0) - 0.5;
if(length(point) > 0.5) {
return false;
}
}
normal = normalize(point);
point -= czm_epsilon2 * normal;
return true;
}
// Transforms the ray origin and direction into unit sphere space,
// then transforms the result back into the ellipsoid's space.
bool intersectEllipsoid(vec3 origin, vec3 dir, vec3 center, vec3 scale, float slice,
out vec3 point, out vec3 normal) {
if(scale.x <= 0.01 || scale.y < 0.01 || scale.z < 0.01) {
return false;
}
vec3 o = (origin - center) / scale;
vec3 d = dir / scale;
vec3 p, n;
bool intersected = intersectSphere(o, d, slice, p, n);
if(intersected) {
point = (p * scale) + center;
normal = n;
}
return intersected;
}
// Assume that if phase shift is being called for octave i,
// the frequency is of i - 1. This saves us from doing extra
// division / multiplication operations.
vec2 phaseShift2D(vec2 p, vec2 freq) {
return (czm_pi / 2.0) * sin(freq.yx * p.yx);
}
vec2 phaseShift3D(vec3 p, vec2 freq) {
return phaseShift2D(p.xy, freq) + czm_pi * vec2(sin(freq.x * p.z));
}
// The cloud texture function derived from Gardner's 1985 paper,
// "Visual Simulation of Clouds."
// https://www.cs.drexel.edu/~david/Classes/Papers/p297-gardner.pdf
const float T0 = 0.6; // contrast of the texture pattern
const float k = 0.1; // computed to produce a maximum value of 1
const float C0 = 0.8; // coefficient
const float FX0 = 0.6; // frequency X
const float FY0 = 0.6; // frequency Y
const int octaves = 5;
float T(vec3 point) {
vec2 sum = vec2(0.0);
float Ci = C0;
vec2 FXY = vec2(FX0, FY0);
vec2 PXY = vec2(0.0);
for(int i = 1; i <= octaves; i++) {
PXY = phaseShift3D(point, FXY);
Ci *= 0.707;
FXY *= 2.0;
vec2 sinTerm = sin(FXY * point.xy + PXY);
sum += Ci * sinTerm + vec2(T0);
}
return k * sum.x * sum.y;
}
const float a = 0.5; // fraction of surface reflection due to ambient or scattered light,
const float t = 0.4; // fraction of texture shading
const float s = 0.25; // fraction of specular reflection
float I(float Id, float Is, float It) {
return (1.0 - a) * ((1.0 - t) * ((1.0 - s) * Id + s * Is) + t * It) + a;
}
const vec3 lightDir = normalize(vec3(0.2, -1.0, 0.7));
vec4 drawCloud(vec3 rayOrigin, vec3 rayDir, vec3 cloudCenter, vec3 cloudScale, float cloudSlice,
float brightness) {
vec3 cloudPoint, cloudNormal;
if(!intersectEllipsoid(rayOrigin, rayDir, cloudCenter, cloudScale, cloudSlice,
cloudPoint, cloudNormal)) {
return vec4(0.0);
}
float Id = clamp(dot(cloudNormal, -lightDir), 0.0, 1.0); // diffuse reflection
float Is = max(pow(dot(-lightDir, -rayDir), 2.0), 0.0); // specular reflection
float It = T(cloudPoint); // texture function
float intensity = I(Id, Is, It);
vec3 color = vec3(intensity * clamp(brightness, 0.1, 1.0));
vec4 noise = sampleNoiseTexture(u_noiseDetail * cloudPoint);
float W = noise.x;
float W2 = noise.y;
float W3 = noise.z;
// The dot product between the cloud's normal and the ray's direction is greatest
// in the center of the ellipsoid's surface. It decreases towards the edge.
// Thus, it is used to blur the areas leading to the edges of the ellipsoid,
// so that no harsh lines appear.
// The first (and biggest) layer of worley noise is then subtracted from this.
// The final result is scaled up so that the base cloud is not too translucent.
float ndDot = clamp(dot(cloudNormal, -rayDir), 0.0, 1.0);
float TR = pow(ndDot, 3.0) - W; // translucency
TR *= 1.3;
// Subtracting the second and third layers of worley noise is more complicated.
// If these layers of noise were simply subtracted from the current translucency,
// the shape derived from the first layer of noise would be completely deleted.
// The erosion of this noise should thus be constricted to the edges of the cloud.
// However, because the edges of the ellipsoid were already blurred away, mapping
// the noise to (1.0 - ndDot) will have no impact on most of the cloud's appearance.
// The value of (0.5 - ndDot) provides the best compromise.
float minusDot = 0.5 - ndDot;
// Even with the previous calculation, subtracting the second layer of wnoise
// erode too much of the cloud. The addition of it, however, will detailed
// volume to the cloud. As long as the noise is only added and not subtracted,
// the results are aesthetically pleasing.
// The minusDot product is mapped in a way that it is larger at the edges of
// the ellipsoid, so a subtraction and min operation are used instead of
// an addition and max one.
TR -= min(minusDot * W2, 0.0);
// The third level of worley noise is subtracted from the result, with some
// modifications. First, a scalar is added to minusDot so that the noise
// starts affecting the shape farther away from the center of the ellipsoid's
// surface. Then, it is scaled down so its impact is not too intense.
TR -= 0.8 * (minusDot + 0.25) * W3;
// The texture function's shading does not correlate with the shape of the cloud
// produced by the layers of noise, so an extra shading scalar is calculated.
// The darkest areas of the cloud are assigned to be where the noise erodes
// the cloud the most. This is then interpolated based on the translucency
// and the diffuse shading term of that point in the cloud.
float shading = mix(1.0 - 0.8 * W * W, 1.0, Id * TR);
// To avoid values that are too dark, this scalar is increased by a small amount
// and clamped so it never goes to zero.
shading = clamp(shading + 0.2, 0.3, 1.0);
// Finally, the contrast of the cloud's color is increased.
vec3 finalColor = mix(vec3(0.5), shading * color, 1.15);
return vec4(finalColor, clamp(TR, 0.0, 1.0)) * v_color;
}
void main() {
#ifdef DEBUG_BILLBOARDS
out_FragColor = vec4(0.0, 0.5, 0.5, 1.0);
#endif
// To avoid calculations with high values,
// we raycast from an arbitrarily smaller space.
vec2 coordinate = v_maximumSize.xy * v_offset;
vec3 ellipsoidScale = 0.82 * v_maximumSize;
vec3 ellipsoidCenter = vec3(0.0);
float zOffset = max(ellipsoidScale.z - 10.0, 0.0);
vec3 eye = vec3(0, 0, -10.0 - zOffset);
vec3 rayDir = normalize(vec3(coordinate, 1.0) - eye);
vec3 rayOrigin = eye;
#ifdef DEBUG_ELLIPSOIDS
vec3 point, normal;
if(intersectEllipsoid(rayOrigin, rayDir, ellipsoidCenter, ellipsoidScale, v_slice,
point, normal)) {
out_FragColor = v_brightness * v_color;
}
#else
#ifndef DEBUG_BILLBOARDS
vec4 cloud = drawCloud(rayOrigin, rayDir,
ellipsoidCenter, ellipsoidScale, v_slice, v_brightness);
if(cloud.w < 0.01) {
discard;
}
out_FragColor = cloud;
#endif
#endif
}
`;var KTo=x(T(),1),Y9=`#ifdef INSTANCED
in vec2 direction;
#endif
in vec4 positionHighAndScaleX;
in vec4 positionLowAndScaleY;
in vec4 packedAttribute0;
in vec4 packedAttribute1;
in vec4 color;
out vec2 v_offset;
out vec3 v_maximumSize;
out vec4 v_color;
out float v_slice;
out float v_brightness;
void main() {
// Unpack attributes.
vec3 positionHigh = positionHighAndScaleX.xyz;
vec3 positionLow = positionLowAndScaleY.xyz;
vec2 scale = vec2(positionHighAndScaleX.w, positionLowAndScaleY.w);
float show = packedAttribute0.x;
float brightness = packedAttribute0.y;
vec2 coordinates = packedAttribute0.wz;
vec3 maximumSize = packedAttribute1.xyz;
float slice = packedAttribute1.w;
#ifdef INSTANCED
vec2 dir = direction;
#else
vec2 dir = coordinates;
#endif
vec2 offset = dir - vec2(0.5, 0.5);
vec2 scaledOffset = scale * offset;
vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);
vec4 positionEC = czm_modelViewRelativeToEye * p;
positionEC.xy += scaledOffset;
positionEC.xyz *= show;
gl_Position = czm_projection * positionEC;
v_offset = offset;
v_maximumSize = maximumSize;
v_color = color;
v_slice = slice;
v_brightness = brightness;
}
`;var jTo=x(T(),1),w9=`uniform vec3 u_noiseTextureDimensions;
uniform float u_noiseDetail;
uniform vec3 u_noiseOffset;
in vec2 v_position;
float wrap(float value, float rangeLength) {
if(value < 0.0) {
float absValue = abs(value);
float modValue = mod(absValue, rangeLength);
return mod(rangeLength - modValue, rangeLength);
}
return mod(value, rangeLength);
}
vec3 wrapVec(vec3 value, float rangeLength) {
return vec3(wrap(value.x, rangeLength),
wrap(value.y, rangeLength),
wrap(value.z, rangeLength));
}
vec3 random3(vec3 p) {
float dot1 = dot(p, vec3(127.1, 311.7, 932.8));
float dot2 = dot(p, vec3(269.5, 183.3, 421.4));
return fract(vec3(sin(dot1 - dot2), cos(dot1 * dot2), dot1 * dot2));
}
// Frequency corresponds to cell size.
// The higher the frequency, the smaller the cell size.
vec3 getWorleyCellPoint(vec3 centerCell, vec3 offset, float freq) {
float textureSliceWidth = u_noiseTextureDimensions.x;
vec3 cell = centerCell + offset;
cell = wrapVec(cell, textureSliceWidth / u_noiseDetail);
cell += floor(u_noiseOffset / u_noiseDetail);
vec3 p = offset + random3(cell);
return p;
}
float worleyNoise(vec3 p, float freq) {
vec3 centerCell = floor(p * freq);
vec3 pointInCell = fract(p * freq);
float shortestDistance = 1000.0;
for(float z = -1.0; z <= 1.0; z++) {
for(float y = -1.0; y <= 1.0; y++) {
for(float x = -1.0; x <= 1.0; x++) {
vec3 offset = vec3(x, y, z);
vec3 point = getWorleyCellPoint(centerCell, offset, freq);
float distance = length(pointInCell - point);
if(distance < shortestDistance) {
shortestDistance = distance;
}
}
}
}
return shortestDistance;
}
const float MAX_FBM_ITERATIONS = 10.0;
float worleyFBMNoise(vec3 p, float octaves, float scale) {
float noise = 0.0;
float freq = 1.0;
float persistence = 0.625;
for(float i = 0.0; i < MAX_FBM_ITERATIONS; i++) {
if(i >= octaves) {
break;
}
noise += worleyNoise(p * scale, freq * scale) * persistence;
persistence *= 0.5;
freq *= 2.0;
}
return noise;
}
void main() {
float textureSliceWidth = u_noiseTextureDimensions.x;
float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
float x = mod(v_position.x, textureSliceWidth);
float y = mod(v_position.y, textureSliceWidth);
float sliceRow = floor(v_position.y / textureSliceWidth);
float z = floor(v_position.x / textureSliceWidth) + sliceRow * inverseNoiseTextureRows * textureSliceWidth;
vec3 position = vec3(x, y, z);
position /= u_noiseDetail;
float worley0 = clamp(worleyFBMNoise(position, 3.0, 1.0), 0.0, 1.0);
float worley1 = clamp(worleyFBMNoise(position, 3.0, 2.0), 0.0, 1.0);
float worley2 = clamp(worleyFBMNoise(position, 3.0, 3.0), 0.0, 1.0);
out_FragColor = vec4(worley0, worley1, worley2, 1.0);
}
`;var qTo=x(T(),1),M9=`uniform vec3 u_noiseTextureDimensions;
in vec2 position;
out vec2 v_position;
void main()
{
gl_Position = vec4(position, 0.1, 1.0);
float textureSliceWidth = u_noiseTextureDimensions.x;
float noiseTextureRows = u_noiseTextureDimensions.y;
float inverseNoiseTextureRows = u_noiseTextureDimensions.z;
vec2 transformedPos = (position * 0.5) + vec2(0.5);
transformedPos *= textureSliceWidth;
transformedPos.x *= textureSliceWidth * inverseNoiseTextureRows;
transformedPos.y *= noiseTextureRows;
v_position = transformedPos;
}
`;var e_o=x(T(),1),k9=`
in vec2 v_textureCoordinates;
void main()
{
czm_materialInput materialInput;
materialInput.s = v_textureCoordinates.s;
materialInput.st = v_textureCoordinates;
materialInput.str = vec3(v_textureCoordinates, 0.0);
materialInput.normalEC = vec3(0.0, 0.0, -1.0);
czm_material material = czm_getMaterial(materialInput);
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
}
`;var o_o=x(T(),1);var SFt=new m(1,1,1);function Tne(e){e=e??SFt,this._dimensions=m.clone(e)}Object.defineProperties(Tne.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){m.clone(e,this._dimensions)}}});var AFt=new m;Tne.prototype.emit=function(e){let t=this._dimensions,n=m.multiplyByScalar(t,.5,AFt),i=W.randomBetween(-n.x,n.x),o=W.randomBetween(-n.y,n.y),r=W.randomBetween(-n.z,n.z);e.position=m.fromElements(i,o,r,e.position),e.velocity=m.normalize(e.position,e.velocity)};var _ne=Tne;var a_o=x(T(),1);function S0(){this.featurePropertiesDirty=!1}Object.defineProperties(S0.prototype,{featuresLength:{get:function(){he.throwInstantiationError()}},pointsLength:{get:function(){he.throwInstantiationError()}},trianglesLength:{get:function(){he.throwInstantiationError()}},geometryByteLength:{get:function(){he.throwInstantiationError()}},texturesByteLength:{get:function(){he.throwInstantiationError()}},batchTableByteLength:{get:function(){he.throwInstantiationError()}},innerContents:{get:function(){he.throwInstantiationError()}},ready:{get:function(){he.throwInstantiationError()}},tileset:{get:function(){he.throwInstantiationError()}},tile:{get:function(){he.throwInstantiationError()}},url:{get:function(){he.throwInstantiationError()}},batchTable:{get:function(){he.throwInstantiationError()}},metadata:{get:function(){he.throwInstantiationError()},set:function(e){he.throwInstantiationError()}},group:{get:function(){he.throwInstantiationError()},set:function(e){he.throwInstantiationError()}}});S0.prototype.hasProperty=function(e,t){he.throwInstantiationError()};S0.prototype.getFeature=function(e){he.throwInstantiationError()};S0.prototype.applyDebugSettings=function(e,t){he.throwInstantiationError()};S0.prototype.applyStyle=function(e){he.throwInstantiationError()};S0.prototype.update=function(e,t){he.throwInstantiationError()};S0.prototype.pick=function(e,t,n){he.throwInstantiationError()};S0.prototype.isDestroyed=function(){he.throwInstantiationError()};S0.prototype.destroy=function(){he.throwInstantiationError()};var Sne=S0;var N_o=x(T(),1);var u_o=x(T(),1);function U9(e){e=e??B.EMPTY_OBJECT,this._maximumSubtreeCount=e.maximumSubtreeCount??0,this._subtreeRequestCounter=0,this._queue=new Wg({comparator:U9.comparator})}U9.prototype.addSubtree=function(e){let t=new ZFt(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()};U9.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}};U9.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 ZFt(e,t){this.subtree=e,this.stamp=t}var D9=U9;function O9(e){e=e??B.EMPTY_OBJECT;let{className:t,names:n,types:i,componentTypes:o,shape:r,dimensions:s,paddingBefore:a=m.ZERO.clone(),paddingAfter:c=m.ZERO.clone(),globalTransform:d=F.IDENTITY.clone(),shapeTransform:u=F.IDENTITY.clone(),minBounds:h,maxBounds:p,minimumValues:b,maximumValues:f,maximumTileCount:y}=e;this._shapeTransform=u,this._globalTransform=d,this._shape=r,this._minBounds=h,this._maxBounds=p,this._dimensions=s,this._paddingBefore=a,this._paddingAfter=c,this._className=t,this._names=n,this._types=i,this._componentTypes=o,this._metadataOrder=r===fc.ELLIPSOID?g0.Z_UP:g0.Y_UP,this._minimumValues=b,this._maximumValues=f,this._maximumTileCount=y,this._availableLevels=void 0,this._implicitTileset=void 0,this._subtreeCache=new D9}Object.defineProperties(O9.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}}});O9.fromUrl=async function(e){let t=We.createIfNeeded(e),n=await t.fetchJson();VFt(n);let i=FFt(n,t);await i.load();let{root:o}=n,r=_i(n,"3DTILES_metadata")?n.extensions["3DTILES_metadata"]:n,s=new aS({metadataJson:r,schema:i.schema}),a=o.content.extensions["3DTILES_content_voxels"],c=a.class,d=IFt(s,c);Object.assign(d,RFt(o)),l(o.transform)?d.globalTransform=F.unpack(o.transform):d.globalTransform=F.clone(F.IDENTITY),d.dimensions=m.unpack(a.dimensions),d.maximumTileCount=CFt(s),l(a.padding)&&(d.paddingBefore=m.unpack(a.padding.before),d.paddingAfter=m.unpack(a.padding.after));let u=new O9(d),h=new Ip(t,o,i.schema);return u._implicitTileset=h,u._availableLevels=h.availableLevels,vi.unload(i),u};function CFt(e){if(l(e.tileset))return e.tileset.getPropertyBySemantic(Cm.TILESET_TILE_COUNT)}function VFt(e){let t=e.root;if(!l(t.content))throw new le("Root must have content");if(!_i(t.content,"3DTILES_content_voxels"))throw new le("Root tile content must have 3DTILES_content_voxels extension");if(!_i(t,"3DTILES_implicit_tiling")&&!l(t.implicitTiling))throw new le("Root tile must have implicit tiling");if(!l(e.schema)&&!l(e.schemaUri)&&!_i(e,"3DTILES_metadata"))throw new le("Tileset must have a metadata schema")}function RFt(e){let t=e.boundingVolume;if(l(t.box))return WFt(t.box);if(l(t.region))return EFt(t.region);if(_i(t,"3DTILES_bounding_volume_cylinder"))return vFt(t.extensions["3DTILES_bounding_volume_cylinder"]);throw new le("Only box, region and 3DTILES_bounding_volume_cylinder are supported in Cesium3DTilesVoxelProvider")}function EFt(e){let t=e[0],n=e[1],i=e[2],o=e[3],r=e[4],s=e[5],a=F.fromScale(ie.WGS84.radii),c=new m(t,n,r),d=new m(i,o,s);return{shape:fc.ELLIPSOID,minBounds:c,maxBounds:d,shapeTransform:a}}var GFt=new m,LFt=new q;function WFt(e){let t=$t.unpack(e),n=q.getScale(t.halfAxes,GFt),i=q.getRotation(t.halfAxes,LFt);return{shape:fc.BOX,minBounds:m.negate(n,new m),maxBounds:m.clone(n),shapeTransform:F.fromRotationTranslation(i,t.center)}}function vFt(e){let{minRadius:t,maxRadius:n,height:i,minAngle:o=-W.PI,maxAngle:r=W.PI,translation:s=[0,0,0],rotation:a=[0,0,0,1]}=e,c=-.5*i+s[2],d=.5*i+s[2],u=F.fromTranslationQuaternionRotationScale(m.unpack(s),Pe.unpack(a),m.ONE);return{shape:fc.CYLINDER,minBounds:m.fromElements(t,o,c),maxBounds:m.fromElements(n,r,d),shapeTransform:u}}function FFt(e,t){let{schemaUri:n,schema:i}=e;return l(n)?vi.getSchemaLoader({resource:t.getDerivedResource({url:n})}):vi.getSchemaLoader({schema:i})}function IFt(e,t){let{schema:n,statistics:i}=e,o=i?.classes[t],r=n.classes[t].properties,s=Object.entries(r).map(([b,f])=>{let{type:y,componentType:_}=f,S=o?.properties[b].min,A=o?.properties[b].max,Z=gt.getComponentCount(y),V=uLe(S,Z),E=uLe(A,Z);return{id:b,type:y,componentType:_,minValue:V,maxValue:E}}),a=s.map(b=>b.id),c=s.map(b=>b.type),d=s.map(b=>b.componentType),u=s.map(b=>b.minValue),h=s.map(b=>b.maxValue),p=u.some(l);return{className:t,names:a,types:c,componentTypes:d,minimumValues:p?u:void 0,maximumValues:p?h:void 0}}function uLe(e,t){if(!l(e))return;let n=Array.isArray(e)?e:[e];return Array.from({length:t},(i,o)=>n[o])}async function PFt(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=Mb(a);return o=await db.fromSubtreeJson(s,c.jsonPayload,c.binaryPayload,n,t),i.addSubtree(o),o}O9.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 Pp({subdivisionScheme:s.subdivisionScheme,subtreeLevels:s.subtreeLevels,level:t,x:n,y:i,z:o}),c=a.isSubtreeRoot()&&a.level>0,d=c?a.getParentSubtreeCoordinates():a.getSubtreeCoordinates(),h=await PFt(this,d);if(!(c?h.childSubtreeIsAvailableAtCoordinates:h.tileIsAvailableAtCoordinates).call(h,a))return Promise.reject(`Tile is not available at level ${t}, x ${n}, y ${i}, z ${o}.`);let{contentUriTemplates:f,baseResource:y}=s,_=f[0].getDerivedResource({templateValues:a.getTemplateValues()}),S=y.getDerivedResource({url:_.url});return _A.fromGltf(S)};var Ane=O9;var k_o=x(T(),1);function Zne(e){e=e??1,this._radius=e??1}Object.defineProperties(Zne.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}});Zne.prototype.emit=function(e){let t=W.randomBetween(0,W.TWO_PI),n=W.randomBetween(0,this._radius),i=n*Math.cos(t),o=n*Math.sin(t),r=0;e.position=m.fromElements(i,o,r,e.position),e.velocity=m.clone(m.UNIT_Z,e.velocity)};var B9=Zne;var WSo=x(T(),1);var D_o=x(T(),1),Ez={CUMULUS:0};Ez.validate=function(e){return e===Ez.CUMULUS};Object.freeze(Ez);var h1=Ez;var j_o=x(T(),1);function jf(e,t){if(e=e??B.EMPTY_OBJECT,this._show=e.show??!0,this._position=m.clone(e.position??m.ZERO),!l(e.scale)&&l(e.maximumSize))this._maximumSize=m.clone(e.maximumSize),this._scale=new M(this._maximumSize.x,this._maximumSize.y);else{this._scale=M.clone(e.scale??new M(20,12));let n=new m(this._scale.x,this._scale.y,Math.min(this._scale.x,this._scale.y)/1.5);this._maximumSize=m.clone(e.maximumSize??n)}this._slice=e.slice??-1,this._color=U.clone(e.color??U.WHITE),this._brightness=e.brightness??1,this._cloudCollection=t,this._index=-1}var XFt=jf.SHOW_INDEX=0,NFt=jf.POSITION_INDEX=1,YFt=jf.SCALE_INDEX=2,wFt=jf.MAXIMUM_SIZE_INDEX=3,MFt=jf.SLICE_INDEX=4,kFt=jf.BRIGHTNESS_INDEX=5,UFt=jf.COLOR_INDEX=6;jf.NUMBER_OF_PROPERTIES=7;function MA(e,t){let n=e._cloudCollection;l(n)&&(n._updateCloud(e,t),e._dirty=!0)}Object.defineProperties(jf.prototype,{show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,MA(this,XFt))}},position:{get:function(){return this._position},set:function(e){let t=this._position;m.equals(t,e)||(m.clone(e,t),MA(this,NFt))}},scale:{get:function(){return this._scale},set:function(e){let t=this._scale;M.equals(t,e)||(M.clone(e,t),MA(this,YFt))}},maximumSize:{get:function(){return this._maximumSize},set:function(e){let t=this._maximumSize;m.equals(t,e)||(m.clone(e,t),MA(this,wFt))}},color:{get:function(){return this._color},set:function(e){let t=this._color;U.equals(t,e)||(U.clone(e,t),MA(this,UFt))}},slice:{get:function(){return this._slice},set:function(e){this._slice!==e&&(this._slice=e,MA(this,MFt))}},brightness:{get:function(){return this._brightness},set:function(e){this._brightness!==e&&(this._brightness=e,MA(this,kFt))}}});jf.prototype._destroy=function(){this._cloudCollection=void 0};var em=jf;var tm,Gz=new m,DFt={positionHighAndScaleX:0,positionLowAndScaleY:1,packedAttribute0:2,packedAttribute1:3,color:4},OFt={direction:0,positionHighAndScaleX:1,positionLowAndScaleY:2,packedAttribute0:3,packedAttribute1:4,color:5},BFt=em.SHOW_INDEX,zFt=em.POSITION_INDEX,HFt=em.SCALE_INDEX,KFt=em.MAXIMUM_SIZE_INDEX,JFt=em.SLICE_INDEX,jFt=em.BRIGHTNESS_INDEX,QFt=em.NUMBER_OF_PROPERTIES,qFt=em.COLOR_INDEX;function Qf(e){e=e??B.EMPTY_OBJECT,this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(QFt),this._noiseTexture=void 0,this._textureSliceWidth=128,this._noiseTextureRows=4,this.noiseDetail=e.noiseDetail??16,this.noiseOffset=m.clone(e.noiseOffset??m.ZERO),this._loading=!1,this._ready=!1;let t=this;this._uniforms={u_noiseTexture:function(){return t._noiseTexture},u_noiseTextureDimensions:mLe(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 mLe(e){return function(){return Gz.x=e._textureSliceWidth,Gz.y=e._noiseTextureRows,Gz.z=1/e._noiseTextureRows,Gz}}Object.defineProperties(Qf.prototype,{length:{get:function(){return Vne(this),this._clouds.length}}});function hLe(e){let t=e.length;for(let n=0;n<t;++n)e[n]&&e[n]._destroy()}Qf.prototype.add=function(e){e=e??B.EMPTY_OBJECT;let t=e.cloudType??h1.CUMULUS,n;return t===h1.CUMULUS&&(n=new em(e,this),n._index=this._clouds.length,this._clouds.push(n),this._createVertexArray=!0),n};Qf.prototype.remove=function(e){return this.contains(e)?(this._clouds[e._index]=void 0,this._cloudsRemoved=!0,this._createVertexArray=!0,e._destroy(),!0):!1};Qf.prototype.removeAll=function(){hLe(this._clouds),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!0};function Vne(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}}Qf.prototype._updateCloud=function(e,t){e._dirty||(this._cloudsToUpdate[this._cloudsToUpdateIndex++]=e),++this._propertiesChanged[t]};Qf.prototype.contains=function(e){return l(e)&&e._cloudCollection===this};Qf.prototype.get=function(e){return Vne(this),this._clouds[e]};var $Ft=new Float32Array([-1,-1,1,-1,1,1,-1,1]),e2t=new Uint16Array([0,1,2,0,2,3]);function t2t(e){let t=qe.createVertexBuffer({context:e,typedArray:$Ft,usage:Fe.STATIC_DRAW}),n=qe.createIndexBuffer({context:e,typedArray:e2t,usage:Fe.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT}),i=[{index:0,vertexBuffer:t,componentsPerAttribute:2,componentDatatype:K.FLOAT}];return new Mn({context:e,attributes:i,indexBuffer:n})}var Rne;function n2t(e){let n=e.cache.cloudCollection_indexBufferBatched;if(l(n))return n;let i=16384*6-6,o=new Uint16Array(i);for(let r=0,s=0;r<i;r+=6,s+=4)o[r]=s,o[r+1]=s+1,o[r+2]=s+2,o[r+3]=s,o[r+4]=s+2,o[r+5]=s+3;return n=qe.createIndexBuffer({context:e,typedArray:o,usage:Fe.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT}),n.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferBatched=n,n}function i2t(e){let t=e.cache.cloudCollection_indexBufferInstanced;return l(t)||(t=qe.createIndexBuffer({context:e,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:Fe.STATIC_DRAW,indexDatatype:Me.UNSIGNED_SHORT}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_indexBufferInstanced=t),t}function o2t(e){let t=e.cache.cloudCollection_vertexBufferInstanced;return l(t)||(t=qe.createVertexBuffer({context:e,typedArray:new Float32Array([0,0,1,0,1,1,0,1]),usage:Fe.STATIC_DRAW}),t.vertexArrayDestroyable=!1,e.cache.cloudCollection_vertexBufferInstanced=t),t}function r2t(e,t,n){let i=[{index:tm.positionHighAndScaleX,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:Fe.STATIC_DRAW},{index:tm.positionLowAndScaleY,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:Fe.STATIC_DRAW},{index:tm.packedAttribute0,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:Fe.STATIC_DRAW},{index:tm.packedAttribute1,componentsPerAttribute:4,componentDatatype:K.FLOAT,usage:Fe.STATIC_DRAW},{index:tm.color,componentsPerAttribute:4,componentDatatype:K.UNSIGNED_BYTE,normalize:!0,usage:Fe.STATIC_DRAW}];n&&i.push({index:tm.direction,componentsPerAttribute:2,componentDatatype:K.FLOAT,vertexBuffer:o2t(e)});let o=n?t:4*t;return new k0(e,i,o,n)}var Cne=new Tn;function fLe(e,t,n,i){let o,r=n[tm.positionHighAndScaleX],s=n[tm.positionLowAndScaleY],a=i.position;Tn.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 pLe(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 bLe(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 gLe(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 s2t(e,t,n,i){fLe(e,t,n,i),pLe(e,t,n,i),bLe(e,t,n,i),gLe(e,t,n,i)}function a2t(e,t,n,i){let o=e,r=o._textureSliceWidth,s=o._noiseTextureRows,a=t.context;o._vaNoise=t2t(a),o._spNoise=qt.fromCache({context:a,vertexShaderSource:n,fragmentShaderSource:i,attributeLocations:{position:0}});let c=o.noiseDetail,d=o.noiseOffset;o._noiseTexture=new Et({context:a,width:r*r/s,height:r*s,pixelDatatype:Oe.UNSIGNED_BYTE,pixelFormat:Ke.RGBA,sampler:new Ut({wrapS:un.REPEAT,wrapT:un.REPEAT,minificationFilter:kt.NEAREST,magnificationFilter:ni.NEAREST})});let u=new xl({vertexArray:o._vaNoise,shaderProgram:o._spNoise,outputTexture:o._noiseTexture,uniformMap:{u_noiseTextureDimensions:mLe(o),u_noiseDetail:function(){return c},u_noiseOffset:function(){return d}},persists:!1,owner:e,postExecute:function(h){o._ready=!0,o._loading=!1}});t.commandList.push(u),o._loading=!0}function c2t(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=r2t(i,r,n._instanced);let s=n._vaf.writers,a;for(a=0;a<r;++a){let c=o[a];s2t(e,t,s,c)}n._vaf.commit(Rne(i))}}var l2t=[];function d2t(e,t){let n=t.context,i=e,r=i._clouds.length,s=i._cloudsToUpdate,a=i._cloudsToUpdateIndex,c=i._propertiesChanged,d=l2t;d.length=0,(c[zFt]||c[HFt])&&d.push(fLe),(c[BFt]||c[jFt])&&d.push(pLe),(c[KFt]||c[JFt])&&d.push(bLe),c[qFt]&&d.push(gLe);let u=d.length,h=i._vaf.writers,p,b,f;if(a/r>.1){for(p=0;p<a;++p)for(b=s[p],b._dirty=!1,f=0;f<u;++f)d[f](e,t,h,b);i._vaf.commit(Rne(n))}else{for(p=0;p<a;++p){for(b=s[p],b._dirty=!1,f=0;f<u;++f)d[f](e,t,h,b);i._instanced?i._vaf.subCommit(b._index,1):i._vaf.subCommit(b._index*4,4)}i._vaf.endSubCommits()}i._cloudsToUpdateIndex=0}function u2t(e,t,n,i){let o=t.context,r=e,s=new Be({defines:[],sources:[n]});r._instanced&&s.defines.push("INSTANCED");let a=new Be({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:tn.ALPHA_BLEND}),r._spCreated=!0,r._compiledDebugBillboards=r.debugBillboards,r._compiledDebugEllipsoids=r.debugEllipsoids}function m2t(e,t){let n=e,i=t.passes,o=n._uniforms,r=t.commandList;if(i.render){let s=n._colorCommands,a=n._vaf.va,c=a.length;s.length=c;for(let d=0;d<c;d++){let u=s[d];l(u)||(u=s[d]=new et),u.pass=Le.TRANSLUCENT,u.owner=e,u.uniformMap=o,u.count=a[d].indicesCount,u.vertexArray=a[d].va,u.shaderProgram=n._sp,u.renderState=n._rs,n._instanced&&(u.count=6,u.instanceCount=n._clouds.length),r.push(u)}}}Qf.prototype.update=function(e){if(Vne(this),!this.show)return;let t=this.debugBillboards||this.debugEllipsoids;this._ready=t?!0:l(this._noiseTexture),!this._ready&&!this._loading&&!t&&a2t(this,e,M9,w9),this._instanced=e.context.instancedArrays,tm=this._instanced?OFt:DFt,Rne=this._instanced?i2t:n2t;let i=this._clouds.length,o=this._cloudsToUpdate,r=this._cloudsToUpdateIndex;this._createVertexArray?c2t(this,e):r>0&&d2t(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)&&u2t(this,e,Y9,N9),m2t(this,e))};Qf.prototype.isDestroyed=function(){return!1};Qf.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(),hLe(this._clouds),me(this)};var Ene=Qf;var PSo=x(T(),1);var h2t=W.toRadians(30);function Gne(e){this._angle=e??h2t}Object.defineProperties(Gne.prototype,{angle:{get:function(){return this._angle},set:function(e){this._angle=e}}});Gne.prototype.emit=function(e){let t=Math.tan(this._angle),n=W.randomBetween(0,W.TWO_PI),i=W.randomBetween(0,t),o=i*Math.cos(n),r=i*Math.sin(n),s=1;e.velocity=m.fromElements(o,r,s,e.velocity),m.normalize(e.velocity,e.velocity),e.position=m.clone(m.ZERO,e.position)};var Lne=Gne;var MSo=x(T(),1);function z9(e){e=e??B.EMPTY_OBJECT;let t=e.attributeName,n=e.perInstanceAttribute;l(n)||(n=!1);let i=e.glslDatatype??"vec3",o=`v_${t}`,r;if(t==="normal"||t==="tangent"||t==="bitangent")r=`vec4 getColor() { return vec4((${o} + vec3(1.0)) * 0.5, 1.0); }
`;else switch(t==="st"&&(i="vec2"),i){case"float":r=`vec4 getColor() { return vec4(vec3(${o}), 1.0); }
`;break;case"vec2":r=`vec4 getColor() { return vec4(${o}, 0.0, 1.0); }
`;break;case"vec3":r=`vec4 getColor() { return vec4(${o}, 1.0); }
`;break;case"vec4":r=`vec4 getColor() { return ${o}; }
`;break}let s=`in vec3 position3DHigh;
in vec3 position3DLow;
in float batchId;
${n?"":`in ${i} ${t};
`}out ${i} ${o};
void main()
{
vec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);
${n?`${o} = czm_batchTable_${t}(batchId);
`:`${o} = ${t};
`}gl_Position = czm_modelViewProjectionRelativeToEye * p;
}`,a=`in ${i} ${o};
${r}
void main()
{
out_FragColor = getColor();
}`;this.material=void 0,this.translucent=e.translucent??!1,this._vertexShaderSource=e.vertexShaderSource??s,this._fragmentShaderSource=e.fragmentShaderSource??a,this._renderState=yo.getDefaultRenderState(!1,!1,e.renderState),this._closed=e.closed??!1,this._attributeName=t,this._glslDatatype=i}Object.defineProperties(z9.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}}});z9.prototype.getFragmentShaderSource=yo.prototype.getFragmentShaderSource;z9.prototype.isTranslucent=yo.prototype.isTranslucent;z9.prototype.getRenderState=yo.prototype.getRenderState;var Wne=z9;var $So=x(T(),1);function Lz(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}Lz.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 Wt({geometry:new ug({positions:[m.ZERO,m.UNIT_X],width:this.width,vertexFormat:Es.VERTEX_FORMAT,colors:[U.RED,U.RED],arcType:on.NONE}),modelMatrix:F.multiplyByUniformScale(this.modelMatrix,this.length,new F),id:this.id,pickPrimitive:this}),n=new Wt({geometry:new ug({positions:[m.ZERO,m.UNIT_Y],width:this.width,vertexFormat:Es.VERTEX_FORMAT,colors:[U.GREEN,U.GREEN],arcType:on.NONE}),modelMatrix:F.multiplyByUniformScale(this.modelMatrix,this.length,new F),id:this.id,pickPrimitive:this}),i=new Wt({geometry:new ug({positions:[m.ZERO,m.UNIT_Z],width:this.width,vertexFormat:Es.VERTEX_FORMAT,colors:[U.BLUE,U.BLUE],arcType:on.NONE}),modelMatrix:F.multiplyByUniformScale(this.modelMatrix,this.length,new F),id:this.id,pickPrimitive:this});this._primitive=new Ln({geometryInstances:[t,n,i],appearance:new Es,asynchronous:!1})}this._primitive.update(e)}};Lz.prototype.isDestroyed=function(){return!1};Lz.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),me(this)};var H9=Lz;var iAo=x(T(),1);function f2t(e){this.direction=m.clone(e.direction),this.color=U.clone(e.color??U.WHITE),this.intensity=e.intensity??1}var vne=f2t;var bAo=x(T(),1);var rAo=x(T(),1),K9=`in vec3 v_positionMC;
in vec3 v_positionEC;
in vec2 v_st;
void main()
{
czm_materialInput materialInput;
vec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));
#ifdef FACE_FORWARD
normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);
#endif
materialInput.s = v_st.s;
materialInput.st = v_st;
materialInput.str = vec3(v_st, 0.0);
// Convert tangent space material normal to eye space
materialInput.normalEC = normalEC;
materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);
// Convert view vector to world space
vec3 positionToEyeEC = -v_positionEC;
materialInput.positionToEyeEC = positionToEyeEC;
czm_material material = czm_getMaterial(materialInput);
#ifdef FLAT
out_FragColor = vec4(material.diffuse + material.emission, material.alpha);
#else
out_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);
#endif
}
`;var aAo=x(T(),1),J9=`in vec3 position3DHigh;
in vec3 position3DLow;
in vec2 st;
in float batchId;
out vec3 v_positionMC;
out vec3 v_positionEC;
out vec2 v_st;
void main()
{
vec4 p = czm_computePosition();
v_positionMC = position3DHigh + position3DLow; // position in model coordinates
v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates
v_st = st;
gl_Position = czm_modelViewProjectionRelativeToEye * p;
}
`;function kA(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??J9,this._fragmentShaderSource=e.fragmentShaderSource??K9,this._renderState=yo.getDefaultRenderState(t,!n,e.renderState),this._closed=!1,this._flat=e.flat??!1,this._faceForward=e.faceForward??n,this._aboveGround=n}Object.defineProperties(kA.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 kA.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}}});kA.VERTEX_FORMAT=Xe.POSITION_AND_ST;kA.prototype.getFragmentShaderSource=yo.prototype.getFragmentShaderSource;kA.prototype.isTranslucent=yo.prototype.isTranslucent;kA.prototype.getRenderState=yo.prototype.getRenderState;var Fne=kA;var LAo=x(T(),1);var p2t=1e5;function j9(e){e=e??B.EMPTY_OBJECT;let t=e.credit;typeof t=="string"&&(t=new bt(t)),this._credit=t,this._radius=l(e.radius)?e.radius:p2t,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 F9({radius:this._radius,vertexFormat:Xe.ALL}),i=new Wt({geometry:n,modelMatrix:this._transform}),o=new Bi({fabric:{type:"Image",uniforms:{image:this._image,repeat:new M(-this._repeatHorizontal,this._repeatVertical)}}});return this._primitive=new Ln({geometryInstances:i,appearance:new po({material:o,closed:!0,faceForward:!1,flat:!0,translucent:!1,renderState:{cull:{enabled:!1}}}),credit:this._credit}),this}Object.defineProperties(j9.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)}}});j9.prototype.update=function(e){return l(this._credit)&&e.creditDisplay.addCreditToNextFrame(this._credit),this._primitive.update(e)};j9.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),me(this)};j9.prototype.isDestroyed=function(){return this._primitive.isDestroyed()};var Ine=j9;var NAo=x(T(),1);function Jd(e){this._scene=e.scene,this.samplingWindow=e.samplingWindow??Jd.defaultSettings.samplingWindow,this.quietPeriod=e.quietPeriod??Jd.defaultSettings.quietPeriod,this.warmupPeriod=e.warmupPeriod??Jd.defaultSettings.warmupPeriod,this.minimumFrameRateDuringWarmup=e.minimumFrameRateDuringWarmup??Jd.defaultSettings.minimumFrameRateDuringWarmup,this.minimumFrameRateAfterWarmup=e.minimumFrameRateAfterWarmup??Jd.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){b2t(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(){g2t(t)}this._visibilityChangeRemoveListener=void 0,l(n)&&(document.addEventListener(n,i,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(n,i,!1)})}Jd.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8};Jd.fromScene=function(e){return(!l(e._frameRateMonitor)||e._frameRateMonitor.isDestroyed())&&(e._frameRateMonitor=new Jd({scene:e})),e._frameRateMonitor};Object.defineProperties(Jd.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}}});Jd.prototype.pause=function(){++this._pauseCount,this._pauseCount===1&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)};Jd.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)};Jd.prototype.isDestroyed=function(){return!1};Jd.prototype.destroy=function(){return this._preUpdateRemoveListener(),l(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),me(this)};function b2t(e,t){if(e._pauseCount>0)return;let n=Yi();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=n+e.quietPeriod/ii.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/ii.SECONDS_PER_MILLISECOND;else if(n>=e._quietPeriodEndTime){e._frameTimes.push(n);let i=n-e.samplingWindow/ii.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 g2t(e){document[e._hiddenPropertyName]?e.pause():e.unpause()}var Q9=Jd;var QAo=x(T(),1);var yLe=x(Bte(),1);function Pne(){this._image=new Image}Pne.prototype.isReady=function(){return!0};Pne.prototype.shouldDiscardImage=function(e){return e===this._image};function UA(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 ae(-W.PI,-W.PI,W.PI,W.PI),ellipsoid:e.ellipsoid});let t=e.credit;typeof t=="string"&&(t=new bt(t)),this._credit=t,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,l(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new Pne),this._errorEvent=new _e}Object.defineProperties(UA.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}}});UA.fromMetadata=function(e,t){if(!e.imageryPresent)throw new le(`The server ${e.url} doesn't have imagery`);let n=new UA(t);return n._metadata=e,n};UA.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]}};UA.prototype.requestImage=function(e,t,n,i){let o=this._tileDiscardPolicy._image,r=this._metadata,s=Pg.tileXYToQuadKey(e,t,n),a=r.getTileInformation(e,t,n);if(!l(a)){if(r.isValid(s)){let d=new fr({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=y2t(this,a,e,t,n,i).fetchArrayBuffer();if(l(c))return c.then(function(d){P9(r.key,d);let u=new Uint8Array(d),h,p=r.protoImagery;if((!l(p)||!p)&&(h=x2t(u)),!l(h)&&(!l(p)||p)){let b=T2t(u);h=b.imageType,u=b.imageData}return!l(h)||!l(u)?o:cb({uint8Array:u,format:h,flipY:!0})})};UA.prototype.pickFeatures=function(e,t,n,i,o){};function y2t(e,t,n,i,o,r){let s=Pg.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 x2t(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 T2t(e){let t=yLe.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 le("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 Xne=UA;var mZo=x(T(),1);var _2t=600;function A0(e){e=e??B.EMPTY_OBJECT,this._key=l(e.key)?e.key:ua.defaultApiKey,this._baseResource=We.createIfNeeded(e.url??ua.streetViewStaticApiEndpoint),this._metadataResource=this._baseResource.getDerivedResource({url:"streetview/metadata"}),this._tileSize=e.tileSize??_2t}Object.defineProperties(A0.prototype,{});A0.prototype.loadPanorama=async function(e){let t=e.cartographic,n=e.tileSize??this._tileSize,i=`${n}x${n}`,o=e.signature,{panoId:r}=e;l(r)||(r=(await this.getNearestPanoId(t)).panoId);let s=ua.getDefaultCredit(),a=m.fromDegrees(W.toDegrees(t.longitude),W.toDegrees(t.latitude),0),c=[this._loadFaceImage({heading:0,pitch:0,tileSizeString:i,panoId:r,signature:o}),this._loadFaceImage({heading:180,pitch:0,tileSizeString:i,panoId:r,signature:o}),this._loadFaceImage({heading:-90,pitch:-90,tileSizeString:i,panoId:r,signature:o}),this._loadFaceImage({heading:-90,pitch:90,tileSizeString:i,panoId:r,signature:o}),this._loadFaceImage({heading:270,pitch:0,tileSizeString:i,panoId:r,signature:o}),this._loadFaceImage({heading:90,pitch:0,tileSizeString:i,panoId:r,signature:o})],[d,u,h,p,b,f]=await Promise.all(c),y=dt.localFrameToFixedFrameGenerator("north","down"),_=F.getMatrix3(y(a,ie.default),new q);return new VA({sources:{positiveX:d,negativeX:u,positiveY:h,negativeY:p,positiveZ:b,negativeZ:f},transform:_,credit:s})};A0.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 he(`GoogleStreetViewCubeMapPanoramaProvider metadata error: ${r.status}`);return{panoId:r.pano_id,latitude:r.location.lat,longitude:r.location.lng}};A0.prototype.getPanoIdMetadata=async function(e){let n=await this._metadataResource.getDerivedResource({queryParameters:{key:this._key,pano:e}}).fetchJson();if(n.status!=="OK")throw new he(`GoogleStreetViewCubeMapPanoramaProvider metadata error: ${n.status}`);return n};A0.prototype._loadFaceImage=async function(e){let t=this._buildFaceUrl(e);try{return await We.fetchImage({url:t,preferImageBitmap:!0,flipY:!0})}catch{throw new he(`Failed to load Street View face image: ${t}`)}};A0.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};A0.fromUrl=async function(e){if(e=e??{},e.key=e.key??ua.defaultStreetViewStaticApiKey??ua.defaultApiKey,!l(e.key)&&!l(ua.defaultStreetViewStaticApiKey)&&!l(ua.defaultApiKey))throw new he("options.key, GoogleMaps.defaultStreetViewStaticApiKey or GoogleMaps.defaultApiKey is required.");return new A0({...e})};A0._parseMetadata=function(e){return{cartographic:pe.fromDegrees(e.location.lng,e.location.lat,0)}};var Nne=A0;var xZo=x(T(),1);var S2t=new U(1,1,1,.4),A2t=new U(0,1,0,.05),Z2t=new U(0,.5,0,.2);function DA(e){e=e??B.EMPTY_OBJECT,this._defaultAlpha=void 0,this._defaultNightAlpha=void 0,this._defaultDayAlpha=void 0,this._defaultBrightness=void 0,this._defaultContrast=void 0,this._defaultHue=void 0,this._defaultSaturation=void 0,this._defaultGamma=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??S2t,this._glowColor=e.glowColor??A2t,this._glowWidth=e.glowWidth??6,this._backgroundColor=e.backgroundColor??Z2t,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(DA.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}}});DA.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()};DA.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};DA.prototype.getTileCredits=function(e,t,n){};DA.prototype.requestImage=function(e,t,n,i){return Promise.resolve(this._canvas)};DA.prototype.pickFeatures=function(e,t,n,i,o){};var Yne=DA;var qCo=x(T(),1);var ZCo=x(T(),1);var aCo=x(T(),1);var GZo=x(T(),1);function qf(){}qf._maxDecodingConcurrency=Math.max(an.hardwareConcurrency-1,1);qf._decodeTaskProcessor=new Hn("decodeI3S",qf._maxDecodingConcurrency);qf._promise=void 0;async function C2t(){if(await qf._decodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}))return qf._decodeTaskProcessor;throw new le("I3S decoder could not be initialized.")}qf.decode=async function(e,t,n,i,o){return l(qf._promise)||(qf._promise=C2t()),qf._promise.then(function(r){let s=n._parent._data,a=n._parent._inverseRotationMatrix,c=0,d=0,u=0;l(s.obb)?(c=s.obb.center[0],d=s.obb.center[1],u=s.obb.center[2]):l(s.mbs)&&(c=s.mbs[0],d=s.mbs[1],u=s.mbs[2]);let h=q.fromRotationX(-W.PI_OVER_TWO),p=new q;q.multiply(h,a,p);let b=pe.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 q9=qf;var FZo=x(T(),1);function wne(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(wne.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}}});wne.prototype.load=async function(){return this._data=await $f.loadJson(this._resource),this._data};var $9=wne;var NZo=x(T(),1);function Ng(e,t){this._storageInfo=t,this._parent=e,this._dataProvider=e._dataProvider,this._loadPromise=void 0;let n=`attributes/${t.key}/0`;l(this._parent._nodeIndex)?this._resource=this._parent._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.attribute.resource}/${n}`}):this._resource=this._parent.resource.getDerivedResource({url:n})}Object.defineProperties(Ng.prototype,{resource:{get:function(){return this._resource}},header:{get:function(){return this._header}},values:{get:function(){if(l(this._values)){if(l(this._values.attributeValues))return this._values.attributeValues;if(l(this._values.objectIds))return this._values.objectIds}return[]}},name:{get:function(){return this._storageInfo.name}}});function Wz(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 V2t(e){return e==="String"?1:Wz(e)}async function R2t(e){let t=await e._dataProvider._loadBinary(e._resource),n=new DataView(t);e._data=t,e._validateHeader(n);let i=e._parseHeader(n),o=e._getBodyOffset(i);e._validateBody(n,o),e._parseBody(n,o)}Ng.prototype.load=function(){return l(this._loadPromise)?this._loadPromise:(this._loadPromise=R2t(this).catch(function(e){console.error(e)}),this._loadPromise)};Ng.prototype._parseValue=function(e,t,n){let i;if(t==="UInt8")i=e.getUint8(n),n+=1;else if(t==="Int8")i=e.getInt8(n),n+=1;else if(t==="UInt16")i=e.getUint16(n,!0),n+=2;else if(t==="Int16")i=e.getInt16(n,!0),n+=2;else if(t==="UInt32")i=e.getUint32(n,!0),n+=4;else if(t==="Oid32")i=e.getUint32(n,!0),n+=4;else if(t==="Int32")i=e.getInt32(n,!0),n+=4;else if(t==="UInt64"){let o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);i=o+Math.pow(2,32)*r,n+=8}else if(t==="Int64"){let o=e.getUint32(n,!0),r=e.getUint32(n+4,!0);r<Math.pow(2,31)?i=o+Math.pow(2,32)*r:i=o+Math.pow(2,32)*(r-Math.pow(2,32)),n+=8}else t==="Float32"?(i=e.getFloat32(n,!0),n+=4):t==="Float64"?(i=e.getFloat64(n,!0),n+=8):t==="String"&&(i=String.fromCharCode(e.getUint8(n)),n+=1);return{value:i,offset:n}};Ng.prototype._parseHeader=function(e){let t=0;this._header={};for(let n=0;n<this._storageInfo.header.length;n++){let i=this._storageInfo.header[n],o=this._parseValue(e,i.valueType,t);this._header[i.property]=o.value,t=o.offset}return t};Ng.prototype._parseBody=function(e,t){this._values={};for(let n=0;n<this._storageInfo.ordering.length;n++){let i=this._storageInfo.ordering[n],o=i==="ObjectIds"?"objectIds":i,r=this._storageInfo[o];if(l(r)){this._values[o]=[];for(let s=0;s<this._header.count;++s)if(r.valueType!=="String"){let a=this._parseValue(e,r.valueType,t);this._values[o].push(a.value),t=a.offset}else{let a=this._values.attributeByteCounts[s],c="";for(let d=0;d<a;++d){let u=this._parseValue(e,r.valueType,t);u.value.charCodeAt(0)!==0&&(c+=u.value),t=u.offset}this._values[o].push(c)}}}};Ng.prototype._getBodyOffset=function(e){let t=0;return l(this._storageInfo.attributeValues)?t=Wz(this._storageInfo.attributeValues.valueType):l(this._storageInfo.objectIds)&&(t=Wz(this._storageInfo.objectIds.valueType)),t>0?Math.ceil(e/t)*t:e};Ng.prototype._validateHeader=function(e){let t=0;for(let n=0;n<this._storageInfo.header.length;n++){let i=this._storageInfo.header[n];t+=V2t(i.valueType)}if(e.byteLength<t)throw new le(`Invalid attribute buffer size (field: ${this.name}, header: ${t}, actual: ${e.byteLength})`)};Ng.prototype._validateBody=function(e,t){if(!l(this._header.count))throw new le(`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=Wz(s.valueType);t+=a*this._header.count}else{if(!l(n))throw new le(`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 le(`Invalid attribute buffer (field: ${this.name}, ${r} is missing)`)}if(e.byteLength<t)throw new le(`Invalid attribute buffer size (field: ${this.name}, expected: ${t}, actual: ${e.byteLength})`)};var ek=Ng;var OZo=x(T(),1);function tk(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(tk.prototype,{resource:{get:function(){return this._resource}},data:{get:function(){return this._data}},customAttributes:{get:function(){return this._customAttributes}}});tk.prototype.load=function(){let e=this;return this._dataProvider._loadBinary(this._resource).then(function(t){return e._data=t,t})};var E2t=new m,G2t=new m,L2t=new m,W2t=new m,v2t=new m;function Mne(e,t,n,i){let o=m.subtract(i,n,E2t),r=m.cross(o,m.subtract(e,n,G2t),W2t),s=m.cross(o,m.subtract(t,n,L2t),v2t);return m.dot(r,s)>=0}var F2t=new m,I2t=new m,P2t=new m,X2t=new m,N2t=new m,Y2t=new m,w2t=new m,M2t=new m,k2t=new m,U2t=new m;tk.prototype.getClosestPointIndexOnTriangle=function(e,t,n){if(l(this._customAttributes)&&l(this._customAttributes.positions)){let i=new m(e,t,n);i.x-=this._customAttributes.cartesianCenter.x,i.y-=this._customAttributes.cartesianCenter.y,i.z-=this._customAttributes.cartesianCenter.z,q.multiplyByVector(this._customAttributes.parentRotation,i,i);let o=Number.MAX_VALUE,r,s,a,c,d=this._customAttributes.positions,u=this._customAttributes.indices,h;l(u)?h=u.length:h=d.length/3;for(let p=0;p<h;p++){let b,f,y;l(u)?(b=u[p],f=u[p+1],y=u[p+2]):(b=p*3,f=p*3+1,y=p*3+2);let _=m.fromElements(d[b*3],d[b*3+1],d[b*3+2],F2t),S=m.fromElements(d[f*3],d[f*3+1],d[f*3+2],I2t),A=new m(d[y*3],d[y*3+1],d[y*3+2],P2t);if(!Mne(i,_,S,A)||!Mne(i,S,_,A)||!Mne(i,A,_,S))continue;let Z=m.subtract(S,_,X2t),V=m.subtract(A,_,N2t),E=m.cross(Z,V,Y2t);if(m.magnitude(E)===0)continue;let L=m.normalize(E,w2t),v=m.subtract(i,_,M2t),I=Math.abs(m.dot(v,L));if(I<o){o=I,r=p;let X=m.magnitudeSquared(m.subtract(i,_,v)),N=m.magnitudeSquared(m.subtract(i,S,k2t)),g=m.magnitudeSquared(m.subtract(i,A,U2t));X<N&&X<g?(a=b,c=_,s=X):N<g?(a=f,c=S,s=N):(a=y,c=A,s=g)}}if(l(r))return{index:a,distanceSquared:s,distance:Math.sqrt(s),queriedPosition:i,closestPosition:m.clone(c)}}return{index:-1,distanceSquared:Number.Infinity,distance:Number.Infinity}};function xLe(e){let t=[],n=e.length;for(let i=0;i<n;i++)i<3?t.push(wA(e[i])):t.push(e[i]);return t}tk.prototype._generateGltf=function(e,t,n,i,o,r,s,a){let c={pbrMetallicRoughness:{metallicFactor:0},doubleSided:!0,name:"Material"},d=!1,u,h="";if(l(this._parent._data.mesh)&&l(this._layer._data.materialDefinitions)){let Z=this._parent._data.mesh.material.definition;if(Z>=0&&Z<this._layer._data.materialDefinitions.length){if(u=this._layer._data.materialDefinitions[Z],c=u,l(c.pbrMetallicRoughness)&&l(c.pbrMetallicRoughness.baseColorTexture)){d=!0,c.pbrMetallicRoughness.baseColorTexture.index=0;let V="0";if(l(this._layer._data.textureSetDefinitions))for(let E=0;E<this._layer._data.textureSetDefinitions.length;E++){let L=this._layer._data.textureSetDefinitions[E];for(let v=0;v<L.formats.length;v++){let I=L.formats[v];if(I.format==="jpg"){V=I.name;break}}}l(this._parent._data.mesh)&&this._parent._data.mesh.material.resource>=0&&(h=this._layer.resource.getDerivedResource({url:`nodes/${this._parent._data.mesh.material.resource}/textures/${V}`}).url)}l(c.pbrMetallicRoughness)&&l(c.pbrMetallicRoughness.baseColorFactor)&&(c.pbrMetallicRoughness.baseColorFactor=xLe(c.pbrMetallicRoughness.baseColorFactor)),l(c.emissiveFactor)&&(c.emissiveFactor=xLe(c.emissiveFactor))}}else l(this._parent._data.textureData)&&(d=!0,h=this._parent.resource.getDerivedResource({url:`${this._parent._data.textureData[0].href}`}).url,c.pbrMetallicRoughness.baseColorTexture={index:0});l(c.alphaMode)&&(c.alphaMode=c.alphaMode.toUpperCase());let p=[],b=[],f=[];d&&(p=[{sampler:0,source:0}],b=[{uri:h}],f=[{magFilter:9729,minFilter:9986,wrapS:10497,wrapT:10497}]);let y=[],_=n.length;for(let A=0;A<_;A++){let Z=n[A].primitives,V=Z.length;for(let E=0;E<V;E++){let L=Z[E];if(l(L.material)){for(;L.material>=y.length;){let I=ze(c,!0);y.push(I)}let v=y[L.material];l(L.extra)&&L.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 f1=tk;function bl(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(bl.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}}});bl.prototype.load=async function(){let e=this;function t(){if(!e._isRoot){let o=e._create3DTileDefinition();e._tile=new Hm(e._layer._tileset,e._dataProvider.resource,o,e._parent._tile),e._tile._i3sNode=e}}if(!l(this._nodeIndex)){let o=await $f.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 TLe(e,t){let n=new ek(e,t);return e._fields[t.name]=n,n.load()}bl.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(TLe(this,i))}return Promise.all(t)};bl.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 TLe(this,o)}return Promise.resolve()};bl.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)};bl.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};bl.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 bl(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};bl.prototype._loadGeometryData=function(){let e=[];if(l(this._data.geometryData))for(let t=0;t<this._data.geometryData.length;t++){let n=new f1(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 f1(this,n);i._geometryDefinitions=t.definition,i._geometryBufferInfo=t.geometryBufferInfo,this._geometryData.push(i),e.push(i.load())}return Promise.all(e)};bl.prototype._loadFeatureData=function(){let e=[];if(l(this._data.featureData))for(let t=0;t<this._data.featureData.length;t++){let n=new $9(this,this._data.featureData[t].href);this._featureData.push(n),e.push(n.load())}return Promise.all(e)};bl.prototype._clearGeometryData=function(){this._geometryData=[]};bl.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=pe.fromDegrees(e.center[0],e.center[1],e.center[2]):n=pe.fromDegrees(t[0],t[1],t[2]),l(this._dataProvider._geoidDataList)&&l(n))for(let S=0;S<this._dataProvider._geoidDataList.length;S++){let A=this._dataProvider._geoidDataList[S],Z=A.projection.project(n);if(Z.x>A.nativeExtent.west&&Z.x<A.nativeExtent.east&&Z.y>A.nativeExtent.south&&Z.y<A.nativeExtent.north){n.height+=z2t(Z.x,Z.y,A);break}}let i={},o,r=0;l(e)?(i={box:[0,0,0,e.halfSize[0],0,0,0,e.halfSize[1],0,0,0,e.halfSize[2]]},r=Math.max(Math.max(this._data.obb.halfSize[0],this._data.obb.halfSize[1]),this._data.obb.halfSize[2]),o=ie.WGS84.cartographicToCartesian(n)):(i={sphere:[0,0,0,t[3]]},o=ie.WGS84.cartographicToCartesian(n),r=this._data.mbs[3]),r*=2;let s=1/0;if(l(this._data.lodThreshold))if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThresholdSQ"){let S=Math.sqrt(this._data.lodThreshold/(Math.PI*.25));s=r/S}else if(this._layer._data.nodePages.lodSelectionMetricType==="maxScreenThreshold"){let S=this._data.lodThreshold;s=r/S}else console.error("Invalid lodSelectionMetricType in Layer");else if(l(this._data.lodSelection))for(let S=0;S<this._data.lodSelection.length;S++)this._data.lodSelection[S].metricType==="maxScreenThreshold"&&(s=r/this._data.lodSelection[S].maxError);s===1/0&&(s=1e5);let a=s*16,c=new yc(0,0,0),d=dt.headingPitchRollQuaternion(o,c);l(this._data.obb)&&(d=new Pe(this._data.obb.quaternion[0],this._data.obb.quaternion[1],this._data.obb.quaternion[2],this._data.obb.quaternion[3]));let u=q.fromQuaternion(d),h=q.inverse(u,new q),p=new F(u[0],u[1],u[2],0,u[3],u[4],u[5],0,u[6],u[7],u[8],0,o.x,o.y,o.z,1),b=F.inverse(p,new F),f=F.clone(p);l(this._parent._globalTransform)&&F.multiply(p,this._parent._inverseGlobalTransform,f),this._globalTransform=p,this._inverseGlobalTransform=b,this._inverseRotationMatrix=h;let y=[];for(let S=0;S<this._children.length;S++)y.push(this._children[S]._create3DTileDefinition());return{children:y,refine:"REPLACE",boundingVolume:i,transform:[f[0],f[4],f[8],f[12],f[1],f[5],f[9],f[13],f[2],f[6],f[10],f[14],f[3],f[7],f[11],f[15]],content:{uri:l(this._resource)?this._resource.url:void 0},geometricError:a}};bl.prototype._loadSymbology=async function(){!l(this._symbologyData)&&l(this._layer._symbology)&&(this._symbologyData=await this._layer._symbology._getSymbology(this))};bl.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 q9.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 D2t(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 O2t(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 _Le(e,t){let n=e._tile.content.batchTable;if(l(n)&&n.featuresLength>0){n.setAllShow(!0);let i=await D2t(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(!O2t(o,e._fields[s.name],s)){n.setShow(o,!1);break}}}t.show=!0}bl.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=_Le(this,t);e.push(n)}return Promise.all(e)};Hm.prototype._hookedRequestContent=Hm.prototype.requestContent;Hm.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(()=>{_Le(e._i3sNode,n)})),e._isLoading=!1,t})}};function B2t(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 vz(e,t,n,i){let o=e+t*n;return i[o]}function z2t(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=vz(s,a,n.width,n.buffer),h=vz(c,a,n.width,n.buffer),p=vz(s,d,n.width,n.buffer),b=vz(c,d,n.width,n.buffer),f=B2t(o,r,u,h,p,b);return f=f*n.scale+n.offset,f}Object.defineProperties(Hm.prototype,{i3sNode:{get:function(){return this._i3sNode}}});var p1=bl;var mCo=x(T(),1);function Fz(e){this._layer=e,this._defaultSymbology=void 0,this._valueFields=[],this._uniqueValueHash=void 0,this._classBreaksHash=void 0,this._parseLayerSymbology()}Object.defineProperties(Fz.prototype,{defaultSymbology:{get:function(){return this._defaultSymbology}}});function kne(e,t){let n=[];for(let i=0;i<e.length;i++){let o=U.byteToFloat(e[i]);i<3?n.push(wA(o)):n.push(o)}return n.length===3&&(l(t)?n.push(1-t/100):n.push(1)),n}function b1(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=kne(r.color,r.transparency))):l(s)&&(n.edges={},l(s.color)&&(n.edges.color=kne(s.color,s.transparency))),!t){let a=o.material;l(a)&&(n.material={colorMixMode:a.colorMixMode},l(a.color)&&(n.material.color=kne(a.color,a.transparency)))}break}}return n}function H2t(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=b1(o[r].symbol,t),a=o[r].values;for(let c=0;c<a.length;c++){let d=a[c],u=n;for(let h=0;h<d.length;h++){let p=d[h];h===d.length-1?u[p]=s:(l(u[p])||(u[p]={}),u=u[p])}}}}return n}if(l(e.uniqueValueInfos)){let n={};for(let i=0;i<e.uniqueValueInfos.length;i++){let o=e.uniqueValueInfos[i];n[o.value]=b1(o.symbol,t)}return n}}function K2t(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(b1(r.symbol,t)))}return i.symbols.push(void 0),i}}Fz.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=b1(i.symbol,n):i.type==="uniqueValue"?(this._defaultSymbology=b1(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=H2t(i,n)):i.type==="classBreaks"&&(this._defaultSymbology=b1(i.defaultSymbol,n),this._valueFields.push(i.field),this._classBreaksHash=K2t(i,n))}};function SLe(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?SLe(s,t,n,i):s}}function J2t(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 j2t(e,t,n){let i=t[n],o=J2t(e.ranges,i);return e.symbols[o]}Fz.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=>SLe(this._uniqueValueHash,i,0,r):l(this._classBreaksHash)&&(o=r=>j2t(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 nk=Fz;function jd(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(jd.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}}});jd.prototype.load=async function(e){if(this._data.spatialReference.wkid!==4326)throw new le(`Unsupported spatial reference: ${this._data.spatialReference.wkid}`);if(this._dataProvider.applySymbology&&(this._symbology=new nk(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()};jd.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)}};jd.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]}}};jd.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 p1(this,t,!0)}else this._rootNode=new p1(this,this._data.store.rootNode,!0);return this._rootNode.load(e)};jd.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]})};jd._fetchJson=function(e){return e.fetchJson()};jd.prototype._loadNodePage=function(e){let t=this;if(!l(this._nodePageFetches[e])){let n=this.resource.getDerivedResource({url:`nodepages/${e}/`}),i=jd._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]};jd.prototype._computeExtent=function(){l(this._data.fullExtent)?this._extent=ae.fromDegrees(this._data.fullExtent.xmin,this._data.fullExtent.ymin,this._data.fullExtent.xmax,this._data.fullExtent.ymax):l(this._data.store.extent)&&(this._extent=ae.fromDegrees(this._data.store.extent[0],this._data.store.extent[1],this._data.store.extent[2],this._data.store.extent[3]))};jd.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)?ze(e):{},e.outlineColor=U.fromCartesian4(se.fromArray(o))),this._tileset=await Js.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()})};jd.prototype._updateVisibility=function(){l(this._tileset)&&(this._tileset.show=this._parent.show)};jd.prototype.filterByAttributes=function(e){this._filters=l(e)?ze(e,!0):[];let t=this._rootNode;return l(t)?t._filterFeatures():Promise.resolve()};var OA=jd;var GCo=x(T(),1);function Iz(e,t){this._dataProvider=e,this._resource=new We({url:t}),this._resource.setQueryParameters(e.resource.queryParameters),this._resource.appendForwardSlash()}Object.defineProperties(Iz.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}}});Iz.prototype.load=async function(){return this._data=await $f.loadJson(this._resource),this._data};Iz.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 ik=Iz;var PCo=x(T(),1);function ok(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(ok.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}}});ok._fromData=async function(e,t,n,i){let o=new ok(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=ok._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 $f.loadJson(o._resource),c=new OA(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 rk=ok;var CLe=x(ALe(),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 me(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 Q2t(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 ZLe(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=Q2t(e,t.id);if(l(t.sublayers)){let o=[];for(let s=0;s<t.sublayers.length;s++){let a=rk._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 ik(e,o);await r.load(),e._attributeStatistics.push(r)}if(l(t.fullExtent)){let o=ae.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 OA(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=ZLe(o,i.layers[a],t);s.push(c)}await Promise.all(s)}else await ZLe(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 le(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 le(`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 q2t=new M;function $2t(e,t){let n=e.tilingScheme,i=[],o={},r=e._lodCount,s=pe.fromRadians(t.west,t.north),a=pe.fromRadians(t.east,t.south),c=n.positionToTileXY(s,r),d=n.positionToTileXY(a,r);for(let h=c.x;h<=d.x;h++)for(let p=c.y;p<=d.y;p++){let b=M.fromElements(h,p,q2t),f=b.toString();if(!o.hasOwnProperty(f)){let y={x:b.x,y:b.y,level:r,tilingScheme:n,terrainProvider:e,positions:[]};o[f]=y,i.push(y)}}let u=[];for(let h=0;h<i.length;++h){let p=i[h],b=p.terrainProvider.requestTileGeometry(p.x,p.y,p.level);u.push(b)}return Promise.all(u).then(function(h){let p=[];for(let b=0;b<h.length;b++){let f={tilingScheme:n,x:i[b].x,y:i[b].y,level:i[b].level},y=h[b],_="Geographic";n._projection instanceof li&&(_="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===ah.LERC){let A=CLe.default.decode(y._buffer);S.buffer=A.pixels[0]}else S.buffer=y._buffer;p.push(S)}return p})}async function eIt(e){let t=e._geoidTiledTerrainProvider;if(l(t))try{let n=await $2t(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=eIt(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)?ae.union(e,n,e):e=ae.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 $f=ta;var aVo=x(T(),1);var sk={};sk.createTilesetFromIModelId=async function({iModelId:e,changesetId:t,tilesetOptions:n}){let{exports:i}=await ea.getExports(e,t);if(i.length>0&&i.every(c=>c.status===ea.ExportStatus.Invalid))throw new le(`All exports for this iModel are Invalid: ${e}`);let o=i.find(c=>c.status===ea.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 Js.fromUrl(a,n)};sk.createTilesetForRealityDataId=async function({iTwinId:e,realityDataId:t,type:n,rootDocument:i,tilesetOptions:o}){if(!l(n)||!l(i)){let c=await ea.getRealityDataMetadata(e,t);i=c.rootDocument,n=c.type}if(![ea.RealityDataType.Cesium3DTiles,ea.RealityDataType.PNTS,ea.RealityDataType.RealityMesh3DTiles,ea.RealityDataType.Terrain3DTiles,ea.RealityDataType.GaussianSplat3DTiles].includes(n))throw new le(`Reality data type is not a mesh type: ${n}`);let s=await ea.getRealityDataURL(e,t,i),a={maximumScreenSpaceError:4,...o};return Js.fromUrl(s,a)};sk.createDataSourceForRealityDataId=async function({iTwinId:e,realityDataId:t,type:n,rootDocument:i}){if(!l(n)||!l(i)){let s=await ea.getRealityDataMetadata(e,t);i=s.rootDocument,n=s.type}if(![ea.RealityDataType.KML,ea.RealityDataType.GeoJSON].includes(n))throw new le(`Reality data type is not a data source type: ${n}`);let r=await ea.getRealityDataURL(e,t,i);return n===ea.RealityDataType.GeoJSON?xx.load(r):DS.load(r)};sk.loadGeospatialFeatures=async function({iTwinId:e,collectionId:t,limit:n}){let i=n??1e4,o=`${ea.apiEndpoint}geospatial-features/itwins/${e}/ogc/collections/${t}/items`,r=new We({url:o,headers:{Authorization:ea._getAuthorizationHeader(),Accept:"application/vnd.bentley.itwin-platform.v1+json"},queryParameters:{limit:i,client:"CesiumJS"}});return xx.load(r)};var Une=sk;var dVo=x(T(),1);function VLe(){}Object.defineProperties(VLe.prototype,{color:{get:he.throwInstantiationError},intensity:{get:he.throwInstantiationError}});var Dne=VLe;var gVo=x(T(),1);var tIt=/\/$/,RLe=new bt('&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 g1(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();tIt.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 bt(c))):c=RLe,this._resource=i,this._imageryProvider=new us({url:i,credit:c,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(g1.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}}});g1.prototype.getTileCredits=function(e,t,n){};g1.prototype.requestImage=function(e,t,n,i){return this._imageryProvider.requestImage(e,t,n,i)};g1.prototype.pickFeatures=function(e,t,n,i,o){return this._imageryProvider.pickFeatures(e,t,n,i,o)};g1._defaultCredit=RLe;var One=g1;var xVo=x(T(),1);function Bne(e){}Bne.prototype.isReady=function(){return!0};Bne.prototype.shouldDiscardImage=function(e){return!1};var zne=Bne;var EVo=x(T(),1);var nIt=new bt("MapQuest, Open Street Map and contributors, CC-BY-SA");function Xz(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 Fs({ellipsoid:e.ellipsoid}),i=256,o=256,r=e.minimumLevel??0,s=e.maximumLevel,a=e.rectangle??n.rectangle,c=n.positionToTileXY(ae.southwest(a),r),d=n.positionToTileXY(ae.northeast(a),r),u=(Math.abs(d.x-c.x)+1)*(Math.abs(d.y-c.y)+1),h=e.credit??nIt;typeof h=="string"&&(h=new bt(h)),us.call(this,{url:t,credit:h,tilingScheme:n,tileWidth:i,tileHeight:o,minimumLevel:r,maximumLevel:s,rectangle:a})}l(Object.create)&&(Xz.prototype=Object.create(us.prototype),Xz.prototype.constructor=Xz);var Yg=Xz;var WVo=x(T(),1);function ELe(){he.throwInstantiationError()}Object.defineProperties(ELe.prototype,{show:{get:he.throwInstantiationError,set:he.throwInstantiationError},transform:{get:he.throwInstantiationError},credit:{get:he.throwInstantiationError}});var Hne=ELe;var IVo=x(T(),1);function Nz(){he.throwInstantiationError()}Object.defineProperties(Nz.prototype,{});Nz.fromUrl=function(e){he.throwInstantiationError()};Nz.prototype.loadPanorama=function(e){he.throwInstantiationError()};var Kne=Nz;var kVo=x(T(),1);var iIt=new M(1,1);function Jne(e){e=e??B.EMPTY_OBJECT,this.mass=e.mass??1,this.position=m.clone(e.position??m.ZERO),this.velocity=m.clone(e.velocity??m.ZERO),this.life=e.life??Number.MAX_VALUE,this.image=e.image,this.startColor=U.clone(e.startColor??U.WHITE),this.endColor=U.clone(e.endColor??U.WHITE),this.startScale=e.startScale??1,this.endScale=e.endScale??1,this.imageSize=M.clone(e.imageSize??iIt),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(Jne.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var GLe=new m;Jne.prototype.update=function(e,t){return m.multiplyByScalar(this.velocity,e,GLe),m.add(this.position,GLe,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 y1=Jne;var OVo=x(T(),1);function LLe(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(LLe.prototype,{complete:{get:function(){return this._complete}}});var jne=LLe;var HVo=x(T(),1);function WLe(e){}WLe.prototype.emit=function(e){he.throwInstantiationError()};var Qne=WLe;var cRo=x(T(),1);var vLe=new M(1,1);function ak(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 B9(.5)),this._emitter=t,this._bursts=e.bursts,this._modelMatrix=F.clone(e.modelMatrix??F.IDENTITY),this._emitterModelMatrix=F.clone(e.emitterModelMatrix??F.IDENTITY),this._matrixDirty=!0,this._combinedMatrix=new F,this._startColor=U.clone(e.color??e.startColor??U.WHITE),this._endColor=U.clone(e.color??e.endColor??U.WHITE),this._startScale=e.scale??e.startScale??1,this._endScale=e.scale??e.endScale??1,this._emissionRate=e.emissionRate??5,this._minimumSpeed=e.speed??e.minimumSpeed??1,this._maximumSpeed=e.speed??e.maximumSpeed??1,this._minimumParticleLife=e.particleLife??e.minimumParticleLife??5,this._maximumParticleLife=e.particleLife??e.maximumParticleLife??5,this._minimumMass=e.mass??e.minimumMass??1,this._maximumMass=e.mass??e.maximumMass??1,this._minimumImageSize=M.clone(e.imageSize??e.minimumImageSize??vLe),this._maximumImageSize=M.clone(e.imageSize??e.maximumImageSize??vLe),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(ak.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 oIt(e){let t=e._emissionRate,n=e._maximumParticleLife,i=0,o=e._bursts;if(l(o)){let h=o.length;for(let p=0;p<h;++p)i+=o[p].maximum}let r=e._billboardCollection,s=e.image,a=Math.ceil(t*n+i),c=e._particles,d=e._particlePool,u=Math.max(a-c.length-d.length,0);for(let h=0;h<u;++h){let p=new y1;p._billboard=r.add({image:s,show:!1}),d.push(p)}e._particleEstimate=a}function rIt(e){let t=e._particlePool.pop();return l(t)||(t=new y1),t}function sIt(e,t){e._particlePool.push(t)}function aIt(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 cIt(e){l(e._billboard)&&(e._billboard.show=!1)}function FLe(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 lIt(e,t){t.startColor=U.clone(e._startColor,t.startColor),t.endColor=U.clone(e._endColor,t.endColor),t.startScale=e._startScale,t.endScale=e._endScale,t.image=e.image,t.life=W.randomBetween(e._minimumParticleLife,e._maximumParticleLife),t.mass=W.randomBetween(e._minimumMass,e._maximumMass),t.imageSize.x=W.randomBetween(e._minimumImageSize.x,e._maximumImageSize.x),t.imageSize.y=W.randomBetween(e._minimumImageSize.y,e._maximumImageSize.y),t._normalizedAge=0,t._age=0;let n=W.randomBetween(e._minimumSpeed,e._maximumSpeed);m.multiplyByScalar(t.velocity,n,t.velocity),e._particles.push(t)}function dIt(e,t){if(e._isComplete)return 0;t=W.mod(t,e._lifetime);let n=t*e._emissionRate,i=Math.floor(n);if(e._carryOver+=n-i,e._carryOver>1&&(i++,e._carryOver-=1),l(e.bursts)){let o=e.bursts.length;for(let r=0;r<o;r++){let s=e.bursts[r],a=e._currentTime;l(s)&&!s._complete&&a>s.time&&(i+=W.randomBetween(s.minimum,s.maximum),s._complete=!0)}}return i}var Yz=new m;ak.prototype.update=function(e){if(!this.show)return;l(this._billboardCollection)||(this._billboardCollection=new Tu),this._updateParticlePool&&(oIt(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)?FLe(this,s):(cIt(s),sIt(this,s),n[r]=n[a-1],--r,--a);n.length=a;let c=dIt(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=rIt(this),this._emitter.emit(s),m.add(s.position,s.velocity,Yz),F.multiplyByPoint(d,Yz,Yz),s.position=F.multiplyByPoint(d,s.position,s.position),m.subtract(Yz,s.position,s.velocity),m.normalize(s.velocity,s.velocity),lIt(this,s),FLe(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&&aIt(this)};ak.prototype.isDestroyed=function(){return!1};ak.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),me(this)};var qne=ak;var uRo=x(T(),1);var $ne=class{constructor(){Qt(this,"quadtree");Qt(this,"tilingScheme");Qt(this,"errorEvent");he.throwInstantiationError()}static computeDefaultLevelZeroMaximumGeometricError(t){return t.ellipsoid.maximumRadius*2*Math.PI*.25/(65*t.getNumberOfXTilesAtLevel(0))}update(t,n){he.throwInstantiationError()}beginUpdate(t,n,i){he.throwInstantiationError()}endUpdate(t,n,i){he.throwInstantiationError()}getLevelMaximumGeometricError(t){he.throwInstantiationError()}loadTile(t,n,i){he.throwInstantiationError()}computeTileVisibility(t,n,i){he.throwInstantiationError()}showTileThisFrame(t,n,i,o){he.throwInstantiationError()}computeDistanceToTile(t,n){he.throwInstantiationError()}isDestroyed(){he.throwInstantiationError()}destroy(){he.throwInstantiationError()}},eie=$ne;var bRo=x(T(),1);function tie(e){e=e??1,this._radius=e??1}Object.defineProperties(tie.prototype,{radius:{get:function(){return this._radius},set:function(e){this._radius=e}}});tie.prototype.emit=function(e){let t=W.randomBetween(0,W.TWO_PI),n=W.randomBetween(0,W.PI),i=W.randomBetween(0,this._radius),o=i*Math.cos(t)*Math.sin(n),r=i*Math.sin(t)*Math.sin(n),s=i*Math.cos(n);e.position=m.fromElements(o,r,s,e.position),e.velocity=m.normalize(e.position,e.velocity)};var nie=tie;var xRo=x(T(),1);function ck(){}ck.prototype.evaluate=function(e,t){he.throwInstantiationError()};ck.prototype.evaluateColor=function(e,t){he.throwInstantiationError()};ck.prototype.getShaderFunction=function(e,t,n,i){he.throwInstantiationError()};ck.prototype.getVariables=function(){he.throwInstantiationError()};var iie=ck;var ZRo=x(T(),1);function x1(e){this._ready=!1,this._provider=void 0,this._errorEvent=new _e,this._readyEvent=new _e,mIt(this,e)}Object.defineProperties(x1.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}}});x1.fromWorldTerrain=function(e){return new x1(YA(e))};x1.fromWorldBathymetry=function(e){return new x1(I9(e))};function uIt(e,t){e.numberOfListeners>0?e.raiseEvent(t):console.error(t)}async function mIt(e,t){let n;try{n=await Promise.resolve(t),e._provider=n,e._ready=!0,e._readyEvent.raiseEvent(n)}catch(i){uIt(e._errorEvent,i)}}var lk=x1;var RRo=x(T(),1);function T1(){}T1.prototype.boundingVolume=void 0;T1.prototype.boundingSphere=void 0;T1.prototype.distanceToCamera=function(e){he.throwInstantiationError()};T1.prototype.intersectPlane=function(e){he.throwInstantiationError()};T1.prototype.createDebugVolume=function(e){he.throwInstantiationError()};var oie=T1;var IRo=x(T(),1);function dk(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(dk.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}}});dk.prototype.getTileCredits=function(e,t,n){};dk.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)};dk.prototype.pickFeatures=function(e,t,n,i,o){};var uk=dk;var NRo=x(T(),1);function rie(e){he.throwInstantiationError()}rie.prototype.isReady=he.throwInstantiationError;rie.prototype.shouldDiscardImage=he.throwInstantiationError;var sie=rie;var wRo=x(T(),1),ILe={START:0,LOADING:1,READY:2,UPSAMPLED_ONLY:3};Object.freeze(ILe);var aie=ILe;var QRo=x(T(),1);function wz(e,t){this.show=!0,l(e)||(e=new Qe),this.rectangle=Qe.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}wz.prototype.update=function(e){if(!this.show)return;let t=this._rs;if((!l(t)||!Qe.equals(t.viewport,this.rectangle))&&(this._rs=De.fromCache({blending:tn.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 Be({sources:[this._material.shaderSource,k9]});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)}};wz.prototype.isDestroyed=function(){return!1};wz.prototype.destroy=function(){return l(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),me(this)};var cie=wz;var e1o=x(T(),1);function lie(){he.throwInstantiationError()}Object.defineProperties(lie.prototype,{globalTransform:{get:he.throwInstantiationError},shapeTransform:{get:he.throwInstantiationError},shape:{get:he.throwInstantiationError},minBounds:{get:he.throwInstantiationError},maxBounds:{get:he.throwInstantiationError},dimensions:{get:he.throwInstantiationError},paddingBefore:{get:he.throwInstantiationError},paddingAfter:{get:he.throwInstantiationError},names:{get:he.throwInstantiationError},types:{get:he.throwInstantiationError},componentTypes:{get:he.throwInstantiationError},minimumValues:{get:he.throwInstantiationError},maximumValues:{get:he.throwInstantiationError},maximumTileCount:{get:he.throwInstantiationError},availableLevels:{get:he.throwInstantiationError},keyframeCount:{get:he.throwInstantiationError},timeIntervalCollection:{get:he.throwInstantiationError}});lie.prototype.requestData=function(e){he.throwInstantiationError()};var die=lie;var i1o=x(T(),1);function wg(){he.throwInstantiationError()}Object.defineProperties(wg.prototype,{orientedBoundingBox:{get:he.throwInstantiationError},boundingSphere:{get:he.throwInstantiationError},boundTransform:{get:he.throwInstantiationError},shapeTransform:{get:he.throwInstantiationError},shaderUniforms:{get:he.throwInstantiationError},shaderDefines:{get:he.throwInstantiationError},shaderMaximumIntersectionsLength:{get:he.throwInstantiationError}});wg.prototype.update=he.throwInstantiationError;wg.prototype.updateViewTransforms=he.throwInstantiationError;wg.prototype.convertLocalToShapeUvSpace=he.throwInstantiationError;wg.prototype.computeOrientedBoundingBoxForTile=he.throwInstantiationError;wg.prototype.computeOrientedBoundingBoxForSample=he.throwInstantiationError;wg.DefaultMinBounds=he.throwInstantiationError;wg.DefaultMaxBounds=he.throwInstantiationError;var uie=wg;var x1o=x(T(),1);var hIt=new U,fIt=new U,pIt=new U,bIt=new U,PLe=new se,mk=new Uint8Array(4);function XLe(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 Mz(e,t){return{height:e,color:U.clone(t)}}function NLe(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 gIt(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,Qd._minimumHeight,Qd._maximumHeight),y=U.clone(b.color,hIt);y.red*=y.alpha,y.green*=y.alpha,y.blue*=y.alpha,c.push(Mz(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||a0(c,function(b,f){return W.sign(b.height-f.height)});let h=r.extendDownwards??!1,p=r.extendUpwards??!1;c.length===1&&!h&&!p&&(h=!0,p=!0),h&&c.splice(0,0,Mz(Qd._minimumHeight,c[0].color)),p&&c.splice(c.length,0,Mz(Qd._maximumHeight,c[c.length-1].color)),c=NLe(c),i.push(c)}return i}function yIt(e){let t=gIt(e),n=[],i=[],o;function r(d,u){n.push(Mz(d,u))}function s(d,u,h){let p=U.multiplyByScalar(h,1-u.alpha,bIt);p=U.add(p,u,p),r(d,p)}let a=t.length;for(o=0;o<a;o++){let d=t[o],u=0,h=0;i=n,n=[];let p=d.length,b=i.length;for(;u<p||h<b;){let f=u<p?d[u]:void 0,y=u>0?d[u-1]:void 0,_=u<p-1?d[u+1]:void 0,S=h<b?i[h]:void 0,A=h>0?i[h-1]:void 0,Z=h<b-1?i[h+1]:void 0;if(l(f)&&l(S)&&f.height===S.height){let V=l(Z)&&S.height===Z.height,E=!l(A),L=!l(Z),v=l(_)&&f.height===_.height,I=!l(y),X=!l(_);V?v?(s(f.height,f.color,S.color),s(f.height,_.color,Z.color)):I?(r(f.height,S.color),s(f.height,f.color,Z.color)):X?(s(f.height,f.color,S.color),r(f.height,Z.color)):(s(f.height,f.color,S.color),s(f.height,f.color,Z.color)):E?v?(r(f.height,f.color),s(f.height,_.color,S.color)):X?(r(f.height,f.color),r(f.height,S.color)):(I||r(f.height,f.color),s(f.height,f.color,S.color)):L?v?(s(f.height,f.color,S.color),r(f.height,_.color)):I?(r(f.height,S.color),r(f.height,f.color)):X?s(f.height,f.color,S.color):(s(f.height,f.color,S.color),r(f.height,f.color)):v?(s(f.height,f.color,S.color),s(f.height,_.color,S.color)):I?(r(f.height,S.color),s(f.height,f.color,S.color)):X?(s(f.height,f.color,S.color),r(f.height,S.color)):s(f.height,f.color,S.color),u+=v?2:1,h+=V?2:1}else if(l(f)&&l(S)&&l(A)&&f.height<S.height){let V=XLe(f.height,A,S,pIt);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=XLe(S.height,y,f,fIt);l(A)?l(Z)?s(S.height,V,S.color):(s(S.height,V,S.color),r(S.height,V)):(r(S.height,V),s(S.height,V,S.color)),h++}else l(f)&&(!l(S)||f.height<S.height)?(l(S)&&!l(A)&&!l(_)?(r(f.height,f.color),r(f.height,Qd._emptyColor),r(S.height,Qd._emptyColor)):(!l(S)&&l(A)&&!l(y)&&(r(A.height,Qd._emptyColor),r(f.height,Qd._emptyColor)),r(f.height,f.color)),u++):l(S)&&(!l(f)||S.height<f.height)&&(r(S.height,S.color),h++)}}return NLe(n)}function Qd(e){let{scene:t,layers:n}=e??B.EMPTY_OBJECT,{context:i}=t,o=yIt(n),r=o.length,s,a,c;if(!Qd._useFloatTexture(i)){a=Oe.UNSIGNED_BYTE,c=Ke.RGBA,s=new Uint8Array(r*4);for(let b=0;b<r;b++)se.packFloat(o[b].height,PLe),se.pack(PLe,s,b*4)}else{a=Oe.FLOAT,c=i.webgl2?Ke.RED:Ke.LUMINANCE,s=new Float32Array(r);for(let b=0;b<r;b++)s[b]=o[b].height}let u=Et.create({context:i,pixelFormat:c,pixelDatatype:a,source:{arrayBufferView:s,width:r,height:1},sampler:new Ut({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:kt.NEAREST,magnificationFilter:ni.NEAREST})}),h=new Uint8Array(r*4);for(let b=0;b<r;b++)o[b].color.toBytes(mk),h[b*4+0]=mk[0],h[b*4+1]=mk[1],h[b*4+2]=mk[2],h[b*4+3]=mk[3];let p=Et.create({context:i,pixelFormat:Ke.RGBA,pixelDatatype:Oe.UNSIGNED_BYTE,source:{arrayBufferView:h,width:r,height:1},sampler:new Ut({wrapS:un.CLAMP_TO_EDGE,wrapT:un.CLAMP_TO_EDGE,minificationFilter:kt.LINEAR,magnificationFilter:ni.LINEAR})});return Bi.fromType("ElevationBand",{heights:u,colors:p})}Qd._useFloatTexture=function(e){return e.floatingPointTexture};Qd._maximumHeight=5906376425472;Qd._minimumHeight=-5906376425472;Qd._emptyColor=new U(0,0,0,0);var mie=Qd;var E1o=x(T(),1);async function xIt(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||Tt("google-tiles-with-google-geocoder","Only the Google geocoder can be used with Google Photorealistic 3D Tiles. Set the `geocode` property of Viewer constructor options. You can set additionalOptions.onlyUsingWithGoogleGeocoder to hide this warning once you have configured the geocoder.");let n=e.key??ua.defaultApiKey;if(!l(n))return TIt(t);let i,o=ua.getDefaultCredit();l(o)&&(i=[o]);let r=new We({url:`${ua.mapTilesApiEndpoint}v1/3dtiles/root.json`,queryParameters:{key:n},credits:i});return Js.fromUrl(r,t)}var YLe={};async function TIt(e){let i=YLe[2275207];l(i)||(i=ss.fromAssetId(2275207),YLe[2275207]=i);let o=await i;return Js.fromUrl(o,e)}var hie=xIt;var P1o=x(T(),1);async function _It(e){let t=await Js.fromIonAssetId(96188,e);e=e??B.EMPTY_OBJECT;let n=e.style;if(!l(n)){let i=(e.defaultColor??U.WHITE).toCssColorString();n=new Xb({color:`Boolean(\${feature['cesium#color']}) ? color(\${feature['cesium#color']}) : ${i}`})}return t.style=n,t}var fie=_It;var B1o=x(T(),1);function SIt(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 Wt({geometry:Un.createLineSegmentsForVectors(n,"normal",r),attributes:{color:new Ht(1,0,0,1)},modelMatrix:o})),l(i.tangent)&&t.push(new Wt({geometry:Un.createLineSegmentsForVectors(n,"tangent",r),attributes:{color:new Ht(0,1,0,1)},modelMatrix:o})),l(i.bitangent)&&t.push(new Wt({geometry:Un.createLineSegmentsForVectors(n,"bitangent",r),attributes:{color:new Ht(0,0,1,1)},modelMatrix:o})),t.length>0)return new Ln({asynchronous:!1,geometryInstances:t,appearance:new hn({flat:!0,translucent:!1})})}var pie=SIt;var H1o=x(T(),1),bie=`uniform sampler2D u_depthTexture;
in vec2 v_textureCoordinates;
void main()
{
float z_window = czm_unpackDepth(texture(u_depthTexture, v_textureCoordinates));
z_window = czm_reverseLogDepth(z_window);
float n_range = czm_depthRange.near;
float f_range = czm_depthRange.far;
float z_ndc = (2.0 * z_window - n_range - f_range) / (f_range - n_range);
float scale = pow(z_ndc * 0.5 + 0.5, 8.0);
out_FragColor = vec4(mix(vec3(0.0), vec3(1.0), scale), 1.0);
}
`;var tEo=x(T(),1);function AIt(e){e=e??B.EMPTY_OBJECT,this.typedArray=e.typedArray,this.width=e.width,this.height=e.height,this.pixelFormat=e.pixelFormat??Ke.RGBA,this.pixelDatatype=e.pixelDatatype??Oe.UNSIGNED_BYTE;let t=e.url;typeof t=="string"&&(t=We.createIfNeeded(t)),this.resource=t;let i=e.repeat??!0?un.REPEAT:un.CLAMP_TO_EDGE;this.sampler=new Ut({wrapS:i,wrapT:i,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter,maximumAnisotropy:e.maximumAnisotropy})}var gie=AIt;var iEo=x(T(),1),wLe={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",MAT2:"mat2",MAT3:"mat3",MAT4:"mat4"};Object.freeze(wLe);var yie=wLe;var rEo=x(T(),1),MLe={SIGX:"SIGX",SIGY:"SIGY",SIGZ:"SIGZ",VARX:"VARX",VARY:"VARY",VARZ:"VARZ",SIGR:"VARZ"};Object.freeze(MLe);var xie=MLe;var cEo=x(T(),1);function ZIt(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: ${Cp(s)}
with responseMessage: ${JSON.stringify(r)}`,postMessage(r)}}function n(i){postMessage({id:i.data?.id,error:`postMessage failed with error: ${JSON.stringify(i)}`})}return self.onmessage=t,self.onmessageerror=n,self}var Tie=ZIt;globalThis.CESIUM_VERSION="1.141.0";var f8o=x(T(),1);var BHo=x(T(),1);var kHo=x(T(),1);var vHo=x(T(),1),hk;typeof ko<"u"&&(hk=ko);(function(){/*!
* Knockout JavaScript library v3.5.1
* (c) The Knockout.js team - http://knockoutjs.com/
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
*/(function(){(function(e){var t=this||(0,eval)("this"),n=t.document,i=t.navigator,o=t.jQuery,r=t.JSON;o||typeof jQuery>"u"||(o=jQuery),(function(s){s(t.ko={})})(function(s,a){function c(g,C){return g===null||typeof g in y?g===C:!1}function d(g,C){var R;return function(){R||(R=f.a.setTimeout(function(){R=e,g()},C))}}function u(g,C){var R;return function(){clearTimeout(R),R=f.a.setTimeout(g,C)}}function h(g,C){C&&C!=="change"?C==="beforeChange"?this.pc(g):this.gb(g,C):this.qc(g)}function p(g,C){C!==null&&C.s&&C.s()}function b(g,C){var R=this.qd,G=R[V];G.ra||(this.Qb&&this.mb[C]?(R.uc(C,g,this.mb[C]),this.mb[C]=null,--this.Qb):G.I[C]||R.uc(C,g,G.J?{da:g}:R.$c(g)),g.Ja&&g.gd())}var f=typeof s<"u"?s:{};f.b=function(g,C){for(var R=g.split("."),G=f,P=0;P<R.length-1;P++)G=G[R[P]];G[R[R.length-1]]=C},f.L=function(g,C,R){g[C]=R},f.version="3.5.1",f.b("version",f.version),f.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},f.a=(function(){function g(H,te){for(var $ in H)P.call(H,$)&&te($,H[$])}function C(H,te){if(te)for(var $ in te)P.call(te,$)&&(H[$]=te[$]);return H}function R(H,te){return H.__proto__=te,H}function G(H,te,$,be){var ye=H[te].match(J)||[];f.a.D($.match(J),function(ce){f.a.Na(ye,ce,be)}),H[te]=ye.join(" ")}var P=Object.prototype.hasOwnProperty,Y={__proto__:[]}instanceof Array,O=typeof Symbol=="function",k={},D={};k[i&&/Firefox\/2/i.test(i.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],k.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),g(k,function(H,te){if(te.length)for(var $=0,be=te.length;$<be;$++)D[te[$]]=H});var w={propertychange:!0},z=n&&(function(){for(var H=3,te=n.createElement("div"),$=te.getElementsByTagName("i");te.innerHTML="<!--[if gt IE "+ ++H+"]><i></i><![endif]-->",$[0];);return 4<H?H:e})(),J=/\S+/g,ee;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(H,te,$){for(var be=0,ye=H.length;be<ye;be++)te.call($,H[be],be,H)},A:typeof Array.prototype.indexOf=="function"?function(H,te){return Array.prototype.indexOf.call(H,te)}:function(H,te){for(var $=0,be=H.length;$<be;$++)if(H[$]===te)return $;return-1},Lb:function(H,te,$){for(var be=0,ye=H.length;be<ye;be++)if(te.call($,H[be],be,H))return H[be];return e},Pa:function(H,te){var $=f.a.A(H,te);0<$?H.splice($,1):$===0&&H.shift()},wc:function(H){var te=[];return H&&f.a.D(H,function($){0>f.a.A(te,$)&&te.push($)}),te},Mb:function(H,te,$){var be=[];if(H)for(var ye=0,ce=H.length;ye<ce;ye++)be.push(te.call($,H[ye],ye));return be},jb:function(H,te,$){var be=[];if(H)for(var ye=0,ce=H.length;ye<ce;ye++)te.call($,H[ye],ye)&&be.push(H[ye]);return be},Nb:function(H,te){if(te instanceof Array)H.push.apply(H,te);else for(var $=0,be=te.length;$<be;$++)H.push(te[$]);return H},Na:function(H,te,$){var be=f.a.A(f.a.bc(H),te);0>be?$&&H.push(te):$||H.splice(be,1)},Ba:Y,extend:C,setPrototypeOf:R,Ab:Y?R:C,P:g,Ga:function(H,te,$){if(!H)return H;var be={},ye;for(ye in H)P.call(H,ye)&&(be[ye]=te.call($,H[ye],ye,H));return be},Tb:function(H){for(;H.firstChild;)f.removeNode(H.firstChild)},Yb:function(H){H=f.a.la(H);for(var te=(H[0]&&H[0].ownerDocument||n).createElement("div"),$=0,be=H.length;$<be;$++)te.appendChild(f.oa(H[$]));return te},Ca:function(H,te){for(var $=0,be=H.length,ye=[];$<be;$++){var ce=H[$].cloneNode(!0);ye.push(te?f.oa(ce):ce)}return ye},va:function(H,te){if(f.a.Tb(H),te)for(var $=0,be=te.length;$<be;$++)H.appendChild(te[$])},Xc:function(H,te){var $=H.nodeType?[H]:H;if(0<$.length){for(var be=$[0],ye=be.parentNode,ce=0,Ze=te.length;ce<Ze;ce++)ye.insertBefore(te[ce],be);for(ce=0,Ze=$.length;ce<Ze;ce++)f.removeNode($[ce])}},Ua:function(H,te){if(H.length){for(te=te.nodeType===8&&te.parentNode||te;H.length&&H[0].parentNode!==te;)H.splice(0,1);for(;1<H.length&&H[H.length-1].parentNode!==te;)H.length--;if(1<H.length){var $=H[0],be=H[H.length-1];for(H.length=0;$!==be;)H.push($),$=$.nextSibling;H.push(be)}}return H},Zc:function(H,te){7>z?H.setAttribute("selected",te):H.selected=te},Db:function(H){return H===null||H===e?"":H.trim?H.trim():H.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(H,te){return H=H||"",te.length>H.length?!1:H.substring(0,te.length)===te},vd:function(H,te){if(H===te)return!0;if(H.nodeType===11)return!1;if(te.contains)return te.contains(H.nodeType!==1?H.parentNode:H);if(te.compareDocumentPosition)return(te.compareDocumentPosition(H)&16)==16;for(;H&&H!=te;)H=H.parentNode;return!!H},Sb:function(H){return f.a.vd(H,H.ownerDocument.documentElement)},kd:function(H){return!!f.a.Lb(H,f.a.Sb)},R:function(H){return H&&H.tagName&&H.tagName.toLowerCase()},Ac:function(H){return f.onError?function(){try{return H.apply(this,arguments)}catch(te){throw f.onError&&f.onError(te),te}}:H},setTimeout:function(H,te){return setTimeout(f.a.Ac(H),te)},Gc:function(H){setTimeout(function(){throw f.onError&&f.onError(H),H},0)},B:function(H,te,$){var be=f.a.Ac($);if($=w[te],f.options.useOnlyNativeEvents||$||!o)if($||typeof H.addEventListener!="function")if(typeof H.attachEvent<"u"){var ye=function(Ze){be.call(H,Ze)},ce="on"+te;H.attachEvent(ce,ye),f.a.K.za(H,function(){H.detachEvent(ce,ye)})}else throw Error("Browser doesn't support addEventListener or attachEvent");else H.addEventListener(te,be,!1);else ee||(ee=typeof o(H).on=="function"?"on":"bind"),o(H)[ee](te,be)},Fb:function(H,te){if(!H||!H.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var $;if(f.a.R(H)==="input"&&H.type&&te.toLowerCase()=="click"?($=H.type,$=$=="checkbox"||$=="radio"):$=!1,f.options.useOnlyNativeEvents||!o||$)if(typeof n.createEvent=="function")if(typeof H.dispatchEvent=="function")$=n.createEvent(D[te]||"HTMLEvents"),$.initEvent(te,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,H),H.dispatchEvent($);else throw Error("The supplied element doesn't support dispatchEvent");else if($&&H.click)H.click();else if(typeof H.fireEvent<"u")H.fireEvent("on"+te);else throw Error("Browser doesn't support triggering events");else o(H).trigger(te)},f:function(H){return f.O(H)?H():H},bc:function(H){return f.O(H)?H.v():H},Eb:function(H,te,$){var be;te&&(typeof H.classList=="object"?(be=H.classList[$?"add":"remove"],f.a.D(te.match(J),function(ye){be.call(H.classList,ye)})):typeof H.className.baseVal=="string"?G(H.className,"baseVal",te,$):G(H,"className",te,$))},Bb:function(H,te){var $=f.a.f(te);($===null||$===e)&&($="");var be=f.h.firstChild(H);!be||be.nodeType!=3||f.h.nextSibling(be)?f.h.va(H,[H.ownerDocument.createTextNode($)]):be.data=$,f.a.Ad(H)},Yc:function(H,te){if(H.name=te,7>=z)try{var $=H.name.replace(/[&<>'"]/g,function(be){return"&#"+be.charCodeAt(0)+";"});H.mergeAttributes(n.createElement("<input name='"+$+"'/>"),!1)}catch{}},Ad:function(H){9<=z&&(H=H.nodeType==1?H:H.parentNode,H.style&&(H.style.zoom=H.style.zoom))},wd:function(H){if(z){var te=H.style.width;H.style.width=0,H.style.width=te}},Pd:function(H,te){H=f.a.f(H),te=f.a.f(te);for(var $=[],be=H;be<=te;be++)$.push(be);return $},la:function(H){for(var te=[],$=0,be=H.length;$<be;$++)te.push(H[$]);return te},Da:function(H){return O?Symbol(H):H},Zd:z===6,$d:z===7,W:z,Lc:function(H,te){for(var $=f.a.la(H.getElementsByTagName("input")).concat(f.a.la(H.getElementsByTagName("textarea"))),be=typeof te=="string"?function(Ze){return Ze.name===te}:function(Ze){return te.test(Ze.name)},ye=[],ce=$.length-1;0<=ce;ce--)be($[ce])&&ye.push($[ce]);return ye},Nd:function(H){return typeof H=="string"&&(H=f.a.Db(H))?r&&r.parse?r.parse(H):new Function("return "+H)():null},hc:function(H,te,$){if(!r||!r.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return r.stringify(f.a.f(H),te,$)},Od:function(H,te,$){$=$||{};var be=$.params||{},ye=$.includeFields||this.Jc,ce=H;if(typeof H=="object"&&f.a.R(H)==="form")for(var ce=H.action,Ze=ye.length-1;0<=Ze;Ze--)for(var xe=f.a.Lc(H,ye[Ze]),Ge=xe.length-1;0<=Ge;Ge--)be[xe[Ge].name]=xe[Ge].value;te=f.a.f(te);var Ve=n.createElement("form");Ve.style.display="none",Ve.action=ce,Ve.method="post";for(var Ye in te)H=n.createElement("input"),H.type="hidden",H.name=Ye,H.value=f.a.hc(f.a.f(te[Ye])),Ve.appendChild(H);g(be,function(ke,it){var pt=n.createElement("input");pt.type="hidden",pt.name=ke,pt.value=it,Ve.appendChild(pt)}),n.body.appendChild(Ve),$.submitter?$.submitter(Ve):Ve.submit(),setTimeout(function(){Ve.parentNode.removeChild(Ve)},0)}}})(),f.b("utils",f.a),f.b("utils.arrayForEach",f.a.D),f.b("utils.arrayFirst",f.a.Lb),f.b("utils.arrayFilter",f.a.jb),f.b("utils.arrayGetDistinctValues",f.a.wc),f.b("utils.arrayIndexOf",f.a.A),f.b("utils.arrayMap",f.a.Mb),f.b("utils.arrayPushAll",f.a.Nb),f.b("utils.arrayRemoveItem",f.a.Pa),f.b("utils.cloneNodes",f.a.Ca),f.b("utils.createSymbolOrString",f.a.Da),f.b("utils.extend",f.a.extend),f.b("utils.fieldsIncludedWithJsonPost",f.a.Jc),f.b("utils.getFormFields",f.a.Lc),f.b("utils.objectMap",f.a.Ga),f.b("utils.peekObservable",f.a.bc),f.b("utils.postJson",f.a.Od),f.b("utils.parseJson",f.a.Nd),f.b("utils.registerEventHandler",f.a.B),f.b("utils.stringifyJson",f.a.hc),f.b("utils.range",f.a.Pd),f.b("utils.toggleDomNodeCssClass",f.a.Eb),f.b("utils.triggerEvent",f.a.Fb),f.b("utils.unwrapObservable",f.a.f),f.b("utils.objectForEach",f.a.P),f.b("utils.addOrRemoveItem",f.a.Na),f.b("utils.setTextContent",f.a.Bb),f.b("unwrap",f.a.f),Function.prototype.bind||(Function.prototype.bind=function(g){var C=this;if(arguments.length===1)return function(){return C.apply(g,arguments)};var R=Array.prototype.slice.call(arguments,1);return function(){var G=R.slice(0);return G.push.apply(G,arguments),C.apply(g,G)}}),f.a.g=new function(){var g=0,C="__ko__"+new Date().getTime(),R={},G,P;return f.a.W?(G=function(Y,O){var k=Y[C];if(!k||k==="null"||!R[k]){if(!O)return e;k=Y[C]="ko"+g++,R[k]={}}return R[k]},P=function(Y){var O=Y[C];return O?(delete R[O],Y[C]=null,!0):!1}):(G=function(Y,O){var k=Y[C];return!k&&O&&(k=Y[C]={}),k},P=function(Y){return Y[C]?(delete Y[C],!0):!1}),{get:function(Y,O){var k=G(Y,!1);return k&&k[O]},set:function(Y,O,k){(Y=G(Y,k!==e))&&(Y[O]=k)},Ub:function(Y,O,k){return Y=G(Y,!0),Y[O]||(Y[O]=k)},clear:P,Z:function(){return g+++C}}},f.b("utils.domData",f.a.g),f.b("utils.domData.clear",f.a.g.clear),f.a.K=new function(){function g(O,k){var D=f.a.g.get(O,G);return D===e&&k&&(D=[],f.a.g.set(O,G,D)),D}function C(O){var k=g(O,!1);if(k)for(var k=k.slice(0),D=0;D<k.length;D++)k[D](O);f.a.g.clear(O),f.a.K.cleanExternalData(O),Y[O.nodeType]&&R(O.childNodes,!0)}function R(O,k){for(var D=[],w,z=0;z<O.length;z++)if((!k||O[z].nodeType===8)&&(C(D[D.length]=w=O[z]),O[z]!==w))for(;z--&&f.a.A(D,O[z])==-1;);}var G=f.a.g.Z(),P={1:!0,8:!0,9:!0},Y={1:!0,9:!0};return{za:function(O,k){if(typeof k!="function")throw Error("Callback must be a function");g(O,!0).push(k)},yb:function(O,k){var D=g(O,!1);D&&(f.a.Pa(D,k),D.length==0&&f.a.g.set(O,G,e))},oa:function(O){return f.u.G(function(){P[O.nodeType]&&(C(O),Y[O.nodeType]&&R(O.getElementsByTagName("*")))}),O},removeNode:function(O){f.oa(O),O.parentNode&&O.parentNode.removeChild(O)},cleanExternalData:function(O){o&&typeof o.cleanData=="function"&&o.cleanData([O])}}},f.oa=f.a.K.oa,f.removeNode=f.a.K.removeNode,f.b("cleanNode",f.oa),f.b("removeNode",f.removeNode),f.b("utils.domNodeDisposal",f.a.K),f.b("utils.domNodeDisposal.addDisposeCallback",f.a.K.za),f.b("utils.domNodeDisposal.removeDisposeCallback",f.a.K.yb),(function(){var g=[0,"",""],C=[1,"<table>","</table>"],R=[3,"<table><tbody><tr>","</tr></tbody></table>"],G=[1,"<select multiple='multiple'>","</select>"],P={thead:C,tbody:C,tfoot:C,tr:[2,"<table><tbody>","</tbody></table>"],td:R,th:R,option:G,optgroup:G},Y=8>=f.a.W;f.a.ua=function(O,k){var D;if(o){if(o.parseHTML)D=o.parseHTML(O,k)||[];else if((D=o.clean([O],k))&&D[0]){for(var w=D[0];w.parentNode&&w.parentNode.nodeType!==11;)w=w.parentNode;w.parentNode&&w.parentNode.removeChild(w)}}else{(D=k)||(D=n);var w=D.parentWindow||D.defaultView||t,z=f.a.Db(O).toLowerCase(),J=D.createElement("div"),ee;for(ee=(z=z.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&P[z[1]]||g,z=ee[0],ee="ignored<div>"+ee[1]+O+ee[2]+"</div>",typeof w.innerShiv=="function"?J.appendChild(w.innerShiv(ee)):(Y&&D.body.appendChild(J),J.innerHTML=ee,Y&&J.parentNode.removeChild(J));z--;)J=J.lastChild;D=f.a.la(J.lastChild.childNodes)}return D},f.a.Md=function(O,k){var D=f.a.ua(O,k);return D.length&&D[0].parentElement||f.a.Yb(D)},f.a.fc=function(O,k){if(f.a.Tb(O),k=f.a.f(k),k!==null&&k!==e)if(typeof k!="string"&&(k=k.toString()),o)o(O).html(k);else for(var D=f.a.ua(k,O.ownerDocument),w=0;w<D.length;w++)O.appendChild(D[w])}})(),f.b("utils.parseHtmlFragment",f.a.ua),f.b("utils.setHtml",f.a.fc),f.aa=(function(){function g(R,G){if(R){if(R.nodeType==8){var P=f.aa.Uc(R.nodeValue);P!=null&&G.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],G)}}var C={};return{Xb:function(R){if(typeof R!="function")throw Error("You can only pass a function to ko.memoization.memoize()");var G=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return C[G]=R,"<!--[ko_memo:"+G+"]-->"},bd:function(R,G){var P=C[R];if(P===e)throw Error("Couldn't find any memo with ID "+R+". Perhaps it's already been unmemoized.");try{return P.apply(null,G||[]),!0}finally{delete C[R]}},cd:function(R,G){var P=[];g(R,P);for(var Y=0,O=P.length;Y<O;Y++){var k=P[Y].ud,D=[k];G&&f.a.Nb(D,G),f.aa.bd(P[Y].Kd,D),k.nodeValue="",k.parentNode&&k.parentNode.removeChild(k)}},Uc:function(R){return(R=R.match(/^\[ko_memo\:(.*?)\]$/))?R[1]:null}}})(),f.b("memoization",f.aa),f.b("memoization.memoize",f.aa.Xb),f.b("memoization.unmemoize",f.aa.bd),f.b("memoization.parseMemoText",f.aa.Uc),f.b("memoization.unmemoizeDomNodeAndDescendants",f.aa.cd),f.na=(function(){function g(){if(P){for(var k=P,D=0,w;O<P;)if(w=G[O++]){if(O>k){if(5e3<=++D){O=P,f.a.Gc(Error("'Too much recursion' after processing "+D+" task groups."));break}k=P}try{w()}catch(z){f.a.Gc(z)}}}}function C(){g(),O=P=G.length=0}var R,G=[],P=0,Y=1,O=0;return t.MutationObserver?R=(function(k){var D=n.createElement("div");return new MutationObserver(k).observe(D,{attributes:!0}),function(){D.classList.toggle("foo")}})(C):R=n&&"onreadystatechange"in n.createElement("script")?function(k){var D=n.createElement("script");D.onreadystatechange=function(){D.onreadystatechange=null,n.documentElement.removeChild(D),D=null,k()},n.documentElement.appendChild(D)}:function(k){setTimeout(k,0)},{scheduler:R,zb:function(k){return P||f.na.scheduler(C),G[P++]=k,Y++},cancel:function(k){k=k-(Y-P),k>=O&&k<P&&(G[k]=null)},resetForTesting:function(){var k=P-O;return O=P=G.length=0,k},Sd:g}})(),f.b("tasks",f.na),f.b("tasks.schedule",f.na.zb),f.b("tasks.runEarly",f.na.Sd),f.Ta={throttle:function(g,C){g.throttleEvaluation=C;var R=null;return f.$({read:g,write:function(G){clearTimeout(R),R=f.a.setTimeout(function(){g(G)},C)}})},rateLimit:function(g,C){var R,G,P;typeof C=="number"?R=C:(R=C.timeout,G=C.method),g.Hb=!1,P=typeof G=="function"?G:G=="notifyWhenChangesStop"?u:d,g.ub(function(Y){return P(Y,R,C)})},deferred:function(g,C){if(C!==!0)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");g.Hb||(g.Hb=!0,g.ub(function(R){var G,P=!1;return function(){if(!P){f.na.cancel(G),G=f.na.zb(R);try{P=!0,g.notifySubscribers(e,"dirty")}finally{P=!1}}}}))},notify:function(g,C){g.equalityComparer=C=="always"?null:c}};var y={undefined:1,boolean:1,number:1,string:1};f.b("extenders",f.Ta),f.ic=function(g,C,R){this.da=g,this.lc=C,this.mc=R,this.Ib=!1,this.fb=this.Jb=null,f.L(this,"dispose",this.s),f.L(this,"disposeWhenNodeIsRemoved",this.l)},f.ic.prototype.s=function(){this.Ib||(this.fb&&f.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},f.ic.prototype.l=function(g){this.Jb=g,f.a.K.za(g,this.fb=this.s.bind(this))},f.T=function(){f.a.Ab(this,_),_.qb(this)};var _={qb:function(g){g.U={change:[]},g.sc=1},subscribe:function(g,C,R){var G=this;R=R||"change";var P=new f.ic(G,C?g.bind(C):g,function(){f.a.Pa(G.U[R],P),G.hb&&G.hb(R)});return G.Qa&&G.Qa(R),G.U[R]||(G.U[R]=[]),G.U[R].push(P),P},notifySubscribers:function(g,C){if(C=C||"change",C==="change"&&this.Gb(),this.Wa(C)){var R=C==="change"&&this.ed||this.U[C].slice(0);try{f.u.xc();for(var G=0,P;P=R[G];++G)P.Ib||P.lc(g)}finally{f.u.end()}}},ob:function(){return this.sc},Dd:function(g){return this.ob()!==g},Gb:function(){++this.sc},ub:function(g){var C=this,R=f.O(C),G,P,Y,O,k;C.gb||(C.gb=C.notifySubscribers,C.notifySubscribers=h);var D=g(function(){C.Ja=!1,R&&O===C&&(O=C.nc?C.nc():C());var w=P||k&&C.sb(Y,O);k=P=G=!1,w&&C.gb(Y=O)});C.qc=function(w,z){z&&C.Ja||(k=!z),C.ed=C.U.change.slice(0),C.Ja=G=!0,O=w,D()},C.pc=function(w){G||(Y=w,C.gb(w,"beforeChange"))},C.rc=function(){k=!0},C.gd=function(){C.sb(Y,C.v(!0))&&(P=!0)}},Wa:function(g){return this.U[g]&&this.U[g].length},Bd:function(g){if(g)return this.U[g]&&this.U[g].length||0;var C=0;return f.a.P(this.U,function(R,G){R!=="dirty"&&(C+=G.length)}),C},sb:function(g,C){return!this.equalityComparer||!this.equalityComparer(g,C)},toString:function(){return"[object Object]"},extend:function(g){var C=this;return g&&f.a.P(g,function(R,G){var P=f.Ta[R];typeof P=="function"&&(C=P(C,G)||C)}),C}};f.L(_,"init",_.qb),f.L(_,"subscribe",_.subscribe),f.L(_,"extend",_.extend),f.L(_,"getSubscriptionsCount",_.Bd),f.a.Ba&&f.a.setPrototypeOf(_,Function.prototype),f.T.fn=_,f.Qc=function(g){return g!=null&&typeof g.subscribe=="function"&&typeof g.notifySubscribers=="function"},f.b("subscribable",f.T),f.b("isSubscribable",f.Qc),f.S=f.u=(function(){function g(Y){R.push(G),G=Y}function C(){G=R.pop()}var R=[],G,P=0;return{xc:g,end:C,cc:function(Y){if(G){if(!f.Qc(Y))throw Error("Only subscribable things can act as dependencies");G.od.call(G.pd,Y,Y.fd||(Y.fd=++P))}},G:function(Y,O,k){try{return g(),Y.apply(O,k||[])}finally{C()}},qa:function(){if(G)return G.o.qa()},Va:function(){if(G)return G.o.Va()},Ya:function(){if(G)return G.Ya},o:function(){if(G)return G.o}}})(),f.b("computedContext",f.S),f.b("computedContext.getDependenciesCount",f.S.qa),f.b("computedContext.getDependencies",f.S.Va),f.b("computedContext.isInitial",f.S.Ya),f.b("computedContext.registerDependency",f.S.cc),f.b("ignoreDependencies",f.Yd=f.u.G);var S=f.a.Da("_latestValue");f.ta=function(g){function C(){return 0<arguments.length?(C.sb(C[S],arguments[0])&&(C.ya(),C[S]=arguments[0],C.xa()),this):(f.u.cc(C),C[S])}return C[S]=g,f.a.Ba||f.a.extend(C,f.T.fn),f.T.fn.qb(C),f.a.Ab(C,A),f.options.deferUpdates&&f.Ta.deferred(C,!0),C};var A={equalityComparer:c,v:function(){return this[S]},xa:function(){this.notifySubscribers(this[S],"spectate"),this.notifySubscribers(this[S])},ya:function(){this.notifySubscribers(this[S],"beforeChange")}};f.a.Ba&&f.a.setPrototypeOf(A,f.T.fn);var Z=f.ta.Ma="__ko_proto__";A[Z]=f.ta,f.O=function(g){if((g=typeof g=="function"&&g[Z])&&g!==A[Z]&&g!==f.o.fn[Z])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!g},f.Za=function(g){return typeof g=="function"&&(g[Z]===A[Z]||g[Z]===f.o.fn[Z]&&g.Nc)},f.b("observable",f.ta),f.b("isObservable",f.O),f.b("isWriteableObservable",f.Za),f.b("isWritableObservable",f.Za),f.b("observable.fn",A),f.L(A,"peek",A.v),f.L(A,"valueHasMutated",A.xa),f.L(A,"valueWillMutate",A.ya),f.Ha=function(g){if(g=g||[],typeof g!="object"||!("length"in g))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return g=f.ta(g),f.a.Ab(g,f.Ha.fn),g.extend({trackArrayChanges:!0})},f.Ha.fn={remove:function(g){for(var C=this.v(),R=[],G=typeof g!="function"||f.O(g)?function(O){return O===g}:g,P=0;P<C.length;P++){var Y=C[P];if(G(Y)){if(R.length===0&&this.ya(),C[P]!==Y)throw Error("Array modified during remove; cannot remove item");R.push(Y),C.splice(P,1),P--}}return R.length&&this.xa(),R},removeAll:function(g){if(g===e){var C=this.v(),R=C.slice(0);return this.ya(),C.splice(0,C.length),this.xa(),R}return g?this.remove(function(G){return 0<=f.a.A(g,G)}):[]},destroy:function(g){var C=this.v(),R=typeof g!="function"||f.O(g)?function(Y){return Y===g}:g;this.ya();for(var G=C.length-1;0<=G;G--){var P=C[G];R(P)&&(P._destroy=!0)}this.xa()},destroyAll:function(g){return g===e?this.destroy(function(){return!0}):g?this.destroy(function(C){return 0<=f.a.A(g,C)}):[]},indexOf:function(g){var C=this();return f.a.A(C,g)},replace:function(g,C){var R=this.indexOf(g);0<=R&&(this.ya(),this.v()[R]=C,this.xa())},sorted:function(g){var C=this().slice(0);return g?C.sort(g):C.sort()},reversed:function(){return this().slice(0).reverse()}},f.a.Ba&&f.a.setPrototypeOf(f.Ha.fn,f.ta.fn),f.a.D("pop push reverse shift sort splice unshift".split(" "),function(g){f.Ha.fn[g]=function(){var C=this.v();this.ya(),this.zc(C,g,arguments);var R=C[g].apply(C,arguments);return this.xa(),R===C?this:R}}),f.a.D(["slice"],function(g){f.Ha.fn[g]=function(){var C=this();return C[g].apply(C,arguments)}}),f.Pc=function(g){return f.O(g)&&typeof g.remove=="function"&&typeof g.push=="function"},f.b("observableArray",f.Ha),f.b("isObservableArray",f.Pc),f.Ta.trackArrayChanges=function(g,C){function R(){function J(){if(k){var ee=[].concat(g.v()||[]),H;g.Wa("arrayChange")&&((!P||1<k)&&(P=f.a.Pb(D,ee,g.Ob)),H=P),D=ee,P=null,k=0,H&&H.length&&g.notifySubscribers(H,"arrayChange")}}G?J():(G=!0,O=g.subscribe(function(){++k},null,"spectate"),D=[].concat(g.v()||[]),P=null,Y=g.subscribe(J))}if(g.Ob={},C&&typeof C=="object"&&f.a.extend(g.Ob,C),g.Ob.sparse=!0,!g.zc){var G=!1,P=null,Y,O,k=0,D,w=g.Qa,z=g.hb;g.Qa=function(J){w&&w.call(g,J),J==="arrayChange"&&R()},g.hb=function(J){z&&z.call(g,J),J!=="arrayChange"||g.Wa("arrayChange")||(Y&&Y.s(),O&&O.s(),O=Y=null,G=!1,D=e)},g.zc=function(J,ee,H){function te(Ve,Ye,ke){return $[$.length]={status:Ve,value:Ye,index:ke}}if(G&&!k){var $=[],be=J.length,ye=H.length,ce=0;switch(ee){case"push":ce=be;case"unshift":for(ee=0;ee<ye;ee++)te("added",H[ee],ce+ee);break;case"pop":ce=be-1;case"shift":be&&te("deleted",J[ce],ce);break;case"splice":ee=Math.min(Math.max(0,0>H[0]?be+H[0]:H[0]),be);for(var be=ye===1?be:Math.min(ee+(H[1]||0),be),ye=ee+ye-2,ce=Math.max(be,ye),Ze=[],xe=[],Ge=2;ee<ce;++ee,++Ge)ee<be&&xe.push(te("deleted",J[ee],ee)),ee<ye&&Ze.push(te("added",H[Ge],ee));f.a.Kc(xe,Ze);break;default:return}P=$}}}};var V=f.a.Da("_state");f.o=f.$=function(g,C,R){function G(){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(G),(Y.ka||Y.J&&G.Xa())&&G.ha(),Y.X}if(typeof g=="object"?R=g:(R=R||{},g&&(R.read=g)),typeof R.read!="function")throw Error("Pass a function that returns the value of the ko.computed");var P=R.write,Y={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:R.read,nb:C||R.owner,l:R.disposeWhenNodeIsRemoved||R.l||null,Sa:R.disposeWhen||R.Sa,Rb:null,I:{},V:0,Ic:null};return G[V]=Y,G.Nc=typeof P=="function",f.a.Ba||f.a.extend(G,f.T.fn),f.T.fn.qb(G),f.a.Ab(G,E),R.pure?(Y.wb=!0,Y.J=!0,f.a.extend(G,L)):R.deferEvaluation&&f.a.extend(G,v),f.options.deferUpdates&&f.Ta.deferred(G,!0),Y.l&&(Y.jc=!0,Y.l.nodeType||(Y.l=null)),Y.J||R.deferEvaluation||G.ha(),Y.l&&G.ja()&&f.a.K.za(Y.l,Y.Rb=function(){G.s()}),G};var E={equalityComparer:c,qa:function(){return this[V].V},Va:function(){var g=[];return f.a.P(this[V].I,function(C,R){g[R.Ka]=R.da}),g},Vb:function(g){if(!this[V].V)return!1;var C=this.Va();return f.a.A(C,g)!==-1?!0:!!f.a.Lb(C,function(R){return R.Vb&&R.Vb(g)})},uc:function(g,C,R){if(this[V].wb&&C===this)throw Error("A 'pure' computed must not be called recursively");this[V].I[g]=R,R.Ka=this[V].V++,R.La=C.ob()},Xa:function(){var g,C,R=this[V].I;for(g in R)if(Object.prototype.hasOwnProperty.call(R,g)&&(C=R[g],this.Ia&&C.da.Ja||C.da.Dd(C.La)))return!0},Jd:function(){this.Ia&&!this[V].rb&&this.Ia(!1)},ja:function(){var g=this[V];return g.ka||0<g.V},Rd:function(){this.Ja?this[V].ka&&(this[V].sa=!0):this.Hc()},$c:function(g){if(g.Hb){var C=g.subscribe(this.Jd,this,"dirty"),R=g.subscribe(this.Rd,this);return{da:g,s:function(){C.s(),R.s()}}}return g.subscribe(this.Hc,this)},Hc:function(){var g=this,C=g.throttleEvaluation;C&&0<=C?(clearTimeout(this[V].Ic),this[V].Ic=f.a.setTimeout(function(){g.ha(!0)},C)):g.Ia?g.Ia(!0):g.ha(!0)},ha:function(g){var C=this[V],R=C.Sa,G=!1;if(!C.rb&&!C.ra){if(C.l&&!f.a.Sb(C.l)||R&&R()){if(!C.jc){this.s();return}}else C.jc=!1;C.rb=!0;try{G=this.zd(g)}finally{C.rb=!1}return G}},zd:function(g){var C=this[V],G=!1,R=C.wb?e:!C.V,G={qd:this,mb:C.I,Qb:C.V};f.u.xc({pd:G,od:b,o:this,Ya:R}),C.I={},C.V=0;var P=this.yd(C,G);return C.V?G=this.sb(C.X,P):(this.s(),G=!0),G&&(C.J?this.Gb():this.notifySubscribers(C.X,"beforeChange"),C.X=P,this.notifySubscribers(C.X,"spectate"),!C.J&&g&&this.notifySubscribers(C.X),this.rc&&this.rc()),R&&this.notifySubscribers(C.X,"awake"),G},yd:function(g,C){try{var R=g.Wc;return g.nb?R.call(g.nb):R()}finally{f.u.end(),C.Qb&&!g.J&&f.a.P(C.mb,p),g.sa=g.ka=!1}},v:function(g){var C=this[V];return(C.ka&&(g||!C.V)||C.J&&this.Xa())&&this.ha(),C.X},ub:function(g){f.T.fn.ub.call(this,g),this.nc=function(){return this[V].J||(this[V].sa?this.ha():this[V].ka=!1),this[V].X},this.Ia=function(C){this.pc(this[V].X),this[V].ka=!0,C&&(this[V].sa=!0),this.qc(this,!C)}},s:function(){var g=this[V];!g.J&&g.I&&f.a.P(g.I,function(C,R){R.s&&R.s()}),g.l&&g.Rb&&f.a.K.yb(g.l,g.Rb),g.I=e,g.V=0,g.ra=!0,g.sa=!1,g.ka=!1,g.J=!1,g.l=e,g.Sa=e,g.Wc=e,this.Nc||(g.nb=e)}},L={Qa:function(g){var C=this,R=C[V];if(!R.ra&&R.J&&g=="change"){if(R.J=!1,R.sa||C.Xa())R.I=null,R.V=0,C.ha()&&C.Gb();else{var G=[];f.a.P(R.I,function(P,Y){G[Y.Ka]=P}),f.a.D(G,function(P,Y){var O=R.I[P],k=C.$c(O.da);k.Ka=Y,k.La=O.La,R.I[P]=k}),C.Xa()&&C.ha()&&C.Gb()}R.ra||C.notifySubscribers(R.X,"awake")}},hb:function(g){var C=this[V];C.ra||g!="change"||this.Wa("change")||(f.a.P(C.I,function(R,G){G.s&&(C.I[R]={da:G.da,Ka:G.Ka,La:G.La},G.s())}),C.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var g=this[V];return g.J&&(g.sa||this.Xa())&&this.ha(),f.T.fn.ob.call(this)}},v={Qa:function(g){g!="change"&&g!="beforeChange"||this.v()}};f.a.Ba&&f.a.setPrototypeOf(E,f.T.fn);var I=f.ta.Ma;E[I]=f.o,f.Oc=function(g){return typeof g=="function"&&g[I]===E[I]},f.Fd=function(g){return f.Oc(g)&&g[V]&&g[V].wb},f.b("computed",f.o),f.b("dependentObservable",f.o),f.b("isComputed",f.Oc),f.b("isPureComputed",f.Fd),f.b("computed.fn",E),f.L(E,"peek",E.v),f.L(E,"dispose",E.s),f.L(E,"isActive",E.ja),f.L(E,"getDependenciesCount",E.qa),f.L(E,"getDependencies",E.Va),f.xb=function(g,C){return typeof g=="function"?f.o(g,C,{pure:!0}):(g=f.a.extend({},g),g.pure=!0,f.o(g,C))},f.b("pureComputed",f.xb),(function(){function g(G,P,Y){if(Y=Y||new R,G=P(G),typeof G!="object"||G===null||G===e||G instanceof RegExp||G instanceof Date||G instanceof String||G instanceof Number||G instanceof Boolean)return G;var O=G instanceof Array?[]:{};return Y.save(G,O),C(G,function(k){var D=P(G[k]);switch(typeof D){case"boolean":case"number":case"string":case"function":O[k]=D;break;case"object":case"undefined":var w=Y.get(D);O[k]=w!==e?w:g(D,P,Y)}}),O}function C(G,P){if(G instanceof Array){for(var Y=0;Y<G.length;Y++)P(Y);typeof G.toJSON=="function"&&P("toJSON")}else for(Y in G)P(Y)}function R(){this.keys=[],this.values=[]}f.ad=function(G){if(arguments.length==0)throw Error("When calling ko.toJS, pass the object you want to convert.");return g(G,function(P){for(var Y=0;f.O(P)&&10>Y;Y++)P=P();return P})},f.toJSON=function(G,P,Y){return G=f.ad(G),f.a.hc(G,P,Y)},R.prototype={constructor:R,save:function(G,P){var Y=f.a.A(this.keys,G);0<=Y?this.values[Y]=P:(this.keys.push(G),this.values.push(P))},get:function(G){return G=f.a.A(this.keys,G),0<=G?this.values[G]:e}}})(),f.b("toJS",f.ad),f.b("toJSON",f.toJSON),f.Wd=function(g,C,R){function G(P){var Y=f.xb(g,R).extend({ma:"always"}),O=Y.subscribe(function(k){k&&(O.s(),P(k))});return Y.notifySubscribers(Y.v()),O}return typeof Promise!="function"||C?G(C.bind(R)):new Promise(G)},f.b("when",f.Wd),(function(){f.w={M:function(g){switch(f.a.R(g)){case"option":return g.__ko__hasDomDataOptionValue__===!0?f.a.g.get(g,f.c.options.$b):7>=f.a.W?g.getAttributeNode("value")&&g.getAttributeNode("value").specified?g.value:g.text:g.value;case"select":return 0<=g.selectedIndex?f.w.M(g.options[g.selectedIndex]):e;default:return g.value}},cb:function(g,C,R){switch(f.a.R(g)){case"option":typeof C=="string"?(f.a.g.set(g,f.c.options.$b,e),"__ko__hasDomDataOptionValue__"in g&&delete g.__ko__hasDomDataOptionValue__,g.value=C):(f.a.g.set(g,f.c.options.$b,C),g.__ko__hasDomDataOptionValue__=!0,g.value=typeof C=="number"?C:"");break;case"select":(C===""||C===null)&&(C=e);for(var G=-1,P=0,Y=g.options.length,O;P<Y;++P)if(O=f.w.M(g.options[P]),O==C||O===""&&C===e){G=P;break}(R||0<=G||C===e&&1<g.size)&&(g.selectedIndex=G,f.a.W===6&&f.a.setTimeout(function(){g.selectedIndex=G},0));break;default:(C===null||C===e)&&(C=""),g.value=C}}}})(),f.b("selectExtensions",f.w),f.b("selectExtensions.readValue",f.w.M),f.b("selectExtensions.writeValue",f.w.cb),f.m=(function(){function g(k){k=f.a.Db(k),k.charCodeAt(0)===123&&(k=k.slice(1,-1)),k+=`
,`;var D=[],w=k.match(G),z,J=[],ee=0;if(1<w.length){for(var H=0,te;te=w[H];++H){var $=te.charCodeAt(0);if($===44){if(0>=ee){D.push(z&&J.length?{key:z,value:J.join("")}:{unknown:z||J.join("")}),z=ee=0,J=[];continue}}else if($===58){if(!ee&&!z&&J.length===1){z=J.pop();continue}}else{if($===47&&1<te.length&&(te.charCodeAt(1)===47||te.charCodeAt(1)===42))continue;$===47&&H&&1<te.length?($=w[H-1].match(P))&&!Y[$[0]]&&(k=k.substr(k.indexOf(te)+1),w=k.match(G),H=-1,te="/"):$===40||$===123||$===91?++ee:$===41||$===125||$===93?--ee:z||J.length||$!==34&&$!==39||(te=te.slice(1,-1))}J.push(te)}if(0<ee)throw Error("Unbalanced parentheses, braces, or brackets")}return D}var C=["true","false","null","undefined"],R=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,G=RegExp(`"(?:\\\\.|[^"])*"|'(?:\\\\.|[^'])*'|\`(?:\\\\.|[^\`])*\`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*
|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,"'\`{}()/:[\\]]*[^\\s,"'\`{}()/:[\\]]|[^\\s]`,"g"),P=/[\])"'A-Za-z0-9_$]+$/,Y={in:1,return:1,typeof:1},O={};return{Ra:[],wa:O,ac:g,vb:function(k,D){function w($,be){var ye;if(!H){var ce=f.getBindingHandler($);if(ce&&ce.preprocess&&!(be=ce.preprocess(be,$,w)))return;(ce=O[$])&&(ye=be,0<=f.a.A(C,ye)?ye=!1:(ce=ye.match(R),ye=ce===null?!1:ce[1]?"Object("+ce[1]+")"+ce[2]:ye),ce=ye),ce&&J.push("'"+(typeof O[$]=="string"?O[$]:$)+"':function(_z){"+ye+"=_z}")}ee&&(be="function(){return "+be+" }"),z.push("'"+$+"':"+be)}D=D||{};var z=[],J=[],ee=D.valueAccessors,H=D.bindingParams,te=typeof k=="string"?g(k):k;return f.a.D(te,function($){w($.key||$.unknown,$.value)}),J.length&&w("_ko_property_writers","{"+J.join(",")+" }"),z.join(",")},Id:function(k,D){for(var w=0;w<k.length;w++)if(k[w].key==D)return!0;return!1},eb:function(k,D,w,z,J){k&&f.O(k)?!f.Za(k)||J&&k.v()===z||k(z):(k=D.get("_ko_property_writers"))&&k[w]&&k[w](z)}}})(),f.b("expressionRewriting",f.m),f.b("expressionRewriting.bindingRewriteValidators",f.m.Ra),f.b("expressionRewriting.parseObjectLiteral",f.m.ac),f.b("expressionRewriting.preProcessBindings",f.m.vb),f.b("expressionRewriting._twoWayBindings",f.m.wa),f.b("jsonExpressionRewriting",f.m),f.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",f.m.vb),(function(){function g(w){return w.nodeType==8&&Y.test(P?w.text:w.nodeValue)}function C(w){return w.nodeType==8&&O.test(P?w.text:w.nodeValue)}function R(w,z){for(var J=w,ee=1,H=[];J=J.nextSibling;){if(C(J)&&(f.a.g.set(J,D,!0),ee--,ee===0))return H;H.push(J),g(J)&&ee++}if(!z)throw Error("Cannot find closing comment tag to match: "+w.nodeValue);return null}function G(w,z){var J=R(w,z);return J?0<J.length?J[J.length-1].nextSibling:w.nextSibling:null}var P=n&&n.createComment("test").text==="<!--test-->",Y=P?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,O=P?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,k={ul:!0,ol:!0},D="__ko_matchedEndComment__";f.h={ea:{},childNodes:function(w){return g(w)?R(w):w.childNodes},Ea:function(w){if(g(w)){w=f.h.childNodes(w);for(var z=0,J=w.length;z<J;z++)f.removeNode(w[z])}else f.a.Tb(w)},va:function(w,z){if(g(w)){f.h.Ea(w);for(var J=w.nextSibling,ee=0,H=z.length;ee<H;ee++)J.parentNode.insertBefore(z[ee],J)}else f.a.va(w,z)},Vc:function(w,z){var J;g(w)?(J=w.nextSibling,w=w.parentNode):J=w.firstChild,J?z!==J&&w.insertBefore(z,J):w.appendChild(z)},Wb:function(w,z,J){J?(J=J.nextSibling,g(w)&&(w=w.parentNode),J?z!==J&&w.insertBefore(z,J):w.appendChild(z)):f.h.Vc(w,z)},firstChild:function(w){if(g(w))return!w.nextSibling||C(w.nextSibling)?null:w.nextSibling;if(w.firstChild&&C(w.firstChild))throw Error("Found invalid end comment, as the first child of "+w);return w.firstChild},nextSibling:function(w){if(g(w)&&(w=G(w)),w.nextSibling&&C(w.nextSibling)){var z=w.nextSibling;if(C(z)&&!f.a.g.get(z,D))throw Error("Found end comment without a matching opening comment, as child of "+w);return null}return w.nextSibling},Cd:g,Vd:function(w){return(w=(P?w.text:w.nodeValue).match(Y))?w[1]:null},Sc:function(w){if(k[f.a.R(w)]){var z=w.firstChild;if(z)do if(z.nodeType===1){var J;J=z.firstChild;var ee=null;if(J)do if(ee)ee.push(J);else if(g(J)){var H=G(J,!0);H?J=H:ee=[J]}else C(J)&&(ee=[J]);while(J=J.nextSibling);if(J=ee)for(ee=z.nextSibling,H=0;H<J.length;H++)ee?w.insertBefore(J[H],ee):w.appendChild(J[H])}while(z=z.nextSibling)}}}})(),f.b("virtualElements",f.h),f.b("virtualElements.allowedBindings",f.h.ea),f.b("virtualElements.emptyNode",f.h.Ea),f.b("virtualElements.insertAfter",f.h.Wb),f.b("virtualElements.prepend",f.h.Vc),f.b("virtualElements.setDomNodeChildren",f.h.va),(function(){f.ga=function(){this.nd={}},f.a.extend(f.ga.prototype,{nodeHasBindings:function(g){switch(g.nodeType){case 1:return g.getAttribute("data-bind")!=null||f.j.getComponentNameForNode(g);case 8:return f.h.Cd(g);default:return!1}},getBindings:function(g,C){var R=this.getBindingsString(g,C),R=R?this.parseBindingsString(R,C,g):null;return f.j.tc(R,g,C,!1)},getBindingAccessors:function(g,C){var R=this.getBindingsString(g,C),R=R?this.parseBindingsString(R,C,g,{valueAccessors:!0}):null;return f.j.tc(R,g,C,!0)},getBindingsString:function(g){switch(g.nodeType){case 1:return g.getAttribute("data-bind");case 8:return f.h.Vd(g);default:return null}},parseBindingsString:function(g,C,R,G){try{var P=this.nd,Y=g+(G&&G.valueAccessors||""),O;if(!(O=P[Y])){var k,D="with($context){with($data||{}){return{"+f.m.vb(g,G)+"}}}";k=new Function("$context","$element",D),O=P[Y]=k}return O(C,R)}catch(w){throw w.message=`Unable to parse bindings.
Bindings value: `+g+`
Message: `+w.message,w}}}),f.ga.instance=new f.ga})(),f.b("bindingProvider",f.ga),(function(){function g(ce){var Ze=(ce=f.a.g.get(ce,ye))&&ce.N;Ze&&(ce.N=null,Ze.Tc())}function C(ce,Ze,xe){this.node=ce,this.yc=Ze,this.kb=[],this.H=!1,Ze.N||f.a.K.za(ce,g),xe&&xe.N&&(xe.N.kb.push(ce),this.Kb=xe)}function R(ce){return function(){return ce}}function G(ce){return ce()}function P(ce){return f.a.Ga(f.u.G(ce),function(Ze,xe){return function(){return ce()[xe]}})}function Y(ce,Ze,xe){return typeof ce=="function"?P(ce.bind(null,Ze,xe)):f.a.Ga(ce,R)}function O(ce,Ze){return P(this.getBindings.bind(this,ce,Ze))}function k(ce,Ze){var xe=f.h.firstChild(Ze);if(xe){var Ge,Ve=f.ga.instance,Ye=Ve.preprocessNode;if(Ye){for(;Ge=xe;)xe=f.h.nextSibling(Ge),Ye.call(Ve,Ge);xe=f.h.firstChild(Ze)}for(;Ge=xe;)xe=f.h.nextSibling(Ge),D(ce,Ge)}f.i.ma(Ze,f.i.H)}function D(ce,Ze){var xe=ce,Ge=Ze.nodeType===1;Ge&&f.h.Sc(Ze),(Ge||f.ga.instance.nodeHasBindings(Ze))&&(xe=z(Ze,null,ce).bindingContextForDescendants),xe&&!$[f.a.R(Ze)]&&k(xe,Ze)}function w(ce){var Ze=[],xe={},Ge=[];return f.a.P(ce,function Ve(Ye){if(!xe[Ye]){var ke=f.getBindingHandler(Ye);ke&&(ke.after&&(Ge.push(Ye),f.a.D(ke.after,function(it){if(ce[it]){if(f.a.A(Ge,it)!==-1)throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+Ge.join(", "));Ve(it)}}),Ge.length--),Ze.push({key:Ye,Mc:ke})),xe[Ye]=!0}}),Ze}function z(ce,Ze,xe){var Ge=f.a.g.Ub(ce,ye,{}),Ve=Ge.hd;if(!Ze){if(Ve)throw Error("You cannot apply bindings multiple times to the same element.");Ge.hd=!0}Ve||(Ge.context=xe),Ge.Zb||(Ge.Zb={});var Ye;if(Ze&&typeof Ze!="function")Ye=Ze;else{var ke=f.ga.instance,it=ke.getBindingAccessors||O,pt=f.$(function(){return(Ye=Ze?Ze(xe,ce):it.call(ke,ce,xe))&&(xe[ee]&&xe[ee](),xe[te]&&xe[te]()),Ye},null,{l:ce});Ye&&pt.ja()||(pt=null)}var Vt=xe,Ue;if(Ye){var St=function(){return f.a.Ga(pt?pt():Ye,G)},ht=pt?function(ot){return function(){return G(pt()[ot])}}:function(ot){return Ye[ot]};St.get=function(ot){return Ye[ot]&&G(ht(ot))},St.has=function(ot){return ot in Ye},f.i.H in Ye&&f.i.subscribe(ce,f.i.H,function(){var ot=(0,Ye[f.i.H])();if(ot){var Jt=f.h.childNodes(ce);Jt.length&&ot(Jt,f.Ec(Jt[0]))}}),f.i.pa in Ye&&(Vt=f.i.Cb(ce,xe),f.i.subscribe(ce,f.i.pa,function(){var ot=(0,Ye[f.i.pa])();ot&&f.h.firstChild(ce)&&ot(ce)})),Ge=w(Ye),f.a.D(Ge,function(ot){var Jt=ot.Mc.init,jt=ot.Mc.update,yt=ot.key;if(ce.nodeType===8&&!f.h.ea[yt])throw Error("The binding '"+yt+"' cannot be used with virtual elements");try{typeof Jt=="function"&&f.u.G(function(){var Gt=Jt(ce,ht(yt),St,Vt.$data,Vt);if(Gt&&Gt.controlsDescendantBindings){if(Ue!==e)throw Error("Multiple bindings ("+Ue+" and "+yt+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");Ue=yt}}),typeof jt=="function"&&f.$(function(){jt(ce,ht(yt),St,Vt.$data,Vt)},null,{l:ce})}catch(Gt){throw Gt.message='Unable to process binding "'+yt+": "+Ye[yt]+`"
Message: `+Gt.message,Gt}})}return Ge=Ue===e,{shouldBindDescendants:Ge,bindingContextForDescendants:Ge&&Vt}}function J(ce,Ze){return ce&&ce instanceof f.fa?ce:new f.fa(ce,e,e,Ze)}var ee=f.a.Da("_subscribable"),H=f.a.Da("_ancestorBindingInfo"),te=f.a.Da("_dataDependency");f.c={};var $={script:!0,textarea:!0,template:!0};f.getBindingHandler=function(ce){return f.c[ce]};var be={};f.fa=function(ce,Ze,xe,Ge,Ve){function Ye(){var ht=Vt?pt():pt,ot=f.a.f(ht);return Ze?(f.a.extend(ke,Ze),H in Ze&&(ke[H]=Ze[H])):(ke.$parents=[],ke.$root=ot,ke.ko=f),ke[ee]=Ue,it?ot=ke.$data:(ke.$rawData=ht,ke.$data=ot),xe&&(ke[xe]=ot),Ge&&Ge(ke,Ze,ot),Ze&&Ze[ee]&&!f.S.o().Vb(Ze[ee])&&Ze[ee](),St&&(ke[te]=St),ke.$data}var ke=this,it=ce===be,pt=it?e:ce,Vt=typeof pt=="function"&&!f.O(pt),Ue,St=Ve&&Ve.dataDependency;Ve&&Ve.exportDependencies?Ye():(Ue=f.xb(Ye),Ue.v(),Ue.ja()?Ue.equalityComparer=null:ke[ee]=e)},f.fa.prototype.createChildContext=function(ce,Ze,xe,Ge){if(!Ge&&Ze&&typeof Ze=="object"&&(Ge=Ze,Ze=Ge.as,xe=Ge.extend),Ze&&Ge&&Ge.noChildContext){var Ve=typeof ce=="function"&&!f.O(ce);return new f.fa(be,this,null,function(Ye){xe&&xe(Ye),Ye[Ze]=Ve?ce():ce},Ge)}return new f.fa(ce,this,Ze,function(Ye,ke){Ye.$parentContext=ke,Ye.$parent=ke.$data,Ye.$parents=(ke.$parents||[]).slice(0),Ye.$parents.unshift(Ye.$parent),xe&&xe(Ye)},Ge)},f.fa.prototype.extend=function(ce,Ze){return new f.fa(be,this,null,function(xe){f.a.extend(xe,typeof ce=="function"?ce(xe):ce)},Ze)};var ye=f.a.g.Z();C.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},C.prototype.sd=function(ce){f.a.Pa(this.kb,ce),!this.kb.length&&this.H&&this.Cc()},C.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,f.a.K.yb(this.node,g),f.i.ma(this.node,f.i.pa),this.Tc())},f.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(ce,Ze,xe,Ge,Ve){var Ye=f.a.g.Ub(ce,ye,{});return Ye.Fa||(Ye.Fa=new f.T),Ve&&Ve.notifyImmediately&&Ye.Zb[Ze]&&f.u.G(xe,Ge,[ce]),Ye.Fa.subscribe(xe,Ge,Ze)},ma:function(ce,Ze){var xe=f.a.g.get(ce,ye);if(xe&&(xe.Zb[Ze]=!0,xe.Fa&&xe.Fa.notifySubscribers(ce,Ze),Ze==f.i.H)){if(xe.N)xe.N.Cc();else if(xe.N===e&&xe.Fa&&xe.Fa.Wa(f.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")}},Cb:function(ce,Ze){var xe=f.a.g.Ub(ce,ye,{});return xe.N||(xe.N=new C(ce,xe,Ze[H])),Ze[H]==xe?Ze:Ze.extend(function(Ge){Ge[H]=xe})}},f.Td=function(ce){return(ce=f.a.g.get(ce,ye))&&ce.context},f.ib=function(ce,Ze,xe){return ce.nodeType===1&&f.h.Sc(ce),z(ce,Ze,J(xe))},f.ld=function(ce,Ze,xe){return xe=J(xe),f.ib(ce,Y(Ze,xe,ce),xe)},f.Oa=function(ce,Ze){Ze.nodeType!==1&&Ze.nodeType!==8||k(J(ce),Ze)},f.vc=function(ce,Ze,xe){if(!o&&t.jQuery&&(o=t.jQuery),2>arguments.length){if(Ze=n.body,!Ze)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!Ze||Ze.nodeType!==1&&Ze.nodeType!==8)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");D(J(ce,xe),Ze)},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 C(O,k){var D=Object.prototype.hasOwnProperty.call(P,O)?P[O]:g,w;D?D.subscribe(k):(D=P[O]=new f.T,D.subscribe(k),R(O,function(z,J){var ee=!(!J||!J.synchronous);Y[O]={definition:z,Gd:ee},delete P[O],w||ee?D.notifySubscribers(z):f.na.zb(function(){D.notifySubscribers(z)})}),w=!0)}function R(O,k){G("getConfig",[O],function(D){D?G("loadComponent",[O,D],function(w){k(w,D)}):k(null,null)})}function G(O,k,D,w){w||(w=f.j.loaders.slice(0));var z=w.shift();if(z){var J=z[O];if(J){var ee=!1;if(J.apply(z,k.concat(function(H){ee?D(null):H!==null?D(H):G(O,k,D,w)}))!==g&&(ee=!0,!z.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else G(O,k,D,w)}else D(null)}var P={},Y={};f.j={get:function(O,k){var D=Object.prototype.hasOwnProperty.call(Y,O)?Y[O]:g;D?D.Gd?f.u.G(function(){k(D.definition)}):f.na.zb(function(){k(D.definition)}):C(O,k)},Bc:function(O){delete Y[O]},oc:G},f.j.loaders=[],f.b("components",f.j),f.b("components.get",f.j.get),f.b("components.clearCachedDefinition",f.j.Bc)})(),(function(){function g(D,w,z,J){function ee(){--te===0&&J(H)}var H={},te=2,$=z.template;z=z.viewModel,$?P(w,$,function(be){f.j.oc("loadTemplate",[D,be],function(ye){H.template=ye,ee()})}):ee(),z?P(w,z,function(be){f.j.oc("loadViewModel",[D,be],function(ye){H[k]=ye,ee()})}):ee()}function C(D,w,z){if(typeof w=="function")z(function(ee){return new w(ee)});else if(typeof w[k]=="function")z(w[k]);else if("instance"in w){var J=w.instance;z(function(){return J})}else"viewModel"in w?C(D,w.viewModel,z):D("Unknown viewModel value: "+w)}function R(D){switch(f.a.R(D)){case"script":return f.a.ua(D.text);case"textarea":return f.a.ua(D.value);case"template":if(G(D.content))return f.a.Ca(D.content.childNodes)}return f.a.Ca(D.childNodes)}function G(D){return t.DocumentFragment?D instanceof DocumentFragment:D&&D.nodeType===11}function P(D,w,z){typeof w.require=="string"?a||t.require?(a||t.require)([w.require],function(J){J&&typeof J=="object"&&J.Xd&&J.default&&(J=J.default),z(J)}):D("Uses require, but no AMD loader is present"):z(w)}function Y(D){return function(w){throw Error("Component '"+D+"': "+w)}}var O={};f.j.register=function(D,w){if(!w)throw Error("Invalid configuration for "+D);if(f.j.tb(D))throw Error("Component "+D+" is already registered");O[D]=w},f.j.tb=function(D){return Object.prototype.hasOwnProperty.call(O,D)},f.j.unregister=function(D){delete O[D],f.j.Bc(D)},f.j.Fc={getConfig:function(D,w){w(f.j.tb(D)?O[D]:null)},loadComponent:function(D,w,z){var J=Y(D);P(J,w,function(ee){g(D,J,ee,z)})},loadTemplate:function(D,w,z){if(D=Y(D),typeof w=="string")z(f.a.ua(w));else if(w instanceof Array)z(w);else if(G(w))z(f.a.la(w.childNodes));else if(w.element)if(w=w.element,t.HTMLElement?w instanceof HTMLElement:w&&w.tagName&&w.nodeType===1)z(R(w));else if(typeof w=="string"){var J=n.getElementById(w);J?z(R(J)):D("Cannot find element with ID "+w)}else D("Unknown element type: "+w);else D("Unknown template value: "+w)},loadViewModel:function(D,w,z){C(Y(D),w,z)}};var k="createViewModel";f.b("components.register",f.j.register),f.b("components.isRegistered",f.j.tb),f.b("components.unregister",f.j.unregister),f.b("components.defaultLoader",f.j.Fc),f.j.loaders.push(f.j.Fc),f.j.dd=O})(),(function(){function g(R,G){var P=R.getAttribute("params");if(P){var P=C.parseBindingsString(P,G,R,{valueAccessors:!0,bindingParams:!0}),P=f.a.Ga(P,function(k){return f.o(k,null,{l:R})}),Y=f.a.Ga(P,function(k){var D=k.v();return k.ja()?f.o({read:function(){return f.a.f(k())},write:f.Za(D)&&function(w){k()(w)},l:R}):D});return Object.prototype.hasOwnProperty.call(Y,"$raw")||(Y.$raw=P),Y}return{$raw:{}}}f.j.getComponentNameForNode=function(R){var G=f.a.R(R);if(f.j.tb(G)&&(G.indexOf("-")!=-1||""+R=="[object HTMLUnknownElement]"||8>=f.a.W&&R.tagName===G))return G},f.j.tc=function(R,G,P,Y){if(G.nodeType===1){var O=f.j.getComponentNameForNode(G);if(O){if(R=R||{},R.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var k={name:O,params:g(G,P)};R.component=Y?function(){return k}:k}}return R};var C=new f.ga;9>f.a.W&&(f.j.register=(function(R){return function(G){return R.apply(this,arguments)}})(f.j.register),n.createDocumentFragment=(function(R){return function(){var G=R(),P=f.j.dd,Y;for(Y in P);return G}})(n.createDocumentFragment))})(),(function(){function g(G,P,Y){if(P=P.template,!P)throw Error("Component '"+G+"' has no template");G=f.a.Ca(P),f.h.va(Y,G)}function C(G,P,Y){var O=G.createViewModel;return O?O.call(G,P,Y):P}var R=0;f.c.component={init:function(G,P,Y,O,k){function D(){var H=w&&w.dispose;typeof H=="function"&&H.call(w),J&&J.s(),z=w=J=null}var w,z,J,ee=f.a.la(f.h.childNodes(G));return f.h.Ea(G),f.a.K.za(G,D),f.o(function(){var H=f.a.f(P()),te,$;if(typeof H=="string"?te=H:(te=f.a.f(H.name),$=f.a.f(H.params)),!te)throw Error("No component name specified");var be=f.i.Cb(G,k),ye=z=++R;f.j.get(te,function(ce){if(z===ye){if(D(),!ce)throw Error("Unknown component '"+te+"'");g(te,ce,G);var Ze=C(ce,$,{element:G,templateNodes:ee});ce=be.createChildContext(Ze,{extend:function(xe){xe.$component=Ze,xe.$componentTemplateNodes=ee}}),Ze&&Ze.koDescendantsComplete&&(J=f.i.subscribe(G,f.i.pa,Ze.koDescendantsComplete,Ze)),w=Ze,f.Oa(ce,G)}})},null,{l:G}),{controlsDescendantBindings:!0}}},f.h.ea.component=!0})();var X={class:"className",for:"htmlFor"};f.c.attr={update:function(g,C){var R=f.a.f(C())||{};f.a.P(R,function(G,P){P=f.a.f(P);var Y=G.indexOf(":"),Y="lookupNamespaceURI"in g&&0<Y&&g.lookupNamespaceURI(G.substr(0,Y)),O=P===!1||P===null||P===e;O?Y?g.removeAttributeNS(Y,G):g.removeAttribute(G):P=P.toString(),8>=f.a.W&&G in X?(G=X[G],O?g.removeAttribute(G):g[G]=P):O||(Y?g.setAttributeNS(Y,G,P):g.setAttribute(G,P)),G==="name"&&f.a.Yc(g,O?"":P)})}},(function(){f.c.checked={after:["value","attr"],init:function(g,C,R){function G(){var H=g.checked,te=Y();if(!f.S.Ya()&&(H||!k&&!f.S.qa())){var $=f.u.G(C);if(w){var be=z?$.v():$,ye=ee;ee=te,ye!==te?H&&(f.a.Na(be,te,!0),f.a.Na(be,ye,!1)):f.a.Na(be,te,H),z&&f.Za($)&&$(be)}else O&&(te===e?te=H:H||(te=e)),f.m.eb($,R,"checked",te,!0)}}function P(){var H=f.a.f(C()),te=Y();w?(g.checked=0<=f.a.A(H,te),ee=te):g.checked=O&&te===e?!!H:Y()===H}var Y=f.xb(function(){if(R.has("checkedValue"))return f.a.f(R.get("checkedValue"));if(J)return R.has("value")?f.a.f(R.get("value")):g.value}),O=g.type=="checkbox",k=g.type=="radio";if(O||k){var D=C(),w=O&&f.a.f(D)instanceof Array,z=!(w&&D.push&&D.splice),J=k||w,ee=w?Y():e;k&&!g.name&&f.c.uniqueName.init(g,function(){return!0}),f.o(G,null,{l:g}),f.a.B(g,"click",G),f.o(P,null,{l:g}),D=e}}},f.m.wa.checked=!0,f.c.checkedValue={update:function(g,C){g.value=f.a.f(C())}}})(),f.c.class={update:function(g,C){var R=f.a.Db(f.a.f(C()));f.a.Eb(g,g.__ko__cssValue,!1),g.__ko__cssValue=R,f.a.Eb(g,R,!0)}},f.c.css={update:function(g,C){var R=f.a.f(C());R!==null&&typeof R=="object"?f.a.P(R,function(G,P){P=f.a.f(P),f.a.Eb(g,G,P)}):f.c.class.update(g,C)}},f.c.enable={update:function(g,C){var R=f.a.f(C());R&&g.disabled?g.removeAttribute("disabled"):R||g.disabled||(g.disabled=!0)}},f.c.disable={update:function(g,C){f.c.enable.update(g,function(){return!f.a.f(C())})}},f.c.event={init:function(g,C,R,G,P){var Y=C()||{};f.a.P(Y,function(O){typeof O=="string"&&f.a.B(g,O,function(k){var D,w=C()[O];if(w){try{var z=f.a.la(arguments);G=P.$data,z.unshift(G),D=w.apply(G,z)}finally{D!==!0&&(k.preventDefault?k.preventDefault():k.returnValue=!1)}R.get(O+"Bubble")===!1&&(k.cancelBubble=!0,k.stopPropagation&&k.stopPropagation())}})})}},f.c.foreach={Rc:function(g){return function(){var C=g(),R=f.a.bc(C);return!R||typeof R.length=="number"?{foreach:C,templateEngine:f.ba.Ma}:(f.a.f(C),{foreach:R.data,as:R.as,noChildContext:R.noChildContext,includeDestroyed:R.includeDestroyed,afterAdd:R.afterAdd,beforeRemove:R.beforeRemove,afterRender:R.afterRender,beforeMove:R.beforeMove,afterMove:R.afterMove,templateEngine:f.ba.Ma})}},init:function(g,C){return f.c.template.init(g,f.c.foreach.Rc(C))},update:function(g,C,R,G,P){return f.c.template.update(g,f.c.foreach.Rc(C),R,G,P)}},f.m.Ra.foreach=!1,f.h.ea.foreach=!0,f.c.hasfocus={init:function(g,C,R){function G(O){g.__ko_hasfocusUpdating=!0;var k=g.ownerDocument;if("activeElement"in k){var D;try{D=k.activeElement}catch{D=k.body}O=D===g}k=C(),f.m.eb(k,R,"hasfocus",O,!0),g.__ko_hasfocusLastValue=O,g.__ko_hasfocusUpdating=!1}var P=G.bind(null,!0),Y=G.bind(null,!1);f.a.B(g,"focus",P),f.a.B(g,"focusin",P),f.a.B(g,"blur",Y),f.a.B(g,"focusout",Y),g.__ko_hasfocusLastValue=!1},update:function(g,C){var R=!!f.a.f(C());g.__ko_hasfocusUpdating||g.__ko_hasfocusLastValue===R||(R?g.focus():g.blur(),!R&&g.__ko_hasfocusLastValue&&g.ownerDocument.body.focus(),f.u.G(f.a.Fb,null,[g,R?"focusin":"focusout"]))}},f.m.wa.hasfocus=!0,f.c.hasFocus=f.c.hasfocus,f.m.wa.hasFocus="hasfocus",f.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(g,C){f.a.fc(g,C())}},(function(){function g(C,R,G){f.c[C]={init:function(P,Y,O,k,D){var w,z,J={},ee,H,te;if(R){k=O.get("as");var $=O.get("noChildContext");te=!(k&&$),J={as:k,noChildContext:$,exportDependencies:te}}return H=(ee=O.get("completeOn")=="render")||O.has(f.i.pa),f.o(function(){var be=f.a.f(Y()),ye=!G!=!be,ce=!z,Ze;(te||ye!==w)&&(H&&(D=f.i.Cb(P,D)),ye&&((!R||te)&&(J.dataDependency=f.S.o()),Ze=R?D.createChildContext(typeof be=="function"?be:Y,J):f.S.qa()?D.extend(null,J):D),ce&&f.S.qa()&&(z=f.a.Ca(f.h.childNodes(P),!0)),ye?(ce||f.h.va(P,f.a.Ca(z)),f.Oa(Ze,P)):(f.h.Ea(P),ee||f.i.ma(P,f.i.H)),w=ye)},null,{l:P}),{controlsDescendantBindings:!0}}},f.m.Ra[C]=!1,f.h.ea[C]=!0}g("if"),g("ifnot",!1,!0),g("with",!0)})(),f.c.let={init:function(g,C,R,G,P){return C=P.extend(C),f.Oa(C,g),{controlsDescendantBindings:!0}}},f.h.ea.let=!0;var N={};f.c.options={init:function(g){if(f.a.R(g)!=="select")throw Error("options binding applies only to SELECT elements");for(;0<g.length;)g.remove(0);return{controlsDescendantBindings:!0}},update:function(g,C,R){function G(){return f.a.jb(g.options,function($){return $.selected})}function P($,be,ye){var ce=typeof be;return ce=="function"?be($):ce=="string"?$[be]:ye}function Y($,be){if(H&&w)f.i.ma(g,f.i.H);else if(ee.length){var ye=0<=f.a.A(ee,f.w.M(be[0]));f.a.Zc(be[0],ye),H&&!ye&&f.u.G(f.a.Fb,null,[g,"change"])}}var O=g.multiple,k=g.length!=0&&O?g.scrollTop:null,D=f.a.f(C()),w=R.get("valueAllowUnset")&&R.has("value"),z=R.get("optionsIncludeDestroyed");C={};var J,ee=[];w||(O?ee=f.a.Mb(G(),f.w.M):0<=g.selectedIndex&&ee.push(f.w.M(g.options[g.selectedIndex]))),D&&(typeof D.length>"u"&&(D=[D]),J=f.a.jb(D,function($){return z||$===e||$===null||!f.a.f($._destroy)}),R.has("optionsCaption")&&(D=f.a.f(R.get("optionsCaption")),D!==null&&D!==e&&J.unshift(N)));var H=!1;if(C.beforeRemove=function($){g.removeChild($)},D=Y,R.has("optionsAfterRender")&&typeof R.get("optionsAfterRender")=="function"&&(D=function($,be){Y(0,be),f.u.G(R.get("optionsAfterRender"),null,[be[0],$!==N?$:e])}),f.a.ec(g,J,function($,be,ye){return ye.length&&(ee=!w&&ye[0].selected?[f.w.M(ye[0])]:[],H=!0),be=g.ownerDocument.createElement("option"),$===N?(f.a.Bb(be,R.get("optionsCaption")),f.w.cb(be,e)):(ye=P($,R.get("optionsValue"),$),f.w.cb(be,f.a.f(ye)),$=P($,R.get("optionsText"),ye),f.a.Bb(be,$)),[be]},C,D),!w){var te;O?te=ee.length&&G().length<ee.length:te=ee.length&&0<=g.selectedIndex?f.w.M(g.options[g.selectedIndex])!==ee[0]:ee.length||0<=g.selectedIndex,te&&f.u.G(f.a.Fb,null,[g,"change"])}(w||f.S.Ya())&&f.i.ma(g,f.i.H),f.a.wd(g),k&&20<Math.abs(k-g.scrollTop)&&(g.scrollTop=k)}},f.c.options.$b=f.a.g.Z(),f.c.selectedOptions={init:function(g,C,R){function G(){var O=C(),k=[];f.a.D(g.getElementsByTagName("option"),function(D){D.selected&&k.push(f.w.M(D))}),f.m.eb(O,R,"selectedOptions",k)}function P(){var O=f.a.f(C()),k=g.scrollTop;O&&typeof O.length=="number"&&f.a.D(g.getElementsByTagName("option"),function(D){var w=0<=f.a.A(O,f.w.M(D));D.selected!=w&&f.a.Zc(D,w)}),g.scrollTop=k}if(f.a.R(g)!="select")throw Error("selectedOptions binding applies only to SELECT elements");var Y;f.i.subscribe(g,f.i.H,function(){Y?G():(f.a.B(g,"change",G),Y=f.o(P,null,{l:g}))},null,{notifyImmediately:!0})},update:function(){}},f.m.wa.selectedOptions=!0,f.c.style={update:function(g,C){var R=f.a.f(C()||{});f.a.P(R,function(G,P){if(P=f.a.f(P),(P===null||P===e||P===!1)&&(P=""),o)o(g).css(G,P);else if(/^--/.test(G))g.style.setProperty(G,P);else{G=G.replace(/-(\w)/g,function(O,k){return k.toUpperCase()});var Y=g.style[G];g.style[G]=P,P===Y||g.style[G]!=Y||isNaN(P)||(g.style[G]=P+"px")}})}},f.c.submit={init:function(g,C,R,G,P){if(typeof C()!="function")throw Error("The value for a submit binding must be a function");f.a.B(g,"submit",function(Y){var O,k=C();try{O=k.call(P.$data,g)}finally{O!==!0&&(Y.preventDefault?Y.preventDefault():Y.returnValue=!1)}})}},f.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(g,C){f.a.Bb(g,C())}},f.h.ea.text=!0,(function(){if(t&&t.navigator){var g=function(J){if(J)return parseFloat(J[1])},C=t.navigator.userAgent,R,G,P,Y,O;(R=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(O=g(C.match(/Edge\/([^ ]+)$/)))||g(C.match(/Chrome\/([^ ]+)/))||(G=g(C.match(/Version\/([^ ]+) Safari/)))||(P=g(C.match(/Firefox\/([^ ]+)/)))||(Y=f.a.W||g(C.match(/MSIE ([^ ]+)/)))||(Y=g(C.match(/rv:([^ )]+)/)))}if(8<=Y&&10>Y)var k=f.a.g.Z(),D=f.a.g.Z(),w=function(J){var ee=this.activeElement;(ee=ee&&f.a.g.get(ee,D))&&ee(J)},z=function(J,ee){var H=J.ownerDocument;f.a.g.get(H,k)||(f.a.g.set(H,k,!0),f.a.B(H,"selectionchange",w)),f.a.g.set(J,D,ee)};f.c.textInput={init:function(J,ee,H){function te(Ye,ke){f.a.B(J,Ye,ke)}function $(){var Ye=f.a.f(ee());(Ye===null||Ye===e)&&(Ye=""),xe!==e&&Ye===xe?f.a.setTimeout($,4):J.value!==Ye&&(Ve=!0,J.value=Ye,Ve=!1,ce=J.value)}function be(){Ze||(xe=J.value,Ze=f.a.setTimeout(ye,4))}function ye(){clearTimeout(Ze),xe=Ze=e;var Ye=J.value;ce!==Ye&&(ce=Ye,f.m.eb(ee(),H,"textInput",Ye))}var ce=J.value,Ze,xe,Ge=f.a.W==9?be:ye,Ve=!1;Y&&te("keypress",ye),11>Y&&te("propertychange",function(Ye){Ve||Ye.propertyName!=="value"||Ge(Ye)}),Y==8&&(te("keyup",ye),te("keydown",ye)),z&&(z(J,Ge),te("dragend",be)),(!Y||9<=Y)&&te("input",Ge),5>G&&f.a.R(J)==="textarea"?(te("keydown",be),te("paste",be),te("cut",be)):11>R?te("keydown",be):4>P?(te("DOMAutoComplete",ye),te("dragdrop",ye),te("drop",ye)):O&&J.type==="number"&&te("keydown",be),te("change",ye),te("blur",ye),f.o($,null,{l:J})}},f.m.wa.textInput=!0,f.c.textinput={preprocess:function(J,ee,H){H("textInput",J)}}})(),f.c.uniqueName={init:function(g,C){if(C()){var R="ko_unique_"+ ++f.c.uniqueName.rd;f.a.Yc(g,R)}}},f.c.uniqueName.rd=0,f.c.using={init:function(g,C,R,G,P){var Y;return R.has("as")&&(Y={as:R.get("as"),noChildContext:R.get("noChildContext")}),C=P.createChildContext(C,Y),f.Oa(C,g),{controlsDescendantBindings:!0}}},f.h.ea.using=!0,f.c.value={init:function(g,C,R){var G=f.a.R(g),P=G=="input";if(!P||g.type!="checkbox"&&g.type!="radio"){var Y=[],O=R.get("valueUpdate"),k=!1,D=null;O&&(typeof O=="string"?Y=[O]:Y=f.a.wc(O),f.a.Pa(Y,"change"));var w=function(){D=null,k=!1;var ee=C(),H=f.w.M(g);f.m.eb(ee,R,"value",H)};!f.a.W||!P||g.type!="text"||g.autocomplete=="off"||g.form&&g.form.autocomplete=="off"||f.a.A(Y,"propertychange")!=-1||(f.a.B(g,"propertychange",function(){k=!0}),f.a.B(g,"focus",function(){k=!1}),f.a.B(g,"blur",function(){k&&w()})),f.a.D(Y,function(ee){var H=w;f.a.Ud(ee,"after")&&(H=function(){D=f.w.M(g),f.a.setTimeout(w,0)},ee=ee.substring(5)),f.a.B(g,ee,H)});var z;if(z=P&&g.type=="file"?function(){var ee=f.a.f(C());ee===null||ee===e||ee===""?g.value="":f.u.G(w)}:function(){var ee=f.a.f(C()),H=f.w.M(g);D!==null&&ee===D?f.a.setTimeout(z,0):(ee!==H||H===e)&&(G==="select"?(H=R.get("valueAllowUnset"),f.w.cb(g,ee,H),H||ee===f.w.M(g)||f.u.G(w)):f.w.cb(g,ee))},G==="select"){var J;f.i.subscribe(g,f.i.H,function(){J?R.get("valueAllowUnset")?z():w():(f.a.B(g,"change",w),J=f.o(z,null,{l:g}))},null,{notifyImmediately:!0})}else f.a.B(g,"change",w),f.o(z,null,{l:g})}else f.ib(g,{checkedValue:C})},update:function(){}},f.m.wa.value=!0,f.c.visible={update:function(g,C){var R=f.a.f(C()),G=g.style.display!="none";R&&!G?g.style.display="":!R&&G&&(g.style.display="none")}},f.c.hidden={update:function(g,C){f.c.visible.update(g,function(){return!f.a.f(C())})}},(function(g){f.c[g]={init:function(C,R,G,P,Y){return f.c.event.init.call(this,C,function(){var O={};return O[g]=R(),O},G,P,Y)}}})("click"),f.ca=function(){},f.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},f.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},f.ca.prototype.makeTemplateSource=function(g,C){if(typeof g=="string"){C=C||n;var R=C.getElementById(g);if(!R)throw Error("Cannot find template with ID "+g);return new f.C.F(R)}if(g.nodeType==1||g.nodeType==8)return new f.C.ia(g);throw Error("Unknown template type: "+g)},f.ca.prototype.renderTemplate=function(g,C,R,G){return g=this.makeTemplateSource(g,G),this.renderTemplateSource(g,C,R,G)},f.ca.prototype.isTemplateRewritten=function(g,C){return this.allowTemplateRewriting===!1?!0:this.makeTemplateSource(g,C).data("isRewritten")},f.ca.prototype.rewriteTemplate=function(g,C,R){g=this.makeTemplateSource(g,R),C=C(g.text()),g.text(C),g.data("isRewritten",!0)},f.b("templateEngine",f.ca),f.kc=(function(){function g(G,P,Y,O){G=f.m.ac(G);for(var k=f.m.Ra,D=0;D<G.length;D++){var w=G[D].key;if(Object.prototype.hasOwnProperty.call(k,w)){var z=k[w];if(typeof z=="function"){if(w=z(G[D].value))throw Error(w)}else if(!z)throw Error("This template engine does not support the '"+w+"' binding within its templates")}}return Y="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+f.m.vb(G,{valueAccessors:!0})+" } })()},'"+Y.toLowerCase()+"')",O.createJavaScriptEvaluatorBlock(Y)+P}var C=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,R=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(G,P,Y){P.isTemplateRewritten(G,Y)||P.rewriteTemplate(G,function(O){return f.kc.Ld(O,P)},Y)},Ld:function(G,P){return G.replace(C,function(Y,O,k,D,w){return g(w,O,k,P)}).replace(R,function(Y,O){return g(O,"<!-- ko -->","#comment",P)})},md:function(G,P){return f.aa.Xb(function(Y,O){var k=Y.nextSibling;k&&k.nodeName.toLowerCase()===P&&f.ib(k,G,O)})}}})(),f.b("__tr_ambtns",f.kc.md),(function(){f.C={},f.C.F=function(R){if(this.F=R){var G=f.a.R(R);this.ab=G==="script"?1:G==="textarea"?2:G=="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 G=arguments[0];R==="innerHTML"?f.a.fc(this.F,G):this.F[R]=G};var g=f.a.g.Z()+"_";f.C.F.prototype.data=function(R){if(arguments.length===1)return f.a.g.get(this.F,g+R);f.a.g.set(this.F,g+R,arguments[1])};var C=f.a.g.Z();f.C.F.prototype.nodes=function(){var R=this.F;if(arguments.length==0){var G=f.a.g.get(R,C)||{},P=G.lb||(this.ab===3?R.content:this.ab===4?R:e);if(!P||G.jd){var Y=this.text();Y&&Y!==G.bb&&(P=f.a.Md(Y,R.ownerDocument),f.a.g.set(R,C,{lb:P,bb:Y,jd:!0}))}return P}G=arguments[0],this.ab!==e&&this.text(""),f.a.g.set(R,C,{lb:G})},f.C.ia=function(R){this.F=R},f.C.ia.prototype=new f.C.F,f.C.ia.prototype.constructor=f.C.ia,f.C.ia.prototype.text=function(){if(arguments.length==0){var R=f.a.g.get(this.F,C)||{};return R.bb===e&&R.lb&&(R.bb=R.lb.innerHTML),R.bb}f.a.g.set(this.F,C,{bb:arguments[0]})},f.b("templateSources",f.C),f.b("templateSources.domElement",f.C.F),f.b("templateSources.anonymousTemplate",f.C.ia)})(),(function(){function g(D,w,z){var J;for(w=f.h.nextSibling(w);D&&(J=D)!==w;)D=f.h.nextSibling(J),z(J,D)}function C(D,w){if(D.length){var z=D[0],J=D[D.length-1],ee=z.parentNode,H=f.ga.instance,te=H.preprocessNode;if(te){if(g(z,J,function($,be){var ye=$.previousSibling,ce=te.call(H,$);ce&&($===z&&(z=ce[0]||be),$===J&&(J=ce[ce.length-1]||ye))}),D.length=0,!z)return;z===J?D.push(z):(D.push(z,J),f.a.Ua(D,ee))}g(z,J,function($){$.nodeType!==1&&$.nodeType!==8||f.vc(w,$)}),g(z,J,function($){$.nodeType!==1&&$.nodeType!==8||f.aa.cd($,[w])}),f.a.Ua(D,ee)}}function R(D){return D.nodeType?D:0<D.length?D[0]:null}function G(D,w,z,J,ee){ee=ee||{};var H=(D&&R(D)||z||{}).ownerDocument,te=ee.templateEngine||Y;if(f.kc.xd(z,te,H),z=te.renderTemplate(z,J,ee,H),typeof z.length!="number"||0<z.length&&typeof z[0].nodeType!="number")throw Error("Template engine must return an array of DOM nodes");switch(H=!1,w){case"replaceChildren":f.h.va(D,z),H=!0;break;case"replaceNode":f.a.Xc(D,z),H=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+w)}return H&&(C(z,J),ee.afterRender&&f.u.G(ee.afterRender,null,[z,J[ee.as||"$data"]]),w=="replaceChildren"&&f.i.ma(D,f.i.H)),z}function P(D,w,z){return f.O(D)?D():typeof D=="function"?D(w,z):D}var Y;f.gc=function(D){if(D!=e&&!(D instanceof f.ca))throw Error("templateEngine must inherit from ko.templateEngine");Y=D},f.dc=function(D,w,z,J,ee){if(z=z||{},(z.templateEngine||Y)==e)throw Error("Set a template engine before calling renderTemplate");if(ee=ee||"replaceChildren",J){var H=R(J);return f.$(function(){var $=w&&w instanceof f.fa?w:new f.fa(w,null,null,null,{exportDependencies:!0}),te=P(D,$.$data,$),$=G(J,ee,te,$,z);ee=="replaceNode"&&(J=$,H=R(J))},null,{Sa:function(){return!H||!f.a.Sb(H)},l:H&&ee=="replaceNode"?H.parentNode:H})}return f.aa.Xb(function(te){f.dc(D,w,z,te,"replaceNode")})},f.Qd=function(D,w,z,J,ee){function H(xe,Ge){f.u.G(f.a.ec,null,[J,xe,$,z,te,Ge]),f.i.ma(J,f.i.H)}function te(xe,Ge){C(Ge,be),z.afterRender&&z.afterRender(Ge,xe),be=null}function $(xe,Ge){be=ee.createChildContext(xe,{as:ye,noChildContext:z.noChildContext,extend:function(Ye){Ye.$index=Ge,ye&&(Ye[ye+"Index"]=Ge)}});var Ve=P(D,xe,be);return G(J,"ignoreTargetNode",Ve,be,z)}var be,ye=z.as,ce=z.includeDestroyed===!1||f.options.foreachHidesDestroyed&&!z.includeDestroyed;if(ce||z.beforeRemove||!f.Pc(w))return f.$(function(){var xe=f.a.f(w)||[];typeof xe.length>"u"&&(xe=[xe]),ce&&(xe=f.a.jb(xe,function(Ge){return Ge===e||Ge===null||!f.a.f(Ge._destroy)})),H(xe)},null,{l:J});H(w.v());var Ze=w.subscribe(function(xe){H(w(),xe)},null,"arrayChange");return Ze.l(J),Ze};var O=f.a.g.Z(),k=f.a.g.Z();f.c.template={init:function(D,w){var z=f.a.f(w());if(typeof z=="string"||"name"in z)f.h.Ea(D);else if("nodes"in z){if(z=z.nodes||[],f.O(z))throw Error('The "nodes" option must be a plain, non-observable array.');var J=z[0]&&z[0].parentNode;J&&f.a.g.get(J,k)||(J=f.a.Yb(z),f.a.g.set(J,k,!0)),new f.C.ia(D).nodes(J)}else if(z=f.h.childNodes(D),0<z.length)J=f.a.Yb(z),new f.C.ia(D).nodes(J);else throw Error("Anonymous template defined, but no template content was provided");return{controlsDescendantBindings:!0}},update:function(D,w,z,J,ee){var H=w();w=f.a.f(H),z=!0,J=null,typeof w=="string"?w={}:(H="name"in w?w.name:D,"if"in w&&(z=f.a.f(w.if)),z&&"ifnot"in w&&(z=!f.a.f(w.ifnot)),z&&!H&&(z=!1)),"foreach"in w?J=f.Qd(H,z&&w.foreach||[],w,D,ee):z?(z=ee,"data"in w&&(z=ee.createChildContext(w.data,{as:w.as,noChildContext:w.noChildContext,exportDependencies:!0})),J=f.dc(H,z,w,D)):f.h.Ea(D),ee=J,(w=f.a.g.get(D,O))&&typeof w.s=="function"&&w.s(),f.a.g.set(D,O,!ee||ee.ja&&!ee.ja()?e:ee)}},f.m.Ra.template=function(D){return D=f.m.ac(D),D.length==1&&D[0].unknown||f.m.Id(D,"name")?null:"This template engine does not support anonymous templates nested within its templates"},f.h.ea.template=!0})(),f.b("setTemplateEngine",f.gc),f.b("renderTemplate",f.dc),f.a.Kc=function(g,C,R){if(g.length&&C.length){var G,P,Y,O,k;for(G=P=0;(!R||G<R)&&(O=g[P]);++P){for(Y=0;k=C[Y];++Y)if(O.value===k.value){O.moved=k.index,k.moved=O.index,C.splice(Y,1),G=Y=0;break}G+=Y}}},f.a.Pb=(function(){function g(C,R,G,P,Y){var O=Math.min,k=Math.max,D=[],w,z=C.length,J,ee=R.length,H=ee-z||1,te=z+ee+1,$,be,ye;for(w=0;w<=z;w++)for(be=$,D.push($=[]),ye=O(ee,w+H),J=k(0,w-1);J<=ye;J++)$[J]=J?w?C[w-1]===R[J-1]?be[J-1]:O(be[J]||te,$[J-1]||te)+1:J+1:w+1;for(O=[],k=[],H=[],w=z,J=ee;w||J;)ee=D[w][J]-1,J&&ee===D[w][J-1]?k.push(O[O.length]={status:G,value:R[--J],index:J}):w&&ee===D[w-1][J]?H.push(O[O.length]={status:P,value:C[--w],index:w}):(--J,--w,Y.sparse||O.push({status:"retained",value:R[J]}));return f.a.Kc(H,k,!Y.dontLimitMoves&&10*z),O.reverse()}return function(C,R,G){return G=typeof G=="boolean"?{dontLimitMoves:G}:G||{},C=C||[],R=R||[],C.length<R.length?g(C,R,"added","deleted",G):g(R,C,"deleted","added",G)}})(),f.b("utils.compareArrays",f.a.Pb),(function(){function g(G,P,Y,O,k){var D=[],w=f.$(function(){var z=P(Y,k,f.a.Ua(D,G))||[];0<D.length&&(f.a.Xc(D,z),O&&f.u.G(O,null,[Y,z,k])),D.length=0,f.a.Nb(D,z)},null,{l:G,Sa:function(){return!f.a.kd(D)}});return{Y:D,$:w.ja()?w:e}}var C=f.a.g.Z(),R=f.a.g.Z();f.a.ec=function(G,P,Y,O,k,D){function w(ot){Ve={Aa:ot,pb:f.ta(be++)},te.push(Ve),H||Ge.push(Ve)}function z(ot){Ve=ee[ot],be!==Ve.pb.v()&&xe.push(Ve),Ve.pb(be++),f.a.Ua(Ve.Y,G),te.push(Ve)}function J(ot,Jt){if(ot)for(var jt=0,yt=Jt.length;jt<yt;jt++)f.a.D(Jt[jt].Y,function(Gt){ot(Gt,jt,Jt[jt].Aa)})}P=P||[],typeof P.length>"u"&&(P=[P]),O=O||{};var ee=f.a.g.get(G,C),H=!ee,te=[],$=0,be=0,ye=[],ce=[],Ze=[],xe=[],Ge=[],Ve,Ye=0;if(H)f.a.D(P,w);else{if(!D||ee&&ee._countWaitingForRemove){var ke=f.a.Mb(ee,function(ot){return ot.Aa});D=f.a.Pb(ke,P,{dontLimitMoves:O.dontLimitMoves,sparse:!0})}for(var ke=0,it,pt,Vt;it=D[ke];ke++)switch(pt=it.moved,Vt=it.index,it.status){case"deleted":for(;$<Vt;)z($++);pt===e&&(Ve=ee[$],Ve.$&&(Ve.$.s(),Ve.$=e),f.a.Ua(Ve.Y,G).length&&(O.beforeRemove&&(te.push(Ve),Ye++,Ve.Aa===R?Ve=null:Ze.push(Ve)),Ve&&ye.push.apply(ye,Ve.Y))),$++;break;case"added":for(;be<Vt;)z($++);pt!==e?(ce.push(te.length),z(pt)):w(it.value)}for(;be<P.length;)z($++);te._countWaitingForRemove=Ye}f.a.g.set(G,C,te),J(O.beforeMove,xe),f.a.D(ye,O.beforeRemove?f.oa:f.removeNode);var Ue,St,ht;try{ht=G.ownerDocument.activeElement}catch{}if(ce.length)for(;(ke=ce.shift())!=e;){for(Ve=te[ke],Ue=e;ke;)if((St=te[--ke].Y)&&St.length){Ue=St[St.length-1];break}for(P=0;$=Ve.Y[P];Ue=$,P++)f.h.Wb(G,$,Ue)}for(ke=0;Ve=te[ke];ke++){for(Ve.Y||f.a.extend(Ve,g(G,Y,Ve.Aa,k,Ve.pb)),P=0;$=Ve.Y[P];Ue=$,P++)f.h.Wb(G,$,Ue);!Ve.Ed&&k&&(k(Ve.Aa,Ve.Y,Ve.pb),Ve.Ed=!0,Ue=Ve.Y[Ve.Y.length-1])}for(ht&&G.ownerDocument.activeElement!=ht&&ht.focus(),J(O.beforeRemove,Ze),ke=0;ke<Ze.length;++ke)Ze[ke].Aa=R;J(O.afterMove,xe),J(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,C,R,G){return(C=!(9>f.a.W)&&g.nodes?g.nodes():null)?f.a.la(C.cloneNode(!0).childNodes):(g=g.text(),f.a.ua(g,G))},f.ba.Ma=new f.ba,f.gc(f.ba.Ma),f.b("nativeTemplateEngine",f.ba),(function(){f.$a=function(){var C=this.Hd=(function(){if(!o||!o.tmpl)return 0;try{if(0<=o.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch{}return 1})();this.renderTemplateSource=function(R,G,P,Y){if(Y=Y||n,P=P||{},2>C)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var O=R.data("precompiled");return O||(O=R.text()||"",O=o.template(null,"{{ko_with $item.koBindingContext}}"+O+"{{/ko_with}}"),R.data("precompiled",O)),R=[G.$data],G=o.extend({koBindingContext:G},P.templateOptions),G=o.tmpl(O,R,G),G.appendTo(Y.createElement("div")),o.fragments={},G},this.createJavaScriptEvaluatorBlock=function(R){return"{{ko_code ((function() { return "+R+" })()) }}"},this.addTemplate=function(R,G){n.write("<script type='text/html' id='"+R+"'>"+G+"<\/script>")},0<C&&(o.tmpl.tag.ko_code={open:"__.push($1 || '');"},o.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},f.$a.prototype=new f.ca,f.$a.prototype.constructor=f.$a;var g=new f.$a;0<g.Hd&&f.gc(g),f.b("jqueryTmplTemplateEngine",f.$a)})()})})()})()})();var CIt=ko;typeof window<"u"?(ko=window.ko,typeof hk<"u"?window.ko=hk:delete window.ko):(ko=global.ko,typeof hk<"u"?global.ko=hk:delete global.ko);var BA=CIt;var IHo=x(T(),1);/**
* @license
* Knockout ES5 plugin - https://github.com/SteveSanderson/knockout-es5
* Copyright (c) Steve Sanderson
* MIT license
*/var _ie="__knockoutObservables",Sie="__knockoutSubscribable";function kLe(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var n=this,i=ULe(e,!0);return t=t||Object.getOwnPropertyNames(e),t.forEach(function(o){if(!(o===_ie||o===Sie)&&!(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&&RIt(n,a)}}),e}function ULe(e,t){var n=e[_ie];return!n&&t&&(n={},Object.defineProperty(e,_ie,{value:n})),n}function VIt(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),kLe.call(i,e,[t]),e}function RIt(e,t){var n=null;e.computed(function(){n&&(n.dispose(),n=null);var i=t();i instanceof Array&&(n=EIt(e,t,i))})}function EIt(e,t,n){var i=GIt(e,n);return i.subscribe(t)}function GIt(e,t){var n=t[Sie];if(!n){n=new e.subscribable,Object.defineProperty(t,Sie,{value:n});var i={};LIt(t,n,i),WIt(e,t,n,i)}return n}function LIt(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 WIt(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 DLe(e,t){if(!e)return null;var n=ULe(e,!1);return n&&n[t]||null}function vIt(e,t){var n=DLe(e,t);n&&n.valueHasMutated()}function FIt(e){e.track=kLe,e.getObservable=DLe,e.valueHasMutated=vIt,e.defineProperty=VIt}var fk={attachToKo:FIt};var XHo=x(T(),1),OLe="http://www.w3.org/2000/svg",BLe="cesium-svgPath-svg",IIt={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,n){let i=document.createElementNS(OLe,"svg:svg");i.setAttribute("class",BLe);let o=document.createElementNS(OLe,"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",`${BLe} ${e.unwrap(r.css)}`)},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}},pk=IIt;fk.attachToKo(BA);pk.register(BA);var Ce=BA;function bk(e){l(e)||(e=new Af),this._clock=e,this._eventHelper=new vr,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=Ce.observable(Q.now()),this.systemTime.equalityComparer=Q.equals,this.startTime=Ce.observable(e.startTime),this.startTime.equalityComparer=Q.equals,this.startTime.subscribe(function(t){e.startTime=t,this.synchronize()},this),this.stopTime=Ce.observable(e.stopTime),this.stopTime.equalityComparer=Q.equals,this.stopTime.subscribe(function(t){e.stopTime=t,this.synchronize()},this),this.currentTime=Ce.observable(e.currentTime),this.currentTime.equalityComparer=Q.equals,this.currentTime.subscribe(function(t){e.currentTime=t,this.synchronize()},this),this.multiplier=Ce.observable(e.multiplier),this.multiplier.subscribe(function(t){e.multiplier=t,this.synchronize()},this),this.clockStep=Ce.observable(e.clockStep),this.clockStep.subscribe(function(t){e.clockStep=t,this.synchronize()},this),this.clockRange=Ce.observable(e.clockRange),this.clockRange.subscribe(function(t){e.clockRange=t,this.synchronize()},this),this.canAnimate=Ce.observable(e.canAnimate),this.canAnimate.subscribe(function(t){e.canAnimate=t,this.synchronize()},this),this.shouldAnimate=Ce.observable(e.shouldAnimate),this.shouldAnimate.subscribe(function(t){e.shouldAnimate=t,this.synchronize()},this),Ce.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(bk.prototype,{clock:{get:function(){return this._clock}}});bk.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};bk.prototype.isDestroyed=function(){return!1};bk.prototype.destroy=function(){this._eventHelper.removeAll(),me(this)};var gk=bk;var KHo=x(T(),1);function PIt(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,he.throwInstantiationError()}var Aie=PIt;var qHo=x(T(),1);var _1={};_1.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};_1.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};_1.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};_1.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};_1.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 qd=_1;var oKo=x(T(),1);function zLe(e,t){this._command=e,t=t??B.EMPTY_OBJECT,this.toggled=t.toggled??!1,this.tooltip=t.tooltip??"",Ce.track(this,["toggled","tooltip"])}Object.defineProperties(zLe.prototype,{command:{get:function(){return this._command}}});var $x=zLe;var dKo=x(T(),1);function XIt(e,t){t=t??!0;let n=new _e,i=new _e;function o(){let r={args:arguments,cancel:!1},s;return n.raiseEvent(r),r.cancel||(s=e.apply(null,arguments),i.raiseEvent(s)),s}return o.canExecute=t,Ce.track(o,["canExecute"]),Object.defineProperties(o,{beforeExecute:{value:n},afterExecute:{value:i}}),o}var Gn=XIt;var hKo=x(T(),1);function NIt(e,t,n,i,o){return n.call(i,e[t]),Ce.getObservable(e,t).subscribe(n,i,o)}var pc=NIt;var yKo=x(T(),1);var zA="http://www.w3.org/2000/svg",JLe="http://www.w3.org/1999/xlink",kz,yk=U.fromCssColorString("rgba(247,250,255,0.384)"),Uz=U.fromCssColorString("rgba(143,191,255,0.216)"),Zie=U.fromCssColorString("rgba(153,197,255,0.098)"),Dz=U.fromCssColorString("rgba(255,255,255,0.086)"),YIt=U.fromCssColorString("rgba(255,255,255,0.267)"),wIt=U.fromCssColorString("rgba(255,255,255,0)"),HLe=U.fromCssColorString("rgba(66,67,68,0.3)"),KLe=U.fromCssColorString("rgba(0,0,0,0.5)");function eT(e){return U.fromCssColorString(window.getComputedStyle(e).getPropertyValue("color"))}var xk={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 ep(e){let t=document.createElementNS(zA,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(ep(e.children[o]))}else n.indexOf("xlink:")===0?t.setAttributeNS(JLe,n.substring(6),e[n]):n==="textContent"?t.textContent=e[n]:t.setAttribute(n,e[n]);return t}function Cie(e,t,n){let i=document.createElementNS(zA,"text");i.setAttribute("x",e),i.setAttribute("y",t),i.setAttribute("class","cesium-animation-svgText");let o=document.createElementNS(zA,"tspan");return o.textContent=n,i.appendChild(o),i}function MIt(e,t,n){e.setAttribute("transform",`translate(100,100) rotate(${n})`),t.setAttribute("transform",`rotate(${n})`)}var Oz=new U;function Ys(e,t){let n=t.alpha,i=1-n;return Oz.red=e.red*i+t.red*n,Oz.green=e.green*i+t.green*n,Oz.blue=e.blue*i+t.blue*n,Oz.toCssColorString()}function Vie(e,t,n){let i=xk[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 ep(o)}function kIt(e,t,n){let i=xk[n],o=xk.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 ep(r)}function UIt(e,t){let n=e._viewModel,i=n.shuttleRingDragging;if(!(i&&kz!==e))if(t.type==="mousedown"||i&&t.type==="mousemove"||t.type==="touchstart"&&t.touches.length===1||i&&t.type==="touchmove"&&t.touches.length===1){let o=e._centerX,r=e._centerY,a=e._svgNode.getBoundingClientRect(),c,d;if(t.type==="touchstart"||t.type==="touchmove"?(c=t.touches[0].clientX,d=t.touches[0].clientY):(c=t.clientX,d=t.clientY),!i&&(c>a.right||c<a.left||d<a.top||d>a.bottom))return;let u=e._shuttleRingPointer.getBoundingClientRect(),h=c-o-a.left,p=d-r-a.top,b=Math.atan2(p,h)*180/Math.PI+90;b>180&&(b-=360);let f=n.shuttleRingAngle;i||c<u.right&&c>u.left&&d>u.top&&d<u.bottom?(kz=e,n.shuttleRingDragging=!0,n.shuttleRingAngle=b):b<f?n.slower():b>f&&n.faster(),t.preventDefault()}else e===kz&&(kz=void 0),n.shuttleRingDragging=!1}function Mg(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=[pc(t,"toggled",this.setToggled,this),pc(t,"tooltip",this.setTooltip,this),pc(t.command,"canExecute",this.setEnabled,this)]}Mg.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();me(this)};Mg.prototype.isDestroyed=function(){return!1};Mg.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")}};Mg.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")))};Mg.prototype.setTooltip=function(e){this.svgElement.getElementsByTagName("title")[0].textContent=e};function S1(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(zA,"svg:svg");this._svgNode=r,r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",JLe);let s=document.createElementNS(zA,"g");this._topG=s,this._realtimeSVG=new Mg(kIt(3,4,"animation_pathClock"),t.playRealtimeViewModel),this._playReverseSVG=new Mg(Vie(44,99,"animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new Mg(Vie(124,99,"animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new Mg(Vie(84,99,"animation_pathPause"),t.pauseViewModel);let a=document.createElementNS(zA,"g");a.appendChild(this._realtimeSVG.svgElement),a.appendChild(this._playReverseSVG.svgElement),a.appendChild(this._playForwardSVG.svgElement),a.appendChild(this._pauseSVG.svgElement);let c=ep({tagName:"circle",class:"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=c;let d=xk.animation_pathSwooshFX,u=xk.animation_pathPointer,h=ep({tagName:"g",class:"cesium-animation-shuttleRingSwoosh",children:[{tagName:d.tagName,transform:"translate(100,97) scale(-1,1)",id:"animation_pathSwooshFX",d:d.d},{tagName:d.tagName,transform:"translate(100,97)",id:"animation_pathSwooshFX",d:d.d},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=h,this._shuttleRingPointer=ep({class:"cesium-animation-shuttleRingPointer",id:"animation_pathPointer",tagName:u.tagName,d:u.d});let p=ep({tagName:"g",transform:"translate(100,100)"});this._knobOuter=ep({tagName:"circle",class:"cesium-animation-knobOuter",cx:0,cy:0,r:71});let b=61,f=ep({tagName:"circle",class:"cesium-animation-knobInner",cx:0,cy:0,r:b});this._knobDate=Cie(0,-24,""),this._knobTime=Cie(0,-7,""),this._knobStatus=Cie(0,-41,"");let y=ep({tagName:"circle",class:"cesium-animation-blank",cx:0,cy:0,r:b}),_=document.createElementNS(zA,"g");_.setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(o),s.appendChild(_),s.appendChild(p),s.appendChild(a),_.appendChild(c),_.appendChild(h),_.appendChild(this._shuttleRingPointer),p.appendChild(this._knobOuter),p.appendChild(f),p.appendChild(this._knobDate),p.appendChild(this._knobTime),p.appendChild(this._knobStatus),p.appendChild(y),r.appendChild(s),e.appendChild(r);let S=this;function A(v){UIt(S,v)}this._mouseCallback=A,c.addEventListener("mousedown",A,!0),c.addEventListener("touchstart",A,!0),h.addEventListener("mousedown",A,!0),h.addEventListener("touchstart",A,!0),n.addEventListener("mousemove",A,!0),n.addEventListener("touchmove",A,!0),n.addEventListener("mouseup",A,!0),n.addEventListener("touchend",A,!0),n.addEventListener("touchcancel",A,!0),this._shuttleRingPointer.addEventListener("mousedown",A,!0),this._shuttleRingPointer.addEventListener("touchstart",A,!0),this._knobOuter.addEventListener("mousedown",A,!0),this._knobOuter.addEventListener("touchstart",A,!0);let Z=this._knobTime.childNodes[0],V=this._knobDate.childNodes[0],E=this._knobStatus.childNodes[0],L;this._subscriptions=[pc(t.pauseViewModel,"toggled",function(v){L!==v&&(L=v,L?S._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPausePointer"):S._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPointer"))}),pc(t,"shuttleRingAngle",function(v){MIt(S._shuttleRingPointer,S._knobOuter,v)}),pc(t,"dateLabel",function(v){V.textContent!==v&&(V.textContent=v)}),pc(t,"timeLabel",function(v){Z.textContent!==v&&(Z.textContent=v)}),pc(t,"multiplierLabel",function(v){E.textContent!==v&&(E.textContent=v)})],this.applyThemeChanges(),this.resize()}Object.defineProperties(S1.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});S1.prototype.isDestroyed=function(){return!1};S1.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 me(this)};S1.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};S1.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=ep({tagName:"defs",children:[{id:"animation_buttonNormal",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Ys(t,yk)},{tagName:"stop",offset:"12%","stop-color":Ys(t,Uz)},{tagName:"stop",offset:"46%","stop-color":Ys(t,Zie)},{tagName:"stop",offset:"81%","stop-color":Ys(t,Dz)}]},{id:"animation_buttonHovered",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Ys(n,yk)},{tagName:"stop",offset:"12%","stop-color":Ys(n,Uz)},{tagName:"stop",offset:"46%","stop-color":Ys(n,Zie)},{tagName:"stop",offset:"81%","stop-color":Ys(n,Dz)}]},{id:"animation_buttonToggled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Ys(i,yk)},{tagName:"stop",offset:"12%","stop-color":Ys(i,Uz)},{tagName:"stop",offset:"46%","stop-color":Ys(i,Zie)},{tagName:"stop",offset:"81%","stop-color":Ys(i,Dz)}]},{id:"animation_buttonDisabled",tagName:"linearGradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[{tagName:"stop",offset:"0%","stop-color":Ys(o,YIt)},{tagName:"stop",offset:"75%","stop-color":Ys(o,wIt)}]},{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":Ys(s,KLe)},{tagName:"stop",offset:"100%","stop-color":Ys(s,KLe)}]},{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":Ys(r,yk)},{tagName:"stop",offset:"60%","stop-color":Ys(r,HLe)},{tagName:"stop",offset:"85%","stop-color":Ys(r,Uz)}]},{id:"animation_knobInner",tagName:"linearGradient",x1:"20%",y1:"0%",x2:"90%",y2:"100%",children:[{tagName:"stop",offset:"5%","stop-color":Ys(r,HLe)},{tagName:"stop",offset:"60%","stop-color":Ys(r,yk)},{tagName:"stop",offset:"85%","stop-color":Ys(r,Dz)}]}]});l(this._defsElement)?this._svgNode.replaceChild(d,this._defsElement):this._svgNode.appendChild(d),this._defsElement=d};var Tk=S1;var VKo=x(T(),1);var DIt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tT=15,A1=105;function jLe(e,t){return e-t}function Rie(e,t){let n=bo(t,e,jLe);return n<0?~n:n}function OIt(e,t){if(Math.abs(e)<=tT)return e/tT;let n=tT,i=A1,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 BIt(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=A1,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 yh(e){let t=this;this._clockViewModel=e,this._allShuttleRingTicks=[],this._dateFormatter=yh.defaultDateFormatter,this._timeFormatter=yh.defaultTimeFormatter,this.shuttleRingDragging=!1,this.snapToTicks=!1,Ce.track(this,["_allShuttleRingTicks","_dateFormatter","_timeFormatter","shuttleRingDragging","snapToTicks"]),this._sortedFilteredPositiveTicks=[],this.setShuttleRingTicks(yh.defaultTicks),this.timeLabel=void 0,Ce.defineProperty(this,"timeLabel",function(){return t._timeFormatter(t._clockViewModel.currentTime,t)}),this.dateLabel=void 0,Ce.defineProperty(this,"dateLabel",function(){return t._dateFormatter(t._clockViewModel.currentTime,t)}),this.multiplierLabel=void 0,Ce.defineProperty(this,"multiplierLabel",function(){let s=t._clockViewModel;if(s.clockStep===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,Ce.defineProperty(this,"shuttleRingAngle",{get:function(){return BIt(e.multiplier,t._allShuttleRingTicks,e)},set:function(s){s=Math.max(Math.min(s,A1),-A1);let a=t._allShuttleRingTicks,c=t._clockViewModel;if(c.clockStep=Fo.SYSTEM_CLOCK_MULTIPLIER,Math.abs(s)===A1){c.multiplier=s>0?a[a.length-1]:a[0];return}let d=OIt(s,a);if(t.snapToTicks)d=a[Rie(d,a)];else if(d!==0){let u=Math.abs(d);if(u>100){let h=u.toFixed(0).length-2,p=Math.pow(10,h);d=Math.round(d/p)*p|0}else u>tT?d=Math.round(d):u>1?d=+d.toFixed(1):u>0&&(d=+d.toFixed(2))}c.multiplier=d}}),this._canAnimate=void 0,Ce.defineProperty(this,"_canAnimate",function(){let s=t._clockViewModel,a=s.clockRange;if(t.shuttleRingDragging||a===ys.UNBOUNDED)return!0;let c=s.multiplier,d=s.currentTime,u=s.startTime,h=!1;if(a===ys.LOOP_STOP)h=Q.greaterThan(d,u)||d.equals(u)&&c>0;else{let p=s.stopTime;h=Q.greaterThan(d,u)&&Q.lessThan(d,p)||d.equals(u)&&c>0||d.equals(p)&&c<0}return h||(s.shouldAnimate=!1),h}),this._isSystemTimeAvailable=void 0,Ce.defineProperty(this,"_isSystemTimeAvailable",function(){let s=t._clockViewModel;if(s.clockRange===ys.UNBOUNDED)return!0;let c=s.systemTime;return Q.greaterThanOrEquals(c,s.startTime)&&Q.lessThanOrEquals(c,s.stopTime)}),this._isAnimating=void 0,Ce.defineProperty(this,"_isAnimating",function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)});let n=Gn(function(){let s=t._clockViewModel;s.shouldAnimate?s.shouldAnimate=!1:t._canAnimate&&(s.shouldAnimate=!0)});this._pauseViewModel=new $x(n,{toggled:Ce.computed(function(){return!t._isAnimating}),tooltip:"Pause"});let i=Gn(function(){let s=t._clockViewModel,a=s.multiplier;a>0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playReverseViewModel=new $x(i,{toggled:Ce.computed(function(){return t._isAnimating&&e.multiplier<0}),tooltip:"Play Reverse"});let o=Gn(function(){let s=t._clockViewModel,a=s.multiplier;a<0&&(s.multiplier=-a),s.shouldAnimate=!0});this._playForwardViewModel=new $x(o,{toggled:Ce.computed(function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==Fo.SYSTEM_CLOCK}),tooltip:"Play Forward"});let r=Gn(function(){t._clockViewModel.clockStep=Fo.SYSTEM_CLOCK},Ce.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new $x(r,{toggled:Ce.computed(function(){return e.clockStep===Fo.SYSTEM_CLOCK}),tooltip:Ce.computed(function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"})}),this._slower=Gn(function(){let s=t._clockViewModel,a=t._allShuttleRingTicks,c=s.multiplier,d=Rie(c,a)-1;d>=0&&(s.multiplier=a[d])}),this._faster=Gn(function(){let s=t._clockViewModel,a=t._allShuttleRingTicks,c=s.multiplier,d=Rie(c,a)+1;d<a.length&&(s.multiplier=a[d])})}yh.defaultDateFormatter=function(e,t){let n=Q.toGregorianDate(e);return`${DIt[n.month-1]} ${n.day} ${n.year}`};yh.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];yh.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`};yh.prototype.getShuttleRingTicks=function(){return this._sortedFilteredPositiveTicks.slice(0)};yh.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(jLe);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(yh.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}}});yh._maxShuttleRingAngle=A1;yh._realtimeShuttleRingAngle=tT;var _k=yh;var YKo=x(T(),1);var WKo=x(T(),1);function zIt(e){return function(t){let n=e._scene.pick(t.position);l(n)&&n.primitive instanceof Js&&(e.tileset=n.primitive),e.pickActive=!1}}function qLe(e,t){t?e._eventHandler.setInputAction(function(n){let i=e._scene.pick(n.endPosition);l(i)&&i.primitive instanceof Js&&(e.tileset=i.primitive)},Vn.MOUSE_MOVE):(e._eventHandler.removeInputAction(Vn.MOUSE_MOVE),e.picking=e.picking)}var HIt={maximumFractionDigits:3};function Sk(e){let t=e/1048576;return t<1?t.toLocaleString(void 0,HIt):Math.round(t).toLocaleString()}function Ak(e,t){if(!l(e))return"";let n=t?e._statisticsPerPass[er.PICK]:e._statisticsPerPass[er.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>${Sk(n.geometryByteLength)}</li><li><strong>Texture Memory (MB): </strong>${Sk(n.texturesByteLength)}</li><li><strong>Batch Table Memory (MB): </strong>${Sk(n.batchTableByteLength)}</li>`,i+="</ul>"),i}function $Le(){let e=vi.statistics;return`
<ul class="cesium-cesiumInspector-statistics">
<li><strong>Geometry Memory (MB): </strong>${Sk(e.geometryByteLength)}</li>
<li><strong>Texture Memory (MB): </strong>${Sk(e.texturesByteLength)}</li>
</ul>
`}var KIt=[{text:"Highlight",value:Cd.HIGHLIGHT},{text:"Replace",value:Cd.REPLACE},{text:"Mix",value:Cd.MIX}],QLe=new U(1,1,0,.4),JIt=new U,Bz=new U;function bc(e,t){let n=this,i=e.canvas;this._eventHandler=new Hu(i),this._scene=e,this._performanceContainer=t,this._canvas=i,this._performanceDisplay=new _g({container:t}),this._statisticsText="",this._pickStatisticsText="",this._resourceCacheStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.showResourceCacheStatistics=!1,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this.hasEnabledWireframe=!1,this._tileset=void 0,this._feature=void 0,this._tile=void 0,Ce.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_resourceCacheStatisticsText","_editorError","showPickStatistics","showStatistics","showResourceCacheStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile","_tileset","hasEnabledWireframe"]),this._properties=Ce.observable({}),this.properties=[],Ce.defineProperty(this,"properties",function(){let w=[],z=n._properties();for(let J in z)z.hasOwnProperty(J)&&w.push(J);return w});let o=Ce.observable();Ce.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return o()},set:function(w){o(w),l(n._tileset)&&(n._tileset.dynamicScreenSpaceError=w)}}),this.dynamicScreenSpaceError=!1;let r=Ce.observable();Ce.defineProperty(this,"colorBlendMode",{get:function(){return r()},set:function(w){r(w),l(n._tileset)&&(n._tileset.colorBlendMode=w,n._scene.requestRender())}}),this.colorBlendMode=Cd.HIGHLIGHT;let s=Ce.observable(),a=Ce.observable();Ce.defineProperty(this,"picking",{get:function(){return a()},set:function(w){a(w),w?n._eventHandler.setInputAction(function(z){let J=e.pick(z.endPosition);if(J instanceof Bs?(n.feature=J,n.tile=J.content.tile):l(J)&&l(J.content)?(n.feature=void 0,n.tile=J.content.tile):(n.feature=void 0,n.tile=void 0),!!l(n._tileset)){if(s&&l(J)&&l(J.content)){let ee;e.pickPositionSupported&&(ee=e.pickPosition(z.endPosition),l(ee)&&(n._tileset.debugPickPosition=ee)),n._tileset.debugPickedTile=J.content.tile}else n._tileset.debugPickedTile=void 0;n._scene.requestRender()}},Vn.MOUSE_MOVE):(n.feature=void 0,n.tile=void 0,n._eventHandler.removeInputAction(Vn.MOUSE_MOVE))}}),this.picking=!0;let c=Ce.observable();Ce.defineProperty(this,"colorize",{get:function(){return c()},set:function(w){c(w),l(n._tileset)&&(n._tileset.debugColorizeTiles=w,n._scene.requestRender())}}),this.colorize=!1;let d=Ce.observable();Ce.defineProperty(this,"wireframe",{get:function(){return d()},set:function(w){d(w),l(n._tileset)&&(n._tileset.debugWireframe=w,n._scene.requestRender())}}),this.wireframe=!1;let u=Ce.observable();Ce.defineProperty(this,"showBoundingVolumes",{get:function(){return u()},set:function(w){u(w),l(n._tileset)&&(n._tileset.debugShowBoundingVolume=w,n._scene.requestRender())}}),this.showBoundingVolumes=!1;let h=Ce.observable();Ce.defineProperty(this,"showContentBoundingVolumes",{get:function(){return h()},set:function(w){h(w),l(n._tileset)&&(n._tileset.debugShowContentBoundingVolume=w,n._scene.requestRender())}}),this.showContentBoundingVolumes=!1;let p=Ce.observable();Ce.defineProperty(this,"showRequestVolumes",{get:function(){return p()},set:function(w){p(w),l(n._tileset)&&(n._tileset.debugShowViewerRequestVolume=w,n._scene.requestRender())}}),this.showRequestVolumes=!1;let b=Ce.observable();Ce.defineProperty(this,"freezeFrame",{get:function(){return b()},set:function(w){b(w),l(n._tileset)&&(n._tileset.debugFreezeFrame=w,n._scene.debugShowFrustumPlanes=w,n._scene.requestRender())}}),this.freezeFrame=!1,Ce.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return s()},set:function(w){s(w),l(n._tileset)&&(n._tileset.debugPickedTileLabelOnly=w,n._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;let f=Ce.observable();Ce.defineProperty(this,"showGeometricError",{get:function(){return f()},set:function(w){f(w),l(n._tileset)&&(n._tileset.debugShowGeometricError=w,n._scene.requestRender())}}),this.showGeometricError=!1;let y=Ce.observable();Ce.defineProperty(this,"showRenderingStatistics",{get:function(){return y()},set:function(w){y(w),l(n._tileset)&&(n._tileset.debugShowRenderingStatistics=w,n._scene.requestRender())}}),this.showRenderingStatistics=!1;let _=Ce.observable();Ce.defineProperty(this,"showMemoryUsage",{get:function(){return _()},set:function(w){_(w),l(n._tileset)&&(n._tileset.debugShowMemoryUsage=w,n._scene.requestRender())}}),this.showMemoryUsage=!1;let S=Ce.observable();Ce.defineProperty(this,"showUrl",{get:function(){return S()},set:function(w){S(w),l(n._tileset)&&(n._tileset.debugShowUrl=w,n._scene.requestRender())}}),this.showUrl=!1;let A=Ce.observable();Ce.defineProperty(this,"maximumScreenSpaceError",{get:function(){return A()},set:function(w){w=Number(w),isNaN(w)||(A(w),l(n._tileset)&&(n._tileset.maximumScreenSpaceError=w))}}),this.maximumScreenSpaceError=16;let Z=Ce.observable();Ce.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return Z()},set:function(w){w=Number(w),isNaN(w)||(Z(w),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorDensity=w))}}),this.dynamicScreenSpaceErrorDensity=2e-4,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,Ce.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(Z(),1/6)},set:function(w){let z=Math.pow(w,6);Z(z),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorDensity=z)}});let V=Ce.observable();Ce.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return V()},set:function(w){w=Number(w),isNaN(w)||(V(w),l(n._tileset)&&(n._tileset.dynamicScreenSpaceErrorFactor=w))}}),this.dynamicScreenSpaceErrorFactor=24;let E=zIt(this),L=Ce.observable();Ce.defineProperty(this,"pickActive",{get:function(){return L()},set:function(w){L(w),w?n._eventHandler.setInputAction(E,Vn.LEFT_CLICK):n._eventHandler.removeInputAction(Vn.LEFT_CLICK)}});let v=Ce.observable();Ce.defineProperty(this,"pointCloudShading",{get:function(){return v()},set:function(w){v(w),l(n._tileset)&&(n._tileset.pointCloudShading.attenuation=w)}}),this.pointCloudShading=!1;let I=Ce.observable();Ce.defineProperty(this,"geometricErrorScale",{get:function(){return I()},set:function(w){w=Number(w),isNaN(w)||(I(w),l(n._tileset)&&(n._tileset.pointCloudShading.geometricErrorScale=w))}}),this.geometricErrorScale=1;let X=Ce.observable();Ce.defineProperty(this,"maximumAttenuation",{get:function(){return X()},set:function(w){w=Number(w),isNaN(w)||(X(w),l(n._tileset)&&(n._tileset.pointCloudShading.maximumAttenuation=w===0?void 0:w))}}),this.maximumAttenuation=0;let N=Ce.observable();Ce.defineProperty(this,"baseResolution",{get:function(){return N()},set:function(w){w=Number(w),isNaN(w)||(N(w),l(n._tileset)&&(n._tileset.pointCloudShading.baseResolution=w===0?void 0:w))}}),this.baseResolution=0;let g=Ce.observable();Ce.defineProperty(this,"eyeDomeLighting",{get:function(){return g()},set:function(w){g(w),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLighting=w)}}),this.eyeDomeLighting=!1;let C=Ce.observable();Ce.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return C()},set:function(w){w=Number(w),isNaN(w)||(C(w),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLightingStrength=w))}}),this.eyeDomeLightingStrength=1;let R=Ce.observable();Ce.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return R()},set:function(w){w=Number(w),isNaN(w)||(R(w),l(n._tileset)&&(n._tileset.pointCloudShading.eyeDomeLightingRadius=w))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;let G=Ce.observable();Ce.defineProperty(this,"skipLevelOfDetail",{get:function(){return G()},set:function(w){G(w),l(n._tileset)&&(n._tileset.skipLevelOfDetail=w)}}),this.skipLevelOfDetail=!0;let P=Ce.observable();Ce.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return P()},set:function(w){w=Number(w),isNaN(w)||(P(w),l(n._tileset)&&(n._tileset.skipScreenSpaceErrorFactor=w))}}),this.skipScreenSpaceErrorFactor=16;let Y=Ce.observable();Ce.defineProperty(this,"baseScreenSpaceError",{get:function(){return Y()},set:function(w){w=Number(w),isNaN(w)||(Y(w),l(n._tileset)&&(n._tileset.baseScreenSpaceError=w))}}),this.baseScreenSpaceError=1024;let O=Ce.observable();Ce.defineProperty(this,"skipLevels",{get:function(){return O()},set:function(w){w=Number(w),isNaN(w)||(O(w),l(n._tileset)&&(n._tileset.skipLevels=w))}}),this.skipLevels=1;let k=Ce.observable();Ce.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return k()},set:function(w){k(w),l(n._tileset)&&(n._tileset.immediatelyLoadDesiredLevelOfDetail=w)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;let D=Ce.observable();Ce.defineProperty(this,"loadSiblings",{get:function(){return D()},set:function(w){D(w),l(n._tileset)&&(n._tileset.loadSiblings=w)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=e.postRender.addEventListener(function(){n._update()}),l(this._tileset)||qLe(this,!0)}Object.defineProperties(bc.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 KIt}},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=Ak(e,!1),this._pickStatisticsText=Ak(e,!0),this._resourceCacheStatisticsText=$Le(),qLe(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,JIt):U.WHITE:t.color=Bz,this._scene.requestRender()),l(e)&&(U.clone(e.color,Bz),e.color=QLe,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()&&!Eie(t.content)&&(t.color=Bz,this._scene.requestRender()),l(e)&&!Eie(e.content)&&(U.clone(e.color,Bz),e.color=QLe,this._scene.requestRender()),this._tile=e}}});function Eie(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(!Eie(t[i]))return!1;return!0}return!1}bc.prototype.togglePickTileset=function(){this.pickActive=!this.pickActive};bc.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};bc.prototype.toggleTileset=function(){this.tilesetVisible=!this.tilesetVisible};bc.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};bc.prototype.toggleUpdate=function(){this.updateVisible=!this.updateVisible};bc.prototype.toggleLogging=function(){this.loggingVisible=!this.loggingVisible};bc.prototype.toggleStyle=function(){this.styleVisible=!this.styleVisible};bc.prototype.toggleTileDebugLabels=function(){this.tileDebugLabelsVisible=!this.tileDebugLabelsVisible};bc.prototype.toggleOptimization=function(){this.optimizationVisible=!this.optimizationVisible};bc.prototype.trimTilesCache=function(){l(this._tileset)&&this._tileset.trimLoadedTiles()};bc.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 Xb(JSON.parse(this.styleString)),this._shouldStyle=!0,this._scene.requestRender()}catch(t){this._editorError=t.toString()}this.feature=this._feature,this.tile=this._tile}};bc.prototype.styleEditorKeyPress=function(e,t){if(t.keyCode===9){t.preventDefault();let n=t.target,i=n.selectionStart,o=n.selectionEnd,r=o,a=n.value.slice(i,o).split(`
`),c=a.length,d;if(t.shiftKey)for(d=0;d<c;++d)a[d][0]===" "&&(a[d][1]===" "?(a[d]=a[d].substr(2),r-=2):(a[d]=a[d].substr(1),r-=1));else for(d=0;d<c;++d)a[d]=` ${a[d]}`,r+=2;let u=a.join(`
`);n.value=n.value.slice(0,i)+u+n.value.slice(o),n.selectionStart=i!==o?i:r,n.selectionEnd=r}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileStyle();return!0};bc.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=Ak(e,!1),this._pickStatisticsText=Ak(e,!0),this._resourceCacheStatisticsText=$Le())};bc.prototype.isDestroyed=function(){return!1};bc.prototype.destroy=function(){this._eventHandler.destroy(),this._removePostRenderEvent();let e=this;return this._definedProperties.forEach(function(t){Ce.getObservable(e,t).dispose()}),me(this)};bc.getStatistics=Ak;var Zk=bc;function zz(e,t){e=In(e);let n=document.createElement("div"),i=document.createElement("div");i.setAttribute("data-bind","visible: performance");let o=new Zk(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=qd.createSection,c=qd.createCheckbox,d=qd.createRangeInput,u=qd.createButton,h=a(s,"Tileset","tilesetVisible","toggleTileset"),p=a(s,"Display","displayVisible","toggleDisplay"),b=a(s,"Update","updateVisible","toggleUpdate"),f=a(s,"Logging","loggingVisible","toggleLogging"),y=a(s,"Tile Debug Labels","tileDebugLabelsVisible","toggleTileDebugLabels"),_=a(s,"Style","styleVisible","toggleStyle"),S=a(s,"Optimization","optimizationVisible","toggleOptimization"),A=document.createElement("div");A.className="field-group";let Z=document.createElement("label");Z.className="field-label",Z.appendChild(document.createTextNode("Properties: "));let V=document.createElement("div");V.setAttribute("data-bind","text: properties"),A.appendChild(Z),A.appendChild(V),h.appendChild(A),h.appendChild(u("Pick Tileset","togglePickTileset","pickActive")),h.appendChild(u("Trim Tiles Cache","trimTilesCache")),h.appendChild(c("Enable Picking","picking")),p.appendChild(c("Colorize","colorize"));let E=p.appendChild(c("Wireframe","wireframe","_tileset === undefined || hasEnabledWireframe")),L=document.createElement("p");L.setAttribute("data-bind","visible: _tileset !== undefined && !hasEnabledWireframe"),L.setAttribute("class","cesium-3DTilesInspector-disabledElementsInfo"),L.innerText="Set enableDebugWireframe to true in the tileset constructor to enable this option.",E.appendChild(L),p.appendChild(c("Bounding Volumes","showBoundingVolumes")),p.appendChild(c("Content Volumes","showContentBoundingVolumes")),p.appendChild(c("Request Volumes","showRequestVolumes")),p.appendChild(c("Point Cloud Shading","pointCloudShading"));let v=document.createElement("div");v.setAttribute("data-bind","visible: pointCloudShading"),v.appendChild(d("Geometric Error Scale","geometricErrorScale",0,2,.01)),v.appendChild(d("Maximum Attenuation","maximumAttenuation",0,32,1)),v.appendChild(d("Base Resolution","baseResolution",0,1,.01)),v.appendChild(c("Eye Dome Lighting (EDL)","eyeDomeLighting")),p.appendChild(v);let I=document.createElement("div");I.setAttribute("data-bind","visible: eyeDomeLighting"),I.appendChild(d("EDL Strength","eyeDomeLightingStrength",0,2,.1)),I.appendChild(d("EDL Radius","eyeDomeLightingRadius",0,4,.1)),v.appendChild(I),b.appendChild(c("Freeze Frame","freezeFrame")),b.appendChild(c("Dynamic Screen Space Error","dynamicScreenSpaceError"));let X=document.createElement("div");X.appendChild(d("Maximum Screen Space Error","maximumScreenSpaceError",0,128,1)),b.appendChild(X);let N=document.createElement("div");N.setAttribute("data-bind","visible: dynamicScreenSpaceError"),N.appendChild(d("Screen Space Error Density","dynamicScreenSpaceErrorDensitySliderValue",0,1,.005,"dynamicScreenSpaceErrorDensity")),N.appendChild(d("Screen Space Error Factor","dynamicScreenSpaceErrorFactor",1,32,.1)),b.appendChild(N),f.appendChild(c("Performance","performance")),f.appendChild(i),f.appendChild(c("Statistics","showStatistics"));let g=document.createElement("div");g.className="cesium-3dTilesInspector-statistics",g.setAttribute("data-bind","html: statisticsText, visible: showStatistics"),f.appendChild(g),f.appendChild(c("Pick Statistics","showPickStatistics"));let C=document.createElement("div");C.className="cesium-3dTilesInspector-statistics",C.setAttribute("data-bind","html: pickStatisticsText, visible: showPickStatistics"),f.appendChild(C),f.appendChild(c("Resource Cache Statistics","showResourceCacheStatistics"));let R=document.createElement("div");R.className="cesium-3dTilesInspector-statistics",R.setAttribute("data-bind","html: resourceCacheStatisticsText, visible: showResourceCacheStatistics"),f.appendChild(R);let G=document.createElement("div");_.appendChild(G),G.appendChild(document.createTextNode("Color Blend Mode: "));let P=document.createElement("select");P.setAttribute("data-bind",'options: colorBlendModes, optionsText: "text", optionsValue: "value", value: colorBlendMode'),G.appendChild(P);let Y=document.createElement("textarea");Y.setAttribute("data-bind","textInput: styleString, event: { keydown: styleEditorKeyPress }"),G.className="cesium-cesiumInspector-styleEditor",G.appendChild(Y);let O=u("Compile (Ctrl+Enter)","compileStyle");G.appendChild(O);let k=document.createElement("div");k.className="cesium-cesiumInspector-error",k.setAttribute("data-bind","text: editorError"),G.appendChild(k),y.appendChild(c("Show Picked Only","showOnlyPickedTileDebugLabel")),y.appendChild(c("Geometric Error","showGeometricError")),y.appendChild(c("Rendering Statistics","showRenderingStatistics")),y.appendChild(c("Memory Usage (MB)","showMemoryUsage")),y.appendChild(c("Url","showUrl")),S.appendChild(c("Skip Tile LODs","skipLevelOfDetail"));let D=document.createElement("div");D.appendChild(d("Skip SSE Factor","skipScreenSpaceErrorFactor",1,50,1)),S.appendChild(D);let w=document.createElement("div");w.appendChild(d("SSE before skipping LOD","baseScreenSpaceError",0,4096,1)),S.appendChild(w);let z=document.createElement("div");z.appendChild(d("Min. levels to skip","skipLevels",0,10,1)),S.appendChild(z),S.appendChild(c("Load only tiles that meet the max SSE.","immediatelyLoadDesiredLevelOfDetail")),S.appendChild(c("Load siblings of visible tiles","loadSiblings")),Ce.applyBindings(o,n)}Object.defineProperties(zz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});zz.prototype.isDestroyed=function(){return!1};zz.prototype.destroy=function(){return Ce.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),me(this)};var Ck=zz;var QKo=x(T(),1);var OKo=x(T(),1);function eWe(e){e=e??B.EMPTY_OBJECT;let t=e.globe,n=e.imageryProviderViewModels??B.EMPTY_ARRAY,i=e.terrainProviderViewModels??B.EMPTY_ARRAY;this._globe=t,this.imageryProviderViewModels=n.slice(0),this.terrainProviderViewModels=i.slice(0),this.dropDownVisible=!1,Ce.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);let o=Ce.getObservable(this,"imageryProviderViewModels"),r=Ce.pureComputed(function(){let h=o(),p={},b;for(b=0;b<h.length;b++){let _=h[b],S=_.category;l(p[S])?p[S].push(_):p[S]=[_]}let f=Object.keys(p),y=[];for(b=0;b<f.length;b++){let _=f[b];y.push({name:_,providers:p[_]})}return y});this._imageryProviders=r;let s=Ce.getObservable(this,"terrainProviderViewModels"),a=Ce.pureComputed(function(){let h=s(),p={},b;for(b=0;b<h.length;b++){let _=h[b],S=_.category;l(p[S])?p[S].push(_):p[S]=[_]}let f=Object.keys(p),y=[];for(b=0;b<f.length;b++){let _=f[b];y.push({name:_,providers:p[_]})}return y});this._terrainProviders=a,this.buttonTooltip=void 0,Ce.defineProperty(this,"buttonTooltip",function(){let h=this.selectedImagery,p=this.selectedTerrain,b=l(h)?h.name:void 0,f=l(p)?p.name:void 0;return l(b)&&l(f)?`${b}
${f}`:l(b)?b:f}),this.buttonImageUrl=void 0,Ce.defineProperty(this,"buttonImageUrl",function(){let h=this.selectedImagery;if(l(h))return h.iconUrl}),this.selectedImagery=void 0;let c=Ce.observable();this._currentImageryLayers=[],Ce.defineProperty(this,"selectedImagery",{get:function(){return c()},set:function(h){if(c()===h){this.dropDownVisible=!1;return}let p,b=this._currentImageryLayers,f=b.length,y=this._globe.imageryLayers,_=!1;for(p=0;p<f;p++){let S=y.length;for(let A=0;A<S;A++){let Z=y.get(A);if(Z===b[p]){y.remove(Z),_=!0;break}}}if(l(h)){let S=h.creationCommand();if(Array.isArray(S)){let A=S.length;for(this._currentImageryLayers=[],p=A-1;p>=0;p--){let Z=ms.fromProviderAsync(S[p]);y.add(Z,0),this._currentImageryLayers.push(Z)}}else{this._currentImageryLayers=[];let A=ms.fromProviderAsync(S);if(A.name=h.name,_)y.add(A,0);else{let Z=y.get(0);l(Z)&&y.remove(Z),y.add(A,0)}this._currentImageryLayers.push(A)}}c(h),this.dropDownVisible=!1}}),this.selectedTerrain=void 0;let d=Ce.observable();Ce.defineProperty(this,"selectedTerrain",{get:function(){return d()},set:function(h){if(d()===h){this.dropDownVisible=!1;return}let p;if(l(h)&&(p=h.creationCommand()),l(p)&&!l(p.then))this._globe.depthTestAgainstTerrain=!(p instanceof s0),this._globe.terrainProvider=p;else if(l(p)){let b=!1,f=this._globe.terrainProviderChanged.addEventListener(()=>{b=!0,f()}),_=new lk(p).readyEvent.addEventListener(S=>{b||(this._globe.depthTestAgainstTerrain=!(S instanceof s0),this._globe.terrainProvider=S,_())})}d(h),this.dropDownVisible=!1}});let u=this;this._toggleDropDown=Gn(function(){u.dropDownVisible=!u.dropDownVisible}),this.selectedImagery=e.selectedImageryProviderViewModel??n[0],this.selectedTerrain=e.selectedTerrainProviderViewModel}Object.defineProperties(eWe.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}});var Vk=eWe;function Hz(e,t){e=In(e);let n=new Vk(t),i=document.createElement("button");i.type="button",i.className="cesium-button cesium-toolbar-button",i.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(i);let o=document.createElement("img");o.setAttribute("draggable","false"),o.className="cesium-baseLayerPicker-selected",o.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),i.appendChild(o);let r=document.createElement("div");r.className="cesium-baseLayerPicker-dropDown",r.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(r);let s=document.createElement("div");s.className="cesium-baseLayerPicker-sectionTitle",s.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),s.innerHTML="Imagery",r.appendChild(s);let a=document.createElement("div");a.className="cesium-baseLayerPicker-section",a.setAttribute("data-bind","foreach: _imageryProviders"),r.appendChild(a);let c=document.createElement("div");c.className="cesium-baseLayerPicker-category",a.appendChild(c);let d=document.createElement("div");d.className="cesium-baseLayerPicker-categoryTitle",d.setAttribute("data-bind","text: name"),c.appendChild(d);let u=document.createElement("div");u.className="cesium-baseLayerPicker-choices",u.setAttribute("data-bind","foreach: providers"),c.appendChild(u);let h=document.createElement("div");h.className="cesium-baseLayerPicker-item",h.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedImagery = $data; }'),u.appendChild(h);let p=document.createElement("img");p.className="cesium-baseLayerPicker-itemIcon",p.setAttribute("data-bind","attr: { src: iconUrl }"),p.setAttribute("draggable","false"),h.appendChild(p);let b=document.createElement("div");b.className="cesium-baseLayerPicker-itemLabel",b.setAttribute("data-bind","text: name"),h.appendChild(b);let f=document.createElement("div");f.className="cesium-baseLayerPicker-sectionTitle",f.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),f.innerHTML="Terrain",r.appendChild(f);let y=document.createElement("div");y.className="cesium-baseLayerPicker-section",y.setAttribute("data-bind","foreach: _terrainProviders"),r.appendChild(y);let _=document.createElement("div");_.className="cesium-baseLayerPicker-category",y.appendChild(_);let S=document.createElement("div");S.className="cesium-baseLayerPicker-categoryTitle",S.setAttribute("data-bind","text: name"),_.appendChild(S);let A=document.createElement("div");A.className="cesium-baseLayerPicker-choices",A.setAttribute("data-bind","foreach: providers"),_.appendChild(A);let Z=document.createElement("div");Z.className="cesium-baseLayerPicker-item",Z.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),A.appendChild(Z);let V=document.createElement("img");V.className="cesium-baseLayerPicker-itemIcon",V.setAttribute("data-bind","attr: { src: iconUrl }"),V.setAttribute("draggable","false"),Z.appendChild(V);let E=document.createElement("div");E.className="cesium-baseLayerPicker-itemLabel",E.setAttribute("data-bind","text: name"),Z.appendChild(E),Ce.applyBindings(n,i),Ce.applyBindings(n,r),this._viewModel=n,this._container=e,this._element=i,this._dropPanel=r,this._closeDropDown=function(L){i.contains(L.target)||r.contains(L.target)||(n.dropDownVisible=!1)},an.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(Hz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Hz.prototype.isDestroyed=function(){return!1};Hz.prototype.destroy=function(){return an.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Ce.cleanNode(this._element),Ce.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),me(this)};var Rk=Hz;var iJo=x(T(),1);function tWe(e){let t=e.creationFunction;l(t.canExecute)||(t=Gn(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=e.category??"",Ce.track(this,["name","tooltip","iconUrl"])}Object.defineProperties(tWe.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});var nr=tWe;var aJo=x(T(),1);function jIt(){let e=[],t=devicePixelRatio>=2;return e.push(new nr({name:"Bing Maps Aerial",iconUrl:Kt("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Eb({style:Rb.AERIAL})}})),e.push(new nr({name:"Bing Maps Aerial with Labels",iconUrl:Kt("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Eb({style:Rb.AERIAL_WITH_LABELS})}})),e.push(new nr({name:"Bing Maps Roads",iconUrl:Kt("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Eb({style:Rb.ROAD})}})),e.push(new nr({name:"ArcGIS World Imagery",iconUrl:Kt("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png"),tooltip:`ArcGIS World Imagery provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide. The map includes 15m TerraColor imagery at small and mid-scales (~1:591M down to ~1:288k) for the world. The map features Maxar imagery at 0.3m resolution for select metropolitan areas around the world, 0.5m resolution across the United States and parts of Western Europe, and 1m resolution imagery across the rest of the world. In addition to commercial sources, the World Imagery map features high-resolution aerial photography contributed by the GIS User Community. This imagery ranges from 0.3m to 0.03m resolution (down to ~1:280 nin select communities). For more information on this map, including the terms of use, visit us online at
https://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9`,category:"Other",creationFunction:function(){return Cb.fromBasemapType(tf.SATELLITE,{enablePickFeatures:!1})}})),e.push(new nr({name:"ArcGIS World Hillshade",iconUrl:Kt("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png"),tooltip:`ArcGIS World Hillshade map portrays elevation as an artistic hillshade. This map is designed to be used as a backdrop for topographical, soil, hydro, landcover or other outdoor recreational maps. The map was compiled from a variety of sources from several data providers. The basemap has global coverage down to a scale of ~1:72k. In select areas of the United States and Europe, coverage is available down to ~1:9k. For more information on this map, including the terms of use, visit us online at
https://www.arcgis.com/home/item.html?id=1b243539f4514b6ba35e7d995890db1d`,category:"Other",creationFunction:function(){return Cb.fromBasemapType(tf.HILLSHADE,{enablePickFeatures:!1})}})),e.push(new nr({name:"Esri World Ocean",iconUrl:Kt("Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png"),tooltip:`ArcGIS World Ocean map is designed to be used as a base map by marine GIS professionals and as a reference map by anyone interested in ocean data. The base map features marine bathymetry. Land features include inland waters and roads overlaid on land cover and shaded relief imagery. The map was compiled from a variety of best available sources from several data providers, including General Bathymetric Chart of the Oceans GEBCO_08 Grid, National Oceanic and Atmospheric Administration (NOAA), and National Geographic, Garmin, HERE, Geonames.org, and Esri, and various other contributors. The base map currently provides coverage for the world down to a scale of ~1:577k, and coverage down to 1:72k in US coastal areas, and various other areas. Coverage down to ~ 1:9k is available limited areas based on regional hydrographic survey data. The base map was designed and developed by Esri. For more information on this map, including our terms of use, visit us online at
https://www.arcgis.com/home/item.html?id=1e126e7520f9466c9ca28b8f28b5e500`,category:"Other",creationFunction:function(){return Cb.fromBasemapType(tf.OCEANS,{enablePickFeatures:!1})}})),e.push(new nr({name:"Open\xADStreet\xADMap",iconUrl:Kt("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:`OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.
http://www.openstreetmap.org`,category:"Other",creationFunction:function(){return new Yg({url:"https://tile.openstreetmap.org/"})}})),e.push(new nr({name:"Stadia x Stamen Watercolor",iconUrl:Kt("Widgets/Images/ImageryProviders/stamenWatercolor.png"),tooltip:`Based on the original basemaps created for the Knight Foundation and reminiscent of hand drawn maps, the watercolor maps from Stamen Design apply raster effect area washes and organic edges over a paper texture to add warm pop to any map.
https://docs.stadiamaps.com/map-styles/stamen-watercolor/`,category:"Other",creationFunction:function(){return new Yg({url:"https://tiles.stadiamaps.com/tiles/stamen_watercolor/",fileExtension:"jpg",credit:`&copy; <a href="https://stamen.com/" target="_blank">Stamen Design</a>
&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
&copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new nr({name:"Stadia x Stamen Toner",iconUrl:Kt("Widgets/Images/ImageryProviders/stamenToner.png"),tooltip:`Based on the original basemaps created for the Knight Foundation and the most popular of the excellent styles from Stamen Design, these high-contrast B+W (black and white) maps are the perfect backdrop for your colorful and eye-catching overlays.
https://docs.stadiamaps.com/map-styles/stamen-toner/`,category:"Other",creationFunction:function(){return new Yg({url:"https://tiles.stadiamaps.com/tiles/stamen_toner/",retinaTiles:t,credit:`&copy; <a href="https://stamen.com/" target="_blank">Stamen Design</a>
&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
&copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new nr({name:"Stadia Alidade Smooth",iconUrl:Kt("Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png"),tooltip:`Stadia's custom Alidade Smooth style is designed for maps that use a lot of markers or overlays. It features a muted color scheme and fewer points of interest to allow your added data to shine.
https://docs.stadiamaps.com/map-styles/alidade-smooth/`,category:"Other",creationFunction:function(){return new Yg({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth/",retinaTiles:t,credit:`&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
&copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new nr({name:"Stadia Alidade Smooth Dark",iconUrl:Kt("Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png"),tooltip:`Stadia Alidade Smooth Dark, like its lighter cousin, is also designed to stay out of the way. It just flips the dark mode switch on the color scheme. With the lights out, your data can now literally shine.
https://docs.stadiamaps.com/map-styles/alidade-smooth-dark/`,category:"Other",creationFunction:function(){return new Yg({url:"https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/",retinaTiles:t,credit:`&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>
&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>
&copy; <a href="https://www.openstreetmap.org/about/" target="_blank">OpenStreetMap contributors</a>`})}})),e.push(new nr({name:"Sentinel-2",iconUrl:Kt("Widgets/Images/ImageryProviders/sentinel-2.png"),tooltip:"Sentinel-2 cloudless by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2016 and 2017).",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3954)}})),e.push(new nr({name:"Blue Marble",iconUrl:Kt("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3845)}})),e.push(new nr({name:"Earth at night",iconUrl:Kt("Widgets/Images/ImageryProviders/earthAtNight.png"),tooltip:"The Earth at night, also known as The Black Marble, is a 500 meter resolution global composite imagery layer released by NASA.",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3812)}})),e.push(new nr({name:"Natural Earth\xA0II",iconUrl:Kt("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:`Natural Earth II, darkened for contrast.
http://www.naturalearthdata.com/`,category:"Cesium ion",creationFunction:function(){return wy.fromUrl(Kt("Assets/Textures/NaturalEarthII"))}})),e.push(new nr({name:"Google Maps Satellite",iconUrl:Kt("Widgets/Images/ImageryProviders/googleSatellite.png"),tooltip:"Imagery from Google Maps",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3830182)}})),e.push(new nr({name:"Google Maps Satellite with Labels",iconUrl:Kt("Widgets/Images/ImageryProviders/googleSatelliteLabels.png"),tooltip:"Imagery with place labels from Google Maps",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3830183)}})),e.push(new nr({name:"Google Maps Roadmap",iconUrl:Kt("Widgets/Images/ImageryProviders/googleRoadmap.png"),tooltip:"Labeled roads and other features on a base landscape from Google Maps",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3830184)}})),e.push(new nr({name:"Google Maps Contour",iconUrl:Kt("Widgets/Images/ImageryProviders/googleContour.png"),tooltip:"Hillshade mapping, contour lines, natural features (roadmap features hidden) from Google Maps",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3830186)}})),e.push(new nr({name:"Azure Maps Aerial",iconUrl:Kt("Widgets/Images/ImageryProviders/azureAerial.png"),tooltip:"Imagery from Azure Maps",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3891168)}})),e.push(new nr({name:"Azure Maps Roads",iconUrl:Kt("Widgets/Images/ImageryProviders/azureRoads.png"),tooltip:"Labeled roads and other features on a base landscape from Azure Maps",category:"Cesium ion",creationFunction:function(){return Bl.fromAssetId(3891169)}})),e}var Ek=jIt;var uJo=x(T(),1);function QIt(){let e=[];return e.push(new nr({name:"WGS84 Ellipsoid",iconUrl:Kt("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"Cesium ion",creationFunction:function(){return new s0({ellipsoid:ie.WGS84})}})),e.push(new nr({name:"Cesium World Terrain",iconUrl:Kt("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 YA({requestWaterMask:!0,requestVertexNormals:!0})}})),e}var Gk=QIt;var CJo=x(T(),1);var gJo=x(T(),1);function qIt(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 Gie(e,t,n){let i=Math.min(n,t);return i=Math.max(i,e),i}var $It=new gn,ePt=new m;function Lk(e,t){let n=this,i=e.canvas,o=new Hu(i);this._eventHandler=o,this._scene=e,this._canvas=i,this._primitive=void 0,this._tile=void 0,this._modelMatrixPrimitive=void 0,this._performanceDisplay=void 0,this._performanceContainer=t;let r=this._scene.globe;r.depthTestAgainstTerrain=!0,this.frustums=!1,this.frustumPlanes=!1,this.performance=!1,this.shaderCacheText="",this.primitiveBoundingSphere=!1,this.primitiveReferenceFrame=!1,this.filterPrimitive=!1,this.tileBoundingSphere=!1,this.filterTile=!1,this.wireframe=!1,this.depthFrustum=1,this._numberOfFrustums=1,this.suspendUpdates=!1,this.tileCoordinates=!1,this.frustumStatisticText=!1,this.tileText="",this.hasPickedPrimitive=!1,this.hasPickedTile=!1,this.pickPrimitiveActive=!1,this.pickTileActive=!1,this.dropDownVisible=!0,this.generalVisible=!0,this.primitivesVisible=!1,this.terrainVisible=!1,this.depthFrustumText="",Ce.track(this,["frustums","frustumPlanes","performance","shaderCacheText","primitiveBoundingSphere","primitiveReferenceFrame","filterPrimitive","tileBoundingSphere","filterTile","wireframe","depthFrustum","suspendUpdates","tileCoordinates","frustumStatisticText","tileText","hasPickedPrimitive","hasPickedTile","pickPrimitiveActive","pickTileActive","dropDownVisible","generalVisible","primitivesVisible","terrainVisible","depthFrustumText"]),this._toggleDropDown=Gn(function(){n.dropDownVisible=!n.dropDownVisible}),this._toggleGeneral=Gn(function(){n.generalVisible=!n.generalVisible}),this._togglePrimitives=Gn(function(){n.primitivesVisible=!n.primitivesVisible}),this._toggleTerrain=Gn(function(){n.terrainVisible=!n.terrainVisible}),this._frustumsSubscription=Ce.getObservable(this,"frustums").subscribe(function(d){n._scene.debugShowFrustums=d,n._scene.requestRender()}),this._frustumPlanesSubscription=Ce.getObservable(this,"frustumPlanes").subscribe(function(d){n._scene.debugShowFrustumPlanes=d,n._scene.requestRender()}),this._performanceSubscription=Ce.getObservable(this,"performance").subscribe(function(d){d?n._performanceDisplay=new _g({container:n._performanceContainer}):n._performanceContainer.innerHTML=""}),this._showPrimitiveBoundingSphere=Gn(function(){return n._primitive.debugShowBoundingVolume=n.primitiveBoundingSphere,n._scene.requestRender(),!0}),this._primitiveBoundingSphereSubscription=Ce.getObservable(this,"primitiveBoundingSphere").subscribe(function(){n._showPrimitiveBoundingSphere()}),this._showPrimitiveReferenceFrame=Gn(function(){if(n.primitiveReferenceFrame){let d=n._primitive.modelMatrix;n._modelMatrixPrimitive=new H9({modelMatrix:d}),n._scene.primitives.add(n._modelMatrixPrimitive)}else l(n._modelMatrixPrimitive)&&(n._scene.primitives.remove(n._modelMatrixPrimitive),n._modelMatrixPrimitive=void 0);return n._scene.requestRender(),!0}),this._primitiveReferenceFrameSubscription=Ce.getObservable(this,"primitiveReferenceFrame").subscribe(function(){n._showPrimitiveReferenceFrame()}),this._doFilterPrimitive=Gn(function(){return n.filterPrimitive?n._scene.debugCommandFilter=function(d){return l(n._modelMatrixPrimitive)&&d.owner===n._modelMatrixPrimitive._primitive?!0:l(n._primitive)?d.owner===n._primitive||d.owner===n._primitive._billboardCollection||d.owner.primitive===n._primitive:!1}:n._scene.debugCommandFilter=void 0,!0}),this._filterPrimitiveSubscription=Ce.getObservable(this,"filterPrimitive").subscribe(function(){n._doFilterPrimitive(),n._scene.requestRender()}),this._wireframeSubscription=Ce.getObservable(this,"wireframe").subscribe(function(d){r._surface.tileProvider._debug.wireframe=d,n._scene.requestRender()}),this._depthFrustumSubscription=Ce.getObservable(this,"depthFrustum").subscribe(function(d){n._scene.debugShowDepthFrustum=d,n._scene.requestRender()}),this._incrementDepthFrustum=Gn(function(){let d=n.depthFrustum+1;return n.depthFrustum=Gie(1,n._numberOfFrustums,d),n._scene.requestRender(),!0}),this._decrementDepthFrustum=Gn(function(){let d=n.depthFrustum-1;return n.depthFrustum=Gie(1,n._numberOfFrustums,d),n._scene.requestRender(),!0}),this._suspendUpdatesSubscription=Ce.getObservable(this,"suspendUpdates").subscribe(function(d){r._surface._debug.suspendLodUpdate=d,d||(n.filterTile=!1)});let s;this._showTileCoordinates=Gn(function(){return n.tileCoordinates&&!l(s)?s=e.imageryLayers.addImageryProvider(new uk({tilingScheme:e.terrainProvider.tilingScheme})):!n.tileCoordinates&&l(s)&&(e.imageryLayers.remove(s),s=void 0),!0}),this._tileCoordinatesSubscription=Ce.getObservable(this,"tileCoordinates").subscribe(function(){n._showTileCoordinates(),n._scene.requestRender()}),this._tileBoundingSphereSubscription=Ce.getObservable(this,"tileBoundingSphere").subscribe(function(){n._showTileBoundingSphere(),n._scene.requestRender()}),this._showTileBoundingSphere=Gn(function(){return n.tileBoundingSphere?r._surface.tileProvider._debug.boundingSphereTile=n._tile:r._surface.tileProvider._debug.boundingSphereTile=void 0,n._scene.requestRender(),!0}),this._doFilterTile=Gn(function(){return n.filterTile?(n.suspendUpdates=!0,r._surface._tilesToRender=[],l(n._tile)&&n._tile.renderable&&r._surface._tilesToRender.push(n._tile)):n.suspendUpdates=!1,!0}),this._filterTileSubscription=Ce.getObservable(this,"filterTile").subscribe(function(){n.doFilterTile(),n._scene.requestRender()});function a(d){let u=n._scene.pick({x:d.position.x,y:d.position.y});l(u)&&(n.primitive=l(u.collection)?u.collection:u.primitive),n._scene.requestRender(),n.pickPrimitiveActive=!1}this._pickPrimitive=Gn(function(){n.pickPrimitiveActive=!n.pickPrimitiveActive}),this._pickPrimitiveActiveSubscription=Ce.getObservable(this,"pickPrimitiveActive").subscribe(function(d){d?o.setInputAction(a,Vn.LEFT_CLICK):o.removeInputAction(Vn.LEFT_CLICK)});function c(d){let u,h=r.ellipsoid,p=n._scene.camera.getPickRay(d.position,$It),b=r.pick(p,n._scene,ePt);if(l(b)){let f=h.cartesianToCartographic(b),y=r._surface.tileProvider._tilesToRenderByTextureCount;for(let _=0;!u&&_<y.length;++_){let S=y[_];if(l(S))for(let A=0;!u&&A<S.length;++A){let Z=S[A];ae.contains(Z.rectangle,f)&&(u=Z)}}}n.tile=u,n.pickTileActive=!1}this._pickTile=Gn(function(){n.pickTileActive=!n.pickTileActive}),this._pickTileActiveSubscription=Ce.getObservable(this,"pickTileActive").subscribe(function(d){d?o.setInputAction(c,Vn.LEFT_CLICK):o.removeInputAction(Vn.LEFT_CLICK)}),this._removePostRenderEvent=e.postRender.addEventListener(function(){n._update()})}Object.defineProperties(Lk.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 Gn(function(){e.tile=e.tile.parent})}},selectNW:{get:function(){let e=this;return Gn(function(){e.tile=e.tile.northwestChild})}},selectNE:{get:function(){let e=this;return Gn(function(){e.tile=e.tile.northeastChild})}},selectSW:{get:function(){let e=this;return Gn(function(){e.tile=e.tile.southwestChild})}},selectSE:{get:function(){let e=this;return Gn(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}}});Lk.prototype._update=function(){this.frustums&&(this.frustumStatisticText=qIt(this._scene.debugFrustumStatistics));let e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=Gie(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}`};Lk.prototype.isDestroyed=function(){return!1};Lk.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(),me(this)};var Wk=Lk;function Kz(e,t){e=In(e);let n=document.createElement("div"),i=new Wk(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=qd.createSection,c=qd.createCheckbox,d=a(s,"General","generalVisible","toggleGeneral"),u=c("Show Frustums","frustums"),h=document.createElement("div");h.className="cesium-cesiumInspector-frustumStatistics",h.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),u.appendChild(h),d.appendChild(u),d.appendChild(c("Show Frustum Planes","frustumPlanes")),d.appendChild(c("Performance Display","performance")),n.className="cesium-cesiumInspector-performanceDisplay",d.appendChild(n);let p=document.createElement("div");p.className="cesium-cesiumInspector-shaderCache",p.setAttribute("data-bind","html: shaderCacheText"),d.appendChild(p);let b=document.createElement("div");d.appendChild(b);let f=document.createElement("span");f.setAttribute("data-bind",'html: "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Frustum:"'),b.appendChild(f);let y=document.createElement("span");y.setAttribute("data-bind","text: depthFrustumText"),b.appendChild(y);let _=document.createElement("input");_.type="button",_.value="-",_.className="cesium-cesiumInspector-pickButton",_.setAttribute("data-bind","click: decrementDepthFrustum"),b.appendChild(_);let S=document.createElement("input");S.type="button",S.value="+",S.className="cesium-cesiumInspector-pickButton",S.setAttribute("data-bind","click: incrementDepthFrustum"),b.appendChild(S);let A=a(s,"Primitives","primitivesVisible","togglePrimitives"),Z=document.createElement("div");Z.className="cesium-cesiumInspector-pickSection",A.appendChild(Z);let V=document.createElement("input");V.type="button",V.value="Pick a primitive",V.className="cesium-cesiumInspector-pickButton",V.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');let E=document.createElement("div");E.className="cesium-cesiumInspector-center",E.appendChild(V),Z.appendChild(E),Z.appendChild(c("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),Z.appendChild(c("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=c("Show only selected","filterPrimitive","hasPickedPrimitive"),Z.appendChild(this._primitiveOnly);let L=a(s,"Terrain","terrainVisible","toggleTerrain"),v=document.createElement("div");v.className="cesium-cesiumInspector-pickSection",L.appendChild(v);let I=document.createElement("input");I.type="button",I.value="Pick a tile",I.className="cesium-cesiumInspector-pickButton",I.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),E=document.createElement("div"),E.appendChild(I),E.className="cesium-cesiumInspector-center",v.appendChild(E);let X=document.createElement("div");v.appendChild(X);let N=document.createElement("input");N.type="button",N.value="Parent",N.className="cesium-cesiumInspector-pickButton",N.setAttribute("data-bind","click: selectParent");let g=document.createElement("input");g.type="button",g.value="NW",g.className="cesium-cesiumInspector-pickButton",g.setAttribute("data-bind","click: selectNW");let C=document.createElement("input");C.type="button",C.value="NE",C.className="cesium-cesiumInspector-pickButton",C.setAttribute("data-bind","click: selectNE");let R=document.createElement("input");R.type="button",R.value="SW",R.className="cesium-cesiumInspector-pickButton",R.setAttribute("data-bind","click: selectSW");let G=document.createElement("input");G.type="button",G.value="SE",G.className="cesium-cesiumInspector-pickButton",G.setAttribute("data-bind","click: selectSE");let P=document.createElement("div");P.className="cesium-cesiumInspector-tileText",X.className="cesium-cesiumInspector-frustumStatistics",X.appendChild(P),X.setAttribute("data-bind","visible: hasPickedTile"),P.setAttribute("data-bind","html: tileText");let Y=document.createElement("div");Y.className="cesium-cesiumInspector-relativeText",Y.textContent="Select relative:",X.appendChild(Y);let O=document.createElement("table"),k=document.createElement("tr"),D=document.createElement("tr"),w=document.createElement("td");w.appendChild(N);let z=document.createElement("td");z.appendChild(g);let J=document.createElement("td");J.appendChild(C),k.appendChild(w),k.appendChild(z),k.appendChild(J);let ee=document.createElement("td"),H=document.createElement("td");H.appendChild(R);let te=document.createElement("td");te.appendChild(G),D.appendChild(ee),D.appendChild(H),D.appendChild(te),O.appendChild(k),O.appendChild(D),X.appendChild(O),v.appendChild(c("Show bounding volume","tileBoundingSphere","hasPickedTile")),v.appendChild(c("Show only selected","filterTile","hasPickedTile")),L.appendChild(c("Wireframe","wireframe")),L.appendChild(c("Suspend LOD update","suspendUpdates")),L.appendChild(c("Show tile coordinates","tileCoordinates")),Ce.applyBindings(i,this._element)}Object.defineProperties(Kz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});Kz.prototype.isDestroyed=function(){return!1};Kz.prototype.destroy=function(){return Ce.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),me(this)};var vk=Kz;var YJo=x(T(),1);var WJo=x(T(),1);function Jz(e,t){l(t)||(t=document.body),t=In(t);let n=this,i=Ce.observable(Ur.fullscreen),o=Ce.observable(Ur.enabled),r=t.ownerDocument;this.isFullscreen=void 0,Ce.defineProperty(this,"isFullscreen",{get:function(){return i()}}),this.isFullscreenEnabled=void 0,Ce.defineProperty(this,"isFullscreenEnabled",{get:function(){return o()},set:function(s){o(s&&Ur.enabled)}}),this.tooltip=void 0,Ce.defineProperty(this,"tooltip",function(){return this.isFullscreenEnabled?i()?"Exit full screen":"Full screen":"Full screen unavailable"}),this._command=Gn(function(){Ur.fullscreen?Ur.exitFullscreen():Ur.requestFullscreen(n._fullscreenElement)},Ce.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=In(e)??r.body,this._callback=function(){i(Ur.fullscreen)},r.addEventListener(Ur.changeEventName,this._callback)}Object.defineProperties(Jz.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){this._fullscreenElement=e}},command:{get:function(){return this._command}}});Jz.prototype.isDestroyed=function(){return!1};Jz.prototype.destroy=function(){document.removeEventListener(Ur.changeEventName,this._callback),me(this)};var Fk=Jz;var tPt="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",nPt="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 jz(e,t){e=In(e);let n=new Fk(t,e);n._exitFullScreenPath=nPt,n._enterFullScreenPath=tPt;let i=document.createElement("button");i.type="button",i.className="cesium-button cesium-fullscreenButton",i.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(i),Ce.applyBindings(n,i),this._container=e,this._viewModel=n,this._element=i}Object.defineProperties(jz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});jz.prototype.isDestroyed=function(){return!1};jz.prototype.destroy=function(){return this._viewModel.destroy(),Ce.cleanNode(this._element),this._container.removeChild(this._element),me(this)};var Ik=jz;var QJo=x(T(),1);var OJo=x(T(),1);var nWe=1e3;function xh(e){l(e.geocoderServices)?this._geocoderServices=e.geocoderServices:this._geocoderServices=[new XA({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=oWe,this._handleArrowUp=iWe;let t=this;this._suggestionsVisible=Ce.pureComputed(function(){let o=Ce.getObservable(t,"_suggestions")().length>0,r=Ce.getObservable(t,"_showSuggestions")();return o&&r}),this._searchCommand=Gn(function(i){if(i=i??Jx.SEARCH,t._focusTextbox=!1,l(t._selectedSuggestion))return t.activateSuggestion(t._selectedSuggestion),!1;if(t.hideSuggestions(),t.isSearchInProgress)cPt(t);else return sPt(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?iWe(t):r?oWe(t):a&&t._searchCommand(),!0},this.activateSuggestion=function(i){t.hideSuggestions(),t._searchText=i.displayName;let o=i.destination;aWe(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??xh.flyToDestination,this._focusTextbox=!1,Ce.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);let n=Ce.getObservable(this,"_searchText");n.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=n.subscribe(function(){xh._updateSearchSuggestions(t)}),this.isSearchInProgress=void 0,Ce.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,Ce.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(i){this._searchText=i}}),this.flightDuration=void 0,Ce.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(i){this._flightDuration=i}})}Object.defineProperties(xh.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}}});xh.prototype.destroy=function(){this._suggestionSubscription.dispose()};function iWe(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],xh._adjustSuggestionsScroll(e,n)}function oWe(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],xh._adjustSuggestionsScroll(e,i)}function iPt(e,t){let n=l(t)?t.availability:void 0;return l(n)?HS(t,[e]).then(function(i){return e=i[0],e.height+=nWe,e}):(e.height+=nWe,Promise.resolve(e))}function oPt(e,t){let n=e._scene,i=n.ellipsoid,o=n.camera,r=n.terrainProvider,s=t,a;return t instanceof ae?W.equalsEpsilon(t.south,t.north,W.EPSILON7)&&W.equalsEpsilon(t.east,t.west,W.EPSILON7)?t=ae.center(t):a=KS(t,n):t=i.cartesianToCartographic(t),l(a)||(a=iPt(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 rPt(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 sPt(e,t,n){let i=e._searchText;if(sWe(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 rPt(t[o],i,n),l(r)&&r.state==="fulfilled"&&r.value.length>0)break}if(e._wasGeocodeCancelled)return;e._isSearchInProgress=!1,Wie(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=rWe(e,l1.getCreditsFromResult(s[0]));l(a)||Lie(e,t[o].credit);return}e._searchText=`${i} (not found)`}function Lie(e,t){l(t)&&!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&(e._scene.frameState.creditDisplay.addStaticCredit(t),e._previousCredits.push(t))}function rWe(e,t){return l(t)&&t.forEach(n=>Lie(e,n)),t}function Wie(e){!e._scene.isDestroyed()&&!e._scene.frameState.creditDisplay.isDestroyed()&&e._previousCredits.forEach(t=>{e._scene.frameState.creditDisplay.removeStaticCredit(t)}),e._previousCredits.length=0}function aPt(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 cPt(e){e._isSearchInProgress&&(e._isSearchInProgress=!1,e._wasGeocodeCancelled=!0)}function sWe(e){return/^\s*$/.test(e)}function aWe(e){Ce.getObservable(e,"_suggestions").removeAll()}async function lPt(e){if(!e.autoComplete)return;let t=e._searchText;if(aWe(e),Wie(e),!sWe(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=l1.getCreditsFromResult(r);o=o&&!l(s),rWe(e,s)}),o&&Lie(e,n.credit)}if(e._suggestions.length>=5)return}}xh.flyToDestination=oPt;xh._updateSearchSuggestions=lPt;xh._adjustSuggestionsScroll=aPt;xh.prototype.isDestroyed=function(){return!1};xh.prototype.destroy=function(){return Wie(this),me(this)};var Pk=xh;var dPt="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",uPt="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 Qz(e){let t=In(e.container),n=new Pk(e);n._startSearchPath=dPt,n._stopSearchPath=uPt;let i=document.createElement("form");i.setAttribute("data-bind","submit: search");let o=document.createElement("input");o.type="search",o.className="cesium-geocoder-input",o.setAttribute("placeholder","Enter an address or landmark..."),o.setAttribute("data-bind",'textInput: searchText,disable: isSearchInProgress,event: { keyup: handleKeyUp, keydown: handleKeyDown, mouseover: deselectSuggestion },css: { "cesium-geocoder-input-wide" : keepExpanded || searchText.length > 0 },hasFocus: _focusTextbox'),this._onTextBoxFocus=function(){setTimeout(function(){o.select()},0)},o.addEventListener("focus",this._onTextBoxFocus,!1),i.appendChild(o),this._textBox=o;let r=document.createElement("span");r.className="cesium-geocoder-searchButton",r.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),i.appendChild(r),t.appendChild(i);let s=document.createElement("div");s.className="search-results",s.setAttribute("data-bind","visible: _suggestionsVisible");let a=document.createElement("ul");a.setAttribute("data-bind","foreach: _suggestions");let c=document.createElement("li");a.appendChild(c),c.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),s.appendChild(a),t.appendChild(s),Ce.applyBindings(n,i),Ce.applyBindings(n,s),this._container=t,this._searchSuggestionsContainer=s,this._viewModel=n,this._form=i,this._onInputBegin=function(d){let u=d.target;typeof d.composedPath=="function"&&(u=d.composedPath()[0]),t.contains(u)||(n._focusTextbox=!1,n.hideSuggestions())},this._onInputEnd=function(d){n._focusTextbox=!0,n.showSuggestions()},an.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(Qz.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}});Qz.prototype.isDestroyed=function(){return!1};Qz.prototype.destroy=function(){let e=this._container;return an.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),e.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),e.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),e.removeEventListener("touchend",this._onInputEnd,!0)),this._viewModel.destroy(),Ce.cleanNode(this._form),Ce.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),me(this)};var Xk=Qz;var cjo=x(T(),1);var tjo=x(T(),1);function cWe(e,t){this._scene=e,this._duration=t;let n=this;this._command=Gn(function(){n._scene.camera.flyHome(n._duration)}),this.tooltip="View Home",Ce.track(this,["tooltip"])}Object.defineProperties(cWe.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 Nk=cWe;function qz(e,t,n){e=In(e);let i=new Nk(t,n);i._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-home-button",o.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(o),Ce.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(qz.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});qz.prototype.isDestroyed=function(){return!1};qz.prototype.destroy=function(){return Ce.cleanNode(this._element),this._container.removeChild(this._element),me(this)};var Yk=qz;var yjo=x(T(),1);var mjo=x(T(),1);function mPt(e,t){t.currentTarget.parentElement.parentElement.querySelector(`#${e.name}-expander`).classList.toggle("active"),t.currentTarget.textContent=t.currentTarget.textContent==="+"?"-":"+"}function dWe(e,t){Ce.track(e);for(let n=0;n<e.sublayers.length;n++)dWe(e.sublayers[n],t)}function $z(e){return e.modelName==="FullModel"}function uWe(e){return e.modelName==="Overview"}function mWe(e){return uWe(e)||$z(e)}function lWe(e,t){if(mWe(e)){e.visibility=!1;for(let i=0;i<e.sublayers.length;i++)e.sublayers[i].visibility=!0;let n={name:e.name,modelName:e.modelName,disable:Ce.observable(!1),index:t.sublayers.length};return t.topLayers.push(n),t.sublayers.push(e),n}}function hPt(e,t){if(mWe(e)){t.sublayers.forEach(i=>i.visibility=!1),t.sublayers[e.index].visibility=!0;let n=document.getElementById("bsl-wrapper");$z(e)?(t.currentLevel=t.selectedLevel,n.style.display="block"):(t.selectedLevel=t.currentLevel,t.currentLevel="All",n.style.display="none")}}async function fPt(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 pPt(e){let t=this;this.levels=[],this.viewModel={sublayers:[],levels:this.levels,currentLevel:Ce.observable(),selectedLevel:"All",topLayers:[{name:"Select a layer to explore...",disable:Ce.observable(!0),index:-1}],currentLayer:Ce.observable(),expandClickHandler:mPt,setOptionDisable:function(i,o){Ce.applyBindingsToNode(i,{disable:o.disable},o)},defaultLayer:void 0},this.viewModel.currentLayer.subscribe(function(i){hPt(i,t.viewModel)});let n=e.sublayers;for(let i=0;i<n.length;i++){dWe(n[i],this.viewModel);let o=lWe(n[i],this.viewModel);l(o)&&(uWe(o)||!l(this.viewModel.defaultLayer)&&$z(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=lWe(i,this.viewModel),this.viewModel.currentLayer.subscribe(function(o){e.show=$z(o)})}else this.viewModel.topLayers.length===1&&(this.viewModel.topLayers[0].name="Building layers not found");return fPt(e,this.levels),this.viewModel.currentLevel.subscribe(function(i){i!=="All"?e.filterByAttributes([{name:"BldgLevel",values:[i]}]):e.filterByAttributes()}),this.viewModel}var wk=pPt;function bPt(e,t){let n=document.getElementById(e),i=document.createElement("div");i.classList.add("cesium-viewer-i3s-explorer"),i.innerHTML=`
<h3>Building explorer</h3>
<select
data-bind="options: topLayers, optionsText: 'name', optionsAfterRender: setOptionDisable, value: currentLayer"
></select>
<div id="bsl-wrapper">
<h3>Select Level</h3>
<select data-bind="options: levels, value: currentLevel"></select>
<h3>Disciplines & Categories</h3>
<ul class="layersList" data-bind="foreach: sublayers">
<ul class="layersList" data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">
<li>
<div class="li-wrapper">
<span
class="expandItem"
data-bind="click: $root.expandClickHandler"
>+</span
>
<input
type="checkbox"
data-bind="checked: visibility, valueUpdate: 'input', attr: { id: name}"
/>
<label data-bind="attr: { for: name}">
<span data-bind="text: name"></span>
</label>
</div>
<ul class="nested" data-bind="attr: { id: name + '-expander'}">
<li data-bind="foreach: sublayers.sort(function (l, r) { return l.name.localeCompare(r.name) })">
<div class="li-wrapper">
<input
type="checkbox"
data-bind="checked: visibility, valueUpdate: 'input', attr: { id: name}"
/>
<label data-bind="attr: { for: name}">
<span data-bind="text: name"></span>
</label>
</div>
</li>
</ul>
</li>
</ul>
</ul>
</div>`,n.appendChild(i);let o=new wk(t);Ce.track(o),Ce.applyBindings(o,n),l(o.defaultLayer)&&(o.currentLayer=o.defaultLayer)}var vie=bPt;var Gjo=x(T(),1);var Sjo=x(T(),1);var gPt="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",yPt="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 Fie(){this._cameraClicked=new _e,this._closeClicked=new _e,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",Ce.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='<div class="cesium-infoBox-loadingContainer"><span class="cesium-infoBox-loading"></span></div>',this.cameraIconPath=void 0,Ce.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?yPt:gPt}}),Ce.defineProperty(this,"_bodyless",{get:function(){return!l(this.description)||this.description.length===0}})}Fie.prototype.maxHeightOffset=function(e){return`${this.maxHeight-e}px`};Object.defineProperties(Fie.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});var Mk=Fie;function eH(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 Mk;Ce.applyBindings(s,t),this._container=e,this._element=t,this._frame=r,this._viewModel=s,this._descriptionSubscription=void 0;let a=this;r.addEventListener("load",function(){let c=r.contentDocument,d=c.createElement("link");d.href=Kt("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=pc(s,"description",function(h){r.style.height="5px",u.innerHTML=h;let p=null,b=u.firstElementChild;if(b!==null&&u.childNodes.length===1){let y=window.getComputedStyle(b);if(y!==null){let _=y["background-color"],S=U.fromCssColorString(_);l(S)&&S.alpha!==0&&(p=y["background-color"])}}t.style["background-color"]=p;let f=u.getBoundingClientRect().height;r.style.height=`${f}px`})}),r.setAttribute("src","about:blank")}Object.defineProperties(eH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}});eH.prototype.isDestroyed=function(){return!1};eH.prototype.destroy=function(){let e=this._container;return Ce.cleanNode(this._element),e.removeChild(this._element),l(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),me(this)};var kk=eH;var Mjo=x(T(),1);var Fjo=x(T(),1);function hWe(){this.showInstructions=!1;let e=this;this._command=Gn(function(){e.showInstructions=!e.showInstructions}),this._showClick=Gn(function(){e._touch=!1}),this._showTouch=Gn(function(){e._touch=!0}),this._touch=!1,this.tooltip="Navigation Instructions",Ce.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(hWe.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});var Uk=hWe;function tH(e){let t=In(e.container),n=new Uk,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=Kt("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=Kt("Widgets/Images/NavigationHelp/Touch.svg"),u.className="cesium-navigation-button-icon",u.style.width="25px",u.style.height="25px",d.appendChild(u),d.appendChild(document.createTextNode("Touch")),s.appendChild(a),s.appendChild(d);let h=document.createElement("div");h.className="cesium-click-navigation-help cesium-navigation-help-instructions",h.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),h.innerHTML=` <table> <tr> <td><img src="${Kt("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="${Kt("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="${Kt("Widgets/Images/NavigationHelp/MouseMiddle.svg")}" width="48" height="48" /></td> <td> <div class="cesium-navigation-help-rotate">Rotate view</div> <div class="cesium-navigation-help-details">Middle click + drag, or</div> <div class="cesium-navigation-help-details">CTRL + Left/Right click + drag</div> </td> </tr> </table>`,s.appendChild(h);let p=document.createElement("div");p.className="cesium-touch-navigation-help cesium-navigation-help-instructions",p.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),p.innerHTML=` <table> <tr> <td><img src="${Kt("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="${Kt("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="${Kt("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="${Kt("Widgets/Images/NavigationHelp/TouchRotate.svg")}" width="70" height="48" /></td> <td> <div class="cesium-navigation-help-tilt">Rotate view</div> <div class="cesium-navigation-help-details">Two finger drag, opposite direction</div> </td> </tr> </table>`,s.appendChild(p),Ce.applyBindings(n,o),this._container=t,this._viewModel=n,this._wrapper=o,this._closeInstructions=function(b){o.contains(b.target)||(n.showInstructions=!1)},an.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!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 an.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),Ce.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),me(this)};var Dk=tH;var e4o=x(T(),1);var Hjo=x(T(),1);function Iie(e){this._scene=e.scene,this.lowFrameRateMessage=e.lowFrameRateMessage??"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers.",this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,Ce.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);let t=this;this._dismissMessage=Gn(function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0});let n=Q9.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(Iie.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}});Iie.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),me(this)};var Ok=Iie;function nH(e){let t=In(e.container),n=new Ok(e),i=document.createElement("div");i.className="cesium-performance-watchdog-message-area",i.setAttribute("data-bind","visible: showingLowFrameRateMessage");let o=document.createElement("button");o.setAttribute("type","button"),o.className="cesium-performance-watchdog-message-dismiss",o.innerHTML="&times;",o.setAttribute("data-bind","click: dismissMessage"),i.appendChild(o);let r=document.createElement("div");r.className="cesium-performance-watchdog-message",r.setAttribute("data-bind","html: lowFrameRateMessage"),i.appendChild(r),t.appendChild(i),Ce.applyBindings(n,i),this._container=t,this._viewModel=n,this._element=i}Object.defineProperties(nH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});nH.prototype.isDestroyed=function(){return!1};nH.prototype.destroy=function(){return this._viewModel.destroy(),Ce.cleanNode(this._element),this._container.removeChild(this._element),me(this)};var Bk=nH;var h4o=x(T(),1);var s4o=x(T(),1);function iH(e){this._scene=e,this._orthographic=e.camera.frustum instanceof mn,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,Ce.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);let t=this;Ce.defineProperty(this,"selectedTooltip",function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective}),this._toggleDropDown=Gn(function(){t.sceneMode===re.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)}),this._eventHelper=new vr,this._eventHelper.add(e.morphComplete,function(n,i,o,r){t.sceneMode=o,t._orthographic=o===re.SCENE2D||t._scene.camera.frustum instanceof mn}),this._eventHelper.add(e.preRender,function(){t._flightInProgress=l(e.camera._currentFlight)}),this._switchToPerspective=Gn(function(){t.sceneMode!==re.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)}),this._switchToOrthographic=Gn(function(){t.sceneMode!==re.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)}),this._sceneMode=re}Object.defineProperties(iH.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}}});iH.prototype.isDestroyed=function(){return!1};iH.prototype.destroy=function(){this._eventHelper.removeAll(),me(this)};var zk=iH;var xPt="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",TPt="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 oH(e,t){e=In(e);let n=new zk(t);n._perspectivePath=xPt,n._orthographicPath=TPt;let i=document.createElement("span");i.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(i);let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button",o.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic, "cesium-projectionPicker-buttonOrthographic": _orthographic, "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),o.innerHTML='<!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --><!-- /ko -->',i.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",r.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic), "cesium-projectionPicker-none" : !_orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),i.appendChild(r);let s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic), "cesium-projectionPicker-none" : _orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),i.appendChild(s),Ce.applyBindings(n,i),this._viewModel=n,this._container=e,this._wrapper=i,this._closeDropDown=function(a){i.contains(a.target)||(n.dropDownVisible=!1)},an.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(oH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});oH.prototype.isDestroyed=function(){return!1};oH.prototype.destroy=function(){return this._viewModel.destroy(),an.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Ce.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),me(this)};var Hk=oH;var R4o=x(T(),1);var T4o=x(T(),1);function rH(e,t){this._scene=e;let n=this,i=function(o,r,s,a){n.sceneMode=s,n.dropDownVisible=!1};this._eventHelper=new vr,this._eventHelper.add(e.morphStart,i),this._duration=t??2,this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",Ce.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,Ce.defineProperty(this,"selectedTooltip",function(){let o=n.sceneMode;return o===re.SCENE2D?n.tooltip2D:o===re.SCENE3D?n.tooltip3D:n.tooltipColumbusView}),this._toggleDropDown=Gn(function(){n.dropDownVisible=!n.dropDownVisible}),this._morphTo2D=Gn(function(){e.morphTo2D(n._duration)}),this._morphTo3D=Gn(function(){e.morphTo3D(n._duration)}),this._morphToColumbusView=Gn(function(){e.morphToColumbusView(n._duration)}),this._sceneMode=re}Object.defineProperties(rH.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}}});rH.prototype.isDestroyed=function(){return!1};rH.prototype.destroy=function(){this._eventHelper.removeAll(),me(this)};var Kk=rH;var _Pt="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",SPt="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",APt="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 sH(e,t,n){e=In(e);let i=new Kk(t,n);i._globePath=_Pt,i._flatMapPath=SPt,i._columbusViewPath=APt;let o=document.createElement("span");o.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(o);let r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button",r.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),r.innerHTML='<!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --><!-- /ko --><!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --><!-- /ko -->',o.appendChild(r);let s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),o.appendChild(s);let a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",a.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),o.appendChild(a);let c=document.createElement("button");c.type="button",c.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",c.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),o.appendChild(c),Ce.applyBindings(i,o),this._viewModel=i,this._container=e,this._wrapper=o,this._closeDropDown=function(d){o.contains(d.target)||(i.dropDownVisible=!1)},an.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(sH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});sH.prototype.isDestroyed=function(){return!1};sH.prototype.destroy=function(){return this._viewModel.destroy(),an.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),Ce.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),me(this)};var Jk=sH;var w4o=x(T(),1);var v4o=x(T(),1);var ZPt=new M,aH="-1000px";function jk(e,t,n){this._scene=e,this._screenPositionX=aH,this._screenPositionY=aH,this._tweens=e.tweens,this._container=n??document.body,this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,Ce.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,Ce.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&l(this.position)}}),Ce.defineProperty(this,"_transform",{get:function(){return`scale(${this._scale})`}}),this.computeScreenSpacePosition=function(i,o){return no.worldToWindowCoordinates(e,i,o)}}jk.prototype.update=function(){if(this.showSelection&&l(this.position)){let e=this.computeScreenSpacePosition(this.position,ZPt);if(!l(e))this._screenPositionX=aH,this._screenPositionY=aH;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`}}};jk.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:Ts.EXPONENTIAL_OUT})};jk.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:Ts.EXPONENTIAL_OUT})};Object.defineProperties(jk.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});var Qk=jk;function cH(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 Qk(t,this._element,this._container);this._viewModel=c,Ce.applyBindings(this._viewModel,this._element)}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(){let e=this._container;return Ce.cleanNode(this._element),e.removeChild(this._element),me(this)};var qk=cH;var Q4o=x(T(),1);var U4o=x(T(),1);function HA(e,t,n){this._color=e,this._height=t,this._base=n??0}HA.prototype.getHeight=function(){return this._height};HA.prototype.getBase=function(){return this._base};HA.prototype.getStartTime=function(){return this._start};HA.prototype.getStopTime=function(){return this._stop};HA.prototype.setRange=function(e,t){this._start=e,this._stop=t};HA.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 $k=HA;var B4o=x(T(),1);function fWe(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)}fWe.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 eU=fWe;var Pie=1e12,Th={none:0,scrub:1,slide:2,zoom:3,touchOnly:4},ld={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],CPt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function dd(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=Th.none,this._touchMode=ld.none,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="cesium-timeline-bar"></div><div class="cesium-timeline-trackContainer"><canvas class="cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="cesium-timeline-needle"></div><span class="cesium-timeline-ruler"></span>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._context=this._trackListEle.getContext("2d"),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=VPt(this),this._onMouseUp=RPt(this),this._onMouseMove=EPt(this),this._onMouseWheel=GPt(this),this._onTouchStart=LPt(this),this._onTouchMove=vPt(this),this._onTouchEnd=WPt(this);let o=this._timeBarEle;n.addEventListener("mouseup",this._onMouseUp,!1),n.addEventListener("mousemove",this._onMouseMove,!1),o.addEventListener("mousedown",this._onMouseDown,!1),o.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),o.addEventListener("mousewheel",this._onMouseWheel,!1),o.addEventListener("touchstart",this._onTouchStart,!1),o.addEventListener("touchmove",this._onTouchMove,!1),o.addEventListener("touchend",this._onTouchEnd,!1),o.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}dd.prototype.addEventListener=function(e,t,n){this._topDiv.addEventListener(e,t,n)};dd.prototype.removeEventListener=function(e,t,n){this._topDiv.removeEventListener(e,t,n)};dd.prototype.isDestroyed=function(){return!1};dd.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);let e=this.container.ownerDocument;e.removeEventListener("mouseup",this._onMouseUp,!1),e.removeEventListener("mousemove",this._onMouseMove,!1);let t=this._timeBarEle;t.removeEventListener("mousedown",this._onMouseDown,!1),t.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),t.removeEventListener("mousewheel",this._onMouseWheel,!1),t.removeEventListener("touchstart",this._onTouchStart,!1),t.removeEventListener("touchmove",this._onTouchMove,!1),t.removeEventListener("touchend",this._onTouchEnd,!1),t.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),me(this)};dd.prototype.addHighlightRange=function(e,t,n){let i=new $k(e,t,n);return this._highlightRanges.push(i),this.resize(),i};dd.prototype.addTrack=function(e,t,n,i){let o=new eU(e,t,n,i);return this._trackList.push(o),this._lastHeight=void 0,this.resize(),o};dd.prototype.zoomTo=function(e,t){if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=Q.secondsDifference(t,e),this._clock&&this._clock.clockRange!==ys.UNBOUNDED){let i=this._clock.startTime,o=this._clock.stopTime,r=Q.secondsDifference(o,i),s=Q.secondsDifference(i,this._startJulian),a=Q.secondsDifference(o,this._endJulian);this._timeBarSecondsSpan>=r?(this._timeBarSecondsSpan=r,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):s>0?(this._endJulian=Q.addSeconds(this._endJulian,s,new Q),this._startJulian=i,this._timeBarSecondsSpan=Q.secondsDifference(this._endJulian,this._startJulian)):a<0&&(this._startJulian=Q.addSeconds(this._startJulian,a,new Q),this._endJulian=o,this._timeBarSecondsSpan=Q.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();let n=document.createEvent("Event");n.initEvent("setzoom",!0,!0),n.startJulian=this._startJulian,n.endJulian=this._endJulian,n.epochJulian=this._epochJulian,n.totalSpan=this._timeBarSecondsSpan,n.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(n)};dd.prototype.zoomFrom=function(e){let t=Q.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=this._timeBarSecondsSpan*.5:t+=t-this._timeBarSecondsSpan*.5;let n=this._timeBarSecondsSpan-t;this.zoomTo(Q.addSeconds(this._startJulian,t-t*e,new Q),Q.addSeconds(this._endJulian,n*e-n,new Q))};function Xie(e){return e<10?`0${e.toString()}`:e.toString()}dd.prototype.makeLabel=function(e){let t=Q.toGregorianDate(e),n=t.millisecond,i=" UTC";if(n>0&&this._timeBarSecondsSpan<3600){for(i=Math.floor(n).toString();i.length<3;)i=`0${i}`;i=`.${i}`}return`${CPt[t.month-1]} ${t.day} ${t.year} ${Xie(t.hour)}:${Xie(t.minute)}:${Xie(t.second)}${i}`};dd.prototype.smallestTicInPixels=7;dd.prototype._makeTics=function(){let e=this._timeBarEle,t=Q.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan),i=n-8,o,r=this;this._needleEle.style.left=`${n.toString()}px`;let s="",a=.01,c=31536e6,d=1e-10,u=0,h=this._timeBarSecondsSpan;h<a?(h=a,this._timeBarSecondsSpan=a,this._endJulian=Q.addSeconds(this._startJulian,a,new Q)):h>c&&(h=c,this._timeBarSecondsSpan=c,this._endJulian=Q.addSeconds(this._startJulian,c,new Q));let p=this._timeBarEle.clientWidth;p<10&&(p=10);let b=this._startJulian,f=Math.min(h/p*1e-5,.4),y,_=Q.toGregorianDate(b);h>31536e4?y=Q.fromDate(new Date(Date.UTC(Math.floor(_.year/100)*100,0))):h>31536e3?y=Q.fromDate(new Date(Date.UTC(Math.floor(_.year/10)*10,0))):h>86400?y=Q.fromDate(new Date(Date.UTC(_.year,0))):y=Q.fromDate(new Date(Date.UTC(_.year,_.month,_.day)));let S=Q.secondsDifference(this._startJulian,Q.addSeconds(y,f,new Q)),A=S+h;this._epochJulian=y;function Z(w){return Math.floor(S/w)*w}function V(w,z){return Math.ceil(w/z+.5)*z}function E(w){return(w-S)/h}function L(w,z){return w-z*Math.round(w/z)}this._rulerEle.innerHTML=this.makeLabel(Q.addSeconds(this._endJulian,-a,new Q));let v=this._rulerEle.offsetWidth+20;v<30&&(v=180);let I=u;u-=d;let X={startTime:S,startJulian:b,epochJulian:y,duration:h,timeBarWidth:p,getAlpha:E};this._highlightRanges.forEach(function(w){s+=w.render(X)});let N=0,g=0,C=0,R=v/p;R>1&&(R=1),R*=this._timeBarSecondsSpan;let G=-1,P=-1,Y=nT.length,O;for(O=0;O<Y;++O){let w=nT[O];if(++G,N=w,w>R&&w>u)break;P<0&&p*(w/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(P=G)}if(G>0){for(;G>0;)if(--G,Math.abs(L(N,nT[G]))<1e-5){nT[G]>=u&&(g=nT[G]);break}if(P>=0)for(;P<G;){if(Math.abs(L(g,nT[P]))<1e-5&&nT[P]>=u){C=nT[P];break}++P}}u=I,u>d&&C<1e-5&&Math.abs(u-N)>d&&(C=u,u<=N+d&&(g=0));let k=-999999,D;if(p*(C/this._timeBarSecondsSpan)>=3)for(o=Z(C);o<=A;o=V(o,C))s+=`<span class="cesium-timeline-ticTiny" style="left: ${Math.round(p*E(o)).toString()}px;"></span>`;if(p*(g/this._timeBarSecondsSpan)>=3)for(o=Z(g);o<=A;o=V(o,g))s+=`<span class="cesium-timeline-ticSub" style="left: ${Math.round(p*E(o)).toString()}px;"></span>`;if(p*(N/this._timeBarSecondsSpan)>=2){this._mainTicSpan=N,A+=N,o=Z(N);let w=Q.computeTaiMinusUtc(y);for(;o<=A;){let z=Q.addSeconds(b,o-S,new Q);if(N>2.1){let te=Q.computeTaiMinusUtc(z);Math.abs(te-w)>.1&&(o+=te-w,z=Q.addSeconds(b,o-S,new Q))}let J=Math.round(p*E(o)),ee=this.makeLabel(z);this._rulerEle.innerHTML=ee,D=this._rulerEle.offsetWidth,D<10&&(D=v);let H=J-(D/2-1);H>k?(k=H+D+5,s+=`<span class="cesium-timeline-ticMain" style="left: ${J.toString()}px;"></span><span class="cesium-timeline-ticLabel" style="left: ${H.toString()}px;">${ee}</span>`):s+=`<span class="cesium-timeline-ticSub" style="left: ${J.toString()}px;"></span>`,o=V(o,N)}}else this._mainTicSpan=-1;s+=`<span class="cesium-timeline-icon16" style="left:${i}px;bottom:0;background-position: 0 0;"></span>`,e.innerHTML=s,this._scrubElement=e.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),X.y=0,this._trackList.forEach(function(w){w.render(r._context,X),X.y+=w.height})};dd.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;let e=this._scrubElement;if(l(this._scrubElement)){let t=Q.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==n&&(this._lastXPos=n,e.style.left=`${n-8}px`,this._needleEle.style.left=`${n}px`)}l(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(Q.addSeconds(this._startJulian,this._timelineDrag,new Q),Q.addSeconds(this._endJulian,this._timelineDrag,new Q)))};dd.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=Q.addSeconds(this._startJulian,t,new Q),this._scrubElement){let i=e-8;this._scrubElement.style.left=`${i.toString()}px`,this._needleEle.style.left=`${e.toString()}px`}let n=document.createEvent("Event");n.initEvent("settime",!0,!0),n.clientX=e,n.timeSeconds=t,n.timeJulian=this._scrubJulian,n.clock=this._clock,this._topDiv.dispatchEvent(n)};function VPt(e){return function(t){e._mouseMode!==Th.touchOnly&&(t.button===0?(e._mouseMode=Th.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition="-16px 0"),e._onMouseMove(t)):(e._mouseX=t.clientX,t.button===2?e._mouseMode=Th.zoom:e._mouseMode=Th.slide)),t.preventDefault()}}function RPt(e){return function(t){e._mouseMode=Th.none,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}function EPt(e){return function(t){let n;if(e._mouseMode===Th.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===Th.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===Th.zoom&&(n=e._mouseX-t.clientX,e._mouseX=t.clientX,n!==0&&e.zoomFrom(Math.pow(1.01,n)))}}function GPt(e){return function(t){let n=t.wheelDeltaY||t.wheelDelta||-t.detail;Pie=Math.max(Math.min(Math.abs(n),Pie),1),n/=Pie,e.zoomFrom(Math.pow(1.05,-n))}}function LPt(e){return function(t){let n=t.touches.length,i,o,r=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=Th.touchOnly,n===1?(i=Q.secondsDifference(e._scrubJulian,e._startJulian),o=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+r),Math.abs(t.touches[0].clientX-o)<50?(e._touchMode=ld.scrub,e._scrubElement&&(e._scrubElement.style.backgroundPosition=n===1?"-16px 0":"0 0")):(e._touchMode=ld.singleTap,e._touchState.centerX=t.touches[0].clientX-r)):n===2?(e._touchMode=ld.slideZoom,e._touchState.centerX=(t.touches[0].clientX+t.touches[1].clientX)*.5-r,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=ld.ignore}}function WPt(e){return function(t){let n=t.touches.length,i=e._topDiv.getBoundingClientRect().left;e._touchMode===ld.singleTap?(e._touchMode=ld.scrub,e._onTouchMove(t)):e._touchMode===ld.scrub&&e._onTouchMove(t),e._mouseMode=Th.touchOnly,n!==1?e._touchMode=n>0?ld.ignore:ld.none:e._touchMode===ld.slideZoom&&(e._touchState.centerX=t.touches[0].clientX-i),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}function vPt(e){return function(t){let n,i,o,r,s,a,c=1,d=e._topDiv.getBoundingClientRect().left;e._touchMode===ld.singleTap&&(e._touchMode=ld.slideZoom),e._mouseMode=Th.touchOnly,e._touchMode===ld.scrub?(t.preventDefault(),t.changedTouches.length===1&&(i=t.changedTouches[0].clientX-d,i>=0&&i<=e._topDiv.clientWidth&&e._setTimeBarTime(i,i*e._timeBarSecondsSpan/e._topDiv.clientWidth))):e._touchMode===ld.slideZoom&&(o=t.touches.length,o===2?(r=(t.touches[0].clientX+t.touches[1].clientX)*.5-d,s=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):o===1&&(r=t.touches[0].clientX-d,s=0),l(r)&&(s>0&&e._touchState.spanX>0?(c=e._touchState.spanX/s,a=Q.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-r*e._timeBarSecondsSpan*c)/e._topDiv.clientWidth,new Q)):(n=e._touchState.centerX-r,a=Q.addSeconds(e._startJulian,n*e._timeBarSecondsSpan/e._topDiv.clientWidth,new Q)),e.zoomTo(a,Q.addSeconds(a,e._timeBarSecondsSpan*c,new Q)),e._touchState.centerX=r,e._touchState.spanX=s))}}dd.prototype.resize=function(){let e=this.container.clientWidth,t=this.container.clientHeight;if(e===this._lastWidth&&t===this._lastHeight)return;this._trackContainer.style.height=`${t}px`;let n=1;this._trackList.forEach(function(i){n+=i.height}),this._trackListEle.style.height=`${n.toString()}px`,this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=n,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t};var tU=dd;var fQo=x(T(),1);var aQo=x(T(),1);var xWe=x(yWe(),1);function PPt(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 TWe(){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 XPt(e,t,n,i){i()||(n()?(t.useWebVR=!1,e._locked&&(TWe(),e._locked=!1),e._noSleep.disable(),Ur.exitFullscreen(),n(!1)):(Ur.fullscreen||Ur.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=PPt("landscape")),t.useWebVR=!0,n(!0)))}function lH(e,t){let n=this,i=Ce.observable(Ur.enabled),o=Ce.observable(!1);this.isVRMode=void 0,Ce.defineProperty(this,"isVRMode",{get:function(){return o()}}),this.isVREnabled=void 0,Ce.defineProperty(this,"isVREnabled",{get:function(){return i()},set:function(s){i(s&&Ur.enabled)}}),this.tooltip=void 0,Ce.defineProperty(this,"tooltip",function(){return i()?o()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"});let r=Ce.observable(!1);this._isOrthographic=void 0,Ce.defineProperty(this,"_isOrthographic",{get:function(){return r()}}),this._eventHelper=new vr,this._eventHelper.add(e.preRender,function(){r(e.camera.frustum instanceof mn)}),this._locked=!1,this._noSleep=new xWe.default,this._command=Gn(function(){XPt(n,e,o,r)},Ce.getObservable(this,"isVREnabled")),this._vrElement=In(t)??document.body,this._callback=function(){!Ur.fullscreen&&o()&&(e.useWebVR=!1,n._locked&&(TWe(),n._locked=!1),n._noSleep.disable(),o(!1))},document.addEventListener(Ur.changeEventName,this._callback)}Object.defineProperties(lH.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){this._vrElement=e}},command:{get:function(){return this._command}}});lH.prototype.isDestroyed=function(){return!1};lH.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(Ur.changeEventName,this._callback),me(this)};var nU=lH;var NPt="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",YPt="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 dH(e,t,n){e=In(e);let i=new nU(t,n);i._exitVRPath=YPt,i._enterVRPath=NPt;let o=document.createElement("button");o.type="button",o.className="cesium-button cesium-vrButton",o.setAttribute("data-bind",'css: { "cesium-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),e.appendChild(o),Ce.applyBindings(i,o),this._container=e,this._viewModel=i,this._element=o}Object.defineProperties(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 this._viewModel.destroy(),Ce.cleanNode(this._element),this._container.removeChild(this._element),me(this)};var iU=dH;var PQo=x(T(),1);var _We=new de;function ZWe(e){let t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function wPt(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 MPt(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 SWe(e,t){let n=e.scene.pick(t.position);if(l(n)){let i=n.id??n.primitive.id;if(i instanceof Oo)return i;if(n instanceof Bs||n instanceof K_)return new Oo({name:MPt(n),description:wPt(n),feature:n})}if(l(e.scene.globe))return DPt(e,t.position)}var kPt=new Q;function Mie(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,kPt)),e.updateFromClock(),e.zoomTo(i,o)}}}var UPt=new m;function DPt(e,t){let n=e.scene,i=n.camera.getPickRay(t),o=n.imageryLayers.pickImageryLayerFeatures(i,n);if(!l(o))return;let r=new Oo({id:"Loading...",description:"Loading feature information..."});return o.then(function(s){if(e.selectedEntity!==r)return;if(!l(s)||s.length===0){e.selectedEntity=AWe();return}let a=s[0],c=new Oo({id:a.name,description:a.description});if(l(a.position)){let d=e.scene.ellipsoid.cartographicToCartesian(a.position,UPt);c.position=new Wl(d)}e.selectedEntity=c},function(){e.selectedEntity===r&&(e.selectedEntity=AWe())}),r}function AWe(){return new Oo({id:"None",description:"No features found."})}function OPt(e,t){let n=e._geocoder,i=e._homeButton,o=e._sceneModePicker,r=e._projectionPicker,s=e._baseLayerPicker,a=e._animation,c=e._timeline,d=e._fullscreenButton,u=e._infoBox,h=e._selectionIndicator,p=t?"hidden":"visible";if(l(n)&&(n.container.style.visibility=p),l(i)&&(i.container.style.visibility=p),l(o)&&(o.container.style.visibility=p),l(r)&&(r.container.style.visibility=p),l(s)&&(s.container.style.visibility=p),l(a)&&(a.container.style.visibility=p),l(c)&&(c.container.style.visibility=p),l(d)&&d.viewModel.isFullscreenEnabled&&(d.container.style.visibility=p),l(u)&&(u.container.style.visibility=p),l(h)&&(h.container.style.visibility=p),e._container){let b=t||!l(d)?0:d.container.clientWidth;e._vrButton.container.style.right=`${b}px`,e.forceResize()}}function lo(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 Af,d=new gk(c),u=!0);let h=new A9(r,{baseLayer:n&&l(t.selectedImageryProviderViewModel)||l(t.baseLayer)||l(t.imageryProvider)?!1:void 0,clock:c,shouldAnimate:t.shouldAnimate,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,ellipsoid:t.ellipsoid,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,automaticallyTrackDataSourceClocks:t.automaticallyTrackDataSourceClocks,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:l(t.creditContainer)?t.creditContainer:s,creditViewport:t.creditViewport,dataSources:t.dataSources,scene3DOnly:a,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,blurActiveElementOnCanvasFocus:t.blurActiveElementOnCanvasFocus,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange,depthPlaneEllipsoidOffset:t.depthPlaneEllipsoidOffset,msaaSamples:t.msaaSamples}),p=h.scene,b=new vr;b.add(c.onTick,lo.prototype._onTick,this);let f;if(!l(t.selectionIndicator)||t.selectionIndicator!==!1){let z=document.createElement("div");z.className="cesium-viewer-selectionIndicatorContainer",o.appendChild(z),f=new qk(z,p)}let y;if(!l(t.infoBox)||t.infoBox!==!1){let z=document.createElement("div");z.className="cesium-viewer-infoBoxContainer",o.appendChild(z),y=new kk(z);let J=y.viewModel;b.add(J.cameraClicked,lo.prototype._onInfoBoxCameraClicked,this),b.add(J.closeClicked,lo.prototype._onInfoBoxClockClicked,this)}let _=document.createElement("div");_.className="cesium-viewer-toolbar",o.appendChild(_);let S;if(!l(t.geocoder)||t.geocoder!==!1){let z=document.createElement("div");z.className="cesium-viewer-geocoderContainer",_.appendChild(z);let J;typeof t.geocoder=="string"?J=[new XA({scene:p,geocodeProviderType:t.geocoder})]:l(t.geocoder)&&typeof t.geocoder!="boolean"&&(J=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),S=new Xk({container:z,geocoderServices:J,scene:p}),b.add(S.viewModel.search.beforeExecute,lo.prototype._clearObjects,this)}let A;(!l(t.homeButton)||t.homeButton!==!1)&&(A=new Yk(_,p),l(S)&&b.add(A.viewModel.command.afterExecute,function(){let z=S.viewModel;z.searchText="",z.isSearchInProgress&&z.search()}),b.add(A.viewModel.command.beforeExecute,lo.prototype._clearTrackedObject,this));let Z;!a&&(!l(t.sceneModePicker)||t.sceneModePicker!==!1)&&(Z=new Jk(_,p));let V;t.projectionPicker&&(V=new Hk(_,p));let E,L;if(n){let z=t.imageryProviderViewModels??Ek(),J=t.terrainProviderViewModels??Gk();E=new Rk(_,{globe:p.globe,imageryProviderViewModels:z,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:J,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel}),L=_.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}l(t.baseLayer)&&t.baseLayer!==!1&&(n&&(E.viewModel.selectedImagery=void 0),p.imageryLayers.removeAll(),p.imageryLayers.add(t.baseLayer)),l(t.terrainProvider)&&(n&&(E.viewModel.selectedTerrain=void 0),p.terrainProvider=t.terrainProvider),l(t.terrain)&&(n&&(p.globe.depthTestAgainstTerrain=!0),p.setTerrain(t.terrain));let v;if(!l(t.navigationHelpButton)||t.navigationHelpButton!==!1){let z=!0;try{if(l(window.localStorage)){let J=window.localStorage.getItem("cesium-hasSeenNavHelp");l(J)&&J?z=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch{}v=new Dk({container:_,instructionsInitiallyVisible:t.navigationInstructionsInitiallyVisible??z})}let I;if(!l(t.animation)||t.animation!==!1){let z=document.createElement("div");z.className="cesium-viewer-animationContainer",o.appendChild(z),I=new Tk(z,new _k(d))}let X;if(!l(t.timeline)||t.timeline!==!1){let z=document.createElement("div");z.className="cesium-viewer-timelineContainer",o.appendChild(z),X=new tU(z,c),X.addEventListener("settime",ZWe,!1),X.zoomTo(c.startTime,c.stopTime)}let N,g,C;(!l(t.fullscreenButton)||t.fullscreenButton!==!1)&&(C=document.createElement("div"),C.className="cesium-viewer-fullscreenContainer",o.appendChild(C),N=new Ik(C,t.fullscreenElement),g=pc(N.viewModel,"isFullscreenEnabled",function(z){C.style.display=z?"block":"none",l(X)&&(X.container.style.right=`${C.clientWidth}px`,X.resize())}));let R,G,P;if(t.vrButton){let z=document.createElement("div");z.className="cesium-viewer-vrContainer",o.appendChild(z),R=new iU(z,p,t.fullScreenElement),G=pc(R.viewModel,"isVREnabled",function(J){z.style.display=J?"block":"none",l(N)&&(z.style.right=`${C.clientWidth}px`),l(X)&&(X.container.style.right=`${z.clientWidth}px`,X.resize())}),P=pc(R.viewModel,"isVRMode",function(J){OPt(i,J)})}this._baseLayerPickerDropDown=L,this._fullscreenSubscription=g,this._vrSubscription=G,this._vrModeSubscription=P,this._dataSourceChangedListeners={},this._container=e,this._bottomContainer=s,this._element=o,this._cesiumWidget=h,this._selectionIndicator=f,this._infoBox=y,this._clockViewModel=d,this._destroyClockViewModel=u,this._toolbar=_,this._homeButton=A,this._sceneModePicker=Z,this._projectionPicker=V,this._baseLayerPicker=E,this._navigationHelpButton=v,this._animation=I,this._timeline=X,this._fullscreenButton=N,this._vrButton=R,this._geocoder=S,this._eventHelper=b,this._lastWidth=0,this._lastHeight=0,this._enableInfoOrSelection=l(y)||l(f),this._selectedEntity=void 0,this._selectedEntityChanged=new _e;let Y=this._cesiumWidget.dataSources,O=this._cesiumWidget.dataSourceDisplay;b.add(Y.dataSourceAdded,lo.prototype._onDataSourceAdded,this),b.add(Y.dataSourceRemoved,lo.prototype._onDataSourceRemoved,this),b.add(p.postUpdate,lo.prototype.resize,this);let k=Y.length;for(let z=0;z<k;z++)this._dataSourceAdded(Y,Y.get(z));this._dataSourceAdded(void 0,O.defaultDataSource),b.add(Y.dataSourceAdded,lo.prototype._dataSourceAdded,this),b.add(Y.dataSourceRemoved,lo.prototype._dataSourceRemoved,this);function D(z){let J=SWe(i,z);l(J)?j.getValueOrUndefined(J.position,i.clock.currentTime)?i.trackedEntity=J:i.zoomTo(J):l(i.trackedEntity)&&(i.trackedEntity=void 0)}function w(z){i.selectedEntity=SWe(i,z)}h.screenSpaceEventHandler.setInputAction(w,Vn.LEFT_CLICK),h.screenSpaceEventHandler.setInputAction(D,Vn.LEFT_DOUBLE_CLICK),h._canAnimateUpdateCallback=this._updateCanAnimate(this)}Object.defineProperties(lo.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,Mie(this._timeline,e))}}});lo.prototype.extend=function(e,t){e(this,t)};lo.prototype.resize=function(){let e=this._cesiumWidget,t=this._container,n=t.clientWidth,i=t.clientHeight,o=l(this._animation),r=l(this._timeline);if(e.resize(),n===this._lastWidth&&i===this._lastHeight)return;let s=i-125,a=this._baseLayerPickerDropDown;if(l(a)&&(a.style.maxHeight=`${s}px`),l(this._geocoder)){let f=this._geocoder.searchSuggestionsContainer;f.style.maxHeight=`${s}px`}l(this._infoBox)&&(this._infoBox.viewModel.maxHeight=s);let c=this._timeline,d,u=0,h=5,p=3,b=0;if(o&&window.getComputedStyle(this._animation.container).visibility!=="hidden"){let f=this._lastWidth;d=this._animation.container,n>900?(u=169,f<=900&&(d.style.width="169px",d.style.height="112px",this._animation.resize())):n>=600?(u=136,(f<600||f>900)&&(d.style.width="136px",d.style.height="90px",this._animation.resize())):(u=106,(f>600||f===0)&&(d.style.width="106px",d.style.height="70px",this._animation.resize())),h=u+5}if(r&&window.getComputedStyle(this._timeline.container).visibility!=="hidden"){let f=this._fullscreenButton,y=this._vrButton,_=c.container,S=_.style;p=_.clientHeight+3,S.left=`${u}px`;let A=0;l(f)&&(A+=f.container.clientWidth),l(y)&&(A+=y.container.clientWidth),S.right=`${A}px`,c.resize()}!r&&l(this._fullscreenButton)&&(b=this._fullscreenButton.container.clientWidth),this._bottomContainer.style.left=`${h}px`,this._bottomContainer.style.bottom=`${p}px`,this._bottomContainer.style.right=`${b}px`,this._lastWidth=n,this._lastHeight=i};lo.prototype.forceResize=function(){this._lastWidth=0,this.resize()};lo.prototype.render=function(){this._cesiumWidget.render()};lo.prototype.isDestroyed=function(){return!1};lo.prototype.destroy=function(){return l(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(Vn.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(Vn.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",ZWe,!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(),me(this)};lo.prototype._dataSourceAdded=function(e,t){t.entities.collectionChanged.addEventListener(lo.prototype._onEntityCollectionChanged,this)};lo.prototype._dataSourceRemoved=function(e,t){let n=t.entities;n.collectionChanged.removeEventListener(lo.prototype._onEntityCollectionChanged,this),l(this.selectedEntity)&&n.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};lo.prototype._updateCanAnimate=function(e){return function(t){e._clockViewModel.canAnimate=t}};lo.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,_We)!==xt.FAILED?n=_We.center:l(o.position)&&(n=o.position.getValue(t,n)),i=l(n));let s=l(this._selectionIndicator)?this._selectionIndicator.viewModel:void 0;l(s)&&(s.position=m.clone(n,s.position),s.showSelection=r&&i,s.update());let a=l(this._infoBox)?this._infoBox.viewModel:void 0;l(a)&&(a.showInfo=r,a.enableCamera=i,a.isCameraTracking=this.trackedEntity===this.selectedEntity,r?(a.titleText=o.name??o.id,a.description=j.getValueOrDefault(o.description,t,"")):(a.titleText="",a.description=""))};lo.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)}};lo.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)}};lo.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};lo.prototype._onInfoBoxClockClicked=function(e){this.selectedEntity=void 0};lo.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};lo.prototype._onDataSourceChanged=function(e){this.clockTrackedDataSource===e&&Mie(this.timeline,e)};lo.prototype._onDataSourceAdded=function(e,t){this._cesiumWidget._automaticallyTrackDataSourceClocks&&t===this.clockTrackedDataSource&&Mie(this._timeline,t);let n=t.entities.id,i=this._eventHelper.add(t.changedEvent,lo.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[n]=i};lo.prototype._onDataSourceRemoved=function(e,t){let n=t.entities.id;this._dataSourceChangedListeners[n](),this._dataSourceChangedListeners[n]=void 0};lo.prototype.zoomTo=function(e,t){return this._cesiumWidget.zoomTo(e,t)};lo.prototype.flyTo=function(e,t){return this._cesiumWidget.flyTo(e,t)};var kie=lo;var YQo=x(T(),1);function BPt(e){let t=document.createElement("div");t.className="cesium-viewer-cesium3DTilesInspectorContainer",e.container.appendChild(t);let n=new Ck(t,e.scene);Object.defineProperties(e,{cesium3DTilesInspector:{get:function(){return n}}})}var Uie=BPt;var kQo=x(T(),1);function zPt(e){let t=document.createElement("div");t.className="cesium-viewer-cesiumInspectorContainer",e.container.appendChild(t);let n=new vk(t,e.scene);Object.defineProperties(e,{cesiumInspector:{get:function(){return n}}})}var Die=zPt;var BQo=x(T(),1);function HPt(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){CWe(s,d),s=u,Oie(s,d)}},dropEnabled:{get:function(){return n},set:function(u){u!==n&&(u?Oie(s,d):CWe(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){KA(u),r&&(e.entities.removeAll(),e.dataSources.removeAll());let h=u.dataTransfer.files,p=h.length;for(let b=0;b<p;b++){let f=h[b],y=new FileReader;y.onload=KPt(e,f,c,a),y.onerror=JPt(e,f),y.readAsText(f)}}Oie(s,d),e.destroy=X9(e,e.destroy,function(){e.dropEnabled=!1}),e._handleDrop=d}function KA(e){e.stopPropagation(),e.preventDefault()}function CWe(e,t){let n=e;l(n)&&(n.removeEventListener("drop",t,!1),n.removeEventListener("dragenter",KA,!1),n.removeEventListener("dragover",KA,!1),n.removeEventListener("dragexit",KA,!1))}function Oie(e,t){e.addEventListener("drop",t,!1),e.addEventListener("dragenter",KA,!1),e.addEventListener("dragover",KA,!1),e.addEventListener("dragexit",KA,!1)}function KPt(e,t,n,i){let o=e.scene;return function(r){let s=t.name;try{let a;if(/\.czml$/i.test(s))a=HX.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=DS.load(t,{sourceUri:s,proxy:n,camera:o.camera,canvas:o.canvas,clampToGround:i,screenOverlayContainer:e.container});else if(/\.gpx$/i.test(s))a=BN.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 JPt(e,t){return function(n){e.dropError.raiseEvent(e,t.name,n.target.error)}}var Bie=HPt;var QQo=x(T(),1);function jPt(e,t){t=t??B.EMPTY_OBJECT;let n=new Bk({scene:e.scene,container:e.bottomContainer,lowFrameRateMessage:t.lowFrameRateMessage});Object.defineProperties(e,{performanceWatchdog:{get:function(){return n}}})}var zie=jPt;var m8o=x(T(),1);var l8o=x(T(),1);var n8o=x(T(),1);function VWe(e){let t=e.split(`
`),n;for(n=0;n<t.length&&!t[n].match(/\S/);n++);if(n===t.length)return"";let i="",o=/^\s*/,s=t[n].match(o)[0].length;for(let a=n;a<t.length;a++){let c=t[a];c.match(o)[0].length>=s&&(c=c.slice(s)),i+=`${c}
`}return i}function _h(e){this._scene=e,this._voxelPrimitive=void 0,this._customShaderCompilationRemoveCallback=void 0,this._definedProperties=[],this._getPrimitiveFunctions=[],this._modelMatrixReady=!1;let t=this;function n(o){let{name:r,initialValue:s}=o;t._definedProperties.push(r);let a=o.setPrimitiveFunction;a===!0&&(a=function(u){t._voxelPrimitive[r]=u});let c=o.getPrimitiveFunction;c===!0&&(c=function(){t[r]=t._voxelPrimitive[r]}),l(c)&&t._getPrimitiveFunctions.push(c);let d=Ce.observable();return Ce.defineProperty(t,r,{get:function(){return d()},set:function(u){typeof s=="number"&&typeof u=="string"&&(u=Number(u),isNaN(u)&&(u=s)),typeof s=="boolean"&&typeof u=="number"&&(u=u===1),d(u),l(a)&&l(t._voxelPrimitive)&&(a(u),e.requestRender())}}),t[r]=s,d}function i(o,r){return function(s){let a=t._voxelPrimitive[o].clone();a[r]=s,t._voxelPrimitive[o]=a}}n({name:"inspectorVisible",initialValue:!0}),n({name:"displayVisible",initialValue:!1}),n({name:"transformVisible",initialValue:!1}),n({name:"boundsVisible",initialValue:!1}),n({name:"clippingVisible",initialValue:!1}),n({name:"shaderVisible",initialValue:!1}),n({name:"shaderString",initialValue:"",getPrimitiveFunction:function(){let o=t._voxelPrimitive.customShader.fragmentShaderText;t.shaderString=VWe(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===fc.BOX}}),n({name:"shapeIsEllipsoid",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsEllipsoid=o===fc.ELLIPSOID}}),n({name:"shapeIsCylinder",getPrimitiveFunction:function(){let o=t._voxelPrimitive.shape;t.shapeIsCylinder=o===fc.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&&Z0(t)},getPrimitiveFunction:function(){t.translationX=F.getTranslation(t._voxelPrimitive.modelMatrix,new m).x}}),n({name:"translationY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&Z0(t)},getPrimitiveFunction:function(){t.translationY=F.getTranslation(t._voxelPrimitive.modelMatrix,new m).y}}),n({name:"translationZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&Z0(t)},getPrimitiveFunction:function(){t.translationZ=F.getTranslation(t._voxelPrimitive.modelMatrix,new m).z}}),n({name:"scaleX",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&Z0(t)},getPrimitiveFunction:function(){t.scaleX=F.getScale(t._voxelPrimitive.modelMatrix,new m).x}}),n({name:"scaleY",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&Z0(t)},getPrimitiveFunction:function(){t.scaleY=F.getScale(t._voxelPrimitive.modelMatrix,new m).y}}),n({name:"scaleZ",initialValue:1,setPrimitiveFunction:function(){t._modelMatrixReady&&Z0(t)},getPrimitiveFunction:function(){t.scaleZ=F.getScale(t._voxelPrimitive.modelMatrix,new m).z}}),n({name:"angleX",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&Z0(t)}}),n({name:"angleY",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&Z0(t)}}),n({name:"angleZ",initialValue:0,setPrimitiveFunction:function(){t._modelMatrixReady&&Z0(t)}})}var QPt=new m,qPt=new m,$Pt=new yc,eXt=new q;function Z0(e){let t=m.fromElements(e.translationX,e.translationY,e.translationZ,QPt),n=m.fromElements(e.scaleX,e.scaleY,e.scaleZ,qPt),i=$Pt;i.heading=e.angleX,i.pitch=e.angleY,i.roll=e.angleZ;let o=q.fromHeadingPitchRoll(i,eXt),r=q.multiplyByScale(o,n,o);e._voxelPrimitive.modelMatrix=F.fromRotationTranslation(r,t,e._voxelPrimitive.modelMatrix)}Object.defineProperties(_h.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=VWe(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,Z0(t)}}});_h.prototype.toggleInspector=function(){this.inspectorVisible=!this.inspectorVisible};_h.prototype.toggleDisplay=function(){this.displayVisible=!this.displayVisible};_h.prototype.toggleTransform=function(){this.transformVisible=!this.transformVisible};_h.prototype.toggleBounds=function(){this.boundsVisible=!this.boundsVisible};_h.prototype.toggleClipping=function(){this.clippingVisible=!this.clippingVisible};_h.prototype.toggleShader=function(){this.shaderVisible=!this.shaderVisible};_h.prototype.compileShader=function(){l(this._voxelPrimitive)&&(this._voxelPrimitive.customShader=new TA({fragmentShaderText:this.shaderString,uniforms:this._voxelPrimitive.customShader.uniforms}))};_h.prototype.shaderEditorKeyPress=function(e,t){if(t.keyCode===9){t.preventDefault();let n=t.target,i=n.selectionStart,o=n.selectionEnd,r=o,a=n.value.slice(i,o).split(`
`),c=a.length,d;if(t.shiftKey)for(d=0;d<c;++d)a[d][0]===" "&&(a[d][1]===" "?(a[d]=a[d].substr(2),r-=2):(a[d]=a[d].substr(1),r-=1));else for(d=0;d<c;++d)a[d]=` ${a[d]}`,r+=2;let u=a.join(`
`);n.value=n.value.slice(0,i)+u+n.value.slice(o),n.selectionStart=i!==o?i:r,n.selectionEnd=r}else t.ctrlKey&&(t.keyCode===10||t.keyCode===13)&&this.compileShader();return!0};_h.prototype.isDestroyed=function(){return!1};_h.prototype.destroy=function(){let e=this;return this._definedProperties.forEach(function(t){Ce.getObservable(e,t).dispose()}),me(this)};var oU=_h;function uH(e,t){e=In(e);let n=document.createElement("div"),i=new oU(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}=qd,u=s(r,"Display","displayVisible","toggleDisplay"),h=s(r,"Transform","transformVisible","toggleTransform"),p=s(r,"Clipping","clippingVisible","toggleClipping"),b=s(r,"Shader","shaderVisible","toggleShader");u.appendChild(a("Depth Test","depthTest")),u.appendChild(a("Show","show")),u.appendChild(a("Disable Update","disableUpdate")),u.appendChild(a("Debug Draw","debugDraw")),u.appendChild(a("Jitter","jitter")),u.appendChild(a("Nearest Sampling","nearestSampling")),u.appendChild(c("Screen Space Error","screenSpaceError",0,128)),u.appendChild(c("Step Size","stepSize",0,2));let f=10,y=10,_=W.PI;h.appendChild(c("Translation X","translationX",-f,+f)),h.appendChild(c("Translation Y","translationY",-f,+f)),h.appendChild(c("Translation Z","translationZ",-f,+f)),h.appendChild(c("Scale X","scaleX",0,+y)),h.appendChild(c("Scale Y","scaleY",0,+y)),h.appendChild(c("Scale Z","scaleZ",0,+y)),h.appendChild(c("Heading","angleX",-_,+_)),h.appendChild(c("Pitch","angleY",-_,+_)),h.appendChild(c("Roll","angleZ",-_,+_)),Hie("Max X","Min X","Max Y","Min Y","Max Z","Min Z","clippingBoxMaxX","clippingBoxMinX","clippingBoxMaxY","clippingBoxMinY","clippingBoxMaxZ","clippingBoxMinZ","shapeIsBox",p),Hie("Max Longitude","Min Longitude","Max Latitude","Min Latitude","Max Height","Min Height","clippingEllipsoidMaxLongitude","clippingEllipsoidMinLongitude","clippingEllipsoidMaxLatitude","clippingEllipsoidMinLatitude","clippingEllipsoidMaxHeight","clippingEllipsoidMinHeight","shapeIsEllipsoid",p),Hie("Max Radius","Min Radius","Max Angle","Min Angle","Max Height","Min Height","clippingCylinderMaxRadius","clippingCylinderMinRadius","clippingCylinderMaxAngle","clippingCylinderMinAngle","clippingCylinderMaxHeight","clippingCylinderMinHeight","shapeIsCylinder",p);let S=document.createElement("div");b.appendChild(S);let A=document.createElement("textarea");A.setAttribute("data-bind","textInput: shaderString, event: { keydown: shaderEditorKeyPress }"),S.className="cesium-cesiumInspector-styleEditor",S.appendChild(A);let Z=d("Compile (Ctrl+Enter)","compileShader");S.appendChild(Z);let V=document.createElement("label");V.style.display="block",V.setAttribute("data-bind","text: shaderCompilationMessage, style: {color: shaderCompilationSuccess ? 'green' : 'red'}"),S.appendChild(V),Ce.applyBindings(i,n)}Object.defineProperties(uH.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}});uH.prototype.isDestroyed=function(){return!1};uH.prototype.destroy=function(){return Ce.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),me(this)};function Hie(e,t,n,i,o,r,s,a,c,d,u,h,p,b){let f=qd.createRangeInputWithDynamicMinMax,y=b.appendChild(document.createElement("div"));y.setAttribute("data-bind",`if: ${p}`),y.appendChild(f(e,s)),y.appendChild(f(t,a)),y.appendChild(f(n,c)),y.appendChild(f(i,d)),y.appendChild(f(o,u)),y.appendChild(f(r,h))}var rU=uH;function tXt(e){let t=document.createElement("div");t.className="cesium-viewer-voxelInspectorContainer",e.container.appendChild(t);let n=new rU(t,e.scene);Object.defineProperties(e,{voxelInspector:{get:function(){return n}}})}var Kie=tXt;globalThis.CESIUM_VERSION="1.141.0";var nXt="1.141.0";return PWe(iXt);})();