wangjuncheng
2025-04-28 f54c45de2ec6dfadc825c064b75e6707513bd094
change
已添加51个文件
已修改59个文件
9572 ■■■■ 文件已修改
public/CimSDK/Assets/Textures/water/1024_1024.png 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/CimSDK.min.css 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/CimSDK.min.js 2358 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-2BPIFUNJ.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-32UDSAPU.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-3I5K75MC.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-3K67FZLU.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-45NF2JU3.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-4DMLXFUJ.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-55TU6MJR.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-563CJZT3.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-6MN6BBPN.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-6NBUVVUT.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-AIYLFSI3.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-E5FOJ77O.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-EX67AA2G.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-EZRSLM27.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-FBQDLPON.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-FNJ2A2P5.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-GN3R6MXA.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-HMXXHGCW.js 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-IQP74IF6.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-IUDUZUOX.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-JZ3QHGBZ.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-LSAUAD4X.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-LZCCFKBI.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-MQCAYMIH.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-NFDMGE7Q.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-NGYBTBZC.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-NJVIDNJ6.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-ODAW2LJE.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-OOGG7EHS.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-PZ34T7DL.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-Q2L33INS.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-QP426X7X.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-QPIV5DSQ.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-S5MWIP3D.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-T6ETJW3A.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-TBSK33NR.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-TGH7B4GN.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-TMZSBMX2.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-UEFEFMYS.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-V5KKODOM.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-VDNLYVKB.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-VDZXURWO.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-W5L3OOEF.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-WI5KIEME.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-XDTNLL4L.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-YMLWFA65.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/chunk-ZPW6H6BB.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/combineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createBoxGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createBoxOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createCircleGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createCircleOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createCoplanarPolygonGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createCoplanarPolygonOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createCorridorGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createCorridorOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createCylinderGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createCylinderOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createEllipseGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createEllipseOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createEllipsoidGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createEllipsoidOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createFrustumGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createFrustumOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createGroundPolylineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createPlaneGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createPlaneOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createPolygonGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createPolygonOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createPolylineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createPolylineVolumeGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createPolylineVolumeOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createRectangleGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createRectangleOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createSimplePolylineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createSphereGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createSphereOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createTaskProcessorWorker.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createVectorTileClampedPolylines.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createVectorTileGeometries.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createVectorTilePoints.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createVectorTilePolygons.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createVectorTilePolylines.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createVerticesFromHeightmap.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createVerticesFromQuantizedTerrainMesh.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createWallGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/createWallOutlineGeometry.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/decodeDraco.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/decodeGoogleEarthEnterprisePacket.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/decodeI3S.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/image/richtextpoint1.png 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/transcodeKTX2.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Workers/upsampleQuantizedTerrainMesh.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/index.cjs 2761 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/index.js 2362 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/json/110000.geo copy.json 补丁 | 查看 | 原始文档 | blame | 历史
src/api/trApi.js 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/menu/TimeLine copy.vue 468 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/menu/TimeLine.vue 336 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/menu/TimeLine未优化版本.vue 524 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/monifangzhen/RiverLevel.vue 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tools/LayerTree.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/water.js 216 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Home.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CimSDK/Assets/Textures/water/1024_1024.png
public/CimSDK/CimSDK.min.css
@@ -1 +1,2 @@
.cesium-button{display:inline-block;position:relative;background:#303336;border:1px solid #444;color:#edffff;fill:#edffff;border-radius:4px;padding:5px 12px;margin:2px 3px;cursor:pointer;overflow:hidden;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.cesium-button:focus{color:#fff;fill:#fff;border-color:#ea4;outline:none}.cesium-button:hover{color:#fff;fill:#fff;background:#48b;border-color:#aef;box-shadow:0 0 8px #fff}.cesium-button:active{color:#000;fill:#000;background:#adf;border-color:#fff;box-shadow:0 0 8px #fff}.cesium-button:disabled,.cesium-button-disabled,.cesium-button-disabled:focus,.cesium-button-disabled:hover,.cesium-button-disabled:active{background:#303336;border-color:#444;color:#646464;fill:#646464;box-shadow:none;cursor:default}.cesium-button option{background-color:#000;color:#eee}.cesium-button option:disabled{color:#777}.cesium-button input,.cesium-button label{cursor:pointer}.cesium-button input{vertical-align:sub}.cesium-toolbar-button{box-sizing:border-box;width:32px;height:32px;border-radius:14%;padding:0;vertical-align:middle;z-index:0}.cesium-performanceDisplay-defaultContainer{position:absolute;top:50px;right:10px;text-align:right}.cesium-performanceDisplay{background-color:#282828b3;padding:7px;border-radius:5px;border:1px solid #444;font:700 12px sans-serif}.cesium-performanceDisplay-fps{color:#e52}.cesium-performanceDisplay-throttled{color:#a42}.cesium-performanceDisplay-ms{color:#de3}.cesium-animation-theme{visibility:hidden;display:block;position:absolute;z-index:-100}.cesium-animation-themeNormal{color:#222}.cesium-animation-themeHover{color:#4488b0}.cesium-animation-themeSelect{color:#242}.cesium-animation-themeDisabled{color:#333}.cesium-animation-themeKnob{color:#222}.cesium-animation-themePointer{color:#2e2}.cesium-animation-themeSwoosh{color:#8ac}.cesium-animation-themeSwooshHover{color:#aef}.cesium-animation-svgText{fill:#edffff;font-family:Sans-Serif;font-size:15px;text-anchor:middle}.cesium-animation-blank{fill:#000;fill-opacity:.01;stroke:none}.cesium-animation-rectButton{cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.cesium-animation-rectButton .cesium-animation-buttonGlow{fill:#fff;stroke:none;display:none}.cesium-animation-rectButton:hover .cesium-animation-buttonGlow{display:block}.cesium-animation-rectButton .cesium-animation-buttonPath{fill:#edffff}.cesium-animation-rectButton .cesium-animation-buttonMain{stroke:#444;stroke-width:1.2}.cesium-animation-rectButton:hover .cesium-animation-buttonMain{stroke:#aef}.cesium-animation-rectButton:active .cesium-animation-buttonMain{fill:#abd6ff}.cesium-animation-buttonDisabled{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.cesium-animation-buttonDisabled .cesium-animation-buttonMain{stroke:#555}.cesium-animation-buttonDisabled .cesium-animation-buttonPath{fill:#818181}.cesium-animation-buttonDisabled .cesium-animation-buttonGlow{display:none}.cesium-animation-buttonToggled .cesium-animation-buttonGlow{display:block;fill:#2e2}.cesium-animation-buttonToggled .cesium-animation-buttonMain{stroke:#2e2}.cesium-animation-buttonToggled:hover .cesium-animation-buttonGlow{fill:#fff}.cesium-animation-buttonToggled:hover .cesium-animation-buttonMain{stroke:#2e2}.cesium-animation-shuttleRingG,.cesium-animation-shuttleRingPointer,.cesium-animation-shuttleRingPausePointer{cursor:pointer}.cesium-animation-shuttleRingBack{fill:#181818;fill-opacity:.8;stroke:#333;stroke-width:1.2}.cesium-animation-shuttleRingSwoosh line{stroke:#8ac;stroke-width:3;stroke-opacity:.2;stroke-linecap:round}.cesium-animation-knobOuter{cursor:pointer;stroke:#444;stroke-width:1.2}.cesium-animation-knobInner{cursor:pointer}.cesium-baseLayerPicker-selected{position:absolute;top:0;left:0;width:100%;height:100%;border:none}.cesium-baseLayerPicker-dropDown{display:block;position:absolute;box-sizing:content-box;top:auto;right:0;width:320px;max-height:500px;margin-top:5px;background-color:#262626bf;border:1px solid #444;padding:6px;overflow:auto;border-radius:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;transform:translateY(-20%);visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in,transform .2s ease-in}.cesium-baseLayerPicker-dropDown-visible{transform:translate(0);visibility:visible;opacity:1;transition:opacity .2s ease-out,transform .2s ease-out}.cesium-baseLayerPicker-sectionTitle{display:block;font-family:sans-serif;font-size:16pt;text-align:left;color:#edffff;margin-bottom:4px}.cesium-baseLayerPicker-choices{margin-bottom:5px}.cesium-baseLayerPicker-categoryTitle{color:#edffff;font-size:11pt}.cesium-baseLayerPicker-choices{display:block;border:1px solid #888;border-radius:5px;padding:5px 0}.cesium-baseLayerPicker-item{display:inline-block;vertical-align:top;margin:2px 5px;width:64px;text-align:center;cursor:pointer}.cesium-baseLayerPicker-itemLabel{display:block;font-family:sans-serif;font-size:8pt;text-align:center;vertical-align:middle;color:#edffff;cursor:pointer;word-wrap:break-word}.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemLabel,.cesium-baseLayerPicker-item:focus .cesium-baseLayerPicker-itemLabel{text-decoration:underline}.cesium-baseLayerPicker-itemIcon{display:inline-block;position:relative;width:inherit;height:auto;background-size:100% 100%;border:solid 1px #444;border-radius:9px;color:#edffff;margin:0;padding:0;cursor:pointer;box-sizing:border-box}.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemIcon{border-color:#fff;box-shadow:0 0 8px #fff,0 0 8px #fff}.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemLabel{color:#bdecf8}.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemIcon{border:double 4px rgb(189,236,248)}.cesium-widget{font-family:sans-serif;font-size:16px;overflow:hidden;display:block;position:relative;top:0;left:0;width:100%;height:100%}.cesium-widget,.cesium-widget canvas{width:100%;height:100%;touch-action:none}.cesium-widget-credits{display:block;position:absolute;bottom:0;left:0;color:#fff;font-size:10px;text-shadow:0px 0px 2px #000000;padding-right:5px}.cesium-widget-errorPanel{position:absolute;inset:0;text-align:center;background:#000000b3;z-index:99999}.cesium-widget-errorPanel:before{display:inline-block;vertical-align:middle;height:100%;content:""}.cesium-widget-errorPanel-content{width:75%;max-width:500px;display:inline-block;text-align:left;vertical-align:middle;border:1px solid #510c00;border-radius:7px;background-color:#f0d9d5;font-size:14px;color:#510c00}.cesium-widget-errorPanel-content.expanded{max-width:75%}.cesium-widget-errorPanel-header{font-size:18px;font-family:Open Sans,Verdana,Geneva,sans-serif;background:#d69d93;border-bottom:2px solid #510c00;border-radius:3px 3px 0 0;padding:15px}.cesium-widget-errorPanel-scroll{overflow:auto;font-family:Open Sans,Verdana,Geneva,sans-serif;white-space:pre-wrap;padding:0 15px;margin:10px 0 20px}.cesium-widget-errorPanel-buttonPanel{padding:0 15px;margin:10px 0 20px;text-align:right}.cesium-widget-errorPanel-buttonPanel button{border-color:#510c00;background:#d69d93;color:#202020;margin:0}.cesium-widget-errorPanel-buttonPanel button:focus{border-color:#510c00;background:#f0d9d5;color:#510c00}.cesium-widget-errorPanel-buttonPanel button:hover{border-color:#510c00;background:#f0d9d5;color:#510c00}.cesium-widget-errorPanel-buttonPanel button:active{border-color:#510c00;background:#b17b72;color:#510c00}.cesium-widget-errorPanel-more-details{text-decoration:underline;cursor:pointer}.cesium-widget-errorPanel-more-details:hover{color:#2b0700}.cesium-cesiumInspector{border-radius:5px;transition:width ease-in-out .25s;background:#303336cc;border:1px solid #444;color:#edffff;display:inline-block;position:relative;padding:4px 12px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden}.cesium-cesiumInspector-button{text-align:center;font-size:11pt}.cesium-cesiumInspector-visible .cesium-cesiumInspector-button{border-bottom:1px solid #aaa;padding-bottom:3px}.cesium-cesiumInspector input:enabled,.cesium-cesiumInspector-button{cursor:pointer}.cesium-cesiumInspector-visible{width:210px;height:auto}.cesium-cesiumInspector-hidden{width:122px;height:17px}.cesium-cesiumInspector-sectionContent{max-height:500px}.cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionContent{max-height:0;padding:0!important;overflow:hidden}.cesium-cesiumInspector-dropDown{margin:5px 0;font-family:sans-serif;font-size:10pt;width:185px}.cesium-cesiumInspector-frustumStatistics{padding:5px;background-color:#505050bf}.cesium-cesiumInspector-pickButton{background-color:#0000004d;border:1px solid #444;color:#edffff;border-radius:5px;padding:3px 7px;cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;margin:0 auto}.cesium-cesiumInspector-pickButton:focus{outline:none}.cesium-cesiumInspector-pickButton:active,.cesium-cesiumInspector-pickButtonHighlight{color:#000;background:#adf;border-color:#fff;box-shadow:0 0 8px #fff}.cesium-cesiumInspector-center{text-align:center}.cesium-cesiumInspector-sectionHeader{font-weight:700;font-size:10pt;margin:0;cursor:pointer}.cesium-cesiumInspector-pickSection{border:1px solid #aaa;border-radius:5px;padding:3px;margin-bottom:5px}.cesium-cesiumInspector-sectionContent{margin-bottom:10px;transition:max-height .25s}.cesium-cesiumInspector-tileText{padding-bottom:10px;border-bottom:1px solid #aaa}.cesium-cesiumInspector-relativeText{padding-top:10px}.cesium-cesiumInspector-sectionHeader:before{margin-right:5px;content:"-";width:1ch;display:inline-block}.cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionHeader:before{content:"+"}ul.cesium-cesiumInspector-statistics{margin:0;padding-top:3px;padding-bottom:3px}ul.cesium-cesiumInspector-statistics+ul.cesium-cesiumInspector-statistics{border-top:1px solid #aaa}.cesium-cesiumInspector-slider{margin-top:5px}.cesium-cesiumInspector-slider input[type=number]{text-align:left;background-color:#222;outline:none;border:1px solid #444;color:#edffff;width:100px;border-radius:3px;padding:1px;margin-left:10px;cursor:auto}.cesium-cesiumInspector-slider input[type=number]::-webkit-outer-spin-button,.cesium-cesiumInspector-slider input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.cesium-cesiumInspector-slider input[type=range]{margin-left:5px;vertical-align:middle}.cesium-cesiumInspector-hide .cesium-cesiumInspector-styleEditor{display:none}.cesium-cesiumInspector-styleEditor{padding:10px;border-radius:5px;background:#303336cc;border:1px solid #444}.cesium-cesiumInspector-styleEditor textarea{width:100%;height:300px;background:transparent;color:#edffff;border:none;padding:0;white-space:pre;overflow-wrap:normal;overflow-x:auto}.cesium-3DTilesInspector{width:300px;pointer-events:all}.cesium-3DTilesInspector-statistics{font-size:11px}.cesium-3DTilesInspector-disabledElementsInfo{margin:5px 0 0;padding:0 0 0 20px;color:#eed202}.cesium-3DTilesInspector div,.cesium-3DTilesInspector input[type=range]{width:100%;box-sizing:border-box}.cesium-cesiumInspector-error{color:#ff9e9e;overflow:auto}.cesium-3DTilesInspector .cesium-cesiumInspector-section{margin-top:3px}.cesium-3DTilesInspector .cesium-cesiumInspector-sectionHeader+.cesium-cesiumInspector-show{border-top:1px solid white}input.cesium-cesiumInspector-url{overflow:hidden;white-space:nowrap;overflow-x:scroll;background-color:transparent;color:#fff;outline:none;border:none;height:1em;width:100%}.cesium-cesiumInspector .field-group{display:table}.cesium-cesiumInspector .field-group>label{display:table-cell;font-weight:700}.cesium-cesiumInspector .field-group>.field{display:table-cell;width:100%}.cesium-VoxelInspector{width:300px;pointer-events:all}.cesium-VoxelInspector div,.cesium-VoxelInspector input[type=range]{width:100%;box-sizing:border-box}.cesium-VoxelInspector .cesium-cesiumInspector-section{margin-top:3px}.cesium-VoxelInspector .cesium-cesiumInspector-sectionHeader+.cesium-cesiumInspector-show{border-top:1px solid white}.cesium-button.cesium-fullscreenButton,.cesium-button.cesium-vrButton{display:block;width:100%;height:100%;margin:0;border-radius:0}.cesium-viewer-geocoderContainer .cesium-geocoder-input{border:solid 1px #444;background-color:#282828b3;color:#fff;display:inline-block;vertical-align:middle;width:0;height:32px;margin:0;padding:0 32px 0 0;border-radius:0;box-sizing:border-box;transition:width ease-in-out .25s,background-color .2s ease-in-out;-webkit-appearance:none}.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input{border-color:#aef;box-shadow:0 0 8px #fff}.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus{border-color:#ea4;background-color:#0f0f0fe6;box-shadow:none;outline:none}.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input,.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus,.cesium-viewer-geocoderContainer .cesium-geocoder-input-wide{padding-left:4px;width:250px}.cesium-viewer-geocoderContainer .search-results{position:absolute;background-color:#000;color:#eee;overflow-y:auto;opacity:.8;width:100%}.cesium-viewer-geocoderContainer .search-results ul{list-style-type:none;margin:0;padding:0}.cesium-viewer-geocoderContainer .search-results ul li{font-size:14px;padding:3px 10px}.cesium-viewer-geocoderContainer .search-results ul li:hover{cursor:pointer}.cesium-viewer-geocoderContainer .search-results ul li.active{background:#48b}.cesium-geocoder-searchButton{background-color:#303336;display:inline-block;position:absolute;cursor:pointer;width:32px;top:1px;right:1px;height:30px;vertical-align:middle;fill:#edffff}.cesium-geocoder-searchButton:hover{background-color:#48b}.cesium-infoBox{display:block;position:absolute;top:50px;right:0;width:40%;max-width:480px;background:#262626f2;color:#edffff;border:1px solid #444;border-right:none;border-top-left-radius:7px;border-bottom-left-radius:7px;box-shadow:0 0 10px 1px #000;transform:translate(100%);visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in,transform .2s ease-in}.cesium-infoBox-visible{transform:translate(0);visibility:visible;opacity:1;transition:opacity .2s ease-out,transform .2s ease-out}.cesium-infoBox-title{display:block;height:20px;padding:5px 30px 5px 25px;background:#545454;border-top-left-radius:7px;text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;box-sizing:content-box}.cesium-infoBox-bodyless .cesium-infoBox-title{border-bottom-left-radius:7px}button.cesium-infoBox-camera{display:block;position:absolute;top:4px;left:4px;width:22px;height:22px;background:transparent;border-color:transparent;border-radius:3px;padding:0 5px;margin:0}button.cesium-infoBox-close{display:block;position:absolute;top:5px;right:5px;height:20px;background:transparent;border:none;border-radius:2px;font-weight:700;font-size:16px;padding:0 5px;margin:0;color:#edffff}button.cesium-infoBox-close:focus{background:#ee880070;outline:none}button.cesium-infoBox-close:hover{background:#888;color:#000}button.cesium-infoBox-close:active{background:#a00;color:#000}.cesium-infoBox-bodyless .cesium-infoBox-iframe{display:none}.cesium-infoBox-iframe{border:none;width:100%;width:calc(100% - 2px)}span.cesium-sceneModePicker-wrapper{display:inline-block;position:relative;margin:0 3px}.cesium-sceneModePicker-visible{visibility:visible;opacity:1;transition:opacity .25s linear}.cesium-sceneModePicker-hidden{visibility:hidden;opacity:0;transition:visibility 0s .25s,opacity .25s linear}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-none{display:none}.cesium-sceneModePicker-slide-svg{transition:left 2s;top:0;left:0}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-dropDown-icon{box-sizing:border-box;padding:0;margin:3px 0}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D{margin:0 0 3px}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-icon2D{left:100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-iconColumbusView{left:200%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon3D{left:-200%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon2D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-icon3D{left:-100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-iconColumbusView{left:100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-selected{border-color:#2e2;box-shadow:0 0 8px #fff,0 0 8px #fff}span.cesium-projectionPicker-wrapper{display:inline-block;position:relative;margin:0 3px}.cesium-projectionPicker-visible{visibility:visible;opacity:1;transition:opacity .25s linear}.cesium-projectionPicker-hidden{visibility:hidden;opacity:0;transition:visibility 0s .25s,opacity .25s linear}.cesium-projectionPicker-wrapper .cesium-projectionPicker-none{display:none}.cesium-projectionPicker-wrapper .cesium-projectionPicker-dropDown-icon{box-sizing:border-box;padding:0;margin:3px 0}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective,.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic{margin:0 0 3px}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective .cesium-projectionPicker-iconOrthographic{left:100%}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic .cesium-projectionPicker-iconPerspective{left:-100%}.cesium-projectionPicker-wrapper .cesium-projectionPicker-selected{border-color:#2e2;box-shadow:0 0 8px #fff,0 0 8px #fff}.cesium-performance-watchdog-message-area{position:relative;background-color:#ff0;color:#000;padding:10px}.cesium-performance-watchdog-message{margin-right:30px}.cesium-performance-watchdog-message-dismiss{position:absolute;right:0;margin:0 10px 0 0}.cesium-navigationHelpButton-wrapper{position:relative;display:inline-block}.cesium-navigation-help{visibility:hidden;position:absolute;top:38px;right:2px;width:250px;border-radius:10px;transform:scale(.01);transform-origin:234px -10px;transition:visibility 0s .25s,transform .25s ease-in}.cesium-navigation-help-visible{visibility:visible;transform:scale(1);transition:transform .25s ease-out}.cesium-navigation-help-instructions{border:1px solid #444;background-color:#262626bf;padding-bottom:5px;border-radius:0 0 10px 10px}.cesium-click-navigation-help{display:none}.cesium-touch-navigation-help{display:none;padding-top:5px}.cesium-click-navigation-help-visible,.cesium-touch-navigation-help-visible{display:block}.cesium-navigation-help-pan{color:#6cf;font-weight:700}.cesium-navigation-help-zoom{color:#65fd00;font-weight:700}.cesium-navigation-help-rotate{color:#ffd800;font-weight:700}.cesium-navigation-help-tilt{color:#d800d8;font-weight:700}.cesium-navigation-help-details{color:#fff}.cesium-navigation-button{color:#fff;background-color:transparent;border-bottom:none;border-top:1px solid #444;border-right:1px solid #444;margin:0;width:50%;cursor:pointer}.cesium-navigation-button-icon{vertical-align:middle;padding:5px 1px}.cesium-navigation-button:focus{outline:none}.cesium-navigation-button-left{border-radius:10px 0 0;border-left:1px solid #444}.cesium-navigation-button-right{border-radius:0 10px 0 0;border-left:none}.cesium-navigation-button-selected{background-color:#262626bf}.cesium-navigation-button-unselected{background-color:#000000bf}.cesium-navigation-button-unselected:hover{background-color:#4c4c4cbf}.cesium-selection-wrapper{position:absolute;width:160px;height:160px;pointer-events:none;visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in}.cesium-selection-wrapper-visible{visibility:visible;opacity:1;transition:opacity .2s ease-out}.cesium-selection-wrapper svg{fill:#2e2;stroke:#000;stroke-width:1.1px}.cesium-timeline-main{position:relative;left:0;bottom:0;overflow:hidden;border:solid 1px #888;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.cesium-timeline-trackContainer{width:100%;overflow:auto;border-top:solid 1px #888;position:relative;top:0;left:0}.cesium-timeline-tracks{position:absolute;top:0;left:0;width:100%}.cesium-timeline-needle{position:absolute;left:0;top:1.7em;bottom:0;width:1px;background:red}.cesium-timeline-bar{position:relative;left:0;top:0;overflow:hidden;cursor:pointer;width:100%;height:1.7em;background:linear-gradient(to bottom,#747577cc,#3a4452cc 11%,#2e3238cc 46%,#353535cc 81% 100%)}.cesium-timeline-ruler{visibility:hidden;white-space:nowrap;font-size:80%;z-index:-200}.cesium-timeline-highlight{position:absolute;bottom:0;left:0;background:#08f}.cesium-timeline-ticLabel{position:absolute;top:0;left:0;white-space:nowrap;font-size:80%;color:#eee}.cesium-timeline-ticMain{position:absolute;bottom:0;left:0;width:1px;height:50%;background:#eee}.cesium-timeline-ticSub{position:absolute;bottom:0;left:0;width:1px;height:33%;background:#aaa}.cesium-timeline-ticTiny{position:absolute;bottom:0;left:0;width:1px;height:25%;background:#888}.cesium-timeline-icon16{display:block;position:absolute;width:16px;height:16px;background-image:url(data:text/plain;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAQCAYAAAB3AH1ZAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sIDBITKIVzLEMAAAKNSURBVEjHxdXNSxRhHAfw7zzrqhuoWJnSkrippUVSEKsHI9BTUYdAJA/RoYMREV26rAdn6tAfUARi16hQqkOBQRgUEYFWEC3OwczMjdZd92VmdWfmeelgTjO7q7gb0VzmmZnn85vvPPPMM8B/3qTcE2PPpuTZKB1eWuUQACgXYACYwVFbCTTVeZXB/i55o4LFelcAZfStYD4vpAoPGAGo4GBcQEgSOAUMQyAezwK6iQfDPXnhS/FkHZ+/8VLMWxxqWkfH3gbMRNOYi2roavbja0zHQmoFPYf8ED4Ko4aivm9MOG/u9I8mwrafeK7a/tVrNc/bARYN5noadeq7q0342vXw9CIMU6BmW8rVP9cPBPe52uu+v3O/y9sB4gkTWs6Qsk0mj5ExXMelejvA8WafYmkmGPHanTijdtvif8rx5RiCjdWKs2Cp3jWRDl96KhrbqlBeJqBOLyLQXg0IgbkZDS0dO8EZxZfPSTA9jvDDK3mT0OmP1FXh3XwEEAKdTX5MRWLgjCK4pwH3xt/YnjgLHAv4lHTCAKMMu/wV+KZGob6PoKyMQ0+sgBpZVJZn0NterxQaVqef/DRn+/EXYds/mZx2eVeAW9d65dhCEsaKCb7K8HH0gqTevyh9GDkn0VULRiaLzJKGBu9swfdaiie5RVo9ESURN8E8BE0n7ggACJy8KzghSCzp6DmwWxkaCm24EBXr8wI8Hrkq06QBiRC0t24HALS11IBTCyJl4vb1AXmzpbVYTwoVOXN0h7L8Mwtm8bXPybIQ/5FCX3dA2cr6XowvGCA02CvztAnz9+JiZk1AMxG6fEreSoBiPNmoyNnuWiWVzAIAtISO08E6pZi/3N96AIDn4E3h3P8L/wshP+txtEs4JAAAAABJRU5ErkJggg==);background-repeat:no-repeat}.cesium-viewer{font-family:sans-serif;font-size:16px;overflow:hidden;display:block;position:relative;top:0;left:0;width:100%;height:100%}.cesium-viewer-cesiumWidgetContainer{width:100%;height:100%}.cesium-viewer-bottom{display:block;position:absolute;bottom:0;left:0;padding-right:5px}.cesium-viewer .cesium-widget-credits{display:inline;position:static;bottom:auto;left:auto;padding-right:0;color:#fff;font-size:10px;text-shadow:0 0 2px #000000}.cesium-viewer-timelineContainer{position:absolute;bottom:0;left:169px;right:29px;height:27px;padding:0;margin:0;overflow:hidden;font-size:14px}.cesium-viewer-animationContainer{position:absolute;bottom:0;left:0;padding:0;width:169px;height:112px}.cesium-viewer-fullscreenContainer,.cesium-viewer-vrContainer{position:absolute;bottom:0;right:0;padding:0;width:29px;height:29px;overflow:hidden}.cesium-viewer-toolbar{display:block;position:absolute;top:5px;right:5px}.cesium-viewer-cesiumInspectorContainer{display:block;position:absolute;top:50px;right:10px}.cesium-viewer-geocoderContainer{position:relative;display:inline-block;margin:0 3px}.cesium-viewer-cesium3DTilesInspectorContainer,.cesium-viewer-voxelInspectorContainer{display:block;position:absolute;top:50px;right:10px;max-height:calc(100% - 120px);box-sizing:border-box;overflow-y:auto;overflow-x:hidden}.cesium-viewer-i3s-explorer ul{list-style-type:none}.cesium-viewer-i3s-explorer .layersList{padding:0}.cesium-viewer-i3s-explorer input{margin:0 3px 0 0}.cesium-viewer-i3s-explorer .expandItem{cursor:pointer;user-select:none;width:20px}.cesium-viewer-i3s-explorer .nested,.cesium-viewer-i3s-explorer #bsl-wrapper{display:none}.cesium-viewer-i3s-explorer .active{display:block}.cesium-viewer-i3s-explorer .li-wrapper{display:flex;flex-direction:row;align-content:center}.divPoint-camera-content{height:30px}.divPoint-camera-img{width:30px;height:30px;animation:cameraMove 1s linear infinite alternate;-webkit-animation:cameraMove 1s linear infinite alternate}@keyframes cameraMove{0%{margin-top:20px}to{margin-top:0}}@-webkit-keyframes cameraMove{0%{margin-top:20px}to{margin-top:0}}.divPoint-camera-line{height:120px;width:5px;margin-top:20px;border-left:3px dashed #5b8fee;margin-left:calc(50% - 1px)}.divPoint-camera-point{border-radius:50%;width:8px;height:8px;margin-left:calc(50% - 3px);background-color:#5b8fee}body,html{height:100%;margin:0;padding:0;overflow:hidden;user-select:none}#cesiumContainer{width:100%;height:100%;background-color:#000;background-size:cover}.navigation-controls{position:absolute;right:30px;top:210px;width:30px;border:1px solid rgba(255,255,255,.1);font-weight:300;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.funcBox{position:absolute;top:30px;padding:10px;background-color:#000000b3;border-radius:4px;left:20px}.funcBox label{color:#fff!important}blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,li,ol,p,pre,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}a:active,a:hover{outline:0}li{list-style:none}#sdkContainer{width:100%;height:100%;background-color:#000;background-size:cover}.cesium-viewer-cesiumInspectorContainer,.cesium-viewer-animationContainer,.cesium-viewer-timelineContainer{display:none}.distance-legend{right:75px!important;bottom:38px!important}.resultToolTipClose{padding-right:16px!important}.resultToolTipClose:after{content:"x";font:16px/14px Tahoma,Verdana,sans-serif;position:absolute;pointer-events:all;cursor:pointer;top:0;right:0;padding:4px 4px 0 0;font-weight:700}.other-class{border-radius:5px;background-color:#00000080!important;border:1px solid rgba(32,160,255,.6)!important}.other-class .layui-layer-title{background:#777;font-weight:700;color:#fff}.other-class .layui-layer-content{background:rgba(0,0,0,0)}.layui-layer-setwin .layui-layer-close1{background-position:-95px -130px}.layui-layer-iframe{overflow-y:hidden!important}.smartEarthBlackPanel{min-width:90px;min-height:35px;position:absolute;left:16px;bottom:31px;cursor:default;opacity:.96;border:1px solid #14171c;box-shadow:0 2px 21px #2122278c;border-radius:4px;box-sizing:border-box;background:linear-gradient(0deg,#1e202a 0%,#0d1013 100%)}.smartEarthBlackPanel:before{content:"";width:calc(100% + 22px);height:39px;position:absolute;bottom:-39px;left:-22px;background:url(data:text/plain;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAAAlCAYAAACj1PQVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTJFMTU1RjExN0UzMTFFOTg3RTBFODdGNTY0NThGQkUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTJFMTU1RjIxN0UzMTFFOTg3RTBFODdGNTY0NThGQkUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxMkUxNTVFRjE3RTMxMUU5ODdFMEU4N0Y1NjQ1OEZCRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoxMkUxNTVGMDE3RTMxMUU5ODdFMEU4N0Y1NjQ1OEZCRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pj97JFoAAAV9SURBVHja7N1faJ1nHQfw33nzpuekaZfWNFmbLHXWdf7DWgvebF4M0SEZhTG8mKvFyzG9UJFKh9peVGnd0DkE/10Ic6s6BBEGbshggho3BVGnRnC2s1n/ras2J2uzc05PXp+3yZzSm7XJkvfi84HveZ9z3ve8F7/bL8/71oqiiMs8NhCLsCllfcpfAwAAAAAAAIDlsXM68jfgtl9K2Z3Sa8IAAAAAAAAAb7hjKW8uF9kS3/jdKR9PaZkxAAAAAAAAwPJa6h3A96X0pBxK+bLxAgAAAAAAACyfpSyAP5jy4ZQXUh747687p00ZAAAAAAAAYBlkS3if+xfW+1MuGC0AAAAAAADA8lqqAnh3yvaUZ1MeMlYAAAAAAACA5bcUBXBfyoGF9edSusYKAAAAAAAAsPyWogD+VMpYypMpTxgpAAAAAAAAwMpYbAG8IWVvylzKHuMEAAAAAAAAWDmLLYC/mDKQ8nDKH4wTAAAAAAAAYOUspgC+IeWelNmYL4IBAAAAAAAAWEGLKYAPpfSmfD1lyigBAAAAAAAAVtbVFsA3pdyR8lLMF8EAAAAAAAAArLCrKYBrKfcvHA+kNI0RAAAAAAAAYOVdTQFc7vwtdwA/l/ItIwQAAAAAAACohistgMt3/h5cWO9N6RghAAAAAAAAQDVcaQF8d8rWlImUnxgfAAAAAAAAQHVcSQF8Tcq+lCJlz8IRAAAAAAAAgIq4kgK4fOTzUMzv/J0wOgAAAAAAAIBqeb0F8FjKp2P+nb97jQ0AAAAAAACgel5vAXwgpS/l2ynPGRsAAAAAAABA9eSjd370sh+P7/q/r9tTdqc0Y74IBgAAAAAAAKCC8v9Zl7uB6yn9o4fHG+lYS2n/867Hv5bXivLcoZQzRgYAAAAAAABQTfnw5nvjxWMHe9N6cP+OyVtv2nj2ruFG6209WbGqM5c181rx9m5RO/ngn2/4zlf/tLV2fNfPCmMDAAAAAAAAqJ68LH+HGq2xRz7wu2+8a31zvCgiLs5FlC3vqp4YKS8638mzqZf7tqXlb1MuGBsAAAAAAABA9ZSPdh58tfyd7UScOh9xYjqLszNZlGVwN6U/71z7hR1/e/g9g9NbRg+P9xobAAAAAAAAQPVk+3ZMfujV8vf0TC3WXWzE9ZveHyNjt0UxOxCnp7NotiPWr2pfl67dk/6zxtgAAAAAAAAAqie7eePZXeVO33OtiOGsHqtvfjDi1scibnkkesafipHVI3HuQi3a3Yh3rpsZT/+5ZvTweM3oAAAAAAAAAKolH2q0byzf+dtuZ9G/8b0RW+587ezat0a84xPR+8z+aHU7MVDvbLhl05lrf3FyaGr08Hj5muA4/qMfmiIAAAAAAABABWS1KPJLTW75UR+8/Ir6uksvCi6K+a/Dfa26sQEAAAAAAABUT/ZyJz+Z19IiL6J7eiLi/NRrZ4tuxNEfRzvmorcnoj2XvfL41MZTMV8XAwAAAAAAAFAh2eS5tU9kWcRAo4ipC9MRP98ZMfnNiH/8IOLJO+LMC7+ORl83Gj0RR5r9z8x08nOhAAYAAAAAAAConPyzT2976H1D//7YYL21ZW5NN442n4/ep/ddeuxzK+air68bb2pEdCN75dEj192Xfp4xNgAAAAAAAIDqyWY6+akHnt16d7Oz6uRAPWJkoIi1azuxek0nhge6MdQXUatlrZ8+P/L5706+ZSLKXhgAAAAAAACAyik3+s5+/++bJ+751fbbfv/S+kc7c/l0WQSva0TUe2rtIzNrJr7yxxs/8pnfbPteurY5vPlej38GAAAAAAAAqKC8LHRfPHZw9penNvwl5ZP1nrmB268/MdafX+x96sTQ8aMz/f9K102ntJS/AAAAAAAAANX1HwEGAM75MhcANnAkAAAAAElFTkSuQmCC) 0px 0px no-repeat;background-position:0px 0px}.smartEarthBlackPanel-text{width:100%;height:100%;min-height:33px;text-align:center;padding:10px 5px 0;margin:0;font-size:14px;font-weight:400;color:#fff;border:1px solid #ffffff4f;-webkit-box-sizing:border-box;box-sizing:border-box;white-space:nowrap}.smartEarth3d-divBoderLabel{position:absolute;left:0;bottom:0;cursor:pointer;--animation-name: mars3d-divBoderLabel-animation;--text-left-position: -75px;--text-font-size: 15px;--boder-width: 162px;--clip-width-1: 177px;--clip-width-2: 175px;--boder-height: 30px;--clip-height-1: 40px;--clip-height-2: 38px;--text-color: #ccc;--border-color: #15d1f2;--box-shadow-color: rgba(21, 209, 242, .56)}.smartEarth3d-divBoderLabel-boder,.smartEarth3d-divBoderLabel-boder:before,.smartEarth3d-divBoderLabel-boder:after{position:absolute;inset:0}.smartEarth3d-divBoderLabel-boder{width:var(--boder-width);height:var(--boder-height);margin:auto;color:var(--border-color);box-shadow:inset 0 0 0 1px var(--box-shadow-color)}.smartEarth3d-divBoderLabel-boder:before{animation-delay:-4s}.smartEarth3d-divBoderLabel-boder:before,.smartEarth3d-divBoderLabel-boder:after{content:"";margin:-5%;box-shadow:inset 0 0 0 2px;animation:mars3d-divBoderLabel-animation 8s linear infinite}.smartEarth3d-divBoderLabel-text{color:var(--text-color);font-size:var(--text-font-size);display:flex;width:100%;height:100%;align-items:center;justify-content:center;font-weight:bolder;user-select:none;cursor:pointer}@keyframes mars3d-divBoderLabel-animation{0%,to{clip:rect(0px,var(--clip-width-1),2px,0px)}25%{clip:rect(0px,2px,var(--clip-height-1),0px)}50%{clip:rect(var(--clip-height-2),var(--clip-width-1),var(--clip-width-1),0px)}75%{clip:rect(0px,var(--clip-width-1),var(--clip-height-1),var(--clip-width-2))}}.smartErath3d-divGraphic{position:absolute;left:0;top:0}.smartErath3d-animation-point{width:10px;height:10px;border-radius:50%;border:1px solid hsla(0,0%,100%,.5);cursor:pointer;color:#0ff;background:currentColor;z-index:3;left:50%;top:50%;transform:translate(-50%,-50%);box-shadow:0 0 2em currentColor,0 0 .5em currentColor;position:absolute}.smartErath3d-animation-point:after,.smartErath3d-animation-point:before,.smartErath3d-animation-point p:after,.smartErath3d-animation-point p:before{content:"";position:absolute;width:100%;height:100%;left:50%;top:50%;border-radius:50%;transform:translate(-50%,-50%)}.smartErath3d-animation-point:after,.smartErath3d-animation-point:before{border:1px solid;animation:smartErath3d-animation-point-mapAni 1s ease infinite}.smartErath3d-animation-point p:before{border:1px solid}.smartErath3d-animation-point,.smartErath3d-animation-point:after,.smartErath3d-animation-point:before,.smartErath3d-animation-point p,.smartErath3d-animation-point p:after,.smartErath3d-animation-point p:before{margin:0;padding:0;box-sizing:border-box}.smartErath3d-animation-point p{position:absolute;left:50%;top:50%;width:0;height:0;border-radius:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-animation:smartErath3d-animation-point-mapAni 2s ease infinite;-moz-animation:smartErath3d-animation-point-mapAni 2s ease infinite;-o-animation:smartErath3d-animation-point-mapAni 2s ease infinite;-ms-animation:smartErath3d-animation-point-mapAni 2s ease infinite;animation:smartErath3d-animation-point-mapAni 2s ease infinite}.smartErath3d-wave-main,.smartErath3d-wave{width:100px;height:100px;border-radius:50%;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}.smartErath3d-wave{background:darkturquoise;overflow:hidden}.smartErath3d-wave:after{content:"";width:112px;height:110px;background:rgba(255,255,255,.8);position:absolute;left:50%;top:-5%;transform:var(--transform);border-radius:40%;animation:smartErath3d-wave 5s linear infinite}.smartErath3d-wave:before{content:var(--text-context);position:absolute;left:50%;top:0;color:#17a4a6;z-index:99;transform:translate(-50%,17px)}@keyframes smartErath3d-wave{to{transform:var(--transform) rotate(360deg)}}@-webkit-keyframes smartErath3d-animation-point-mapAni{0%{width:0;height:0;opacity:1;filter:alpha(opacity=1)}25%{width:120%;height:120%;opacity:.7;filter:alpha(opacity=70)}50%{width:200%;height:200%;opacity:.5;filter:alpha(opacity=50)}75%{width:300%;height:300%;opacity:.2;filter:alpha(opacity=20)}to{width:400%;height:400%;opacity:0;filter:alpha(opacity=0)}}@-moz-keyframes smartErath3d-animation-point-mapAni{0%{width:0;height:0;opacity:1;filter:alpha(opacity=1)}25%{width:120%;height:120%;opacity:.7;filter:alpha(opacity=70)}50%{width:200%;height:200%;opacity:.5;filter:alpha(opacity=50)}75%{width:300%;height:300%;opacity:.2;filter:alpha(opacity=20)}to{width:400%;height:400%;opacity:0;filter:alpha(opacity=0)}}@-o-keyframes smartErath3d-animation-point-mapAni{0%{width:0;height:0;opacity:1;filter:alpha(opacity=1)}25%{width:120%;height:120%;opacity:.7;filter:alpha(opacity=70)}50%{width:200%;height:200%;opacity:.5;filter:alpha(opacity=50)}75%{width:300%;height:300%;opacity:.2;filter:alpha(opacity=20)}to{width:400%;height:400%;opacity:0;filter:alpha(opacity=0)}}@-ms-keyframes smartErath3d-animation-point-mapAni{0%{width:0;height:0;opacity:1;filter:alpha(opacity=1)}25%{width:120%;height:120%;opacity:.7;filter:alpha(opacity=70)}50%{width:200%;height:200%;opacity:.5;filter:alpha(opacity=50)}75%{width:300%;height:300%;opacity:.2;filter:alpha(opacity=20)}to{width:400%;height:400%;opacity:0;filter:alpha(opacity=0)}}@keyframes smartErath3d-animation-point-mapAni{0%{width:0;height:0;opacity:1;filter:alpha(opacity=1)}25%{width:120%;height:120%;opacity:.7;filter:alpha(opacity=70)}50%{width:200%;height:200%;opacity:.5;filter:alpha(opacity=50)}75%{width:300%;height:300%;opacity:.2;filter:alpha(opacity=20)}to{width:400%;height:400%;opacity:0;filter:alpha(opacity=0)}}html{height:100%}body{height:100%;width:100%;margin:0;overflow:hidden;padding:0;background:#000}.fullWindow{position:absolute;top:0;left:0;height:100%;width:100%;margin:0;overflow:hidden;padding:0;font-family:sans-serif;background-color:#000;background-size:cover}.loadingIndicator{display:block;position:absolute;top:50%;left:50%;margin-top:-33px;margin-left:-33px;width:66px;height:66px;background-position:center;background-repeat:no-repeat}.button{overflow:hidden;z-index:1000;position:relative}.map-widget{position:relative}.map-widget,.map-widget canvas{width:100%;height:100%;touch-action:none}.map-widget-credits{display:none;position:absolute;bottom:0;left:0;color:#fff;font-size:10px;text-shadow:0 0 2px #000000;padding-right:5px}.map-widget-credits a,.map-widget-credits a:visited{color:#fff}.map-widget-errorPanel{position:absolute;inset:0;text-align:center;background:rgba(0,0,0,.7);z-index:99999}.map-widget-errorPanel:before{display:inline-block;vertical-align:middle;height:100%;content:""}.map-widget-errorPanel-content{width:75%;display:inline-block;text-align:left;vertical-align:middle;border:1px solid #526f82;border-radius:7px;background-color:#000;color:#fff;font-size:10pt;padding:1em}.map-widget-errorPanel-header{font-size:120%;color:#fe4}.map-widget-errorPanel-scroll{overflow:auto;font-family:monospace;white-space:pre-wrap;padding:0;margin:10px 0}.map-widget-errorPanel-buttonPanel{text-align:center}.cesium-svgPath-svg{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden}.tooltipdiv{display:block;position:absolute;visibility:visible;opacity:.7}.map-performanceDisplay-defaultContainer{position:absolute;top:50px;right:10px;text-align:right}.full-window{position:absolute;inset:0;margin:0;overflow:hidden;padding:0;-webkit-transition:left .25s ease-out;-moz-transition:left .25s ease-out;-ms-transition:left .25s ease-out;-o-transition:left .25s ease-out;transition:left .25s ease-out}.transparent-to-input{pointer-events:none}.opaque-to-input{pointer-events:auto}.clickable{cursor:pointer}a:hover{text-decoration:underline}#ui{z-index:2100}@media print{.full-window{position:initial}}.floating{pointer-events:auto;position:absolute;border-radius:15px}.floating-horizontal{pointer-events:auto;position:absolute;border-radius:15px;padding-left:5px;padding-right:5px}.floating-vertical{pointer-events:auto;position:absolute;border-radius:15px;padding-top:5px;padding-bottom:5px}@media print{.floating{display:none}}.distance-legend{pointer-events:auto;position:absolute;border-radius:15px;padding-left:5px;padding-right:5px;bottom:30px;height:30px;width:125px;box-sizing:content-box}.distance-legend-label{display:inline-block;font-family:Roboto,sans-serif;font-size:14px;font-weight:lighter;line-height:30px;color:#fff;width:125px;text-align:center}.distance-legend-scale-bar{border-left:1px solid #ffffff;border-right:1px solid #ffffff;border-bottom:1px solid #ffffff;position:absolute;height:10px;top:15px}@media print{.distance-legend{display:none}}@media screen and (max-width: 700px),screen and (max-height: 420px){.distance-legend{display:none}}.navigation-controls{background-color:#35353840;position:absolute;right:30px;top:210px;width:30px;border:1px solid rgba(255,255,255,.1);font-weight:300;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.navigation-control{cursor:pointer;border-bottom:1px solid #555555}.naviagation-control:active{color:#fff}.navigation-control-last{cursor:pointer;border-bottom:1px solid #555555;border-bottom:0}.navigation-control-icon-zoom-in{position:relative;text-align:center;font-size:20px;color:#fff;padding-bottom:4px}.navigation-control-icon-zoom-out{position:relative;text-align:center;font-size:20px;color:#fff}.navigation-control-icon-reset{position:relative;left:10px;width:10px;height:10px;fill:#fffc;padding-top:6px;padding-bottom:6px;box-sizing:content-box}.compass{pointer-events:auto;position:absolute;right:0;top:100px;width:95px;height:95px;overflow:hidden}.compass-outer-ring{position:absolute;top:0;width:95px;height:95px;fill:#ffffff80}.compass-outer-ring-background{position:absolute;top:14px;left:14px;width:44px;height:44px;border-radius:44px;border:12px solid rgba(47,53,60,.8);box-sizing:content-box}.compass-gyro{pointer-events:none;position:absolute;top:0;width:95px;height:95px;fill:#ccc}.compass-gyro-active{fill:#68adfe}.compass-gyro-background{position:absolute;top:30px;left:30px;width:33px;height:33px;border-radius:33px;background-color:#2f353ccc;border:1px solid rgba(255,255,255,.2);box-sizing:content-box}.compass-gyro-background:hover+.compass-gyro{fill:#68adfe}.compass-rotation-marker{position:absolute;top:0;width:95px;height:95px;fill:#68adfe}.infoview{position:absolute;top:10px;left:10px;padding:10px 15px;border-radius:4px;border:1px solid rgba(128,128,128,.5);color:#fff;background:rgba(0,0,0,.4);box-shadow:0 3px 14px #80808080;z-index:9999}.infoview input,.infoview select,.infoview textarea{color:#fff;background-color:#20a0ff33;border:1px solid #e4eaec;font-size:14px}@media screen and (max-width: 700px),screen and (max-height: 420px){.navigation-controls,.compass{display:none}}@media print{.navigation-controls,.compass{display:none}}
/*# sourceMappingURL=CimSDK.min.css.map */
public/CimSDK/CimSDK.min.js
ÎļþÌ«´ó
public/CimSDK/Workers/chunk-2BPIFUNJ.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as C}from"./chunk-XDTNLL4L.js";import{a as P}from"./chunk-EX67AA2G.js";import{b as O,c as L}from"./chunk-VDZXURWO.js";import{a as y}from"./chunk-UEFEFMYS.js";import{e as S}from"./chunk-55TU6MJR.js";var T={};function b(a,e){return y.equalsEpsilon(a.latitude,e.latitude,y.EPSILON10)&&y.equalsEpsilon(a.longitude,e.longitude,y.EPSILON10)}var q=new L,v=new L;function w(a,e,i,h){e=P(e,O.equalsEpsilon);let p=e.length;if(p<2)return;let E=S(h),u=S(i),l=new Array(p),g=new Array(p),r=new Array(p),d=e[0];l[0]=d;let f=a.cartesianToCartographic(d,q);u&&(f.height=i[0]),g[0]=f.height,E?r[0]=h[0]:r[0]=0;let o=g[0],m=r[0],t=o===m,n=1;for(let c=1;c<p;++c){let A=e[c],s=a.cartesianToCartographic(A,v);u&&(s.height=i[c]),t=t&&s.height===0,b(f,s)?f.height<s.height&&(g[n-1]=s.height):(l[n]=A,g[n]=s.height,E?r[n]=h[c]:r[n]=0,t=t&&g[n]===r[n],L.clone(s,f),++n)}if(!(t||n<2))return l.length=n,g.length=n,r.length=n,{positions:l,topHeights:g,bottomHeights:r}}var D=new Array(2),F=new Array(2),B={positions:void 0,height:void 0,granularity:void 0,ellipsoid:void 0};T.computePositions=function(a,e,i,h,p,E){let u=w(a,e,i,h);if(!S(u))return;e=u.positions,i=u.topHeights,h=u.bottomHeights;let l=e.length,g=l-2,r,d,f=y.chordLength(p,a.maximumRadius),o=B;if(o.minDistance=f,o.ellipsoid=a,E){let m=0,t;for(t=0;t<l-1;t++)m+=C.numberOfPoints(e[t],e[t+1],f)+1;r=new Float64Array(m*3),d=new Float64Array(m*3);let n=D,c=F;o.positions=n,o.height=c;let A=0;for(t=0;t<l-1;t++){n[0]=e[t],n[1]=e[t+1],c[0]=i[t],c[1]=i[t+1];let s=C.generateArc(o);r.set(s,A),c[0]=h[t],c[1]=h[t+1],d.set(C.generateArc(o),A),A+=s.length}}else o.positions=e,o.height=i,r=new Float64Array(C.generateArc(o)),o.height=h,d=new Float64Array(C.generateArc(o));return{bottomPositions:d,topPositions:r,numCorners:g}};var j=T;export{j as a};
public/CimSDK/Workers/chunk-32UDSAPU.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as t}from"./chunk-5HWP5DW7.js";import{a as O}from"./chunk-3K67FZLU.js";import{e as f}from"./chunk-55TU6MJR.js";function n(e){e=t(e,t.EMPTY_OBJECT),this.position=t(e.position,!1),this.normal=t(e.normal,!1),this.st=t(e.st,!1),this.bitangent=t(e.bitangent,!1),this.tangent=t(e.tangent,!1),this.color=t(e.color,!1)}n.POSITION_ONLY=Object.freeze(new n({position:!0}));n.POSITION_AND_NORMAL=Object.freeze(new n({position:!0,normal:!0}));n.POSITION_NORMAL_AND_ST=Object.freeze(new n({position:!0,normal:!0,st:!0}));n.POSITION_AND_ST=Object.freeze(new n({position:!0,st:!0}));n.POSITION_AND_COLOR=Object.freeze(new n({position:!0,color:!0}));n.ALL=Object.freeze(new n({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0}));n.DEFAULT=n.POSITION_NORMAL_AND_ST;n.packedLength=6;n.pack=function(e,o,i){if(!f(e))throw new O("value is required");if(!f(o))throw new O("array is required");return i=t(i,0),o[i++]=e.position?1:0,o[i++]=e.normal?1:0,o[i++]=e.st?1:0,o[i++]=e.tangent?1:0,o[i++]=e.bitangent?1:0,o[i]=e.color?1:0,o};n.unpack=function(e,o,i){if(!f(e))throw new O("array is required");return o=t(o,0),f(i)||(i=new n),i.position=e[o++]===1,i.normal=e[o++]===1,i.st=e[o++]===1,i.tangent=e[o++]===1,i.bitangent=e[o++]===1,i.color=e[o]===1,i};n.clone=function(e,o){if(f(e))return f(o)||(o=new n),o.position=e.position,o.normal=e.normal,o.st=e.st,o.tangent=e.tangent,o.bitangent=e.bitangent,o.color=e.color,o};var _=n;export{_ as a};
public/CimSDK/Workers/chunk-3I5K75MC.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as tt}from"./chunk-QP426X7X.js";import{a as At}from"./chunk-S5MWIP3D.js";import{a as yt}from"./chunk-OOGG7EHS.js";import{a as G}from"./chunk-55FFQILS.js";import{a as z}from"./chunk-32UDSAPU.js";import{a as at}from"./chunk-563CJZT3.js";import{a as ht}from"./chunk-LH4TAMBV.js";import{b as mt,c as st,d as S}from"./chunk-WI5KIEME.js";import{a as dt,d as rt}from"./chunk-ZPW6H6BB.js";import{f as it,i as bt}from"./chunk-HMXXHGCW.js";import{a as F}from"./chunk-NFDMGE7Q.js";import{b as a,c as _t,d as W,e as v,f as R}from"./chunk-VDZXURWO.js";import{a as I}from"./chunk-UEFEFMYS.js";import{a as T}from"./chunk-5HWP5DW7.js";import{a as nt,b as H}from"./chunk-3K67FZLU.js";import{e as K}from"./chunk-55TU6MJR.js";var et=new a,pt=new a,xt=new a,wt=new a,w=new W,Mt=new R,Vt=new R,gt=new it,Tt=new a,Nt=new a,Et=new a,lt=new _t,Pt=new a,Ft=new W,St=new W;function Ot(o,e,t){let n=e.vertexFormat,s=e.center,i=e.semiMajorAxis,r=e.semiMinorAxis,f=e.ellipsoid,h=e.stRotation,E=t?o.length/3*2:o.length/3,g=e.shadowVolume,c=n.st?new Float32Array(E*2):void 0,l=n.normal?new Float32Array(E*3):void 0,A=n.tangent?new Float32Array(E*3):void 0,x=n.bitangent?new Float32Array(E*3):void 0,O=g?new Float32Array(E*3):void 0,B=0,b=Tt,M=Nt,d=Et,_=new dt(f),L=_.project(f.cartesianToCartographic(s,lt),Pt),J=f.scaleToGeodeticSurface(s,et);f.geodeticSurfaceNormal(J,J);let Z=Mt,q=Vt;if(h!==0){let m=it.fromAxisAngle(J,h,gt);Z=R.fromQuaternion(m,Z),m=it.fromAxisAngle(J,-h,gt),q=R.fromQuaternion(m,q)}else Z=R.clone(R.IDENTITY,Z),q=R.clone(R.IDENTITY,q);let k=W.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Ft),Q=W.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,St),j=o.length,y=t?j:0,p=y/3*2;for(let m=0;m<j;m+=3){let u=m+1,N=m+2,D=a.fromArray(o,m,et);if(n.st){let P=R.multiplyByVector(Z,D,pt),C=_.project(f.cartesianToCartographic(P,lt),xt);a.subtract(C,L,C),w.x=(C.x+i)/(2*i),w.y=(C.y+r)/(2*r),k.x=Math.min(w.x,k.x),k.y=Math.min(w.y,k.y),Q.x=Math.max(w.x,Q.x),Q.y=Math.max(w.y,Q.y),t&&(c[B+p]=w.x,c[B+1+p]=w.y),c[B++]=w.x,c[B++]=w.y}(n.normal||n.tangent||n.bitangent||g)&&(b=f.geodeticSurfaceNormal(D,b),g&&(O[m+y]=-b.x,O[u+y]=-b.y,O[N+y]=-b.z),(n.normal||n.tangent||n.bitangent)&&((n.tangent||n.bitangent)&&(M=a.normalize(a.cross(a.UNIT_Z,b,M),M),R.multiplyByVector(q,M,M)),n.normal&&(l[m]=b.x,l[u]=b.y,l[N]=b.z,t&&(l[m+y]=-b.x,l[u+y]=-b.y,l[N+y]=-b.z)),n.tangent&&(A[m]=M.x,A[u]=M.y,A[N]=M.z,t&&(A[m+y]=-M.x,A[u+y]=-M.y,A[N+y]=-M.z)),n.bitangent&&(d=a.normalize(a.cross(b,M,d),d),x[m]=d.x,x[u]=d.y,x[N]=d.z,t&&(x[m+y]=d.x,x[u+y]=d.y,x[N+y]=d.z))))}if(n.st){j=c.length;for(let m=0;m<j;m+=2)c[m]=(c[m]-k.x)/(Q.x-k.x),c[m+1]=(c[m+1]-k.y)/(Q.y-k.y)}let V=new ht;if(n.position){let m=tt.raisePositionsToHeight(o,e,t);V.position=new S({componentDatatype:F.DOUBLE,componentsPerAttribute:3,values:m})}if(n.st&&(V.st=new S({componentDatatype:F.FLOAT,componentsPerAttribute:2,values:c})),n.normal&&(V.normal=new S({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:l})),n.tangent&&(V.tangent=new S({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:A})),n.bitangent&&(V.bitangent=new S({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:x})),g&&(V.extrudeDirection=new S({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:O})),t&&K(e.offsetAttribute)){let m=new Uint8Array(E);if(e.offsetAttribute===G.TOP)m=m.fill(1,0,E/2);else{let u=e.offsetAttribute===G.NONE?0:1;m=m.fill(u)}V.applyOffset=new S({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}return V}function jt(o){let e=new Array(12*(o*(o+1))-6),t=0,n,s,i,r,f;for(n=0,i=1,r=0;r<3;r++)e[t++]=i++,e[t++]=n,e[t++]=i;for(r=2;r<o+1;++r){for(i=r*(r+1)-1,n=(r-1)*r-1,e[t++]=i++,e[t++]=n,e[t++]=i,s=2*r,f=0;f<s-1;++f)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;e[t++]=i++,e[t++]=n,e[t++]=i}for(s=o*2,++i,++n,r=0;r<s-1;++r)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;for(e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n++,e[t++]=n,++n,r=o-1;r>1;--r){for(e[t++]=n++,e[t++]=n,e[t++]=i,s=2*r,f=0;f<s-1;++f)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;e[t++]=n++,e[t++]=n++,e[t++]=i++}for(r=0;r<3;r++)e[t++]=n++,e[t++]=n,e[t++]=i;return e}var X=new a;function Dt(o){let e=o.center;X=a.multiplyByScalar(o.ellipsoid.geodeticSurfaceNormal(e,X),o.height,X),X=a.add(e,X,X);let t=new rt(X,o.semiMajorAxis),n=tt.computeEllipsePositions(o,!0,!1),s=n.positions,i=n.numPts,r=Ot(s,o,!1),f=jt(i);return f=at.createTypedArray(s.length/3,f),{boundingSphere:t,attributes:r,indices:f}}function vt(o,e){let t=e.vertexFormat,n=e.center,s=e.semiMajorAxis,i=e.semiMinorAxis,r=e.ellipsoid,f=e.height,h=e.extrudedHeight,E=e.stRotation,g=o.length/3*2,c=new Float64Array(g*3),l=t.st?new Float32Array(g*2):void 0,A=t.normal?new Float32Array(g*3):void 0,x=t.tangent?new Float32Array(g*3):void 0,O=t.bitangent?new Float32Array(g*3):void 0,B=e.shadowVolume,b=B?new Float32Array(g*3):void 0,M=0,d=Tt,_=Nt,L=Et,J=new dt(r),Z=J.project(r.cartesianToCartographic(n,lt),Pt),q=r.scaleToGeodeticSurface(n,et);r.geodeticSurfaceNormal(q,q);let k=it.fromAxisAngle(q,E,gt),Q=R.fromQuaternion(k,Mt),j=W.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Ft),y=W.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,St),p=o.length,V=p/3*2;for(let u=0;u<p;u+=3){let N=u+1,D=u+2,P=a.fromArray(o,u,et),C;if(t.st){let ot=R.multiplyByVector(Q,P,pt),$=J.project(r.cartesianToCartographic(ot,lt),xt);a.subtract($,Z,$),w.x=($.x+s)/(2*s),w.y=($.y+i)/(2*i),j.x=Math.min(w.x,j.x),j.y=Math.min(w.y,j.y),y.x=Math.max(w.x,y.x),y.y=Math.max(w.y,y.y),l[M+V]=w.x,l[M+1+V]=w.y,l[M++]=w.x,l[M++]=w.y}P=r.scaleToGeodeticSurface(P,P),C=a.clone(P,pt),d=r.geodeticSurfaceNormal(P,d),B&&(b[u+p]=-d.x,b[N+p]=-d.y,b[D+p]=-d.z);let ct=a.multiplyByScalar(d,f,wt);if(P=a.add(P,ct,P),ct=a.multiplyByScalar(d,h,ct),C=a.add(C,ct,C),t.position&&(c[u+p]=C.x,c[N+p]=C.y,c[D+p]=C.z,c[u]=P.x,c[N]=P.y,c[D]=P.z),t.normal||t.tangent||t.bitangent){L=a.clone(d,L);let ot=a.fromArray(o,(u+3)%p,wt);a.subtract(ot,P,ot);let $=a.subtract(C,P,xt);d=a.normalize(a.cross($,ot,d),d),t.normal&&(A[u]=d.x,A[N]=d.y,A[D]=d.z,A[u+p]=d.x,A[N+p]=d.y,A[D+p]=d.z),t.tangent&&(_=a.normalize(a.cross(L,d,_),_),x[u]=_.x,x[N]=_.y,x[D]=_.z,x[u+p]=_.x,x[u+1+p]=_.y,x[u+2+p]=_.z),t.bitangent&&(O[u]=L.x,O[N]=L.y,O[D]=L.z,O[u+p]=L.x,O[N+p]=L.y,O[D+p]=L.z)}}if(t.st){p=l.length;for(let u=0;u<p;u+=2)l[u]=(l[u]-j.x)/(y.x-j.x),l[u+1]=(l[u+1]-j.y)/(y.y-j.y)}let m=new ht;if(t.position&&(m.position=new S({componentDatatype:F.DOUBLE,componentsPerAttribute:3,values:c})),t.st&&(m.st=new S({componentDatatype:F.FLOAT,componentsPerAttribute:2,values:l})),t.normal&&(m.normal=new S({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:A})),t.tangent&&(m.tangent=new S({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:x})),t.bitangent&&(m.bitangent=new S({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:O})),B&&(m.extrudeDirection=new S({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:b})),K(e.offsetAttribute)){let u=new Uint8Array(g);if(e.offsetAttribute===G.TOP)u=u.fill(1,0,g/2);else{let N=e.offsetAttribute===G.NONE?0:1;u=u.fill(N)}m.applyOffset=new S({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}return m}function zt(o){let e=o.length/3,t=at.createTypedArray(e,e*6),n=0;for(let s=0;s<e;s++){let i=s,r=s+e,f=(i+1)%e,h=f+e;t[n++]=i,t[n++]=r,t[n++]=f,t[n++]=f,t[n++]=r,t[n++]=h}return t}var ut=new rt,ft=new rt;function Bt(o){let e=o.center,t=o.ellipsoid,n=o.semiMajorAxis,s=a.multiplyByScalar(t.geodeticSurfaceNormal(e,et),o.height,et);ut.center=a.add(e,s,ut.center),ut.radius=n,s=a.multiplyByScalar(t.geodeticSurfaceNormal(e,s),o.extrudedHeight,s),ft.center=a.add(e,s,ft.center),ft.radius=n;let i=tt.computeEllipsePositions(o,!0,!0),r=i.positions,f=i.numPts,h=i.outerPositions,E=rt.union(ut,ft),g=Ot(r,o,!0),c=jt(f),l=c.length;c.length=l*2;let A=r.length/3;for(let _=0;_<l;_+=3)c[_+l]=c[_+2]+A,c[_+1+l]=c[_+1]+A,c[_+2+l]=c[_]+A;let x=at.createTypedArray(A*2/3,c),O=new st({attributes:g,indices:x,primitiveType:mt.TRIANGLES}),B=vt(h,o);c=zt(h);let b=at.createTypedArray(h.length*2/3,c),M=new st({attributes:B,indices:b,primitiveType:mt.TRIANGLES}),d=yt.combineInstances([new At({geometry:O}),new At({geometry:M})]);return{boundingSphere:E,attributes:d[0].attributes,indices:d[0].indices}}function Ct(o,e,t,n,s,i,r){let h=tt.computeEllipsePositions({center:o,semiMajorAxis:e,semiMinorAxis:t,rotation:n,granularity:s},!1,!0).outerPositions,E=h.length/3,g=new Array(E);for(let l=0;l<E;++l)g[l]=a.fromArray(h,l*3);let c=bt.fromCartesianArray(g,i,r);return c.width>I.PI&&(c.north=c.north>0?I.PI_OVER_TWO-I.EPSILON7:c.north,c.south=c.south<0?I.EPSILON7-I.PI_OVER_TWO:c.south,c.east=I.PI,c.west=-I.PI),c}function U(o){o=T(o,T.EMPTY_OBJECT);let e=o.center,t=T(o.ellipsoid,v.default),n=o.semiMajorAxis,s=o.semiMinorAxis,i=T(o.granularity,I.RADIANS_PER_DEGREE),r=T(o.vertexFormat,z.DEFAULT);if(H.defined("options.center",e),H.typeOf.number("options.semiMajorAxis",n),H.typeOf.number("options.semiMinorAxis",s),n<s)throw new nt("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(i<=0)throw new nt("granularity must be greater than zero.");let f=T(o.height,0),h=T(o.extrudedHeight,f);this._center=a.clone(e),this._semiMajorAxis=n,this._semiMinorAxis=s,this._ellipsoid=v.clone(t),this._rotation=T(o.rotation,0),this._stRotation=T(o.stRotation,0),this._height=Math.max(h,f),this._granularity=i,this._vertexFormat=z.clone(r),this._extrudedHeight=Math.min(h,f),this._shadowVolume=T(o.shadowVolume,!1),this._workerName="createEllipseGeometry",this._offsetAttribute=o.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}U.packedLength=a.packedLength+v.packedLength+z.packedLength+9;U.pack=function(o,e,t){return H.defined("value",o),H.defined("array",e),t=T(t,0),a.pack(o._center,e,t),t+=a.packedLength,v.pack(o._ellipsoid,e,t),t+=v.packedLength,z.pack(o._vertexFormat,e,t),t+=z.packedLength,e[t++]=o._semiMajorAxis,e[t++]=o._semiMinorAxis,e[t++]=o._rotation,e[t++]=o._stRotation,e[t++]=o._height,e[t++]=o._granularity,e[t++]=o._extrudedHeight,e[t++]=o._shadowVolume?1:0,e[t]=T(o._offsetAttribute,-1),e};var Rt=new a,It=new v,Lt=new z,Y={center:Rt,ellipsoid:It,vertexFormat:Lt,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};U.unpack=function(o,e,t){H.defined("array",o),e=T(e,0);let n=a.unpack(o,e,Rt);e+=a.packedLength;let s=v.unpack(o,e,It);e+=v.packedLength;let i=z.unpack(o,e,Lt);e+=z.packedLength;let r=o[e++],f=o[e++],h=o[e++],E=o[e++],g=o[e++],c=o[e++],l=o[e++],A=o[e++]===1,x=o[e];return K(t)?(t._center=a.clone(n,t._center),t._ellipsoid=v.clone(s,t._ellipsoid),t._vertexFormat=z.clone(i,t._vertexFormat),t._semiMajorAxis=r,t._semiMinorAxis=f,t._rotation=h,t._stRotation=E,t._height=g,t._granularity=c,t._extrudedHeight=l,t._shadowVolume=A,t._offsetAttribute=x===-1?void 0:x,t):(Y.height=g,Y.extrudedHeight=l,Y.granularity=c,Y.stRotation=E,Y.rotation=h,Y.semiMajorAxis=r,Y.semiMinorAxis=f,Y.shadowVolume=A,Y.offsetAttribute=x===-1?void 0:x,new U(Y))};U.computeRectangle=function(o,e){o=T(o,T.EMPTY_OBJECT);let t=o.center,n=T(o.ellipsoid,v.default),s=o.semiMajorAxis,i=o.semiMinorAxis,r=T(o.granularity,I.RADIANS_PER_DEGREE),f=T(o.rotation,0);if(H.defined("options.center",t),H.typeOf.number("options.semiMajorAxis",s),H.typeOf.number("options.semiMinorAxis",i),s<i)throw new nt("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(r<=0)throw new nt("granularity must be greater than zero.");return Ct(t,s,i,f,r,n,e)};U.createGeometry=function(o){if(o._semiMajorAxis<=0||o._semiMinorAxis<=0)return;let e=o._height,t=o._extrudedHeight,n=!I.equalsEpsilon(e,t,0,I.EPSILON2);o._center=o._ellipsoid.scaleToGeodeticSurface(o._center,o._center);let s={center:o._center,semiMajorAxis:o._semiMajorAxis,semiMinorAxis:o._semiMinorAxis,ellipsoid:o._ellipsoid,rotation:o._rotation,height:e,granularity:o._granularity,vertexFormat:o._vertexFormat,stRotation:o._stRotation},i;if(n)s.extrudedHeight=t,s.shadowVolume=o._shadowVolume,s.offsetAttribute=o._offsetAttribute,i=Bt(s);else if(i=Dt(s),K(o._offsetAttribute)){let r=i.attributes.position.values.length,f=o._offsetAttribute===G.NONE?0:1,h=new Uint8Array(r/3).fill(f);i.attributes.applyOffset=new S({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return new st({attributes:i.attributes,indices:i.indices,primitiveType:mt.TRIANGLES,boundingSphere:i.boundingSphere,offsetAttribute:o._offsetAttribute})};U.createShadowVolume=function(o,e,t){let n=o._granularity,s=o._ellipsoid,i=e(n,s),r=t(n,s);return new U({center:o._center,semiMajorAxis:o._semiMajorAxis,semiMinorAxis:o._semiMinorAxis,ellipsoid:s,rotation:o._rotation,stRotation:o._stRotation,granularity:n,extrudedHeight:i,height:r,vertexFormat:z.POSITION_ONLY,shadowVolume:!0})};function kt(o){let e=-o._stRotation;if(e===0)return[0,0,0,1,1,0];let n=tt.computeEllipsePositions({center:o._center,semiMajorAxis:o._semiMajorAxis,semiMinorAxis:o._semiMinorAxis,rotation:o._rotation,granularity:o._granularity},!1,!0).outerPositions,s=n.length/3,i=new Array(s);for(let h=0;h<s;++h)i[h]=a.fromArray(n,h*3);let r=o._ellipsoid,f=o.rectangle;return st._textureCoordinateRotationPoints(i,e,r,f)}Object.defineProperties(U.prototype,{rectangle:{get:function(){return K(this._rectangle)||(this._rectangle=Ct(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return K(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=kt(this)),this._textureCoordinateRotationPoints}}});var de=U;export{de as a};
public/CimSDK/Workers/chunk-3K67FZLU.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{e as u}from"./chunk-55TU6MJR.js";function f(t){this.name="DeveloperError",this.message=t;let e;try{throw new Error}catch(o){e=o.stack}this.stack=e}u(Object.create)&&(f.prototype=Object.create(Error.prototype),f.prototype.constructor=f);f.prototype.toString=function(){let t=`${this.name}: ${this.message}`;return u(this.stack)&&(t+=`
${this.stack.toString()}`),t};f.throwInstantiationError=function(){throw new f("This function defines an interface and should not be called directly.")};var r=f;var n={};n.typeOf={};function c(t){return`${t} is required, actual value was undefined`}function a(t,e,o){return`Expected ${o} to be typeof ${e}, actual typeof was ${t}`}n.defined=function(t,e){if(!u(e))throw new r(c(t))};n.typeOf.func=function(t,e){if(typeof e!="function")throw new r(a(typeof e,"function",t))};n.typeOf.string=function(t,e){if(typeof e!="string")throw new r(a(typeof e,"string",t))};n.typeOf.number=function(t,e){if(typeof e!="number")throw new r(a(typeof e,"number",t))};n.typeOf.number.lessThan=function(t,e,o){if(n.typeOf.number(t,e),e>=o)throw new r(`Expected ${t} to be less than ${o}, actual value was ${e}`)};n.typeOf.number.lessThanOrEquals=function(t,e,o){if(n.typeOf.number(t,e),e>o)throw new r(`Expected ${t} to be less than or equal to ${o}, actual value was ${e}`)};n.typeOf.number.greaterThan=function(t,e,o){if(n.typeOf.number(t,e),e<=o)throw new r(`Expected ${t} to be greater than ${o}, actual value was ${e}`)};n.typeOf.number.greaterThanOrEquals=function(t,e,o){if(n.typeOf.number(t,e),e<o)throw new r(`Expected ${t} to be greater than or equal to ${o}, actual value was ${e}`)};n.typeOf.object=function(t,e){if(typeof e!="object")throw new r(a(typeof e,"object",t))};n.typeOf.bool=function(t,e){if(typeof e!="boolean")throw new r(a(typeof e,"boolean",t))};n.typeOf.bigint=function(t,e){if(typeof e!="bigint")throw new r(a(typeof e,"bigint",t))};n.typeOf.number.equals=function(t,e,o,i){if(n.typeOf.number(t,o),n.typeOf.number(e,i),o!==i)throw new r(`${t} must be equal to ${e}, the actual values are ${o} and ${i}`)};var l=n;export{r as a,l as b};
public/CimSDK/Workers/chunk-45NF2JU3.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{b as y,c as P,e as k}from"./chunk-VDZXURWO.js";import{a as L}from"./chunk-UEFEFMYS.js";import{a as B}from"./chunk-5HWP5DW7.js";import{b as q}from"./chunk-3K67FZLU.js";import{e as T}from"./chunk-55TU6MJR.js";function Y(n){let a=n._uSquared,t=n._ellipsoid.maximumRadius,e=n._ellipsoid.minimumRadius,f=(t-e)/t,m=Math.cos(n._startHeading),_=Math.sin(n._startHeading),r=(1-f)*Math.tan(n._start.latitude),p=1/Math.sqrt(1+r*r),R=p*r,M=Math.atan2(r,m),l=p*_,U=l*l,i=1-U,A=Math.sqrt(i),c=a/4,o=c*c,h=o*c,S=o*o,u=1+c-3*o/4+5*h/4-175*S/64,C=1-c+15*o/8-35*h/8,d=1-3*c+35*o/4,g=1-5*c,w=u*M-C*Math.sin(2*M)*c/2-d*Math.sin(4*M)*o/16-g*Math.sin(6*M)*h/48-Math.sin(8*M)*5*S/512,s=n._constants;s.a=t,s.b=e,s.f=f,s.cosineHeading=m,s.sineHeading=_,s.tanU=r,s.cosineU=p,s.sineU=R,s.sigma=M,s.sineAlpha=l,s.sineSquaredAlpha=U,s.cosineSquaredAlpha=i,s.cosineAlpha=A,s.u2Over4=c,s.u4Over16=o,s.u6Over64=h,s.u8Over256=S,s.a0=u,s.a1=C,s.a2=d,s.a3=g,s.distanceRatio=w}function Z(n,a){return n*a*(4+n*(4-3*a))/16}function N(n,a,t,e,f,m,_){let r=Z(n,t);return(1-r)*n*a*(e+r*f*(_+r*m*(2*_*_-1)))}function $(n,a,t,e,f,m,_){let r=(a-t)/a,p=m-e,R=Math.atan((1-r)*Math.tan(f)),M=Math.atan((1-r)*Math.tan(_)),l=Math.cos(R),U=Math.sin(R),i=Math.cos(M),A=Math.sin(M),c=l*i,o=l*A,h=U*A,S=U*i,u=p,C=L.TWO_PI,d=Math.cos(u),g=Math.sin(u),w,s,O,H,b;do{d=Math.cos(u),g=Math.sin(u);let z=o-S*d;O=Math.sqrt(i*i*g*g+z*z),s=h+c*d,w=Math.atan2(O,s);let D;O===0?(D=0,H=1):(D=c*g/O,H=1-D*D),C=u,b=s-2*h/H,isFinite(b)||(b=0),u=p+N(r,D,H,w,O,s,b)}while(Math.abs(u-C)>L.EPSILON12);let v=H*(a*a-t*t)/(t*t),W=1+v*(4096+v*(v*(320-175*v)-768))/16384,I=v*(256+v*(v*(74-47*v)-128))/1024,F=b*b,J=I*O*(b+I*(s*(2*F-1)-I*b*(4*O*O-3)*(4*F-3)/6)/4),K=t*W*(w-J),Q=Math.atan2(i*g,o-S*d),X=Math.atan2(l*g,o*d-S);n._distance=K,n._startHeading=Q,n._endHeading=X,n._uSquared=v}var j=new y,x=new y;function V(n,a,t,e){let f=y.normalize(e.cartographicToCartesian(a,x),j),m=y.normalize(e.cartographicToCartesian(t,x),x);q.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(y.angleBetween(f,m))-Math.PI),.0125),$(n,e.maximumRadius,e.minimumRadius,a.longitude,a.latitude,t.longitude,t.latitude),n._start=P.clone(a,n._start),n._end=P.clone(t,n._end),n._start.height=0,n._end.height=0,Y(n)}function E(n,a,t){let e=B(t,k.default);this._ellipsoid=e,this._start=new P,this._end=new P,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,T(n)&&T(a)&&V(this,n,a,e)}Object.defineProperties(E.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return q.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return q.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return q.defined("distance",this._distance),this._endHeading}}});E.prototype.setEndPoints=function(n,a){q.defined("start",n),q.defined("end",a),V(this,n,a,this._ellipsoid)};E.prototype.interpolateUsingFraction=function(n,a){return this.interpolateUsingSurfaceDistance(this._distance*n,a)};E.prototype.interpolateUsingSurfaceDistance=function(n,a){q.defined("distance",this._distance);let t=this._constants,e=t.distanceRatio+n/t.b,f=Math.cos(2*e),m=Math.cos(4*e),_=Math.cos(6*e),r=Math.sin(2*e),p=Math.sin(4*e),R=Math.sin(6*e),M=Math.sin(8*e),l=e*e,U=e*l,i=t.u8Over256,A=t.u2Over4,c=t.u6Over64,o=t.u4Over16,h=2*U*i*f/3+e*(1-A+7*o/4-15*c/4+579*i/64-(o-15*c/4+187*i/16)*f-(5*c/4-115*i/16)*m-29*i*_/16)+(A/2-o+71*c/32-85*i/16)*r+(5*o/16-5*c/4+383*i/96)*p-l*((c-11*i/2)*r+5*i*p/2)+(29*c/96-29*i/16)*R+539*i*M/1536,S=Math.asin(Math.sin(h)*t.cosineAlpha),u=Math.atan(t.a/t.b*Math.tan(S));h=h-t.sigma;let C=Math.cos(2*t.sigma+h),d=Math.sin(h),g=Math.cos(h),w=t.cosineU*g,s=t.sineU*d,H=Math.atan2(d*t.sineHeading,w-s*t.cosineHeading)-N(t.f,t.sineAlpha,t.cosineSquaredAlpha,h,d,g,C);return T(a)?(a.longitude=this._start.longitude+H,a.latitude=u,a.height=0,a):new P(this._start.longitude+H,u,0)};var ct=E;export{ct as a};
public/CimSDK/Workers/chunk-4DMLXFUJ.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as w}from"./chunk-UEFEFMYS.js";var C={};C.computePositions=function(I,f,b,n,e){let m=I*.5,i=-m,s=n+n,P=e?2*s:s,t=new Float64Array(P*3),r,c=0,o=0,p=e?s*3:0,a=e?(s+n)*3:n*3;for(r=0;r<n;r++){let y=r/n*w.TWO_PI,x=Math.cos(y),h=Math.sin(y),u=x*b,M=h*b,O=x*f,d=h*f;t[o+p]=u,t[o+p+1]=M,t[o+p+2]=i,t[o+a]=O,t[o+a+1]=d,t[o+a+2]=m,o+=3,e&&(t[c++]=u,t[c++]=M,t[c++]=i,t[c++]=O,t[c++]=d,t[c++]=m)}return t};var Y=C;export{Y as a};
public/CimSDK/Workers/chunk-55TU6MJR.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
var i=Object.create;var u=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var o=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty;var a=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(e,d)=>(typeof require<"u"?require:e)[d]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')}),b=n=>e=>{var d=n[e];if(d)return d();throw new Error("Module not found in bundle: "+e)};var g=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports);var p=(n,e,d,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of l(e))!c.call(n,f)&&f!==d&&u(n,f,{get:()=>e[f],enumerable:!(t=r(e,f))||t.enumerable});return n};var h=(n,e,d)=>(d=n!=null?i(o(n)):{},p(e||!n||!n.__esModule?u(d,"default",{value:n,enumerable:!0}):d,n));function x(n){return n!=null}var k=x;export{a,b,g as c,h as d,k as e};
public/CimSDK/Workers/chunk-563CJZT3.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a}from"./chunk-UEFEFMYS.js";import{a as N}from"./chunk-YGIPMXAD.js";import{a as t}from"./chunk-3K67FZLU.js";import{e as i}from"./chunk-55TU6MJR.js";var r={UNSIGNED_BYTE:N.UNSIGNED_BYTE,UNSIGNED_SHORT:N.UNSIGNED_SHORT,UNSIGNED_INT:N.UNSIGNED_INT};r.getSizeInBytes=function(e){switch(e){case r.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new t("indexDatatype is required and must be a valid IndexDatatype constant.")};r.fromSizeInBytes=function(e){switch(e){case 2:return r.UNSIGNED_SHORT;case 4:return r.UNSIGNED_INT;case 1:return r.UNSIGNED_BYTE;default:throw new t("Size in bytes cannot be mapped to an IndexDatatype")}};r.validate=function(e){return i(e)&&(e===r.UNSIGNED_BYTE||e===r.UNSIGNED_SHORT||e===r.UNSIGNED_INT)};r.createTypedArray=function(e,n){if(!i(e))throw new t("numberOfVertices is required.");return e>=a.SIXTY_FOUR_KILOBYTES?new Uint32Array(n):new Uint16Array(n)};r.createTypedArrayFromArrayBuffer=function(e,n,E,o){if(!i(e))throw new t("numberOfVertices is required.");if(!i(n))throw new t("sourceArray is required.");if(!i(E))throw new t("byteOffset is required.");return e>=a.SIXTY_FOUR_KILOBYTES?new Uint32Array(n,E,o):new Uint16Array(n,E,o)};r.fromTypedArray=function(e){if(e instanceof Uint8Array)return r.UNSIGNED_BYTE;if(e instanceof Uint16Array)return r.UNSIGNED_SHORT;if(e instanceof Uint32Array)return r.UNSIGNED_INT;throw new t("array must be a Uint8Array, Uint16Array, or Uint32Array.")};var u=Object.freeze(r);export{u as a};
public/CimSDK/Workers/chunk-6MN6BBPN.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{e as f}from"./chunk-55TU6MJR.js";function c(t){let n,a=t.name,e=t.message;f(a)&&f(e)?n=`${a}: ${e}`:n=t.toString();let o=t.stack;return f(o)&&(n+=`
${o}`),n}var i=c;function l(t){async function n({data:e}){let o=[],s={id:e.id,result:void 0,error:void 0};self.GEOWORLD_BASE_URL=e.baseUrl;try{let r=await t(e.parameters,o);s.result=r}catch(r){r instanceof Error?s.error={name:r.name,message:r.message,stack:r.stack}:s.error=r}e.canTransferArrayBuffer||(o.length=0);try{postMessage(s,o)}catch(r){s.result=void 0,s.error=`postMessage failed with error: ${i(r)}
  with responseMessage: ${JSON.stringify(s)}`,postMessage(s)}}function a(e){postMessage({id:e.data?.id,error:`postMessage failed with error: ${JSON.stringify(e)}`})}return self.onmessage=n,self.onmessageerror=a,self}var d=l;export{d as a};
public/CimSDK/Workers/chunk-6NBUVVUT.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as $}from"./chunk-NJVIDNJ6.js";import{a as b}from"./chunk-OOGG7EHS.js";import{a as U}from"./chunk-563CJZT3.js";import{a as E}from"./chunk-LH4TAMBV.js";import{c as z,d as L}from"./chunk-WI5KIEME.js";import{a as D,d as y}from"./chunk-ZPW6H6BB.js";import{b as G}from"./chunk-HMXXHGCW.js";import{a as k}from"./chunk-NFDMGE7Q.js";import{e as B}from"./chunk-VDZXURWO.js";import{a as v}from"./chunk-5HWP5DW7.js";import{a as F,b as I}from"./chunk-3K67FZLU.js";import{e as a}from"./chunk-55TU6MJR.js";function w(e,n,t){e=v(e,0),n=v(n,0),t=v(t,0),this.value=new Float32Array([e,n,t])}Object.defineProperties(w.prototype,{componentDatatype:{get:function(){return k.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}});w.fromCartesian3=function(e){return I.defined("offset",e),new w(e.x,e.y,e.z)};w.toValue=function(e,n){return I.defined("offset",e),a(n)||(n=new Float32Array([e.x,e.y,e.z])),n[0]=e.x,n[1]=e.y,n[2]=e.z,n};var j=w;function K(e,n,t){let i=!t,r=e.length,c;if(!i&&r>1){let o=e[0].modelMatrix;for(c=1;c<r;++c)if(!G.equals(o,e[c].modelMatrix)){i=!0;break}}if(i)for(c=0;c<r;++c)a(e[c].geometry)&&b.transformToWorldCoordinates(e[c]);else G.multiplyTransformation(n,e[0].modelMatrix,n)}function P(e,n){let t=e.attributes,i=t.position,r=i.values.length/i.componentsPerAttribute;t.batchId=new L({componentDatatype:k.FLOAT,componentsPerAttribute:1,values:new Float32Array(r)});let c=t.batchId.values;for(let o=0;o<r;++o)c[o]=n}function N(e){let n=e.length;for(let t=0;t<n;++t){let i=e[t];a(i.geometry)?P(i.geometry,t):a(i.westHemisphereGeometry)&&a(i.eastHemisphereGeometry)&&(P(i.westHemisphereGeometry,t),P(i.eastHemisphereGeometry,t))}}function Q(e){let n=e.instances,t=e.projection,i=e.elementIndexUintSupported,r=e.scene3DOnly,c=e.vertexCacheOptimize,o=e.compressVertices,g=e.modelMatrix,s,u,m,p=n.length;for(s=0;s<p;++s)if(a(n[s].geometry)){m=n[s].geometry.primitiveType;break}for(s=1;s<p;++s)if(a(n[s].geometry)&&n[s].geometry.primitiveType!==m)throw new F("All instance geometries must have the same primitiveType.");if(K(n,g,r),!r)for(s=0;s<p;++s)a(n[s].geometry)&&b.splitLongitude(n[s]);if(N(n),c)for(s=0;s<p;++s){let f=n[s];a(f.geometry)?(b.reorderForPostVertexCache(f.geometry),b.reorderForPreVertexCache(f.geometry)):a(f.westHemisphereGeometry)&&a(f.eastHemisphereGeometry)&&(b.reorderForPostVertexCache(f.westHemisphereGeometry),b.reorderForPreVertexCache(f.westHemisphereGeometry),b.reorderForPostVertexCache(f.eastHemisphereGeometry),b.reorderForPreVertexCache(f.eastHemisphereGeometry))}let l=b.combineInstances(n);for(p=l.length,s=0;s<p;++s){u=l[s];let f=u.attributes;if(r)for(let d in f)f.hasOwnProperty(d)&&f[d].componentDatatype===k.DOUBLE&&b.encodeAttribute(u,d,`${d}3DHigh`,`${d}3DLow`);else for(let d in f)if(f.hasOwnProperty(d)&&f[d].componentDatatype===k.DOUBLE){let h=`${d}3D`,x=`${d}2D`;b.projectTo2D(u,d,h,x,t),a(u.boundingSphere)&&d==="position"&&(u.boundingSphereCV=y.fromVertices(u.attributes.position2D.values)),b.encodeAttribute(u,h,`${h}High`,`${h}Low`),b.encodeAttribute(u,x,`${x}High`,`${x}Low`)}o&&b.compressVertices(u)}if(!i){let f=[];for(p=l.length,s=0;s<p;++s)u=l[s],f=f.concat(b.fitToUnsignedShortIndices(u));l=f}return l}function T(e,n,t,i){let r,c,o,g=i.length-1;if(g>=0){let u=i[g];r=u.offset+u.count,o=u.index,c=t[o].indices.length}else r=0,o=0,c=t[o].indices.length;let s=e.length;for(let u=0;u<s;++u){let p=e[u][n];if(!a(p))continue;let l=p.indices.length;r+l>c&&(r=0,c=t[++o].indices.length),i.push({index:o,offset:r,count:l}),r+=l}}function X(e,n){let t=[];return T(e,"geometry",n,t),T(e,"westHemisphereGeometry",n,t),T(e,"eastHemisphereGeometry",n,t),t}var S={};S.combineGeometry=function(e){let n,t,i=e.instances,r=i.length,c,o,g=!1;r>0&&(n=Q(e),n.length>0&&(t=b.createAttributeLocations(n[0]),e.createPickOffsets&&(c=X(i,n))),a(i[0].attributes)&&a(i[0].attributes.offset)&&(o=new Array(r),g=!0));let s=new Array(r),u=new Array(r);for(let m=0;m<r;++m){let p=i[m],l=p.geometry;a(l)&&(s[m]=l.boundingSphere,u[m]=l.boundingSphereCV,g&&(o[m]=p.geometry.offsetAttribute));let f=p.eastHemisphereGeometry,d=p.westHemisphereGeometry;a(f)&&a(d)&&(a(f.boundingSphere)&&a(d.boundingSphere)&&(s[m]=y.union(f.boundingSphere,d.boundingSphere)),a(f.boundingSphereCV)&&a(d.boundingSphereCV)&&(u[m]=y.union(f.boundingSphereCV,d.boundingSphereCV)))}return{geometries:n,modelMatrix:e.modelMatrix,attributeLocations:t,pickOffsets:c,offsetInstanceExtend:o,boundingSpheres:s,boundingSpheresCV:u}};function Y(e,n){let t=e.attributes;for(let i in t)if(t.hasOwnProperty(i)){let r=t[i];a(r)&&a(r.values)&&n.push(r.values.buffer)}a(e.indices)&&n.push(e.indices.buffer)}function Z(e,n){let t=e.length;for(let i=0;i<t;++i)Y(e[i],n)}function _(e){let n=1,t=e.length;for(let i=0;i<t;i++){let r=e[i];if(++n,!a(r))continue;let c=r.attributes;n+=7+2*y.packedLength+(a(r.indices)?r.indices.length:0);for(let o in c)if(c.hasOwnProperty(o)&&a(c[o])){let g=c[o];n+=5+g.values.length}}return n}S.packCreateGeometryResults=function(e,n){let t=new Float64Array(_(e)),i=[],r={},c=e.length,o=0;t[o++]=c;for(let g=0;g<c;g++){let s=e[g],u=a(s);if(t[o++]=u?1:0,!u)continue;t[o++]=s.primitiveType,t[o++]=s.geometryType,t[o++]=v(s.offsetAttribute,-1);let m=a(s.boundingSphere)?1:0;t[o++]=m,m&&y.pack(s.boundingSphere,t,o),o+=y.packedLength;let p=a(s.boundingSphereCV)?1:0;t[o++]=p,p&&y.pack(s.boundingSphereCV,t,o),o+=y.packedLength;let l=s.attributes,f=[];for(let h in l)l.hasOwnProperty(h)&&a(l[h])&&(f.push(h),a(r[h])||(r[h]=i.length,i.push(h)));t[o++]=f.length;for(let h=0;h<f.length;h++){let x=f[h],C=l[x];t[o++]=r[x],t[o++]=C.componentDatatype,t[o++]=C.componentsPerAttribute,t[o++]=C.normalize?1:0,t[o++]=C.values.length,t.set(C.values,o),o+=C.values.length}let d=a(s.indices)?s.indices.length:0;t[o++]=d,d>0&&(t.set(s.indices,o),o+=d)}return n.push(t.buffer),{stringTable:i,packedData:t}};S.unpackCreateGeometryResults=function(e){let n=e.stringTable,t=e.packedData,i,r=new Array(t[0]),c=0,o=1;for(;o<t.length;){if(!(t[o++]===1)){r[c++]=void 0;continue}let s=t[o++],u=t[o++],m=t[o++];m===-1&&(m=void 0);let p,l;t[o++]===1&&(p=y.unpack(t,o)),o+=y.packedLength,t[o++]===1&&(l=y.unpack(t,o)),o+=y.packedLength;let h,x,C,H=new E,q=t[o++];for(i=0;i<q;i++){let A=n[t[o++]],M=t[o++];C=t[o++];let J=t[o++]!==0;h=t[o++],x=k.createTypedArray(M,h);for(let O=0;O<h;O++)x[O]=t[o++];H[A]=new L({componentDatatype:M,componentsPerAttribute:C,normalize:J,values:x})}let V;if(h=t[o++],h>0){let A=x.length/C;for(V=U.createTypedArray(A,h),i=0;i<h;i++)V[i]=t[o++]}r[c++]=new z({primitiveType:s,geometryType:u,boundingSphere:p,boundingSphereCV:l,indices:V,attributes:H,offsetAttribute:m})}return r};function ee(e,n){let t=e.length,i=new Float64Array(1+t*19),r=0;i[r++]=t;for(let c=0;c<t;c++){let o=e[c];if(G.pack(o.modelMatrix,i,r),r+=G.packedLength,a(o.attributes)&&a(o.attributes.offset)){let g=o.attributes.offset.value;i[r]=g[0],i[r+1]=g[1],i[r+2]=g[2]}r+=3}return n.push(i.buffer),i}function te(e){let n=e,t=new Array(n[0]),i=0,r=1;for(;r<n.length;){let c=G.unpack(n,r),o;r+=G.packedLength,a(n[r])&&(o={offset:new j(n[r],n[r+1],n[r+2])}),r+=3,t[i++]={modelMatrix:c,attributes:o}}return t}S.packCombineGeometryParameters=function(e,n){let t=e.createGeometryResults,i=t.length;for(let r=0;r<i;r++)n.push(t[r].packedData.buffer);return{createGeometryResults:e.createGeometryResults,packedInstances:ee(e.instances,n),ellipsoid:e.ellipsoid,isGeographic:e.projection instanceof D,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:e.modelMatrix,createPickOffsets:e.createPickOffsets}};S.unpackCombineGeometryParameters=function(e){let n=te(e.packedInstances),t=e.createGeometryResults,i=t.length,r=0;for(let g=0;g<i;g++){let s=S.unpackCreateGeometryResults(t[g]),u=s.length;for(let m=0;m<u;m++){let p=s[m],l=n[r];l.geometry=p,++r}}let c=B.clone(e.ellipsoid),o=e.isGeographic?new D(c):new $(c);return{instances:n,ellipsoid:c,projection:o,elementIndexUintSupported:e.elementIndexUintSupported,scene3DOnly:e.scene3DOnly,vertexCacheOptimize:e.vertexCacheOptimize,compressVertices:e.compressVertices,modelMatrix:G.clone(e.modelMatrix),createPickOffsets:e.createPickOffsets}};function R(e){let n=e.length,t=1+(y.packedLength+1)*n,i=new Float32Array(t),r=0;i[r++]=n;for(let c=0;c<n;++c){let o=e[c];a(o)?(i[r++]=1,y.pack(e[c],i,r)):i[r++]=0,r+=y.packedLength}return i}function W(e){let n=new Array(e[0]),t=0,i=1;for(;i<e.length;)e[i++]===1&&(n[t]=y.unpack(e,i)),++t,i+=y.packedLength;return n}S.packCombineGeometryResults=function(e,n){a(e.geometries)&&Z(e.geometries,n);let t=R(e.boundingSpheres),i=R(e.boundingSpheresCV);return n.push(t.buffer,i.buffer),{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:t,boundingSpheresCV:i}};S.unpackCombineGeometryResults=function(e){return{geometries:e.geometries,attributeLocations:e.attributeLocations,modelMatrix:e.modelMatrix,pickOffsets:e.pickOffsets,offsetInstanceExtend:e.offsetInstanceExtend,boundingSpheres:W(e.boundingSpheres),boundingSpheresCV:W(e.boundingSpheresCV)}};var Ge=S;export{Ge as a};
public/CimSDK/Workers/chunk-AIYLFSI3.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{c as Z}from"./chunk-ZPW6H6BB.js";import{b as o,c as ft,f as b}from"./chunk-VDZXURWO.js";import{a as R}from"./chunk-UEFEFMYS.js";import{a as H}from"./chunk-5HWP5DW7.js";import{a as w,b as et}from"./chunk-3K67FZLU.js";import{e as g}from"./chunk-55TU6MJR.js";var nt={};nt.computeDiscriminant=function(t,e,r){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");return e*e-4*t*r};function mt(t,e,r){let n=t+e;return R.sign(t)!==R.sign(e)&&Math.abs(n/Math.max(Math.abs(t),Math.abs(e)))<r?0:n}nt.computeRealRoots=function(t,e,r){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");let n;if(t===0)return e===0?[]:[-r/e];if(e===0){if(r===0)return[0,0];let a=Math.abs(r),f=Math.abs(t);if(a<f&&a/f<R.EPSILON14)return[0,0];if(a>f&&f/a<R.EPSILON14)return[];if(n=-r/t,n<0)return[];let l=Math.sqrt(n);return[-l,l]}else if(r===0)return n=-e/t,n<0?[n,0]:[0,n];let i=e*e,c=4*t*r,s=mt(i,-c,R.EPSILON14);if(s<0)return[];let u=-.5*mt(e,R.sign(e)*Math.sqrt(s),R.EPSILON14);return e>0?[u/t,r/u]:[r/u,u/t]};var T=nt;var ot={};ot.computeDiscriminant=function(t,e,r,n){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");let i=t*t,c=e*e,s=r*r,u=n*n;return 18*t*e*r*n+c*s-27*i*u-4*(t*s*r+c*e*n)};function rt(t,e,r,n){let i=t,c=e/3,s=r/3,u=n,a=i*s,f=c*u,l=c*c,d=s*s,p=i*s-l,q=i*u-c*s,m=c*u-d,h=4*p*m-q*q,E,D;if(h<0){let X,k,G;l*f>=a*d?(X=i,k=p,G=-2*c*p+i*q):(X=u,k=m,G=-u*q+2*s*m);let at=-(G<0?-1:1)*Math.abs(X)*Math.sqrt(-h);D=-G+at;let $=D/2,j=$<0?-Math.pow(-$,1/3):Math.pow($,1/3),tt=D===at?-j:-k/j;return E=k<=0?j+tt:-G/(j*j+tt*tt+k),l*f>=a*d?[(E-c)/i]:[-u/(E+s)]}let W=p,V=-2*c*p+i*q,L=m,B=-u*q+2*s*m,I=Math.sqrt(h),C=Math.sqrt(3)/2,P=Math.abs(Math.atan2(i*I,-V)/3);E=2*Math.sqrt(-W);let y=Math.cos(P);D=E*y;let S=E*(-y/2-C*Math.sin(P)),M=D+S>2*c?D-c:S-c,N=i,x=M/N;P=Math.abs(Math.atan2(u*I,-B)/3),E=2*Math.sqrt(-L),y=Math.cos(P),D=E*y,S=E*(-y/2-C*Math.sin(P));let _=-u,A=D+S<2*s?D+s:S+s,v=_/A,yt=N*A,ut=-M*A-N*_,bt=M*_,U=(s*ut-c*bt)/(-c*ut+s*yt);return x<=U?x<=v?U<=v?[x,U,v]:[x,v,U]:[v,x,U]:x<=v?[U,x,v]:U<=v?[U,v,x]:[v,U,x]}ot.computeRealRoots=function(t,e,r,n){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");let i,c;if(t===0)return T.computeRealRoots(e,r,n);if(e===0){if(r===0){if(n===0)return[0,0,0];c=-n/t;let s=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3);return[s,s,s]}else if(n===0)return i=T.computeRealRoots(t,0,r),i.Length===0?[0]:[i[0],0,i[1]];return rt(t,0,r,n)}else{if(r===0)return n===0?(c=-e/t,c<0?[c,0,0]:[0,0,c]):rt(t,e,0,n);if(n===0)return i=T.computeRealRoots(t,e,r),i.length===0?[0]:i[1]<=0?[i[0],i[1],0]:i[0]>=0?[0,i[0],i[1]]:[i[0],0,i[1]]}return rt(t,e,r,n)};var F=ot;var it={};it.computeDiscriminant=function(t,e,r,n,i){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");if(typeof i!="number")throw new w("e is a required number.");let c=t*t,s=c*t,u=e*e,a=u*e,f=r*r,l=f*r,d=n*n,p=d*n,q=i*i,m=q*i;return u*f*d-4*a*p-4*t*l*d+18*t*e*r*p-27*c*d*d+256*s*m+i*(18*a*r*n-4*u*l+16*t*f*f-80*t*e*f*n-6*t*u*d+144*c*r*d)+q*(144*t*u*r-27*u*u-128*c*f-192*c*e*n)};function z(t,e,r,n){let i=t*t,c=e-3*i/8,s=r-e*t/2+i*t/8,u=n-r*t/4+e*i/16-3*i*i/256,a=F.computeRealRoots(1,2*c,c*c-4*u,-s*s);if(a.length>0){let f=-t/4,l=a[a.length-1];if(Math.abs(l)<R.EPSILON14){let d=T.computeRealRoots(1,c,u);if(d.length===2){let p=d[0],q=d[1],m;if(p>=0&&q>=0){let h=Math.sqrt(p),E=Math.sqrt(q);return[f-E,f-h,f+h,f+E]}else{if(p>=0&&q<0)return m=Math.sqrt(p),[f-m,f+m];if(p<0&&q>=0)return m=Math.sqrt(q),[f-m,f+m]}}return[]}else if(l>0){let d=Math.sqrt(l),p=(c+l-s/d)/2,q=(c+l+s/d)/2,m=T.computeRealRoots(1,d,p),h=T.computeRealRoots(1,-d,q);return m.length!==0?(m[0]+=f,m[1]+=f,h.length!==0?(h[0]+=f,h[1]+=f,m[1]<=h[0]?[m[0],m[1],h[0],h[1]]:h[1]<=m[0]?[h[0],h[1],m[0],m[1]]:m[0]>=h[0]&&m[1]<=h[1]?[h[0],m[0],m[1],h[1]]:h[0]>=m[0]&&h[1]<=m[1]?[m[0],h[0],h[1],m[1]]:m[0]>h[0]&&m[0]<h[1]?[h[0],m[0],h[1],m[1]]:[m[0],h[0],m[1],h[1]]):m):h.length!==0?(h[0]+=f,h[1]+=f,h):[]}}return[]}function Y(t,e,r,n){let i=r*r,c=e*e,s=t*t,u=-2*e,a=r*t+c-4*n,f=s*n-r*e*t+i,l=F.computeRealRoots(1,u,a,f);if(l.length>0){let d=l[0],p=e-d,q=p*p,m=t/2,h=p/2,E=q-4*n,D=q+4*Math.abs(n),W=s-4*d,V=s+4*Math.abs(d),L,B;if(d<0||E*V<W*D){let N=Math.sqrt(W);L=N/2,B=N===0?0:(t*h-r)/N}else{let N=Math.sqrt(E);L=N===0?0:(t*h-r)/N,B=N/2}let I,C;m===0&&L===0?(I=0,C=0):R.sign(m)===R.sign(L)?(I=m+L,C=d/I):(C=m-L,I=d/C);let P,y;h===0&&B===0?(P=0,y=0):R.sign(h)===R.sign(B)?(P=h+B,y=n/P):(y=h-B,P=n/y);let S=T.computeRealRoots(1,I,P),M=T.computeRealRoots(1,C,y);if(S.length!==0)return M.length!==0?S[1]<=M[0]?[S[0],S[1],M[0],M[1]]:M[1]<=S[0]?[M[0],M[1],S[0],S[1]]:S[0]>=M[0]&&S[1]<=M[1]?[M[0],S[0],S[1],M[1]]:M[0]>=S[0]&&M[1]<=S[1]?[S[0],M[0],M[1],S[1]]:S[0]>M[0]&&S[0]<M[1]?[M[0],S[0],M[1],S[1]]:[S[0],M[0],S[1],M[1]]:S;if(M.length!==0)return M}return[]}it.computeRealRoots=function(t,e,r,n,i){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");if(typeof i!="number")throw new w("e is a required number.");if(Math.abs(t)<R.EPSILON15)return F.computeRealRoots(e,r,n,i);let c=e/t,s=r/t,u=n/t,a=i/t,f=c<0?1:0;switch(f+=s<0?f+1:f,f+=u<0?f+1:f,f+=a<0?f+1:f,f){case 0:return z(c,s,u,a);case 1:return Y(c,s,u,a);case 2:return Y(c,s,u,a);case 3:return z(c,s,u,a);case 4:return z(c,s,u,a);case 5:return Y(c,s,u,a);case 6:return z(c,s,u,a);case 7:return z(c,s,u,a);case 8:return Y(c,s,u,a);case 9:return z(c,s,u,a);case 10:return z(c,s,u,a);case 11:return Y(c,s,u,a);case 12:return z(c,s,u,a);case 13:return z(c,s,u,a);case 14:return z(c,s,u,a);case 15:return z(c,s,u,a);default:return}};var dt=it;function J(t,e){e=o.clone(H(e,o.ZERO)),o.equals(e,o.ZERO)||o.normalize(e,e),this.origin=o.clone(H(t,o.ZERO)),this.direction=e}J.clone=function(t,e){if(g(t))return g(e)?(e.origin=o.clone(t.origin),e.direction=o.clone(t.direction),e):new J(t.origin,t.direction)};J.getPoint=function(t,e,r){return et.typeOf.object("ray",t),et.typeOf.number("t",e),g(r)||(r=new o),r=o.multiplyByScalar(t.direction,e,r),o.add(t.origin,r,r)};var st=J;var O={};O.rayPlane=function(t,e,r){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("plane is required.");g(r)||(r=new o);let n=t.origin,i=t.direction,c=e.normal,s=o.dot(c,i);if(Math.abs(s)<R.EPSILON15)return;let u=(-e.distance-o.dot(c,n))/s;if(!(u<0))return r=o.multiplyByScalar(i,u,r),o.add(n,r,r)};var Ot=new o,Pt=new o,Mt=new o,lt=new o,ht=new o;O.rayTriangleParametric=function(t,e,r,n,i){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("p0 is required.");if(!g(r))throw new w("p1 is required.");if(!g(n))throw new w("p2 is required.");i=H(i,!1);let c=t.origin,s=t.direction,u=o.subtract(r,e,Ot),a=o.subtract(n,e,Pt),f=o.cross(s,a,Mt),l=o.dot(u,f),d,p,q,m,h;if(i){if(l<R.EPSILON6||(d=o.subtract(c,e,lt),q=o.dot(d,f),q<0||q>l)||(p=o.cross(d,u,ht),m=o.dot(s,p),m<0||q+m>l))return;h=o.dot(a,p)/l}else{if(Math.abs(l)<R.EPSILON6)return;let E=1/l;if(d=o.subtract(c,e,lt),q=o.dot(d,f)*E,q<0||q>1||(p=o.cross(d,u,ht),m=o.dot(s,p)*E,m<0||q+m>1))return;h=o.dot(a,p)*E}return h};O.rayTriangle=function(t,e,r,n,i,c){let s=O.rayTriangleParametric(t,e,r,n,i);if(!(!g(s)||s<0))return g(c)||(c=new o),o.multiplyByScalar(t.direction,s,c),o.add(t.origin,c,c)};var Et=new st;O.lineSegmentTriangle=function(t,e,r,n,i,c,s){if(!g(t))throw new w("v0 is required.");if(!g(e))throw new w("v1 is required.");if(!g(r))throw new w("p0 is required.");if(!g(n))throw new w("p1 is required.");if(!g(i))throw new w("p2 is required.");let u=Et;o.clone(t,u.origin),o.subtract(e,t,u.direction),o.normalize(u.direction,u.direction);let a=O.rayTriangleParametric(u,r,n,i,c);if(!(!g(a)||a<0||a>o.distance(t,e)))return g(s)||(s=new o),o.multiplyByScalar(u.direction,a,s),o.add(u.origin,s,s)};function Ct(t,e,r,n){let i=e*e-4*t*r;if(i<0)return;if(i>0){let s=1/(2*t),u=Math.sqrt(i),a=(-e+u)*s,f=(-e-u)*s;return a<f?(n.root0=a,n.root1=f):(n.root0=f,n.root1=a),n}let c=-e/(2*t);if(c!==0)return n.root0=n.root1=c,n}var Nt={root0:0,root1:0};function Rt(t,e,r){g(r)||(r=new Z);let n=t.origin,i=t.direction,c=e.center,s=e.radius*e.radius,u=o.subtract(n,c,Mt),a=o.dot(i,i),f=2*o.dot(i,u),l=o.magnitudeSquared(u)-s,d=Ct(a,f,l,Nt);if(g(d))return r.start=d.root0,r.stop=d.root1,r}O.raySphere=function(t,e,r){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("sphere is required.");if(r=Rt(t,e,r),!(!g(r)||r.stop<0))return r.start=Math.max(r.start,0),r};var Lt=new st;O.lineSegmentSphere=function(t,e,r,n){if(!g(t))throw new w("p0 is required.");if(!g(e))throw new w("p1 is required.");if(!g(r))throw new w("sphere is required.");let i=Lt;o.clone(t,i.origin);let c=o.subtract(e,t,i.direction),s=o.magnitude(c);if(o.normalize(c,c),n=Rt(i,r,n),!(!g(n)||n.stop<0||n.start>s))return n.start=Math.max(n.start,0),n.stop=Math.min(n.stop,s),n};var It=new o,Dt=new o;O.rayEllipsoid=function(t,e){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("ellipsoid is required.");let r=e.oneOverRadii,n=o.multiplyComponents(r,t.origin,It),i=o.multiplyComponents(r,t.direction,Dt),c=o.magnitudeSquared(n),s=o.dot(n,i),u,a,f,l,d;if(c>1){if(s>=0)return;let p=s*s;if(u=c-1,a=o.magnitudeSquared(i),f=a*u,p<f)return;if(p>f){l=s*s-f,d=-s+Math.sqrt(l);let m=d/a,h=u/d;return m<h?new Z(m,h):{start:h,stop:m}}let q=Math.sqrt(u/a);return new Z(q,q)}else if(c<1)return u=c-1,a=o.magnitudeSquared(i),f=a*u,l=s*s-f,d=-s+Math.sqrt(l),new Z(0,d/a);if(s<0)return a=o.magnitudeSquared(i),new Z(0,-s/a)};function Q(t,e,r){let n=t+e;return R.sign(t)!==R.sign(e)&&Math.abs(n/Math.max(Math.abs(t),Math.abs(e)))<r?0:n}O.quadraticVectorExpression=function(t,e,r,n,i){let c=n*n,s=i*i,u=(t[b.COLUMN1ROW1]-t[b.COLUMN2ROW2])*s,a=i*(n*Q(t[b.COLUMN1ROW0],t[b.COLUMN0ROW1],R.EPSILON15)+e.y),f=t[b.COLUMN0ROW0]*c+t[b.COLUMN2ROW2]*s+n*e.x+r,l=s*Q(t[b.COLUMN2ROW1],t[b.COLUMN1ROW2],R.EPSILON15),d=i*(n*Q(t[b.COLUMN2ROW0],t[b.COLUMN0ROW2])+e.z),p,q=[];if(d===0&&l===0){if(p=T.computeRealRoots(u,a,f),p.length===0)return q;let P=p[0],y=Math.sqrt(Math.max(1-P*P,0));if(q.push(new o(n,i*P,i*-y)),q.push(new o(n,i*P,i*y)),p.length===2){let S=p[1],M=Math.sqrt(Math.max(1-S*S,0));q.push(new o(n,i*S,i*-M)),q.push(new o(n,i*S,i*M))}return q}let m=d*d,h=l*l,E=u*u,D=d*l,W=E+h,V=2*(a*u+D),L=2*f*u+a*a-h+m,B=2*(f*a-D),I=f*f-m;if(W===0&&V===0&&L===0&&B===0)return q;p=dt.computeRealRoots(W,V,L,B,I);let C=p.length;if(C===0)return q;for(let P=0;P<C;++P){let y=p[P],S=y*y,M=Math.max(1-S,0),N=Math.sqrt(M),x;R.sign(u)===R.sign(f)?x=Q(u*S+f,a*y,R.EPSILON12):R.sign(f)===R.sign(a*y)?x=Q(u*S,a*y+f,R.EPSILON12):x=Q(u*S+a*y,f,R.EPSILON12);let _=Q(l*y,d,R.EPSILON15),A=x*_;A<0?q.push(new o(n,i*y,i*N)):A>0?q.push(new o(n,i*y,i*-N)):N!==0?(q.push(new o(n,i*y,i*-N)),q.push(new o(n,i*y,i*N)),++P):q.push(new o(n,i*y,i*N))}return q};var ct=new o,wt=new o,qt=new o,K=new o,Bt=new o,xt=new b,Tt=new b,zt=new b,Wt=new b,Vt=new b,gt=new b,pt=new b,St=new o,vt=new o,Ut=new ft;O.grazingAltitudeLocation=function(t,e){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("ellipsoid is required.");let r=t.origin,n=t.direction;if(!o.equals(r,o.ZERO)){let I=e.geodeticSurfaceNormal(r,ct);if(o.dot(n,I)>=0)return r}let i=g(this.rayEllipsoid(t,e)),c=e.transformPositionToScaledSpace(n,ct),s=o.normalize(c,c),u=o.mostOrthogonalAxis(c,K),a=o.normalize(o.cross(u,s,wt),wt),f=o.normalize(o.cross(s,a,qt),qt),l=xt;l[0]=s.x,l[1]=s.y,l[2]=s.z,l[3]=a.x,l[4]=a.y,l[5]=a.z,l[6]=f.x,l[7]=f.y,l[8]=f.z;let d=b.transpose(l,Tt),p=b.fromScale(e.radii,zt),q=b.fromScale(e.oneOverRadii,Wt),m=Vt;m[0]=0,m[1]=-n.z,m[2]=n.y,m[3]=n.z,m[4]=0,m[5]=-n.x,m[6]=-n.y,m[7]=n.x,m[8]=0;let h=b.multiply(b.multiply(d,q,gt),m,gt),E=b.multiply(b.multiply(h,p,pt),l,pt),D=b.multiplyByVector(h,r,Bt),W=O.quadraticVectorExpression(E,o.negate(D,ct),0,0,1),V,L,B=W.length;if(B>0){let I=o.clone(o.ZERO,vt),C=Number.NEGATIVE_INFINITY;for(let y=0;y<B;++y){V=b.multiplyByVector(p,b.multiplyByVector(l,W[y],St),St);let S=o.normalize(o.subtract(V,r,K),K),M=o.dot(S,n);M>C&&(C=M,I=o.clone(V,I))}let P=e.cartesianToCartographic(I,Ut);return C=R.clamp(C,0,1),L=o.magnitude(o.subtract(I,r,K))*Math.sqrt(1-C*C),L=i?-L:L,P.height=L,e.cartographicToCartesian(P,new o)}};var Qt=new o;O.lineSegmentPlane=function(t,e,r,n){if(!g(t))throw new w("endPoint0 is required.");if(!g(e))throw new w("endPoint1 is required.");if(!g(r))throw new w("plane is required.");g(n)||(n=new o);let i=o.subtract(e,t,Qt),c=r.normal,s=o.dot(c,i);if(Math.abs(s)<R.EPSILON6)return;let u=o.dot(c,t),a=-(r.distance+u)/s;if(!(a<0||a>1))return o.multiplyByScalar(i,a,n),o.add(t,n,n),n};O.trianglePlaneIntersection=function(t,e,r,n){if(!g(t)||!g(e)||!g(r)||!g(n))throw new w("p0, p1, p2, and plane are required.");let i=n.normal,c=n.distance,s=o.dot(i,t)+c<0,u=o.dot(i,e)+c<0,a=o.dot(i,r)+c<0,f=0;f+=s?1:0,f+=u?1:0,f+=a?1:0;let l,d;if((f===1||f===2)&&(l=new o,d=new o),f===1){if(s)return O.lineSegmentPlane(t,e,n,l),O.lineSegmentPlane(t,r,n,d),{positions:[t,e,r,l,d],indices:[0,3,4,1,2,4,1,4,3]};if(u)return O.lineSegmentPlane(e,r,n,l),O.lineSegmentPlane(e,t,n,d),{positions:[t,e,r,l,d],indices:[1,3,4,2,0,4,2,4,3]};if(a)return O.lineSegmentPlane(r,t,n,l),O.lineSegmentPlane(r,e,n,d),{positions:[t,e,r,l,d],indices:[2,3,4,0,1,4,0,4,3]}}else if(f===2)if(s)if(u){if(!a)return O.lineSegmentPlane(t,r,n,l),O.lineSegmentPlane(e,r,n,d),{positions:[t,e,r,l,d],indices:[0,1,4,0,4,3,2,3,4]}}else return O.lineSegmentPlane(r,e,n,l),O.lineSegmentPlane(t,e,n,d),{positions:[t,e,r,l,d],indices:[2,0,4,2,4,3,1,3,4]};else return O.lineSegmentPlane(e,t,n,l),O.lineSegmentPlane(r,t,n,d),{positions:[t,e,r,l,d],indices:[1,2,4,1,4,3,0,3,4]}};var we=O;export{st as a,we as b};
public/CimSDK/Workers/chunk-E5FOJ77O.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{b as c}from"./chunk-VDZXURWO.js";import{b as t}from"./chunk-3K67FZLU.js";import{e as g}from"./chunk-55TU6MJR.js";function f(){this.high=c.clone(c.ZERO),this.low=c.clone(c.ZERO)}f.encode=function(n,o){t.typeOf.number("value",n),g(o)||(o={high:0,low:0});let h;return n>=0?(h=Math.floor(n/65536)*65536,o.high=h,o.low=n-h):(h=Math.floor(-n/65536)*65536,o.high=-h,o.low=n+h),o};var e={high:0,low:0};f.fromCartesian=function(n,o){t.typeOf.object("cartesian",n),g(o)||(o=new f);let h=o.high,i=o.low;return f.encode(n.x,e),h.x=e.high,i.x=e.low,f.encode(n.y,e),h.y=e.high,i.y=e.low,f.encode(n.z,e),h.z=e.high,i.z=e.low,o};var m=new f;f.writeElements=function(n,o,h){t.defined("cartesianArray",o),t.typeOf.number("index",h),t.typeOf.number.greaterThanOrEquals("index",h,0),f.fromCartesian(n,m);let i=m.high,w=m.low;o[h]=i.x,o[h+1]=i.y,o[h+2]=i.z,o[h+3]=w.x,o[h+4]=w.y,o[h+5]=w.z};var O=f;export{O as a};
public/CimSDK/Workers/chunk-EX67AA2G.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as C}from"./chunk-UEFEFMYS.js";import{a as g}from"./chunk-5HWP5DW7.js";import{b as d}from"./chunk-3K67FZLU.js";import{e as i}from"./chunk-55TU6MJR.js";var u=C.EPSILON10;function x(e,r,h,l){if(d.defined("equalsEpsilon",r),!i(e))return;h=g(h,!1);let m=i(l),n=e.length;if(n<2)return e;let f,s=e[0],o,t,p=0,c=-1;for(f=1;f<n;++f)o=e[f],r(s,o,u)?(i(t)||(t=e.slice(0,f),p=f-1,c=0),m&&l.push(f)):(i(t)&&(t.push(o),p=f,m&&(c=l.length)),s=o);return h&&r(e[0],e[n-1],u)&&(m&&(i(t)?l.splice(c,0,p):l.push(n-1)),i(t)?t.length-=1:t=e.slice(0,-1)),i(t)?t:e}var a=x;export{a};
public/CimSDK/Workers/chunk-EZRSLM27.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as w,b as z,j as S}from"./chunk-HMXXHGCW.js";import{a as y}from"./chunk-NFDMGE7Q.js";import{b as C,d as T,f as x}from"./chunk-VDZXURWO.js";import{a as h}from"./chunk-UEFEFMYS.js";import{a as u,b as a}from"./chunk-3K67FZLU.js";import{e as b}from"./chunk-55TU6MJR.js";var c={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"};c.getMathType=function(e){switch(e){case c.SCALAR:return Number;case c.VEC2:return T;case c.VEC3:return C;case c.VEC4:return w;case c.MAT2:return S;case c.MAT3:return x;case c.MAT4:return z;default:throw new u("attributeType is not a valid value.")}};c.getNumberOfComponents=function(e){switch(e){case c.SCALAR:return 1;case c.VEC2:return 2;case c.VEC3:return 3;case c.VEC4:case c.MAT2:return 4;case c.MAT3:return 9;case c.MAT4:return 16;default:throw new u("attributeType is not a valid value.")}};c.getAttributeLocationCount=function(e){switch(e){case c.SCALAR:case c.VEC2:case c.VEC3:case c.VEC4:return 1;case c.MAT2:return 2;case c.MAT3:return 3;case c.MAT4:return 4;default:throw new u("attributeType is not a valid value.")}};c.getGlslType=function(e){switch(a.typeOf.string("attributeType",e),e){case c.SCALAR:return"float";case c.VEC2:return"vec2";case c.VEC3:return"vec3";case c.VEC4:return"vec4";case c.MAT2:return"mat2";case c.MAT3:return"mat3";case c.MAT4:return"mat4";default:throw new u("attributeType is not a valid value.")}};var N=Object.freeze(c);var V=1/256,D=256,r={};r.octEncodeInRange=function(e,t,n){a.defined("vector",e),a.defined("result",n);let o=C.magnitudeSquared(e);if(Math.abs(o-1)>h.EPSILON6)throw new u("vector must be normalized.");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,d=n.y;n.x=(1-Math.abs(d))*h.signNotZero(i),n.y=(1-Math.abs(i))*h.signNotZero(d)}return n.x=h.toSNorm(n.x,t),n.y=h.toSNorm(n.y,t),n};r.octEncode=function(e,t){return r.octEncodeInRange(e,255,t)};var A=new T,F=new Uint8Array(1);function E(e){return F[0]=e,F[0]}r.octEncodeToCartesian4=function(e,t){return r.octEncodeInRange(e,65535,A),t.x=E(A.x*V),t.y=E(A.x),t.z=E(A.y*V),t.w=E(A.y),t};r.octDecodeInRange=function(e,t,n,o){if(a.defined("result",o),e<0||e>n||t<0||t>n)throw new u(`x and y must be unsigned normalized integers between 0 and ${n}`);if(o.x=h.fromSNorm(e,n),o.y=h.fromSNorm(t,n),o.z=1-(Math.abs(o.x)+Math.abs(o.y)),o.z<0){let i=o.x;o.x=(1-Math.abs(o.y))*h.signNotZero(i),o.y=(1-Math.abs(i))*h.signNotZero(o.y)}return C.normalize(o,o)};r.octDecode=function(e,t,n){return r.octDecodeInRange(e,t,255,n)};r.octDecodeFromCartesian4=function(e,t){a.typeOf.object("encoded",e),a.typeOf.object("result",t);let n=e.x,o=e.y,i=e.z,d=e.w;if(n<0||n>255||o<0||o>255||i<0||i>255||d<0||d>255)throw new u("x, y, z, and w must be unsigned normalized integers between 0 and 255");let f=n*D+o,s=i*D+d;return r.octDecodeInRange(f,s,65535,t)};r.octPackFloat=function(e){return a.defined("encoded",e),256*e.x+e.y};var l=new T;r.octEncodeFloat=function(e){return r.octEncode(e,l),r.octPackFloat(l)};r.octDecodeFloat=function(e,t){a.defined("value",e);let n=e/256,o=Math.floor(n),i=(n-o)*256;return r.octDecode(o,i,t)};r.octPack=function(e,t,n,o){a.defined("v1",e),a.defined("v2",t),a.defined("v3",n),a.defined("result",o);let i=r.octEncodeFloat(e),d=r.octEncodeFloat(t),f=r.octEncode(n,l);return o.x=65536*f.x+i,o.y=65536*f.y+d,o};r.octUnpack=function(e,t,n,o){a.defined("packed",e),a.defined("v1",t),a.defined("v2",n),a.defined("v3",o);let i=e.x/65536,d=Math.floor(i),f=(i-d)*65536;i=e.y/65536;let s=Math.floor(i),m=(i-s)*65536;r.octDecodeFloat(f,t),r.octDecodeFloat(m,n),r.octDecode(d,s,o)};r.compressTextureCoordinates=function(e){a.defined("textureCoordinates",e);let t=e.x*4095|0,n=e.y*4095|0;return 4096*t+n};r.decompressTextureCoordinates=function(e,t){a.defined("compressed",e),a.defined("result",t);let n=e/4096,o=Math.floor(n);return t.x=o/4095,t.y=(e-o*4096)/4095,t};function g(e){return e>>1^-(e&1)}r.zigZagDeltaDecode=function(e,t,n){a.defined("uBuffer",e),a.defined("vBuffer",t),a.typeOf.number.equals("uBuffer.length","vBuffer.length",e.length,t.length),b(n)&&a.typeOf.number.equals("uBuffer.length","heightBuffer.length",e.length,n.length);let o=e.length,i=0,d=0,f=0;for(let s=0;s<o;++s)i+=g(e[s]),d+=g(t[s]),e[s]=i,t[s]=d,b(n)&&(f+=g(n[s]),n[s]=f)};r.dequantize=function(e,t,n,o){a.defined("typedArray",e),a.defined("componentDatatype",t),a.defined("type",n),a.defined("count",o);let i=N.getNumberOfComponents(n),d;switch(t){case y.BYTE:d=127;break;case y.UNSIGNED_BYTE:d=255;break;case y.SHORT:d=32767;break;case y.UNSIGNED_SHORT:d=65535;break;case y.INT:d=2147483647;break;case y.UNSIGNED_INT:d=4294967295;break;default:throw new u(`Cannot dequantize component datatype: ${t}`)}let f=new Float32Array(o*i);for(let s=0;s<o;s++)for(let m=0;m<i;m++){let p=s*i+m;f[p]=Math.max(e[p]/d,-1)}return f};r.decodeRGB565=function(e,t){a.defined("typedArray",e);let n=e.length*3;b(t)&&a.typeOf.number.equals("result.length","typedArray.length * 3",t.length,n);let o=e.length;b(t)||(t=new Float32Array(o*3));let i=31,d=63,f=1/31,s=1/63;for(let m=0;m<o;m++){let p=e[m],R=p>>11,I=p>>5&d,O=p&i,M=3*m;t[M]=R*f,t[M+1]=I*s,t[M+2]=O*f}return t};var W=r;export{W as a};
public/CimSDK/Workers/chunk-FBQDLPON.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as l,b as d}from"./chunk-HMXXHGCW.js";import{b as t}from"./chunk-VDZXURWO.js";import{a as s}from"./chunk-UEFEFMYS.js";import{a as f,b as r}from"./chunk-3K67FZLU.js";import{e as m}from"./chunk-55TU6MJR.js";function o(e,n){if(r.typeOf.object("normal",e),!s.equalsEpsilon(t.magnitude(e),1,s.EPSILON6))throw new f("normal must be normalized.");r.typeOf.number("distance",n),this.normal=t.clone(e),this.distance=n}o.fromPointNormal=function(e,n,a){if(r.typeOf.object("point",e),r.typeOf.object("normal",n),!s.equalsEpsilon(t.magnitude(n),1,s.EPSILON6))throw new f("normal must be normalized.");let c=-t.dot(n,e);return m(a)?(t.clone(n,a.normal),a.distance=c,a):new o(n,c)};var b=new t;o.fromCartesian4=function(e,n){r.typeOf.object("coefficients",e);let a=t.fromCartesian4(e,b),c=e.w;if(!s.equalsEpsilon(t.magnitude(a),1,s.EPSILON6))throw new f("normal must be normalized.");return m(n)?(t.clone(a,n.normal),n.distance=c,n):new o(a,c)};o.getPointDistance=function(e,n){return r.typeOf.object("plane",e),r.typeOf.object("point",n),t.dot(e.normal,n)+e.distance};var y=new t;o.projectPointOntoPlane=function(e,n,a){r.typeOf.object("plane",e),r.typeOf.object("point",n),m(a)||(a=new t);let c=o.getPointDistance(e,n),p=t.multiplyByScalar(e.normal,c,y);return t.subtract(n,p,a)};var w=new d,j=new l,N=new t;o.transform=function(e,n,a){r.typeOf.object("plane",e),r.typeOf.object("transform",n);let c=e.normal,p=e.distance,u=d.inverseTranspose(n,w),i=l.fromElements(c.x,c.y,c.z,p,j);i=d.multiplyByVector(u,i,i);let O=t.fromCartesian4(i,N);return i=l.divideByScalar(i,t.magnitude(O),i),o.fromCartesian4(i,a)};o.clone=function(e,n){return r.typeOf.object("plane",e),m(n)?(t.clone(e.normal,n.normal),n.distance=e.distance,n):new o(e.normal,e.distance)};o.equals=function(e,n){return r.typeOf.object("left",e),r.typeOf.object("right",n),e.distance===n.distance&&t.equals(e.normal,n.normal)};o.ORIGIN_XY_PLANE=Object.freeze(new o(t.UNIT_Z,0));o.ORIGIN_YZ_PLANE=Object.freeze(new o(t.UNIT_X,0));o.ORIGIN_ZX_PLANE=Object.freeze(new o(t.UNIT_Y,0));var T=o;export{T as a};
public/CimSDK/Workers/chunk-FNJ2A2P5.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as N}from"./chunk-EZRSLM27.js";import{d as Q}from"./chunk-ZPW6H6BB.js";import{b as d,i as Z}from"./chunk-HMXXHGCW.js";import{a as k}from"./chunk-NFDMGE7Q.js";import{b as s,c as U,d as x,e as O}from"./chunk-VDZXURWO.js";import{a as w}from"./chunk-UEFEFMYS.js";import{a as P}from"./chunk-5HWP5DW7.js";import{a as D,b as T}from"./chunk-3K67FZLU.js";import{e as h}from"./chunk-55TU6MJR.js";function z(o,t){T.typeOf.object("ellipsoid",o),this._ellipsoid=o,this._cameraPosition=new s,this._cameraPositionInScaledSpace=new s,this._distanceToLimbInScaledSpaceSquared=0,h(t)&&(this.cameraPosition=t)}Object.defineProperties(z.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(o){let e=this._ellipsoid.transformPositionToScaledSpace(o,this._cameraPositionInScaledSpace),a=s.magnitudeSquared(e)-1;s.clone(o,this._cameraPosition),this._cameraPositionInScaledSpace=e,this._distanceToLimbInScaledSpaceSquared=a}}});var v=new s;z.prototype.isPointVisible=function(o){let e=this._ellipsoid.transformPositionToScaledSpace(o,v);return W(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};z.prototype.isScaledSpacePointVisible=function(o){return W(o,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var nt=new s;z.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(o,t){let e=this._ellipsoid,a,i;return h(t)&&t<0&&e.minimumRadius>-t?(i=nt,i.x=this._cameraPosition.x/(e.radii.x+t),i.y=this._cameraPosition.y/(e.radii.y+t),i.z=this._cameraPosition.z/(e.radii.z+t),a=i.x*i.x+i.y*i.y+i.z*i.z-1):(i=this._cameraPositionInScaledSpace,a=this._distanceToLimbInScaledSpaceSquared),W(o,i,a)};z.prototype.computeHorizonCullingPoint=function(o,t,e){return X(this._ellipsoid,o,t,e)};var J=O.clone(O.UNIT_SPHERE);z.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(o,t,e,a){let i=K(this._ellipsoid,e,J);return X(i,o,t,a)};z.prototype.computeHorizonCullingPointFromVertices=function(o,t,e,a,i){return Y(this._ellipsoid,o,t,e,a,i)};z.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(o,t,e,a,i,c){let n=K(this._ellipsoid,i,J);return Y(n,o,t,e,a,c)};var st=[];z.prototype.computeHorizonCullingPointFromRectangle=function(o,t,e){T.typeOf.object("rectangle",o);let a=Z.subsample(o,t,0,st),i=Q.fromPoints(a);if(!(s.magnitude(i.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(i.center,a,e)};var ct=new s;function K(o,t,e){if(h(t)&&t<0&&o.minimumRadius>-t){let a=s.fromElements(o.radii.x+t,o.radii.y+t,o.radii.z+t,ct);o=O.fromCartesian3(a,e)}return o}function X(o,t,e,a){T.typeOf.object("directionToPoint",t),T.defined("positions",e),h(a)||(a=new s);let i=tt(o,t),c=0;for(let n=0,r=e.length;n<r;++n){let m=e[n],p=$(o,m,i);if(p<0)return;c=Math.max(c,p)}return B(i,c,a)}var V=new s;function Y(o,t,e,a,i,c){T.typeOf.object("directionToPoint",t),T.defined("vertices",e),T.typeOf.number("stride",a),h(c)||(c=new s),a=P(a,3),i=P(i,s.ZERO);let n=tt(o,t),r=0;for(let m=0,p=e.length;m<p;m+=a){V.x=e[m]+i.x,V.y=e[m+1]+i.y,V.z=e[m+2]+i.z;let u=$(o,V,n);if(u<0)return;r=Math.max(r,u)}return B(n,r,c)}function W(o,t,e){let a=t,i=e,c=s.subtract(o,a,v),n=-s.dot(c,a);return!(i<0?n>0:n>i&&n*n/s.magnitudeSquared(c)>i)}var rt=new s,mt=new s;function $(o,t,e){let a=o.transformPositionToScaledSpace(t,rt),i=s.magnitudeSquared(a),c=Math.sqrt(i),n=s.divideByScalar(a,c,mt);i=Math.max(1,i),c=Math.max(1,c);let r=s.dot(n,e),m=s.magnitude(s.cross(n,e,n)),p=1/c,u=Math.sqrt(i-1)*p;return 1/(r*p-m*u)}function B(o,t,e){if(!(t<=0||t===1/0||t!==t))return s.multiplyByScalar(o,t,e)}var F=new s;function tt(o,t){return s.equals(t,s.ZERO)?t:(o.transformPositionToScaledSpace(t,F),s.normalize(F,F))}var Pt=z;var G={};G.getHeight=function(o,t,e){if(!Number.isFinite(t))throw new D("scale must be a finite number.");if(!Number.isFinite(e))throw new D("relativeHeight must be a finite number.");return(o-e)*t+e};var dt=new U;G.getPosition=function(o,t,e,a,i){let c=t.cartesianToCartographic(o,dt);if(!h(c))return s.clone(o,i);let n=G.getHeight(c.height,e,a);return s.fromRadians(c.longitude,c.latitude,n,t,i)};var ot=G;var ht={NONE:0,BITS12:1},S=Object.freeze(ht);var C=new s,lt=new s,f=new x,H=new d,pt=new d,ut=Math.pow(2,12);function l(o,t,e,a,i,c,n,r,m,p){let u=S.NONE,y,g;if(h(t)&&h(e)&&h(a)&&h(i)){let E=t.minimum,I=t.maximum,_=s.subtract(I,E,lt),A=a-e;Math.max(s.maximumComponent(_),A)<ut-1?u=S.BITS12:u=S.NONE,y=d.inverseTransformation(i,new d);let R=s.negate(E,C);d.multiply(d.fromTranslation(R,H),y,y);let b=C;b.x=1/_.x,b.y=1/_.y,b.z=1/_.z,d.multiply(d.fromScale(b,H),y,y),g=d.clone(i),d.setTranslation(g,s.ZERO,g),i=d.clone(i,new d);let it=d.fromTranslation(E,H),at=d.fromScale(_,pt),j=d.multiply(it,at,H);d.multiply(i,j,i),d.multiply(g,j,g)}this.quantization=u,this.minimumHeight=e,this.maximumHeight=a,this.center=s.clone(o),this.toScaledENU=y,this.fromScaledENU=i,this.matrix=g,this.hasVertexNormals=c,this.hasWebMercatorT=P(n,!1),this.hasGeodeticSurfaceNormals=P(r,!1),this.exaggeration=P(m,1),this.exaggerationRelativeHeight=P(p,0),this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}l.prototype.encode=function(o,t,e,a,i,c,n,r,m,p,u){let y=a.x,g=a.y;if(this.quantization===S.BITS12){e=d.multiplyByPoint(this.toScaledENU,e,C),e.x=w.clamp(e.x,0,1),e.y=w.clamp(e.y,0,1),e.z=w.clamp(e.z,0,1);let E=this.maximumHeight-this.minimumHeight,I=w.clamp((i-this.minimumHeight)/E,0,1);x.fromElements(e.x,e.y,f);let _=N.compressTextureCoordinates(f);x.fromElements(e.z,I,f);let A=N.compressTextureCoordinates(f);x.fromElements(y,g,f);let L=N.compressTextureCoordinates(f);if(o[t++]=_,o[t++]=A,o[t++]=L,this.hasWebMercatorT){x.fromElements(n,0,f);let R=N.compressTextureCoordinates(f);o[t++]=R}}else s.subtract(e,this.center,C),o[t++]=C.x,o[t++]=C.y,o[t++]=C.z,o[t++]=i,o[t++]=y,o[t++]=g,this.hasWebMercatorT&&(o[t++]=n);return this.hasVertexNormals&&(m?o[t++]=c:(p&&(c.x=123.456,c.y=123.456),o[t++]=N.octPackFloat(c))),this.hasGeodeticSurfaceNormals&&(o[t++]=r.x,o[t++]=r.y,o[t++]=r.z),o[t++]=u,t};var St=new s,et=new s;l.prototype.addGeodeticSurfaceNormals=function(o,t,e){if(this.hasGeodeticSurfaceNormals)return;let a=this.stride,i=o.length/a;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();let c=this.stride;for(let n=0;n<i;n++){for(let u=0;u<a;u++){let y=n*a+u,g=n*c+u;t[g]=o[y]}let r=this.decodePosition(t,n,St),m=e.geodeticSurfaceNormal(r,et),p=n*c+this._offsetGeodeticSurfaceNormal;t[p]=m.x,t[p+1]=m.y,t[p+2]=m.z}};l.prototype.removeGeodeticSurfaceNormals=function(o,t){if(!this.hasGeodeticSurfaceNormals)return;let e=this.stride,a=o.length/e;this.hasGeodeticSurfaceNormals=!1,this._calculateStrideAndOffsets();let i=this.stride;for(let c=0;c<a;c++)for(let n=0;n<i;n++){let r=c*e+n,m=c*i+n;t[m]=o[r]}};l.prototype.decodePosition=function(o,t,e){if(h(e)||(e=new s),t*=this.stride,this.quantization===S.BITS12){let a=N.decompressTextureCoordinates(o[t],f);e.x=a.x,e.y=a.y;let i=N.decompressTextureCoordinates(o[t+1],f);return e.z=i.x,d.multiplyByPoint(this.fromScaledENU,e,e)}return e.x=o[t],e.y=o[t+1],e.z=o[t+2],s.add(e,this.center,e)};l.prototype.getExaggeratedPosition=function(o,t,e){e=this.decodePosition(o,t,e);let a=this.exaggeration,i=this.exaggerationRelativeHeight;if(a!==1&&this.hasGeodeticSurfaceNormals){let n=this.decodeGeodeticSurfaceNormal(o,t,et),r=this.decodeHeight(o,t),m=ot.getHeight(r,a,i)-r;e.x+=n.x*m,e.y+=n.y*m,e.z+=n.z*m}return e};l.prototype.decodeTextureCoordinates=function(o,t,e){return h(e)||(e=new x),t*=this.stride,this.quantization===S.BITS12?N.decompressTextureCoordinates(o[t+2],e):x.fromElements(o[t+4],o[t+5],e)};l.prototype.decodeHeight=function(o,t){return t*=this.stride,this.quantization===S.BITS12?N.decompressTextureCoordinates(o[t+1],f).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:o[t+3]};l.prototype.decodeWebMercatorT=function(o,t){return t*=this.stride,this.quantization===S.BITS12?N.decompressTextureCoordinates(o[t+3],f).x:o[t+6]};l.prototype.getOctEncodedNormal=function(o,t,e){t=t*this.stride+this._offsetVertexNormal;let a=o[t]/256,i=Math.floor(a),c=(a-i)*256;return x.fromElements(i,c,e)};l.prototype.decodeGeodeticSurfaceNormal=function(o,t,e){return t=t*this.stride+this._offsetGeodeticSurfaceNormal,e.x=o[t],e.y=o[t+1],e.z=o[t+2],e};l.prototype._calculateStrideAndOffsets=function(){let o=0;switch(this.quantization){case S.BITS12:o+=3;break;default:o+=6}this.hasWebMercatorT&&(o+=1),this.hasVertexNormals&&(this._offsetVertexNormal=o,o+=1),this.hasGeodeticSurfaceNormals&&(this._offsetGeodeticSurfaceNormal=o,o+=3),o+=1,this.stride=o};var q={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2,skirt:3},M={compressed0:0,compressed1:1,geodeticSurfaceNormal:2,skirt:3};l.prototype.getAttributes=function(o){let t=k.FLOAT,e=k.getSizeInBytes(t),a=this.stride*e,i=0,c=[];function n(r,m){c.push({index:r,vertexBuffer:o,componentDatatype:t,componentsPerAttribute:m,offsetInBytes:i,strideInBytes:a}),i+=m*e}if(this.quantization===S.NONE){n(q.position3DAndHeight,4);let r=2;r+=this.hasWebMercatorT?1:0,r+=this.hasVertexNormals?1:0,n(q.textureCoordAndEncodedNormals,r),this.hasGeodeticSurfaceNormals&&n(q.geodeticSurfaceNormal,3),n(q.skirt,1)}else{let r=this.hasWebMercatorT||this.hasVertexNormals,m=this.hasWebMercatorT&&this.hasVertexNormals;n(M.compressed0,r?4:3),m&&n(M.compressed1,1),this.hasGeodeticSurfaceNormals&&n(M.geodeticSurfaceNormal,3),n(M.skirt,1)}return c};l.prototype.getAttributeLocations=function(){return this.quantization===S.NONE?q:M};l.clone=function(o,t){if(h(o))return h(t)||(t=new l),t.quantization=o.quantization,t.minimumHeight=o.minimumHeight,t.maximumHeight=o.maximumHeight,t.center=s.clone(o.center),t.toScaledENU=d.clone(o.toScaledENU),t.fromScaledENU=d.clone(o.fromScaledENU),t.matrix=d.clone(o.matrix),t.hasVertexNormals=o.hasVertexNormals,t.hasWebMercatorT=o.hasWebMercatorT,t.hasGeodeticSurfaceNormals=o.hasGeodeticSurfaceNormals,t.exaggeration=o.exaggeration,t.exaggerationRelativeHeight=o.exaggerationRelativeHeight,t._calculateStrideAndOffsets(),t};var Wt=l;export{Pt as a,Wt as b};
public/CimSDK/Workers/chunk-GN3R6MXA.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as R}from"./chunk-3B3UDCHP.js";import{a as st}from"./chunk-OOGG7EHS.js";import{a as Z,b as H}from"./chunk-VDNLYVKB.js";import{a as V}from"./chunk-EX67AA2G.js";import{a as U}from"./chunk-V5KKODOM.js";import{b as it}from"./chunk-AIYLFSI3.js";import{a as ct}from"./chunk-FBQDLPON.js";import{a as ot}from"./chunk-563CJZT3.js";import{a as nt}from"./chunk-LH4TAMBV.js";import{b as J,c as X,d as z}from"./chunk-WI5KIEME.js";import{f as K}from"./chunk-HMXXHGCW.js";import{a as k}from"./chunk-NFDMGE7Q.js";import{b as w,c as q,d as M,e as et,f as F}from"./chunk-VDZXURWO.js";import{a as I}from"./chunk-UEFEFMYS.js";import{a as tt}from"./chunk-5HWP5DW7.js";import{e as x}from"./chunk-55TU6MJR.js";function dt(n,i){this.positions=x(n)?n:[],this.holes=x(i)?i:[]}var rt=dt;function S(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(S.prototype,{length:{get:function(){return this._length}}});S.prototype.enqueue=function(n){this._array.push(n),this._length++};S.prototype.dequeue=function(){if(this._length===0)return;let n=this._array,i=this._offset,u=n[i];return n[i]=void 0,i++,i>10&&i*2>n.length&&(this._array=n.slice(i),i=0),this._offset=i,this._length--,u};S.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};S.prototype.contains=function(n){return this._array.indexOf(n)!==-1};S.prototype.clear=function(){this._array.length=this._offset=this._length=0};S.prototype.sort=function(n){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(n)};var $=S;var b={};b.computeHierarchyPackedLength=function(n,i){let u=0,c=[n];for(;c.length>0;){let r=c.pop();if(!x(r))continue;u+=2;let a=r.positions,t=r.holes;if(x(a)&&a.length>0&&(u+=a.length*i.packedLength),x(t)){let o=t.length;for(let e=0;e<o;++e)c.push(t[e])}}return u};b.packPolygonHierarchy=function(n,i,u,c){let r=[n];for(;r.length>0;){let a=r.pop();if(!x(a))continue;let t=a.positions,o=a.holes;if(i[u++]=x(t)?t.length:0,i[u++]=x(o)?o.length:0,x(t)){let e=t.length;for(let s=0;s<e;++s,u+=c.packedLength)c.pack(t[s],i,u)}if(x(o)){let e=o.length;for(let s=0;s<e;++s)r.push(o[s])}}return u};b.unpackPolygonHierarchy=function(n,i,u){let c=n[i++],r=n[i++],a=new Array(c),t=r>0?new Array(r):void 0;for(let o=0;o<c;++o,i+=u.packedLength)a[o]=u.unpack(n,i);for(let o=0;o<r;++o)t[o]=b.unpackPolygonHierarchy(n,i,u),i=t[o].startingIndex,delete t[o].startingIndex;return{positions:a,holes:t,startingIndex:i}};var O=new M;function ht(n,i,u,c){return M.subtract(i,n,O),M.multiplyByScalar(O,u/c,O),M.add(n,O,O),[O.x,O.y]}var G=new w;function gt(n,i,u,c){return w.subtract(i,n,G),w.multiplyByScalar(G,u/c,G),w.add(n,G,G),[G.x,G.y,G.z]}b.subdivideLineCount=function(n,i,u){let r=w.distance(n,i)/u,a=Math.max(0,Math.ceil(I.log2(r)));return Math.pow(2,a)};var j=new q,Q=new q,pt=new q,mt=new w,Y=new U;b.subdivideRhumbLineCount=function(n,i,u,c){let r=n.cartesianToCartographic(i,j),a=n.cartesianToCartographic(u,Q),o=new U(r,a,n).surfaceDistance/c,e=Math.max(0,Math.ceil(I.log2(o)));return Math.pow(2,e)};b.subdivideTexcoordLine=function(n,i,u,c,r,a){let t=b.subdivideLineCount(u,c,r),o=M.distance(n,i),e=o/t,s=a;s.length=t*2;let l=0;for(let h=0;h<t;h++){let f=ht(n,i,h*e,o);s[l++]=f[0],s[l++]=f[1]}return s};b.subdivideLine=function(n,i,u,c){let r=b.subdivideLineCount(n,i,u),a=w.distance(n,i),t=a/r;x(c)||(c=[]);let o=c;o.length=r*3;let e=0;for(let s=0;s<r;s++){let l=gt(n,i,s*t,a);o[e++]=l[0],o[e++]=l[1],o[e++]=l[2]}return o};b.subdivideTexcoordRhumbLine=function(n,i,u,c,r,a,t){let o=u.cartesianToCartographic(c,j),e=u.cartesianToCartographic(r,Q);Y.setEndPoints(o,e);let s=Y.surfaceDistance/a,l=Math.max(0,Math.ceil(I.log2(s))),h=Math.pow(2,l),f=M.distance(n,i),g=f/h,m=t;m.length=h*2;let p=0;for(let d=0;d<h;d++){let y=ht(n,i,d*g,f);m[p++]=y[0],m[p++]=y[1]}return m};b.subdivideRhumbLine=function(n,i,u,c,r){let a=n.cartesianToCartographic(i,j),t=n.cartesianToCartographic(u,Q),o=new U(a,t,n),e=o.surfaceDistance/c,s=Math.max(0,Math.ceil(I.log2(e))),l=Math.pow(2,s),h=o.surfaceDistance/l;x(r)||(r=[]);let f=r;f.length=l*3;let g=0;for(let m=0;m<l;m++){let p=o.interpolateUsingSurfaceDistance(m*h,pt),d=n.cartographicToCartesian(p,mt);f[g++]=d.x,f[g++]=d.y,f[g++]=d.z}return f};var yt=new w,xt=new w,wt=new w,bt=new w;b.scaleToGeodeticHeightExtruded=function(n,i,u,c,r){c=tt(c,et.default);let a=yt,t=xt,o=wt,e=bt;if(x(n)&&x(n.attributes)&&x(n.attributes.position)){let s=n.attributes.position.values,l=s.length/2;for(let h=0;h<l;h+=3)w.fromArray(s,h,o),c.geodeticSurfaceNormal(o,a),e=c.scaleToGeodeticSurface(o,e),t=w.multiplyByScalar(a,u,t),t=w.add(e,t,t),s[h+l]=t.x,s[h+1+l]=t.y,s[h+2+l]=t.z,r&&(e=w.clone(o,e)),t=w.multiplyByScalar(a,i,t),t=w.add(e,t,t),s[h]=t.x,s[h+1]=t.y,s[h+2]=t.z}return n};b.polygonOutlinesFromHierarchy=function(n,i,u){let c=[],r=new $;r.enqueue(n);let a,t,o;for(;r.length!==0;){let e=r.dequeue(),s=e.positions;if(i)for(o=s.length,a=0;a<o;a++)u.scaleToGeodeticSurface(s[a],s[a]);if(s=V(s,w.equalsEpsilon,!0),s.length<3)continue;let l=e.holes?e.holes.length:0;for(a=0;a<l;a++){let h=e.holes[a],f=h.positions;if(i)for(o=f.length,t=0;t<o;++t)u.scaleToGeodeticSurface(f[t],f[t]);if(f=V(f,w.equalsEpsilon,!0),f.length<3)continue;c.push(f);let g=0;for(x(h.holes)&&(g=h.holes.length),t=0;t<g;t++)r.enqueue(h.holes[t])}c.push(s)}return c};var Lt=new q;function Tt(n,i,u){let c=u.cartesianToCartographic(n,j),r=u.cartesianToCartographic(i,Q);if(Math.sign(c.latitude)===Math.sign(r.latitude))return;Y.setEndPoints(c,r);let a=Y.findIntersectionWithLatitude(0,Lt);if(!x(a))return;let t=Math.min(c.longitude,r.longitude),o=Math.max(c.longitude,r.longitude);if(Math.abs(o-t)>I.PI){let e=t;t=o,o=e}if(!(a.longitude<t||a.longitude>o))return u.cartographicToCartesian(a)}function Et(n,i,u,c){if(c===R.RHUMB)return Tt(n,i,u);let r=it.lineSegmentPlane(n,i,ct.ORIGIN_XY_PLANE);if(x(r))return u.scaleToGeodeticSurface(r,r)}var vt=new q;function Ct(n,i,u){let c=[],r,a,t,o,e,s=0;for(;s<n.length;){r=n[s],a=n[(s+1)%n.length],t=I.sign(r.z),o=I.sign(a.z);let l=h=>i.cartesianToCartographic(h,vt).longitude;if(t===0)c.push({position:s,type:t,visited:!1,next:o,theta:l(r)});else if(o!==0){if(e=Et(r,a,i,u),++s,!x(e))continue;n.splice(s,0,e),c.push({position:s,type:t,visited:!1,next:o,theta:l(e)})}++s}return c}function lt(n,i,u,c,r,a,t){let o=[],e=a,s=h=>f=>f.position===h,l=[];do{let h=u[e];o.push(h);let f=c.findIndex(s(e)),g=c[f];if(!x(g)){++e;continue}let{visited:m,type:p,next:d}=g;if(g.visited=!0,p===0){if(d===0){let C=c[f-(t?1:-1)];if(C?.position===e+1)C.visited=!0;else{++e;continue}}if(!m&&t&&d>0||a===e&&!t&&d<0){++e;continue}}if(!(t?p>=0:p<=0)){++e;continue}m||l.push(e);let L=f+(t?1:-1),_=c[L];if(!x(_)){++e;continue}e=_.position}while(e<u.length&&e>=0&&e!==a&&o.length<u.length);n.splice(i,r,o);for(let h of l)i=lt(n,++i,u,c,0,h,!t);return i}b.splitPolygonsOnEquator=function(n,i,u,c){x(c)||(c=[]),c.splice(0,0,...n),c.length=n.length;let r=0;for(;r<c.length;){let a=c[r],t=a.slice();if(a.length<3){c[r]=t,++r;continue}let o=Ct(t,i,u);if(t.length===a.length||o.length<=1){c[r]=t,++r;continue}o.sort((s,l)=>s.theta-l.theta);let e=t[0].z>=0;r=lt(c,r,t,o,1,0,e)}return c};b.polygonsFromHierarchy=function(n,i,u,c,r,a){let t=[],o=[],e=new $;e.enqueue(n);let s=x(a);for(;e.length!==0;){let l=e.dequeue(),h=l.positions,f=l.holes,g,m;if(c)for(m=h.length,g=0;g<m;g++)r.scaleToGeodeticSurface(h[g],h[g]);if(i||(h=V(h,w.equalsEpsilon,!0)),h.length<3)continue;let p=u(h);if(!x(p))continue;let d=[],y=H.computeWindingOrder2D(p);if(y===Z.CLOCKWISE&&(p.reverse(),h=h.slice().reverse()),s){s=!1;let P=[h];if(P=a(P,P),P.length>1){for(let v of P)e.enqueue(new rt(v,f));continue}}let L=h.slice(),_=x(f)?f.length:0,C=[],T;for(g=0;g<_;g++){let P=f[g],v=P.positions;if(c)for(m=v.length,T=0;T<m;++T)r.scaleToGeodeticSurface(v[T],v[T]);if(i||(v=V(v,w.equalsEpsilon,!0)),v.length<3)continue;let E=u(v);if(!x(E))continue;y=H.computeWindingOrder2D(E),y===Z.CLOCKWISE&&(E.reverse(),v=v.slice().reverse()),C.push(v),d.push(L.length),L=L.concat(v),p=p.concat(E);let D=0;for(x(P.holes)&&(D=P.holes.length),T=0;T<D;T++)e.enqueue(P.holes[T])}t.push({outerRing:h,holes:C}),o.push({positions:L,positions2D:p,holes:d})}return{hierarchy:t,polygons:o}};var Pt=new M,Dt=new w,It=new K,_t=new F;b.computeBoundingRectangle=function(n,i,u,c,r){let a=K.fromAxisAngle(n,c,It),t=F.fromQuaternion(a,_t),o=Number.POSITIVE_INFINITY,e=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,h=u.length;for(let f=0;f<h;++f){let g=w.clone(u[f],Dt);F.multiplyByVector(t,g,g);let m=i(g,Pt);x(m)&&(o=Math.min(o,m.x),e=Math.max(e,m.x),s=Math.min(s,m.y),l=Math.max(l,m.y))}return r.x=o,r.y=s,r.width=e-o,r.height=l-s,r};b.createGeometryFromPositions=function(n,i,u,c,r,a,t){let o=H.triangulate(i.positions2D,i.holes);o.length<3&&(o=[0,1,2]);let e=i.positions,s=x(u),l=s?u.positions:void 0;if(r){let h=e.length,f=new Array(h*3),g=0;for(let d=0;d<h;d++){let y=e[d];f[g++]=y.x,f[g++]=y.y,f[g++]=y.z}let m={attributes:{position:new z({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:f})},indices:o,primitiveType:J.TRIANGLES};s&&(m.attributes.st=new z({componentDatatype:k.FLOAT,componentsPerAttribute:2,values:M.packArray(l)}));let p=new X(m);return a.normal?st.computeNormal(p):p}if(t===R.GEODESIC)return H.computeSubdivision(n,e,o,l,c);if(t===R.RHUMB)return H.computeRhumbLineSubdivision(n,e,o,l,c)};var ut=[],at=[],At=new w,Mt=new w;b.computeWallGeometry=function(n,i,u,c,r,a){let t,o,e,s,l,h,f,g,m,p=n.length,d=0,y=0,L=x(i),_=L?i.positions:void 0;if(r)for(o=p*3*2,t=new Array(o*2),L&&(m=p*2*2,g=new Array(m*2)),e=0;e<p;e++)s=n[e],l=n[(e+1)%p],t[d]=t[d+o]=s.x,++d,t[d]=t[d+o]=s.y,++d,t[d]=t[d+o]=s.z,++d,t[d]=t[d+o]=l.x,++d,t[d]=t[d+o]=l.y,++d,t[d]=t[d+o]=l.z,++d,L&&(h=_[e],f=_[(e+1)%p],g[y]=g[y+m]=h.x,++y,g[y]=g[y+m]=h.y,++y,g[y]=g[y+m]=f.x,++y,g[y]=g[y+m]=f.y,++y);else{let E=I.chordLength(c,u.maximumRadius),D=0;if(a===R.GEODESIC)for(e=0;e<p;e++)D+=b.subdivideLineCount(n[e],n[(e+1)%p],E);else if(a===R.RHUMB)for(e=0;e<p;e++)D+=b.subdivideRhumbLineCount(u,n[e],n[(e+1)%p],E);for(o=(D+p)*3,t=new Array(o*2),L&&(m=(D+p)*2,g=new Array(m*2)),e=0;e<p;e++){s=n[e],l=n[(e+1)%p];let A,N;L&&(h=_[e],f=_[(e+1)%p]),a===R.GEODESIC?(A=b.subdivideLine(s,l,E,at),L&&(N=b.subdivideTexcoordLine(h,f,s,l,E,ut))):a===R.RHUMB&&(A=b.subdivideRhumbLine(u,s,l,E,at),L&&(N=b.subdivideTexcoordRhumbLine(h,f,u,s,l,E,ut)));let ft=A.length;for(let B=0;B<ft;++B,++d)t[d]=A[B],t[d+o]=A[B];if(t[d]=l.x,t[d+o]=l.x,++d,t[d]=l.y,t[d+o]=l.y,++d,t[d]=l.z,t[d+o]=l.z,++d,L){let B=N.length;for(let W=0;W<B;++W,++y)g[y]=N[W],g[y+m]=N[W];g[y]=f.x,g[y+m]=f.x,++y,g[y]=f.y,g[y+m]=f.y,++y}}}p=t.length;let C=ot.createTypedArray(p/3,p-n.length*6),T=0;for(p/=6,e=0;e<p;e++){let E=e,D=E+1,A=E+p,N=A+1;s=w.fromArray(t,E*3,At),l=w.fromArray(t,D*3,Mt),!w.equalsEpsilon(s,l,I.EPSILON10,I.EPSILON10)&&(C[T++]=E,C[T++]=A,C[T++]=D,C[T++]=D,C[T++]=A,C[T++]=N)}let P={attributes:new nt({position:new z({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:t})}),indices:C,primitiveType:J.TRIANGLES};return L&&(P.attributes.st=new z({componentDatatype:k.FLOAT,componentsPerAttribute:2,values:g})),new X(P)};var se=b;export{se as a};
public/CimSDK/Workers/chunk-HMXXHGCW.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,46 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{b as _,c as Me,d as Oe,e as ze,f as W,g as ft}from"./chunk-VDZXURWO.js";import{a as E}from"./chunk-UEFEFMYS.js";import{a as Se}from"./chunk-PZ34T7DL.js";import{a as O}from"./chunk-5HWP5DW7.js";import{a as A,b as s}from"./chunk-3K67FZLU.js";import{a as St,c as Rt,d as Ze,e as p}from"./chunk-55TU6MJR.js";var Un=Rt((et,tt)=>{/*! https://mths.be/punycode v1.4.0 by @mathias */(function(e){var t=typeof et=="object"&&et&&!et.nodeType&&et,n=typeof tt=="object"&&tt&&!tt.nodeType&&tt,o=typeof global=="object"&&global;(o.global===o||o.window===o||o.self===o)&&(e=o);var i,r=2147483647,a=36,u=1,d=26,m=38,l=700,w=72,T=128,v="-",P=/^xn--/,j=/[^\x20-\x7E]/,q=/[\x2E\u3002\uFF0E\uFF61]/g,k={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=a-u,F=Math.floor,B=String.fromCharCode,Q;function H(b){throw new RangeError(k[b])}function ee(b,z){for(var N=b.length,Y=[];N--;)Y[N]=z(b[N]);return Y}function re(b,z){var N=b.split("@"),Y="";N.length>1&&(Y=N[0]+"@",b=N[1]),b=b.replace(q,".");var ie=b.split("."),ae=ee(ie,z).join(".");return Y+ae}function Z(b){for(var z=[],N=0,Y=b.length,ie,ae;N<Y;)ie=b.charCodeAt(N++),ie>=55296&&ie<=56319&&N<Y?(ae=b.charCodeAt(N++),(ae&64512)==56320?z.push(((ie&1023)<<10)+(ae&1023)+65536):(z.push(ie),N--)):z.push(ie);return z}function oe(b){return ee(b,function(z){var N="";return z>65535&&(z-=65536,N+=B(z>>>10&1023|55296),z=56320|z&1023),N+=B(z),N}).join("")}function J(b){return b-48<10?b-22:b-65<26?b-65:b-97<26?b-97:a}function c(b,z){return b+22+75*(b<26)-((z!=0)<<5)}function f(b,z,N){var Y=0;for(b=N?F(b/l):b>>1,b+=F(b/z);b>x*d>>1;Y+=a)b=F(b/x);return F(Y+(x+1)*b/(b+m))}function h(b){var z=[],N=b.length,Y,ie=0,ae=T,te=w,ue,de,ye,me,he,X,_e,Te,je;for(ue=b.lastIndexOf(v),ue<0&&(ue=0),de=0;de<ue;++de)b.charCodeAt(de)>=128&&H("not-basic"),z.push(b.charCodeAt(de));for(ye=ue>0?ue+1:0;ye<N;){for(me=ie,he=1,X=a;ye>=N&&H("invalid-input"),_e=J(b.charCodeAt(ye++)),(_e>=a||_e>F((r-ie)/he))&&H("overflow"),ie+=_e*he,Te=X<=te?u:X>=te+d?d:X-te,!(_e<Te);X+=a)je=a-Te,he>F(r/je)&&H("overflow"),he*=je;Y=z.length+1,te=f(ie-me,Y,me==0),F(ie/Y)>r-ae&&H("overflow"),ae+=F(ie/Y),ie%=Y,z.splice(ie++,0,ae)}return oe(z)}function y(b){var z,N,Y,ie,ae,te,ue,de,ye,me,he,X=[],_e,Te,je,at;for(b=Z(b),_e=b.length,z=T,N=0,ae=w,te=0;te<_e;++te)he=b[te],he<128&&X.push(B(he));for(Y=ie=X.length,ie&&X.push(v);Y<_e;){for(ue=r,te=0;te<_e;++te)he=b[te],he>=z&&he<ue&&(ue=he);for(Te=Y+1,ue-z>F((r-N)/Te)&&H("overflow"),N+=(ue-z)*Te,z=ue,te=0;te<_e;++te)if(he=b[te],he<z&&++N>r&&H("overflow"),he==z){for(de=N,ye=a;me=ye<=ae?u:ye>=ae+d?d:ye-ae,!(de<me);ye+=a)at=de-me,je=a-me,X.push(B(c(me+at%je,0))),de=F(at/je);X.push(B(c(de,0))),ae=f(N,Te,Y==ie),N=0,++Y}++N,++z}return X.join("")}function g(b){return re(b,function(z){return P.test(z)?h(z.slice(4).toLowerCase()):z})}function C(b){return re(b,function(z){return j.test(z)?"xn--"+y(z):z})}if(i={version:"1.3.2",ucs2:{decode:Z,encode:oe},decode:h,encode:y,toASCII:C,toUnicode:g},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return i});else if(t&&n)if(tt.exports==t)n.exports=i;else for(Q in i)i.hasOwnProperty(Q)&&(t[Q]=i[Q]);else e.punycode=i})(et)});var zn=Rt((In,Mt)=>{/*!
 * 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 Mt=="object"&&Mt.exports?Mt.exports=t():typeof define=="function"&&define.amd?define(t):e.IPv6=t(e)})(In,function(e){"use strict";var t=e&&e.IPv6;function n(i){var r=i.toLowerCase(),a=r.split(":"),u=a.length,d=8;a[0]===""&&a[1]===""&&a[2]===""?(a.shift(),a.shift()):a[0]===""&&a[1]===""?a.shift():a[u-1]===""&&a[u-2]===""&&a.pop(),u=a.length,a[u-1].indexOf(".")!==-1&&(d=7);var m;for(m=0;m<u&&a[m]!=="";m++);if(m<d)for(a.splice(m,1,"0000");a.length<d;)a.splice(m,0,"0000");for(var l,w=0;w<d;w++){l=a[w].split("");for(var T=0;T<3&&(l[0]==="0"&&l.length>1);T++)l.splice(0,1);a[w]=l.join("")}var v=-1,P=0,j=0,q=-1,k=!1;for(w=0;w<d;w++)k?a[w]==="0"?j+=1:(k=!1,j>P&&(v=q,P=j)):a[w]==="0"&&(k=!0,q=w,j=1);j>P&&(v=q,P=j),P>1&&a.splice(v,P,""),u=a.length;var x="";for(a[0]===""&&(x=":"),w=0;w<u&&(x+=a[w],w!==u-1);w++)x+=":";return a[u-1]===""&&(x+=":"),x}function o(){return e.IPv6===this&&(e.IPv6=t),this}return{best:n,noConflict:o}})});var Dn=Rt((qn,Pt)=>{/*!
 * 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 Pt=="object"&&Pt.exports?Pt.exports=t():typeof define=="function"&&define.amd?define(t):e.SecondLevelDomains=t(e)})(qn,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(o){var i=o.lastIndexOf(".");if(i<=0||i>=o.length-1)return!1;var r=o.lastIndexOf(".",i-1);if(r<=0||r>=i-1)return!1;var a=n.list[o.slice(i+1)];return a?a.indexOf(" "+o.slice(r+1,i)+" ")>=0:!1},is:function(o){var i=o.lastIndexOf(".");if(i<=0||i>=o.length-1)return!1;var r=o.lastIndexOf(".",i-1);if(r>=0)return!1;var a=n.list[o.slice(i+1)];return a?a.indexOf(" "+o.slice(0,i)+" ")>=0:!1},get:function(o){var i=o.lastIndexOf(".");if(i<=0||i>=o.length-1)return null;var r=o.lastIndexOf(".",i-1);if(r<=0||r>=i-1)return null;var a=n.list[o.slice(i+1)];return!a||a.indexOf(" "+o.slice(r+1,i)+" ")<0?null:o.slice(r+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n})});var We=Rt((Nn,Ut)=>{/*!
 * 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 Ut=="object"&&Ut.exports?Ut.exports=t(Un(),zn(),Dn()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],t):e.URI=t(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(Nn,function(e,t,n,o){"use strict";var i=o&&o.URI;function r(c,f){var h=arguments.length>=1,y=arguments.length>=2;if(!(this instanceof r))return h?y?new r(c,f):new r(c):new r;if(c===void 0){if(h)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?c=location.href+"":c=""}if(c===null&&h)throw new TypeError("null is not a valid argument for URI");return this.href(c),f!==void 0?this.absoluteTo(f):this}function a(c){return/^[0-9]+$/.test(c)}r.version="1.19.11";var u=r.prototype,d=Object.prototype.hasOwnProperty;function m(c){return c.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function l(c){return c===void 0?"Undefined":String(Object.prototype.toString.call(c)).slice(8,-1)}function w(c){return l(c)==="Array"}function T(c,f){var h={},y,g;if(l(f)==="RegExp")h=null;else if(w(f))for(y=0,g=f.length;y<g;y++)h[f[y]]=!0;else h[f]=!0;for(y=0,g=c.length;y<g;y++){var C=h&&h[c[y]]!==void 0||!h&&f.test(c[y]);C&&(c.splice(y,1),g--,y--)}return c}function v(c,f){var h,y;if(w(f)){for(h=0,y=f.length;h<y;h++)if(!v(c,f[h]))return!1;return!0}var g=l(f);for(h=0,y=c.length;h<y;h++)if(g==="RegExp"){if(typeof c[h]=="string"&&c[h].match(f))return!0}else if(c[h]===f)return!0;return!1}function P(c,f){if(!w(c)||!w(f)||c.length!==f.length)return!1;c.sort(),f.sort();for(var h=0,y=c.length;h<y;h++)if(c[h]!==f[h])return!1;return!0}function j(c){var f=/^\/+|\/+$/g;return c.replace(f,"")}r._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:r.preventInvalidHostname,duplicateQueryParameters:r.duplicateQueryParameters,escapeQuerySpace:r.escapeQuerySpace}},r.preventInvalidHostname=!1,r.duplicateQueryParameters=!1,r.escapeQuerySpace=!0,r.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,r.idn_expression=/[^a-z0-9\._-]/i,r.punycode_expression=/(xn--)/i,r.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,r.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,r.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,r.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},r.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,r.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,r.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},r.hostProtocols=["http","https"],r.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,r.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},r.getDomAttribute=function(c){if(!(!c||!c.nodeName)){var f=c.nodeName.toLowerCase();if(!(f==="input"&&c.type!=="image"))return r.domAttributes[f]}};function q(c){return escape(c)}function k(c){return encodeURIComponent(c).replace(/[!'()*]/g,q).replace(/\*/g,"%2A")}r.encode=k,r.decode=decodeURIComponent,r.iso8859=function(){r.encode=escape,r.decode=unescape},r.unicode=function(){r.encode=k,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,f){var h=r.encode(c+"");return f===void 0&&(f=r.escapeQuerySpace),f?h.replace(/%20/g,"+"):h},r.decodeQuery=function(c,f){c+="",f===void 0&&(f=r.escapeQuerySpace);try{return r.decode(f?c.replace(/\+/g,"%20"):c)}catch{return c}};var x={encode:"encode",decode:"decode"},F,B=function(c,f){return function(h){try{return r[f](h+"").replace(r.characters[c][f].expression,function(y){return r.characters[c][f].map[y]})}catch{return h}}};for(F in x)r[F+"PathSegment"]=B("pathname",x[F]),r[F+"UrnPathSegment"]=B("urnpath",x[F]);var Q=function(c,f,h){return function(y){var g;h?g=function(N){return r[f](r[h](N))}:g=r[f];for(var C=(y+"").split(c),b=0,z=C.length;b<z;b++)C[b]=g(C[b]);return C.join(c)}};r.decodePath=Q("/","decodePathSegment"),r.decodeUrnPath=Q(":","decodeUrnPathSegment"),r.recodePath=Q("/","encodePathSegment","decode"),r.recodeUrnPath=Q(":","encodeUrnPathSegment","decode"),r.encodeReserved=B("reserved","encode"),r.parse=function(c,f){var h;return f||(f={preventInvalidHostname:r.preventInvalidHostname}),c=c.replace(r.leading_whitespace_expression,""),c=c.replace(r.ascii_tab_whitespace,""),h=c.indexOf("#"),h>-1&&(f.fragment=c.substring(h+1)||null,c=c.substring(0,h)),h=c.indexOf("?"),h>-1&&(f.query=c.substring(h+1)||null,c=c.substring(0,h)),c=c.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),c=c.replace(/^[/\\]{2,}/i,"//"),c.substring(0,2)==="//"?(f.protocol=null,c=c.substring(2),c=r.parseAuthority(c,f)):(h=c.indexOf(":"),h>-1&&(f.protocol=c.substring(0,h)||null,f.protocol&&!f.protocol.match(r.protocol_expression)?f.protocol=void 0:c.substring(h+1,h+3).replace(/\\/g,"/")==="//"?(c=c.substring(h+3),c=r.parseAuthority(c,f)):(c=c.substring(h+1),f.urn=!0))),f.path=c,f},r.parseHost=function(c,f){c||(c=""),c=c.replace(/\\/g,"/");var h=c.indexOf("/"),y,g;if(h===-1&&(h=c.length),c.charAt(0)==="[")y=c.indexOf("]"),f.hostname=c.substring(1,y)||null,f.port=c.substring(y+2,h)||null,f.port==="/"&&(f.port=null);else{var C=c.indexOf(":"),b=c.indexOf("/"),z=c.indexOf(":",C+1);z!==-1&&(b===-1||z<b)?(f.hostname=c.substring(0,h)||null,f.port=null):(g=c.substring(0,h).split(":"),f.hostname=g[0]||null,f.port=g[1]||null)}return f.hostname&&c.substring(h).charAt(0)!=="/"&&(h++,c="/"+c),f.preventInvalidHostname&&r.ensureValidHostname(f.hostname,f.protocol),f.port&&r.ensureValidPort(f.port),c.substring(h)||"/"},r.parseAuthority=function(c,f){return c=r.parseUserinfo(c,f),r.parseHost(c,f)},r.parseUserinfo=function(c,f){var h=c,y=c.indexOf("\\");y!==-1&&(c=c.replace(/\\/g,"/"));var g=c.indexOf("/"),C=c.lastIndexOf("@",g>-1?g:c.length-1),b;return C>-1&&(g===-1||C<g)?(b=c.substring(0,C).split(":"),f.username=b[0]?r.decode(b[0]):null,b.shift(),f.password=b[0]?r.decode(b.join(":")):null,c=h.substring(C+1)):(f.username=null,f.password=null),c},r.parseQuery=function(c,f){if(!c)return{};if(c=c.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!c)return{};for(var h={},y=c.split("&"),g=y.length,C,b,z,N=0;N<g;N++)C=y[N].split("="),b=r.decodeQuery(C.shift(),f),z=C.length?r.decodeQuery(C.join("="),f):null,b!=="__proto__"&&(d.call(h,b)?((typeof h[b]=="string"||h[b]===null)&&(h[b]=[h[b]]),h[b].push(z)):h[b]=z);return h},r.build=function(c){var f="",h=!1;return c.protocol&&(f+=c.protocol+":"),!c.urn&&(f||c.hostname)&&(f+="//",h=!0),f+=r.buildAuthority(c)||"",typeof c.path=="string"&&(c.path.charAt(0)!=="/"&&h&&(f+="/"),f+=c.path),typeof c.query=="string"&&c.query&&(f+="?"+c.query),typeof c.fragment=="string"&&c.fragment&&(f+="#"+c.fragment),f},r.buildHost=function(c){var f="";if(c.hostname)r.ip6_expression.test(c.hostname)?f+="["+c.hostname+"]":f+=c.hostname;else return"";return c.port&&(f+=":"+c.port),f},r.buildAuthority=function(c){return r.buildUserinfo(c)+r.buildHost(c)},r.buildUserinfo=function(c){var f="";return c.username&&(f+=r.encode(c.username)),c.password&&(f+=":"+r.encode(c.password)),f&&(f+="@"),f},r.buildQuery=function(c,f,h){var y="",g,C,b,z;for(C in c)if(C!=="__proto__"&&d.call(c,C))if(w(c[C]))for(g={},b=0,z=c[C].length;b<z;b++)c[C][b]!==void 0&&g[c[C][b]+""]===void 0&&(y+="&"+r.buildQueryParameter(C,c[C][b],h),f!==!0&&(g[c[C][b]+""]=!0));else c[C]!==void 0&&(y+="&"+r.buildQueryParameter(C,c[C],h));return y.substring(1)},r.buildQueryParameter=function(c,f,h){return r.encodeQuery(c,h)+(f!==null?"="+r.encodeQuery(f,h):"")},r.addQuery=function(c,f,h){if(typeof f=="object")for(var y in f)d.call(f,y)&&r.addQuery(c,y,f[y]);else if(typeof f=="string"){if(c[f]===void 0){c[f]=h;return}else typeof c[f]=="string"&&(c[f]=[c[f]]);w(h)||(h=[h]),c[f]=(c[f]||[]).concat(h)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},r.setQuery=function(c,f,h){if(typeof f=="object")for(var y in f)d.call(f,y)&&r.setQuery(c,y,f[y]);else if(typeof f=="string")c[f]=h===void 0?null:h;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},r.removeQuery=function(c,f,h){var y,g,C;if(w(f))for(y=0,g=f.length;y<g;y++)c[f[y]]=void 0;else if(l(f)==="RegExp")for(C in c)f.test(C)&&(c[C]=void 0);else if(typeof f=="object")for(C in f)d.call(f,C)&&r.removeQuery(c,C,f[C]);else if(typeof f=="string")h!==void 0?l(h)==="RegExp"?!w(c[f])&&h.test(c[f])?c[f]=void 0:c[f]=T(c[f],h):c[f]===String(h)&&(!w(h)||h.length===1)?c[f]=void 0:w(c[f])&&(c[f]=T(c[f],h)):c[f]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},r.hasQuery=function(c,f,h,y){switch(l(f)){case"String":break;case"RegExp":for(var g in c)if(d.call(c,g)&&f.test(g)&&(h===void 0||r.hasQuery(c,g,h)))return!0;return!1;case"Object":for(var C in f)if(d.call(f,C)&&!r.hasQuery(c,C,f[C]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(l(h)){case"Undefined":return f in c;case"Boolean":var b=!!(w(c[f])?c[f].length:c[f]);return h===b;case"Function":return!!h(c[f],f,c);case"Array":if(!w(c[f]))return!1;var z=y?v:P;return z(c[f],h);case"RegExp":return w(c[f])?y?v(c[f],h):!1:!!(c[f]&&c[f].match(h));case"Number":h=String(h);case"String":return w(c[f])?y?v(c[f],h):!1:c[f]===h;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},r.joinPaths=function(){for(var c=[],f=[],h=0,y=0;y<arguments.length;y++){var g=new r(arguments[y]);c.push(g);for(var C=g.segment(),b=0;b<C.length;b++)typeof C[b]=="string"&&f.push(C[b]),C[b]&&h++}if(!f.length||!h)return new r("");var z=new r("").segment(f);return(c[0].path()===""||c[0].path().slice(0,1)==="/")&&z.path("/"+z.path()),z.normalize()},r.commonPath=function(c,f){var h=Math.min(c.length,f.length),y;for(y=0;y<h;y++)if(c.charAt(y)!==f.charAt(y)){y--;break}return y<1?c.charAt(0)===f.charAt(0)&&c.charAt(0)==="/"?"/":"":((c.charAt(y)!=="/"||f.charAt(y)!=="/")&&(y=c.substring(0,y).lastIndexOf("/")),c.substring(0,y+1))},r.withinString=function(c,f,h){h||(h={});var y=h.start||r.findUri.start,g=h.end||r.findUri.end,C=h.trim||r.findUri.trim,b=h.parens||r.findUri.parens,z=/[a-z0-9-]=["']?$/i;for(y.lastIndex=0;;){var N=y.exec(c);if(!N)break;var Y=N.index;if(h.ignoreHtml){var ie=c.slice(Math.max(Y-3,0),Y);if(ie&&z.test(ie))continue}for(var ae=Y+c.slice(Y).search(g),te=c.slice(Y,ae),ue=-1;;){var de=b.exec(te);if(!de)break;var ye=de.index+de[0].length;ue=Math.max(ue,ye)}if(ue>-1?te=te.slice(0,ue)+te.slice(ue).replace(C,""):te=te.replace(C,""),!(te.length<=N[0].length)&&!(h.ignore&&h.ignore.test(te))){ae=Y+te.length;var me=f(te,Y,ae,c);if(me===void 0){y.lastIndex=ae;continue}me=String(me),c=c.slice(0,Y)+me+c.slice(ae),y.lastIndex=Y+me.length}}return y.lastIndex=0,c},r.ensureValidHostname=function(c,f){var h=!!c,y=!!f,g=!1;if(y&&(g=v(r.hostProtocols,f)),g&&!h)throw new TypeError("Hostname cannot be empty, if protocol is "+f);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 f=Number(c);if(!(a(f)&&f>0&&f<65536))throw new TypeError('Port "'+c+'" is not a valid port')}},r.noConflict=function(c){if(c){var f={URI:this.noConflict()};return o.URITemplate&&typeof o.URITemplate.noConflict=="function"&&(f.URITemplate=o.URITemplate.noConflict()),o.IPv6&&typeof o.IPv6.noConflict=="function"&&(f.IPv6=o.IPv6.noConflict()),o.SecondLevelDomains&&typeof o.SecondLevelDomains.noConflict=="function"&&(f.SecondLevelDomains=o.SecondLevelDomains.noConflict()),f}else o.URI===this&&(o.URI=i);return this},u.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},u.clone=function(){return new r(this)},u.valueOf=u.toString=function(){return this.build(!1)._string};function H(c){return function(f,h){return f===void 0?this._parts[c]||"":(this._parts[c]=f||null,this.build(!h),this)}}function ee(c,f){return function(h,y){return h===void 0?this._parts[c]||"":(h!==null&&(h=h+"",h.charAt(0)===f&&(h=h.substring(1))),this._parts[c]=h,this.build(!y),this)}}u.protocol=H("protocol"),u.username=H("username"),u.password=H("password"),u.hostname=H("hostname"),u.port=H("port"),u.query=ee("query","?"),u.fragment=ee("fragment","#"),u.search=function(c,f){var h=this.query(c,f);return typeof h=="string"&&h.length?"?"+h:h},u.hash=function(c,f){var h=this.fragment(c,f);return typeof h=="string"&&h.length?"#"+h:h},u.pathname=function(c,f){if(c===void 0||c===!0){var h=this._parts.path||(this._parts.hostname?"/":"");return c?(this._parts.urn?r.decodeUrnPath:r.decodePath)(h):h}else return this._parts.urn?this._parts.path=c?r.recodeUrnPath(c):"":this._parts.path=c?r.recodePath(c):"/",this.build(!f),this},u.path=u.pathname,u.href=function(c,f){var h;if(c===void 0)return this.toString();this._string="",this._parts=r._parts();var y=c instanceof r,g=typeof c=="object"&&(c.hostname||c.path||c.pathname);if(c.nodeName){var C=r.getDomAttribute(c);c=c[C]||"",g=!1}if(!y&&g&&c.pathname!==void 0&&(c=c.toString()),typeof c=="string"||c instanceof String)this._parts=r.parse(String(c),this._parts);else if(y||g){var b=y?c._parts:c;for(h in b)h!=="query"&&d.call(this._parts,h)&&(this._parts[h]=b[h]);b.query&&this.query(b.query,!1)}else throw new TypeError("invalid input");return this.build(!f),this},u.is=function(c){var f=!1,h=!1,y=!1,g=!1,C=!1,b=!1,z=!1,N=!this._parts.urn;switch(this._parts.hostname&&(N=!1,h=r.ip4_expression.test(this._parts.hostname),y=r.ip6_expression.test(this._parts.hostname),f=h||y,g=!f,C=g&&n&&n.has(this._parts.hostname),b=g&&r.idn_expression.test(this._parts.hostname),z=g&&r.punycode_expression.test(this._parts.hostname)),c.toLowerCase()){case"relative":return N;case"absolute":return!N;case"domain":case"name":return g;case"sld":return C;case"ip":return f;case"ip4":case"ipv4":case"inet4":return h;case"ip6":case"ipv6":case"inet6":return y;case"idn":return b;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return z}return null};var re=u.protocol,Z=u.port,oe=u.hostname;u.protocol=function(c,f){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 re.call(this,c,f)},u.scheme=u.protocol,u.port=function(c,f){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))),Z.call(this,c,f))},u.hostname=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c!==void 0){var h={preventInvalidHostname:this._parts.preventInvalidHostname},y=r.parseHost(c,h);if(y!=="/")throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-]');c=h.hostname,this._parts.preventInvalidHostname&&r.ensureValidHostname(c,this._parts.protocol)}return oe.call(this,c,f)},u.origin=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0){var h=this.protocol(),y=this.authority();return y?(h?h+"://":"")+this.authority():""}else{var g=r(c);return this.protocol(g.protocol()).authority(g.authority()).build(!f),this}},u.host=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0)return this._parts.hostname?r.buildHost(this._parts):"";var h=r.parseHost(c,this._parts);if(h!=="/")throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-]');return this.build(!f),this},u.authority=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0)return this._parts.hostname?r.buildAuthority(this._parts):"";var h=r.parseAuthority(c,this._parts);if(h!=="/")throw new TypeError('Hostname "'+c+'" contains characters other than [A-Z0-9.-]');return this.build(!f),this},u.userinfo=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0){var h=r.buildUserinfo(this._parts);return h&&h.substring(0,h.length-1)}else return c[c.length-1]!=="@"&&(c+="@"),r.parseUserinfo(c,this._parts),this.build(!f),this},u.resource=function(c,f){var h;return c===void 0?this.path()+this.search()+this.hash():(h=r.parse(c),this._parts.path=h.path,this._parts.query=h.query,this._parts.fragment=h.fragment,this.build(!f),this)},u.subdomain=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0){if(!this._parts.hostname||this.is("IP"))return"";var h=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,h)||""}else{var y=this._parts.hostname.length-this.domain().length,g=this._parts.hostname.substring(0,y),C=new RegExp("^"+m(g));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(C,c),this.build(!f),this}},u.domain=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(typeof c=="boolean"&&(f=c,c=void 0),c===void 0){if(!this._parts.hostname||this.is("IP"))return"";var h=this._parts.hostname.match(/\./g);if(h&&h.length<2)return this._parts.hostname;var y=this._parts.hostname.length-this.tld(f).length-1;return y=this._parts.hostname.lastIndexOf(".",y-1)+1,this._parts.hostname.substring(y)||""}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 g=new RegExp(m(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(g,c)}return this.build(!f),this}},u.tld=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(typeof c=="boolean"&&(f=c,c=void 0),c===void 0){if(!this._parts.hostname||this.is("IP"))return"";var h=this._parts.hostname.lastIndexOf("."),y=this._parts.hostname.substring(h+1);return f!==!0&&n&&n.list[y.toLowerCase()]&&n.get(this._parts.hostname)||y}else{var g;if(c)if(c.match(/[^a-zA-Z0-9-]/))if(n&&n.is(c))g=new RegExp(m(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(g,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");g=new RegExp(m(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(g,c)}else throw new TypeError("cannot set TLD empty");return this.build(!f),this}},u.directory=function(c,f){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 h=this._parts.path.length-this.filename().length-1,y=this._parts.path.substring(0,h)||(this._parts.hostname?"/":"");return c?r.decodePath(y):y}else{var g=this._parts.path.length-this.filename().length,C=this._parts.path.substring(0,g),b=new RegExp("^"+m(C));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(b,c),this.build(!f),this}},u.filename=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(typeof c!="string"){if(!this._parts.path||this._parts.path==="/")return"";var h=this._parts.path.lastIndexOf("/"),y=this._parts.path.substring(h+1);return c?r.decodePathSegment(y):y}else{var g=!1;c.charAt(0)==="/"&&(c=c.substring(1)),c.match(/\.?\//)&&(g=!0);var C=new RegExp(m(this.filename())+"$");return c=r.recodePath(c),this._parts.path=this._parts.path.replace(C,c),g?this.normalizePath(f):this.build(!f),this}},u.suffix=function(c,f){if(this._parts.urn)return c===void 0?"":this;if(c===void 0||c===!0){if(!this._parts.path||this._parts.path==="/")return"";var h=this.filename(),y=h.lastIndexOf("."),g,C;return y===-1?"":(g=h.substring(y+1),C=/^[a-z0-9%]+$/i.test(g)?g:"",c?r.decodePathSegment(C):C)}else{c.charAt(0)==="."&&(c=c.substring(1));var b=this.suffix(),z;if(b)c?z=new RegExp(m(b)+"$"):z=new RegExp(m("."+b)+"$");else{if(!c)return this;this._parts.path+="."+r.recodePath(c)}return z&&(c=r.recodePath(c),this._parts.path=this._parts.path.replace(z,c)),this.build(!f),this}},u.segment=function(c,f,h){var y=this._parts.urn?":":"/",g=this.path(),C=g.substring(0,1)==="/",b=g.split(y);if(c!==void 0&&typeof c!="number"&&(h=f,f=c,c=void 0),c!==void 0&&typeof c!="number")throw new Error('Bad segment "'+c+'", must be 0-based integer');if(C&&b.shift(),c<0&&(c=Math.max(b.length+c,0)),f===void 0)return c===void 0?b:b[c];if(c===null||b[c]===void 0)if(w(f)){b=[];for(var z=0,N=f.length;z<N;z++)!f[z].length&&(!b.length||!b[b.length-1].length)||(b.length&&!b[b.length-1].length&&b.pop(),b.push(j(f[z])))}else(f||typeof f=="string")&&(f=j(f),b[b.length-1]===""?b[b.length-1]=f:b.push(f));else f?b[c]=j(f):b.splice(c,1);return C&&b.unshift(""),this.path(b.join(y),h)},u.segmentCoded=function(c,f,h){var y,g,C;if(typeof c!="number"&&(h=f,f=c,c=void 0),f===void 0){if(y=this.segment(c,f,h),!w(y))y=y!==void 0?r.decode(y):void 0;else for(g=0,C=y.length;g<C;g++)y[g]=r.decode(y[g]);return y}if(!w(f))f=typeof f=="string"||f instanceof String?r.encode(f):f;else for(g=0,C=f.length;g<C;g++)f[g]=r.encode(f[g]);return this.segment(c,f,h)};var J=u.query;return u.query=function(c,f){if(c===!0)return r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof c=="function"){var h=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace),y=c.call(this,h);return this._parts.query=r.buildQuery(y||h,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!f),this}else return c!==void 0&&typeof c!="string"?(this._parts.query=r.buildQuery(c,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!f),this):J.call(this,c,f)},u.setQuery=function(c,f,h){var y=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof c=="string"||c instanceof String)y[c]=f!==void 0?f:null;else if(typeof c=="object")for(var g in c)d.call(c,g)&&(y[g]=c[g]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=r.buildQuery(y,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof c!="string"&&(h=f),this.build(!h),this},u.addQuery=function(c,f,h){var y=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.addQuery(y,c,f===void 0?null:f),this._parts.query=r.buildQuery(y,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof c!="string"&&(h=f),this.build(!h),this},u.removeQuery=function(c,f,h){var y=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.removeQuery(y,c,f),this._parts.query=r.buildQuery(y,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof c!="string"&&(h=f),this.build(!h),this},u.hasQuery=function(c,f,h){var y=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.hasQuery(y,c,f,h)},u.setSearch=u.setQuery,u.addSearch=u.addQuery,u.removeSearch=u.removeQuery,u.hasSearch=u.hasQuery,u.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()},u.normalizeProtocol=function(c){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!c)),this},u.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},u.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},u.normalizePath=function(c){var f=this._parts.path;if(!f)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;f=r.recodePath(f);var h,y="",g,C;for(f.charAt(0)!=="/"&&(h=!0,f="/"+f),(f.slice(-3)==="/.."||f.slice(-2)==="/.")&&(f+="/"),f=f.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),h&&(y=f.substring(1).match(/^(\.\.\/)+/)||"",y&&(y=y[0]));g=f.search(/\/\.\.(\/|$)/),g!==-1;){if(g===0){f=f.substring(3);continue}C=f.substring(0,g).lastIndexOf("/"),C===-1&&(C=g),f=f.substring(0,C)+f.substring(g+3)}return h&&this.is("relative")&&(f=y+f.substring(1)),this._parts.path=f,this.build(!c),this},u.normalizePathname=u.normalizePath,u.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},u.normalizeFragment=function(c){return this._parts.fragment||(this._parts.fragment=null,this.build(!c)),this},u.normalizeSearch=u.normalizeQuery,u.normalizeHash=u.normalizeFragment,u.iso8859=function(){var c=r.encode,f=r.decode;r.encode=escape,r.decode=decodeURIComponent;try{this.normalize()}finally{r.encode=c,r.decode=f}return this},u.unicode=function(){var c=r.encode,f=r.decode;r.encode=k,r.decode=unescape;try{this.normalize()}finally{r.encode=c,r.decode=f}return this},u.readable=function(){var c=this.clone();c.username("").password("").normalize();var f="";if(c._parts.protocol&&(f+=c._parts.protocol+"://"),c._parts.hostname&&(c.is("punycode")&&e?(f+=e.toUnicode(c._parts.hostname),c._parts.port&&(f+=":"+c._parts.port)):f+=c.host()),c._parts.hostname&&c._parts.path&&c._parts.path.charAt(0)!=="/"&&(f+="/"),f+=c.path(!0),c._parts.query){for(var h="",y=0,g=c._parts.query.split("&"),C=g.length;y<C;y++){var b=(g[y]||"").split("=");h+="&"+r.decodeQuery(b[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),b[1]!==void 0&&(h+="="+r.decodeQuery(b[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}f+="?"+h.substring(1)}return f+=r.decodeQuery(c.hash(),!0),f},u.absoluteTo=function(c){var f=this.clone(),h=["protocol","username","password","hostname","port"],y,g,C;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(c instanceof r||(c=new r(c)),f._parts.protocol||(f._parts.protocol=c._parts.protocol,this._parts.hostname))return f;for(g=0;C=h[g];g++)f._parts[C]=c._parts[C];return f._parts.path?(f._parts.path.substring(-2)===".."&&(f._parts.path+="/"),f.path().charAt(0)!=="/"&&(y=c.directory(),y=y||(c.path().indexOf("/")===0?"/":""),f._parts.path=(y?y+"/":"")+f._parts.path,f.normalizePath())):(f._parts.path=c._parts.path,f._parts.query||(f._parts.query=c._parts.query)),f.build(),f},u.relativeTo=function(c){var f=this.clone().normalize(),h,y,g,C,b;if(f._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(c=new r(c).normalize(),h=f._parts,y=c._parts,C=f.path(),b=c.path(),C.charAt(0)!=="/")throw new Error("URI is already relative");if(b.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(h.protocol===y.protocol&&(h.protocol=null),h.username!==y.username||h.password!==y.password||h.protocol!==null||h.username!==null||h.password!==null)return f.build();if(h.hostname===y.hostname&&h.port===y.port)h.hostname=null,h.port=null;else return f.build();if(C===b)return h.path="",f.build();if(g=r.commonPath(C,b),!g)return f.build();var z=y.path.substring(g.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return h.path=z+h.path.substring(g.length)||"./",f.build()},u.equals=function(c){var f=this.clone(),h=new r(c),y={},g={},C={},b,z,N;if(f.normalize(),h.normalize(),f.toString()===h.toString())return!0;if(b=f.query(),z=h.query(),f.query(""),h.query(""),f.toString()!==h.toString()||b.length!==z.length)return!1;y=r.parseQuery(b,this._parts.escapeQuerySpace),g=r.parseQuery(z,this._parts.escapeQuerySpace);for(N in y)if(d.call(y,N)){if(w(y[N])){if(!P(y[N],g[N]))return!1}else if(y[N]!==g[N])return!1;C[N]=!0}for(N in g)if(d.call(g,N)&&!C[N])return!1;return!0},u.preventInvalidHostname=function(c){return this._parts.preventInvalidHostname=!!c,this},u.duplicateQueryParameters=function(c){return this._parts.duplicateQueryParameters=!!c,this},u.escapeQuerySpace=function(c){return this._parts.escapeQuerySpace=!!c,this},r})});function M(e,t,n,o){this.x=O(e,0),this.y=O(t,0),this.z=O(n,0),this.w=O(o,0)}M.fromElements=function(e,t,n,o,i){return p(i)?(i.x=e,i.y=t,i.z=n,i.w=o,i):new M(e,t,n,o)};M.fromColor=function(e,t){return s.typeOf.object("color",e),p(t)?(t.x=e.red,t.y=e.green,t.z=e.blue,t.w=e.alpha,t):new M(e.red,e.green,e.blue,e.alpha)};M.clone=function(e,t){if(p(e))return p(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new M(e.x,e.y,e.z,e.w)};M.packedLength=4;M.pack=function(e,t,n){return s.typeOf.object("value",e),s.defined("array",t),n=O(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t};M.unpack=function(e,t,n){return s.defined("array",e),t=O(t,0),p(n)||(n=new M),n.x=e[t++],n.y=e[t++],n.z=e[t++],n.w=e[t],n};M.packArray=function(e,t){s.defined("array",e);let n=e.length,o=n*4;if(!p(t))t=new Array(o);else{if(!Array.isArray(t)&&t.length!==o)throw new A("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==o&&(t.length=o)}for(let i=0;i<n;++i)M.pack(e[i],t,i*4);return t};M.unpackArray=function(e,t){if(s.defined("array",e),s.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!==0)throw new A("array length must be a multiple of 4.");let n=e.length;p(t)?t.length=n/4:t=new Array(n/4);for(let o=0;o<n;o+=4){let i=o/4;t[i]=M.unpack(e,o,t[i])}return t};M.fromArray=M.unpack;M.maximumComponent=function(e){return s.typeOf.object("cartesian",e),Math.max(e.x,e.y,e.z,e.w)};M.minimumComponent=function(e){return s.typeOf.object("cartesian",e),Math.min(e.x,e.y,e.z,e.w)};M.minimumByComponent=function(e,t,n){return s.typeOf.object("first",e),s.typeOf.object("second",t),s.typeOf.object("result",n),n.x=Math.min(e.x,t.x),n.y=Math.min(e.y,t.y),n.z=Math.min(e.z,t.z),n.w=Math.min(e.w,t.w),n};M.maximumByComponent=function(e,t,n){return s.typeOf.object("first",e),s.typeOf.object("second",t),s.typeOf.object("result",n),n.x=Math.max(e.x,t.x),n.y=Math.max(e.y,t.y),n.z=Math.max(e.z,t.z),n.w=Math.max(e.w,t.w),n};M.clamp=function(e,t,n,o){s.typeOf.object("value",e),s.typeOf.object("min",t),s.typeOf.object("max",n),s.typeOf.object("result",o);let i=E.clamp(e.x,t.x,n.x),r=E.clamp(e.y,t.y,n.y),a=E.clamp(e.z,t.z,n.z),u=E.clamp(e.w,t.w,n.w);return o.x=i,o.y=r,o.z=a,o.w=u,o};M.magnitudeSquared=function(e){return s.typeOf.object("cartesian",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};M.magnitude=function(e){return Math.sqrt(M.magnitudeSquared(e))};var Et=new M;M.distance=function(e,t){return s.typeOf.object("left",e),s.typeOf.object("right",t),M.subtract(e,t,Et),M.magnitude(Et)};M.distanceSquared=function(e,t){return s.typeOf.object("left",e),s.typeOf.object("right",t),M.subtract(e,t,Et),M.magnitudeSquared(Et)};M.normalize=function(e,t){s.typeOf.object("cartesian",e),s.typeOf.object("result",t);let n=M.magnitude(e);if(t.x=e.x/n,t.y=e.y/n,t.z=e.z/n,t.w=e.w/n,isNaN(t.x)||isNaN(t.y)||isNaN(t.z)||isNaN(t.w))throw new A("normalized result is not a number");return t};M.dot=function(e,t){return s.typeOf.object("left",e),s.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w};M.multiplyComponents=function(e,t,n){return s.typeOf.object("left",e),s.typeOf.object("right",t),s.typeOf.object("result",n),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};M.divideComponents=function(e,t,n){return s.typeOf.object("left",e),s.typeOf.object("right",t),s.typeOf.object("result",n),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};M.add=function(e,t,n){return s.typeOf.object("left",e),s.typeOf.object("right",t),s.typeOf.object("result",n),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};M.subtract=function(e,t,n){return s.typeOf.object("left",e),s.typeOf.object("right",t),s.typeOf.object("result",n),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};M.multiplyByScalar=function(e,t,n){return s.typeOf.object("cartesian",e),s.typeOf.number("scalar",t),s.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n};M.divideByScalar=function(e,t,n){return s.typeOf.object("cartesian",e),s.typeOf.number("scalar",t),s.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n};M.negate=function(e,t){return s.typeOf.object("cartesian",e),s.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t};M.abs=function(e,t){return s.typeOf.object("cartesian",e),s.typeOf.object("result",t),t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t.w=Math.abs(e.w),t};var Tn=new M;M.lerp=function(e,t,n,o){return s.typeOf.object("start",e),s.typeOf.object("end",t),s.typeOf.number("t",n),s.typeOf.object("result",o),M.multiplyByScalar(t,n,Tn),o=M.multiplyByScalar(e,1-n,o),M.add(Tn,o,o)};var No=new M;M.mostOrthogonalAxis=function(e,t){s.typeOf.object("cartesian",e),s.typeOf.object("result",t);let n=M.normalize(e,No);return M.abs(n,n),n.x<=n.y?n.x<=n.z?n.x<=n.w?t=M.clone(M.UNIT_X,t):t=M.clone(M.UNIT_W,t):n.z<=n.w?t=M.clone(M.UNIT_Z,t):t=M.clone(M.UNIT_W,t):n.y<=n.z?n.y<=n.w?t=M.clone(M.UNIT_Y,t):t=M.clone(M.UNIT_W,t):n.z<=n.w?t=M.clone(M.UNIT_Z,t):t=M.clone(M.UNIT_W,t),t};M.equals=function(e,t){return e===t||p(e)&&p(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w};M.equalsArray=function(e,t,n){return e.x===t[n]&&e.y===t[n+1]&&e.z===t[n+2]&&e.w===t[n+3]};M.equalsEpsilon=function(e,t,n,o){return e===t||p(e)&&p(t)&&E.equalsEpsilon(e.x,t.x,n,o)&&E.equalsEpsilon(e.y,t.y,n,o)&&E.equalsEpsilon(e.z,t.z,n,o)&&E.equalsEpsilon(e.w,t.w,n,o)};M.ZERO=Object.freeze(new M(0,0,0,0));M.ONE=Object.freeze(new M(1,1,1,1));M.UNIT_X=Object.freeze(new M(1,0,0,0));M.UNIT_Y=Object.freeze(new M(0,1,0,0));M.UNIT_Z=Object.freeze(new M(0,0,1,0));M.UNIT_W=Object.freeze(new M(0,0,0,1));M.prototype.clone=function(e){return M.clone(this,e)};M.prototype.equals=function(e){return M.equals(this,e)};M.prototype.equalsEpsilon=function(e,t,n){return M.equalsEpsilon(this,e,t,n)};M.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Jt=new Float32Array(1),le=new Uint8Array(Jt.buffer),ko=new Uint32Array([287454020]),Fo=new Uint8Array(ko.buffer),vn=Fo[0]===68;M.packFloat=function(e,t){return s.typeOf.number("value",e),p(t)||(t=new M),Jt[0]=e,vn?(t.x=le[0],t.y=le[1],t.z=le[2],t.w=le[3]):(t.x=le[3],t.y=le[2],t.z=le[1],t.w=le[0]),t};M.unpackFloat=function(e){return s.typeOf.object("packedFloat",e),vn?(le[0]=e.x,le[1]=e.y,le[2]=e.z,le[3]=e.w):(le[0]=e.w,le[1]=e.z,le[2]=e.y,le[3]=e.x),Jt[0]};var qe=M;function S(e,t,n,o,i,r,a,u,d,m,l,w,T,v,P,j){this[0]=O(e,0),this[1]=O(i,0),this[2]=O(d,0),this[3]=O(T,0),this[4]=O(t,0),this[5]=O(r,0),this[6]=O(m,0),this[7]=O(v,0),this[8]=O(n,0),this[9]=O(a,0),this[10]=O(l,0),this[11]=O(P,0),this[12]=O(o,0),this[13]=O(u,0),this[14]=O(w,0),this[15]=O(j,0)}S.packedLength=16;S.pack=function(e,t,n){return s.typeOf.object("value",e),s.defined("array",t),n=O(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t[n++]=e[4],t[n++]=e[5],t[n++]=e[6],t[n++]=e[7],t[n++]=e[8],t[n++]=e[9],t[n++]=e[10],t[n++]=e[11],t[n++]=e[12],t[n++]=e[13],t[n++]=e[14],t[n]=e[15],t};S.unpack=function(e,t,n){return s.defined("array",e),t=O(t,0),p(n)||(n=new S),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n[4]=e[t++],n[5]=e[t++],n[6]=e[t++],n[7]=e[t++],n[8]=e[t++],n[9]=e[t++],n[10]=e[t++],n[11]=e[t++],n[12]=e[t++],n[13]=e[t++],n[14]=e[t++],n[15]=e[t],n};S.packArray=function(e,t){s.defined("array",e);let n=e.length,o=n*16;if(!p(t))t=new Array(o);else{if(!Array.isArray(t)&&t.length!==o)throw new A("If result is a typed array, it must have exactly array.length * 16 elements");t.length!==o&&(t.length=o)}for(let i=0;i<n;++i)S.pack(e[i],t,i*16);return t};S.unpackArray=function(e,t){if(s.defined("array",e),s.typeOf.number.greaterThanOrEquals("array.length",e.length,16),e.length%16!==0)throw new A("array length must be a multiple of 16.");let n=e.length;p(t)?t.length=n/16:t=new Array(n/16);for(let o=0;o<n;o+=16){let i=o/16;t[i]=S.unpack(e,o,t[i])}return t};S.clone=function(e,t){if(p(e))return p(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):new S(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])};S.fromArray=S.unpack;S.fromColumnMajorArray=function(e,t){return s.defined("values",e),S.clone(e,t)};S.fromRowMajorArray=function(e,t){return s.defined("values",e),p(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new S(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])};S.fromRotationTranslation=function(e,t,n){return s.typeOf.object("rotation",e),t=O(t,_.ZERO),p(n)?(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=0,n[4]=e[3],n[5]=e[4],n[6]=e[5],n[7]=0,n[8]=e[6],n[9]=e[7],n[10]=e[8],n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,n):new S(e[0],e[3],e[6],t.x,e[1],e[4],e[7],t.y,e[2],e[5],e[8],t.z,0,0,0,1)};S.fromTranslationQuaternionRotationScale=function(e,t,n,o){s.typeOf.object("translation",e),s.typeOf.object("rotation",t),s.typeOf.object("scale",n),p(o)||(o=new S);let i=n.x,r=n.y,a=n.z,u=t.x*t.x,d=t.x*t.y,m=t.x*t.z,l=t.x*t.w,w=t.y*t.y,T=t.y*t.z,v=t.y*t.w,P=t.z*t.z,j=t.z*t.w,q=t.w*t.w,k=u-w-P+q,x=2*(d-j),F=2*(m+v),B=2*(d+j),Q=-u+w-P+q,H=2*(T-l),ee=2*(m-v),re=2*(T+l),Z=-u-w+P+q;return o[0]=k*i,o[1]=B*i,o[2]=ee*i,o[3]=0,o[4]=x*r,o[5]=Q*r,o[6]=re*r,o[7]=0,o[8]=F*a,o[9]=H*a,o[10]=Z*a,o[11]=0,o[12]=e.x,o[13]=e.y,o[14]=e.z,o[15]=1,o};S.fromTranslationRotationScale=function(e,t){return s.typeOf.object("translationRotationScale",e),S.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)};S.fromTranslation=function(e,t){return s.typeOf.object("translation",e),S.fromRotationTranslation(W.IDENTITY,e,t)};S.fromScale=function(e,t){return s.typeOf.object("scale",e),p(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new S(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)};S.fromUniformScale=function(e,t){return s.typeOf.number("scale",e),p(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new S(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};S.fromRotation=function(e,t){return s.typeOf.object("rotation",e),p(t)||(t=new S),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t};var Je=new _,Ge=new _,ut=new _;S.fromCamera=function(e,t){s.typeOf.object("camera",e);let n=e.position,o=e.direction,i=e.up;s.typeOf.object("camera.position",n),s.typeOf.object("camera.direction",o),s.typeOf.object("camera.up",i),_.normalize(o,Je),_.normalize(_.cross(Je,i,Ge),Ge),_.normalize(_.cross(Ge,Je,ut),ut);let r=Ge.x,a=Ge.y,u=Ge.z,d=Je.x,m=Je.y,l=Je.z,w=ut.x,T=ut.y,v=ut.z,P=n.x,j=n.y,q=n.z,k=r*-P+a*-j+u*-q,x=w*-P+T*-j+v*-q,F=d*P+m*j+l*q;return p(t)?(t[0]=r,t[1]=w,t[2]=-d,t[3]=0,t[4]=a,t[5]=T,t[6]=-m,t[7]=0,t[8]=u,t[9]=v,t[10]=-l,t[11]=0,t[12]=k,t[13]=x,t[14]=F,t[15]=1,t):new S(r,a,u,k,w,T,v,x,-d,-m,-l,F,0,0,0,1)};S.computePerspectiveFieldOfView=function(e,t,n,o,i){s.typeOf.number.greaterThan("fovY",e,0),s.typeOf.number.lessThan("fovY",e,Math.PI),s.typeOf.number.greaterThan("near",n,0),s.typeOf.number.greaterThan("far",o,0),s.typeOf.object("result",i);let a=1/Math.tan(e*.5),u=a/t,d=(o+n)/(n-o),m=2*o*n/(n-o);return i[0]=u,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=a,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=d,i[11]=-1,i[12]=0,i[13]=0,i[14]=m,i[15]=0,i};S.computeOrthographicOffCenter=function(e,t,n,o,i,r,a){s.typeOf.number("left",e),s.typeOf.number("right",t),s.typeOf.number("bottom",n),s.typeOf.number("top",o),s.typeOf.number("near",i),s.typeOf.number("far",r),s.typeOf.object("result",a);let u=1/(t-e),d=1/(o-n),m=1/(r-i),l=-(t+e)*u,w=-(o+n)*d,T=-(r+i)*m;return u*=2,d*=2,m*=-2,a[0]=u,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=d,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=m,a[11]=0,a[12]=l,a[13]=w,a[14]=T,a[15]=1,a};S.computePerspectiveOffCenter=function(e,t,n,o,i,r,a){s.typeOf.number("left",e),s.typeOf.number("right",t),s.typeOf.number("bottom",n),s.typeOf.number("top",o),s.typeOf.number("near",i),s.typeOf.number("far",r),s.typeOf.object("result",a);let u=2*i/(t-e),d=2*i/(o-n),m=(t+e)/(t-e),l=(o+n)/(o-n),w=-(r+i)/(r-i),T=-1,v=-2*r*i/(r-i);return a[0]=u,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=d,a[6]=0,a[7]=0,a[8]=m,a[9]=l,a[10]=w,a[11]=T,a[12]=0,a[13]=0,a[14]=v,a[15]=0,a};S.computeInfinitePerspectiveOffCenter=function(e,t,n,o,i,r){s.typeOf.number("left",e),s.typeOf.number("right",t),s.typeOf.number("bottom",n),s.typeOf.number("top",o),s.typeOf.number("near",i),s.typeOf.object("result",r);let a=2*i/(t-e),u=2*i/(o-n),d=(t+e)/(t-e),m=(o+n)/(o-n),l=-1,w=-1,T=-2*i;return r[0]=a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=u,r[6]=0,r[7]=0,r[8]=d,r[9]=m,r[10]=l,r[11]=w,r[12]=0,r[13]=0,r[14]=T,r[15]=0,r};S.computeViewportTransformation=function(e,t,n,o){p(o)||(o=new S),e=O(e,O.EMPTY_OBJECT);let i=O(e.x,0),r=O(e.y,0),a=O(e.width,0),u=O(e.height,0);t=O(t,0),n=O(n,1);let d=a*.5,m=u*.5,l=(n-t)*.5,w=d,T=m,v=l,P=i+d,j=r+m,q=t+l,k=1;return o[0]=w,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=T,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=v,o[11]=0,o[12]=P,o[13]=j,o[14]=q,o[15]=k,o};S.computeView=function(e,t,n,o,i){return s.typeOf.object("position",e),s.typeOf.object("direction",t),s.typeOf.object("up",n),s.typeOf.object("right",o),s.typeOf.object("result",i),i[0]=o.x,i[1]=n.x,i[2]=-t.x,i[3]=0,i[4]=o.y,i[5]=n.y,i[6]=-t.y,i[7]=0,i[8]=o.z,i[9]=n.z,i[10]=-t.z,i[11]=0,i[12]=-_.dot(o,e),i[13]=-_.dot(n,e),i[14]=_.dot(t,e),i[15]=1,i};S.toArray=function(e,t){return s.typeOf.object("matrix",e),p(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]};S.getElementIndex=function(e,t){return s.typeOf.number.greaterThanOrEquals("row",t,0),s.typeOf.number.lessThanOrEquals("row",t,3),s.typeOf.number.greaterThanOrEquals("column",e,0),s.typeOf.number.lessThanOrEquals("column",e,3),e*4+t};S.getColumn=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",t,0),s.typeOf.number.lessThanOrEquals("index",t,3),s.typeOf.object("result",n);let o=t*4,i=e[o],r=e[o+1],a=e[o+2],u=e[o+3];return n.x=i,n.y=r,n.z=a,n.w=u,n};S.setColumn=function(e,t,n,o){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",t,0),s.typeOf.number.lessThanOrEquals("index",t,3),s.typeOf.object("cartesian",n),s.typeOf.object("result",o),o=S.clone(e,o);let i=t*4;return o[i]=n.x,o[i+1]=n.y,o[i+2]=n.z,o[i+3]=n.w,o};S.getRow=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",t,0),s.typeOf.number.lessThanOrEquals("index",t,3),s.typeOf.object("result",n);let o=e[t],i=e[t+4],r=e[t+8],a=e[t+12];return n.x=o,n.y=i,n.z=r,n.w=a,n};S.setRow=function(e,t,n,o){return s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",t,0),s.typeOf.number.lessThanOrEquals("index",t,3),s.typeOf.object("cartesian",n),s.typeOf.object("result",o),o=S.clone(e,o),o[t]=n.x,o[t+4]=n.y,o[t+8]=n.z,o[t+12]=n.w,o};S.setTranslation=function(e,t,n){return s.typeOf.object("matrix",e),s.typeOf.object("translation",t),s.typeOf.object("result",n),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=e[15],n};var xo=new _;S.setScale=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.object("scale",t),s.typeOf.object("result",n);let o=S.getScale(e,xo),i=t.x/o.x,r=t.y/o.y,a=t.z/o.z;return n[0]=e[0]*i,n[1]=e[1]*i,n[2]=e[2]*i,n[3]=e[3],n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*r,n[7]=e[7],n[8]=e[8]*a,n[9]=e[9]*a,n[10]=e[10]*a,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};var Lo=new _;S.setUniformScale=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.number("scale",t),s.typeOf.object("result",n);let o=S.getScale(e,Lo),i=t/o.x,r=t/o.y,a=t/o.z;return n[0]=e[0]*i,n[1]=e[1]*i,n[2]=e[2]*i,n[3]=e[3],n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*r,n[7]=e[7],n[8]=e[8]*a,n[9]=e[9]*a,n[10]=e[10]*a,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};var Gt=new _;S.getScale=function(e,t){return s.typeOf.object("matrix",e),s.typeOf.object("result",t),t.x=_.magnitude(_.fromElements(e[0],e[1],e[2],Gt)),t.y=_.magnitude(_.fromElements(e[4],e[5],e[6],Gt)),t.z=_.magnitude(_.fromElements(e[8],e[9],e[10],Gt)),t};var Cn=new _;S.getMaximumScale=function(e){return S.getScale(e,Cn),_.maximumComponent(Cn)};var Bo=new _;S.setRotation=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);let o=S.getScale(e,Bo);return n[0]=t[0]*o.x,n[1]=t[1]*o.x,n[2]=t[2]*o.x,n[3]=e[3],n[4]=t[3]*o.y,n[5]=t[4]*o.y,n[6]=t[5]*o.y,n[7]=e[7],n[8]=t[6]*o.z,n[9]=t[7]*o.z,n[10]=t[8]*o.z,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};var Wo=new _;S.getRotation=function(e,t){s.typeOf.object("matrix",e),s.typeOf.object("result",t);let n=S.getScale(e,Wo);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.x,t[3]=e[4]/n.y,t[4]=e[5]/n.y,t[5]=e[6]/n.y,t[6]=e[8]/n.z,t[7]=e[9]/n.z,t[8]=e[10]/n.z,t};S.multiply=function(e,t,n){s.typeOf.object("left",e),s.typeOf.object("right",t),s.typeOf.object("result",n);let o=e[0],i=e[1],r=e[2],a=e[3],u=e[4],d=e[5],m=e[6],l=e[7],w=e[8],T=e[9],v=e[10],P=e[11],j=e[12],q=e[13],k=e[14],x=e[15],F=t[0],B=t[1],Q=t[2],H=t[3],ee=t[4],re=t[5],Z=t[6],oe=t[7],J=t[8],c=t[9],f=t[10],h=t[11],y=t[12],g=t[13],C=t[14],b=t[15],z=o*F+u*B+w*Q+j*H,N=i*F+d*B+T*Q+q*H,Y=r*F+m*B+v*Q+k*H,ie=a*F+l*B+P*Q+x*H,ae=o*ee+u*re+w*Z+j*oe,te=i*ee+d*re+T*Z+q*oe,ue=r*ee+m*re+v*Z+k*oe,de=a*ee+l*re+P*Z+x*oe,ye=o*J+u*c+w*f+j*h,me=i*J+d*c+T*f+q*h,he=r*J+m*c+v*f+k*h,X=a*J+l*c+P*f+x*h,_e=o*y+u*g+w*C+j*b,Te=i*y+d*g+T*C+q*b,je=r*y+m*g+v*C+k*b,at=a*y+l*g+P*C+x*b;return n[0]=z,n[1]=N,n[2]=Y,n[3]=ie,n[4]=ae,n[5]=te,n[6]=ue,n[7]=de,n[8]=ye,n[9]=me,n[10]=he,n[11]=X,n[12]=_e,n[13]=Te,n[14]=je,n[15]=at,n};S.add=function(e,t,n){return s.typeOf.object("left",e),s.typeOf.object("right",t),s.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n[9]=e[9]+t[9],n[10]=e[10]+t[10],n[11]=e[11]+t[11],n[12]=e[12]+t[12],n[13]=e[13]+t[13],n[14]=e[14]+t[14],n[15]=e[15]+t[15],n};S.subtract=function(e,t,n){return s.typeOf.object("left",e),s.typeOf.object("right",t),s.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n[9]=e[9]-t[9],n[10]=e[10]-t[10],n[11]=e[11]-t[11],n[12]=e[12]-t[12],n[13]=e[13]-t[13],n[14]=e[14]-t[14],n[15]=e[15]-t[15],n};S.multiplyTransformation=function(e,t,n){s.typeOf.object("left",e),s.typeOf.object("right",t),s.typeOf.object("result",n);let o=e[0],i=e[1],r=e[2],a=e[4],u=e[5],d=e[6],m=e[8],l=e[9],w=e[10],T=e[12],v=e[13],P=e[14],j=t[0],q=t[1],k=t[2],x=t[4],F=t[5],B=t[6],Q=t[8],H=t[9],ee=t[10],re=t[12],Z=t[13],oe=t[14],J=o*j+a*q+m*k,c=i*j+u*q+l*k,f=r*j+d*q+w*k,h=o*x+a*F+m*B,y=i*x+u*F+l*B,g=r*x+d*F+w*B,C=o*Q+a*H+m*ee,b=i*Q+u*H+l*ee,z=r*Q+d*H+w*ee,N=o*re+a*Z+m*oe+T,Y=i*re+u*Z+l*oe+v,ie=r*re+d*Z+w*oe+P;return n[0]=J,n[1]=c,n[2]=f,n[3]=0,n[4]=h,n[5]=y,n[6]=g,n[7]=0,n[8]=C,n[9]=b,n[10]=z,n[11]=0,n[12]=N,n[13]=Y,n[14]=ie,n[15]=1,n};S.multiplyByMatrix3=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.object("rotation",t),s.typeOf.object("result",n);let o=e[0],i=e[1],r=e[2],a=e[4],u=e[5],d=e[6],m=e[8],l=e[9],w=e[10],T=t[0],v=t[1],P=t[2],j=t[3],q=t[4],k=t[5],x=t[6],F=t[7],B=t[8],Q=o*T+a*v+m*P,H=i*T+u*v+l*P,ee=r*T+d*v+w*P,re=o*j+a*q+m*k,Z=i*j+u*q+l*k,oe=r*j+d*q+w*k,J=o*x+a*F+m*B,c=i*x+u*F+l*B,f=r*x+d*F+w*B;return n[0]=Q,n[1]=H,n[2]=ee,n[3]=0,n[4]=re,n[5]=Z,n[6]=oe,n[7]=0,n[8]=J,n[9]=c,n[10]=f,n[11]=0,n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};S.multiplyByTranslation=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.object("translation",t),s.typeOf.object("result",n);let o=t.x,i=t.y,r=t.z,a=o*e[0]+i*e[4]+r*e[8]+e[12],u=o*e[1]+i*e[5]+r*e[9]+e[13],d=o*e[2]+i*e[6]+r*e[10]+e[14];return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=a,n[13]=u,n[14]=d,n[15]=e[15],n};S.multiplyByScale=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.object("scale",t),s.typeOf.object("result",n);let o=t.x,i=t.y,r=t.z;return o===1&&i===1&&r===1?S.clone(e,n):(n[0]=o*e[0],n[1]=o*e[1],n[2]=o*e[2],n[3]=e[3],n[4]=i*e[4],n[5]=i*e[5],n[6]=i*e[6],n[7]=e[7],n[8]=r*e[8],n[9]=r*e[9],n[10]=r*e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n)};S.multiplyByUniformScale=function(e,t,n){return s.typeOf.object("matrix",e),s.typeOf.number("scale",t),s.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3],n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7],n[8]=e[8]*t,n[9]=e[9]*t,n[10]=e[10]*t,n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n};S.multiplyByVector=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",t),s.typeOf.object("result",n);let o=t.x,i=t.y,r=t.z,a=t.w,u=e[0]*o+e[4]*i+e[8]*r+e[12]*a,d=e[1]*o+e[5]*i+e[9]*r+e[13]*a,m=e[2]*o+e[6]*i+e[10]*r+e[14]*a,l=e[3]*o+e[7]*i+e[11]*r+e[15]*a;return n.x=u,n.y=d,n.z=m,n.w=l,n};S.multiplyByPointAsVector=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",t),s.typeOf.object("result",n);let o=t.x,i=t.y,r=t.z,a=e[0]*o+e[4]*i+e[8]*r,u=e[1]*o+e[5]*i+e[9]*r,d=e[2]*o+e[6]*i+e[10]*r;return n.x=a,n.y=u,n.z=d,n};S.multiplyByPoint=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",t),s.typeOf.object("result",n);let o=t.x,i=t.y,r=t.z,a=e[0]*o+e[4]*i+e[8]*r+e[12],u=e[1]*o+e[5]*i+e[9]*r+e[13],d=e[2]*o+e[6]*i+e[10]*r+e[14];return n.x=a,n.y=u,n.z=d,n};S.multiplyByScalar=function(e,t,n){return s.typeOf.object("matrix",e),s.typeOf.number("scalar",t),s.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n[9]=e[9]*t,n[10]=e[10]*t,n[11]=e[11]*t,n[12]=e[12]*t,n[13]=e[13]*t,n[14]=e[14]*t,n[15]=e[15]*t,n};S.negate=function(e,t){return s.typeOf.object("matrix",e),s.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t};S.transpose=function(e,t){s.typeOf.object("matrix",e),s.typeOf.object("result",t);let n=e[1],o=e[2],i=e[3],r=e[6],a=e[7],u=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=o,t[9]=r,t[10]=e[10],t[11]=e[14],t[12]=i,t[13]=a,t[14]=u,t[15]=e[15],t};S.abs=function(e,t){return s.typeOf.object("matrix",e),s.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t};S.equals=function(e,t){return e===t||p(e)&&p(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]};S.equalsEpsilon=function(e,t,n){return n=O(n,0),e===t||p(e)&&p(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n&&Math.abs(e[4]-t[4])<=n&&Math.abs(e[5]-t[5])<=n&&Math.abs(e[6]-t[6])<=n&&Math.abs(e[7]-t[7])<=n&&Math.abs(e[8]-t[8])<=n&&Math.abs(e[9]-t[9])<=n&&Math.abs(e[10]-t[10])<=n&&Math.abs(e[11]-t[11])<=n&&Math.abs(e[12]-t[12])<=n&&Math.abs(e[13]-t[13])<=n&&Math.abs(e[14]-t[14])<=n&&Math.abs(e[15]-t[15])<=n};S.getTranslation=function(e,t){return s.typeOf.object("matrix",e),s.typeOf.object("result",t),t.x=e[12],t.y=e[13],t.z=e[14],t};S.getMatrix3=function(e,t){return s.typeOf.object("matrix",e),s.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};var Qo=new W,Ho=new W,$o=new qe,Vo=new qe(0,0,0,1);S.inverse=function(e,t){s.typeOf.object("matrix",e),s.typeOf.object("result",t);let n=e[0],o=e[4],i=e[8],r=e[12],a=e[1],u=e[5],d=e[9],m=e[13],l=e[2],w=e[6],T=e[10],v=e[14],P=e[3],j=e[7],q=e[11],k=e[15],x=T*k,F=v*q,B=w*k,Q=v*j,H=w*q,ee=T*j,re=l*k,Z=v*P,oe=l*q,J=T*P,c=l*j,f=w*P,h=x*u+Q*d+H*m-(F*u+B*d+ee*m),y=F*a+re*d+J*m-(x*a+Z*d+oe*m),g=B*a+Z*u+c*m-(Q*a+re*u+f*m),C=ee*a+oe*u+f*d-(H*a+J*u+c*d),b=F*o+B*i+ee*r-(x*o+Q*i+H*r),z=x*n+Z*i+oe*r-(F*n+re*i+J*r),N=Q*n+re*o+f*r-(B*n+Z*o+c*r),Y=H*n+J*o+c*i-(ee*n+oe*o+f*i);x=i*m,F=r*d,B=o*m,Q=r*u,H=o*d,ee=i*u,re=n*m,Z=r*a,oe=n*d,J=i*a,c=n*u,f=o*a;let ie=x*j+Q*q+H*k-(F*j+B*q+ee*k),ae=F*P+re*q+J*k-(x*P+Z*q+oe*k),te=B*P+Z*j+c*k-(Q*P+re*j+f*k),ue=ee*P+oe*j+f*q-(H*P+J*j+c*q),de=B*T+ee*v+F*w-(H*v+x*w+Q*T),ye=oe*v+x*l+Z*T-(re*T+J*v+F*l),me=re*w+f*v+Q*l-(c*v+B*l+Z*w),he=c*T+H*l+J*w-(oe*w+f*T+ee*l),X=n*h+o*y+i*g+r*C;if(Math.abs(X)<E.EPSILON21){if(W.equalsEpsilon(S.getMatrix3(e,Qo),Ho,E.EPSILON7)&&qe.equals(S.getRow(e,3,$o),Vo))return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=1,t;throw new Se("matrix is not invertible because its determinate is zero.")}return X=1/X,t[0]=h*X,t[1]=y*X,t[2]=g*X,t[3]=C*X,t[4]=b*X,t[5]=z*X,t[6]=N*X,t[7]=Y*X,t[8]=ie*X,t[9]=ae*X,t[10]=te*X,t[11]=ue*X,t[12]=de*X,t[13]=ye*X,t[14]=me*X,t[15]=he*X,t};S.inverseTransformation=function(e,t){s.typeOf.object("matrix",e),s.typeOf.object("result",t);let n=e[0],o=e[1],i=e[2],r=e[4],a=e[5],u=e[6],d=e[8],m=e[9],l=e[10],w=e[12],T=e[13],v=e[14],P=-n*w-o*T-i*v,j=-r*w-a*T-u*v,q=-d*w-m*T-l*v;return t[0]=n,t[1]=r,t[2]=d,t[3]=0,t[4]=o,t[5]=a,t[6]=m,t[7]=0,t[8]=i,t[9]=u,t[10]=l,t[11]=0,t[12]=P,t[13]=j,t[14]=q,t[15]=1,t};var Yo=new S;S.inverseTranspose=function(e,t){return s.typeOf.object("matrix",e),s.typeOf.object("result",t),S.inverse(S.transpose(e,Yo),t)};S.IDENTITY=Object.freeze(new S(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1));S.ZERO=Object.freeze(new S(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));S.COLUMN0ROW0=0;S.COLUMN0ROW1=1;S.COLUMN0ROW2=2;S.COLUMN0ROW3=3;S.COLUMN1ROW0=4;S.COLUMN1ROW1=5;S.COLUMN1ROW2=6;S.COLUMN1ROW3=7;S.COLUMN2ROW0=8;S.COLUMN2ROW1=9;S.COLUMN2ROW2=10;S.COLUMN2ROW3=11;S.COLUMN3ROW0=12;S.COLUMN3ROW1=13;S.COLUMN3ROW2=14;S.COLUMN3ROW3=15;Object.defineProperties(S.prototype,{length:{get:function(){return S.packedLength}}});S.prototype.clone=function(e){return S.clone(this,e)};S.prototype.equals=function(e){return S.equals(this,e)};S.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]&&e[4]===t[n+4]&&e[5]===t[n+5]&&e[6]===t[n+6]&&e[7]===t[n+7]&&e[8]===t[n+8]&&e[9]===t[n+9]&&e[10]===t[n+10]&&e[11]===t[n+11]&&e[12]===t[n+12]&&e[13]===t[n+13]&&e[14]===t[n+14]&&e[15]===t[n+15]};S.prototype.equalsEpsilon=function(e,t){return S.equalsEpsilon(this,e,t)};S.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})
(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})
(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})
(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};var G=S;function An(e,t,n){n=O(n,!1);let o={},i=p(e),r=p(t),a,u,d;if(i)for(a in e)e.hasOwnProperty(a)&&(u=e[a],r&&n&&typeof u=="object"&&t.hasOwnProperty(a)?(d=t[a],typeof d=="object"?o[a]=An(u,d,n):o[a]=u):o[a]=u);if(r)for(a in t)t.hasOwnProperty(a)&&!o.hasOwnProperty(a)&&(d=t[a],o[a]=d);return o}var De=An;function Xo(e,t,n){s.defined("array",e),s.defined("itemToFind",t),s.defined("comparator",n);let o=0,i=e.length-1,r,a;for(;o<=i;){if(r=~~((o+i)/2),a=n(e[r],t),a<0){o=r+1;continue}if(a>0){i=r-1;continue}return r}return~(i+1)}var Be=Xo;function Zo(e,t,n,o,i){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=n,this.yPoleOffset=o,this.ut1MinusUtc=i}var pt=Zo;function Jo(e){if(e===null||isNaN(e))throw new A("year is required and must be a number.");return e%4===0&&e%100!==0||e%400===0}var ht=Jo;var jn=[31,28,31,30,31,30,31,31,30,31,30,31];function Go(e,t,n,o,i,r,a,u){e=O(e,1),t=O(t,1),n=O(n,1),o=O(o,0),i=O(i,0),r=O(r,0),a=O(a,0),u=O(u,!1),j(),q(),this.year=e,this.month=t,this.day=n,this.hour=o,this.minute=i,this.second=r,this.millisecond=a,this.isLeapSecond=u;function j(){s.typeOf.number.greaterThanOrEquals("Year",e,1),s.typeOf.number.lessThanOrEquals("Year",e,9999),s.typeOf.number.greaterThanOrEquals("Month",t,1),s.typeOf.number.lessThanOrEquals("Month",t,12),s.typeOf.number.greaterThanOrEquals("Day",n,1),s.typeOf.number.lessThanOrEquals("Day",n,31),s.typeOf.number.greaterThanOrEquals("Hour",o,0),s.typeOf.number.lessThanOrEquals("Hour",o,23),s.typeOf.number.greaterThanOrEquals("Minute",i,0),s.typeOf.number.lessThanOrEquals("Minute",i,59),s.typeOf.bool("IsLeapSecond",u),s.typeOf.number.greaterThanOrEquals("Second",r,0),s.typeOf.number.lessThanOrEquals("Second",r,u?60:59),s.typeOf.number.greaterThanOrEquals("Millisecond",a,0),s.typeOf.number.lessThan("Millisecond",a,1e3)}function q(){let k=t===2&&ht(e)?jn[t-1]+1:jn[t-1];if(n>k)throw new A("Month and Day represents invalid date")}}var Tt=Go;function Ko(e,t){this.julianDate=e,this.offset=t}var ne=Ko;var er={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},ce=Object.freeze(er);var tr={UTC:0,TAI:1},$=Object.freeze(tr);var Pn=new Tt,vt=[31,28,31,30,31,30,31,31,30,31,30,31],Ct=29;function Kt(e,t){return I.compare(e.julianDate,t.julianDate)}var Ke=new ne;function jt(e){Ke.julianDate=e;let t=I.leapSeconds,n=Be(t,Ke,Kt);n<0&&(n=~n),n>=t.length&&(n=t.length-1);let o=t[n].offset;n>0&&I.secondsDifference(t[n].julianDate,e)>o&&(n--,o=t[n].offset),I.addSeconds(e,o,e)}function Mn(e,t){Ke.julianDate=e;let n=I.leapSeconds,o=Be(n,Ke,Kt);if(o<0&&(o=~o),o===0)return I.addSeconds(e,-n[0].offset,t);if(o>=n.length)return I.addSeconds(e,-n[o-1].offset,t);let i=I.secondsDifference(n[o].julianDate,e);if(i===0)return I.addSeconds(e,-n[o].offset,t);if(!(i<=1))return I.addSeconds(e,-n[--o].offset,t)}function Ne(e,t,n){let o=t/ce.SECONDS_PER_DAY|0;return e+=o,t-=ce.SECONDS_PER_DAY*o,t<0&&(e--,t+=ce.SECONDS_PER_DAY),n.dayNumber=e,n.secondsOfDay=t,n}function en(e,t,n,o,i,r,a){let u=(t-14)/12|0,d=e+4800+u,m=(1461*d/4|0)+(367*(t-2-12*u)/12|0)-(3*((d+100)/100|0)/4|0)+n-32075;o=o-12,o<0&&(o+=24);let l=r+(o*ce.SECONDS_PER_HOUR+i*ce.SECONDS_PER_MINUTE+a*ce.SECONDS_PER_MILLISECOND);return l>=43200&&(m-=1),[m,l]}var nr=/^(\d{4})$/,or=/^(\d{4})-(\d{2})$/,rr=/^(\d{4})-?(\d{3})$/,ir=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,cr=/^(\d{4})-?(\d{2})-?(\d{2})$/,tn=/([Z+\-])?(\d{2})?:?(\d{2})?$/,sr=/^(\d{2})(\.\d+)?/.source+tn.source,ar=/^(\d{2}):?(\d{2})(\.\d+)?/.source+tn.source,fr=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+tn.source,Re="Invalid ISO 8601 date.";function I(e,t,n){this.dayNumber=void 0,this.secondsOfDay=void 0,e=O(e,0),t=O(t,0),n=O(n,$.UTC);let o=e|0;t=t+(e-o)*ce.SECONDS_PER_DAY,Ne(o,t,this),n===$.UTC&&jt(this)}I.fromGregorianDate=function(e,t){if(!(e instanceof Tt))throw new A("date must be a valid GregorianDate.");let n=en(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return p(t)?(Ne(n[0],n[1],t),jt(t),t):new I(n[0],n[1],$.UTC)};I.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new A("date must be a valid JavaScript Date.");let n=en(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return p(t)?(Ne(n[0],n[1],t),jt(t),t):new I(n[0],n[1],$.UTC)};I.fromIso8601=function(e,t){if(typeof e!="string")throw new A(Re);e=e.replace(",",".");let n=e.split("T"),o,i=1,r=1,a=0,u=0,d=0,m=0,l=n[0],w=n[1],T,v;if(!p(l))throw new A(Re);let P;if(n=l.match(cr),n!==null){if(P=l.split("-").length-1,P>0&&P!==2)throw new A(Re);o=+n[1],i=+n[2],r=+n[3]}else if(n=l.match(or),n!==null)o=+n[1],i=+n[2];else if(n=l.match(nr),n!==null)o=+n[1];else{let x;if(n=l.match(rr),n!==null){if(o=+n[1],x=+n[2],v=ht(o),x<1||v&&x>366||!v&&x>365)throw new A(Re)}else if(n=l.match(ir),n!==null){o=+n[1];let F=+n[2],B=+n[3]||0;if(P=l.split("-").length-1,P>0&&(!p(n[3])&&P!==1||p(n[3])&&P!==2))throw new A(Re);let Q=new Date(Date.UTC(o,0,4));x=F*7+B-Q.getUTCDay()-3}else throw new A(Re);T=new Date(Date.UTC(o,0,1)),T.setUTCDate(x),i=T.getUTCMonth()+1,r=T.getUTCDate()}if(v=ht(o),i<1||i>12||r<1||(i!==2||!v)&&r>vt[i-1]||v&&i===2&&r>Ct)throw new A(Re);let j;if(p(w)){if(n=w.match(fr),n!==null){if(P=w.split(":").length-1,P>0&&P!==2&&P!==3)throw new A(Re);a=+n[1],u=+n[2],d=+n[3],m=+(n[4]||0)*1e3,j=5}else if(n=w.match(ar),n!==null){if(P=w.split(":").length-1,P>2)throw new A(Re);a=+n[1],u=+n[2],d=+(n[3]||0)*60,j=4}else if(n=w.match(sr),n!==null)a=+n[1],u=+(n[2]||0)*60,j=3;else throw new A(Re);if(u>=60||d>=61||a>24||a===24&&(u>0||d>0||m>0))throw new A(Re);let x=n[j],F=+n[j+1],B=+(n[j+2]||0);switch(x){case"+":a=a-F,u=u-B;break;case"-":a=a+F,u=u+B;break;case"Z":break;default:u=u+new Date(Date.UTC(o,i-1,r,a,u)).getTimezoneOffset();break}}let q=d===60;for(q&&d--;u>=60;)u-=60,a++;for(;a>=24;)a-=24,r++;for(T=v&&i===2?Ct:vt[i-1];r>T;)r-=T,i++,i>12&&(i-=12,o++),T=v&&i===2?Ct:vt[i-1];for(;u<0;)u+=60,a--;for(;a<0;)a+=24,r--;for(;r<1;)i--,i<1&&(i+=12,o--),T=v&&i===2?Ct:vt[i-1],r+=T;let k=en(o,i,r,a,u,d,m);return p(t)?(Ne(k[0],k[1],t),jt(t)):t=new I(k[0],k[1],$.UTC),q&&I.addSeconds(t,1,t),t};I.now=function(e){return I.fromDate(new Date,e)};var At=new I(0,0,$.TAI);I.toGregorianDate=function(e,t){if(!p(e))throw new A("julianDate is required.");let n=!1,o=Mn(e,At);p(o)||(I.addSeconds(e,-1,At),o=Mn(At,At),n=!0);let i=o.dayNumber,r=o.secondsOfDay;r>=43200&&(i+=1);let a=i+68569|0,u=4*a/146097|0;a=a-((146097*u+3)/4|0)|0;let d=4e3*(a+1)/1461001|0;a=a-(1461*d/4|0)+31|0;let m=80*a/2447|0,l=a-(2447*m/80|0)|0;a=m/11|0;let w=m+2-12*a|0,T=100*(u-49)+d+a|0,v=r/ce.SECONDS_PER_HOUR|0,P=r-v*ce.SECONDS_PER_HOUR,j=P/ce.SECONDS_PER_MINUTE|0;P=P-j*ce.SECONDS_PER_MINUTE;let q=P|0,k=(P-q)/ce.SECONDS_PER_MILLISECOND;return v+=12,v>23&&(v-=24),n&&(q+=1),p(t)?(t.year=T,t.month=w,t.day=l,t.hour=v,t.minute=j,t.second=q,t.millisecond=k,t.isLeapSecond=n,t):new Tt(T,w,l,v,j,q,k,n)};I.toDate=function(e){if(!p(e))throw new A("julianDate is required.");let t=I.toGregorianDate(e,Pn),n=t.second;return t.isLeapSecond&&(n-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,n,t.millisecond))};I.toIso8601=function(e,t){if(!p(e))throw new A("julianDate is required.");let n=I.toGregorianDate(e,Pn),o=n.year,i=n.month,r=n.day,a=n.hour,u=n.minute,d=n.second,m=n.millisecond;o===1e4&&i===1&&r===1&&a===0&&u===0&&d===0&&m===0&&(o=9999,i=12,r=31,a=24);let l;return!p(t)&&m!==0?(l=(m*.01).toString().replace(".",""),`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}.${l}Z`):!p(t)||t===0?`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}Z`:(l=(m*.01).toFixed(t).replace(".","").slice(0,t),`${o.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}.${l}Z`)};I.clone=function(e,t){if(p(e))return p(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new I(e.dayNumber,e.secondsOfDay,$.TAI)};I.compare=function(e,t){if(!p(e))throw new A("left is required.");if(!p(t))throw new A("right is required.");let n=e.dayNumber-t.dayNumber;return n!==0?n:e.secondsOfDay-t.secondsOfDay};I.equals=function(e,t){return e===t||p(e)&&p(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay};I.equalsEpsilon=function(e,t,n){return n=O(n,0),e===t||p(e)&&p(t)&&Math.abs(I.secondsDifference(e,t))<=n};I.totalDays=function(e){if(!p(e))throw new A("julianDate is required.");return e.dayNumber+e.secondsOfDay/ce.SECONDS_PER_DAY};I.secondsDifference=function(e,t){if(!p(e))throw new A("left is required.");if(!p(t))throw new A("right is required.");return(e.dayNumber-t.dayNumber)*ce.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)};I.daysDifference=function(e,t){if(!p(e))throw new A("left is required.");if(!p(t))throw new A("right is required.");let n=e.dayNumber-t.dayNumber,o=(e.secondsOfDay-t.secondsOfDay)/ce.SECONDS_PER_DAY;return n+o};I.computeTaiMinusUtc=function(e){Ke.julianDate=e;let t=I.leapSeconds,n=Be(t,Ke,Kt);return n<0&&(n=~n,--n,n<0&&(n=0)),t[n].offset};I.addSeconds=function(e,t,n){if(!p(e))throw new A("julianDate is required.");if(!p(t))throw new A("seconds is required.");if(!p(n))throw new A("result is required.");return Ne(e.dayNumber,e.secondsOfDay+t,n)};I.addMinutes=function(e,t,n){if(!p(e))throw new A("julianDate is required.");if(!p(t))throw new A("minutes is required.");if(!p(n))throw new A("result is required.");let o=e.secondsOfDay+t*ce.SECONDS_PER_MINUTE;return Ne(e.dayNumber,o,n)};I.addHours=function(e,t,n){if(!p(e))throw new A("julianDate is required.");if(!p(t))throw new A("hours is required.");if(!p(n))throw new A("result is required.");let o=e.secondsOfDay+t*ce.SECONDS_PER_HOUR;return Ne(e.dayNumber,o,n)};I.addDays=function(e,t,n){if(!p(e))throw new A("julianDate is required.");if(!p(t))throw new A("days is required.");if(!p(n))throw new A("result is required.");let o=e.dayNumber+t;return Ne(o,e.secondsOfDay,n)};I.lessThan=function(e,t){return I.compare(e,t)<0};I.lessThanOrEquals=function(e,t){return I.compare(e,t)<=0};I.greaterThan=function(e,t){return I.compare(e,t)>0};I.greaterThanOrEquals=function(e,t){return I.compare(e,t)>=0};I.prototype.clone=function(e){return I.clone(this,e)};I.prototype.equals=function(e){return I.equals(this,e)};I.prototype.equalsEpsilon=function(e,t){return I.equalsEpsilon(this,e,t)};I.prototype.toString=function(){return I.toIso8601(this)};I.leapSeconds=[new ne(new I(2441317,43210,$.TAI),10),new ne(new I(2441499,43211,$.TAI),11),new ne(new I(2441683,43212,$.TAI),12),new ne(new I(2442048,43213,$.TAI),13),new ne(new I(2442413,43214,$.TAI),14),new ne(new I(2442778,43215,$.TAI),15),new ne(new I(2443144,43216,$.TAI),16),new ne(new I(2443509,43217,$.TAI),17),new ne(new I(2443874,43218,$.TAI),18),new ne(new I(2444239,43219,$.TAI),19),new ne(new I(2444786,43220,$.TAI),20),new ne(new I(2445151,43221,$.TAI),21),new ne(new I(2445516,43222,$.TAI),22),new ne(new I(2446247,43223,$.TAI),23),new ne(new I(2447161,43224,$.TAI),24),new ne(new I(2447892,43225,$.TAI),25),new ne(new I(2448257,43226,$.TAI),26),new ne(new I(2448804,43227,$.TAI),27),new ne(new I(2449169,43228,$.TAI),28),new ne(new I(2449534,43229,$.TAI),29),new ne(new I(2450083,43230,$.TAI),30),new ne(new I(2450630,43231,$.TAI),31),new ne(new I(2451179,43232,$.TAI),32),new ne(new I(2453736,43233,$.TAI),33),new ne(new I(2454832,43234,$.TAI),34),new ne(new I(2456109,43235,$.TAI),35),new ne(new I(2457204,43236,$.TAI),36),new ne(new I(2457754,43237,$.TAI),37)];var pe=I;var so=Ze(We(),1);function ur(e){return(e.length===0||e[e.length-1]!=="/")&&(e=`${e}/`),e}var kn=ur;function Fn(e,t){if(e===null||typeof e!="object")return e;t=O(t,!1);let n=new e.constructor;for(let o in e)if(e.hasOwnProperty(o)){let i=e[o];t&&(i=Fn(i,t)),n[o]=i}return n}var nt=Fn;function pr(){let e,t,n=new Promise(function(o,i){e=o,t=i});return{resolve:e,reject:t,promise:n}}var Qe=pr;var xn=Ze(We(),1);function nn(e,t){let n;return typeof document<"u"&&(n=document),nn._implementation(e,t,n)}nn._implementation=function(e,t,n){if(!p(e))throw new A("relative uri is required.");if(!p(t)){if(typeof n>"u")return e;t=O(n.baseURI,n.location.href)}let o=new xn.default(e);return o.scheme()!==""?o.toString():o.absoluteTo(t).toString()};var dt=nn;var Ln=Ze(We(),1);function hr(e,t){if(!p(e))throw new A("uri is required.");let n="",o=e.lastIndexOf("/");return o!==-1&&(n=e.substring(0,o+1)),t&&(e=new Ln.default(e),e.query().length!==0&&(n+=`?${e.query()}`),e.fragment().length!==0&&(n+=`#${e.fragment()}`)),n}var Bn=hr;var Wn=Ze(We(),1);function dr(e){if(!p(e))throw new A("uri is required.");let t=new Wn.default(e);t.normalize();let n=t.path(),o=n.lastIndexOf("/");return o!==-1&&(n=n.substr(o+1)),o=n.lastIndexOf("."),o===-1?n="":n=n.substr(o+1),n}var Qn=dr;var Hn={};function mr(e,t,n){p(t)||(t=e.width),p(n)||(n=e.height);let o=Hn[t];p(o)||(o={},Hn[t]=o);let i=o[n];if(!p(i)){let r=document.createElement("canvas");r.width=t,r.height=n,i=r.getContext("2d",{willReadFrequently:!0}),i.globalCompositeOperation="copy",o[n]=i}return i.drawImage(e,0,0,t,n),i.getImageData(0,0,t,n).data}var on=mr;var yr=/^blob:/i;function lr(e){return s.typeOf.string("uri",e),yr.test(e)}var It=lr;var ve;function wr(e){p(ve)||(ve=document.createElement("a")),ve.href=window.location.href;let t=ve.host,n=ve.protocol;return ve.href=e,ve.href=ve.href,n!==ve.protocol||t!==ve.host}var $n=wr;var br=/^data:/i;function Or(e){return s.typeOf.string("uri",e),br.test(e)}var zt=Or;function gr(e){let t=document.createElement("script");return t.async=!0,t.src=e,new Promise((n,o)=>{window.crossOriginIsolated&&t.setAttribute("crossorigin","anonymous");let i=document.getElementsByTagName("head")[0];t.onload=function(){t.onload=void 0,i.removeChild(t),n()},t.onerror=function(r){o(r)},i.appendChild(t)})}var Vn=gr;function _r(e){if(!p(e))throw new A("obj is required.");let t="";for(let n in e)if(e.hasOwnProperty(n)){let o=e[n],i=`${encodeURIComponent(n)}=`;if(Array.isArray(o))for(let r=0,a=o.length;r<a;++r)t+=`${i+encodeURIComponent(o[r])}&`;else t+=`${i+encodeURIComponent(o)}&`}return t=t.slice(0,-1),t}var Yn=_r;function Sr(e){if(!p(e))throw new A("queryString is required.");let t={};if(e==="")return t;let n=e.replace(/\+/g,"%20").split(/[&;]/);for(let o=0,i=n.length;o<i;++o){let r=n[o].split("="),a=decodeURIComponent(r[0]),u=r[1];p(u)?u=decodeURIComponent(u):u="";let d=t[a];typeof d=="string"?t[a]=[d,u]:Array.isArray(d)?d.push(u):t[a]=u}return t}var Xn=Sr;var Rr={UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5},fe=Object.freeze(Rr);var Er={TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3},Zn=Object.freeze(Er);function qt(e){e=O(e,O.EMPTY_OBJECT);let t=O(e.throttleByServer,!1),n=O(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=O(e.priority,0),this.throttle=n,this.throttleByServer=t,this.type=O(e.type,Zn.OTHER),this.serverKey=e.serverKey,this.state=fe.UNISSUED,this.deferred=void 0,this.cancelled=!1}qt.prototype.cancel=function(){this.cancelled=!0};qt.prototype.clone=function(e){return p(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=fe.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new qt(this)};var Jn=qt;function Tr(e){let t={};if(!e)return t;let n=e.split(`\r
`);for(let o=0;o<n.length;++o){let i=n[o],r=i.indexOf(": ");if(r>0){let a=i.substring(0,r),u=i.substring(r+2);t[a]=u}}return t}var Gn=Tr;function Kn(e,t,n){this.statusCode=e,this.response=t,this.responseHeaders=n,typeof this.responseHeaders=="string"&&(this.responseHeaders=Gn(this.responseHeaders))}Kn.prototype.toString=function(){let e="Request has failed.";return p(this.statusCode)&&(e+=` Status Code: ${this.statusCode}`),e};var mt=Kn;var Dt=Ze(We(),1);function yt(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}Object.defineProperties(yt.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}});yt.prototype.addEventListener=function(e,t){s.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(t);let n=this;return function(){n.removeEventListener(e,t)}};yt.prototype.removeEventListener=function(e,t){s.typeOf.func("listener",e);let n=this._listeners,o=this._scopes,i=-1;for(let r=0;r<n.length;r++)if(n[r]===e&&o[r]===t){i=r;break}return i!==-1?(this._insideRaiseEvent?(this._toRemove.push(i),n[i]=void 0,o[i]=void 0):(n.splice(i,1),o.splice(i,1)),!0):!1};function vr(e,t){return t-e}yt.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;let e,t=this._listeners,n=this._scopes,o=t.length;for(e=0;e<o;e++){let r=t[e];p(r)&&t[e].apply(n[e],arguments)}let i=this._toRemove;if(o=i.length,o>0){for(i.sort(vr),e=0;e<o;e++){let r=i[e];t.splice(r,1),n.splice(r,1)}i.length=0}this._insideRaiseEvent=!1};var eo=yt;function He(e){s.typeOf.object("options",e),s.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(He.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){s.typeOf.number.greaterThanOrEquals("maximumLength",e,0);let t=this._length;if(e<t){let n=this._array;for(let o=e;o<t;++o)n[o]=void 0;this._length=e,n.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}});function rn(e,t,n){let o=e[t];e[t]=e[n],e[n]=o}He.prototype.reserve=function(e){e=O(e,this._length),this._array.length=e};He.prototype.heapify=function(e){e=O(e,0);let t=this._length,n=this._comparator,o=this._array,i=-1,r=!0;for(;r;){let a=2*(e+1),u=a-1;u<t&&n(o[u],o[e])<0?i=u:i=e,a<t&&n(o[a],o[i])<0&&(i=a),i!==e?(rn(o,i,e),e=i):r=!1}};He.prototype.resort=function(){let e=this._length;for(let t=Math.ceil(e/2);t>=0;--t)this.heapify(t)};He.prototype.insert=function(e){s.defined("element",e);let t=this._array,n=this._comparator,o=this._maximumLength,i=this._length++;for(i<t.length?t[i]=e:t.push(e);i!==0;){let a=Math.floor((i-1)/2);if(n(t[i],t[a])<0)rn(t,i,a),i=a;else break}let r;return p(o)&&this._length>o&&(r=t[o],this._length=o),r};He.prototype.pop=function(e){if(e=O(e,0),this._length===0)return;s.typeOf.number.lessThan("index",e,this._length);let t=this._array,n=t[e];return rn(t,e,--this._length),this.heapify(e),t[this._length]=void 0,n};var to=He;function Cr(e,t){return e.priority-t.priority}var K={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},ot=20,we=new to({comparator:Cr});we.maximumLength=ot;we.reserve(ot);var Ce=[],Pe={},Ar=typeof document<"u"?new Dt.default(document.location.href):new Dt.default,Nt=new eo;function se(){}se.maximumRequests=50;se.maximumRequestsPerServer=18;se.requestsByServer={};se.throttleRequests=!0;se.debugShowStatistics=!1;se.requestCompletedEvent=Nt;Object.defineProperties(se,{statistics:{get:function(){return K}},priorityHeapLength:{get:function(){return ot},set:function(e){if(e<ot)for(;we.length>e;){let t=we.pop();$e(t)}ot=e,we.maximumLength=e,we.reserve(e)}}});function no(e){p(e.priorityFunction)&&(e.priority=e.priorityFunction())}se.serverHasOpenSlots=function(e,t){t=O(t,1);let n=O(se.requestsByServer[e],se.maximumRequestsPerServer);return Pe[e]+t<=n};se.heapHasOpenSlots=function(e){return we.length+e<=ot};function oo(e){return e.state===fe.UNISSUED&&(e.state=fe.ISSUED,e.deferred=Qe()),e.deferred.promise}function jr(e){return function(t){if(e.state===fe.CANCELLED)return;let n=e.deferred;--K.numberOfActiveRequests,--Pe[e.serverKey],Nt.raiseEvent(),e.state=fe.RECEIVED,e.deferred=void 0,n.resolve(t)}}function Mr(e){return function(t){e.state!==fe.CANCELLED&&(++K.numberOfFailedRequests,--K.numberOfActiveRequests,--Pe[e.serverKey],Nt.raiseEvent(t),e.state=fe.FAILED,e.deferred.reject(t))}}function ro(e){let t=oo(e);return e.state=fe.ACTIVE,Ce.push(e),++K.numberOfActiveRequests,++K.numberOfActiveRequestsEver,++Pe[e.serverKey],e.requestFunction().then(jr(e)).catch(Mr(e)),t}function $e(e){let t=e.state===fe.ACTIVE;if(e.state=fe.CANCELLED,++K.numberOfCancelledRequests,p(e.deferred)){let n=e.deferred;e.deferred=void 0,n.reject()}t&&(--K.numberOfActiveRequests,--Pe[e.serverKey],++K.numberOfCancelledActiveRequests),p(e.cancelFunction)&&e.cancelFunction()}se.update=function(){let e,t,n=0,o=Ce.length;for(e=0;e<o;++e){if(t=Ce[e],t.cancelled&&$e(t),t.state!==fe.ACTIVE){++n;continue}n>0&&(Ce[e-n]=t)}Ce.length-=n;let i=we.internalArray,r=we.length;for(e=0;e<r;++e)no(i[e]);we.resort();let a=Math.max(se.maximumRequests-Ce.length,0),u=0;for(;u<a&&we.length>0;){if(t=we.pop(),t.cancelled){$e(t);continue}if(t.throttleByServer&&!se.serverHasOpenSlots(t.serverKey)){$e(t);continue}ro(t),++u}Pr()};se.getServerKey=function(e){s.typeOf.string("url",e);let t=new Dt.default(e);t.scheme()===""&&(t=t.absoluteTo(Ar),t.normalize());let n=t.authority();/:/.test(n)||(n=`${n}:${t.scheme()==="https"?"443":"80"}`);let o=Pe[n];return p(o)||(Pe[n]=0),n};se.request=function(e){if(s.typeOf.object("request",e),s.typeOf.string("request.url",e.url),s.typeOf.func("request.requestFunction",e.requestFunction),zt(e.url)||It(e.url))return Nt.raiseEvent(),e.state=fe.RECEIVED,e.requestFunction();if(++K.numberOfAttemptedRequests,p(e.serverKey)||(e.serverKey=se.getServerKey(e.url)),se.throttleRequests&&e.throttleByServer&&!se.serverHasOpenSlots(e.serverKey))return;if(!se.throttleRequests||!e.throttle)return ro(e);if(Ce.length>=se.maximumRequests)return;no(e);let t=we.insert(e);if(p(t)){if(t===e)return;$e(t)}return oo(e)};function Pr(){se.debugShowStatistics&&(K.numberOfActiveRequests===0&&K.lastNumberOfActiveRequests>0&&(K.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${K.numberOfAttemptedRequests}`),K.numberOfAttemptedRequests=0),K.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${K.numberOfCancelledRequests}`),K.numberOfCancelledRequests=0),K.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${K.numberOfCancelledActiveRequests}`),K.numberOfCancelledActiveRequests=0),K.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${K.numberOfFailedRequests}`),K.numberOfFailedRequests=0)),K.lastNumberOfActiveRequests=K.numberOfActiveRequests)}se.clearForSpecs=function(){for(;we.length>0;){let t=we.pop();$e(t)}let e=Ce.length;for(let t=0;t<e;++t)$e(Ce[t]);Ce.length=0,Pe={},K.numberOfAttemptedRequests=0,K.numberOfActiveRequests=0,K.numberOfCancelledRequests=0,K.numberOfCancelledActiveRequests=0,K.numberOfFailedRequests=0,K.numberOfActiveRequestsEver=0,K.lastNumberOfActiveRequests=0};se.numberOfActiveRequestsByServer=function(e){return Pe[e]};se.requestHeap=we;var kt=se;var io=Ze(We(),1);var lt={},rt={};lt.add=function(e,t){if(!p(e))throw new A("host is required.");if(!p(t)||t<=0)throw new A("port is required to be greater than 0.");let n=`${e.toLowerCase()}:${t}`;p(rt[n])||(rt[n]=!0)};lt.remove=function(e,t){if(!p(e))throw new A("host is required.");if(!p(t)||t<=0)throw new A("port is required to be greater than 0.");let n=`${e.toLowerCase()}:${t}`;p(rt[n])&&delete rt[n]};function Ur(e){let t=new io.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 o=t.scheme();if(o.length===0&&(o=window.location.protocol,o=o.substring(0,o.length-1)),o==="http")n+=":80";else if(o==="https")n+=":443";else return}return n}}lt.contains=function(e){if(!p(e))throw new A("url is required.");let t=Ur(e);return!!(p(t)&&p(rt[t]))};lt.clear=function(){rt={}};var cn=lt;var ao=function(){try{let e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob",e.responseType==="blob"}catch{return!1}}();function U(e){e=O(e,O.EMPTY_OBJECT),typeof e=="string"&&(e={url:e}),s.typeOf.string("options.url",e.url),this._url=void 0,this._templateValues=Ae(e.templateValues,{}),this._queryParameters=Ae(e.queryParameters,{}),this.headers=Ae(e.headers,{}),this.request=O(e.request,new Jn),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=O(e.retryAttempts,0),this._retryCount=0,O(e.parseUrl,!0)?this.parseUrl(e.url,!0,!0):this._url=e.url,this._credits=e.credits}function Ae(e,t){return p(e)?nt(e):t}U.createIfNeeded=function(e){return e instanceof U?e.getDerivedResource({request:e.request}):typeof e!="string"?e:new U({url:e})};var it;U.supportsImageBitmapOptions=function(){return p(it)?it:typeof createImageBitmap!="function"?(it=Promise.resolve(!1),it):(it=U.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=on(t[0]),o=on(t[1]);return n[1]!==o[1]}).catch(function(){return!1}),it)};Object.defineProperties(U,{isBlobSupported:{get:function(){return ao}}});Object.defineProperties(U.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 Qn(this._url)}},isDataUri:{get:function(){return zt(this._url)}},isBlobUri:{get:function(){return It(this._url)}},isCrossOriginUrl:{get:function(){return $n(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}},credits:{get:function(){return this._credits}}});U.prototype.toString=function(){return this.getUrlComponent(!0,!0)};U.prototype.parseUrl=function(e,t,n,o){let i=new so.default(e),r=Ir(i.query());this._queryParameters=t?xt(r,this.queryParameters,n):r,i.search(""),i.fragment(""),p(o)&&i.scheme()===""&&(i=i.absoluteTo(dt(o))),this._url=i.toString()};function Ir(e){return e.length===0?{}:e.indexOf("=")===-1?{[e]:void 0}:Xn(e)}function xt(e,t,n){if(!n)return De(e,t);let o=nt(e,!0);for(let i in t)if(t.hasOwnProperty(i)){let r=o[i],a=t[i];p(r)?(Array.isArray(r)||(r=o[i]=[r]),o[i]=r.concat(a)):o[i]=Array.isArray(a)?a.slice():a}return o}U.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;let n=this._url;e&&(n=`${n}${zr(this.queryParameters)}`),n=n.replace(/%7B/g,"{").replace(/%7D/g,"}");let o=this._templateValues;return Object.keys(o).length>0&&(n=n.replace(/{(.*?)}/g,function(i,r){let a=o[r];return p(a)?encodeURIComponent(a):i})),t&&p(this.proxy)&&(n=this.proxy.getURL(n)),n};function zr(e){let t=Object.keys(e);return t.length===0?"":t.length===1&&!p(e[t[0]])?`?${t[0]}`:`?${Yn(e)}`}U.prototype.setQueryParameters=function(e,t){t?this._queryParameters=xt(this._queryParameters,e,!1):this._queryParameters=xt(e,this._queryParameters,!1)};U.prototype.appendQueryParameters=function(e){this._queryParameters=xt(e,this._queryParameters,!0)};U.prototype.setTemplateValues=function(e,t){t?this._templateValues=De(this._templateValues,e):this._templateValues=De(e,this._templateValues)};U.prototype.getDerivedResource=function(e){let t=this.clone();if(t._retryCount=0,p(e.url)){let n=O(e.preserveQueryParameters,!1);t.parseUrl(e.url,!0,n,this._url)}return p(e.queryParameters)&&(t._queryParameters=De(e.queryParameters,t.queryParameters)),p(e.templateValues)&&(t._templateValues=De(e.templateValues,t.templateValues)),p(e.headers)&&(t.headers=De(e.headers,t.headers)),p(e.proxy)&&(t.proxy=e.proxy),p(e.request)&&(t.request=e.request),p(e.retryCallback)&&(t.retryCallback=e.retryCallback),p(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t};U.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(o){return++n._retryCount,o})};U.prototype.clone=function(e){return p(e)?(e._url=this._url,e._queryParameters=nt(this._queryParameters),e._templateValues=nt(this._templateValues),e.headers=nt(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e):new U({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:p(this.credits)?this.credits.slice():void 0})};U.prototype.getBaseUri=function(e){return Bn(this.getUrlComponent(e),e)};U.prototype.appendForwardSlash=function(){this._url=kn(this._url)};U.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})};U.fetchArrayBuffer=function(e){return new U(e).fetchArrayBuffer()};U.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})};U.fetchBlob=function(e){return new U(e).fetchBlob()};U.prototype.fetchImage=function(e){e=O(e,O.EMPTY_OBJECT);let t=O(e.preferImageBitmap,!1),n=O(e.preferBlob,!1),o=O(e.flipY,!1),i=O(e.skipColorSpaceConversion,!1);if(an(this.request),!ao||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return sn({resource:this,flipY:o,skipColorSpaceConversion:i,preferImageBitmap:t});let r=this.fetchBlob();if(!p(r))return;let a,u,d,m;return U.supportsImageBitmapOptions().then(function(l){return a=l,u=a&&t,r}).then(function(l){if(!p(l))return;if(m=l,u)return U.createImageBitmapFromBlob(l,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:i});let w=window.URL.createObjectURL(l);return d=new U({url:w}),sn({resource:d,flipY:o,skipColorSpaceConversion:i,preferImageBitmap:!1})}).then(function(l){if(p(l))return l.blob=m,u||window.URL.revokeObjectURL(d.url),l}).catch(function(l){return p(d)&&window.URL.revokeObjectURL(d.url),l.blob=m,Promise.reject(l)})};function sn(e){let t=e.resource,n=e.flipY,o=e.skipColorSpaceConversion,i=e.preferImageBitmap,r=t.request;r.url=t.url,r.requestFunction=function(){let u=!1;!t.isDataUri&&!t.isBlobUri&&(u=t.isCrossOriginUrl);let d=Qe();return r.url.indexOf("nullvalue=")>-1?U._Implementations.createImageSGS(r.url,u,d):U._Implementations.createImage(r,u,d,n,o,i),d.promise};let a=kt.request(r);if(p(a))return a.catch(function(u){return r.state!==fe.FAILED?Promise.reject(u):t.retryOnError(u).then(function(d){return d?(r.state=fe.UNISSUED,r.deferred=void 0,sn({resource:t,flipY:n,skipColorSpaceConversion:o,preferImageBitmap:i})):Promise.reject(u)})})}U.fetchImage=function(e){return new U(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})};U.prototype.fetchText=function(){return this.fetch({responseType:"text"})};U.fetchText=function(e){return new U(e).fetchText()};U.prototype.fetchJson=function(){let e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(p(e))return e.then(function(t){if(p(t))return JSON.parse(t)})};U.fetchJson=function(e){return new U(e).fetchJson()};U.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})};U.fetchXML=function(e){return new U(e).fetchXML()};U.prototype.fetchJsonp=function(e){e=O(e,"callback"),an(this.request);let t;do t=`loadJsonp${E.nextRandomNumber().toString().substring(2,8)}`;while(p(window[t]));return fo(this,e,t)};function fo(e,t,n){let o={};o[t]=n,e.setQueryParameters(o);let i=e.request,r=e.url;i.url=r,i.requestFunction=function(){let u=Qe();return window[n]=function(d){u.resolve(d);try{delete window[n]}catch{window[n]=void 0}},U._Implementations.loadAndExecuteScript(r,n,u),u.promise};let a=kt.request(i);if(p(a))return a.catch(function(u){return i.state!==fe.FAILED?Promise.reject(u):e.retryOnError(u).then(function(d){return d?(i.state=fe.UNISSUED,i.deferred=void 0,fo(e,t,n)):Promise.reject(u)})})}U.fetchJsonp=function(e){return new U(e).fetchJsonp(e.callbackParameterName)};U.prototype._makeRequest=function(e){let t=this;an(t.request);let n=t.request,o=t.url;n.url=o,n.requestFunction=function(){let r=e.responseType,a=De(e.headers,t.headers),u=e.overrideMimeType,d=e.method,m=e.data,l=Qe(),w=U._Implementations.loadWithXhr(o,r,d,m,a,l,u);return p(w)&&p(w.abort)&&(n.cancelFunction=function(){w.abort()}),l.promise};let i=kt.request(n);if(p(i))return i.then(function(r){return n.cancelFunction=void 0,r}).catch(function(r){return n.cancelFunction=void 0,n.state!==fe.FAILED?Promise.reject(r):t.retryOnError(r).then(function(a){return a?(n.state=fe.UNISSUED,n.deferred=void 0,t.fetch(e)):Promise.reject(r)})})};function an(e){if(e.state===fe.ISSUED||e.state===fe.ACTIVE)throw new Se("The Resource is already being fetched.");e.state=fe.UNISSUED,e.deferred=void 0}var qr=/^data:(.*?)(;base64)?,(.*)$/;function Ft(e,t){let n=decodeURIComponent(t);return e?atob(n):n}function co(e,t){let n=Ft(e,t),o=new ArrayBuffer(n.length),i=new Uint8Array(o);for(let r=0;r<n.length;r++)i[r]=n.charCodeAt(r);return o}function Dr(e,t){t=O(t,"");let n=e[1],o=!!e[2],i=e[3],r,a;switch(t){case"":case"text":return Ft(o,i);case"arraybuffer":return co(o,i);case"blob":return r=co(o,i),new Blob([r],{type:n});case"document":return a=new DOMParser,a.parseFromString(Ft(o,i),n);case"json":return JSON.parse(Ft(o,i));default:throw new A(`Unhandled responseType: ${t}`)}}U.prototype.fetch=function(e){return e=Ae(e,{}),e.method="GET",this._makeRequest(e)};U.fetch=function(e){return new U(e).fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};U.prototype.delete=function(e){return e=Ae(e,{}),e.method="DELETE",this._makeRequest(e)};U.delete=function(e){return new U(e).delete({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})};U.prototype.head=function(e){return e=Ae(e,{}),e.method="HEAD",this._makeRequest(e)};U.head=function(e){return new U(e).head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};U.prototype.options=function(e){return e=Ae(e,{}),e.method="OPTIONS",this._makeRequest(e)};U.options=function(e){return new U(e).options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})};U.prototype.post=function(e,t){return s.defined("data",e),t=Ae(t,{}),t.method="POST",t.data=e,this._makeRequest(t)};U.post=function(e){return new U(e).post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};U.prototype.put=function(e,t){return s.defined("data",e),t=Ae(t,{}),t.method="PUT",t.data=e,this._makeRequest(t)};U.put=function(e){return new U(e).put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};U.prototype.patch=function(e,t){return s.defined("data",e),t=Ae(t,{}),t.method="PATCH",t.data=e,this._makeRequest(t)};U.patch=function(e){return new U(e).patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})};U._Implementations={};U._Implementations.loadImageElement=function(e,t,n){let o=new Image;o.onload=function(){o.naturalWidth===0&&o.naturalHeight===0&&o.width===0&&o.height===0&&(o.width=300,o.height=150),n.resolve(o)},o.onerror=function(i){n.reject(i)},t&&(cn.contains(e)?o.crossOrigin="use-credentials":o.crossOrigin=""),o.src=e};U._Implementations.createImage=function(e,t,n,o,i,r){let a=e.url;U.supportsImageBitmapOptions().then(function(u){if(!(u&&r)){U._Implementations.loadImageElement(a,t,n);return}let d="blob",m="GET",l=Qe(),w=U._Implementations.loadWithXhr(a,d,m,void 0,void 0,l,void 0,void 0,void 0);return p(w)&&p(w.abort)&&(e.cancelFunction=function(){w.abort()}),l.promise.then(function(T){if(!p(T)){n.reject(new Se(`Successfully retrieved ${a} but it contained no content.`));return}return U.createImageBitmapFromBlob(T,{flipY:o,premultiplyAlpha:!1,skipColorSpaceConversion:i})}).then(function(T){n.resolve(T)})}).catch(function(u){n.reject(u)})};U.createImageBitmapFromBlob=function(e,t){return s.defined("options",t),s.typeOf.bool("options.flipY",t.flipY),s.typeOf.bool("options.premultiplyAlpha",t.premultiplyAlpha),s.typeOf.bool("options.skipColorSpaceConversion",t.skipColorSpaceConversion),createImageBitmap(e,{imageOrientation:t.flipY?"flipY":"none",premultiplyAlpha:t.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:t.skipColorSpaceConversion?"none":"default"})};function Nr(e,t,n,o,i,r,a){fetch(e,{method:n,headers:i}).then(async u=>{if(!u.ok){let d={};u.headers.forEach((m,l)=>{d[l]=m}),r.reject(new mt(u.status,u,d));return}switch(t){case"text":r.resolve(u.text());break;case"json":r.resolve(u.json());break;default:r.resolve(new Uint8Array(await u.arrayBuffer()).buffer);break}}).catch(()=>{r.reject(new mt)})}var kr=typeof XMLHttpRequest>"u";U._Implementations.loadWithXhr=function(e,t,n,o,i,r,a){let u=qr.exec(e);if(u!==null){r.resolve(Dr(u,t));return}if(kr){Nr(e,t,n,o,i,r,a);return}let d=new XMLHttpRequest;if(cn.contains(e)&&(d.withCredentials=!0),d.open(n,e,!0),p(a)&&p(d.overrideMimeType)&&d.overrideMimeType(a),p(i))for(let l in i)i.hasOwnProperty(l)&&d.setRequestHeader(l,i[l]);p(t)&&(d.responseType=t);let m=!1;return typeof e=="string"&&(m=e.indexOf("file://")===0||typeof window<"u"&&window.location.origin==="file://"),d.onload=function(){if((d.status<200||d.status>=300)&&!(m&&d.status===0)){r.reject(new mt(d.status,d.response,d.getAllResponseHeaders()));return}let l=d.response,w=d.responseType;if(n==="HEAD"||n==="OPTIONS"){let v=d.getAllResponseHeaders().trim().split(/[\r\n]+/),P={};v.forEach(function(j){let q=j.split(": "),k=q.shift();P[k]=q.join(": ")}),r.resolve(P);return}if(d.status===204)r.resolve(void 0);else if(p(l)&&(!p(t)||w===t))r.resolve(l);else if(t==="json"&&typeof l=="string")try{r.resolve(JSON.parse(l))}catch(T){r.reject(T)}else(w===""||w==="document")&&p(d.responseXML)&&d.responseXML.hasChildNodes()?r.resolve(d.responseXML):(w===""||w==="text")&&p(d.responseText)?r.resolve(d.responseText):r.reject(new Se("Invalid XMLHttpRequest response type."))},d.onerror=function(l){r.reject(new mt)},e.includes("gisserver")&&e.includes("tmsserver")&&e.includes(".json")||d.send(o),d};U._Implementations.loadAndExecuteScript=function(e,t,n){return Vn(e,t).catch(function(o){n.reject(o)})};U._DefaultImplementations={};U._DefaultImplementations.createImage=U._Implementations.createImage;U._DefaultImplementations.loadWithXhr=U._Implementations.loadWithXhr;U._DefaultImplementations.loadAndExecuteScript=U._Implementations.loadAndExecuteScript;U.DEFAULT=Object.freeze(new U({url:typeof document>"u"?"":document.location.href.split("?")[0]}));var ke=U;function bt(e){e=O(e,O.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=O(e.addNewLeapSeconds,!0),p(e.data)?uo(this,e.data):uo(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}bt.fromUrl=async function(e,t){s.defined("url",e),t=O(t,O.EMPTY_OBJECT);let n=ke.createIfNeeded(e),o;try{o=await n.fetchJson()}catch{throw new Se(`An error occurred while retrieving the EOP data from the URL ${n.url}.`)}return new bt({addNewLeapSeconds:t.addNewLeapSeconds,data:o})};bt.NONE=Object.freeze({compute:function(e,t){return p(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new pt(0,0,0,0,0),t}});bt.prototype.compute=function(e,t){if(!p(this._samples))return;if(p(t)||(t=new pt(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,o=this._lastIndex,i=0,r=0;if(p(o)){let u=n[o],d=n[o+1],m=pe.lessThanOrEquals(u,e),l=!p(d),w=l||pe.greaterThanOrEquals(d,e);if(m&&w)return i=o,!l&&d.equals(e)&&++i,r=i+1,ho(this,n,this._samples,e,i,r,t),t}let a=Be(n,e,pe.compare,this._dateColumn);return a>=0?(a<n.length-1&&n[a+1].equals(e)&&++a,i=a,r=a):(r=~a,i=r-1,i<0&&(i=0)),this._lastIndex=i,ho(this,n,this._samples,e,i,r,t),t};function Fr(e,t){return pe.compare(e.julianDate,t)}function uo(e,t){if(!p(t.columnNames))throw new Se("Error in loaded EOP data: The columnNames property is required.");if(!p(t.samples))throw new Se("Error in loaded EOP data: The samples property is required.");let n=t.columnNames.indexOf("modifiedJulianDateUtc"),o=t.columnNames.indexOf("xPoleWanderRadians"),i=t.columnNames.indexOf("yPoleWanderRadians"),r=t.columnNames.indexOf("ut1MinusUtcSeconds"),a=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),u=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),d=t.columnNames.indexOf("taiMinusUtcSeconds");if(n<0||o<0||i<0||r<0||a<0||u<0||d<0)throw new Se("Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");let m=e._samples=t.samples,l=e._dates=[];e._dateColumn=n,e._xPoleWanderRadiansColumn=o,e._yPoleWanderRadiansColumn=i,e._ut1MinusUtcSecondsColumn=r,e._xCelestialPoleOffsetRadiansColumn=a,e._yCelestialPoleOffsetRadiansColumn=u,e._taiMinusUtcSecondsColumn=d,e._columnCount=t.columnNames.length,e._lastIndex=void 0;let w,T=e._addNewLeapSeconds;for(let v=0,P=m.length;v<P;v+=e._columnCount){let j=m[v+n],q=m[v+d],k=j+ce.MODIFIED_JULIAN_DATE_DIFFERENCE,x=new pe(k,q,$.TAI);if(l.push(x),T){if(q!==w&&p(w)){let F=pe.leapSeconds,B=Be(F,x,Fr);if(B<0){let Q=new ne(x,q);F.splice(~B,0,Q)}}w=q}}}function po(e,t,n,o,i){let r=n*o;i.xPoleWander=t[r+e._xPoleWanderRadiansColumn],i.yPoleWander=t[r+e._yPoleWanderRadiansColumn],i.xPoleOffset=t[r+e._xCelestialPoleOffsetRadiansColumn],i.yPoleOffset=t[r+e._yCelestialPoleOffsetRadiansColumn],i.ut1MinusUtc=t[r+e._ut1MinusUtcSecondsColumn]}function wt(e,t,n){return t+e*(n-t)}function ho(e,t,n,o,i,r,a){let u=e._columnCount;if(r>t.length-1)return a.xPoleWander=0,a.yPoleWander=0,a.xPoleOffset=0,a.yPoleOffset=0,a.ut1MinusUtc=0,a;let d=t[i],m=t[r];if(d.equals(m)||o.equals(d))return po(e,n,i,u,a),a;if(o.equals(m))return po(e,n,r,u,a),a;let l=pe.secondsDifference(o,d)/pe.secondsDifference(m,d),w=i*u,T=r*u,v=n[w+e._ut1MinusUtcSecondsColumn],P=n[T+e._ut1MinusUtcSecondsColumn],j=P-v;if(j>.5||j<-.5){let q=n[w+e._taiMinusUtcSecondsColumn],k=n[T+e._taiMinusUtcSecondsColumn];q!==k&&(m.equals(o)?v=P:P-=k-q)}return a.xPoleWander=wt(l,n[w+e._xPoleWanderRadiansColumn],n[T+e._xPoleWanderRadiansColumn]),a.yPoleWander=wt(l,n[w+e._yPoleWanderRadiansColumn],n[T+e._yPoleWanderRadiansColumn]),a.xPoleOffset=wt(l,n[w+e._xCelestialPoleOffsetRadiansColumn],n[T+e._xCelestialPoleOffsetRadiansColumn]),a.yPoleOffset=wt(l,n[w+e._yCelestialPoleOffsetRadiansColumn],n[T+e._yCelestialPoleOffsetRadiansColumn]),a.ut1MinusUtc=wt(l,v,P),a}var mo=bt;function be(e,t,n){this.heading=O(e,0),this.pitch=O(t,0),this.roll=O(n,0)}be.fromQuaternion=function(e,t){if(!p(e))throw new A("quaternion is required");p(t)||(t=new be);let n=2*(e.w*e.y-e.z*e.x),o=1-2*(e.x*e.x+e.y*e.y),i=2*(e.w*e.x+e.y*e.z),r=1-2*(e.y*e.y+e.z*e.z),a=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(a,r),t.roll=Math.atan2(i,o),t.pitch=-E.asinClamped(n),t};be.fromDegrees=function(e,t,n,o){if(!p(e))throw new A("heading is required");if(!p(t))throw new A("pitch is required");if(!p(n))throw new A("roll is required");return p(o)||(o=new be),o.heading=e*E.RADIANS_PER_DEGREE,o.pitch=t*E.RADIANS_PER_DEGREE,o.roll=n*E.RADIANS_PER_DEGREE,o};be.clone=function(e,t){if(p(e))return p(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new be(e.heading,e.pitch,e.roll)};be.equals=function(e,t){return e===t||p(e)&&p(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll};be.equalsEpsilon=function(e,t,n,o){return e===t||p(e)&&p(t)&&E.equalsEpsilon(e.heading,t.heading,n,o)&&E.equalsEpsilon(e.pitch,t.pitch,n,o)&&E.equalsEpsilon(e.roll,t.roll,n,o)};be.prototype.clone=function(e){return be.clone(this,e)};be.prototype.equals=function(e){return be.equals(this,e)};be.prototype.equalsEpsilon=function(e,t,n){return be.equalsEpsilon(this,e,t,n)};be.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};var Lt=be;var yo=/((?:.*\/)|^)CimSDK\.min\.js(?:\?|\#|$)/;function xr(){let e=document.getElementsByTagName("script");for(let t=0,n=e.length;t<n;++t){let o=e[t].getAttribute("src"),i=yo.exec(o);if(i!==null)return i[1]}}var Bt;function lo(e){return typeof document>"u"?e:(p(Bt)||(Bt=document.createElement("a")),Bt.href=e,Bt.href)}var Ve;function wo(){if(p(Ve))return Ve;let e;if(typeof GEOWORLD_BASE_URL<"u"?e=GEOWORLD_BASE_URL:p(import.meta?.url)?e=dt(".",import.meta.url):typeof define=="object"&&p(define.amd)&&!define.amd.toUrlUndefined&&p(St.toUrl)?e=dt("..",Ye("Core/buildModuleUrl.js")):e=xr(),!p(e))throw new A("Unable to determine Geoworld base URL automatically, try defining a global variable called GEOWORLD_BASE_URL.");return Ve=new ke({url:lo(e)}),Ve.appendForwardSlash(),Ve}function Lr(e){return lo(St.toUrl(`../${e}`))}function bo(e){return wo().getDerivedResource({url:e}).url}var Wt;function Ye(e){return p(Wt)||(typeof define=="object"&&p(define.amd)&&!define.amd.toUrlUndefined&&p(St.toUrl)?Wt=Lr:Wt=bo),Wt(e)}Ye._cesiumScriptRegex=yo;Ye._buildModuleUrlFromBaseUrl=bo;Ye._clearBaseResource=function(){Ve=void 0};Ye.setBaseUrl=function(e){Ve=ke.DEFAULT.getDerivedResource({url:e})};Ye.getCesiumBaseUrl=wo;var Oo=Ye;function Br(e,t,n){this.x=e,this.y=t,this.s=n}var Qt=Br;function pn(e){e=O(e,O.EMPTY_OBJECT),this._xysFileUrlTemplate=ke.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=O(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=O(e.sampleZeroJulianEphemerisDate,24423965e-1),this._sampleZeroDateTT=new pe(this._sampleZeroJulianEphemerisDate,0,$.TAI),this._stepSizeDays=O(e.stepSizeDays,1),this._samplesPerXysFile=O(e.samplesPerXysFile,1e3),this._totalSamples=O(e.totalSamples,27426),this._samples=new Array(this._totalSamples*3),this._chunkDownloadsInProgress=[];let t=this._interpolationOrder,n=this._denominators=new Array(t+1),o=this._xTable=new Array(t+1),i=Math.pow(this._stepSizeDays,t);for(let r=0;r<=t;++r){n[r]=i,o[r]=r*this._stepSizeDays;for(let a=0;a<=t;++a)a!==r&&(n[r]*=r-a);n[r]=1/n[r]}this._work=new Array(t+1),this._coef=new Array(t+1)}var Wr=new pe(0,0,$.TAI);function fn(e,t,n){let o=Wr;return o.dayNumber=t,o.secondsOfDay=n,pe.daysDifference(o,e._sampleZeroDateTT)}pn.prototype.preload=function(e,t,n,o){let i=fn(this,e,t),r=fn(this,n,o),a=i/this._stepSizeDays-this._interpolationOrder/2|0;a<0&&(a=0);let u=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;u>=this._totalSamples&&(u=this._totalSamples-1);let d=a/this._samplesPerXysFile|0,m=u/this._samplesPerXysFile|0,l=[];for(let w=d;w<=m;++w)l.push(un(this,w));return Promise.all(l)};pn.prototype.computeXysRadians=function(e,t,n){let o=fn(this,e,t);if(o<0)return;let i=o/this._stepSizeDays|0;if(i>=this._totalSamples)return;let r=this._interpolationOrder,a=i-(r/2|0);a<0&&(a=0);let u=a+r;u>=this._totalSamples&&(u=this._totalSamples-1,a=u-r,a<0&&(a=0));let d=!1,m=this._samples;if(p(m[a*3])||(un(this,a/this._samplesPerXysFile|0),d=!0),p(m[u*3])||(un(this,u/this._samplesPerXysFile|0),d=!0),d)return;p(n)?(n.x=0,n.y=0,n.s=0):n=new Qt(0,0,0);let l=o-a*this._stepSizeDays,w=this._work,T=this._denominators,v=this._coef,P=this._xTable,j,q;for(j=0;j<=r;++j)w[j]=l-P[j];for(j=0;j<=r;++j){for(v[j]=1,q=0;q<=r;++q)q!==j&&(v[j]*=w[q]);v[j]*=T[j];let k=(a+j)*3;n.x+=v[j]*m[k++],n.y+=v[j]*m[k++],n.s+=v[j]*m[k]}return n};function un(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];let n,o=e._xysFileUrlTemplate;p(o)?n=o.getDerivedResource({templateValues:{0:t}}):n=new ke({url:Oo(`Assets/IAU2006_XYS/IAU2006_XYS_${t}.json`)});let i=n.fetchJson().then(function(r){e._chunkDownloadsInProgress[t]=!1;let a=e._samples,u=r.samples,d=t*e._samplesPerXysFile*3;for(let m=0,l=u.length;m<l;++m)a[d+m]=u[m]});return e._chunkDownloadsInProgress[t]=i,i}var go=pn;function R(e,t,n,o){this.x=O(e,0),this.y=O(t,0),this.z=O(n,0),this.w=O(o,0)}var Ot=new _;R.fromAxisAngle=function(e,t,n){s.typeOf.object("axis",e),s.typeOf.number("angle",t);let o=t/2,i=Math.sin(o);Ot=_.normalize(e,Ot);let r=Ot.x*i,a=Ot.y*i,u=Ot.z*i,d=Math.cos(o);return p(n)?(n.x=r,n.y=a,n.z=u,n.w=d,n):new R(r,a,u,d)};var Qr=[1,2,0],Hr=new Array(3);R.fromRotationMatrix=function(e,t){s.typeOf.object("matrix",e);let n,o,i,r,a,u=e[W.COLUMN0ROW0],d=e[W.COLUMN1ROW1],m=e[W.COLUMN2ROW2],l=u+d+m;if(l>0)n=Math.sqrt(l+1),a=.5*n,n=.5/n,o=(e[W.COLUMN1ROW2]-e[W.COLUMN2ROW1])*n,i=(e[W.COLUMN2ROW0]-e[W.COLUMN0ROW2])*n,r=(e[W.COLUMN0ROW1]-e[W.COLUMN1ROW0])*n;else{let w=Qr,T=0;d>u&&(T=1),m>u&&m>d&&(T=2);let v=w[T],P=w[v];n=Math.sqrt(e[W.getElementIndex(T,T)]-e[W.getElementIndex(v,v)]-e[W.getElementIndex(P,P)]+1);let j=Hr;j[T]=.5*n,n=.5/n,a=(e[W.getElementIndex(P,v)]-e[W.getElementIndex(v,P)])*n,j[v]=(e[W.getElementIndex(v,T)]+e[W.getElementIndex(T,v)])*n,j[P]=(e[W.getElementIndex(P,T)]+e[W.getElementIndex(T,P)])*n,o=-j[0],i=-j[1],r=-j[2]}return p(t)?(t.x=o,t.y=i,t.z=r,t.w=a,t):new R(o,i,r,a)};var _o=new R,So=new R,hn=new R,Ro=new R;R.fromHeadingPitchRoll=function(e,t){return s.typeOf.object("headingPitchRoll",e),Ro=R.fromAxisAngle(_.UNIT_X,e.roll,_o),hn=R.fromAxisAngle(_.UNIT_Y,-e.pitch,t),t=R.multiply(hn,Ro,hn),So=R.fromAxisAngle(_.UNIT_Z,-e.heading,_o),R.multiply(So,t,t)};var Ht=new _,dn=new _,Ee=new R,Eo=new R,$t=new R;R.packedLength=4;R.pack=function(e,t,n){return s.typeOf.object("value",e),s.defined("array",t),n=O(n,0),t[n++]=e.x,t[n++]=e.y,t[n++]=e.z,t[n]=e.w,t};R.unpack=function(e,t,n){return s.defined("array",e),t=O(t,0),p(n)||(n=new R),n.x=e[t],n.y=e[t+1],n.z=e[t+2],n.w=e[t+3],n};R.packedInterpolationLength=3;R.convertPackedArrayForInterpolation=function(e,t,n,o){R.unpack(e,n*4,$t),R.conjugate($t,$t);for(let i=0,r=n-t+1;i<r;i++){let a=i*3;R.unpack(e,(t+i)*4,Ee),R.multiply(Ee,$t,Ee),Ee.w<0&&R.negate(Ee,Ee),R.computeAxis(Ee,Ht);let u=R.computeAngle(Ee);p(o)||(o=[]),o[a]=Ht.x*u,o[a+1]=Ht.y*u,o[a+2]=Ht.z*u}};R.unpackInterpolationResult=function(e,t,n,o,i){p(i)||(i=new R),_.fromArray(e,0,dn);let r=_.magnitude(dn);return R.unpack(t,o*4,Eo),r===0?R.clone(R.IDENTITY,Ee):R.fromAxisAngle(dn,r,Ee),R.multiply(Ee,Eo,i)};R.clone=function(e,t){if(p(e))return p(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t):new R(e.x,e.y,e.z,e.w)};R.conjugate=function(e,t){return s.typeOf.object("quaternion",e),s.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=e.w,t};R.magnitudeSquared=function(e){return s.typeOf.object("quaternion",e),e.x*e.x+e.y*e.y+e.z*e.z+e.w*e.w};R.magnitude=function(e){return Math.sqrt(R.magnitudeSquared(e))};R.normalize=function(e,t){s.typeOf.object("result",t);let n=1/R.magnitude(e),o=e.x*n,i=e.y*n,r=e.z*n,a=e.w*n;return t.x=o,t.y=i,t.z=r,t.w=a,t};R.inverse=function(e,t){s.typeOf.object("result",t);let n=R.magnitudeSquared(e);return t=R.conjugate(e,t),R.multiplyByScalar(t,1/n,t)};R.add=function(e,t,n){return s.typeOf.object("left",e),s.typeOf.object("right",t),s.typeOf.object("result",n),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};R.subtract=function(e,t,n){return s.typeOf.object("left",e),s.typeOf.object("right",t),s.typeOf.object("result",n),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};R.negate=function(e,t){return s.typeOf.object("quaternion",e),s.typeOf.object("result",t),t.x=-e.x,t.y=-e.y,t.z=-e.z,t.w=-e.w,t};R.dot=function(e,t){return s.typeOf.object("left",e),s.typeOf.object("right",t),e.x*t.x+e.y*t.y+e.z*t.z+e.w*t.w};R.multiply=function(e,t,n){s.typeOf.object("left",e),s.typeOf.object("right",t),s.typeOf.object("result",n);let o=e.x,i=e.y,r=e.z,a=e.w,u=t.x,d=t.y,m=t.z,l=t.w,w=a*u+o*l+i*m-r*d,T=a*d-o*m+i*l+r*u,v=a*m+o*d-i*u+r*l,P=a*l-o*u-i*d-r*m;return n.x=w,n.y=T,n.z=v,n.w=P,n};R.multiplyByScalar=function(e,t,n){return s.typeOf.object("quaternion",e),s.typeOf.number("scalar",t),s.typeOf.object("result",n),n.x=e.x*t,n.y=e.y*t,n.z=e.z*t,n.w=e.w*t,n};R.divideByScalar=function(e,t,n){return s.typeOf.object("quaternion",e),s.typeOf.number("scalar",t),s.typeOf.object("result",n),n.x=e.x/t,n.y=e.y/t,n.z=e.z/t,n.w=e.w/t,n};R.computeAxis=function(e,t){s.typeOf.object("quaternion",e),s.typeOf.object("result",t);let n=e.w;if(Math.abs(n-1)<E.EPSILON6||Math.abs(n+1)<E.EPSILON6)return t.x=1,t.y=t.z=0,t;let o=1/Math.sqrt(1-n*n);return t.x=e.x*o,t.y=e.y*o,t.z=e.z*o,t};R.computeAngle=function(e){return s.typeOf.object("quaternion",e),Math.abs(e.w-1)<E.EPSILON6?0:2*Math.acos(e.w)};var mn=new R;R.lerp=function(e,t,n,o){return s.typeOf.object("start",e),s.typeOf.object("end",t),s.typeOf.number("t",n),s.typeOf.object("result",o),mn=R.multiplyByScalar(t,n,mn),o=R.multiplyByScalar(e,1-n,o),R.add(mn,o,o)};var To=new R,yn=new R,ln=new R;R.slerp=function(e,t,n,o){s.typeOf.object("start",e),s.typeOf.object("end",t),s.typeOf.number("t",n),s.typeOf.object("result",o);let i=R.dot(e,t),r=t;if(i<0&&(i=-i,r=To=R.negate(t,To)),1-i<E.EPSILON6)return R.lerp(e,r,n,o);let a=Math.acos(i);return yn=R.multiplyByScalar(e,Math.sin((1-n)*a),yn),ln=R.multiplyByScalar(r,Math.sin(n*a),ln),o=R.add(yn,ln,o),R.multiplyByScalar(o,1/Math.sin(a),o)};R.log=function(e,t){s.typeOf.object("quaternion",e),s.typeOf.object("result",t);let n=E.acosClamped(e.w),o=0;return n!==0&&(o=n/Math.sin(n)),_.multiplyByScalar(e,o,t)};R.exp=function(e,t){s.typeOf.object("cartesian",e),s.typeOf.object("result",t);let n=_.magnitude(e),o=0;return n!==0&&(o=Math.sin(n)/n),t.x=e.x*o,t.y=e.y*o,t.z=e.z*o,t.w=Math.cos(n),t};var $r=new _,Vr=new _,gt=new R,ct=new R;R.computeInnerQuadrangle=function(e,t,n,o){s.typeOf.object("q0",e),s.typeOf.object("q1",t),s.typeOf.object("q2",n),s.typeOf.object("result",o);let i=R.conjugate(t,gt);R.multiply(i,n,ct);let r=R.log(ct,$r);R.multiply(i,e,ct);let a=R.log(ct,Vr);return _.add(r,a,r),_.multiplyByScalar(r,.25,r),_.negate(r,r),R.exp(r,gt),R.multiply(t,gt,o)};R.squad=function(e,t,n,o,i,r){s.typeOf.object("q0",e),s.typeOf.object("q1",t),s.typeOf.object("s0",n),s.typeOf.object("s1",o),s.typeOf.number("t",i),s.typeOf.object("result",r);let a=R.slerp(e,t,i,gt),u=R.slerp(n,o,i,ct);return R.slerp(a,u,2*i*(1-i),r)};var Yr=new R,vo=1.9011074535173003,Vt=ft.supportsTypedArrays()?new Float32Array(8):[],Yt=ft.supportsTypedArrays()?new Float32Array(8):[],Ue=ft.supportsTypedArrays()?new Float32Array(8):[],Ie=ft.supportsTypedArrays()?new Float32Array(8):[];for(let e=0;e<7;++e){let t=e+1,n=2*t+1;Vt[e]=1/(t*n),Yt[e]=t/n}Vt[7]=vo/(8*17);Yt[7]=vo*8/17;R.fastSlerp=function(e,t,n,o){s.typeOf.object("start",e),s.typeOf.object("end",t),s.typeOf.number("t",n),s.typeOf.object("result",o);let i=R.dot(e,t),r;i>=0?r=1:(r=-1,i=-i);let a=i-1,u=1-n,d=n*n,m=u*u;for(let v=7;v>=0;--v)Ue[v]=(Vt[v]*d-Yt[v])*a,Ie[v]=(Vt[v]*m-Yt[v])*a;let l=r*n*(1+Ue[0]*(1+Ue[1]*(1+Ue[2]*(1+Ue[3]*(1+Ue[4]*(1+Ue[5]*(1+Ue[6]*(1+Ue[7])))))))),w=u*(1+Ie[0]*(1+Ie[1]*(1+Ie[2]*(1+Ie[3]*(1+Ie[4]*(1+Ie[5]*(1+Ie[6]*(1+Ie[7])))))))),T=R.multiplyByScalar(e,w,Yr);return R.multiplyByScalar(t,l,o),R.add(T,o,o)};R.fastSquad=function(e,t,n,o,i,r){s.typeOf.object("q0",e),s.typeOf.object("q1",t),s.typeOf.object("s0",n),s.typeOf.object("s1",o),s.typeOf.number("t",i),s.typeOf.object("result",r);let a=R.fastSlerp(e,t,i,gt),u=R.fastSlerp(n,o,i,ct);return R.fastSlerp(a,u,2*i*(1-i),r)};R.equals=function(e,t){return e===t||p(e)&&p(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w};R.equalsEpsilon=function(e,t,n){return n=O(n,0),e===t||p(e)&&p(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};R.ZERO=Object.freeze(new R(0,0,0,0));R.IDENTITY=Object.freeze(new R(0,0,0,1));R.prototype.clone=function(e){return R.clone(this,e)};R.prototype.equals=function(e){return R.equals(this,e)};R.prototype.equalsEpsilon=function(e,t){return R.equalsEpsilon(this,e,t)};R.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Xe=R;var V={},wn={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"}},st={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},bn={},ge={east:new _,north:new _,up:new _,west:new _,south:new _,down:new _},Fe=new _,xe=new _,Le=new _;V.localFrameToFixedFrameGenerator=function(e,t){if(!wn.hasOwnProperty(e)||!wn[e].hasOwnProperty(t))throw new A("firstAxis and secondAxis must be east, north, up, west, south or down.");let n=wn[e][t],o,i=e+t;return p(bn[i])?o=bn[i]:(o=function(r,a,u){if(!p(r))throw new A("origin is required.");if(isNaN(r.x)||isNaN(r.y)||isNaN(r.z))throw new A("origin has a NaN component");if(p(u)||(u=new G),_.equalsEpsilon(r,_.ZERO,E.EPSILON14))_.unpack(st[e],0,Fe),_.unpack(st[t],0,xe),_.unpack(st[n],0,Le);else if(E.equalsEpsilon(r.x,0,E.EPSILON14)&&E.equalsEpsilon(r.y,0,E.EPSILON14)){let d=E.sign(r.z);_.unpack(st[e],0,Fe),e!=="east"&&e!=="west"&&_.multiplyByScalar(Fe,d,Fe),_.unpack(st[t],0,xe),t!=="east"&&t!=="west"&&_.multiplyByScalar(xe,d,xe),_.unpack(st[n],0,Le),n!=="east"&&n!=="west"&&_.multiplyByScalar(Le,d,Le)}else{a=O(a,ze.default),a.geodeticSurfaceNormal(r,ge.up);let d=ge.up,m=ge.east;m.x=-r.y,m.y=r.x,m.z=0,_.normalize(m,ge.east),_.cross(d,m,ge.north),_.multiplyByScalar(ge.up,-1,ge.down),_.multiplyByScalar(ge.east,-1,ge.west),_.multiplyByScalar(ge.north,-1,ge.south),Fe=ge[e],xe=ge[t],Le=ge[n]}return u[0]=Fe.x,u[1]=Fe.y,u[2]=Fe.z,u[3]=0,u[4]=xe.x,u[5]=xe.y,u[6]=xe.z,u[7]=0,u[8]=Le.x,u[9]=Le.y,u[10]=Le.z,u[11]=0,u[12]=r.x,u[13]=r.y,u[14]=r.z,u[15]=1,u},bn[i]=o),o};V.eastNorthUpToFixedFrame=V.localFrameToFixedFrameGenerator("east","north");V.northEastDownToFixedFrame=V.localFrameToFixedFrameGenerator("north","east");V.northUpEastToFixedFrame=V.localFrameToFixedFrameGenerator("north","up");V.northWestUpToFixedFrame=V.localFrameToFixedFrameGenerator("north","west");var Xr=new Xe,Zr=new _(1,1,1),Jr=new G;V.headingPitchRollToFixedFrame=function(e,t,n,o,i){s.typeOf.object("HeadingPitchRoll",t),o=O(o,V.eastNorthUpToFixedFrame);let r=Xe.fromHeadingPitchRoll(t,Xr),a=G.fromTranslationQuaternionRotationScale(_.ZERO,r,Zr,Jr);return i=o(e,n,i),G.multiply(i,a,i)};var Gr=new G,Kr=new W;V.headingPitchRollQuaternion=function(e,t,n,o,i){s.typeOf.object("HeadingPitchRoll",t);let r=V.headingPitchRollToFixedFrame(e,t,n,o,Gr),a=G.getMatrix3(r,Kr);return Xe.fromRotationMatrix(a,i)};var ei=new _(1,1,1),ti=new _,Co=new G,ni=new G,oi=new W,ri=new Xe;V.fixedFrameToHeadingPitchRoll=function(e,t,n,o){s.defined("transform",e),t=O(t,ze.default),n=O(n,V.eastNorthUpToFixedFrame),p(o)||(o=new Lt);let i=G.getTranslation(e,ti);if(_.equals(i,_.ZERO))return o.heading=0,o.pitch=0,o.roll=0,o;let r=G.inverseTransformation(n(i,t,Co),Co),a=G.setScale(e,ei,ni);a=G.setTranslation(a,_.ZERO,a),r=G.multiply(r,a,r);let u=Xe.fromRotationMatrix(G.getMatrix3(r,oi),ri);return u=Xe.normalize(u,u),Lt.fromQuaternion(u,o)};var ii=6*3600+41*60+50.54841,ci=8640184812866e-6,si=.093104,ai=-62e-7,fi=11772758384668e-32,ui=72921158553e-15,pi=E.TWO_PI/86400,Xt=new pe;V.computeIcrfToCentralBodyFixedMatrix=function(e,t){let n=V.computeIcrfToFixedMatrix(e,t);return p(n)||(n=V.computeTemeToPseudoFixedMatrix(e,t)),n};V.computeTemeToPseudoFixedMatrix=function(e,t){if(!p(e))throw new A("date is required.");Xt=pe.addSeconds(e,-pe.computeTaiMinusUtc(e),Xt);let n=Xt.dayNumber,o=Xt.secondsOfDay,i,r=n-2451545;o>=43200?i=(r+.5)/ce.DAYS_PER_JULIAN_CENTURY:i=(r-.5)/ce.DAYS_PER_JULIAN_CENTURY;let u=(ii+i*(ci+i*(si+i*ai)))*pi%E.TWO_PI,d=ui+fi*(n-24515455e-1),m=(o+ce.SECONDS_PER_DAY*.5)%ce.SECONDS_PER_DAY,l=u+d*m,w=Math.cos(l),T=Math.sin(l);return p(t)?(t[0]=w,t[1]=-T,t[2]=0,t[3]=T,t[4]=w,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new W(w,T,0,-T,w,0,0,0,1)};V.iau2006XysData=new go;V.earthOrientationParameters=mo.NONE;var _n=32.184,hi=2451545;V.preloadIcrfFixed=function(e){let t=e.start.dayNumber,n=e.start.secondsOfDay+_n,o=e.stop.dayNumber,i=e.stop.secondsOfDay+_n;return V.iau2006XysData.preload(t,n,o,i)};V.computeIcrfToFixedMatrix=function(e,t){if(!p(e))throw new A("date is required.");p(t)||(t=new W);let n=V.computeFixedToIcrfMatrix(e,t);if(p(n))return W.transpose(n,t)};var di=32.184,mi=2451545,Zt=new Lt,yi=new W,li=new pe;V.computeMoonFixedToIcrfMatrix=function(e,t){if(!p(e))throw new A("date is required.");p(t)||(t=new W);let n=pe.addSeconds(e,di,li),o=pe.totalDays(n)-mi,i=E.toRadians(12.112)-E.toRadians(.052992)*o,r=E.toRadians(24.224)-E.toRadians(.105984)*o,a=E.toRadians(227.645)+E.toRadians(13.012)*o,u=E.toRadians(261.105)+E.toRadians(13.340716)*o,d=E.toRadians(358)+E.toRadians(.9856)*o;return Zt.pitch=E.toRadians(180)-E.toRadians(3.878)*Math.sin(i)-E.toRadians(.12)*Math.sin(r)+E.toRadians(.07)*Math.sin(a)-E.toRadians(.017)*Math.sin(u),Zt.roll=E.toRadians(66.53-90)+E.toRadians(1.543)*Math.cos(i)+E.toRadians(.24)*Math.cos(r)-E.toRadians(.028)*Math.cos(a)+E.toRadians(.007)*Math.cos(u),Zt.heading=E.toRadians(244.375-90)+E.toRadians(13.17635831)*o+E.toRadians(3.558)*Math.sin(i)+E.toRadians(.121)*Math.sin(r)-E.toRadians(.064)*Math.sin(a)+E.toRadians(.016)*Math.sin(u)+E.toRadians(.025)*Math.sin(d),W.fromHeadingPitchRoll(Zt,yi)};V.computeIcrfToMoonFixedMatrix=function(e,t){if(!p(e))throw new A("date is required.");p(t)||(t=new W);let n=V.computeMoonFixedToIcrfMatrix(e,t);if(p(n))return W.transpose(n,t)};var wi=new Qt(0,0,0),bi=new pt(0,0,0,0,0,0),On=new W,gn=new W;V.computeFixedToIcrfMatrix=function(e,t){if(!p(e))throw new A("date is required.");p(t)||(t=new W);let n=V.earthOrientationParameters.compute(e,bi);if(!p(n))return;let o=e.dayNumber,i=e.secondsOfDay+_n,r=V.iau2006XysData.computeXysRadians(o,i,wi);if(!p(r))return;let a=r.x+n.xPoleOffset,u=r.y+n.yPoleOffset,d=1/(1+Math.sqrt(1-a*a-u*u)),m=On;m[0]=1-d*a*a,m[3]=-d*a*u,m[6]=a,m[1]=-d*a*u,m[4]=1-d*u*u,m[7]=u,m[2]=-a,m[5]=-u,m[8]=1-d*(a*a+u*u);let l=W.fromRotationZ(-r.s,gn),w=W.multiply(m,l,On),T=e.dayNumber,v=e.secondsOfDay-pe.computeTaiMinusUtc(e)+n.ut1MinusUtc,P=T-2451545,j=v/ce.SECONDS_PER_DAY,q=.779057273264+j+.00273781191135448*(P+j);q=q%1*E.TWO_PI;let k=W.fromRotationZ(q,gn),x=W.multiply(w,k,On),F=Math.cos(n.xPoleWander),B=Math.cos(n.yPoleWander),Q=Math.sin(n.xPoleWander),H=Math.sin(n.yPoleWander),ee=o-hi+i/ce.SECONDS_PER_DAY;ee/=36525;let re=-47e-6*ee*E.RADIANS_PER_DEGREE/3600,Z=Math.cos(re),oe=Math.sin(re),J=gn;return J[0]=F*Z,J[1]=F*oe,J[2]=Q,J[3]=-B*oe+H*Q*Z,J[4]=B*Z+H*Q*oe,J[5]=-H*F,J[6]=-H*oe-B*Q*Z,J[7]=H*Z-B*Q*oe,J[8]=B*F,W.multiply(x,J,t)};var Oi=new qe;V.pointToWindowCoordinates=function(e,t,n,o){return o=V.pointToGLWindowCoordinates(e,t,n,o),o.y=2*t[5]-o.y,o};V.pointToGLWindowCoordinates=function(e,t,n,o){if(!p(e))throw new A("modelViewProjectionMatrix is required.");if(!p(t))throw new A("viewportTransformation is required.");if(!p(n))throw new A("point is required.");p(o)||(o=new Oe);let i=Oi;return G.multiplyByVector(e,qe.fromElements(n.x,n.y,n.z,1,i),i),qe.multiplyByScalar(i,1/i.w,i),G.multiplyByVector(t,i,i),Oe.fromCartesian4(i,o)};var gi=new _,_i=new _,Si=new _;V.rotationMatrixFromPositionVelocity=function(e,t,n,o){if(!p(e))throw new A("position is required.");if(!p(t))throw new A("velocity is required.");let i=O(n,ze.default).geodeticSurfaceNormal(e,gi),r=_.cross(t,i,_i);_.equalsEpsilon(r,_.ZERO,E.EPSILON6)&&(r=_.clone(_.UNIT_X,r));let a=_.cross(r,t,Si);return _.normalize(a,a),_.cross(t,a,r),_.negate(r,r),_.normalize(r,r),p(o)||(o=new W),o[0]=t.x,o[1]=t.y,o[2]=t.z,o[3]=r.x,o[4]=r.y,o[5]=r.z,o[6]=a.x,o[7]=a.y,o[8]=a.z,o};var Ao=new G(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),jo=new Me,Sn=new _,Ri=new _,Ei=new W,Rn=new G,Mo=new G;V.basisTo2D=function(e,t,n){if(!p(e))throw new A("projection is required.");if(!p(t))throw new A("matrix is required.");if(!p(n))throw new A("result is required.");let o=G.getTranslation(t,Ri),i=e.ellipsoid,r;if(_.equals(o,_.ZERO))r=_.clone(_.ZERO,Sn);else{let l=i.cartesianToCartographic(o,jo);r=e.project(l,Sn),_.fromElements(r.z,r.x,r.y,r)}let a=V.eastNorthUpToFixedFrame(o,i,Rn),u=G.inverseTransformation(a,Mo),d=G.getMatrix3(t,Ei),m=G.multiplyByMatrix3(u,d,n);return G.multiply(Ao,m,n),G.setTranslation(n,r,n),n};V.ellipsoidTo2DModelMatrix=function(e,t,n){if(!p(e))throw new A("projection is required.");if(!p(t))throw new A("center is required.");if(!p(n))throw new A("result is required.");let o=e.ellipsoid,i=V.eastNorthUpToFixedFrame(t,o,Rn),r=G.inverseTransformation(i,Mo),a=o.cartesianToCartographic(t,jo),u=e.project(a,Sn);_.fromElements(u.z,u.x,u.y,u);let d=G.fromTranslation(u,Rn);return G.multiply(Ao,r,n),G.multiply(d,n,n),n};var Po=V;var Uo={};function _t(e,t){if(!p(e))throw new A("identifier is required.");p(Uo[e])||(Uo[e]=!0,console.warn(O(t,e)))}_t.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.";_t.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined.  zIndex will be ignored";_t.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height.  heightReference will be ignored";_t.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight.  extrudedHeightReference will be ignored";var Io=_t;function Ti(e,t){if(!p(e)||!p(t))throw new A("identifier and message are required.");Io(e,t)}var zo=Ti;function L(e,t,n,o){this.west=O(e,0),this.south=O(t,0),this.east=O(n,0),this.north=O(o,0)}Object.defineProperties(L.prototype,{width:{get:function(){return L.computeWidth(this)}},height:{get:function(){return L.computeHeight(this)}}});L.packedLength=4;L.pack=function(e,t,n){return s.typeOf.object("value",e),s.defined("array",t),n=O(n,0),t[n++]=e.west,t[n++]=e.south,t[n++]=e.east,t[n]=e.north,t};L.unpack=function(e,t,n){return s.defined("array",e),t=O(t,0),p(n)||(n=new L),n.west=e[t++],n.south=e[t++],n.east=e[t++],n.north=e[t],n};L.computeWidth=function(e){s.typeOf.object("rectangle",e);let t=e.east,n=e.west;return t<n&&(t+=E.TWO_PI),t-n};L.computeHeight=function(e){return s.typeOf.object("rectangle",e),e.north-e.south};L.fromDegrees=function(e,t,n,o,i){return e=E.toRadians(O(e,0)),t=E.toRadians(O(t,0)),n=E.toRadians(O(n,0)),o=E.toRadians(O(o,0)),p(i)?(i.west=e,i.south=t,i.east=n,i.north=o,i):new L(e,t,n,o)};L.fromRadians=function(e,t,n,o,i){return p(i)?(i.west=O(e,0),i.south=O(t,0),i.east=O(n,0),i.north=O(o,0),i):new L(e,t,n,o)};L.fromCartographicArray=function(e,t){s.defined("cartographics",e);let n=Number.MAX_VALUE,o=-Number.MAX_VALUE,i=Number.MAX_VALUE,r=-Number.MAX_VALUE,a=Number.MAX_VALUE,u=-Number.MAX_VALUE;for(let d=0,m=e.length;d<m;d++){let l=e[d];n=Math.min(n,l.longitude),o=Math.max(o,l.longitude),a=Math.min(a,l.latitude),u=Math.max(u,l.latitude);let w=l.longitude>=0?l.longitude:l.longitude+E.TWO_PI;i=Math.min(i,w),r=Math.max(r,w)}return o-n>r-i&&(n=i,o=r,o>E.PI&&(o=o-E.TWO_PI),n>E.PI&&(n=n-E.TWO_PI)),p(t)?(t.west=n,t.south=a,t.east=o,t.north=u,t):new L(n,a,o,u)};L.fromCartesianArray=function(e,t,n){s.defined("cartesians",e),t=O(t,ze.default);let o=Number.MAX_VALUE,i=-Number.MAX_VALUE,r=Number.MAX_VALUE,a=-Number.MAX_VALUE,u=Number.MAX_VALUE,d=-Number.MAX_VALUE;for(let m=0,l=e.length;m<l;m++){let w=t.cartesianToCartographic(e[m]);o=Math.min(o,w.longitude),i=Math.max(i,w.longitude),u=Math.min(u,w.latitude),d=Math.max(d,w.latitude);let T=w.longitude>=0?w.longitude:w.longitude+E.TWO_PI;r=Math.min(r,T),a=Math.max(a,T)}return i-o>a-r&&(o=r,i=a,i>E.PI&&(i=i-E.TWO_PI),o>E.PI&&(o=o-E.TWO_PI)),p(n)?(n.west=o,n.south=u,n.east=i,n.north=d,n):new L(o,u,i,d)};var vi=new _,Ci=new _,Ai=new _,ji=new _,Mi=new _,En=new Array(5);for(let e=0;e<En.length;++e)En[e]=new _;L.fromBoundingSphere=function(e,t,n){s.typeOf.object("boundingSphere",e);let o=e.center,i=e.radius;if(p(t)||(t=ze.default),p(n)||(n=new L),_.equals(o,_.ZERO))return L.clone(L.MAX_VALUE,n),n;let r=Po.eastNorthUpToFixedFrame(o,t,vi),a=G.multiplyByPointAsVector(r,_.UNIT_X,Ci);_.normalize(a,a);let u=G.multiplyByPointAsVector(r,_.UNIT_Y,Ai);_.normalize(u,u),_.multiplyByScalar(u,i,u),_.multiplyByScalar(a,i,a);let d=_.negate(u,Mi),m=_.negate(a,ji),l=En,w=l[0];return _.add(o,u,w),w=l[1],_.add(o,m,w),w=l[2],_.add(o,d,w),w=l[3],_.add(o,a,w),l[4]=o,L.fromCartesianArray(l,t,n)};L.clone=function(e,t){if(p(e))return p(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new L(e.west,e.south,e.east,e.north)};L.equalsEpsilon=function(e,t,n){return n=O(n,0),e===t||p(e)&&p(t)&&Math.abs(e.west-t.west)<=n&&Math.abs(e.south-t.south)<=n&&Math.abs(e.east-t.east)<=n&&Math.abs(e.north-t.north)<=n};L.prototype.clone=function(e){return L.clone(this,e)};L.prototype.equals=function(e){return L.equals(this,e)};L.equals=function(e,t){return e===t||p(e)&&p(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north};L.prototype.equalsEpsilon=function(e,t){return L.equalsEpsilon(this,e,t)};L.validate=function(e){return zo("Rectangle.validate","Rectangle.validate is a no-op and has been deprecated. It will be removed in Cesium 1.124."),L._validate(e)};L._validate=function(e){s.typeOf.object("rectangle",e);let t=e.north;s.typeOf.number.greaterThanOrEquals("north",t,-E.PI_OVER_TWO),s.typeOf.number.lessThanOrEquals("north",t,E.PI_OVER_TWO);let n=e.south;s.typeOf.number.greaterThanOrEquals("south",n,-E.PI_OVER_TWO),s.typeOf.number.lessThanOrEquals("south",n,E.PI_OVER_TWO);let o=e.west;s.typeOf.number.greaterThanOrEquals("west",o,-Math.PI),s.typeOf.number.lessThanOrEquals("west",o,Math.PI);let i=e.east;s.typeOf.number.greaterThanOrEquals("east",i,-Math.PI),s.typeOf.number.lessThanOrEquals("east",i,Math.PI)};L.southwest=function(e,t){return s.typeOf.object("rectangle",e),p(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new Me(e.west,e.south)};L.northwest=function(e,t){return s.typeOf.object("rectangle",e),p(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new Me(e.west,e.north)};L.northeast=function(e,t){return s.typeOf.object("rectangle",e),p(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new Me(e.east,e.north)};L.southeast=function(e,t){return s.typeOf.object("rectangle",e),p(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new Me(e.east,e.south)};L.center=function(e,t){s.typeOf.object("rectangle",e);let n=e.east,o=e.west;n<o&&(n+=E.TWO_PI);let i=E.negativePiToPi((o+n)*.5),r=(e.south+e.north)*.5;return p(t)?(t.longitude=i,t.latitude=r,t.height=0,t):new Me(i,r)};L.intersection=function(e,t,n){s.typeOf.object("rectangle",e),s.typeOf.object("otherRectangle",t);let o=e.east,i=e.west,r=t.east,a=t.west;o<i&&r>0?o+=E.TWO_PI:r<a&&o>0&&(r+=E.TWO_PI),o<i&&a<0?a+=E.TWO_PI:r<a&&i<0&&(i+=E.TWO_PI);let u=E.negativePiToPi(Math.max(i,a)),d=E.negativePiToPi(Math.min(o,r));if((e.west<e.east||t.west<t.east)&&d<=u)return;let m=Math.max(e.south,t.south),l=Math.min(e.north,t.north);if(!(m>=l))return p(n)?(n.west=u,n.south=m,n.east=d,n.north=l,n):new L(u,m,d,l)};L.simpleIntersection=function(e,t,n){s.typeOf.object("rectangle",e),s.typeOf.object("otherRectangle",t);let o=Math.max(e.west,t.west),i=Math.max(e.south,t.south),r=Math.min(e.east,t.east),a=Math.min(e.north,t.north);if(!(i>=a||o>=r))return p(n)?(n.west=o,n.south=i,n.east=r,n.north=a,n):new L(o,i,r,a)};L.union=function(e,t,n){s.typeOf.object("rectangle",e),s.typeOf.object("otherRectangle",t),p(n)||(n=new L);let o=e.east,i=e.west,r=t.east,a=t.west;o<i&&r>0?o+=E.TWO_PI:r<a&&o>0&&(r+=E.TWO_PI),o<i&&a<0?a+=E.TWO_PI:r<a&&i<0&&(i+=E.TWO_PI);let u=E.negativePiToPi(Math.min(i,a)),d=E.negativePiToPi(Math.max(o,r));return n.west=u,n.south=Math.min(e.south,t.south),n.east=d,n.north=Math.max(e.north,t.north),n};L.expand=function(e,t,n){return s.typeOf.object("rectangle",e),s.typeOf.object("cartographic",t),p(n)||(n=new L),n.west=Math.min(e.west,t.longitude),n.south=Math.min(e.south,t.latitude),n.east=Math.max(e.east,t.longitude),n.north=Math.max(e.north,t.latitude),n};L.contains=function(e,t){s.typeOf.object("rectangle",e),s.typeOf.object("cartographic",t);let n=t.longitude,o=t.latitude,i=e.west,r=e.east;return r<i&&(r+=E.TWO_PI,n<0&&(n+=E.TWO_PI)),(n>i||E.equalsEpsilon(n,i,E.EPSILON14))&&(n<r||E.equalsEpsilon(n,r,E.EPSILON14))&&o>=e.south&&o<=e.north};var Pi=new Me;L.subsample=function(e,t,n,o){s.typeOf.object("rectangle",e),t=O(t,ze.default),n=O(n,0),p(o)||(o=[]);let i=0,r=e.north,a=e.south,u=e.east,d=e.west,m=Pi;m.height=n,m.longitude=d,m.latitude=r,o[i]=t.cartographicToCartesian(m,o[i]),i++,m.longitude=u,o[i]=t.cartographicToCartesian(m,o[i]),i++,m.latitude=a,o[i]=t.cartographicToCartesian(m,o[i]),i++,m.longitude=d,o[i]=t.cartographicToCartesian(m,o[i]),i++,r<0?m.latitude=r:a>0?m.latitude=a:m.latitude=0;for(let l=1;l<8;++l)m.longitude=-Math.PI+l*E.PI_OVER_TWO,L.contains(e,m)&&(o[i]=t.cartographicToCartesian(m,o[i]),i++);return m.latitude===0&&(m.longitude=d,o[i]=t.cartographicToCartesian(m,o[i]),i++,m.longitude=u,o[i]=t.cartographicToCartesian(m,o[i]),i++),o.length=i,o};L.subsection=function(e,t,n,o,i,r){if(s.typeOf.object("rectangle",e),s.typeOf.number.greaterThanOrEquals("westLerp",t,0),s.typeOf.number.lessThanOrEquals("westLerp",t,1),s.typeOf.number.greaterThanOrEquals("southLerp",n,0),s.typeOf.number.lessThanOrEquals("southLerp",n,1),s.typeOf.number.greaterThanOrEquals("eastLerp",o,0),s.typeOf.number.lessThanOrEquals("eastLerp",o,1),s.typeOf.number.greaterThanOrEquals("northLerp",i,0),s.typeOf.number.lessThanOrEquals("northLerp",i,1),s.typeOf.number.lessThanOrEquals("westLerp",t,o),s.typeOf.number.lessThanOrEquals("southLerp",n,i),p(r)||(r=new L),e.west<=e.east){let u=e.east-e.west;r.west=e.west+t*u,r.east=e.west+o*u}else{let u=E.TWO_PI+e.east-e.west;r.west=E.negativePiToPi(e.west+t*u),r.east=E.negativePiToPi(e.west+o*u)}let a=e.north-e.south;return r.south=e.south+n*a,r.north=e.south+i*a,t===1&&(r.west=e.east),o===1&&(r.east=e.east),n===1&&(r.south=e.north),i===1&&(r.north=e.north),r};L.MAX_VALUE=Object.freeze(new L(-Math.PI,-E.PI_OVER_TWO,Math.PI,E.PI_OVER_TWO));var Af=L;function D(e,t,n,o){this[0]=O(e,0),this[1]=O(n,0),this[2]=O(t,0),this[3]=O(o,0)}D.packedLength=4;D.pack=function(e,t,n){return s.typeOf.object("value",e),s.defined("array",t),n=O(n,0),t[n++]=e[0],t[n++]=e[1],t[n++]=e[2],t[n++]=e[3],t};D.unpack=function(e,t,n){return s.defined("array",e),t=O(t,0),p(n)||(n=new D),n[0]=e[t++],n[1]=e[t++],n[2]=e[t++],n[3]=e[t++],n};D.packArray=function(e,t){s.defined("array",e);let n=e.length,o=n*4;if(!p(t))t=new Array(o);else{if(!Array.isArray(t)&&t.length!==o)throw new A("If result is a typed array, it must have exactly array.length * 4 elements");t.length!==o&&(t.length=o)}for(let i=0;i<n;++i)D.pack(e[i],t,i*4);return t};D.unpackArray=function(e,t){if(s.defined("array",e),s.typeOf.number.greaterThanOrEquals("array.length",e.length,4),e.length%4!==0)throw new A("array length must be a multiple of 4.");let n=e.length;p(t)?t.length=n/4:t=new Array(n/4);for(let o=0;o<n;o+=4){let i=o/4;t[i]=D.unpack(e,o,t[i])}return t};D.clone=function(e,t){if(p(e))return p(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new D(e[0],e[2],e[1],e[3])};D.fromArray=D.unpack;D.fromColumnMajorArray=function(e,t){return s.defined("values",e),D.clone(e,t)};D.fromRowMajorArray=function(e,t){return s.defined("values",e),p(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new D(e[0],e[1],e[2],e[3])};D.fromScale=function(e,t){return s.typeOf.object("scale",e),p(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new D(e.x,0,0,e.y)};D.fromUniformScale=function(e,t){return s.typeOf.number("scale",e),p(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new D(e,0,0,e)};D.fromRotation=function(e,t){s.typeOf.number("angle",e);let n=Math.cos(e),o=Math.sin(e);return p(t)?(t[0]=n,t[1]=o,t[2]=-o,t[3]=n,t):new D(n,-o,o,n)};D.toArray=function(e,t){return s.typeOf.object("matrix",e),p(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]};D.getElementIndex=function(e,t){return s.typeOf.number.greaterThanOrEquals("row",t,0),s.typeOf.number.lessThanOrEquals("row",t,1),s.typeOf.number.greaterThanOrEquals("column",e,0),s.typeOf.number.lessThanOrEquals("column",e,1),e*2+t};D.getColumn=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",t,0),s.typeOf.number.lessThanOrEquals("index",t,1),s.typeOf.object("result",n);let o=t*2,i=e[o],r=e[o+1];return n.x=i,n.y=r,n};D.setColumn=function(e,t,n,o){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",t,0),s.typeOf.number.lessThanOrEquals("index",t,1),s.typeOf.object("cartesian",n),s.typeOf.object("result",o),o=D.clone(e,o);let i=t*2;return o[i]=n.x,o[i+1]=n.y,o};D.getRow=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",t,0),s.typeOf.number.lessThanOrEquals("index",t,1),s.typeOf.object("result",n);let o=e[t],i=e[t+2];return n.x=o,n.y=i,n};D.setRow=function(e,t,n,o){return s.typeOf.object("matrix",e),s.typeOf.number.greaterThanOrEquals("index",t,0),s.typeOf.number.lessThanOrEquals("index",t,1),s.typeOf.object("cartesian",n),s.typeOf.object("result",o),o=D.clone(e,o),o[t]=n.x,o[t+2]=n.y,o};var Ui=new Oe;D.setScale=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.object("scale",t),s.typeOf.object("result",n);let o=D.getScale(e,Ui),i=t.x/o.x,r=t.y/o.y;return n[0]=e[0]*i,n[1]=e[1]*i,n[2]=e[2]*r,n[3]=e[3]*r,n};var Ii=new Oe;D.setUniformScale=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.number("scale",t),s.typeOf.object("result",n);let o=D.getScale(e,Ii),i=t/o.x,r=t/o.y;return n[0]=e[0]*i,n[1]=e[1]*i,n[2]=e[2]*r,n[3]=e[3]*r,n};var qo=new Oe;D.getScale=function(e,t){return s.typeOf.object("matrix",e),s.typeOf.object("result",t),t.x=Oe.magnitude(Oe.fromElements(e[0],e[1],qo)),t.y=Oe.magnitude(Oe.fromElements(e[2],e[3],qo)),t};var Do=new Oe;D.getMaximumScale=function(e){return D.getScale(e,Do),Oe.maximumComponent(Do)};var zi=new Oe;D.setRotation=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.object("result",n);let o=D.getScale(e,zi);return n[0]=t[0]*o.x,n[1]=t[1]*o.x,n[2]=t[2]*o.y,n[3]=t[3]*o.y,n};var qi=new Oe;D.getRotation=function(e,t){s.typeOf.object("matrix",e),s.typeOf.object("result",t);let n=D.getScale(e,qi);return t[0]=e[0]/n.x,t[1]=e[1]/n.x,t[2]=e[2]/n.y,t[3]=e[3]/n.y,t};D.multiply=function(e,t,n){s.typeOf.object("left",e),s.typeOf.object("right",t),s.typeOf.object("result",n);let o=e[0]*t[0]+e[2]*t[1],i=e[0]*t[2]+e[2]*t[3],r=e[1]*t[0]+e[3]*t[1],a=e[1]*t[2]+e[3]*t[3];return n[0]=o,n[1]=r,n[2]=i,n[3]=a,n};D.add=function(e,t,n){return s.typeOf.object("left",e),s.typeOf.object("right",t),s.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n};D.subtract=function(e,t,n){return s.typeOf.object("left",e),s.typeOf.object("right",t),s.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n};D.multiplyByVector=function(e,t,n){s.typeOf.object("matrix",e),s.typeOf.object("cartesian",t),s.typeOf.object("result",n);let o=e[0]*t.x+e[2]*t.y,i=e[1]*t.x+e[3]*t.y;return n.x=o,n.y=i,n};D.multiplyByScalar=function(e,t,n){return s.typeOf.object("matrix",e),s.typeOf.number("scalar",t),s.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n};D.multiplyByScale=function(e,t,n){return s.typeOf.object("matrix",e),s.typeOf.object("scale",t),s.typeOf.object("result",n),n[0]=e[0]*t.x,n[1]=e[1]*t.x,n[2]=e[2]*t.y,n[3]=e[3]*t.y,n};D.multiplyByUniformScale=function(e,t,n){return s.typeOf.object("matrix",e),s.typeOf.number("scale",t),s.typeOf.object("result",n),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n};D.negate=function(e,t){return s.typeOf.object("matrix",e),s.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t};D.transpose=function(e,t){s.typeOf.object("matrix",e),s.typeOf.object("result",t);let n=e[0],o=e[2],i=e[1],r=e[3];return t[0]=n,t[1]=o,t[2]=i,t[3]=r,t};D.abs=function(e,t){return s.typeOf.object("matrix",e),s.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t};D.equals=function(e,t){return e===t||p(e)&&p(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]};D.equalsArray=function(e,t,n){return e[0]===t[n]&&e[1]===t[n+1]&&e[2]===t[n+2]&&e[3]===t[n+3]};D.equalsEpsilon=function(e,t,n){return n=O(n,0),e===t||p(e)&&p(t)&&Math.abs(e[0]-t[0])<=n&&Math.abs(e[1]-t[1])<=n&&Math.abs(e[2]-t[2])<=n&&Math.abs(e[3]-t[3])<=n};D.IDENTITY=Object.freeze(new D(1,0,0,1));D.ZERO=Object.freeze(new D(0,0,0,0));D.COLUMN0ROW0=0;D.COLUMN0ROW1=1;D.COLUMN1ROW0=2;D.COLUMN1ROW1=3;Object.defineProperties(D.prototype,{length:{get:function(){return D.packedLength}}});D.prototype.clone=function(e){return D.clone(this,e)};D.prototype.equals=function(e){return D.equals(this,e)};D.prototype.equalsEpsilon=function(e,t){return D.equalsEpsilon(this,e,t)};D.prototype.toString=function(){return`(${this[0]}, ${this[2]})
(${this[1]}, ${this[3]})`};var qf=D;export{qe as a,G as b,De as c,ke as d,Oo as e,Xe as f,Po as g,Io as h,Af as i,qf as j};
public/CimSDK/Workers/chunk-IQP74IF6.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as Q}from"./chunk-4DMLXFUJ.js";import{a as z}from"./chunk-55FFQILS.js";import{a as _}from"./chunk-32UDSAPU.js";import{a as K}from"./chunk-563CJZT3.js";import{a as H}from"./chunk-LH4TAMBV.js";import{b as J,c as W,d as P}from"./chunk-WI5KIEME.js";import{d as j}from"./chunk-ZPW6H6BB.js";import{a as L}from"./chunk-NFDMGE7Q.js";import{b,d as k}from"./chunk-VDZXURWO.js";import{a as Z}from"./chunk-UEFEFMYS.js";import{a as x}from"./chunk-5HWP5DW7.js";import{a as F}from"./chunk-3K67FZLU.js";import{e as g}from"./chunk-55TU6MJR.js";var M=new k,ot=new b,nt=new b,it=new b,st=new b;function O(t){t=x(t,x.EMPTY_OBJECT);let n=t.length,e=t.topRadius,h=t.bottomRadius,o=x(t.vertexFormat,_.DEFAULT),r=x(t.slices,128);if(!g(n))throw new F("options.length must be defined.");if(!g(e))throw new F("options.topRadius must be defined.");if(!g(h))throw new F("options.bottomRadius must be defined.");if(r<3)throw new F("options.slices must be greater than or equal to 3.");if(g(t.offsetAttribute)&&t.offsetAttribute===z.TOP)throw new F("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=n,this._topRadius=e,this._bottomRadius=h,this._vertexFormat=_.clone(o),this._slices=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}O.packedLength=_.packedLength+5;O.pack=function(t,n,e){if(!g(t))throw new F("value is required");if(!g(n))throw new F("array is required");return e=x(e,0),_.pack(t._vertexFormat,n,e),e+=_.packedLength,n[e++]=t._length,n[e++]=t._topRadius,n[e++]=t._bottomRadius,n[e++]=t._slices,n[e]=x(t._offsetAttribute,-1),n};var X=new _,C={vertexFormat:X,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};O.unpack=function(t,n,e){if(!g(t))throw new F("array is required");n=x(n,0);let h=_.unpack(t,n,X);n+=_.packedLength;let o=t[n++],r=t[n++],p=t[n++],D=t[n++],w=t[n];return g(e)?(e._vertexFormat=_.clone(h,e._vertexFormat),e._length=o,e._topRadius=r,e._bottomRadius=p,e._slices=D,e._offsetAttribute=w===-1?void 0:w,e):(C.length=o,C.topRadius=r,C.bottomRadius=p,C.slices=D,C.offsetAttribute=w===-1?void 0:w,new O(C))};O.createGeometry=function(t){let n=t._length,e=t._topRadius,h=t._bottomRadius,o=t._vertexFormat,r=t._slices;if(n<=0||e<0||h<0||e===0&&h===0)return;let p=r+r,D=r+p,w=p+p,E=Q.computePositions(n,e,h,r,!0),N=o.st?new Float32Array(w*2):void 0,c=o.normal?new Float32Array(w*3):void 0,m=o.tangent?new Float32Array(w*3):void 0,u=o.bitangent?new Float32Array(w*3):void 0,i,U=o.normal||o.tangent||o.bitangent;if(U){let T=o.tangent||o.bitangent,f=0,d=0,l=0,q=Math.atan2(h-e,n),A=ot;A.z=Math.sin(q);let B=Math.cos(q),R=it,y=nt;for(i=0;i<r;i++){let Y=i/r*Z.TWO_PI,tt=B*Math.cos(Y),et=B*Math.sin(Y);U&&(A.x=tt,A.y=et,T&&(R=b.normalize(b.cross(b.UNIT_Z,A,R),R)),o.normal&&(c[f++]=A.x,c[f++]=A.y,c[f++]=A.z,c[f++]=A.x,c[f++]=A.y,c[f++]=A.z),o.tangent&&(m[d++]=R.x,m[d++]=R.y,m[d++]=R.z,m[d++]=R.x,m[d++]=R.y,m[d++]=R.z),o.bitangent&&(y=b.normalize(b.cross(A,R,y),y),u[l++]=y.x,u[l++]=y.y,u[l++]=y.z,u[l++]=y.x,u[l++]=y.y,u[l++]=y.z))}for(i=0;i<r;i++)o.normal&&(c[f++]=0,c[f++]=0,c[f++]=-1),o.tangent&&(m[d++]=1,m[d++]=0,m[d++]=0),o.bitangent&&(u[l++]=0,u[l++]=-1,u[l++]=0);for(i=0;i<r;i++)o.normal&&(c[f++]=0,c[f++]=0,c[f++]=1),o.tangent&&(m[d++]=1,m[d++]=0,m[d++]=0),o.bitangent&&(u[l++]=0,u[l++]=1,u[l++]=0)}let $=12*r-12,s=K.createTypedArray(w,$),a=0,v=0;for(i=0;i<r-1;i++)s[a++]=v,s[a++]=v+2,s[a++]=v+3,s[a++]=v,s[a++]=v+3,s[a++]=v+1,v+=2;for(s[a++]=p-2,s[a++]=0,s[a++]=1,s[a++]=p-2,s[a++]=1,s[a++]=p-1,i=1;i<r-1;i++)s[a++]=p+i+1,s[a++]=p+i,s[a++]=p;for(i=1;i<r-1;i++)s[a++]=D,s[a++]=D+i,s[a++]=D+i+1;let V=0;if(o.st){let T=Math.max(e,h);for(i=0;i<w;i++){let f=b.fromArray(E,i*3,st);N[V++]=(f.x+T)/(2*T),N[V++]=(f.y+T)/(2*T)}}let S=new H;o.position&&(S.position=new P({componentDatatype:L.DOUBLE,componentsPerAttribute:3,values:E})),o.normal&&(S.normal=new P({componentDatatype:L.FLOAT,componentsPerAttribute:3,values:c})),o.tangent&&(S.tangent=new P({componentDatatype:L.FLOAT,componentsPerAttribute:3,values:m})),o.bitangent&&(S.bitangent=new P({componentDatatype:L.FLOAT,componentsPerAttribute:3,values:u})),o.st&&(S.st=new P({componentDatatype:L.FLOAT,componentsPerAttribute:2,values:N})),M.x=n*.5,M.y=Math.max(h,e);let I=new j(b.ZERO,k.magnitude(M));if(g(t._offsetAttribute)){n=E.length;let T=t._offsetAttribute===z.NONE?0:1,f=new Uint8Array(n/3).fill(T);S.applyOffset=new P({componentDatatype:L.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}return new W({attributes:S,indices:s,primitiveType:J.TRIANGLES,boundingSphere:I,offsetAttribute:t._offsetAttribute})};var G;O.getUnitCylinder=function(){return g(G)||(G=O.createGeometry(new O({topRadius:1,bottomRadius:1,length:1,vertexFormat:_.POSITION_ONLY}))),G};var yt=O;export{yt as a};
public/CimSDK/Workers/chunk-IUDUZUOX.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as wt}from"./chunk-55FFQILS.js";import{a as k}from"./chunk-32UDSAPU.js";import{a as kt}from"./chunk-563CJZT3.js";import{a as Ct}from"./chunk-LH4TAMBV.js";import{b as dt,c as _t,d as R}from"./chunk-WI5KIEME.js";import{d as ht}from"./chunk-ZPW6H6BB.js";import{a as N}from"./chunk-NFDMGE7Q.js";import{b as s,d as pt,e as ot}from"./chunk-VDZXURWO.js";import{a as M}from"./chunk-UEFEFMYS.js";import{a as p}from"./chunk-5HWP5DW7.js";import{a as z}from"./chunk-3K67FZLU.js";import{e as E}from"./chunk-55TU6MJR.js";var yt=new s,vt=new s,Et=new s,Mt=new s,Nt=new s,Rt=new s(1,1,1),Pt=Math.cos,At=Math.sin;function O(n){n=p(n,p.EMPTY_OBJECT);let m=p(n.radii,Rt),i=p(n.innerRadii,m),P=p(n.minimumClock,0),T=p(n.maximumClock,M.TWO_PI),A=p(n.minimumCone,0),b=p(n.maximumCone,M.PI),a=Math.round(p(n.stackPartitions,64)),u=Math.round(p(n.slicePartitions,64)),h=p(n.vertexFormat,k.DEFAULT);if(u<3)throw new z("options.slicePartitions cannot be less than three.");if(a<3)throw new z("options.stackPartitions cannot be less than three.");this._radii=s.clone(m),this._innerRadii=s.clone(i),this._minimumClock=P,this._maximumClock=T,this._minimumCone=A,this._maximumCone=b,this._stackPartitions=a,this._slicePartitions=u,this._vertexFormat=k.clone(h),this._offsetAttribute=n.offsetAttribute,this._workerName="createEllipsoidGeometry"}O.packedLength=2*s.packedLength+k.packedLength+7;O.pack=function(n,m,i){if(!E(n))throw new z("value is required");if(!E(m))throw new z("array is required");return i=p(i,0),s.pack(n._radii,m,i),i+=s.packedLength,s.pack(n._innerRadii,m,i),i+=s.packedLength,k.pack(n._vertexFormat,m,i),i+=k.packedLength,m[i++]=n._minimumClock,m[i++]=n._maximumClock,m[i++]=n._minimumCone,m[i++]=n._maximumCone,m[i++]=n._stackPartitions,m[i++]=n._slicePartitions,m[i]=p(n._offsetAttribute,-1),m};var bt=new s,xt=new s,Ot=new k,y={radii:bt,innerRadii:xt,vertexFormat:Ot,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,offsetAttribute:void 0};O.unpack=function(n,m,i){if(!E(n))throw new z("array is required");m=p(m,0);let P=s.unpack(n,m,bt);m+=s.packedLength;let T=s.unpack(n,m,xt);m+=s.packedLength;let A=k.unpack(n,m,Ot);m+=k.packedLength;let b=n[m++],a=n[m++],u=n[m++],h=n[m++],t=n[m++],o=n[m++],e=n[m];return E(i)?(i._radii=s.clone(P,i._radii),i._innerRadii=s.clone(T,i._innerRadii),i._vertexFormat=k.clone(A,i._vertexFormat),i._minimumClock=b,i._maximumClock=a,i._minimumCone=u,i._maximumCone=h,i._stackPartitions=t,i._slicePartitions=o,i._offsetAttribute=e===-1?void 0:e,i):(y.minimumClock=b,y.maximumClock=a,y.minimumCone=u,y.maximumCone=h,y.stackPartitions=t,y.slicePartitions=o,y.offsetAttribute=e===-1?void 0:e,new O(y))};O.createGeometry=function(n){let m=n._radii;if(m.x<=0||m.y<=0||m.z<=0)return;let i=n._innerRadii;if(i.x<=0||i.y<=0||i.z<=0)return;let P=n._minimumClock,T=n._maximumClock,A=n._minimumCone,b=n._maximumCone,a=n._vertexFormat,u=n._slicePartitions+1,h=n._stackPartitions+1;u=Math.round(u*Math.abs(T-P)/M.TWO_PI),h=Math.round(h*Math.abs(b-A)/M.PI),u<2&&(u=2),h<2&&(h=2);let t,o,e=0,D=[A],S=[P];for(t=0;t<h;t++)D.push(A+t*(b-A)/(h-1));for(D.push(b),o=0;o<u;o++)S.push(P+o*(T-P)/(u-1));S.push(T);let f=D.length,c=S.length,U=0,B=1,q=i.x!==m.x||i.y!==m.y||i.z!==m.z,J=!1,rt=!1,ct=!1;q&&(B=2,A>0&&(J=!0,U+=u-1),b<Math.PI&&(rt=!0,U+=u-1),(T-P)%M.TWO_PI?(ct=!0,U+=(h-1)*2+1):U+=1);let w=c*f*B,x=new Float64Array(w*3),X=new Array(w).fill(!1),st=new Array(w).fill(!1),at=u*h*B,Tt=6*(at+U+1-(u+h)*B),r=kt.createTypedArray(at,Tt),Y=a.normal?new Float32Array(w*3):void 0,j=a.tangent?new Float32Array(w*3):void 0,H=a.bitangent?new Float32Array(w*3):void 0,Z=a.st?new Float32Array(w*2):void 0,V=new Array(f),G=new Array(f);for(t=0;t<f;t++)V[t]=At(D[t]),G[t]=Pt(D[t]);let K=new Array(c),Q=new Array(c);for(o=0;o<c;o++)Q[o]=Pt(S[o]),K[o]=At(S[o]);for(t=0;t<f;t++)for(o=0;o<c;o++)x[e++]=m.x*V[t]*Q[o],x[e++]=m.y*V[t]*K[o],x[e++]=m.z*G[t];let $=w/2;if(q)for(t=0;t<f;t++)for(o=0;o<c;o++)x[e++]=i.x*V[t]*Q[o],x[e++]=i.y*V[t]*K[o],x[e++]=i.z*G[t],X[$]=!0,t>0&&t!==f-1&&o!==0&&o!==c-1&&(st[$]=!0),$++;e=0;let F,L;for(t=1;t<f-2;t++)for(F=t*c,L=(t+1)*c,o=1;o<c-2;o++)r[e++]=L+o,r[e++]=L+o+1,r[e++]=F+o+1,r[e++]=L+o,r[e++]=F+o+1,r[e++]=F+o;if(q){let g=f*c;for(t=1;t<f-2;t++)for(F=g+t*c,L=g+(t+1)*c,o=1;o<c-2;o++)r[e++]=L+o,r[e++]=F+o,r[e++]=F+o+1,r[e++]=L+o,r[e++]=F+o+1,r[e++]=L+o+1}let d,l;if(q){if(J)for(l=f*c,t=1;t<c-2;t++)r[e++]=t,r[e++]=t+1,r[e++]=l+t+1,r[e++]=t,r[e++]=l+t+1,r[e++]=l+t;if(rt)for(d=f*c-c,l=f*c*B-c,t=1;t<c-2;t++)r[e++]=d+t+1,r[e++]=d+t,r[e++]=l+t,r[e++]=d+t+1,r[e++]=l+t,r[e++]=l+t+1}if(ct){for(t=1;t<f-2;t++)l=c*f+c*t,d=c*t,r[e++]=l,r[e++]=d+c,r[e++]=d,r[e++]=l,r[e++]=l+c,r[e++]=d+c;for(t=1;t<f-2;t++)l=c*f+c*(t+1)-1,d=c*(t+1)-1,r[e++]=d+c,r[e++]=l,r[e++]=d,r[e++]=d+c,r[e++]=l+c,r[e++]=l}let v=new Ct;a.position&&(v.position=new R({componentDatatype:N.DOUBLE,componentsPerAttribute:3,values:x}));let ft=0,I=0,tt=0,nt=0,Ft=w/2,ut,lt=ot.fromCartesian3(m),Lt=ot.fromCartesian3(i);if(a.st||a.normal||a.tangent||a.bitangent){for(t=0;t<w;t++){ut=X[t]?Lt:lt;let g=s.fromArray(x,t*3,yt),C=ut.geodeticSurfaceNormal(g,vt);if(st[t]&&s.negate(C,C),a.st){let _=pt.negate(C,Nt);Z[ft++]=Math.atan2(_.y,_.x)/M.TWO_PI+.5,Z[ft++]=Math.asin(C.z)/Math.PI+.5}if(a.normal&&(Y[I++]=C.x,Y[I++]=C.y,Y[I++]=C.z),a.tangent||a.bitangent){let _=Et,et=0,it;if(X[t]&&(et=Ft),!J&&t>=et&&t<et+c*2?it=s.UNIT_X:it=s.UNIT_Z,s.cross(it,C,_),s.normalize(_,_),a.tangent&&(j[tt++]=_.x,j[tt++]=_.y,j[tt++]=_.z),a.bitangent){let W=s.cross(C,_,Mt);s.normalize(W,W),H[nt++]=W.x,H[nt++]=W.y,H[nt++]=W.z}}}a.st&&(v.st=new R({componentDatatype:N.FLOAT,componentsPerAttribute:2,values:Z})),a.normal&&(v.normal=new R({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:Y})),a.tangent&&(v.tangent=new R({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:j})),a.bitangent&&(v.bitangent=new R({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:H}))}if(E(n._offsetAttribute)){let g=x.length,C=n._offsetAttribute===wt.NONE?0:1,_=new Uint8Array(g/3).fill(C);v.applyOffset=new R({componentDatatype:N.UNSIGNED_BYTE,componentsPerAttribute:1,values:_})}return new _t({attributes:v,indices:r,primitiveType:dt.TRIANGLES,boundingSphere:ht.fromEllipsoid(lt),offsetAttribute:n._offsetAttribute})};var mt;O.getUnitEllipsoid=function(){return E(mt)||(mt=O.createGeometry(new O({radii:new s(1,1,1),vertexFormat:k.POSITION_ONLY}))),mt};var Kt=O;export{Kt as a};
public/CimSDK/Workers/chunk-JZ3QHGBZ.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as b}from"./chunk-55FFQILS.js";import{a as u}from"./chunk-32UDSAPU.js";import{a as O}from"./chunk-LH4TAMBV.js";import{b as w,c as h,d as x}from"./chunk-WI5KIEME.js";import{d}from"./chunk-ZPW6H6BB.js";import{a as y}from"./chunk-NFDMGE7Q.js";import{b as i}from"./chunk-VDZXURWO.js";import{a as p}from"./chunk-5HWP5DW7.js";import{a as z,b as c}from"./chunk-3K67FZLU.js";import{e as A}from"./chunk-55TU6MJR.js";var D=new i;function f(r){r=p(r,p.EMPTY_OBJECT);let o=r.minimum,m=r.maximum;if(c.typeOf.object("min",o),c.typeOf.object("max",m),A(r.offsetAttribute)&&r.offsetAttribute===b.TOP)throw new z("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");let a=p(r.vertexFormat,u.DEFAULT);this._minimum=i.clone(o),this._maximum=i.clone(m),this._vertexFormat=a,this._offsetAttribute=r.offsetAttribute,this._workerName="createBoxGeometry"}f.fromDimensions=function(r){r=p(r,p.EMPTY_OBJECT);let o=r.dimensions;c.typeOf.object("dimensions",o),c.typeOf.number.greaterThanOrEquals("dimensions.x",o.x,0),c.typeOf.number.greaterThanOrEquals("dimensions.y",o.y,0),c.typeOf.number.greaterThanOrEquals("dimensions.z",o.z,0);let m=i.multiplyByScalar(o,.5,new i);return new f({minimum:i.negate(m,new i),maximum:m,vertexFormat:r.vertexFormat,offsetAttribute:r.offsetAttribute})};f.fromAxisAlignedBoundingBox=function(r){return c.typeOf.object("boundingBox",r),new f({minimum:r.minimum,maximum:r.maximum})};f.packedLength=2*i.packedLength+u.packedLength+1;f.pack=function(r,o,m){return c.typeOf.object("value",r),c.defined("array",o),m=p(m,0),i.pack(r._minimum,o,m),i.pack(r._maximum,o,m+i.packedLength),u.pack(r._vertexFormat,o,m+2*i.packedLength),o[m+2*i.packedLength+u.packedLength]=p(r._offsetAttribute,-1),o};var _=new i,g=new i,k=new u,F={minimum:_,maximum:g,vertexFormat:k,offsetAttribute:void 0};f.unpack=function(r,o,m){c.defined("array",r),o=p(o,0);let a=i.unpack(r,o,_),s=i.unpack(r,o+i.packedLength,g),n=u.unpack(r,o+2*i.packedLength,k),e=r[o+2*i.packedLength+u.packedLength];return A(m)?(m._minimum=i.clone(a,m._minimum),m._maximum=i.clone(s,m._maximum),m._vertexFormat=u.clone(n,m._vertexFormat),m._offsetAttribute=e===-1?void 0:e,m):(F.offsetAttribute=e===-1?void 0:e,new f(F))};f.createGeometry=function(r){let o=r._minimum,m=r._maximum,a=r._vertexFormat;if(i.equals(o,m))return;let s=new O,n,e;if(a.position&&(a.st||a.normal||a.tangent||a.bitangent)){if(a.position&&(e=new Float64Array(6*4*3),e[0]=o.x,e[1]=o.y,e[2]=m.z,e[3]=m.x,e[4]=o.y,e[5]=m.z,e[6]=m.x,e[7]=m.y,e[8]=m.z,e[9]=o.x,e[10]=m.y,e[11]=m.z,e[12]=o.x,e[13]=o.y,e[14]=o.z,e[15]=m.x,e[16]=o.y,e[17]=o.z,e[18]=m.x,e[19]=m.y,e[20]=o.z,e[21]=o.x,e[22]=m.y,e[23]=o.z,e[24]=m.x,e[25]=o.y,e[26]=o.z,e[27]=m.x,e[28]=m.y,e[29]=o.z,e[30]=m.x,e[31]=m.y,e[32]=m.z,e[33]=m.x,e[34]=o.y,e[35]=m.z,e[36]=o.x,e[37]=o.y,e[38]=o.z,e[39]=o.x,e[40]=m.y,e[41]=o.z,e[42]=o.x,e[43]=m.y,e[44]=m.z,e[45]=o.x,e[46]=o.y,e[47]=m.z,e[48]=o.x,e[49]=m.y,e[50]=o.z,e[51]=m.x,e[52]=m.y,e[53]=o.z,e[54]=m.x,e[55]=m.y,e[56]=m.z,e[57]=o.x,e[58]=m.y,e[59]=m.z,e[60]=o.x,e[61]=o.y,e[62]=o.z,e[63]=m.x,e[64]=o.y,e[65]=o.z,e[66]=m.x,e[67]=o.y,e[68]=m.z,e[69]=o.x,e[70]=o.y,e[71]=m.z,s.position=new x({componentDatatype:y.DOUBLE,componentsPerAttribute:3,values:e})),a.normal){let t=new Float32Array(72);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,t[12]=0,t[13]=0,t[14]=-1,t[15]=0,t[16]=0,t[17]=-1,t[18]=0,t[19]=0,t[20]=-1,t[21]=0,t[22]=0,t[23]=-1,t[24]=1,t[25]=0,t[26]=0,t[27]=1,t[28]=0,t[29]=0,t[30]=1,t[31]=0,t[32]=0,t[33]=1,t[34]=0,t[35]=0,t[36]=-1,t[37]=0,t[38]=0,t[39]=-1,t[40]=0,t[41]=0,t[42]=-1,t[43]=0,t[44]=0,t[45]=-1,t[46]=0,t[47]=0,t[48]=0,t[49]=1,t[50]=0,t[51]=0,t[52]=1,t[53]=0,t[54]=0,t[55]=1,t[56]=0,t[57]=0,t[58]=1,t[59]=0,t[60]=0,t[61]=-1,t[62]=0,t[63]=0,t[64]=-1,t[65]=0,t[66]=0,t[67]=-1,t[68]=0,t[69]=0,t[70]=-1,t[71]=0,s.normal=new x({componentDatatype:y.FLOAT,componentsPerAttribute:3,values:t})}if(a.st){let t=new Float32Array(48);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,t[8]=1,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=1,t[14]=1,t[15]=1,t[16]=0,t[17]=0,t[18]=1,t[19]=0,t[20]=1,t[21]=1,t[22]=0,t[23]=1,t[24]=1,t[25]=0,t[26]=0,t[27]=0,t[28]=0,t[29]=1,t[30]=1,t[31]=1,t[32]=1,t[33]=0,t[34]=0,t[35]=0,t[36]=0,t[37]=1,t[38]=1,t[39]=1,t[40]=0,t[41]=0,t[42]=1,t[43]=0,t[44]=1,t[45]=1,t[46]=0,t[47]=1,s.st=new x({componentDatatype:y.FLOAT,componentsPerAttribute:2,values:t})}if(a.tangent){let t=new Float32Array(72);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,t[12]=-1,t[13]=0,t[14]=0,t[15]=-1,t[16]=0,t[17]=0,t[18]=-1,t[19]=0,t[20]=0,t[21]=-1,t[22]=0,t[23]=0,t[24]=0,t[25]=1,t[26]=0,t[27]=0,t[28]=1,t[29]=0,t[30]=0,t[31]=1,t[32]=0,t[33]=0,t[34]=1,t[35]=0,t[36]=0,t[37]=-1,t[38]=0,t[39]=0,t[40]=-1,t[41]=0,t[42]=0,t[43]=-1,t[44]=0,t[45]=0,t[46]=-1,t[47]=0,t[48]=-1,t[49]=0,t[50]=0,t[51]=-1,t[52]=0,t[53]=0,t[54]=-1,t[55]=0,t[56]=0,t[57]=-1,t[58]=0,t[59]=0,t[60]=1,t[61]=0,t[62]=0,t[63]=1,t[64]=0,t[65]=0,t[66]=1,t[67]=0,t[68]=0,t[69]=1,t[70]=0,t[71]=0,s.tangent=new x({componentDatatype:y.FLOAT,componentsPerAttribute:3,values:t})}if(a.bitangent){let t=new Float32Array(72);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=1,t[14]=0,t[15]=0,t[16]=1,t[17]=0,t[18]=0,t[19]=1,t[20]=0,t[21]=0,t[22]=1,t[23]=0,t[24]=0,t[25]=0,t[26]=1,t[27]=0,t[28]=0,t[29]=1,t[30]=0,t[31]=0,t[32]=1,t[33]=0,t[34]=0,t[35]=1,t[36]=0,t[37]=0,t[38]=1,t[39]=0,t[40]=0,t[41]=1,t[42]=0,t[43]=0,t[44]=1,t[45]=0,t[46]=0,t[47]=1,t[48]=0,t[49]=0,t[50]=1,t[51]=0,t[52]=0,t[53]=1,t[54]=0,t[55]=0,t[56]=1,t[57]=0,t[58]=0,t[59]=1,t[60]=0,t[61]=0,t[62]=1,t[63]=0,t[64]=0,t[65]=1,t[66]=0,t[67]=0,t[68]=1,t[69]=0,t[70]=0,t[71]=1,s.bitangent=new x({componentDatatype:y.FLOAT,componentsPerAttribute:3,values:t})}n=new Uint16Array(6*2*3),n[0]=0,n[1]=1,n[2]=2,n[3]=0,n[4]=2,n[5]=3,n[6]=6,n[7]=5,n[8]=4,n[9]=7,n[10]=6,n[11]=4,n[12]=8,n[13]=9,n[14]=10,n[15]=8,n[16]=10,n[17]=11,n[18]=14,n[19]=13,n[20]=12,n[21]=15,n[22]=14,n[23]=12,n[24]=18,n[25]=17,n[26]=16,n[27]=19,n[28]=18,n[29]=16,n[30]=20,n[31]=21,n[32]=22,n[33]=20,n[34]=22,n[35]=23}else e=new Float64Array(8*3),e[0]=o.x,e[1]=o.y,e[2]=o.z,e[3]=m.x,e[4]=o.y,e[5]=o.z,e[6]=m.x,e[7]=m.y,e[8]=o.z,e[9]=o.x,e[10]=m.y,e[11]=o.z,e[12]=o.x,e[13]=o.y,e[14]=m.z,e[15]=m.x,e[16]=o.y,e[17]=m.z,e[18]=m.x,e[19]=m.y,e[20]=m.z,e[21]=o.x,e[22]=m.y,e[23]=m.z,s.position=new x({componentDatatype:y.DOUBLE,componentsPerAttribute:3,values:e}),n=new Uint16Array(6*2*3),n[0]=4,n[1]=5,n[2]=6,n[3]=4,n[4]=6,n[5]=7,n[6]=1,n[7]=0,n[8]=3,n[9]=1,n[10]=3,n[11]=2,n[12]=1,n[13]=6,n[14]=5,n[15]=1,n[16]=2,n[17]=6,n[18]=2,n[19]=3,n[20]=7,n[21]=2,n[22]=7,n[23]=6,n[24]=3,n[25]=0,n[26]=4,n[27]=3,n[28]=4,n[29]=7,n[30]=0,n[31]=1,n[32]=5,n[33]=0,n[34]=5,n[35]=4;let v=i.subtract(m,o,D),L=i.magnitude(v)*.5;if(A(r._offsetAttribute)){let t=e.length,T=r._offsetAttribute===b.NONE?0:1,E=new Uint8Array(t/3).fill(T);s.applyOffset=new x({componentDatatype:y.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}return new h({attributes:s,indices:n,primitiveType:w.TRIANGLES,boundingSphere:new d(i.ZERO,L),offsetAttribute:r._offsetAttribute})};var l;f.getUnitBox=function(){return A(l)||(l=f.createGeometry(f.fromDimensions({dimensions:new i(1,1,1),vertexFormat:u.POSITION_ONLY}))),l};var R=f;export{R as a};
public/CimSDK/Workers/chunk-LSAUAD4X.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{b as d}from"./chunk-ZPW6H6BB.js";import{b as i}from"./chunk-VDZXURWO.js";import{a as z}from"./chunk-5HWP5DW7.js";import{b as r}from"./chunk-3K67FZLU.js";import{e as c}from"./chunk-55TU6MJR.js";function t(m,n,e){this.minimum=i.clone(z(m,i.ZERO)),this.maximum=i.clone(z(n,i.ZERO)),c(e)?e=i.clone(e):e=i.midpoint(this.minimum,this.maximum,new i),this.center=e}t.fromCorners=function(m,n,e){return r.defined("minimum",m),r.defined("maximum",n),c(e)||(e=new t),e.minimum=i.clone(m,e.minimum),e.maximum=i.clone(n,e.maximum),e.center=i.midpoint(m,n,e.center),e};t.fromPoints=function(m,n){if(c(n)||(n=new t),!c(m)||m.length===0)return n.minimum=i.clone(i.ZERO,n.minimum),n.maximum=i.clone(i.ZERO,n.maximum),n.center=i.clone(i.ZERO,n.center),n;let e=m[0].x,a=m[0].y,u=m[0].z,o=m[0].x,y=m[0].y,l=m[0].z,I=m.length;for(let E=1;E<I;E++){let M=m[E],p=M.x,Z=M.y,q=M.z;e=Math.min(p,e),o=Math.max(p,o),a=Math.min(Z,a),y=Math.max(Z,y),u=Math.min(q,u),l=Math.max(q,l)}let f=n.minimum;f.x=e,f.y=a,f.z=u;let x=n.maximum;return x.x=o,x.y=y,x.z=l,n.center=i.midpoint(f,x,n.center),n};t.clone=function(m,n){if(c(m))return c(n)?(n.minimum=i.clone(m.minimum,n.minimum),n.maximum=i.clone(m.maximum,n.maximum),n.center=i.clone(m.center,n.center),n):new t(m.minimum,m.maximum,m.center)};t.equals=function(m,n){return m===n||c(m)&&c(n)&&i.equals(m.center,n.center)&&i.equals(m.minimum,n.minimum)&&i.equals(m.maximum,n.maximum)};var h=new i;t.intersectPlane=function(m,n){r.defined("box",m),r.defined("plane",n),h=i.subtract(m.maximum,m.minimum,h);let e=i.multiplyByScalar(h,.5,h),a=n.normal,u=e.x*Math.abs(a.x)+e.y*Math.abs(a.y)+e.z*Math.abs(a.z),o=i.dot(m.center,a)+n.distance;return o-u>0?d.INSIDE:o+u<0?d.OUTSIDE:d.INTERSECTING};t.prototype.clone=function(m){return t.clone(this,m)};t.prototype.intersectPlane=function(m){return t.intersectPlane(this,m)};t.prototype.equals=function(m){return t.equals(this,m)};var P=t;export{P as a};
public/CimSDK/Workers/chunk-LZCCFKBI.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as L,b as x}from"./chunk-ZPW6H6BB.js";import{i as R}from"./chunk-HMXXHGCW.js";import{c as d,d as O,e as g}from"./chunk-VDZXURWO.js";import{a as w}from"./chunk-5HWP5DW7.js";import{b as m}from"./chunk-3K67FZLU.js";import{e as f}from"./chunk-55TU6MJR.js";function t(i,h,o,n){this.x=w(i,0),this.y=w(h,0),this.width=w(o,0),this.height=w(n,0)}t.packedLength=4;t.pack=function(i,h,o){return m.typeOf.object("value",i),m.defined("array",h),o=w(o,0),h[o++]=i.x,h[o++]=i.y,h[o++]=i.width,h[o]=i.height,h};t.unpack=function(i,h,o){return m.defined("array",i),h=w(h,0),f(o)||(o=new t),o.x=i[h++],o.y=i[h++],o.width=i[h++],o.height=i[h],o};t.fromPoints=function(i,h){if(f(h)||(h=new t),!f(i)||i.length===0)return h.x=0,h.y=0,h.width=0,h.height=0,h;let o=i.length,n=i[0].x,c=i[0].y,e=i[0].x,y=i[0].y;for(let p=1;p<o;p++){let b=i[p],j=b.x,M=b.y;n=Math.min(j,n),e=Math.max(j,e),c=Math.min(M,c),y=Math.max(M,y)}return h.x=n,h.y=c,h.width=e-n,h.height=y-c,h};var X=new L,Y=new d,k=new d;t.fromRectangle=function(i,h,o){if(f(o)||(o=new t),!f(i))return o.x=0,o.y=0,o.width=0,o.height=0,o;X._ellipsoid=g.default,h=w(h,X);let n=h.project(R.southwest(i,Y)),c=h.project(R.northeast(i,k));return O.subtract(c,n,c),o.x=n.x,o.y=n.y,o.width=c.x,o.height=c.y,o};t.clone=function(i,h){if(f(i))return f(h)?(h.x=i.x,h.y=i.y,h.width=i.width,h.height=i.height,h):new t(i.x,i.y,i.width,i.height)};t.union=function(i,h,o){m.typeOf.object("left",i),m.typeOf.object("right",h),f(o)||(o=new t);let n=Math.min(i.x,h.x),c=Math.min(i.y,h.y),e=Math.max(i.x+i.width,h.x+h.width),y=Math.max(i.y+i.height,h.y+h.height);return o.x=n,o.y=c,o.width=e-n,o.height=y-c,o};t.expand=function(i,h,o){m.typeOf.object("rectangle",i),m.typeOf.object("point",h),o=t.clone(i,o);let n=h.x-o.x,c=h.y-o.y;return n>o.width?o.width=n:n<0&&(o.width-=n,o.x=h.x),c>o.height?o.height=c:c<0&&(o.height-=c,o.y=h.y),o};t.intersect=function(i,h){m.typeOf.object("left",i),m.typeOf.object("right",h);let o=i.x,n=i.y,c=h.x,e=h.y;return o>c+h.width||o+i.width<c||n+i.height<e||n>e+h.height?x.OUTSIDE:x.INTERSECTING};t.equals=function(i,h){return i===h||f(i)&&f(h)&&i.x===h.x&&i.y===h.y&&i.width===h.width&&i.height===h.height};t.prototype.clone=function(i){return t.clone(this,i)};t.prototype.intersect=function(i){return t.intersect(this,i)};t.prototype.equals=function(i){return t.equals(this,i)};var a=t;export{a};
public/CimSDK/Workers/chunk-MQCAYMIH.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as S}from"./chunk-QP426X7X.js";import{a as j}from"./chunk-55FFQILS.js";import{a as D}from"./chunk-563CJZT3.js";import{a as V}from"./chunk-LH4TAMBV.js";import{b as T,c as B,d as L}from"./chunk-WI5KIEME.js";import{d as O}from"./chunk-ZPW6H6BB.js";import{a as x}from"./chunk-NFDMGE7Q.js";import{b as c,e as l}from"./chunk-VDZXURWO.js";import{a as E}from"./chunk-UEFEFMYS.js";import{a as m}from"./chunk-5HWP5DW7.js";import{a as _}from"./chunk-3K67FZLU.js";import{e as d}from"./chunk-55TU6MJR.js";var q=new c,M=new c;function U(e){let t=e.center;M=c.multiplyByScalar(e.ellipsoid.geodeticSurfaceNormal(t,M),e.height,M),M=c.add(t,M,M);let i=new O(M,e.semiMajorAxis),f=S.computeEllipsePositions(e,!1,!0).outerPositions,o=new V({position:new L({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:S.raisePositionsToHeight(f,e,!1)})}),r=f.length/3,u=D.createTypedArray(r,r*2),h=0;for(let n=0;n<r;++n)u[h++]=n,u[h++]=(n+1)%r;return{boundingSphere:i,attributes:o,indices:u}}var N=new O,P=new O;function R(e){let t=e.center,i=e.ellipsoid,f=e.semiMajorAxis,o=c.multiplyByScalar(i.geodeticSurfaceNormal(t,q),e.height,q);N.center=c.add(t,o,N.center),N.radius=f,o=c.multiplyByScalar(i.geodeticSurfaceNormal(t,o),e.extrudedHeight,o),P.center=c.add(t,o,P.center),P.radius=f;let r=S.computeEllipsePositions(e,!1,!0).outerPositions,u=new V({position:new L({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:S.raisePositionsToHeight(r,e,!0)})});r=u.position.values;let h=O.union(N,P),n=r.length/3;if(d(e.offsetAttribute)){let g=new Uint8Array(n);if(e.offsetAttribute===j.TOP)g=g.fill(1,0,n/2);else{let H=e.offsetAttribute===j.NONE?0:1;g=g.fill(H)}u.applyOffset=new L({componentDatatype:x.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}let p=m(e.numberOfVerticalLines,16);p=E.clamp(p,0,n/2);let a=D.createTypedArray(n,n*2+p*2);n/=2;let A=0,s;for(s=0;s<n;++s)a[A++]=s,a[A++]=(s+1)%n,a[A++]=s+n,a[A++]=(s+1)%n+n;let k;if(p>0){let g=Math.min(p,n);k=Math.round(n/g);let H=Math.min(k*p,n);for(s=0;s<H;s+=k)a[A++]=s,a[A++]=s+n}return{boundingSphere:h,attributes:u,indices:a}}function w(e){e=m(e,m.EMPTY_OBJECT);let t=e.center,i=m(e.ellipsoid,l.default),f=e.semiMajorAxis,o=e.semiMinorAxis,r=m(e.granularity,E.RADIANS_PER_DEGREE);if(!d(t))throw new _("center is required.");if(!d(f))throw new _("semiMajorAxis is required.");if(!d(o))throw new _("semiMinorAxis is required.");if(f<o)throw new _("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(r<=0)throw new _("granularity must be greater than zero.");let u=m(e.height,0),h=m(e.extrudedHeight,u);this._center=c.clone(t),this._semiMajorAxis=f,this._semiMinorAxis=o,this._ellipsoid=l.clone(i),this._rotation=m(e.rotation,0),this._height=Math.max(h,u),this._granularity=r,this._extrudedHeight=Math.min(h,u),this._numberOfVerticalLines=Math.max(m(e.numberOfVerticalLines,16),0),this._offsetAttribute=e.offsetAttribute,this._workerName="createEllipseOutlineGeometry"}w.packedLength=c.packedLength+l.packedLength+8;w.pack=function(e,t,i){if(!d(e))throw new _("value is required");if(!d(t))throw new _("array is required");return i=m(i,0),c.pack(e._center,t,i),i+=c.packedLength,l.pack(e._ellipsoid,t,i),i+=l.packedLength,t[i++]=e._semiMajorAxis,t[i++]=e._semiMinorAxis,t[i++]=e._rotation,t[i++]=e._height,t[i++]=e._granularity,t[i++]=e._extrudedHeight,t[i++]=e._numberOfVerticalLines,t[i]=m(e._offsetAttribute,-1),t};var y=new c,C=new l,b={center:y,ellipsoid:C,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};w.unpack=function(e,t,i){if(!d(e))throw new _("array is required");t=m(t,0);let f=c.unpack(e,t,y);t+=c.packedLength;let o=l.unpack(e,t,C);t+=l.packedLength;let r=e[t++],u=e[t++],h=e[t++],n=e[t++],p=e[t++],a=e[t++],A=e[t++],s=e[t];return d(i)?(i._center=c.clone(f,i._center),i._ellipsoid=l.clone(o,i._ellipsoid),i._semiMajorAxis=r,i._semiMinorAxis=u,i._rotation=h,i._height=n,i._granularity=p,i._extrudedHeight=a,i._numberOfVerticalLines=A,i._offsetAttribute=s===-1?void 0:s,i):(b.height=n,b.extrudedHeight=a,b.granularity=p,b.rotation=h,b.semiMajorAxis=r,b.semiMinorAxis=u,b.numberOfVerticalLines=A,b.offsetAttribute=s===-1?void 0:s,new w(b))};w.createGeometry=function(e){if(e._semiMajorAxis<=0||e._semiMinorAxis<=0)return;let t=e._height,i=e._extrudedHeight,f=!E.equalsEpsilon(t,i,0,E.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(f)o.extrudedHeight=i,o.offsetAttribute=e._offsetAttribute,r=R(o);else if(r=U(o),d(e._offsetAttribute)){let u=r.attributes.position.values.length,h=e._offsetAttribute===j.NONE?0:1,n=new Uint8Array(u/3).fill(h);r.attributes.applyOffset=new L({componentDatatype:x.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}return new B({attributes:r.attributes,indices:r.indices,primitiveType:T.LINES,boundingSphere:r.boundingSphere,offsetAttribute:e._offsetAttribute})};var ie=w;export{ie as a};
public/CimSDK/Workers/chunk-NFDMGE7Q.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as N}from"./chunk-YGIPMXAD.js";import{a as i}from"./chunk-5HWP5DW7.js";import{a}from"./chunk-3K67FZLU.js";import{e as T}from"./chunk-55TU6MJR.js";var r={BYTE:N.BYTE,UNSIGNED_BYTE:N.UNSIGNED_BYTE,SHORT:N.SHORT,UNSIGNED_SHORT:N.UNSIGNED_SHORT,INT:N.INT,UNSIGNED_INT:N.UNSIGNED_INT,FLOAT:N.FLOAT,DOUBLE:N.DOUBLE};r.getSizeInBytes=function(n){if(!T(n))throw new a("value is required.");switch(n){case r.BYTE:return Int8Array.BYTES_PER_ELEMENT;case r.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r.SHORT:return Int16Array.BYTES_PER_ELEMENT;case r.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r.INT:return Int32Array.BYTES_PER_ELEMENT;case r.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case r.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case r.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new a("componentDatatype is not a valid value.")}};r.fromTypedArray=function(n){if(n instanceof Int8Array)return r.BYTE;if(n instanceof Uint8Array)return r.UNSIGNED_BYTE;if(n instanceof Int16Array)return r.SHORT;if(n instanceof Uint16Array)return r.UNSIGNED_SHORT;if(n instanceof Int32Array)return r.INT;if(n instanceof Uint32Array)return r.UNSIGNED_INT;if(n instanceof Float32Array)return r.FLOAT;if(n instanceof Float64Array)return r.DOUBLE;throw new a("array must be an Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, or Float64Array.")};r.validate=function(n){return T(n)&&(n===r.BYTE||n===r.UNSIGNED_BYTE||n===r.SHORT||n===r.UNSIGNED_SHORT||n===r.INT||n===r.UNSIGNED_INT||n===r.FLOAT||n===r.DOUBLE)};r.createTypedArray=function(n,e){if(!T(n))throw new a("componentDatatype is required.");if(!T(e))throw new a("valuesOrLength is required.");switch(n){case r.BYTE:return new Int8Array(e);case r.UNSIGNED_BYTE:return new Uint8Array(e);case r.SHORT:return new Int16Array(e);case r.UNSIGNED_SHORT:return new Uint16Array(e);case r.INT:return new Int32Array(e);case r.UNSIGNED_INT:return new Uint32Array(e);case r.FLOAT:return new Float32Array(e);case r.DOUBLE:return new Float64Array(e);default:throw new a("componentDatatype is not a valid value.")}};r.createArrayBufferView=function(n,e,E,t){if(!T(n))throw new a("componentDatatype is required.");if(!T(e))throw new a("buffer is required.");switch(E=i(E,0),t=i(t,(e.byteLength-E)/r.getSizeInBytes(n)),n){case r.BYTE:return new Int8Array(e,E,t);case r.UNSIGNED_BYTE:return new Uint8Array(e,E,t);case r.SHORT:return new Int16Array(e,E,t);case r.UNSIGNED_SHORT:return new Uint16Array(e,E,t);case r.INT:return new Int32Array(e,E,t);case r.UNSIGNED_INT:return new Uint32Array(e,E,t);case r.FLOAT:return new Float32Array(e,E,t);case r.DOUBLE:return new Float64Array(e,E,t);default:throw new a("componentDatatype is not a valid value.")}};r.fromName=function(n){switch(n){case"BYTE":return r.BYTE;case"UNSIGNED_BYTE":return r.UNSIGNED_BYTE;case"SHORT":return r.SHORT;case"UNSIGNED_SHORT":return r.UNSIGNED_SHORT;case"INT":return r.INT;case"UNSIGNED_INT":return r.UNSIGNED_INT;case"FLOAT":return r.FLOAT;case"DOUBLE":return r.DOUBLE;default:throw new a("name is not a valid value.")}};var U=Object.freeze(r);export{U as a};
public/CimSDK/Workers/chunk-NGYBTBZC.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as W}from"./chunk-55FFQILS.js";import{a as Z}from"./chunk-563CJZT3.js";import{a as X}from"./chunk-LH4TAMBV.js";import{b as K,c as Q,d as V}from"./chunk-WI5KIEME.js";import{d as H}from"./chunk-ZPW6H6BB.js";import{a as U}from"./chunk-NFDMGE7Q.js";import{b as r,e as J}from"./chunk-VDZXURWO.js";import{a as B}from"./chunk-UEFEFMYS.js";import{a as u}from"./chunk-5HWP5DW7.js";import{a as P}from"./chunk-3K67FZLU.js";import{e as T}from"./chunk-55TU6MJR.js";var ii=new r(1,1,1),S=Math.cos,q=Math.sin;function x(t){t=u(t,u.EMPTY_OBJECT);let o=u(t.radii,ii),n=u(t.innerRadii,o),k=u(t.minimumClock,0),w=u(t.maximumClock,B.TWO_PI),d=u(t.minimumCone,0),l=u(t.maximumCone,B.PI),s=Math.round(u(t.stackPartitions,10)),A=Math.round(u(t.slicePartitions,8)),m=Math.round(u(t.subdivisions,128));if(s<1)throw new P("options.stackPartitions cannot be less than 1");if(A<0)throw new P("options.slicePartitions cannot be less than 0");if(m<0)throw new P("options.subdivisions must be greater than or equal to zero.");if(T(t.offsetAttribute)&&t.offsetAttribute===W.TOP)throw new P("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._radii=r.clone(o),this._innerRadii=r.clone(n),this._minimumClock=k,this._maximumClock=w,this._minimumCone=d,this._maximumCone=l,this._stackPartitions=s,this._slicePartitions=A,this._subdivisions=m,this._offsetAttribute=t.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}x.packedLength=2*r.packedLength+8;x.pack=function(t,o,n){if(!T(t))throw new P("value is required");if(!T(o))throw new P("array is required");return n=u(n,0),r.pack(t._radii,o,n),n+=r.packedLength,r.pack(t._innerRadii,o,n),n+=r.packedLength,o[n++]=t._minimumClock,o[n++]=t._maximumClock,o[n++]=t._minimumCone,o[n++]=t._maximumCone,o[n++]=t._stackPartitions,o[n++]=t._slicePartitions,o[n++]=t._subdivisions,o[n]=u(t._offsetAttribute,-1),o};var $=new r,G=new r,b={radii:$,innerRadii:G,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};x.unpack=function(t,o,n){if(!T(t))throw new P("array is required");o=u(o,0);let k=r.unpack(t,o,$);o+=r.packedLength;let w=r.unpack(t,o,G);o+=r.packedLength;let d=t[o++],l=t[o++],s=t[o++],A=t[o++],m=t[o++],f=t[o++],E=t[o++],h=t[o];return T(n)?(n._radii=r.clone(k,n._radii),n._innerRadii=r.clone(w,n._innerRadii),n._minimumClock=d,n._maximumClock=l,n._minimumCone=s,n._maximumCone=A,n._stackPartitions=m,n._slicePartitions=f,n._subdivisions=E,n._offsetAttribute=h===-1?void 0:h,n):(b.minimumClock=d,b.maximumClock=l,b.minimumCone=s,b.maximumCone=A,b.stackPartitions=m,b.slicePartitions=f,b.subdivisions=E,b.offsetAttribute=h===-1?void 0:h,new x(b))};x.createGeometry=function(t){let o=t._radii;if(o.x<=0||o.y<=0||o.z<=0)return;let n=t._innerRadii;if(n.x<=0||n.y<=0||n.z<=0)return;let k=t._minimumClock,w=t._maximumClock,d=t._minimumCone,l=t._maximumCone,s=t._subdivisions,A=J.fromCartesian3(o),m=t._slicePartitions+1,f=t._stackPartitions+1;m=Math.round(m*Math.abs(w-k)/B.TWO_PI),f=Math.round(f*Math.abs(l-d)/B.PI),m<2&&(m=2),f<2&&(f=2);let E=0,h=1,L=n.x!==o.x||n.y!==o.y||n.z!==o.z,Y=!1,j=!1;L&&(h=2,d>0&&(Y=!0,E+=m),l<Math.PI&&(j=!0,E+=m));let y=s*h*(f+m),a=new Float64Array(y*3),g=2*(y+E-(m+f)*h),_=Z.createTypedArray(y,g),i,e,v,z,c=0,C=new Array(f),O=new Array(f);for(i=0;i<f;i++)z=d+i*(l-d)/(f-1),C[i]=q(z),O[i]=S(z);let M=new Array(s),R=new Array(s);for(i=0;i<s;i++)v=k+i*(w-k)/(s-1),M[i]=q(v),R[i]=S(v);for(i=0;i<f;i++)for(e=0;e<s;e++)a[c++]=o.x*C[i]*R[e],a[c++]=o.y*C[i]*M[e],a[c++]=o.z*O[i];if(L)for(i=0;i<f;i++)for(e=0;e<s;e++)a[c++]=n.x*C[i]*R[e],a[c++]=n.y*C[i]*M[e],a[c++]=n.z*O[i];for(C.length=s,O.length=s,i=0;i<s;i++)z=d+i*(l-d)/(s-1),C[i]=q(z),O[i]=S(z);for(M.length=m,R.length=m,i=0;i<m;i++)v=k+i*(w-k)/(m-1),M[i]=q(v),R[i]=S(v);for(i=0;i<s;i++)for(e=0;e<m;e++)a[c++]=o.x*C[i]*R[e],a[c++]=o.y*C[i]*M[e],a[c++]=o.z*O[i];if(L)for(i=0;i<s;i++)for(e=0;e<m;e++)a[c++]=n.x*C[i]*R[e],a[c++]=n.y*C[i]*M[e],a[c++]=n.z*O[i];for(c=0,i=0;i<f*h;i++){let p=i*s;for(e=0;e<s-1;e++)_[c++]=p+e,_[c++]=p+e+1}let D=f*s*h;for(i=0;i<m;i++)for(e=0;e<s-1;e++)_[c++]=D+i+e*m,_[c++]=D+i+(e+1)*m;if(L)for(D=f*s*h+m*s,i=0;i<m;i++)for(e=0;e<s-1;e++)_[c++]=D+i+e*m,_[c++]=D+i+(e+1)*m;if(L){let p=f*s*h,N=p+s*m;if(Y)for(i=0;i<m;i++)_[c++]=p+i,_[c++]=N+i;if(j)for(p+=s*m-m,N+=s*m-m,i=0;i<m;i++)_[c++]=p+i,_[c++]=N+i}let F=new X({position:new V({componentDatatype:U.DOUBLE,componentsPerAttribute:3,values:a})});if(T(t._offsetAttribute)){let p=a.length,N=t._offsetAttribute===W.NONE?0:1,I=new Uint8Array(p/3).fill(N);F.applyOffset=new V({componentDatatype:U.UNSIGNED_BYTE,componentsPerAttribute:1,values:I})}return new Q({attributes:F,indices:_,primitiveType:K.LINES,boundingSphere:H.fromEllipsoid(A),offsetAttribute:t._offsetAttribute})};var Ci=x;export{Ci as a};
public/CimSDK/Workers/chunk-NJVIDNJ6.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{b as c,c as p,e as f}from"./chunk-VDZXURWO.js";import{a as d}from"./chunk-UEFEFMYS.js";import{a as u}from"./chunk-5HWP5DW7.js";import{a as s}from"./chunk-3K67FZLU.js";import{e as a}from"./chunk-55TU6MJR.js";function e(t){this._ellipsoid=u(t,f.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(e.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});e.mercatorAngleToGeodeticLatitude=function(t){return d.PI_OVER_TWO-2*Math.atan(Math.exp(-t))};e.geodeticLatitudeToMercatorAngle=function(t){t>e.MaximumLatitude?t=e.MaximumLatitude:t<-e.MaximumLatitude&&(t=-e.MaximumLatitude);let i=Math.sin(t);return .5*Math.log((1+i)/(1-i))};e.MaximumLatitude=e.mercatorAngleToGeodeticLatitude(Math.PI);e.prototype.project=function(t,i){let o=this._semimajorAxis,r=t.longitude*o,n=e.geodeticLatitudeToMercatorAngle(t.latitude)*o,m=t.height;return a(i)?(i.x=r,i.y=n,i.z=m,i):new c(r,n,m)};e.prototype.unproject=function(t,i){if(!a(t))throw new s("cartesian is required");let o=this._oneOverSemimajorAxis,r=t.x*o,n=e.mercatorAngleToGeodeticLatitude(t.y*o),m=t.z;return a(i)?(i.longitude=r,i.latitude=n,i.height=m,i):new p(r,n,m)};var L=e;export{L as a};
public/CimSDK/Workers/chunk-ODAW2LJE.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as u}from"./chunk-32UDSAPU.js";import{a as ee}from"./chunk-FBQDLPON.js";import{a as fe}from"./chunk-LH4TAMBV.js";import{b as ae,c as ce,d as W}from"./chunk-WI5KIEME.js";import{b as E,d as re}from"./chunk-ZPW6H6BB.js";import{a as C,b as O,f as N}from"./chunk-HMXXHGCW.js";import{a as J}from"./chunk-NFDMGE7Q.js";import{b as o,f as H}from"./chunk-VDZXURWO.js";import{a as b}from"./chunk-UEFEFMYS.js";import{a as y}from"./chunk-5HWP5DW7.js";import{a as w,b as P}from"./chunk-3K67FZLU.js";import{e as c}from"./chunk-55TU6MJR.js";function R(e){this.planes=y(e,[])}var Z=[new o,new o,new o];o.clone(o.UNIT_X,Z[0]);o.clone(o.UNIT_Y,Z[1]);o.clone(o.UNIT_Z,Z[2]);var A=new o,Pe=new o,se=new ee(new o(1,0,0),0);R.fromBoundingSphere=function(e,n){if(!c(e))throw new w("boundingSphere is required.");c(n)||(n=new R);let i=Z.length,f=n.planes;f.length=2*i;let h=e.center,m=e.radius,l=0;for(let g=0;g<i;++g){let r=Z[g],s=f[l],d=f[l+1];c(s)||(s=f[l]=new C),c(d)||(d=f[l+1]=new C),o.multiplyByScalar(r,-m,A),o.add(h,A,A),s.x=r.x,s.y=r.y,s.z=r.z,s.w=-o.dot(r,A),o.multiplyByScalar(r,m,A),o.add(h,A,A),d.x=-r.x,d.y=-r.y,d.z=-r.z,d.w=-o.dot(o.negate(r,Pe),A),l+=2}return n};R.prototype.computeVisibility=function(e){if(!c(e))throw new w("boundingVolume is required.");let n=this.planes,i=!1;for(let f=0,h=n.length;f<h;++f){let m=e.intersectPlane(ee.fromCartesian4(n[f],se));if(m===E.OUTSIDE)return E.OUTSIDE;m===E.INTERSECTING&&(i=!0)}return i?E.INTERSECTING:E.INSIDE};R.prototype.computeVisibilityWithPlaneMask=function(e,n){if(!c(e))throw new w("boundingVolume is required.");if(!c(n))throw new w("parentPlaneMask is required.");if(n===R.MASK_OUTSIDE||n===R.MASK_INSIDE)return n;let i=R.MASK_INSIDE,f=this.planes;for(let h=0,m=f.length;h<m;++h){let l=h<31?1<<h:0;if(h<31&&!(n&l))continue;let g=e.intersectPlane(ee.fromCartesian4(f[h],se));if(g===E.OUTSIDE)return R.MASK_OUTSIDE;g===E.INTERSECTING&&(i|=l)}return i};R.MASK_OUTSIDE=4294967295;R.MASK_INSIDE=0;R.MASK_INDETERMINATE=2147483647;var Q=R;function V(e){e=y(e,y.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=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this._cullingVolume=new Q,this._orthographicMatrix=new O}function he(e){if(!c(e.right)||!c(e.left)||!c(e.top)||!c(e.bottom)||!c(e.near)||!c(e.far))throw new w("right, left, top, bottom, near, or far parameters are not set.");if(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far){if(e.left>e.right)throw new w("right must be greater than left.");if(e.bottom>e.top)throw new w("top must be greater than bottom.");if(e.near<=0||e.near>e.far)throw new w("near must be greater than zero and less than 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=O.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix)}}Object.defineProperties(V.prototype,{projectionMatrix:{get:function(){return he(this),this._orthographicMatrix}}});var Oe=new o,ze=new o,Te=new o,ne=new o;V.prototype.computeCullingVolume=function(e,n,i){if(!c(e))throw new w("position is required.");if(!c(n))throw new w("direction is required.");if(!c(i))throw new w("up is required.");let f=this._cullingVolume.planes,h=this.top,m=this.bottom,l=this.right,g=this.left,r=this.near,s=this.far,d=o.cross(n,i,Oe);o.normalize(d,d);let _=ze;o.multiplyByScalar(n,r,_),o.add(e,_,_);let p=Te;o.multiplyByScalar(d,g,p),o.add(_,p,p);let t=f[0];return c(t)||(t=f[0]=new C),t.x=d.x,t.y=d.y,t.z=d.z,t.w=-o.dot(d,p),o.multiplyByScalar(d,l,p),o.add(_,p,p),t=f[1],c(t)||(t=f[1]=new C),t.x=-d.x,t.y=-d.y,t.z=-d.z,t.w=-o.dot(o.negate(d,ne),p),o.multiplyByScalar(i,m,p),o.add(_,p,p),t=f[2],c(t)||(t=f[2]=new C),t.x=i.x,t.y=i.y,t.z=i.z,t.w=-o.dot(i,p),o.multiplyByScalar(i,h,p),o.add(_,p,p),t=f[3],c(t)||(t=f[3]=new C),t.x=-i.x,t.y=-i.y,t.z=-i.z,t.w=-o.dot(o.negate(i,ne),p),t=f[4],c(t)||(t=f[4]=new C),t.x=n.x,t.y=n.y,t.z=n.z,t.w=-o.dot(n,_),o.multiplyByScalar(n,s,p),o.add(e,p,p),t=f[5],c(t)||(t=f[5]=new C),t.x=-n.x,t.y=-n.y,t.z=-n.z,t.w=-o.dot(o.negate(n,ne),p),this._cullingVolume};V.prototype.getPixelDimensions=function(e,n,i,f,h){if(he(this),!c(e)||!c(n))throw new w("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new w("drawingBufferWidth must be greater than zero.");if(n<=0)throw new w("drawingBufferHeight must be greater than zero.");if(!c(i))throw new w("distance is required.");if(!c(f))throw new w("pixelRatio is required.");if(f<=0)throw new w("pixelRatio must be greater than zero.");if(!c(h))throw new w("A result object is required.");let m=this.right-this.left,l=this.top-this.bottom,g=f*m/e,r=f*l/n;return h.x=g,h.y=r,h};V.prototype.clone=function(e){return c(e)||(e=new V),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};V.prototype.equals=function(e){return c(e)&&e instanceof V&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};V.prototype.equalsEpsilon=function(e,n,i){return e===this||c(e)&&e instanceof V&&b.equalsEpsilon(this.right,e.right,n,i)&&b.equalsEpsilon(this.left,e.left,n,i)&&b.equalsEpsilon(this.top,e.top,n,i)&&b.equalsEpsilon(this.bottom,e.bottom,n,i)&&b.equalsEpsilon(this.near,e.near,n,i)&&b.equalsEpsilon(this.far,e.far,n,i)};var pe=V;function v(e){e=y(e,y.EMPTY_OBJECT),this._offCenterFrustum=new pe,this.width=e.width,this._width=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far}v.packedLength=4;v.pack=function(e,n,i){return P.typeOf.object("value",e),P.defined("array",n),i=y(i,0),n[i++]=e.width,n[i++]=e.aspectRatio,n[i++]=e.near,n[i]=e.far,n};v.unpack=function(e,n,i){return P.defined("array",e),n=y(n,0),c(i)||(i=new v),i.width=e[n++],i.aspectRatio=e[n++],i.near=e[n++],i.far=e[n],i};function B(e){if(!c(e.width)||!c(e.aspectRatio)||!c(e.near)||!c(e.far))throw new w("width, aspectRatio, near, or far parameters are not set.");let n=e._offCenterFrustum;if(e.width!==e._width||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far){if(e.aspectRatio<0)throw new w("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new w("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;let i=1/e.aspectRatio;n.right=e.width*.5,n.left=-n.right,n.top=i*n.right,n.bottom=-n.top,n.near=e.near,n.far=e.far}}Object.defineProperties(v.prototype,{projectionMatrix:{get:function(){return B(this),this._offCenterFrustum.projectionMatrix}},offCenterFrustum:{get:function(){return B(this),this._offCenterFrustum}}});v.prototype.computeCullingVolume=function(e,n,i){return B(this),this._offCenterFrustum.computeCullingVolume(e,n,i)};v.prototype.getPixelDimensions=function(e,n,i,f,h){return B(this),this._offCenterFrustum.getPixelDimensions(e,n,i,f,h)};v.prototype.clone=function(e){return c(e)||(e=new v),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};v.prototype.equals=function(e){return!c(e)||!(e instanceof v)?!1:(B(this),B(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};v.prototype.equalsEpsilon=function(e,n,i){return!c(e)||!(e instanceof v)?!1:(B(this),B(e),b.equalsEpsilon(this.width,e.width,n,i)&&b.equalsEpsilon(this.aspectRatio,e.aspectRatio,n,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,n,i))};var L=v;function S(e){e=y(e,y.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=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this.farForTileset=y(e.farForTileset,5e8),this._farForTileset=this.farForTileset,this._cullingVolumeForTileset=new Q,this._cullingVolume=new Q,this._perspectiveMatrix=new O,this._infinitePerspective=new O}function ie(e){if(!c(e.right)||!c(e.left)||!c(e.top)||!c(e.bottom)||!c(e.near)||!c(e.far))throw new w("right, left, top, bottom, near, or far parameters are not set.");let{top:n,bottom:i,right:f,left:h,near:m,far:l}=e;if(n!==e._top||i!==e._bottom||h!==e._left||f!==e._right||m!==e._near||l!==e._far){if(e.near<=0||e.near>e.far)throw new w("near must be greater than zero and less than far.");if(e._left=h,e._right=f,e._top=n,e._bottom=i,e._near=m,e._far=l,e._perspectiveMatrix=O.computePerspectiveOffCenter(h,f,i,n,m,l,e._perspectiveMatrix),e._infinitePerspective=O.computeInfinitePerspectiveOffCenter(h,f,i,n,m,e._infinitePerspective),e._clipPlane){let r=e._clipPlane;e._perspectiveMatrix=le(e._perspectiveMatrix,r),e._infinitePerspective=le(e._infinitePerspective,r)}}}var $=new C,D=new C;function le(e,n){C.clone(n,D),$.x=b.sign(D.x)+e[8]/e[0],$.y=b.sign(D.y)+e[9]/e[5],$.z=-1,$.w=(1+e[10])/e[14];let i=2/C.dot(D,$);return C.multiplyByScalar(D,i,D),e[2]=D.x,e[6]=D.y,e[10]=D.z+1,e[14]=D.w,e}Object.defineProperties(S.prototype,{projectionMatrix:{get:function(){return ie(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return ie(this),this._infinitePerspective}},clipPlane:{get:function(){return this._clipPlane},set:function(e){this._clipPlane=e}}});var we=new o,de=new o,_e=new o,me=new o;S.prototype.computeCullingVolume=function(e,n,i){if(!c(e))throw new w("position is required.");if(!c(n))throw new w("direction is required.");if(!c(i))throw new w("up is required.");let f=this._cullingVolume.planes,h=this.top,m=this.bottom,l=this.right,g=this.left,r=this.near,s=this.far,d=o.cross(n,i,we),_=de;o.multiplyByScalar(n,r,_),o.add(e,_,_);let p=_e;o.multiplyByScalar(n,s,p),o.add(e,p,p);let t=me;o.multiplyByScalar(d,g,t),o.add(_,t,t),o.subtract(t,e,t),o.normalize(t,t),o.cross(t,i,t),o.normalize(t,t);let a=f[0];return c(a)||(a=f[0]=new C),a.x=t.x,a.y=t.y,a.z=t.z,a.w=-o.dot(t,e),o.multiplyByScalar(d,l,t),o.add(_,t,t),o.subtract(t,e,t),o.cross(i,t,t),o.normalize(t,t),a=f[1],c(a)||(a=f[1]=new C),a.x=t.x,a.y=t.y,a.z=t.z,a.w=-o.dot(t,e),o.multiplyByScalar(i,m,t),o.add(_,t,t),o.subtract(t,e,t),o.cross(d,t,t),o.normalize(t,t),a=f[2],c(a)||(a=f[2]=new C),a.x=t.x,a.y=t.y,a.z=t.z,a.w=-o.dot(t,e),o.multiplyByScalar(i,h,t),o.add(_,t,t),o.subtract(t,e,t),o.cross(t,d,t),o.normalize(t,t),a=f[3],c(a)||(a=f[3]=new C),a.x=t.x,a.y=t.y,a.z=t.z,a.w=-o.dot(t,e),a=f[4],c(a)||(a=f[4]=new C),a.x=n.x,a.y=n.y,a.z=n.z,a.w=-o.dot(n,_),o.negate(n,t),a=f[5],c(a)||(a=f[5]=new C),a.x=t.x,a.y=t.y,a.z=t.z,a.w=-o.dot(t,p),this._cullingVolume};S.prototype.computeCullingVolumeForTileset=function(e,n,i){if(!c(e))throw new w("position is required.");if(!c(n))throw new w("direction is required.");if(!c(i))throw new w("up is required.");let f=this._cullingVolumeForTileset.planes,h=this.top,m=this.bottom,l=this.right,g=this.left,r=this.near,s=this.farForTileset,d=o.cross(n,i,we),_=de;o.multiplyByScalar(n,r,_),o.add(e,_,_);let p=_e;o.multiplyByScalar(n,s,p),o.add(e,p,p);let t=me;o.multiplyByScalar(d,g,t),o.add(_,t,t),o.subtract(t,e,t),o.normalize(t,t),o.cross(t,i,t),o.normalize(t,t);let a=f[0];return c(a)||(a=f[0]=new C),a.x=t.x,a.y=t.y,a.z=t.z,a.w=-o.dot(t,e),o.multiplyByScalar(d,l,t),o.add(_,t,t),o.subtract(t,e,t),o.cross(i,t,t),o.normalize(t,t),a=f[1],c(a)||(a=f[1]=new C),a.x=t.x,a.y=t.y,a.z=t.z,a.w=-o.dot(t,e),o.multiplyByScalar(i,m,t),o.add(_,t,t),o.subtract(t,e,t),o.cross(d,t,t),o.normalize(t,t),a=f[2],c(a)||(a=f[2]=new C),a.x=t.x,a.y=t.y,a.z=t.z,a.w=-o.dot(t,e),o.multiplyByScalar(i,h,t),o.add(_,t,t),o.subtract(t,e,t),o.cross(t,d,t),o.normalize(t,t),a=f[3],c(a)||(a=f[3]=new C),a.x=t.x,a.y=t.y,a.z=t.z,a.w=-o.dot(t,e),a=f[4],c(a)||(a=f[4]=new C),a.x=n.x,a.y=n.y,a.z=n.z,a.w=-o.dot(n,_),o.negate(n,t),a=f[5],c(a)||(a=f[5]=new C),a.x=t.x,a.y=t.y,a.z=t.z,a.w=-o.dot(t,p),this._cullingVolumeForTileset};S.prototype.getPixelDimensions=function(e,n,i,f,h){if(ie(this),!c(e)||!c(n))throw new w("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new w("drawingBufferWidth must be greater than zero.");if(n<=0)throw new w("drawingBufferHeight must be greater than zero.");if(!c(i))throw new w("distance is required.");if(!c(f))throw new w("pixelRatio is required");if(f<=0)throw new w("pixelRatio must be greater than zero.");if(!c(h))throw new w("A result object is required.");let m=1/this.near,l=this.top*m,g=2*f*i*l/n;l=this.right*m;let r=2*f*i*l/e;return h.x=r,h.y=g,h};S.prototype.clone=function(e){return c(e)||(e=new S),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.clipPlane=this.clipPlane,e};S.prototype.equals=function(e){return c(e)&&e instanceof S&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far};S.prototype.equalsEpsilon=function(e,n,i){return e===this||c(e)&&e instanceof S&&b.equalsEpsilon(this.right,e.right,n,i)&&b.equalsEpsilon(this.left,e.left,n,i)&&b.equalsEpsilon(this.top,e.top,n,i)&&b.equalsEpsilon(this.bottom,e.bottom,n,i)&&b.equalsEpsilon(this.near,e.near,n,i)&&b.equalsEpsilon(this.far,e.far,n,i)};var ye=S;function z(e){e=y(e,y.EMPTY_OBJECT),this._offCenterFrustum=new ye,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=y(e.near,1),this._near=this.near,this.far=y(e.far,5e8),this._far=this.far,this.farForTileset=y(e.farForTileset,5e8),this._farForTileset=this.farForTileset,this.xOffset=y(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=y(e.yOffset,0),this._yOffset=this.yOffset}z.packedLength=6;z.pack=function(e,n,i){return P.typeOf.object("value",e),P.defined("array",n),i=y(i,0),n[i++]=e.fov,n[i++]=e.aspectRatio,n[i++]=e.near,n[i++]=e.far,n[i++]=e.xOffset,n[i]=e.yOffset,n};z.unpack=function(e,n,i){return P.defined("array",e),n=y(n,0),c(i)||(i=new z),i.fov=e[n++],i.aspectRatio=e[n++],i.near=e[n++],i.far=e[n++],i.xOffset=e[n++],i.yOffset=e[n],i};function q(e){if(!c(e.fov)||!c(e.aspectRatio)||!c(e.near)||!c(e.far))throw new w("fov, aspectRatio, near, or far parameters are not set.");if(!(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.farForTileset!==e._farForTileset||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset))return;if(P.typeOf.number.greaterThanOrEquals("fov",e.fov,0),P.typeOf.number.lessThan("fov",e.fov,Math.PI),P.typeOf.number.greaterThanOrEquals("aspectRatio",e.aspectRatio,0),P.typeOf.number.greaterThanOrEquals("near",e.near,0),e.near>e.far)throw new w("near must be less than far.");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._farForTileset=e.farForTileset,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset;let i=e._offCenterFrustum;i.top=e.near*Math.tan(.5*e._fovy),i.bottom=-i.top,i.right=e.aspectRatio*i.top,i.left=-i.right,i.near=e.near,i.far=e.far,i.farForTileset=e.farForTileset,i.right+=e.xOffset,i.left+=e.xOffset,i.top+=e.yOffset,i.bottom+=e.yOffset}Object.defineProperties(z.prototype,{projectionMatrix:{get:function(){return q(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return q(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return q(this),this._fovy}},sseDenominator:{get:function(){return q(this),this._sseDenominator}},offCenterFrustum:{get:function(){return q(this),this._offCenterFrustum}}});z.prototype.computeCullingVolume=function(e,n,i){return q(this),this._offCenterFrustum.computeCullingVolume(e,n,i)};z.prototype.computeCullingVolumeForTileset=function(e,n,i){return q(this),this._offCenterFrustum.computeCullingVolumeForTileset(e,n,i)};z.prototype.getPixelDimensions=function(e,n,i,f,h){return q(this),this._offCenterFrustum.getPixelDimensions(e,n,i,f,h)};z.prototype.clone=function(e){return c(e)||(e=new z),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};z.prototype.equals=function(e){return!c(e)||!(e instanceof z)?!1:(q(this),q(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))};z.prototype.equalsEpsilon=function(e,n,i){return!c(e)||!(e instanceof z)?!1:(q(this),q(e),b.equalsEpsilon(this.fov,e.fov,n,i)&&b.equalsEpsilon(this.aspectRatio,e.aspectRatio,n,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,n,i))};var j=z;var te=0,xe=1;function Y(e){P.typeOf.object("options",e),P.typeOf.object("options.frustum",e.frustum),P.typeOf.object("options.origin",e.origin),P.typeOf.object("options.orientation",e.orientation);let n=e.frustum,i=e.orientation,f=e.origin,h=y(e.vertexFormat,u.DEFAULT),m=y(e._drawNearPlane,!0),l,g;n instanceof j?(l=te,g=j.packedLength):n instanceof L&&(l=xe,g=L.packedLength),this._frustumType=l,this._frustum=n.clone(),this._origin=o.clone(f),this._orientation=N.clone(i),this._drawNearPlane=m,this._vertexFormat=h,this._workerName="createFrustumGeometry",this.packedLength=2+g+o.packedLength+N.packedLength+u.packedLength}Y.pack=function(e,n,i){P.typeOf.object("value",e),P.defined("array",n),i=y(i,0);let f=e._frustumType,h=e._frustum;return n[i++]=f,f===te?(j.pack(h,n,i),i+=j.packedLength):(L.pack(h,n,i),i+=L.packedLength),o.pack(e._origin,n,i),i+=o.packedLength,N.pack(e._orientation,n,i),i+=N.packedLength,u.pack(e._vertexFormat,n,i),i+=u.packedLength,n[i]=e._drawNearPlane?1:0,n};var ve=new j,Re=new L,qe=new N,Se=new o,ke=new u;Y.unpack=function(e,n,i){P.defined("array",e),n=y(n,0);let f=e[n++],h;f===te?(h=j.unpack(e,n,ve),n+=j.packedLength):(h=L.unpack(e,n,Re),n+=L.packedLength);let m=o.unpack(e,n,Se);n+=o.packedLength;let l=N.unpack(e,n,qe);n+=N.packedLength;let g=u.unpack(e,n,ke);n+=u.packedLength;let r=e[n]===1;if(!c(i))return new Y({frustum:h,origin:m,orientation:l,vertexFormat:g,_drawNearPlane:r});let s=f===i._frustumType?i._frustum:void 0;return i._frustum=h.clone(s),i._frustumType=f,i._origin=o.clone(m,i._origin),i._orientation=N.clone(l,i._orientation),i._vertexFormat=u.clone(g,i._vertexFormat),i._drawNearPlane=r,i};function X(e,n,i,f,h,m,l,g){let r=e/3*2;for(let s=0;s<4;++s)c(n)&&(n[e]=m.x,n[e+1]=m.y,n[e+2]=m.z),c(i)&&(i[e]=l.x,i[e+1]=l.y,i[e+2]=l.z),c(f)&&(f[e]=g.x,f[e+1]=g.y,f[e+2]=g.z),e+=3;h[r]=0,h[r+1]=0,h[r+2]=1,h[r+3]=0,h[r+4]=1,h[r+5]=1,h[r+6]=0,h[r+7]=1}var Ve=new H,De=new O,oe=new O,ge=new o,Ce=new o,Fe=new o,Me=new o,Ne=new o,ue=new o,U=new Array(3),I=new Array(4);I[0]=new C(-1,-1,1,1);I[1]=new C(1,-1,1,1);I[2]=new C(1,1,1,1);I[3]=new C(-1,1,1,1);var be=new Array(4);for(let e=0;e<4;++e)be[e]=new C;Y._computeNearFarPlanes=function(e,n,i,f,h,m,l,g){let r=H.fromQuaternion(n,Ve),s=y(m,ge),d=y(l,Ce),_=y(g,Fe);s=H.getColumn(r,0,s),d=H.getColumn(r,1,d),_=H.getColumn(r,2,_),o.normalize(s,s),o.normalize(d,d),o.normalize(_,_),o.negate(s,s);let p=O.computeView(e,_,d,s,De),t,a,k=f.projectionMatrix;if(i===te){let T=O.multiply(k,p,oe);a=O.inverse(T,oe)}else t=O.inverseTransformation(p,oe);c(a)?(U[0]=f.near,U[1]=f.far):(U[0]=0,U[1]=f.near,U[2]=f.far);for(let T=0;T<2;++T)for(let x=0;x<4;++x){let F=C.clone(I[x],be[x]);if(c(a)){F=O.multiplyByVector(a,F,F);let M=1/F.w;o.multiplyByScalar(F,M,F),o.subtract(F,e,F),o.normalize(F,F);let K=o.dot(_,F);o.multiplyByScalar(F,U[T]/K,F),o.add(F,e,F)}else{let M=f.offCenterFrustum;c(M)&&(f=M);let K=U[T],G=U[T+1];F.x=(F.x*(f.right-f.left)+f.left+f.right)*.5,F.y=(F.y*(f.top-f.bottom)+f.bottom+f.top)*.5,F.z=(F.z*(K-G)-K-G)*.5,F.w=1,O.multiplyByVector(t,F,F)}h[12*T+x*3]=F.x,h[12*T+x*3+1]=F.y,h[12*T+x*3+2]=F.z}};Y.createGeometry=function(e){let n=e._frustumType,i=e._frustum,f=e._origin,h=e._orientation,m=e._drawNearPlane,l=e._vertexFormat,g=m?6:5,r=new Float64Array(3*4*6);Y._computeNearFarPlanes(f,h,n,i,r);let s=3*4*2;r[s]=r[3*4],r[s+1]=r[3*4+1],r[s+2]=r[3*4+2],r[s+3]=r[0],r[s+4]=r[1],r[s+5]=r[2],r[s+6]=r[3*3],r[s+7]=r[3*3+1],r[s+8]=r[3*3+2],r[s+9]=r[3*7],r[s+10]=r[3*7+1],r[s+11]=r[3*7+2],s+=3*4,r[s]=r[3*5],r[s+1]=r[3*5+1],r[s+2]=r[3*5+2],r[s+3]=r[3],r[s+4]=r[4],r[s+5]=r[5],r[s+6]=r[0],r[s+7]=r[1],r[s+8]=r[2],r[s+9]=r[3*4],r[s+10]=r[3*4+1],r[s+11]=r[3*4+2],s+=3*4,r[s]=r[3],r[s+1]=r[4],r[s+2]=r[5],r[s+3]=r[3*5],r[s+4]=r[3*5+1],r[s+5]=r[3*5+2],r[s+6]=r[3*6],r[s+7]=r[3*6+1],r[s+8]=r[3*6+2],r[s+9]=r[3*2],r[s+10]=r[3*2+1],r[s+11]=r[3*2+2],s+=3*4,r[s]=r[3*2],r[s+1]=r[3*2+1],r[s+2]=r[3*2+2],r[s+3]=r[3*6],r[s+4]=r[3*6+1],r[s+5]=r[3*6+2],r[s+6]=r[3*7],r[s+7]=r[3*7+1],r[s+8]=r[3*7+2],r[s+9]=r[3*3],r[s+10]=r[3*3+1],r[s+11]=r[3*3+2],m||(r=r.subarray(3*4));let d=new fe({position:new W({componentDatatype:J.DOUBLE,componentsPerAttribute:3,values:r})});if(c(l.normal)||c(l.tangent)||c(l.bitangent)||c(l.st)){let p=c(l.normal)?new Float32Array(12*g):void 0,t=c(l.tangent)?new Float32Array(3*4*g):void 0,a=c(l.bitangent)?new Float32Array(3*4*g):void 0,k=c(l.st)?new Float32Array(2*4*g):void 0,T=ge,x=Ce,F=Fe,M=o.negate(T,Me),K=o.negate(x,Ne),G=o.negate(F,ue);s=0,m&&(X(s,p,t,a,k,G,T,x),s+=3*4),X(s,p,t,a,k,F,M,x),s+=3*4,X(s,p,t,a,k,M,G,x),s+=3*4,X(s,p,t,a,k,K,G,M),s+=3*4,X(s,p,t,a,k,T,F,x),s+=3*4,X(s,p,t,a,k,x,F,M),c(p)&&(d.normal=new W({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:p})),c(t)&&(d.tangent=new W({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:t})),c(a)&&(d.bitangent=new W({componentDatatype:J.FLOAT,componentsPerAttribute:3,values:a})),c(k)&&(d.st=new W({componentDatatype:J.FLOAT,componentsPerAttribute:2,values:k}))}let _=new Uint16Array(6*g);for(let p=0;p<g;++p){let t=p*6,a=p*4;_[t]=a,_[t+1]=a+1,_[t+2]=a+2,_[t+3]=a,_[t+4]=a+2,_[t+5]=a+3}return new ce({attributes:d,indices:_,primitiveType:ae.TRIANGLES,boundingSphere:re.fromVertices(r)})};var Lt=Y;export{L as a,j as b,Lt as c};
public/CimSDK/Workers/chunk-OOGG7EHS.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as et}from"./chunk-EZRSLM27.js";import{a as jt}from"./chunk-E5FOJ77O.js";import{b as Lt}from"./chunk-AIYLFSI3.js";import{a as Et}from"./chunk-FBQDLPON.js";import{a as j}from"./chunk-563CJZT3.js";import{a as mt,b as D,c as B,d as U}from"./chunk-WI5KIEME.js";import{a as _t,b as Ut,d as rt}from"./chunk-ZPW6H6BB.js";import{a as dt,b as H}from"./chunk-HMXXHGCW.js";import{a as k}from"./chunk-NFDMGE7Q.js";import{b as r,c as Mt,d as R,f as Ot}from"./chunk-VDZXURWO.js";import{a as N}from"./chunk-UEFEFMYS.js";import{a as K}from"./chunk-5HWP5DW7.js";import{a as I,b as pt}from"./chunk-3K67FZLU.js";import{e as f}from"./chunk-55TU6MJR.js";var Yt=new r,Zt=new r,Xt=new r;function pe(t,e,n,s,i){pt.defined("point",t),pt.defined("p0",e),pt.defined("p1",n),pt.defined("p2",s),f(i)||(i=new r);let c,o,a,p,u,d,m,l;if(f(e.z)){if(r.equalsEpsilon(t,e,N.EPSILON14))return r.clone(r.UNIT_X,i);if(r.equalsEpsilon(t,n,N.EPSILON14))return r.clone(r.UNIT_Y,i);if(r.equalsEpsilon(t,s,N.EPSILON14))return r.clone(r.UNIT_Z,i);c=r.subtract(n,e,Yt),o=r.subtract(s,e,Zt),a=r.subtract(t,e,Xt),p=r.dot(c,c),u=r.dot(c,o),d=r.dot(c,a),m=r.dot(o,o),l=r.dot(o,a)}else{if(R.equalsEpsilon(t,e,N.EPSILON14))return r.clone(r.UNIT_X,i);if(R.equalsEpsilon(t,n,N.EPSILON14))return r.clone(r.UNIT_Y,i);if(R.equalsEpsilon(t,s,N.EPSILON14))return r.clone(r.UNIT_Z,i);c=R.subtract(n,e,Yt),o=R.subtract(s,e,Zt),a=R.subtract(t,e,Xt),p=R.dot(c,c),u=R.dot(c,o),d=R.dot(c,a),m=R.dot(o,o),l=R.dot(o,a)}i.y=m*d-u*l,i.z=p*l-u*d;let h=p*m-u*u;if(h!==0)return i.y/=h,i.z/=h,i.x=1-i.y-i.z,i}var Ht=pe;var Nt={};Nt.calculateACMR=function(t){t=K(t,K.EMPTY_OBJECT);let e=t.indices,n=t.maximumIndex,s=K(t.cacheSize,24);if(!f(e))throw new I("indices is required.");let i=e.length;if(i<3||i%3!==0)throw new I("indices length must be a multiple of three.");if(n<=0)throw new I("maximumIndex must be greater than zero.");if(s<3)throw new I("cacheSize must be greater than two.");if(!f(n)){n=0;let a=0,p=e[a];for(;a<i;)p>n&&(n=p),++a,p=e[a]}let c=[];for(let a=0;a<n+1;a++)c[a]=0;let o=s+1;for(let a=0;a<i;++a)o-c[e[a]]>s&&(c[e[a]]=o,++o);return(o-s+1)/(i/3)};Nt.tipsify=function(t){t=K(t,K.EMPTY_OBJECT);let e=t.indices,n=t.maximumIndex,s=K(t.cacheSize,24),i;function c(C,z,q,V){for(;z.length>=1;){let G=z[z.length-1];if(z.splice(z.length-1,1),C[G].numLiveTriangles>0)return G}for(;i<V;){if(C[i].numLiveTriangles>0)return++i,i-1;++i}return-1}function o(C,z,q,V,G,M,J){let Y=-1,_,Pt=-1,gt=0;for(;gt<q.length;){let ft=q[gt];V[ft].numLiveTriangles&&(_=0,G-V[ft].timeStamp+2*V[ft].numLiveTriangles<=z&&(_=G-V[ft].timeStamp),(_>Pt||Pt===-1)&&(Pt=_,Y=ft)),++gt}return Y===-1?c(V,M,C,J):Y}if(!f(e))throw new I("indices is required.");let a=e.length;if(a<3||a%3!==0)throw new I("indices length must be a multiple of three.");if(n<=0)throw new I("maximumIndex must be greater than zero.");if(s<3)throw new I("cacheSize must be greater than two.");let p=0,u=0,d=e[u],m=a;if(f(n))p=n+1;else{for(;u<m;)d>p&&(p=d),++u,d=e[u];if(p===-1)return 0;++p}let l=[],h;for(h=0;h<p;h++)l[h]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};u=0;let y=0;for(;u<m;)l[e[u]].vertexTriangles.push(y),++l[e[u]].numLiveTriangles,l[e[u+1]].vertexTriangles.push(y),++l[e[u+1]].numLiveTriangles,l[e[u+2]].vertexTriangles.push(y),++l[e[u+2]].numLiveTriangles,++y,u+=3;let v=0,b=s+1;i=1;let S=[],x=[],w,A,E=0,P=[],O=a/3,L=[];for(h=0;h<O;h++)L[h]=!1;let g,T;for(;v!==-1;){S=[],A=l[v],T=A.vertexTriangles.length;for(let C=0;C<T;++C)if(y=A.vertexTriangles[C],!L[y]){L[y]=!0,u=y+y+y;for(let z=0;z<3;++z)g=e[u],S.push(g),x.push(g),P[E]=g,++E,w=l[g],--w.numLiveTriangles,b-w.timeStamp>s&&(w.timeStamp=b,++b),++u}v=o(e,s,S,l,b,x,p)}return P};var Wt=Nt;var F={};function St(t,e,n,s,i){t[e++]=n,t[e++]=s,t[e++]=s,t[e++]=i,t[e++]=i,t[e]=n}function de(t){let e=t.length,n=e/3*6,s=j.createTypedArray(e,n),i=0;for(let c=0;c<e;c+=3,i+=6)St(s,i,t[c],t[c+1],t[c+2]);return s}function me(t){let e=t.length;if(e>=3){let n=(e-2)*6,s=j.createTypedArray(e,n);St(s,0,t[0],t[1],t[2]);let i=6;for(let c=3;c<e;++c,i+=6)St(s,i,t[c-1],t[c],t[c-2]);return s}return new Uint16Array}function he(t){if(t.length>0){let e=t.length-1,n=(e-1)*6,s=j.createTypedArray(e,n),i=t[0],c=0;for(let o=1;o<e;++o,c+=6)St(s,c,i,t[o],t[o+1]);return s}return new Uint16Array}F.toWireframe=function(t){if(!f(t))throw new I("geometry is required.");let e=t.indices;if(f(e)){switch(t.primitiveType){case D.TRIANGLES:t.indices=de(e);break;case D.TRIANGLE_STRIP:t.indices=me(e);break;case D.TRIANGLE_FAN:t.indices=he(e);break;default:throw new I("geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.")}t.primitiveType=D.LINES}return t};F.createLineSegmentsForVectors=function(t,e,n){if(e=K(e,"normal"),!f(t))throw new I("geometry is required.");if(!f(t.attributes.position))throw new I("geometry.attributes.position is required.");if(!f(t.attributes[e]))throw new I(`geometry.attributes must have an attribute with the same name as the attributeName parameter, ${e}.`);n=K(n,1e4);let s=t.attributes.position.values,i=t.attributes[e].values,c=s.length,o=new Float64Array(2*c),a=0;for(let d=0;d<c;d+=3)o[a++]=s[d],o[a++]=s[d+1],o[a++]=s[d+2],o[a++]=s[d]+i[d]*n,o[a++]=s[d+1]+i[d+1]*n,o[a++]=s[d+2]+i[d+2]*n;let p,u=t.boundingSphere;return f(u)&&(p=new rt(u.center,u.radius+n)),new B({attributes:{position:new U({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:o})},primitiveType:D.LINES,boundingSphere:p})};F.createAttributeLocations=function(t){if(!f(t))throw new I("geometry is required.");let e=["position","positionHigh","positionLow","position3DHigh","position3DLow","position2DHigh","position2DLow","pickColor","normal","st","tangent","bitangent","extrudeDirection","compressedAttributes"],n=t.attributes,s={},i=0,c,o=e.length;for(c=0;c<o;++c){let a=e[c];f(n[a])&&(s[a]=i++)}for(let a in n)n.hasOwnProperty(a)&&!f(s[a])&&(s[a]=i++);return s};F.reorderForPreVertexCache=function(t){if(!f(t))throw new I("geometry is required.");let e=B.computeNumberOfVertices(t),n=t.indices;if(f(n)){let s=new Int32Array(e);for(let l=0;l<e;l++)s[l]=-1;let i=n,c=i.length,o=j.createTypedArray(e,c),a=0,p=0,u=0,d;for(;a<c;)d=s[i[a]],d!==-1?o[p]=d:(d=i[a],s[d]=u,o[p]=u,++u),++a,++p;t.indices=o;let m=t.attributes;for(let l in m)if(m.hasOwnProperty(l)&&f(m[l])&&f(m[l].values)){let h=m[l],y=h.values,v=0,b=h.componentsPerAttribute,S=k.createTypedArray(h.componentDatatype,u*b);for(;v<e;){let x=s[v];if(x!==-1)for(let w=0;w<b;w++)S[b*x+w]=y[b*v+w];++v}h.values=S}}return t};F.reorderForPostVertexCache=function(t,e){if(!f(t))throw new I("geometry is required.");let n=t.indices;if(t.primitiveType===D.TRIANGLES&&f(n)){let s=n.length,i=0;for(let c=0;c<s;c++)n[c]>i&&(i=n[c]);t.indices=Wt.tipsify({indices:n,maximumIndex:i,cacheSize:e})}return t};function $t(t){let e={};for(let n in t)if(t.hasOwnProperty(n)&&f(t[n])&&f(t[n].values)){let s=t[n];e[n]=new U({componentDatatype:s.componentDatatype,componentsPerAttribute:s.componentsPerAttribute,normalize:s.normalize,values:[]})}return e}function be(t,e,n){for(let s in e)if(e.hasOwnProperty(s)&&f(e[s])&&f(e[s].values)){let i=e[s];for(let c=0;c<i.componentsPerAttribute;++c)t[s].values.push(i.values[n*i.componentsPerAttribute+c])}}F.fitToUnsignedShortIndices=function(t){if(!f(t))throw new I("geometry is required.");if(f(t.indices)&&t.primitiveType!==D.TRIANGLES&&t.primitiveType!==D.LINES&&t.primitiveType!==D.POINTS)throw new I("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");let e=[],n=B.computeNumberOfVertices(t);if(f(t.indices)&&n>=N.SIXTY_FOUR_KILOBYTES){let s=[],i=[],c=0,o=$t(t.attributes),a=t.indices,p=a.length,u;t.primitiveType===D.TRIANGLES?u=3:t.primitiveType===D.LINES?u=2:t.primitiveType===D.POINTS&&(u=1);for(let d=0;d<p;d+=u){for(let m=0;m<u;++m){let l=a[d+m],h=s[l];f(h)||(h=c++,s[l]=h,be(o,t.attributes,l)),i.push(h)}c+u>=N.SIXTY_FOUR_KILOBYTES&&(e.push(new B({attributes:o,indices:i,primitiveType:t.primitiveType,boundingSphere:t.boundingSphere,boundingSphereCV:t.boundingSphereCV})),s=[],i=[],c=0,o=$t(t.attributes))}i.length!==0&&e.push(new B({attributes:o,indices:i,primitiveType:t.primitiveType,boundingSphere:t.boundingSphere,boundingSphereCV:t.boundingSphereCV}))}else e.push(t);return e};var Jt=new r,we=new Mt;F.projectTo2D=function(t,e,n,s,i){if(!f(t))throw new I("geometry is required.");if(!f(e))throw new I("attributeName is required.");if(!f(n))throw new I("attributeName3D is required.");if(!f(s))throw new I("attributeName2D is required.");if(!f(t.attributes[e]))throw new I(`geometry must have attribute matching the attributeName argument: ${e}.`);if(t.attributes[e].componentDatatype!==k.DOUBLE)throw new I("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");let c=t.attributes[e];i=f(i)?i:new _t;let o=i.ellipsoid,a=c.values,p=new Float64Array(a.length),u=0;for(let d=0;d<a.length;d+=3){let m=r.fromArray(a,d,Jt),l=o.cartesianToCartographic(m,we);if(!f(l))throw new I(`Could not project point (${m.x}, ${m.y}, ${m.z}) to 2D.`);let h=i.project(l,Jt);p[u++]=h.x,p[u++]=h.y,p[u++]=h.z}return t.attributes[n]=c,t.attributes[s]=new U({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:p}),delete t.attributes[e],t};var zt={high:0,low:0};F.encodeAttribute=function(t,e,n,s){if(!f(t))throw new I("geometry is required.");if(!f(e))throw new I("attributeName is required.");if(!f(n))throw new I("attributeHighName is required.");if(!f(s))throw new I("attributeLowName is required.");if(!f(t.attributes[e]))throw new I(`geometry must have attribute matching the attributeName argument: ${e}.`);if(t.attributes[e].componentDatatype!==k.DOUBLE)throw new I("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");let i=t.attributes[e],c=i.values,o=c.length,a=new Float32Array(o),p=new Float32Array(o);for(let d=0;d<o;++d)jt.encode(c[d],zt),a[d]=zt.high,p[d]=zt.low;let u=i.componentsPerAttribute;return t.attributes[n]=new U({componentDatatype:k.FLOAT,componentsPerAttribute:u,values:a}),t.attributes[s]=new U({componentDatatype:k.FLOAT,componentsPerAttribute:u,values:p}),delete t.attributes[e],t};var $=new r;function Dt(t,e){if(f(e)){let n=e.values,s=n.length;for(let i=0;i<s;i+=3)r.unpack(n,i,$),H.multiplyByPoint(t,$,$),r.pack($,n,i)}}function qt(t,e){if(f(e)){let n=e.values,s=n.length;for(let i=0;i<s;i+=3)r.unpack(n,i,$),Ot.multiplyByVector(t,$,$),$=r.normalize($,$),r.pack($,n,i)}}var vt=new H,yt=new Ot;F.transformToWorldCoordinates=function(t){if(!f(t))throw new I("instance is required.");let e=t.modelMatrix;if(H.equals(e,H.IDENTITY))return t;let n=t.geometry.attributes;Dt(e,n.position),Dt(e,n.prevPosition),Dt(e,n.nextPosition),(f(n.normal)||f(n.tangent)||f(n.bitangent))&&(H.inverse(e,vt),H.transpose(vt,vt),H.getMatrix3(vt,yt),qt(yt,n.normal),qt(yt,n.tangent),qt(yt,n.bitangent));let s=t.geometry.boundingSphere;return f(s)&&(t.geometry.boundingSphere=rt.transform(s,e,s)),t.modelMatrix=H.clone(H.IDENTITY),t};function ve(t,e){let n=t.length,s={},i=t[0][e].attributes,c;for(c in i)if(i.hasOwnProperty(c)&&f(i[c])&&f(i[c].values)){let o=i[c],a=o.values.length,p=!0;for(let u=1;u<n;++u){let d=t[u][e].attributes[c];if(!f(d)||o.componentDatatype!==d.componentDatatype||o.componentsPerAttribute!==d.componentsPerAttribute||o.normalize!==d.normalize){p=!1;break}a+=d.values.length}p&&(s[c]=new U({componentDatatype:o.componentDatatype,componentsPerAttribute:o.componentsPerAttribute,normalize:o.normalize,values:k.createTypedArray(o.componentDatatype,a)}))}return s}var ye=new r;function Vt(t,e){let n=t.length,s,i,c,o,a=t[0].modelMatrix,p=f(t[0][e].indices),u=t[0][e].primitiveType;for(i=1;i<n;++i){if(!H.equals(t[i].modelMatrix,a))throw new I("All instances must have the same modelMatrix.");if(f(t[i][e].indices)!==p)throw new I("All instance geometries must have an indices or not have one.");if(t[i][e].primitiveType!==u)throw new I("All instance geometries must have the same primitiveType.")}let d=ve(t,e),m,l,h;for(s in d)if(d.hasOwnProperty(s))for(m=d[s].values,o=0,i=0;i<n;++i)for(l=t[i][e].attributes[s].values,h=l.length,c=0;c<h;++c)m[o++]=l[c];let y;if(p){let x=0;for(i=0;i<n;++i)x+=t[i][e].indices.length;let w=B.computeNumberOfVertices(new B({attributes:d,primitiveType:D.POINTS})),A=j.createTypedArray(w,x),E=0,P=0;for(i=0;i<n;++i){let O=t[i][e].indices,L=O.length;for(o=0;o<L;++o)A[E++]=P+O[o];P+=B.computeNumberOfVertices(t[i][e])}y=A}let v=new r,b=0,S;for(i=0;i<n;++i){if(S=t[i][e].boundingSphere,!f(S)){v=void 0;break}r.add(S.center,v,v)}if(f(v))for(r.divideByScalar(v,n,v),i=0;i<n;++i){S=t[i][e].boundingSphere;let x=r.magnitude(r.subtract(S.center,v,ye))+S.radius;x>b&&(b=x)}return new B({attributes:d,indices:y,primitiveType:u,boundingSphere:f(v)?new rt(v,b):void 0})}F.combineInstances=function(t){if(!f(t)||t.length<1)throw new I("instances is required and must have length greater than zero.");let e=[],n=[],s=t.length;for(let c=0;c<s;++c){let o=t[c];f(o.geometry)?e.push(o):f(o.westHemisphereGeometry)&&f(o.eastHemisphereGeometry)&&n.push(o)}let i=[];return e.length>0&&i.push(Vt(e,"geometry")),n.length>0&&(i.push(Vt(n,"westHemisphereGeometry")),i.push(Vt(n,"eastHemisphereGeometry"))),i};var Z=new r,ht=new r,ct=new r,at=new r;F.computeNormal=function(t){if(!f(t))throw new I("geometry is required.");if(!f(t.attributes.position)||!f(t.attributes.position.values))throw new I("geometry.attributes.position.values is required.");if(!f(t.indices))throw new I("geometry.indices is required.");if(t.indices.length<2||t.indices.length%3!==0)throw new I("geometry.indices length must be greater than 0 and be a multiple of 3.");if(t.primitiveType!==D.TRIANGLES)throw new I("geometry.primitiveType must be PrimitiveType.TRIANGLES.");let e=t.indices,n=t.attributes,s=n.position.values,i=n.position.values.length/3,c=e.length,o=new Array(i),a=new Array(c/3),p=new Array(c),u;for(u=0;u<i;u++)o[u]={indexOffset:0,count:0,currentCount:0};let d=0;for(u=0;u<c;u+=3){let y=e[u],v=e[u+1],b=e[u+2],S=y*3,x=v*3,w=b*3;ht.x=s[S],ht.y=s[S+1],ht.z=s[S+2],ct.x=s[x],ct.y=s[x+1],ct.z=s[x+2],at.x=s[w],at.y=s[w+1],at.z=s[w+2],o[y].count++,o[v].count++,o[b].count++,r.subtract(ct,ht,ct),r.subtract(at,ht,at),a[d]=r.cross(ct,at,new r),d++}let m=0;for(u=0;u<i;u++)o[u].indexOffset+=m,m+=o[u].count;d=0;let l;for(u=0;u<c;u+=3){l=o[e[u]];let y=l.indexOffset+l.currentCount;p[y]=d,l.currentCount++,l=o[e[u+1]],y=l.indexOffset+l.currentCount,p[y]=d,l.currentCount++,l=o[e[u+2]],y=l.indexOffset+l.currentCount,p[y]=d,l.currentCount++,d++}let h=new Float32Array(i*3);for(u=0;u<i;u++){let y=u*3;if(l=o[u],r.clone(r.ZERO,Z),l.count>0){for(d=0;d<l.count;d++)r.add(Z,a[p[l.indexOffset+d]],Z);r.equalsEpsilon(r.ZERO,Z,N.EPSILON10)&&r.clone(a[p[l.indexOffset]],Z)}r.equalsEpsilon(r.ZERO,Z,N.EPSILON10)&&(Z.z=1),r.normalize(Z,Z),h[y]=Z.x,h[y+1]=Z.y,h[y+2]=Z.z}return t.attributes.normal=new U({componentDatatype:k.FLOAT,componentsPerAttribute:3,values:h}),t};var xe=new r,Kt=new r,Te=new r;F.computeTangentAndBitangent=function(t){if(!f(t))throw new I("geometry is required.");let e=t.attributes,n=t.indices;if(!f(e.position)||!f(e.position.values))throw new I("geometry.attributes.position.values is required.");if(!f(e.normal)||!f(e.normal.values))throw new I("geometry.attributes.normal.values is required.");if(!f(e.st)||!f(e.st.values))throw new I("geometry.attributes.st.values is required.");if(!f(n))throw new I("geometry.indices is required.");if(n.length<2||n.length%3!==0)throw new I("geometry.indices length must be greater than 0 and be a multiple of 3.");if(t.primitiveType!==D.TRIANGLES)throw new I("geometry.primitiveType must be PrimitiveType.TRIANGLES.");let s=t.attributes.position.values,i=t.attributes.normal.values,c=t.attributes.st.values,o=t.attributes.position.values.length/3,a=n.length,p=new Array(o*3),u;for(u=0;u<p.length;u++)p[u]=0;let d,m,l;for(u=0;u<a;u+=3){let v=n[u],b=n[u+1],S=n[u+2];d=v*3,m=b*3,l=S*3;let x=v*2,w=b*2,A=S*2,E=s[d],P=s[d+1],O=s[d+2],L=c[x],g=c[x+1],T=c[w+1]-g,C=c[A+1]-g,z=1/((c[w]-L)*C-(c[A]-L)*T),q=(C*(s[m]-E)-T*(s[l]-E))*z,V=(C*(s[m+1]-P)-T*(s[l+1]-P))*z,G=(C*(s[m+2]-O)-T*(s[l+2]-O))*z;p[d]+=q,p[d+1]+=V,p[d+2]+=G,p[m]+=q,p[m+1]+=V,p[m+2]+=G,p[l]+=q,p[l+1]+=V,p[l+2]+=G}let h=new Float32Array(o*3),y=new Float32Array(o*3);for(u=0;u<o;u++){d=u*3,m=d+1,l=d+2;let v=r.fromArray(i,d,xe),b=r.fromArray(p,d,Te),S=r.dot(v,b);r.multiplyByScalar(v,S,Kt),r.normalize(r.subtract(b,Kt,b),b),h[d]=b.x,h[m]=b.y,h[l]=b.z,r.normalize(r.cross(v,b,b),b),y[d]=b.x,y[m]=b.y,y[l]=b.z}return t.attributes.tangent=new U({componentDatatype:k.FLOAT,componentsPerAttribute:3,values:h}),t.attributes.bitangent=new U({componentDatatype:k.FLOAT,componentsPerAttribute:3,values:y}),t};var bt=new R,W=new r,Qt=new r,te=new r,xt=new R;F.compressVertices=function(t){if(!f(t))throw new I("geometry is required.");let e=t.attributes.extrudeDirection,n,s;if(f(e)){let P=e.values;s=P.length/3;let O=new Float32Array(s*2),L=0;for(n=0;n<s;++n){if(r.fromArray(P,n*3,W),r.equals(W,r.ZERO)){L+=2;continue}xt=et.octEncodeInRange(W,65535,xt),O[L++]=xt.x,O[L++]=xt.y}return t.attributes.compressedAttributes=new U({componentDatatype:k.FLOAT,componentsPerAttribute:2,values:O}),delete t.attributes.extrudeDirection,t}let i=t.attributes.normal,c=t.attributes.st,o=f(i),a=f(c);if(!o&&!a)return t;let p=t.attributes.tangent,u=t.attributes.bitangent,d=f(p),m=f(u),l,h,y,v;o&&(l=i.values),a&&(h=c.values),d&&(y=p.values),m&&(v=u.values),s=(o?l.length:h.length)/(o?3:2);let x=s,w=a&&o?2:1;w+=d||m?1:0,x*=w;let A=new Float32Array(x),E=0;for(n=0;n<s;++n){a&&(R.fromArray(h,n*2,bt),A[E++]=et.compressTextureCoordinates(bt));let P=n*3;o&&f(y)&&f(v)?(r.fromArray(l,P,W),r.fromArray(y,P,Qt),r.fromArray(v,P,te),et.octPack(W,Qt,te,bt),A[E++]=bt.x,A[E++]=bt.y):(o&&(r.fromArray(l,P,W),A[E++]=et.octEncodeFloat(W)),d&&(r.fromArray(y,P,W),A[E++]=et.octEncodeFloat(W)),m&&(r.fromArray(v,P,W),A[E++]=et.octEncodeFloat(W)))}return t.attributes.compressedAttributes=new U({componentDatatype:k.FLOAT,componentsPerAttribute:w,values:A}),o&&delete t.attributes.normal,a&&delete t.attributes.st,m&&delete t.attributes.bitangent,d&&delete t.attributes.tangent,t};function Ae(t){if(f(t.indices))return t;let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least three.");if(e%3!==0)throw new I("The number of vertices must be a multiple of three.");let n=j.createTypedArray(e,e);for(let s=0;s<e;++s)n[s]=s;return t.indices=n,t}function Ie(t){let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least three.");let n=j.createTypedArray(e,(e-2)*3);n[0]=1,n[1]=0,n[2]=2;let s=3;for(let i=3;i<e;++i)n[s++]=i-1,n[s++]=0,n[s++]=i;return t.indices=n,t.primitiveType=D.TRIANGLES,t}function Se(t){let e=B.computeNumberOfVertices(t);if(e<3)throw new I("The number of vertices must be at least 3.");let n=j.createTypedArray(e,(e-2)*3);n[0]=0,n[1]=1,n[2]=2,e>3&&(n[3]=0,n[4]=2,n[5]=3);let s=6;for(let i=3;i<e-1;i+=2)n[s++]=i,n[s++]=i-1,n[s++]=i+1,i+2<e&&(n[s++]=i,n[s++]=i+1,n[s++]=i+2);return t.indices=n,t.primitiveType=D.TRIANGLES,t}function Pe(t){if(f(t.indices))return t;let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");if(e%2!==0)throw new I("The number of vertices must be a multiple of 2.");let n=j.createTypedArray(e,e);for(let s=0;s<e;++s)n[s]=s;return t.indices=n,t}function ge(t){let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");let n=j.createTypedArray(e,(e-1)*2);n[0]=0,n[1]=1;let s=2;for(let i=2;i<e;++i)n[s++]=i-1,n[s++]=i;return t.indices=n,t.primitiveType=D.LINES,t}function Oe(t){let e=B.computeNumberOfVertices(t);if(e<2)throw new I("The number of vertices must be at least two.");let n=j.createTypedArray(e,e*2);n[0]=0,n[1]=1;let s=2;for(let i=2;i<e;++i)n[s++]=i-1,n[s++]=i;return n[s++]=e-1,n[s]=0,t.indices=n,t.primitiveType=D.LINES,t}function Le(t){switch(t.primitiveType){case D.TRIANGLE_FAN:return Ie(t);case D.TRIANGLE_STRIP:return Se(t);case D.TRIANGLES:return Ae(t);case D.LINE_STRIP:return ge(t);case D.LINE_LOOP:return Oe(t);case D.LINES:return Pe(t)}return t}function tt(t,e){Math.abs(t.y)<N.EPSILON6&&(e?t.y=-N.EPSILON6:t.y=N.EPSILON6)}function Ee(t,e,n){if(t.y!==0&&e.y!==0&&n.y!==0){tt(t,t.y<0),tt(e,e.y<0),tt(n,n.y<0);return}let s=Math.abs(t.y),i=Math.abs(e.y),c=Math.abs(n.y),o;s>i?s>c?o=N.sign(t.y):o=N.sign(n.y):i>c?o=N.sign(e.y):o=N.sign(n.y);let a=o<0;tt(t,a),tt(e,a),tt(n,a)}var ee=new r;function X(t,e,n,s){r.add(t,r.multiplyByScalar(r.subtract(e,t,ee),t.y/(t.y-e.y),ee),n),r.clone(n,s),tt(n,!0),tt(s,!1)}var nt=new r,it=new r,st=new r,ot=new r,Rt={positions:new Array(7),indices:new Array(3*3)};function Ne(t,e,n){if(t.x>=0||e.x>=0||n.x>=0)return;Ee(t,e,n);let s=t.y<0,i=e.y<0,c=n.y<0,o=0;o+=s?1:0,o+=i?1:0,o+=c?1:0;let a=Rt.indices;o===1?(a[1]=3,a[2]=4,a[5]=6,a[7]=6,a[8]=5,s?(X(t,e,nt,st),X(t,n,it,ot),a[0]=0,a[3]=1,a[4]=2,a[6]=1):i?(X(e,n,nt,st),X(e,t,it,ot),a[0]=1,a[3]=2,a[4]=0,a[6]=2):c&&(X(n,t,nt,st),X(n,e,it,ot),a[0]=2,a[3]=0,a[4]=1,a[6]=0)):o===2&&(a[2]=4,a[4]=4,a[5]=3,a[7]=5,a[8]=6,s?i?c||(X(n,t,nt,st),X(n,e,it,ot),a[0]=0,a[1]=1,a[3]=0,a[6]=2):(X(e,n,nt,st),X(e,t,it,ot),a[0]=2,a[1]=0,a[3]=2,a[6]=1):(X(t,e,nt,st),X(t,n,it,ot),a[0]=1,a[1]=2,a[3]=1,a[6]=0));let p=Rt.positions;return p[0]=t,p[1]=e,p[2]=n,p.length=3,(o===1||o===2)&&(p[3]=nt,p[4]=it,p[5]=st,p[6]=ot,p.length=7),Rt}function ne(t,e){let n=t.attributes;if(n.position.values.length===0)return;for(let i in n)if(n.hasOwnProperty(i)&&f(n[i])&&f(n[i].values)){let c=n[i];c.values=k.createTypedArray(c.componentDatatype,c.values)}let s=B.computeNumberOfVertices(t);return t.indices=j.createTypedArray(s,t.indices),e&&(t.boundingSphere=rt.fromVertices(n.position.values)),t}function lt(t){let e=t.attributes,n={};for(let s in e)if(e.hasOwnProperty(s)&&f(e[s])&&f(e[s].values)){let i=e[s];n[s]=new U({componentDatatype:i.componentDatatype,componentsPerAttribute:i.componentsPerAttribute,normalize:i.normalize,values:[]})}return new B({attributes:n,indices:[],primitiveType:t.primitiveType})}function kt(t,e,n){let s=f(t.geometry.boundingSphere);e=ne(e,s),n=ne(n,s),f(n)&&!f(e)?t.geometry=n:!f(n)&&f(e)?t.geometry=e:(t.westHemisphereGeometry=e,t.eastHemisphereGeometry=n,t.geometry=void 0)}function Ft(t,e){let n=new t,s=new t,i=new t;return function(c,o,a,p,u,d,m,l){let h=t.fromArray(u,c*e,n),y=t.fromArray(u,o*e,s),v=t.fromArray(u,a*e,i);t.multiplyByScalar(h,p.x,h),t.multiplyByScalar(y,p.y,y),t.multiplyByScalar(v,p.z,v);let b=t.add(h,y,h);t.add(b,v,b),l&&t.normalize(b,b),t.pack(b,d,m*e)}}var ze=Ft(dt,4),It=Ft(r,3),ae=Ft(R,2),De=function(t,e,n,s,i,c,o){let a=i[t]*s.x,p=i[e]*s.y,u=i[n]*s.z;c[o]=a+p+u>N.EPSILON6?1:0},wt=new r,Gt=new r,Ct=new r,qe=new r;function Tt(t,e,n,s,i,c,o,a,p,u,d,m,l,h,y,v){if(!f(c)&&!f(o)&&!f(a)&&!f(p)&&!f(u)&&h===0)return;let b=r.fromArray(i,t*3,wt),S=r.fromArray(i,e*3,Gt),x=r.fromArray(i,n*3,Ct),w=Ht(s,b,S,x,qe);if(f(w)){if(f(c)&&It(t,e,n,w,c,m.normal.values,v,!0),f(u)){let A=r.fromArray(u,t*3,wt),E=r.fromArray(u,e*3,Gt),P=r.fromArray(u,n*3,Ct);r.multiplyByScalar(A,w.x,A),r.multiplyByScalar(E,w.y,E),r.multiplyByScalar(P,w.z,P);let O;!r.equals(A,r.ZERO)||!r.equals(E,r.ZERO)||!r.equals(P,r.ZERO)?(O=r.add(A,E,A),r.add(O,P,O),r.normalize(O,O)):(O=wt,O.x=0,O.y=0,O.z=0),r.pack(O,m.extrudeDirection.values,v*3)}if(f(d)&&De(t,e,n,w,d,m.applyOffset.values,v),f(o)&&It(t,e,n,w,o,m.tangent.values,v,!0),f(a)&&It(t,e,n,w,a,m.bitangent.values,v,!0),f(p)&&ae(t,e,n,w,p,m.st.values,v),h>0)for(let A=0;A<h;A++){let E=l[A];Ve(t,e,n,w,v,y[E],m[E])}}}function Ve(t,e,n,s,i,c,o){let a=c.componentsPerAttribute,p=c.values,u=o.values;switch(a){case 4:ze(t,e,n,s,p,u,i,!1);break;case 3:It(t,e,n,s,p,u,i,!1);break;case 2:ae(t,e,n,s,p,u,i,!1);break;default:u[i]=p[t]*s.x+p[e]*s.y+p[n]*s.z}}function Q(t,e,n,s,i,c){let o=t.position.values.length/3;if(i!==-1){let a=s[i],p=n[a];return p===-1?(n[a]=o,t.position.values.push(c.x,c.y,c.z),e.push(o),o):(e.push(p),p)}return t.position.values.push(c.x,c.y,c.z),e.push(o),o}var Re={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function ie(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=f(n.normal)?n.normal.values:void 0,c=f(n.bitangent)?n.bitangent.values:void 0,o=f(n.tangent)?n.tangent.values:void 0,a=f(n.st)?n.st.values:void 0,p=f(n.extrudeDirection)?n.extrudeDirection.values:void 0,u=f(n.applyOffset)?n.applyOffset.values:void 0,d=e.indices,m=[];for(let O in n)n.hasOwnProperty(O)&&!Re[O]&&f(n[O])&&m.push(O);let l=m.length,h=lt(e),y=lt(e),v,b,S,x,w,A=[];A.length=s.length/3;let E=[];for(E.length=s.length/3,w=0;w<A.length;++w)A[w]=-1,E[w]=-1;let P=d.length;for(w=0;w<P;w+=3){let O=d[w],L=d[w+1],g=d[w+2],T=r.fromArray(s,O*3),C=r.fromArray(s,L*3),z=r.fromArray(s,g*3),q=Ne(T,C,z);if(f(q)&&q.positions.length>3){let V=q.positions,G=q.indices,M=G.length;for(let J=0;J<M;++J){let Y=G[J],_=V[Y];_.y<0?(v=y.attributes,b=y.indices,S=A):(v=h.attributes,b=h.indices,S=E),x=Q(v,b,S,d,Y<3?w+Y:-1,_),Tt(O,L,g,_,s,i,o,c,a,p,u,v,m,l,n,x)}}else f(q)&&(T=q.positions[0],C=q.positions[1],z=q.positions[2]),T.y<0?(v=y.attributes,b=y.indices,S=A):(v=h.attributes,b=h.indices,S=E),x=Q(v,b,S,d,w,T),Tt(O,L,g,T,s,i,o,c,a,p,u,v,m,l,n,x),x=Q(v,b,S,d,w+1,C),Tt(O,L,g,C,s,i,o,c,a,p,u,v,m,l,n,x),x=Q(v,b,S,d,w+2,z),Tt(O,L,g,z,s,i,o,c,a,p,u,v,m,l,n,x)}kt(t,y,h)}var ue=Et.fromPointNormal(r.ZERO,r.UNIT_Y),Ge=new r,Ce=new r;function ut(t,e,n,s,i,c,o){if(!f(o))return;let a=r.fromArray(s,t*3,wt);r.equalsEpsilon(a,n,N.EPSILON10)?c.applyOffset.values[i]=o[t]:c.applyOffset.values[i]=o[e]}function se(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=f(n.applyOffset)?n.applyOffset.values:void 0,c=e.indices,o=lt(e),a=lt(e),p,u=c.length,d=[];d.length=s.length/3;let m=[];for(m.length=s.length/3,p=0;p<d.length;++p)d[p]=-1,m[p]=-1;for(p=0;p<u;p+=2){let l=c[p],h=c[p+1],y=r.fromArray(s,l*3,wt),v=r.fromArray(s,h*3,Gt),b;Math.abs(y.y)<N.EPSILON6&&(y.y<0?y.y=-N.EPSILON6:y.y=N.EPSILON6),Math.abs(v.y)<N.EPSILON6&&(v.y<0?v.y=-N.EPSILON6:v.y=N.EPSILON6);let S=o.attributes,x=o.indices,w=m,A=a.attributes,E=a.indices,P=d,O=Lt.lineSegmentPlane(y,v,ue,Ct);if(f(O)){let L=r.multiplyByScalar(r.UNIT_Y,5*N.EPSILON9,Ge);y.y<0&&(r.negate(L,L),S=a.attributes,x=a.indices,w=d,A=o.attributes,E=o.indices,P=m);let g=r.add(O,L,Ce);b=Q(S,x,w,c,p,y),ut(l,h,y,s,b,S,i),b=Q(S,x,w,c,-1,g),ut(l,h,g,s,b,S,i),r.negate(L,L),r.add(O,L,g),b=Q(A,E,P,c,-1,g),ut(l,h,g,s,b,A,i),b=Q(A,E,P,c,p+1,v),ut(l,h,v,s,b,A,i)}else{let L,g,T;y.y<0?(L=a.attributes,g=a.indices,T=d):(L=o.attributes,g=o.indices,T=m),b=Q(L,g,T,c,p,y),ut(l,h,y,s,b,L,i),b=Q(L,g,T,c,p+1,v),ut(l,h,v,s,b,L,i)}}kt(t,a,o)}var oe=new R,Be=new R,le=new r,fe=new r,Bt=new r,ke=new r,Fe=new r,Me=new r,re=new dt;function ce(t){let e=t.attributes,n=e.position.values,s=e.prevPosition.values,i=e.nextPosition.values,c=n.length;for(let o=0;o<c;o+=3){let a=r.unpack(n,o,le);if(a.x>0)continue;let p=r.unpack(s,o,fe);(a.y<0&&p.y>0||a.y>0&&p.y<0)&&(o-3>0?(s[o]=n[o-3],s[o+1]=n[o-2],s[o+2]=n[o-1]):r.pack(a,s,o));let u=r.unpack(i,o,Bt);(a.y<0&&u.y>0||a.y>0&&u.y<0)&&(o+3<c?(i[o]=n[o+3],i[o+1]=n[o+4],i[o+2]=n[o+5]):r.pack(a,i,o))}}var _e=5*N.EPSILON9,At=N.EPSILON6;function Ue(t){let e=t.geometry,n=e.attributes,s=n.position.values,i=n.prevPosition.values,c=n.nextPosition.values,o=n.expandAndWidth.values,a=f(n.st)?n.st.values:void 0,p=f(n.color)?n.color.values:void 0,u=lt(e),d=lt(e),m,l,h,y=!1,v=s.length/3;for(m=0;m<v;m+=4){let b=m,S=m+2,x=r.fromArray(s,b*3,le),w=r.fromArray(s,S*3,fe);if(Math.abs(x.y)<At)for(x.y=At*(w.y<0?-1:1),s[m*3+1]=x.y,s[(m+1)*3+1]=x.y,l=b*3;l<b*3+4*3;l+=3)i[l]=s[m*3],i[l+1]=s[m*3+1],i[l+2]=s[m*3+2];if(Math.abs(w.y)<At)for(w.y=At*(x.y<0?-1:1),s[(m+2)*3+1]=w.y,s[(m+3)*3+1]=w.y,l=b*3;l<b*3+4*3;l+=3)c[l]=s[(m+2)*3],c[l+1]=s[(m+2)*3+1],c[l+2]=s[(m+2)*3+2];let A=u.attributes,E=u.indices,P=d.attributes,O=d.indices,L=Lt.lineSegmentPlane(x,w,ue,ke);if(f(L)){y=!0;let g=r.multiplyByScalar(r.UNIT_Y,_e,Fe);x.y<0&&(r.negate(g,g),A=d.attributes,E=d.indices,P=u.attributes,O=u.indices);let T=r.add(L,g,Me);A.position.values.push(x.x,x.y,x.z,x.x,x.y,x.z),A.position.values.push(T.x,T.y,T.z),A.position.values.push(T.x,T.y,T.z),A.prevPosition.values.push(i[b*3],i[b*3+1],i[b*3+2]),A.prevPosition.values.push(i[b*3+3],i[b*3+4],i[b*3+5]),A.prevPosition.values.push(x.x,x.y,x.z,x.x,x.y,x.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),A.nextPosition.values.push(T.x,T.y,T.z),r.negate(g,g),r.add(L,g,T),P.position.values.push(T.x,T.y,T.z),P.position.values.push(T.x,T.y,T.z),P.position.values.push(w.x,w.y,w.z,w.x,w.y,w.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.prevPosition.values.push(T.x,T.y,T.z),P.nextPosition.values.push(w.x,w.y,w.z,w.x,w.y,w.z),P.nextPosition.values.push(c[S*3],c[S*3+1],c[S*3+2]),P.nextPosition.values.push(c[S*3+3],c[S*3+4],c[S*3+5]);let C=R.fromArray(o,b*2,oe),z=Math.abs(C.y);A.expandAndWidth.values.push(-1,z,1,z),A.expandAndWidth.values.push(-1,-z,1,-z),P.expandAndWidth.values.push(-1,z,1,z),P.expandAndWidth.values.push(-1,-z,1,-z);let q=r.magnitudeSquared(r.subtract(L,x,Bt));if(q/=r.magnitudeSquared(r.subtract(w,x,Bt)),f(p)){let V=dt.fromArray(p,b*4,re),G=dt.fromArray(p,S*4,re),M=N.lerp(V.x,G.x,q),J=N.lerp(V.y,G.y,q),Y=N.lerp(V.z,G.z,q),_=N.lerp(V.w,G.w,q);for(l=b*4;l<b*4+2*4;++l)A.color.values.push(p[l]);for(A.color.values.push(M,J,Y,_),A.color.values.push(M,J,Y,_),P.color.values.push(M,J,Y,_),P.color.values.push(M,J,Y,_),l=S*4;l<S*4+2*4;++l)P.color.values.push(p[l])}if(f(a)){let V=R.fromArray(a,b*2,oe),G=R.fromArray(a,(m+3)*2,Be),M=N.lerp(V.x,G.x,q);for(l=b*2;l<b*2+2*2;++l)A.st.values.push(a[l]);for(A.st.values.push(M,V.y),A.st.values.push(M,G.y),P.st.values.push(M,V.y),P.st.values.push(M,G.y),l=S*2;l<S*2+2*2;++l)P.st.values.push(a[l])}h=A.position.values.length/3-4,E.push(h,h+2,h+1),E.push(h+1,h+2,h+3),h=P.position.values.length/3-4,O.push(h,h+2,h+1),O.push(h+1,h+2,h+3)}else{let g,T;for(x.y<0?(g=d.attributes,T=d.indices):(g=u.attributes,T=u.indices),g.position.values.push(x.x,x.y,x.z),g.position.values.push(x.x,x.y,x.z),g.position.values.push(w.x,w.y,w.z),g.position.values.push(w.x,w.y,w.z),l=m*3;l<m*3+4*3;++l)g.prevPosition.values.push(i[l]),g.nextPosition.values.push(c[l]);for(l=m*2;l<m*2+4*2;++l)g.expandAndWidth.values.push(o[l]),f(a)&&g.st.values.push(a[l]);if(f(p))for(l=m*4;l<m*4+4*4;++l)g.color.values.push(p[l]);h=g.position.values.length/3-4,T.push(h,h+2,h+1),T.push(h+1,h+2,h+3)}}y&&(ce(d),ce(u)),kt(t,d,u)}F.splitLongitude=function(t){if(!f(t))throw new I("instance is required.");let e=t.geometry,n=e.boundingSphere;if(f(n)&&(n.center.x-n.radius>0||rt.intersectPlane(n,Et.ORIGIN_ZX_PLANE)!==Ut.INTERSECTING))return t;if(e.geometryType!==mt.NONE)switch(e.geometryType){case mt.POLYLINES:Ue(t);break;case mt.TRIANGLES:ie(t);break;case mt.LINES:se(t);break}else Le(e),e.primitiveType===D.TRIANGLES?ie(t):e.primitiveType===D.LINES&&se(t);return t};var gn=F;export{gn as a};
public/CimSDK/Workers/chunk-PZ34T7DL.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{e}from"./chunk-55TU6MJR.js";function t(r){this.name="RuntimeError",this.message=r;let o;try{throw new Error}catch(s){o=s.stack}this.stack=o}e(Object.create)&&(t.prototype=Object.create(Error.prototype),t.prototype.constructor=t);t.prototype.toString=function(){let r=`${this.name}: ${this.message}`;return e(this.stack)&&(r+=`
${this.stack.toString()}`),r};var c=t;export{c as a};
public/CimSDK/Workers/chunk-Q2L33INS.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{g as j}from"./chunk-VDZXURWO.js";import{a as E}from"./chunk-UEFEFMYS.js";import{a as C}from"./chunk-5HWP5DW7.js";import{b as n}from"./chunk-3K67FZLU.js";import{e as O}from"./chunk-55TU6MJR.js";function l(r,o,t){return t<0&&(t+=1),t>1&&(t-=1),t*6<1?r+(o-r)*6*t:t*2<1?o:t*3<2?r+(o-r)*(2/3-t)*6:r}function e(r,o,t,f){this.red=C(r,1),this.green=C(o,1),this.blue=C(t,1),this.alpha=C(f,1)}e.fromCartesian4=function(r,o){return n.typeOf.object("cartesian",r),O(o)?(o.red=r.x,o.green=r.y,o.blue=r.z,o.alpha=r.w,o):new e(r.x,r.y,r.z,r.w)};e.fromBytes=function(r,o,t,f,s){return r=e.byteToFloat(C(r,255)),o=e.byteToFloat(C(o,255)),t=e.byteToFloat(C(t,255)),f=e.byteToFloat(C(f,255)),O(s)?(s.red=r,s.green=o,s.blue=t,s.alpha=f,s):new e(r,o,t,f)};e.fromAlpha=function(r,o,t){return n.typeOf.object("color",r),n.typeOf.number("alpha",o),O(t)?(t.red=r.red,t.green=r.green,t.blue=r.blue,t.alpha=o,t):new e(r.red,r.green,r.blue,o)};var A,g,m;j.supportsTypedArrays()&&(A=new ArrayBuffer(4),g=new Uint32Array(A),m=new Uint8Array(A));e.fromRgba=function(r,o){return g[0]=r,e.fromBytes(m[0],m[1],m[2],m[3],o)};e.fromHsl=function(r,o,t,f,s){r=C(r,0)%1,o=C(o,0),t=C(t,0),f=C(f,1);let c=t,b=t,i=t;if(o!==0){let S;t<.5?S=t*(1+o):S=t+o-t*o;let F=2*t-S;c=l(F,S,r+1/3),b=l(F,S,r),i=l(F,S,r-1/3)}return O(s)?(s.red=c,s.green=b,s.blue=i,s.alpha=f,s):new e(c,b,i,f)};e.fromRandom=function(r,o){r=C(r,C.EMPTY_OBJECT);let t=r.red;if(!O(t)){let b=C(r.minimumRed,0),i=C(r.maximumRed,1);n.typeOf.number.lessThanOrEquals("minimumRed",b,i),t=b+E.nextRandomNumber()*(i-b)}let f=r.green;if(!O(f)){let b=C(r.minimumGreen,0),i=C(r.maximumGreen,1);n.typeOf.number.lessThanOrEquals("minimumGreen",b,i),f=b+E.nextRandomNumber()*(i-b)}let s=r.blue;if(!O(s)){let b=C(r.minimumBlue,0),i=C(r.maximumBlue,1);n.typeOf.number.lessThanOrEquals("minimumBlue",b,i),s=b+E.nextRandomNumber()*(i-b)}let c=r.alpha;if(!O(c)){let b=C(r.minimumAlpha,0),i=C(r.maximumAlpha,1);n.typeOf.number.lessThanOrEquals("minimumAlpha",b,i),c=b+E.nextRandomNumber()*(i-b)}return O(o)?(o.red=t,o.green=f,o.blue=s,o.alpha=c,o):new e(t,f,s,c)};var a=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,z=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,p=/^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i,R=/^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;e.fromCssColorString=function(r,o){n.typeOf.string("color",r),O(o)||(o=new e),r=r.trim();let t=e[r.toUpperCase()];if(O(t))return e.clone(t,o),o;let f=a.exec(r);return f!==null?(o.red=parseInt(f[1],16)/15,o.green=parseInt(f[2],16)/15,o.blue=parseInt(f[3],16)/15,o.alpha=parseInt(C(f[4],"f"),16)/15,o):(f=z.exec(r),f!==null?(o.red=parseInt(f[1],16)/255,o.green=parseInt(f[2],16)/255,o.blue=parseInt(f[3],16)/255,o.alpha=parseInt(C(f[4],"ff"),16)/255,o):(f=p.exec(r),f!==null?(o.red=parseFloat(f[1])/(f[1].substr(-1)==="%"?100:255),o.green=parseFloat(f[2])/(f[2].substr(-1)==="%"?100:255),o.blue=parseFloat(f[3])/(f[3].substr(-1)==="%"?100:255),o.alpha=parseFloat(C(f[4],"1.0")),o):(f=R.exec(r),f!==null?e.fromHsl(parseFloat(f[1])/360,parseFloat(f[2])/100,parseFloat(f[3])/100,parseFloat(C(f[4],"1.0")),o):(o=void 0,o))))};e.packedLength=4;e.pack=function(r,o,t){return n.typeOf.object("value",r),n.defined("array",o),t=C(t,0),o[t++]=r.red,o[t++]=r.green,o[t++]=r.blue,o[t]=r.alpha,o};e.unpack=function(r,o,t){return n.defined("array",r),o=C(o,0),O(t)||(t=new e),t.red=r[o++],t.green=r[o++],t.blue=r[o++],t.alpha=r[o],t};e.byteToFloat=function(r){return r/255};e.floatToByte=function(r){return r===1?255:r*256|0};e.clone=function(r,o){if(O(r))return O(o)?(o.red=r.red,o.green=r.green,o.blue=r.blue,o.alpha=r.alpha,o):new e(r.red,r.green,r.blue,r.alpha)};e.equals=function(r,o){return r===o||O(r)&&O(o)&&r.red===o.red&&r.green===o.green&&r.blue===o.blue&&r.alpha===o.alpha};e.equalsArray=function(r,o,t){return r.red===o[t]&&r.green===o[t+1]&&r.blue===o[t+2]&&r.alpha===o[t+3]};e.prototype.clone=function(r){return e.clone(this,r)};e.prototype.equals=function(r){return e.equals(this,r)};e.prototype.equalsEpsilon=function(r,o){return this===r||O(r)&&Math.abs(this.red-r.red)<=o&&Math.abs(this.green-r.green)<=o&&Math.abs(this.blue-r.blue)<=o&&Math.abs(this.alpha-r.alpha)<=o};e.prototype.toString=function(){return`(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`};e.prototype.toCssColorString=function(){let r=e.floatToByte(this.red),o=e.floatToByte(this.green),t=e.floatToByte(this.blue);return this.alpha===1?`rgb(${r},${o},${t})`:`rgba(${r},${o},${t},${this.alpha})`};e.prototype.toCssHexString=function(){let r=e.floatToByte(this.red).toString(16);r.length<2&&(r=`0${r}`);let o=e.floatToByte(this.green).toString(16);o.length<2&&(o=`0${o}`);let t=e.floatToByte(this.blue).toString(16);if(t.length<2&&(t=`0${t}`),this.alpha<1){let f=e.floatToByte(this.alpha).toString(16);return f.length<2&&(f=`0${f}`),`#${r}${o}${t}${f}`}return`#${r}${o}${t}`};e.prototype.toBytes=function(r){let o=e.floatToByte(this.red),t=e.floatToByte(this.green),f=e.floatToByte(this.blue),s=e.floatToByte(this.alpha);return O(r)?(r[0]=o,r[1]=t,r[2]=f,r[3]=s,r):[o,t,f,s]};e.prototype.toRgba=function(){return m[0]=e.floatToByte(this.red),m[1]=e.floatToByte(this.green),m[2]=e.floatToByte(this.blue),m[3]=e.floatToByte(this.alpha),g[0]};e.prototype.brighten=function(r,o){return n.typeOf.number("magnitude",r),n.typeOf.number.greaterThanOrEquals("magnitude",r,0),n.typeOf.object("result",o),r=1-r,o.red=1-(1-this.red)*r,o.green=1-(1-this.green)*r,o.blue=1-(1-this.blue)*r,o.alpha=this.alpha,o};e.prototype.darken=function(r,o){return n.typeOf.number("magnitude",r),n.typeOf.number.greaterThanOrEquals("magnitude",r,0),n.typeOf.object("result",o),r=1-r,o.red=this.red*r,o.green=this.green*r,o.blue=this.blue*r,o.alpha=this.alpha,o};e.prototype.withAlpha=function(r,o){return e.fromAlpha(this,r,o)};e.add=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red+o.red,t.green=r.green+o.green,t.blue=r.blue+o.blue,t.alpha=r.alpha+o.alpha,t};e.subtract=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red-o.red,t.green=r.green-o.green,t.blue=r.blue-o.blue,t.alpha=r.alpha-o.alpha,t};e.multiply=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red*o.red,t.green=r.green*o.green,t.blue=r.blue*o.blue,t.alpha=r.alpha*o.alpha,t};e.divide=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red/o.red,t.green=r.green/o.green,t.blue=r.blue/o.blue,t.alpha=r.alpha/o.alpha,t};e.mod=function(r,o,t){return n.typeOf.object("left",r),n.typeOf.object("right",o),n.typeOf.object("result",t),t.red=r.red%o.red,t.green=r.green%o.green,t.blue=r.blue%o.blue,t.alpha=r.alpha%o.alpha,t};e.lerp=function(r,o,t,f){return n.typeOf.object("start",r),n.typeOf.object("end",o),n.typeOf.number("t",t),n.typeOf.object("result",f),f.red=E.lerp(r.red,o.red,t),f.green=E.lerp(r.green,o.green,t),f.blue=E.lerp(r.blue,o.blue,t),f.alpha=E.lerp(r.alpha,o.alpha,t),f};e.multiplyByScalar=function(r,o,t){return n.typeOf.object("color",r),n.typeOf.number("scalar",o),n.typeOf.object("result",t),t.red=r.red*o,t.green=r.green*o,t.blue=r.blue*o,t.alpha=r.alpha*o,t};e.divideByScalar=function(r,o,t){return n.typeOf.object("color",r),n.typeOf.number("scalar",o),n.typeOf.object("result",t),t.red=r.red/o,t.green=r.green/o,t.blue=r.blue/o,t.alpha=r.alpha/o,t};e.ALICEBLUE=Object.freeze(e.fromCssColorString("#F0F8FF"));e.ANTIQUEWHITE=Object.freeze(e.fromCssColorString("#FAEBD7"));e.AQUA=Object.freeze(e.fromCssColorString("#00FFFF"));e.AQUAMARINE=Object.freeze(e.fromCssColorString("#7FFFD4"));e.AZURE=Object.freeze(e.fromCssColorString("#F0FFFF"));e.BEIGE=Object.freeze(e.fromCssColorString("#F5F5DC"));e.BISQUE=Object.freeze(e.fromCssColorString("#FFE4C4"));e.BLACK=Object.freeze(e.fromCssColorString("#000000"));e.BLANCHEDALMOND=Object.freeze(e.fromCssColorString("#FFEBCD"));e.BLUE=Object.freeze(e.fromCssColorString("#0000FF"));e.BLUEVIOLET=Object.freeze(e.fromCssColorString("#8A2BE2"));e.BROWN=Object.freeze(e.fromCssColorString("#A52A2A"));e.BURLYWOOD=Object.freeze(e.fromCssColorString("#DEB887"));e.CADETBLUE=Object.freeze(e.fromCssColorString("#5F9EA0"));e.CHARTREUSE=Object.freeze(e.fromCssColorString("#7FFF00"));e.CHOCOLATE=Object.freeze(e.fromCssColorString("#D2691E"));e.CORAL=Object.freeze(e.fromCssColorString("#FF7F50"));e.CORNFLOWERBLUE=Object.freeze(e.fromCssColorString("#6495ED"));e.CORNSILK=Object.freeze(e.fromCssColorString("#FFF8DC"));e.CRIMSON=Object.freeze(e.fromCssColorString("#DC143C"));e.CYAN=Object.freeze(e.fromCssColorString("#00FFFF"));e.DARKBLUE=Object.freeze(e.fromCssColorString("#00008B"));e.DARKCYAN=Object.freeze(e.fromCssColorString("#008B8B"));e.DARKGOLDENROD=Object.freeze(e.fromCssColorString("#B8860B"));e.DARKGRAY=Object.freeze(e.fromCssColorString("#A9A9A9"));e.DARKGREEN=Object.freeze(e.fromCssColorString("#006400"));e.DARKGREY=e.DARKGRAY;e.DARKKHAKI=Object.freeze(e.fromCssColorString("#BDB76B"));e.DARKMAGENTA=Object.freeze(e.fromCssColorString("#8B008B"));e.DARKOLIVEGREEN=Object.freeze(e.fromCssColorString("#556B2F"));e.DARKORANGE=Object.freeze(e.fromCssColorString("#FF8C00"));e.DARKORCHID=Object.freeze(e.fromCssColorString("#9932CC"));e.DARKRED=Object.freeze(e.fromCssColorString("#8B0000"));e.DARKSALMON=Object.freeze(e.fromCssColorString("#E9967A"));e.DARKSEAGREEN=Object.freeze(e.fromCssColorString("#8FBC8F"));e.DARKSLATEBLUE=Object.freeze(e.fromCssColorString("#483D8B"));e.DARKSLATEGRAY=Object.freeze(e.fromCssColorString("#2F4F4F"));e.DARKSLATEGREY=e.DARKSLATEGRAY;e.DARKTURQUOISE=Object.freeze(e.fromCssColorString("#00CED1"));e.DARKVIOLET=Object.freeze(e.fromCssColorString("#9400D3"));e.DEEPPINK=Object.freeze(e.fromCssColorString("#FF1493"));e.DEEPSKYBLUE=Object.freeze(e.fromCssColorString("#00BFFF"));e.DIMGRAY=Object.freeze(e.fromCssColorString("#696969"));e.DIMGREY=e.DIMGRAY;e.DODGERBLUE=Object.freeze(e.fromCssColorString("#1E90FF"));e.FIREBRICK=Object.freeze(e.fromCssColorString("#B22222"));e.FLORALWHITE=Object.freeze(e.fromCssColorString("#FFFAF0"));e.FORESTGREEN=Object.freeze(e.fromCssColorString("#228B22"));e.FUCHSIA=Object.freeze(e.fromCssColorString("#FF00FF"));e.GAINSBORO=Object.freeze(e.fromCssColorString("#DCDCDC"));e.GHOSTWHITE=Object.freeze(e.fromCssColorString("#F8F8FF"));e.GOLD=Object.freeze(e.fromCssColorString("#FFD700"));e.GOLDENROD=Object.freeze(e.fromCssColorString("#DAA520"));e.GRAY=Object.freeze(e.fromCssColorString("#808080"));e.GREEN=Object.freeze(e.fromCssColorString("#008000"));e.GREENYELLOW=Object.freeze(e.fromCssColorString("#ADFF2F"));e.GREY=e.GRAY;e.HONEYDEW=Object.freeze(e.fromCssColorString("#F0FFF0"));e.HOTPINK=Object.freeze(e.fromCssColorString("#FF69B4"));e.INDIANRED=Object.freeze(e.fromCssColorString("#CD5C5C"));e.INDIGO=Object.freeze(e.fromCssColorString("#4B0082"));e.IVORY=Object.freeze(e.fromCssColorString("#FFFFF0"));e.KHAKI=Object.freeze(e.fromCssColorString("#F0E68C"));e.LAVENDER=Object.freeze(e.fromCssColorString("#E6E6FA"));e.LAVENDAR_BLUSH=Object.freeze(e.fromCssColorString("#FFF0F5"));e.LAWNGREEN=Object.freeze(e.fromCssColorString("#7CFC00"));e.LEMONCHIFFON=Object.freeze(e.fromCssColorString("#FFFACD"));e.LIGHTBLUE=Object.freeze(e.fromCssColorString("#ADD8E6"));e.LIGHTCORAL=Object.freeze(e.fromCssColorString("#F08080"));e.LIGHTCYAN=Object.freeze(e.fromCssColorString("#E0FFFF"));e.LIGHTGOLDENRODYELLOW=Object.freeze(e.fromCssColorString("#FAFAD2"));e.LIGHTGRAY=Object.freeze(e.fromCssColorString("#D3D3D3"));e.LIGHTGREEN=Object.freeze(e.fromCssColorString("#90EE90"));e.LIGHTGREY=e.LIGHTGRAY;e.LIGHTPINK=Object.freeze(e.fromCssColorString("#FFB6C1"));e.LIGHTSEAGREEN=Object.freeze(e.fromCssColorString("#20B2AA"));e.LIGHTSKYBLUE=Object.freeze(e.fromCssColorString("#87CEFA"));e.LIGHTSLATEGRAY=Object.freeze(e.fromCssColorString("#778899"));e.LIGHTSLATEGREY=e.LIGHTSLATEGRAY;e.LIGHTSTEELBLUE=Object.freeze(e.fromCssColorString("#B0C4DE"));e.LIGHTYELLOW=Object.freeze(e.fromCssColorString("#FFFFE0"));e.LIME=Object.freeze(e.fromCssColorString("#00FF00"));e.LIMEGREEN=Object.freeze(e.fromCssColorString("#32CD32"));e.LINEN=Object.freeze(e.fromCssColorString("#FAF0E6"));e.MAGENTA=Object.freeze(e.fromCssColorString("#FF00FF"));e.MAROON=Object.freeze(e.fromCssColorString("#800000"));e.MEDIUMAQUAMARINE=Object.freeze(e.fromCssColorString("#66CDAA"));e.MEDIUMBLUE=Object.freeze(e.fromCssColorString("#0000CD"));e.MEDIUMORCHID=Object.freeze(e.fromCssColorString("#BA55D3"));e.MEDIUMPURPLE=Object.freeze(e.fromCssColorString("#9370DB"));e.MEDIUMSEAGREEN=Object.freeze(e.fromCssColorString("#3CB371"));e.MEDIUMSLATEBLUE=Object.freeze(e.fromCssColorString("#7B68EE"));e.MEDIUMSPRINGGREEN=Object.freeze(e.fromCssColorString("#00FA9A"));e.MEDIUMTURQUOISE=Object.freeze(e.fromCssColorString("#48D1CC"));e.MEDIUMVIOLETRED=Object.freeze(e.fromCssColorString("#C71585"));e.MIDNIGHTBLUE=Object.freeze(e.fromCssColorString("#191970"));e.MINTCREAM=Object.freeze(e.fromCssColorString("#F5FFFA"));e.MISTYROSE=Object.freeze(e.fromCssColorString("#FFE4E1"));e.MOCCASIN=Object.freeze(e.fromCssColorString("#FFE4B5"));e.NAVAJOWHITE=Object.freeze(e.fromCssColorString("#FFDEAD"));e.NAVY=Object.freeze(e.fromCssColorString("#000080"));e.OLDLACE=Object.freeze(e.fromCssColorString("#FDF5E6"));e.OLIVE=Object.freeze(e.fromCssColorString("#808000"));e.OLIVEDRAB=Object.freeze(e.fromCssColorString("#6B8E23"));e.ORANGE=Object.freeze(e.fromCssColorString("#FFA500"));e.ORANGERED=Object.freeze(e.fromCssColorString("#FF4500"));e.ORCHID=Object.freeze(e.fromCssColorString("#DA70D6"));e.PALEGOLDENROD=Object.freeze(e.fromCssColorString("#EEE8AA"));e.PALEGREEN=Object.freeze(e.fromCssColorString("#98FB98"));e.PALETURQUOISE=Object.freeze(e.fromCssColorString("#AFEEEE"));e.PALEVIOLETRED=Object.freeze(e.fromCssColorString("#DB7093"));e.PAPAYAWHIP=Object.freeze(e.fromCssColorString("#FFEFD5"));e.PEACHPUFF=Object.freeze(e.fromCssColorString("#FFDAB9"));e.PERU=Object.freeze(e.fromCssColorString("#CD853F"));e.PINK=Object.freeze(e.fromCssColorString("#FFC0CB"));e.PLUM=Object.freeze(e.fromCssColorString("#DDA0DD"));e.POWDERBLUE=Object.freeze(e.fromCssColorString("#B0E0E6"));e.PURPLE=Object.freeze(e.fromCssColorString("#800080"));e.RED=Object.freeze(e.fromCssColorString("#FF0000"));e.ROSYBROWN=Object.freeze(e.fromCssColorString("#BC8F8F"));e.ROYALBLUE=Object.freeze(e.fromCssColorString("#4169E1"));e.SADDLEBROWN=Object.freeze(e.fromCssColorString("#8B4513"));e.SALMON=Object.freeze(e.fromCssColorString("#FA8072"));e.SANDYBROWN=Object.freeze(e.fromCssColorString("#F4A460"));e.SEAGREEN=Object.freeze(e.fromCssColorString("#2E8B57"));e.SEASHELL=Object.freeze(e.fromCssColorString("#FFF5EE"));e.SIENNA=Object.freeze(e.fromCssColorString("#A0522D"));e.SILVER=Object.freeze(e.fromCssColorString("#C0C0C0"));e.SKYBLUE=Object.freeze(e.fromCssColorString("#87CEEB"));e.SLATEBLUE=Object.freeze(e.fromCssColorString("#6A5ACD"));e.SLATEGRAY=Object.freeze(e.fromCssColorString("#708090"));e.SLATEGREY=e.SLATEGRAY;e.SNOW=Object.freeze(e.fromCssColorString("#FFFAFA"));e.SPRINGGREEN=Object.freeze(e.fromCssColorString("#00FF7F"));e.STEELBLUE=Object.freeze(e.fromCssColorString("#4682B4"));e.TAN=Object.freeze(e.fromCssColorString("#D2B48C"));e.TEAL=Object.freeze(e.fromCssColorString("#008080"));e.THISTLE=Object.freeze(e.fromCssColorString("#D8BFD8"));e.TOMATO=Object.freeze(e.fromCssColorString("#FF6347"));e.TURQUOISE=Object.freeze(e.fromCssColorString("#40E0D0"));e.VIOLET=Object.freeze(e.fromCssColorString("#EE82EE"));e.WHEAT=Object.freeze(e.fromCssColorString("#F5DEB3"));e.WHITE=Object.freeze(e.fromCssColorString("#FFFFFF"));e.WHITESMOKE=Object.freeze(e.fromCssColorString("#F5F5F5"));e.YELLOW=Object.freeze(e.fromCssColorString("#FFFF00"));e.YELLOWGREEN=Object.freeze(e.fromCssColorString("#9ACD32"));e.TRANSPARENT=Object.freeze(new e(0,0,0,0));var h=e;export{h as a};
public/CimSDK/Workers/chunk-QP426X7X.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{f as N}from"./chunk-HMXXHGCW.js";import{b as n,f as b}from"./chunk-VDZXURWO.js";import{a as V}from"./chunk-UEFEFMYS.js";var C={},q=new n,L=new n,Q=new N,G=new b;C.pointOnEllipsoid=function(l,y,x,I,w,O,S,m,z,i){return A(l,y,x,I,w,O,S,m,z,i)};function A(l,y,x,I,w,O,S,m,z,i){let a=l+y;n.multiplyByScalar(I,Math.cos(a),q),n.multiplyByScalar(x,Math.sin(a),L),n.add(q,L,q);let f=Math.cos(l);f=f*f;let u=Math.sin(l);u=u*u;let h=O/Math.sqrt(S*f+w*u)/m;return N.fromAxisAngle(q,h,Q),b.fromQuaternion(Q,G),b.multiplyByVector(G,z,i),n.normalize(i,i),n.multiplyByScalar(i,m,i),i}var U=new n,Z=new n,j=new n,v=new n;C.raisePositionsToHeight=function(l,y,x){let I=y.ellipsoid,w=y.height,O=y.extrudedHeight,S=x?l.length/3*2:l.length/3,m=new Float64Array(S*3),z=l.length,i=x?z:0;for(let a=0;a<z;a+=3){let f=a+1,u=a+2,r=n.fromArray(l,a,U);I.scaleToGeodeticSurface(r,r);let h=n.clone(r,Z),M=I.geodeticSurfaceNormal(r,v),T=n.multiplyByScalar(M,w,j);n.add(r,T,r),x&&(n.multiplyByScalar(M,O,T),n.add(h,T,h),m[a+i]=h.x,m[f+i]=h.y,m[u+i]=h.z),m[a]=r.x,m[f]=r.y,m[u]=r.z}return m};var D=new n,J=new n,K=new n;C.computeEllipsePositions=function(l,y,x){let I=l.semiMinorAxis,w=l.semiMajorAxis,O=l.rotation,S=l.center,m=l.granularity*8,z=I*I,i=w*w,a=w*I,f=n.magnitude(S),u=n.normalize(S,D),r=n.cross(n.UNIT_Z,S,J);r=n.normalize(r,r);let h=n.cross(u,r,K),M=1+Math.ceil(V.PI_OVER_TWO/m),T=V.PI_OVER_TWO/(M-1),p=V.PI_OVER_TWO-M*T;p<0&&(M-=Math.ceil(Math.abs(p)/T));let k=2*(M*(M+2)),e=y?new Array(k*3):void 0,o=0,t=U,s=Z,H=M*4*3,_=H-1,R=0,c=x?new Array(H):void 0,P,g,E,W,d;for(p=V.PI_OVER_TWO,t=A(p,O,h,r,z,a,i,f,u,t),y&&(e[o++]=t.x,e[o++]=t.y,e[o++]=t.z),x&&(c[_--]=t.z,c[_--]=t.y,c[_--]=t.x),p=V.PI_OVER_TWO-T,P=1;P<M+1;++P){if(t=A(p,O,h,r,z,a,i,f,u,t),s=A(Math.PI-p,O,h,r,z,a,i,f,u,s),y){for(e[o++]=t.x,e[o++]=t.y,e[o++]=t.z,E=2*P+2,g=1;g<E-1;++g)W=g/(E-1),d=n.lerp(t,s,W,j),e[o++]=d.x,e[o++]=d.y,e[o++]=d.z;e[o++]=s.x,e[o++]=s.y,e[o++]=s.z}x&&(c[_--]=t.z,c[_--]=t.y,c[_--]=t.x,c[R++]=s.x,c[R++]=s.y,c[R++]=s.z),p=V.PI_OVER_TWO-(P+1)*T}for(P=M;P>1;--P){if(p=V.PI_OVER_TWO-(P-1)*T,t=A(-p,O,h,r,z,a,i,f,u,t),s=A(p+Math.PI,O,h,r,z,a,i,f,u,s),y){for(e[o++]=t.x,e[o++]=t.y,e[o++]=t.z,E=2*(P-1)+2,g=1;g<E-1;++g)W=g/(E-1),d=n.lerp(t,s,W,j),e[o++]=d.x,e[o++]=d.y,e[o++]=d.z;e[o++]=s.x,e[o++]=s.y,e[o++]=s.z}x&&(c[_--]=t.z,c[_--]=t.y,c[_--]=t.x,c[R++]=s.x,c[R++]=s.y,c[R++]=s.z)}p=V.PI_OVER_TWO,t=A(-p,O,h,r,z,a,i,f,u,t);let B={};return y&&(e[o++]=t.x,e[o++]=t.y,e[o++]=t.z,B.positions=e,B.numPts=M),x&&(c[_--]=t.z,c[_--]=t.y,c[_--]=t.x,B.outerPositions=c),B};var tt=C;export{tt as a};
public/CimSDK/Workers/chunk-QPIV5DSQ.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as z}from"./chunk-ZPW6H6BB.js";import{i as I,j as b}from"./chunk-HMXXHGCW.js";import{b as W,c as O,e as L}from"./chunk-VDZXURWO.js";import{a as m}from"./chunk-UEFEFMYS.js";import{a as v}from"./chunk-3K67FZLU.js";import{e as k}from"./chunk-55TU6MJR.js";var Z=Math.cos,B=Math.sin,p=Math.sqrt,N={};N.computePosition=function(t,M,g,u,G,h,a){let e=M.radiiSquared,i=t.nwCorner,r=t.boundingRectangle,n=i.latitude-t.granYCos*u+G*t.granXSin,d=Z(n),X=B(n),Y=e.z*X,s=i.longitude+u*t.granYSin+G*t.granXCos,S=d*Z(s),f=d*B(s),w=e.x*S,R=e.y*f,_=p(w*S+R*f+Y*X);if(h.x=w/_,h.y=R/_,h.z=Y/_,g){let o=t.stNwCorner;k(o)?(n=o.latitude-t.stGranYCos*u+G*t.stGranXSin,s=o.longitude+u*t.stGranYSin+G*t.stGranXCos,a.x=(s-t.stWest)*t.lonScalar,a.y=(n-t.stSouth)*t.latScalar):(a.x=(s-r.west)*t.lonScalar,a.y=(n-r.south)*t.latScalar)}};var A=new b,l=new W,F=new O,j=new W,y=new z;function D(t,M,g,u,G,h,a){let e=Math.cos(M),i=u*e,r=g*e,n=Math.sin(M),d=u*n,X=g*n;y._ellipsoid=L.default,l=y.project(t,l),l=W.subtract(l,j,l);let Y=b.fromRotation(M,A);l=b.multiplyByVector(Y,l,l),l=W.add(l,j,l),t=y.unproject(l,t),h-=1,a-=1;let s=t.latitude,S=s+h*X,f=s-i*a,w=s-i*a+h*X,R=Math.max(s,S,f,w),_=Math.min(s,S,f,w),o=t.longitude,E=o+h*r,T=o+a*d,V=o+a*d+h*r,q=Math.max(o,E,T,V),x=Math.min(o,E,T,V);return{north:R,south:_,east:q,west:x,granYCos:i,granYSin:d,granXCos:r,granXSin:X,nwCorner:t}}N.computeOptions=function(t,M,g,u,G,h,a){let e=t.east,i=t.west,r=t.north,n=t.south,d=!1,X=!1;r===m.PI_OVER_TWO&&(d=!0),n===-m.PI_OVER_TWO&&(X=!0);let Y,s=r-n;i>e?Y=m.TWO_PI-i+e:Y=e-i;let S=Math.ceil(Y/M)+1,f=Math.ceil(s/M)+1,w=Y/(S-1),R=s/(f-1),_=I.northwest(t,h),o=I.center(t,F);(g!==0||u!==0)&&(o.longitude<_.longitude&&(o.longitude+=m.TWO_PI),y._ellipsoid=L.default,j=y.project(o,j));let E=R,T=w,V=0,q=0,x=I.clone(t,G),c={granYCos:E,granYSin:V,granXCos:T,granXSin:q,nwCorner:_,boundingRectangle:x,width:S,height:f,northCap:d,southCap:X};if(g!==0){let C=D(_,g,w,R,o,S,f);if(r=C.north,n=C.south,e=C.east,i=C.west,r<-m.PI_OVER_TWO||r>m.PI_OVER_TWO||n<-m.PI_OVER_TWO||n>m.PI_OVER_TWO)throw new v("Rotated rectangle is invalid.  It crosses over either the north or south pole.");c.granYCos=C.granYCos,c.granYSin=C.granYSin,c.granXCos=C.granXCos,c.granXSin=C.granXSin,x.north=r,x.south=n,x.east=e,x.west=i}if(u!==0){g=g-u;let C=I.northwest(x,a),P=D(C,g,w,R,o,S,f);c.stGranYCos=P.granYCos,c.stGranXCos=P.granXCos,c.stGranYSin=P.granYSin,c.stGranXSin=P.granXSin,c.stNwCorner=C,c.stWest=P.west,c.stSouth=P.south}return c};var st=N;export{st as a};
public/CimSDK/Workers/chunk-S5MWIP3D.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{b as t}from"./chunk-HMXXHGCW.js";import{a as r}from"./chunk-5HWP5DW7.js";import{a as m}from"./chunk-3K67FZLU.js";import{e as i}from"./chunk-55TU6MJR.js";function d(e){if(e=r(e,r.EMPTY_OBJECT),!i(e.geometry))throw new m("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=t.clone(r(e.modelMatrix,t.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=r(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}var s=d;export{s as a};
public/CimSDK/Workers/chunk-T6ETJW3A.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as fn,c as Tn}from"./chunk-55TU6MJR.js";var Dn=Tn((nt,bt)=>{var _=_||{};_.scope={};_.arrayIteratorImpl=function(p){var c=0;return function(){return c<p.length?{done:!1,value:p[c++]}:{done:!0}}};_.arrayIterator=function(p){return{next:_.arrayIteratorImpl(p)}};_.makeIterator=function(p){var c=typeof Symbol<"u"&&Symbol.iterator&&p[Symbol.iterator];return c?c.call(p):_.arrayIterator(p)};_.ASSUME_ES5=!1;_.ASSUME_NO_NATIVE_MAP=!1;_.ASSUME_NO_NATIVE_SET=!1;_.SIMPLE_FROUND_POLYFILL=!1;_.ISOLATE_POLYFILLS=!1;_.FORCE_POLYFILL_PROMISE=!1;_.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;_.getGlobal=function(p){p=[typeof globalThis=="object"&&globalThis,p,typeof window=="object"&&window,typeof self=="object"&&self,typeof global=="object"&&global];for(var c=0;c<p.length;++c){var s=p[c];if(s&&s.Math==Math)return s}throw Error("Cannot find global object")};_.global=_.getGlobal(nt);_.defineProperty=_.ASSUME_ES5||typeof Object.defineProperties=="function"?Object.defineProperty:function(p,c,s){return p==Array.prototype||p==Object.prototype||(p[c]=s.value),p};_.IS_SYMBOL_NATIVE=typeof Symbol=="function"&&typeof Symbol("x")=="symbol";_.TRUST_ES6_POLYFILLS=!_.ISOLATE_POLYFILLS||_.IS_SYMBOL_NATIVE;_.polyfills={};_.propertyToPolyfillSymbol={};_.POLYFILL_PREFIX="$jscp$";_.polyfill=function(p,c,s,y){c&&(_.ISOLATE_POLYFILLS?_.polyfillIsolated(p,c,s,y):_.polyfillUnisolated(p,c,s,y))};_.polyfillUnisolated=function(p,c,s,y){for(s=_.global,p=p.split("."),y=0;y<p.length-1;y++){var a=p[y];if(!(a in s))return;s=s[a]}p=p[p.length-1],y=s[p],c=c(y),c!=y&&c!=null&&_.defineProperty(s,p,{configurable:!0,writable:!0,value:c})};_.polyfillIsolated=function(p,c,s,y){var a=p.split(".");p=a.length===1,y=a[0],y=!p&&y in _.polyfills?_.polyfills:_.global;for(var g=0;g<a.length-1;g++){var i=a[g];if(!(i in y))return;y=y[i]}a=a[a.length-1],s=_.IS_SYMBOL_NATIVE&&s==="es6"?y[a]:null,c=c(s),c!=null&&(p?_.defineProperty(_.polyfills,a,{configurable:!0,writable:!0,value:c}):c!==s&&(_.propertyToPolyfillSymbol[a]===void 0&&(s=1e9*Math.random()>>>0,_.propertyToPolyfillSymbol[a]=_.IS_SYMBOL_NATIVE?_.global.Symbol(a):_.POLYFILL_PREFIX+s+"$"+a),_.defineProperty(y,_.propertyToPolyfillSymbol[a],{configurable:!0,writable:!0,value:c})))};_.polyfill("Promise",function(p){function c(){this.batch_=null}function s(i){return i instanceof a?i:new a(function(l,h){l(i)})}if(p&&(!(_.FORCE_POLYFILL_PROMISE||_.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&typeof _.global.PromiseRejectionEvent>"u")||!_.global.Promise||_.global.Promise.toString().indexOf("[native code]")===-1))return p;c.prototype.asyncExecute=function(i){if(this.batch_==null){this.batch_=[];var l=this;this.asyncExecuteFunction(function(){l.executeBatch_()})}this.batch_.push(i)};var y=_.global.setTimeout;c.prototype.asyncExecuteFunction=function(i){y(i,0)},c.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var i=this.batch_;this.batch_=[];for(var l=0;l<i.length;++l){var h=i[l];i[l]=null;try{h()}catch(I){this.asyncThrow_(I)}}}this.batch_=null},c.prototype.asyncThrow_=function(i){this.asyncExecuteFunction(function(){throw i})};var a=function(i){this.state_=0,this.result_=void 0,this.onSettledCallbacks_=[],this.isRejectionHandled_=!1;var l=this.createResolveAndReject_();try{i(l.resolve,l.reject)}catch(h){l.reject(h)}};a.prototype.createResolveAndReject_=function(){function i(I){return function(C){h||(h=!0,I.call(l,C))}}var l=this,h=!1;return{resolve:i(this.resolveTo_),reject:i(this.reject_)}},a.prototype.resolveTo_=function(i){if(i===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(i instanceof a)this.settleSameAsPromise_(i);else{t:switch(typeof i){case"object":var l=i!=null;break t;case"function":l=!0;break t;default:l=!1}l?this.resolveToNonPromiseObj_(i):this.fulfill_(i)}},a.prototype.resolveToNonPromiseObj_=function(i){var l=void 0;try{l=i.then}catch(h){this.reject_(h);return}typeof l=="function"?this.settleSameAsThenable_(l,i):this.fulfill_(i)},a.prototype.reject_=function(i){this.settle_(2,i)},a.prototype.fulfill_=function(i){this.settle_(1,i)},a.prototype.settle_=function(i,l){if(this.state_!=0)throw Error("Cannot settle("+i+", "+l+"): Promise already settled in state"+this.state_);this.state_=i,this.result_=l,this.state_===2&&this.scheduleUnhandledRejectionCheck_(),this.executeOnSettledCallbacks_()},a.prototype.scheduleUnhandledRejectionCheck_=function(){var i=this;y(function(){if(i.notifyUnhandledRejection_()){var l=_.global.console;typeof l<"u"&&l.error(i.result_)}},1)},a.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var i=_.global.CustomEvent,l=_.global.Event,h=_.global.dispatchEvent;return typeof h>"u"?!0:(typeof i=="function"?i=new i("unhandledrejection",{cancelable:!0}):typeof l=="function"?i=new l("unhandledrejection",{cancelable:!0}):(i=_.global.document.createEvent("CustomEvent"),i.initCustomEvent("unhandledrejection",!1,!0,i)),i.promise=this,i.reason=this.result_,h(i))},a.prototype.executeOnSettledCallbacks_=function(){if(this.onSettledCallbacks_!=null){for(var i=0;i<this.onSettledCallbacks_.length;++i)g.asyncExecute(this.onSettledCallbacks_[i]);this.onSettledCallbacks_=null}};var g=new c;return a.prototype.settleSameAsPromise_=function(i){var l=this.createResolveAndReject_();i.callWhenSettled_(l.resolve,l.reject)},a.prototype.settleSameAsThenable_=function(i,l){var h=this.createResolveAndReject_();try{i.call(l,h.resolve,h.reject)}catch(I){h.reject(I)}},a.prototype.then=function(i,l){function h(f,T){return typeof f=="function"?function(G){try{I(f(G))}catch(V){C(V)}}:T}var I,C,K=new a(function(f,T){I=f,C=T});return this.callWhenSettled_(h(i,I),h(l,C)),K},a.prototype.catch=function(i){return this.then(void 0,i)},a.prototype.callWhenSettled_=function(i,l){function h(){switch(I.state_){case 1:i(I.result_);break;case 2:l(I.result_);break;default:throw Error("Unexpected state: "+I.state_)}}var I=this;this.onSettledCallbacks_==null?g.asyncExecute(h):this.onSettledCallbacks_.push(h),this.isRejectionHandled_=!0},a.resolve=s,a.reject=function(i){return new a(function(l,h){h(i)})},a.race=function(i){return new a(function(l,h){for(var I=_.makeIterator(i),C=I.next();!C.done;C=I.next())s(C.value).callWhenSettled_(l,h)})},a.all=function(i){var l=_.makeIterator(i),h=l.next();return h.done?s([]):new a(function(I,C){function K(G){return function(V){f[G]=V,T--,T==0&&I(f)}}var f=[],T=0;do f.push(void 0),T++,s(h.value).callWhenSettled_(K(f.length-1),C),h=l.next();while(!h.done)})},a},"es6","es3");_.owns=function(p,c){return Object.prototype.hasOwnProperty.call(p,c)};_.assign=_.TRUST_ES6_POLYFILLS&&typeof Object.assign=="function"?Object.assign:function(p,c){for(var s=1;s<arguments.length;s++){var y=arguments[s];if(y)for(var a in y)_.owns(y,a)&&(p[a]=y[a])}return p};_.polyfill("Object.assign",function(p){return p||_.assign},"es6","es3");_.checkStringArgs=function(p,c,s){if(p==null)throw new TypeError("The 'this' value for String.prototype."+s+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+s+" must not be a regular expression");return p+""};_.polyfill("String.prototype.startsWith",function(p){return p||function(c,s){var y=_.checkStringArgs(this,c,"startsWith");c+="";var a=y.length,g=c.length;s=Math.max(0,Math.min(s|0,y.length));for(var i=0;i<g&&s<a;)if(y[s++]!=c[i++])return!1;return i>=g}},"es6","es3");_.polyfill("Array.prototype.copyWithin",function(p){function c(s){return s=Number(s),s===1/0||s===-1/0?s:s|0}return p||function(s,y,a){var g=this.length;if(s=c(s),y=c(y),a=a===void 0?g:c(a),s=0>s?Math.max(g+s,0):Math.min(s,g),y=0>y?Math.max(g+y,0):Math.min(y,g),a=0>a?Math.max(g+a,0):Math.min(a,g),s<y)for(;y<a;)y in this?this[s++]=this[y++]:(delete this[s++],y++);else for(a=Math.min(a,g+y-s),s+=a-y;a>y;)--a in this?this[--s]=this[a]:delete this[--s];return this}},"es6","es3");_.typedArrayCopyWithin=function(p){return p||Array.prototype.copyWithin};_.polyfill("Int8Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Uint8Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Uint8ClampedArray.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Int16Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Uint16Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Int32Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Uint32Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Float32Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");_.polyfill("Float64Array.prototype.copyWithin",_.typedArrayCopyWithin,"es6","es5");var dt=function(){var p=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(p=p||__filename),function(c){function s(e){return t.locateFile?t.locateFile(e,Q):Q+e}function y(e,r,n){var o=r+n;for(n=r;e[n]&&!(n>=o);)++n;if(16<n-r&&e.buffer&&Ot)return Ot.decode(e.subarray(r,n));for(o="";r<n;){var m=e[r++];if(m&128){var b=e[r++]&63;if((m&224)==192)o+=String.fromCharCode((m&31)<<6|b);else{var X=e[r++]&63;m=(m&240)==224?(m&15)<<12|b<<6|X:(m&7)<<18|b<<12|X<<6|e[r++]&63,65536>m?o+=String.fromCharCode(m):(m-=65536,o+=String.fromCharCode(55296|m>>10,56320|m&1023))}}else o+=String.fromCharCode(m)}return o}function a(e,r){return e?y(tt,e,r):""}function g(){var e=_t.buffer;t.HEAP8=q=new Int8Array(e),t.HEAP16=new Int16Array(e),t.HEAP32=et=new Int32Array(e),t.HEAPU8=tt=new Uint8Array(e),t.HEAPU16=new Uint16Array(e),t.HEAPU32=x=new Uint32Array(e),t.HEAPF32=new Float32Array(e),t.HEAPF64=new Float64Array(e)}function i(e){throw t.onAbort&&t.onAbort(e),e="Aborted("+e+")",J(e),Gt=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),ot(e),e}function l(e){try{if(e==z&&Z)return new Uint8Array(Z);if(ut)return ut(e);throw"both async and sync fetching of the wasm failed"}catch(r){i(r)}}function h(){if(!Z&&(It||$)){if(typeof fetch=="function"&&!z.startsWith("file://"))return fetch(z,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+z+"'";return e.arrayBuffer()}).catch(function(){return l(z)});if(st)return new Promise(function(e,r){st(z,function(n){e(new Uint8Array(n))},r)})}return Promise.resolve().then(function(){return l(z)})}function I(e){for(;0<e.length;)e.shift()(t)}function C(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(r){x[this.ptr+4>>2]=r},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(r){x[this.ptr+8>>2]=r},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_refcount=function(r){et[this.ptr>>2]=r},this.set_caught=function(r){q[this.ptr+12>>0]=r?1:0},this.get_caught=function(){return q[this.ptr+12>>0]!=0},this.set_rethrown=function(r){q[this.ptr+13>>0]=r?1:0},this.get_rethrown=function(){return q[this.ptr+13>>0]!=0},this.init=function(r,n){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(n),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){et[this.ptr>>2]+=1},this.release_ref=function(){var r=et[this.ptr>>2];return et[this.ptr>>2]=r-1,r===1},this.set_adjusted_ptr=function(r){x[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){if(ln(this.get_type()))return x[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}function K(){function e(){if(!it&&(it=!0,t.calledRun=!0,!Gt)){if(Rt=!0,I(ct),ht(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;)Pt.unshift(t.postRun.shift());I(Pt)}}if(!(0<k)){if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)jt.unshift(t.preRun.shift());I(jt),0<k||(t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),e()},1)):e())}}function f(){}function T(e){return(e||f).__cache__}function G(e,r){var n=T(r),o=n[e];return o||(o=Object.create((r||f).prototype),o.ptr=e,n[e]=o)}function V(e){if(typeof e=="string"){for(var r=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);127>=o?r++:2047>=o?r+=2:55296<=o&&57343>=o?(r+=4,++n):r+=3}if(r=Array(r+1),n=0,o=r.length,0<o){o=n+o-1;for(var m=0;m<e.length;++m){var b=e.charCodeAt(m);if(55296<=b&&57343>=b){var X=e.charCodeAt(++m);b=65536+((b&1023)<<10)|X&1023}if(127>=b){if(n>=o)break;r[n++]=b}else{if(2047>=b){if(n+1>=o)break;r[n++]=192|b>>6}else{if(65535>=b){if(n+2>=o)break;r[n++]=224|b>>12}else{if(n+3>=o)break;r[n++]=240|b>>18,r[n++]=128|b>>12&63}r[n++]=128|b>>6&63}r[n++]=128|b&63}}r[n]=0}return e=d.alloc(r,q),d.copy(r,q,e),e}return e}function at(e){if(typeof e=="object"){var r=d.alloc(e,q);return d.copy(e,q,r),r}return e}function H(){throw"cannot construct a VoidPtr, no constructor in IDL"}function B(){this.ptr=Mt(),T(B)[this.ptr]=this}function w(){this.ptr=Ft(),T(w)[this.ptr]=this}function Y(){this.ptr=wt(),T(Y)[this.ptr]=this}function A(){this.ptr=Vt(),T(A)[this.ptr]=this}function E(){this.ptr=Jt(),T(E)[this.ptr]=this}function j(){this.ptr=ne(),T(j)[this.ptr]=this}function P(){this.ptr=ae(),T(P)[this.ptr]=this}function O(){this.ptr=ce(),T(O)[this.ptr]=this}function W(){this.ptr=de(),T(W)[this.ptr]=this}function v(){throw"cannot construct a Status, no constructor in IDL"}function R(){this.ptr=Ie(),T(R)[this.ptr]=this}function S(){this.ptr=Ge(),T(S)[this.ptr]=this}function M(){this.ptr=Re(),T(M)[this.ptr]=this}function N(){this.ptr=Ue(),T(N)[this.ptr]=this}function U(){this.ptr=we(),T(U)[this.ptr]=this}function F(){this.ptr=We(),T(F)[this.ptr]=this}function L(){this.ptr=He(),T(L)[this.ptr]=this}function D(){this.ptr=Ke(),T(D)[this.ptr]=this}function u(){this.ptr=_r(),T(u)[this.ptr]=this}c=c===void 0?{}:c;var t=typeof c<"u"?c:{},ht,ot;t.ready=new Promise(function(e,r){ht=e,ot=r});var At=!1,Tt=!1;t.onRuntimeInitialized=function(){At=!0,Tt&&typeof t.onModuleLoaded=="function"&&t.onModuleLoaded(t)},t.onModuleParsed=function(){Tt=!0,At&&typeof t.onModuleLoaded=="function"&&t.onModuleLoaded(t)},t.isVersionSupported=function(e){return typeof e!="string"?!1:(e=e.split("."),2>e.length||3<e.length?!1:e[0]==1&&0<=e[1]&&5>=e[1]?!0:!(e[0]!=0||10<e[1]))};var Dt=Object.assign({},t),It=typeof window=="object",$=typeof importScripts=="function",gt=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",Q="";if(gt){var vt=fn("fs"),pt=fn("path");Q=$?pt.dirname(Q)+"/":__dirname+"/";var Et=function(e,r){return e=e.startsWith("file://")?new URL(e):pt.normalize(e),vt.readFileSync(e,r?void 0:"utf8")},ut=function(e){return e=Et(e,!0),e.buffer||(e=new Uint8Array(e)),e},st=function(e,r,n){e=e.startsWith("file://")?new URL(e):pt.normalize(e),vt.readFile(e,function(o,m){o?n(o):r(m.buffer)})};1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),t.inspect=function(){return"[Emscripten Module object]"}}else(It||$)&&($?Q=self.location.href:typeof document<"u"&&document.currentScript&&(Q=document.currentScript.src),p&&(Q=p),Q=Q.indexOf("blob:")!==0?Q.substr(0,Q.replace(/[?#].*/,"").lastIndexOf("/")+1):"",Et=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},$&&(ut=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),st=function(e,r,n){var o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="arraybuffer",o.onload=function(){o.status==200||o.status==0&&o.response?r(o.response):n()},o.onerror=n,o.send(null)});var dn=t.print||console.log.bind(console),J=t.printErr||console.warn.bind(console);Object.assign(t,Dt),Dt=null;var Z;t.wasmBinary&&(Z=t.wasmBinary),typeof WebAssembly!="object"&&i("no native wasm support detected");var _t,Gt=!1,Ot=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,q,tt,et,x,jt=[],ct=[],Pt=[],Rt=!1,k=0,yt=null,rt=null,z="draco_decoder.wasm";z.startsWith("data:application/octet-stream;base64,")||(z=s(z));var bn=0,hn=[null,[],[]],An={b:function(e,r,n){throw new C(e).init(r,n),bn++,e},a:function(){i("")},g:function(e,r,n){tt.copyWithin(e,r,r+n)},e:function(e){var r=tt.length;if(e>>>=0,2147483648<e)return!1;for(var n=1;4>=n;n*=2){var o=r*(1+.2/n);o=Math.min(o,e+100663296);var m=Math;o=Math.max(e,o),m=m.min.call(m,2147483648,o+(65536-o%65536)%65536);t:{o=_t.buffer;try{_t.grow(m-o.byteLength+65535>>>16),g();var b=1;break t}catch{}b=void 0}if(b)return!0}return!1},f:function(e){return 52},d:function(e,r,n,o,m){return 70},c:function(e,r,n,o){for(var m=0,b=0;b<n;b++){var X=x[r>>2],mn=x[r+4>>2];r+=8;for(var lt=0;lt<mn;lt++){var mt=tt[X+lt],ft=hn[e];mt===0||mt===10?((e===1?dn:J)(y(ft,0)),ft.length=0):ft.push(mt)}m+=mn}return x[o>>2]=m,0}};(function(){function e(m,b){t.asm=m.exports,_t=t.asm.h,g(),ct.unshift(t.asm.i),k--,t.monitorRunDependencies&&t.monitorRunDependencies(k),k==0&&(yt!==null&&(clearInterval(yt),yt=null),rt&&(m=rt,rt=null,m()))}function r(m){e(m.instance)}function n(m){return h().then(function(b){return WebAssembly.instantiate(b,o)}).then(function(b){return b}).then(m,function(b){J("failed to asynchronously prepare wasm: "+b),i(b)})}var o={a:An};if(k++,t.monitorRunDependencies&&t.monitorRunDependencies(k),t.instantiateWasm)try{return t.instantiateWasm(o,e)}catch(m){J("Module.instantiateWasm callback failed with error: "+m),ot(m)}return function(){return Z||typeof WebAssembly.instantiateStreaming!="function"||z.startsWith("data:application/octet-stream;base64,")||z.startsWith("file://")||gt||typeof fetch!="function"?n(r):fetch(z,{credentials:"same-origin"}).then(function(m){return WebAssembly.instantiateStreaming(m,o).then(r,function(b){return J("wasm streaming compile failed: "+b),J("falling back to ArrayBuffer instantiation"),n(r)})})}().catch(ot),{}})();var St=t._emscripten_bind_VoidPtr___destroy___0=function(){return(St=t._emscripten_bind_VoidPtr___destroy___0=t.asm.k).apply(null,arguments)},Mt=t._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return(Mt=t._emscripten_bind_DecoderBuffer_DecoderBuffer_0=t.asm.l).apply(null,arguments)},Nt=t._emscripten_bind_DecoderBuffer_Init_2=function(){return(Nt=t._emscripten_bind_DecoderBuffer_Init_2=t.asm.m).apply(null,arguments)},Ut=t._emscripten_bind_DecoderBuffer___destroy___0=function(){return(Ut=t._emscripten_bind_DecoderBuffer___destroy___0=t.asm.n).apply(null,arguments)},Ft=t._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return(Ft=t._emscripten_bind_AttributeTransformData_AttributeTransformData_0=t.asm.o).apply(null,arguments)},Lt=t._emscripten_bind_AttributeTransformData_transform_type_0=function(){return(Lt=t._emscripten_bind_AttributeTransformData_transform_type_0=t.asm.p).apply(null,arguments)},Ct=t._emscripten_bind_AttributeTransformData___destroy___0=function(){return(Ct=t._emscripten_bind_AttributeTransformData___destroy___0=t.asm.q).apply(null,arguments)},wt=t._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(wt=t._emscripten_bind_GeometryAttribute_GeometryAttribute_0=t.asm.r).apply(null,arguments)},zt=t._emscripten_bind_GeometryAttribute___destroy___0=function(){return(zt=t._emscripten_bind_GeometryAttribute___destroy___0=t.asm.s).apply(null,arguments)},Vt=t._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(Vt=t._emscripten_bind_PointAttribute_PointAttribute_0=t.asm.t).apply(null,arguments)},Bt=t._emscripten_bind_PointAttribute_size_0=function(){return(Bt=t._emscripten_bind_PointAttribute_size_0=t.asm.u).apply(null,arguments)},Wt=t._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return(Wt=t._emscripten_bind_PointAttribute_GetAttributeTransformData_0=t.asm.v).apply(null,arguments)},Qt=t._emscripten_bind_PointAttribute_attribute_type_0=function(){return(Qt=t._emscripten_bind_PointAttribute_attribute_type_0=t.asm.w).apply(null,arguments)},xt=t._emscripten_bind_PointAttribute_data_type_0=function(){return(xt=t._emscripten_bind_PointAttribute_data_type_0=t.asm.x).apply(null,arguments)},Yt=t._emscripten_bind_PointAttribute_num_components_0=function(){return(Yt=t._emscripten_bind_PointAttribute_num_components_0=t.asm.y).apply(null,arguments)},Ht=t._emscripten_bind_PointAttribute_normalized_0=function(){return(Ht=t._emscripten_bind_PointAttribute_normalized_0=t.asm.z).apply(null,arguments)},qt=t._emscripten_bind_PointAttribute_byte_stride_0=function(){return(qt=t._emscripten_bind_PointAttribute_byte_stride_0=t.asm.A).apply(null,arguments)},kt=t._emscripten_bind_PointAttribute_byte_offset_0=function(){return(kt=t._emscripten_bind_PointAttribute_byte_offset_0=t.asm.B).apply(null,arguments)},Xt=t._emscripten_bind_PointAttribute_unique_id_0=function(){return(Xt=t._emscripten_bind_PointAttribute_unique_id_0=t.asm.C).apply(null,arguments)},Kt=t._emscripten_bind_PointAttribute___destroy___0=function(){return(Kt=t._emscripten_bind_PointAttribute___destroy___0=t.asm.D).apply(null,arguments)},Jt=t._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(Jt=t._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=t.asm.E).apply(null,arguments)},$t=t._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return($t=t._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=t.asm.F).apply(null,arguments)},Zt=t._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return(Zt=t._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=t.asm.G).apply(null,arguments)},te=t._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(te=t._emscripten_bind_AttributeQuantizationTransform_min_value_1=t.asm.H).apply(null,arguments)},ee=t._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(ee=t._emscripten_bind_AttributeQuantizationTransform_range_0=t.asm.I).apply(null,arguments)},re=t._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return(re=t._emscripten_bind_AttributeQuantizationTransform___destroy___0=t.asm.J).apply(null,arguments)},ne=t._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(ne=t._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=t.asm.K).apply(null,arguments)},oe=t._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(oe=t._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=t.asm.L).apply(null,arguments)},_e=t._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(_e=t._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=t.asm.M).apply(null,arguments)},ie=t._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(ie=t._emscripten_bind_AttributeOctahedronTransform___destroy___0=t.asm.N).apply(null,arguments)},ae=t._emscripten_bind_PointCloud_PointCloud_0=function(){return(ae=t._emscripten_bind_PointCloud_PointCloud_0=t.asm.O).apply(null,arguments)},pe=t._emscripten_bind_PointCloud_num_attributes_0=function(){return(pe=t._emscripten_bind_PointCloud_num_attributes_0=t.asm.P).apply(null,arguments)},ue=t._emscripten_bind_PointCloud_num_points_0=function(){return(ue=t._emscripten_bind_PointCloud_num_points_0=t.asm.Q).apply(null,arguments)},se=t._emscripten_bind_PointCloud___destroy___0=function(){return(se=t._emscripten_bind_PointCloud___destroy___0=t.asm.R).apply(null,arguments)},ce=t._emscripten_bind_Mesh_Mesh_0=function(){return(ce=t._emscripten_bind_Mesh_Mesh_0=t.asm.S).apply(null,arguments)},ye=t._emscripten_bind_Mesh_num_faces_0=function(){return(ye=t._emscripten_bind_Mesh_num_faces_0=t.asm.T).apply(null,arguments)},le=t._emscripten_bind_Mesh_num_attributes_0=function(){return(le=t._emscripten_bind_Mesh_num_attributes_0=t.asm.U).apply(null,arguments)},me=t._emscripten_bind_Mesh_num_points_0=function(){return(me=t._emscripten_bind_Mesh_num_points_0=t.asm.V).apply(null,arguments)},fe=t._emscripten_bind_Mesh___destroy___0=function(){return(fe=t._emscripten_bind_Mesh___destroy___0=t.asm.W).apply(null,arguments)},de=t._emscripten_bind_Metadata_Metadata_0=function(){return(de=t._emscripten_bind_Metadata_Metadata_0=t.asm.X).apply(null,arguments)},be=t._emscripten_bind_Metadata___destroy___0=function(){return(be=t._emscripten_bind_Metadata___destroy___0=t.asm.Y).apply(null,arguments)},he=t._emscripten_bind_Status_code_0=function(){return(he=t._emscripten_bind_Status_code_0=t.asm.Z).apply(null,arguments)},Ae=t._emscripten_bind_Status_ok_0=function(){return(Ae=t._emscripten_bind_Status_ok_0=t.asm._).apply(null,arguments)},Te=t._emscripten_bind_Status_error_msg_0=function(){return(Te=t._emscripten_bind_Status_error_msg_0=t.asm.$).apply(null,arguments)},De=t._emscripten_bind_Status___destroy___0=function(){return(De=t._emscripten_bind_Status___destroy___0=t.asm.aa).apply(null,arguments)},Ie=t._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return(Ie=t._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=t.asm.ba).apply(null,arguments)},ge=t._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(ge=t._emscripten_bind_DracoFloat32Array_GetValue_1=t.asm.ca).apply(null,arguments)},ve=t._emscripten_bind_DracoFloat32Array_size_0=function(){return(ve=t._emscripten_bind_DracoFloat32Array_size_0=t.asm.da).apply(null,arguments)},Ee=t._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(Ee=t._emscripten_bind_DracoFloat32Array___destroy___0=t.asm.ea).apply(null,arguments)},Ge=t._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return(Ge=t._emscripten_bind_DracoInt8Array_DracoInt8Array_0=t.asm.fa).apply(null,arguments)},Oe=t._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(Oe=t._emscripten_bind_DracoInt8Array_GetValue_1=t.asm.ga).apply(null,arguments)},je=t._emscripten_bind_DracoInt8Array_size_0=function(){return(je=t._emscripten_bind_DracoInt8Array_size_0=t.asm.ha).apply(null,arguments)},Pe=t._emscripten_bind_DracoInt8Array___destroy___0=function(){return(Pe=t._emscripten_bind_DracoInt8Array___destroy___0=t.asm.ia).apply(null,arguments)},Re=t._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(Re=t._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=t.asm.ja).apply(null,arguments)},Se=t._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(Se=t._emscripten_bind_DracoUInt8Array_GetValue_1=t.asm.ka).apply(null,arguments)},Me=t._emscripten_bind_DracoUInt8Array_size_0=function(){return(Me=t._emscripten_bind_DracoUInt8Array_size_0=t.asm.la).apply(null,arguments)},Ne=t._emscripten_bind_DracoUInt8Array___destroy___0=function(){return(Ne=t._emscripten_bind_DracoUInt8Array___destroy___0=t.asm.ma).apply(null,arguments)},Ue=t._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(Ue=t._emscripten_bind_DracoInt16Array_DracoInt16Array_0=t.asm.na).apply(null,arguments)},Fe=t._emscripten_bind_DracoInt16Array_GetValue_1=function(){return(Fe=t._emscripten_bind_DracoInt16Array_GetValue_1=t.asm.oa).apply(null,arguments)},Le=t._emscripten_bind_DracoInt16Array_size_0=function(){return(Le=t._emscripten_bind_DracoInt16Array_size_0=t.asm.pa).apply(null,arguments)},Ce=t._emscripten_bind_DracoInt16Array___destroy___0=function(){return(Ce=t._emscripten_bind_DracoInt16Array___destroy___0=t.asm.qa).apply(null,arguments)},we=t._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return(we=t._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=t.asm.ra).apply(null,arguments)},ze=t._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(ze=t._emscripten_bind_DracoUInt16Array_GetValue_1=t.asm.sa).apply(null,arguments)},Ve=t._emscripten_bind_DracoUInt16Array_size_0=function(){return(Ve=t._emscripten_bind_DracoUInt16Array_size_0=t.asm.ta).apply(null,arguments)},Be=t._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(Be=t._emscripten_bind_DracoUInt16Array___destroy___0=t.asm.ua).apply(null,arguments)},We=t._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return(We=t._emscripten_bind_DracoInt32Array_DracoInt32Array_0=t.asm.va).apply(null,arguments)},Qe=t._emscripten_bind_DracoInt32Array_GetValue_1=function(){return(Qe=t._emscripten_bind_DracoInt32Array_GetValue_1=t.asm.wa).apply(null,arguments)},xe=t._emscripten_bind_DracoInt32Array_size_0=function(){return(xe=t._emscripten_bind_DracoInt32Array_size_0=t.asm.xa).apply(null,arguments)},Ye=t._emscripten_bind_DracoInt32Array___destroy___0=function(){return(Ye=t._emscripten_bind_DracoInt32Array___destroy___0=t.asm.ya).apply(null,arguments)},He=t._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return(He=t._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=t.asm.za).apply(null,arguments)},qe=t._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(qe=t._emscripten_bind_DracoUInt32Array_GetValue_1=t.asm.Aa).apply(null,arguments)},ke=t._emscripten_bind_DracoUInt32Array_size_0=function(){return(ke=t._emscripten_bind_DracoUInt32Array_size_0=t.asm.Ba).apply(null,arguments)},Xe=t._emscripten_bind_DracoUInt32Array___destroy___0=function(){return(Xe=t._emscripten_bind_DracoUInt32Array___destroy___0=t.asm.Ca).apply(null,arguments)},Ke=t._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return(Ke=t._emscripten_bind_MetadataQuerier_MetadataQuerier_0=t.asm.Da).apply(null,arguments)},Je=t._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(Je=t._emscripten_bind_MetadataQuerier_HasEntry_2=t.asm.Ea).apply(null,arguments)},$e=t._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return($e=t._emscripten_bind_MetadataQuerier_GetIntEntry_2=t.asm.Fa).apply(null,arguments)},Ze=t._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(Ze=t._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=t.asm.Ga).apply(null,arguments)},tr=t._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return(tr=t._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=t.asm.Ha).apply(null,arguments)},er=t._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(er=t._emscripten_bind_MetadataQuerier_GetStringEntry_2=t.asm.Ia).apply(null,arguments)},rr=t._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(rr=t._emscripten_bind_MetadataQuerier_NumEntries_1=t.asm.Ja).apply(null,arguments)},nr=t._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(nr=t._emscripten_bind_MetadataQuerier_GetEntryName_2=t.asm.Ka).apply(null,arguments)},or=t._emscripten_bind_MetadataQuerier___destroy___0=function(){return(or=t._emscripten_bind_MetadataQuerier___destroy___0=t.asm.La).apply(null,arguments)},_r=t._emscripten_bind_Decoder_Decoder_0=function(){return(_r=t._emscripten_bind_Decoder_Decoder_0=t.asm.Ma).apply(null,arguments)},ir=t._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(ir=t._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=t.asm.Na).apply(null,arguments)},ar=t._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(ar=t._emscripten_bind_Decoder_DecodeArrayToMesh_3=t.asm.Oa).apply(null,arguments)},pr=t._emscripten_bind_Decoder_GetAttributeId_2=function(){return(pr=t._emscripten_bind_Decoder_GetAttributeId_2=t.asm.Pa).apply(null,arguments)},ur=t._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(ur=t._emscripten_bind_Decoder_GetAttributeIdByName_2=t.asm.Qa).apply(null,arguments)},sr=t._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(sr=t._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=t.asm.Ra).apply(null,arguments)},cr=t._emscripten_bind_Decoder_GetAttribute_2=function(){return(cr=t._emscripten_bind_Decoder_GetAttribute_2=t.asm.Sa).apply(null,arguments)},yr=t._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(yr=t._emscripten_bind_Decoder_GetAttributeByUniqueId_2=t.asm.Ta).apply(null,arguments)},lr=t._emscripten_bind_Decoder_GetMetadata_1=function(){return(lr=t._emscripten_bind_Decoder_GetMetadata_1=t.asm.Ua).apply(null,arguments)},mr=t._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(mr=t._emscripten_bind_Decoder_GetAttributeMetadata_2=t.asm.Va).apply(null,arguments)},fr=t._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return(fr=t._emscripten_bind_Decoder_GetFaceFromMesh_3=t.asm.Wa).apply(null,arguments)},dr=t._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return(dr=t._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=t.asm.Xa).apply(null,arguments)},br=t._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(br=t._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=t.asm.Ya).apply(null,arguments)},hr=t._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(hr=t._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=t.asm.Za).apply(null,arguments)},Ar=t._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(Ar=t._emscripten_bind_Decoder_GetAttributeFloat_3=t.asm._a).apply(null,arguments)},Tr=t._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(Tr=t._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=t.asm.$a).apply(null,arguments)},Dr=t._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(Dr=t._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=t.asm.ab).apply(null,arguments)},Ir=t._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(Ir=t._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=t.asm.bb).apply(null,arguments)},gr=t._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(gr=t._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=t.asm.cb).apply(null,arguments)},vr=t._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(vr=t._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=t.asm.db).apply(null,arguments)},Er=t._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return(Er=t._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=t.asm.eb).apply(null,arguments)},Gr=t._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(Gr=t._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=t.asm.fb).apply(null,arguments)},Or=t._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(Or=t._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=t.asm.gb).apply(null,arguments)},jr=t._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return(jr=t._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=t.asm.hb).apply(null,arguments)},Pr=t._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(Pr=t._emscripten_bind_Decoder_SkipAttributeTransform_1=t.asm.ib).apply(null,arguments)},Rr=t._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(Rr=t._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=t.asm.jb).apply(null,arguments)},Sr=t._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return(Sr=t._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=t.asm.kb).apply(null,arguments)},Mr=t._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(Mr=t._emscripten_bind_Decoder_DecodeBufferToMesh_2=t.asm.lb).apply(null,arguments)},Nr=t._emscripten_bind_Decoder___destroy___0=function(){return(Nr=t._emscripten_bind_Decoder___destroy___0=t.asm.mb).apply(null,arguments)},Ur=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return(Ur=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=t.asm.nb).apply(null,arguments)},Fr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return(Fr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=t.asm.ob).apply(null,arguments)},Lr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Lr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=t.asm.pb).apply(null,arguments)},Cr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return(Cr=t._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=t.asm.qb).apply(null,arguments)},wr=t._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(wr=t._emscripten_enum_draco_GeometryAttribute_Type_INVALID=t.asm.rb).apply(null,arguments)},zr=t._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(zr=t._emscripten_enum_draco_GeometryAttribute_Type_POSITION=t.asm.sb).apply(null,arguments)},Vr=t._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return(Vr=t._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=t.asm.tb).apply(null,arguments)},Br=t._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(Br=t._emscripten_enum_draco_GeometryAttribute_Type_COLOR=t.asm.ub).apply(null,arguments)},Wr=t._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(Wr=t._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=t.asm.vb).apply(null,arguments)},Qr=t._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return(Qr=t._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=t.asm.wb).apply(null,arguments)},xr=t._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(xr=t._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=t.asm.xb).apply(null,arguments)},Yr=t._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return(Yr=t._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=t.asm.yb).apply(null,arguments)},Hr=t._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return(Hr=t._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=t.asm.zb).apply(null,arguments)},qr=t._emscripten_enum_draco_DataType_DT_INVALID=function(){return(qr=t._emscripten_enum_draco_DataType_DT_INVALID=t.asm.Ab).apply(null,arguments)},kr=t._emscripten_enum_draco_DataType_DT_INT8=function(){return(kr=t._emscripten_enum_draco_DataType_DT_INT8=t.asm.Bb).apply(null,arguments)},Xr=t._emscripten_enum_draco_DataType_DT_UINT8=function(){return(Xr=t._emscripten_enum_draco_DataType_DT_UINT8=t.asm.Cb).apply(null,arguments)},Kr=t._emscripten_enum_draco_DataType_DT_INT16=function(){return(Kr=t._emscripten_enum_draco_DataType_DT_INT16=t.asm.Db).apply(null,arguments)},Jr=t._emscripten_enum_draco_DataType_DT_UINT16=function(){return(Jr=t._emscripten_enum_draco_DataType_DT_UINT16=t.asm.Eb).apply(null,arguments)},$r=t._emscripten_enum_draco_DataType_DT_INT32=function(){return($r=t._emscripten_enum_draco_DataType_DT_INT32=t.asm.Fb).apply(null,arguments)},Zr=t._emscripten_enum_draco_DataType_DT_UINT32=function(){return(Zr=t._emscripten_enum_draco_DataType_DT_UINT32=t.asm.Gb).apply(null,arguments)},tn=t._emscripten_enum_draco_DataType_DT_INT64=function(){return(tn=t._emscripten_enum_draco_DataType_DT_INT64=t.asm.Hb).apply(null,arguments)},en=t._emscripten_enum_draco_DataType_DT_UINT64=function(){return(en=t._emscripten_enum_draco_DataType_DT_UINT64=t.asm.Ib).apply(null,arguments)},rn=t._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return(rn=t._emscripten_enum_draco_DataType_DT_FLOAT32=t.asm.Jb).apply(null,arguments)},nn=t._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(nn=t._emscripten_enum_draco_DataType_DT_FLOAT64=t.asm.Kb).apply(null,arguments)},on=t._emscripten_enum_draco_DataType_DT_BOOL=function(){return(on=t._emscripten_enum_draco_DataType_DT_BOOL=t.asm.Lb).apply(null,arguments)},_n=t._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(_n=t._emscripten_enum_draco_DataType_DT_TYPES_COUNT=t.asm.Mb).apply(null,arguments)},an=t._emscripten_enum_draco_StatusCode_OK=function(){return(an=t._emscripten_enum_draco_StatusCode_OK=t.asm.Nb).apply(null,arguments)},pn=t._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(pn=t._emscripten_enum_draco_StatusCode_DRACO_ERROR=t.asm.Ob).apply(null,arguments)},un=t._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(un=t._emscripten_enum_draco_StatusCode_IO_ERROR=t.asm.Pb).apply(null,arguments)},sn=t._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return(sn=t._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=t.asm.Qb).apply(null,arguments)},cn=t._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(cn=t._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=t.asm.Rb).apply(null,arguments)},yn=t._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(yn=t._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=t.asm.Sb).apply(null,arguments)};t._malloc=function(){return(t._malloc=t.asm.Tb).apply(null,arguments)},t._free=function(){return(t._free=t.asm.Ub).apply(null,arguments)};var ln=function(){return(ln=t.asm.Vb).apply(null,arguments)};t.___start_em_js=15856,t.___stop_em_js=15954;var it;if(rt=function e(){it||K(),it||(rt=e)},t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);0<t.preInit.length;)t.preInit.pop()();K(),f.prototype=Object.create(f.prototype),f.prototype.constructor=f,f.prototype.__class__=f,f.__cache__={},t.WrapperObject=f,t.getCache=T,t.wrapPointer=G,t.castObject=function(e,r){return G(e.ptr,r)},t.NULL=G(0),t.destroy=function(e){if(!e.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";e.__destroy__(),delete T(e.__class__)[e.ptr]},t.compare=function(e,r){return e.ptr===r.ptr},t.getPointer=function(e){return e.ptr},t.getClass=function(e){return e.__class__};var d={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(d.needed){for(var e=0;e<d.temps.length;e++)t._free(d.temps[e]);d.temps.length=0,t._free(d.buffer),d.buffer=0,d.size+=d.needed,d.needed=0}d.buffer||(d.size+=128,d.buffer=t._malloc(d.size),d.buffer||i(void 0)),d.pos=0},alloc:function(e,r){return d.buffer||i(void 0),e=e.length*r.BYTES_PER_ELEMENT,e=e+7&-8,d.pos+e>=d.size?(0<e||i(void 0),d.needed+=e,r=t._malloc(e),d.temps.push(r)):(r=d.buffer+d.pos,d.pos+=e),r},copy:function(e,r,n){switch(n>>>=0,r.BYTES_PER_ELEMENT){case 2:n>>>=1;break;case 4:n>>>=2;break;case 8:n>>>=3}for(var o=0;o<e.length;o++)r[n+o]=e[o]}};return H.prototype=Object.create(f.prototype),H.prototype.constructor=H,H.prototype.__class__=H,H.__cache__={},t.VoidPtr=H,H.prototype.__destroy__=H.prototype.__destroy__=function(){St(this.ptr)},B.prototype=Object.create(f.prototype),B.prototype.constructor=B,B.prototype.__class__=B,B.__cache__={},t.DecoderBuffer=B,B.prototype.Init=B.prototype.Init=function(e,r){var n=this.ptr;d.prepare(),typeof e=="object"&&(e=at(e)),r&&typeof r=="object"&&(r=r.ptr),Nt(n,e,r)},B.prototype.__destroy__=B.prototype.__destroy__=function(){Ut(this.ptr)},w.prototype=Object.create(f.prototype),w.prototype.constructor=w,w.prototype.__class__=w,w.__cache__={},t.AttributeTransformData=w,w.prototype.transform_type=w.prototype.transform_type=function(){return Lt(this.ptr)},w.prototype.__destroy__=w.prototype.__destroy__=function(){Ct(this.ptr)},Y.prototype=Object.create(f.prototype),Y.prototype.constructor=Y,Y.prototype.__class__=Y,Y.__cache__={},t.GeometryAttribute=Y,Y.prototype.__destroy__=Y.prototype.__destroy__=function(){zt(this.ptr)},A.prototype=Object.create(f.prototype),A.prototype.constructor=A,A.prototype.__class__=A,A.__cache__={},t.PointAttribute=A,A.prototype.size=A.prototype.size=function(){return Bt(this.ptr)},A.prototype.GetAttributeTransformData=A.prototype.GetAttributeTransformData=function(){return G(Wt(this.ptr),w)},A.prototype.attribute_type=A.prototype.attribute_type=function(){return Qt(this.ptr)},A.prototype.data_type=A.prototype.data_type=function(){return xt(this.ptr)},A.prototype.num_components=A.prototype.num_components=function(){return Yt(this.ptr)},A.prototype.normalized=A.prototype.normalized=function(){return!!Ht(this.ptr)},A.prototype.byte_stride=A.prototype.byte_stride=function(){return qt(this.ptr)},A.prototype.byte_offset=A.prototype.byte_offset=function(){return kt(this.ptr)},A.prototype.unique_id=A.prototype.unique_id=function(){return Xt(this.ptr)},A.prototype.__destroy__=A.prototype.__destroy__=function(){Kt(this.ptr)},E.prototype=Object.create(f.prototype),E.prototype.constructor=E,E.prototype.__class__=E,E.__cache__={},t.AttributeQuantizationTransform=E,E.prototype.InitFromAttribute=E.prototype.InitFromAttribute=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),!!$t(r,e)},E.prototype.quantization_bits=E.prototype.quantization_bits=function(){return Zt(this.ptr)},E.prototype.min_value=E.prototype.min_value=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),te(r,e)},E.prototype.range=E.prototype.range=function(){return ee(this.ptr)},E.prototype.__destroy__=E.prototype.__destroy__=function(){re(this.ptr)},j.prototype=Object.create(f.prototype),j.prototype.constructor=j,j.prototype.__class__=j,j.__cache__={},t.AttributeOctahedronTransform=j,j.prototype.InitFromAttribute=j.prototype.InitFromAttribute=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),!!oe(r,e)},j.prototype.quantization_bits=j.prototype.quantization_bits=function(){return _e(this.ptr)},j.prototype.__destroy__=j.prototype.__destroy__=function(){ie(this.ptr)},P.prototype=Object.create(f.prototype),P.prototype.constructor=P,P.prototype.__class__=P,P.__cache__={},t.PointCloud=P,P.prototype.num_attributes=P.prototype.num_attributes=function(){return pe(this.ptr)},P.prototype.num_points=P.prototype.num_points=function(){return ue(this.ptr)},P.prototype.__destroy__=P.prototype.__destroy__=function(){se(this.ptr)},O.prototype=Object.create(f.prototype),O.prototype.constructor=O,O.prototype.__class__=O,O.__cache__={},t.Mesh=O,O.prototype.num_faces=O.prototype.num_faces=function(){return ye(this.ptr)},O.prototype.num_attributes=O.prototype.num_attributes=function(){return le(this.ptr)},O.prototype.num_points=O.prototype.num_points=function(){return me(this.ptr)},O.prototype.__destroy__=O.prototype.__destroy__=function(){fe(this.ptr)},W.prototype=Object.create(f.prototype),W.prototype.constructor=W,W.prototype.__class__=W,W.__cache__={},t.Metadata=W,W.prototype.__destroy__=W.prototype.__destroy__=function(){be(this.ptr)},v.prototype=Object.create(f.prototype),v.prototype.constructor=v,v.prototype.__class__=v,v.__cache__={},t.Status=v,v.prototype.code=v.prototype.code=function(){return he(this.ptr)},v.prototype.ok=v.prototype.ok=function(){return!!Ae(this.ptr)},v.prototype.error_msg=v.prototype.error_msg=function(){return a(Te(this.ptr))},v.prototype.__destroy__=v.prototype.__destroy__=function(){De(this.ptr)},R.prototype=Object.create(f.prototype),R.prototype.constructor=R,R.prototype.__class__=R,R.__cache__={},t.DracoFloat32Array=R,R.prototype.GetValue=R.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),ge(r,e)},R.prototype.size=R.prototype.size=function(){return ve(this.ptr)},R.prototype.__destroy__=R.prototype.__destroy__=function(){Ee(this.ptr)},S.prototype=Object.create(f.prototype),S.prototype.constructor=S,S.prototype.__class__=S,S.__cache__={},t.DracoInt8Array=S,S.prototype.GetValue=S.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Oe(r,e)},S.prototype.size=S.prototype.size=function(){return je(this.ptr)},S.prototype.__destroy__=S.prototype.__destroy__=function(){Pe(this.ptr)},M.prototype=Object.create(f.prototype),M.prototype.constructor=M,M.prototype.__class__=M,M.__cache__={},t.DracoUInt8Array=M,M.prototype.GetValue=M.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Se(r,e)},M.prototype.size=M.prototype.size=function(){return Me(this.ptr)},M.prototype.__destroy__=M.prototype.__destroy__=function(){Ne(this.ptr)},N.prototype=Object.create(f.prototype),N.prototype.constructor=N,N.prototype.__class__=N,N.__cache__={},t.DracoInt16Array=N,N.prototype.GetValue=N.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Fe(r,e)},N.prototype.size=N.prototype.size=function(){return Le(this.ptr)},N.prototype.__destroy__=N.prototype.__destroy__=function(){Ce(this.ptr)},U.prototype=Object.create(f.prototype),U.prototype.constructor=U,U.prototype.__class__=U,U.__cache__={},t.DracoUInt16Array=U,U.prototype.GetValue=U.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),ze(r,e)},U.prototype.size=U.prototype.size=function(){return Ve(this.ptr)},U.prototype.__destroy__=U.prototype.__destroy__=function(){Be(this.ptr)},F.prototype=Object.create(f.prototype),F.prototype.constructor=F,F.prototype.__class__=F,F.__cache__={},t.DracoInt32Array=F,F.prototype.GetValue=F.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Qe(r,e)},F.prototype.size=F.prototype.size=function(){return xe(this.ptr)},F.prototype.__destroy__=F.prototype.__destroy__=function(){Ye(this.ptr)},L.prototype=Object.create(f.prototype),L.prototype.constructor=L,L.prototype.__class__=L,L.__cache__={},t.DracoUInt32Array=L,L.prototype.GetValue=L.prototype.GetValue=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),qe(r,e)},L.prototype.size=L.prototype.size=function(){return ke(this.ptr)},L.prototype.__destroy__=L.prototype.__destroy__=function(){Xe(this.ptr)},D.prototype=Object.create(f.prototype),D.prototype.constructor=D,D.prototype.__class__=D,D.__cache__={},t.MetadataQuerier=D,D.prototype.HasEntry=D.prototype.HasEntry=function(e,r){var n=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),!!Je(n,e,r)},D.prototype.GetIntEntry=D.prototype.GetIntEntry=function(e,r){var n=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),$e(n,e,r)},D.prototype.GetIntEntryArray=D.prototype.GetIntEntryArray=function(e,r,n){var o=this.ptr;d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),n&&typeof n=="object"&&(n=n.ptr),Ze(o,e,r,n)},D.prototype.GetDoubleEntry=D.prototype.GetDoubleEntry=function(e,r){var n=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),tr(n,e,r)},D.prototype.GetStringEntry=D.prototype.GetStringEntry=function(e,r){var n=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),a(er(n,e,r))},D.prototype.NumEntries=D.prototype.NumEntries=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),rr(r,e)},D.prototype.GetEntryName=D.prototype.GetEntryName=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),a(nr(n,e,r))},D.prototype.__destroy__=D.prototype.__destroy__=function(){or(this.ptr)},u.prototype=Object.create(f.prototype),u.prototype.constructor=u,u.prototype.__class__=u,u.__cache__={},t.Decoder=u,u.prototype.DecodeArrayToPointCloud=u.prototype.DecodeArrayToPointCloud=function(e,r,n){var o=this.ptr;return d.prepare(),typeof e=="object"&&(e=at(e)),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),G(ir(o,e,r,n),v)},u.prototype.DecodeArrayToMesh=u.prototype.DecodeArrayToMesh=function(e,r,n){var o=this.ptr;return d.prepare(),typeof e=="object"&&(e=at(e)),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),G(ar(o,e,r,n),v)},u.prototype.GetAttributeId=u.prototype.GetAttributeId=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),pr(n,e,r)},u.prototype.GetAttributeIdByName=u.prototype.GetAttributeIdByName=function(e,r){var n=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),ur(n,e,r)},u.prototype.GetAttributeIdByMetadataEntry=u.prototype.GetAttributeIdByMetadataEntry=function(e,r,n){var o=this.ptr;return d.prepare(),e&&typeof e=="object"&&(e=e.ptr),r=r&&typeof r=="object"?r.ptr:V(r),n=n&&typeof n=="object"?n.ptr:V(n),sr(o,e,r,n)},u.prototype.GetAttribute=u.prototype.GetAttribute=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),G(cr(n,e,r),A)},u.prototype.GetAttributeByUniqueId=u.prototype.GetAttributeByUniqueId=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),G(yr(n,e,r),A)},u.prototype.GetMetadata=u.prototype.GetMetadata=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),G(lr(r,e),W)},u.prototype.GetAttributeMetadata=u.prototype.GetAttributeMetadata=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),G(mr(n,e,r),W)},u.prototype.GetFaceFromMesh=u.prototype.GetFaceFromMesh=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!fr(o,e,r,n)},u.prototype.GetTriangleStripsFromMesh=u.prototype.GetTriangleStripsFromMesh=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),dr(n,e,r)},u.prototype.GetTrianglesUInt16Array=u.prototype.GetTrianglesUInt16Array=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!br(o,e,r,n)},u.prototype.GetTrianglesUInt32Array=u.prototype.GetTrianglesUInt32Array=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!hr(o,e,r,n)},u.prototype.GetAttributeFloat=u.prototype.GetAttributeFloat=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Ar(o,e,r,n)},u.prototype.GetAttributeFloatForAllPoints=u.prototype.GetAttributeFloatForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Tr(o,e,r,n)},u.prototype.GetAttributeIntForAllPoints=u.prototype.GetAttributeIntForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Dr(o,e,r,n)},u.prototype.GetAttributeInt8ForAllPoints=u.prototype.GetAttributeInt8ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Ir(o,e,r,n)},u.prototype.GetAttributeUInt8ForAllPoints=u.prototype.GetAttributeUInt8ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!gr(o,e,r,n)},u.prototype.GetAttributeInt16ForAllPoints=u.prototype.GetAttributeInt16ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!vr(o,e,r,n)},u.prototype.GetAttributeUInt16ForAllPoints=u.prototype.GetAttributeUInt16ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Er(o,e,r,n)},u.prototype.GetAttributeInt32ForAllPoints=u.prototype.GetAttributeInt32ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Gr(o,e,r,n)},u.prototype.GetAttributeUInt32ForAllPoints=u.prototype.GetAttributeUInt32ForAllPoints=function(e,r,n){var o=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),!!Or(o,e,r,n)},u.prototype.GetAttributeDataArrayForAllPoints=u.prototype.GetAttributeDataArrayForAllPoints=function(e,r,n,o,m){var b=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),n&&typeof n=="object"&&(n=n.ptr),o&&typeof o=="object"&&(o=o.ptr),m&&typeof m=="object"&&(m=m.ptr),!!jr(b,e,r,n,o,m)},u.prototype.SkipAttributeTransform=u.prototype.SkipAttributeTransform=function(e){var r=this.ptr;e&&typeof e=="object"&&(e=e.ptr),Pr(r,e)},u.prototype.GetEncodedGeometryType_Deprecated=u.prototype.GetEncodedGeometryType_Deprecated=function(e){var r=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),Rr(r,e)},u.prototype.DecodeBufferToPointCloud=u.prototype.DecodeBufferToPointCloud=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),G(Sr(n,e,r),v)},u.prototype.DecodeBufferToMesh=u.prototype.DecodeBufferToMesh=function(e,r){var n=this.ptr;return e&&typeof e=="object"&&(e=e.ptr),r&&typeof r=="object"&&(r=r.ptr),G(Mr(n,e,r),v)},u.prototype.__destroy__=u.prototype.__destroy__=function(){Nr(this.ptr)},function(){function e(){t.ATTRIBUTE_INVALID_TRANSFORM=Ur(),t.ATTRIBUTE_NO_TRANSFORM=Fr(),t.ATTRIBUTE_QUANTIZATION_TRANSFORM=Lr(),t.ATTRIBUTE_OCTAHEDRON_TRANSFORM=Cr(),t.INVALID=wr(),t.POSITION=zr(),t.NORMAL=Vr(),t.COLOR=Br(),t.TEX_COORD=Wr(),t.GENERIC=Qr(),t.INVALID_GEOMETRY_TYPE=xr(),t.POINT_CLOUD=Yr(),t.TRIANGULAR_MESH=Hr(),t.DT_INVALID=qr(),t.DT_INT8=kr(),t.DT_UINT8=Xr(),t.DT_INT16=Kr(),t.DT_UINT16=Jr(),t.DT_INT32=$r(),t.DT_UINT32=Zr(),t.DT_INT64=tn(),t.DT_UINT64=en(),t.DT_FLOAT32=rn(),t.DT_FLOAT64=nn(),t.DT_BOOL=on(),t.DT_TYPES_COUNT=_n(),t.OK=an(),t.DRACO_ERROR=pn(),t.IO_ERROR=un(),t.INVALID_PARAMETER=sn(),t.UNSUPPORTED_VERSION=cn(),t.UNKNOWN_VERSION=yn()}Rt?e():ct.unshift(e)}(),typeof t.onModuleParsed=="function"&&t.onModuleParsed(),t.Decoder.prototype.GetEncodedGeometryType=function(e){if(e.__class__&&e.__class__===t.DecoderBuffer)return t.Decoder.prototype.GetEncodedGeometryType_Deprecated(e);if(8>e.byteLength)return t.INVALID_GEOMETRY_TYPE;switch(e[7]){case 0:return t.POINT_CLOUD;case 1:return t.TRIANGULAR_MESH;default:return t.INVALID_GEOMETRY_TYPE}},c.ready}}();typeof nt=="object"&&typeof bt=="object"?bt.exports=dt:typeof define=="function"&&define.amd?define([],function(){return dt}):typeof nt=="object"&&(nt.DracoDecoderModule=dt)});export{Dn as a};
public/CimSDK/Workers/chunk-TBSK33NR.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as P}from"./chunk-LSAUAD4X.js";import{a as j,b as d}from"./chunk-AIYLFSI3.js";import{a as O}from"./chunk-FBQDLPON.js";import{a as A,b as m,g as u}from"./chunk-HMXXHGCW.js";import{b as e,d as l,e as _}from"./chunk-VDZXURWO.js";import{a as g}from"./chunk-5HWP5DW7.js";import{a as y,b as p}from"./chunk-3K67FZLU.js";import{e as r}from"./chunk-55TU6MJR.js";var x=new A;function s(n,t){if(p.defined("origin",n),t=g(t,_.default),n=t.scaleToGeodeticSurface(n),!r(n))throw new y("origin must not be at the center of the ellipsoid.");let o=u.eastNorthUpToFixedFrame(n,t);this._ellipsoid=t,this._origin=n,this._xAxis=e.fromCartesian4(m.getColumn(o,0,x)),this._yAxis=e.fromCartesian4(m.getColumn(o,1,x));let i=e.fromCartesian4(m.getColumn(o,2,x));this._plane=O.fromPointNormal(n,i)}Object.defineProperties(s.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 C=new P;s.fromPoints=function(n,t){p.defined("cartesians",n);let o=P.fromPoints(n,C);return new s(o.center,t)};var w=new j,h=new e;s.prototype.projectPointOntoPlane=function(n,t){p.defined("cartesian",n);let o=w;o.origin=n,e.normalize(n,o.direction);let i=d.rayPlane(o,this._plane,h);if(r(i)||(e.negate(o.direction,o.direction),i=d.rayPlane(o,this._plane,h)),r(i)){let c=e.subtract(i,this._origin,i),a=e.dot(this._xAxis,c),f=e.dot(this._yAxis,c);return r(t)?(t.x=a,t.y=f,t):new l(a,f)}};s.prototype.projectPointsOntoPlane=function(n,t){p.defined("cartesians",n),r(t)||(t=[]);let o=0,i=n.length;for(let c=0;c<i;c++){let a=this.projectPointOntoPlane(n[c],t[o]);r(a)&&(t[o]=a,o++)}return t.length=o,t};s.prototype.projectPointToNearestOnPlane=function(n,t){p.defined("cartesian",n),r(t)||(t=new l);let o=w;o.origin=n,e.clone(this._plane.normal,o.direction);let i=d.rayPlane(o,this._plane,h);r(i)||(e.negate(o.direction,o.direction),i=d.rayPlane(o,this._plane,h));let c=e.subtract(i,this._origin,i),a=e.dot(this._xAxis,c),f=e.dot(this._yAxis,c);return t.x=a,t.y=f,t};s.prototype.projectPointsToNearestOnPlane=function(n,t){p.defined("cartesians",n),r(t)||(t=[]);let o=n.length;t.length=o;for(let i=0;i<o;i++)t[i]=this.projectPointToNearestOnPlane(n[i],t[i]);return t};var T=new e;s.prototype.projectPointOntoEllipsoid=function(n,t){p.defined("cartesian",n),r(t)||(t=new e);let o=this._ellipsoid,i=this._origin,c=this._xAxis,a=this._yAxis,f=T;return e.multiplyByScalar(c,n.x,f),t=e.add(i,f,t),e.multiplyByScalar(a,n.y,f),e.add(t,f,t),o.scaleToGeocentricSurface(t,t),t};s.prototype.projectPointsOntoEllipsoid=function(n,t){p.defined("cartesians",n);let o=n.length;r(t)?t.length=o:t=new Array(o);for(let i=0;i<o;++i)t[i]=this.projectPointOntoEllipsoid(n[i],t[i]);return t};var M=s;export{M as a};
public/CimSDK/Workers/chunk-TGH7B4GN.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as Z}from"./chunk-XDTNLL4L.js";import{a as R}from"./chunk-TBSK33NR.js";import{a as ae,b as v,f as _,g as se,h as le}from"./chunk-HMXXHGCW.js";import{b as e,c as ce,d as $,f as j}from"./chunk-VDZXURWO.js";import{a as Q}from"./chunk-UEFEFMYS.js";var we={ROUNDED:0,MITERED:1,BEVELED:2},L=Object.freeze(we);var g=[new e,new e],ge=new e,pe=new e,xe=new e,Se=new e,Te=new e,Ee=new e,Be=new e,Ce=new e,ze=new e,P=new e,W=new e,I={},ee=new ce;function Ae(o,c){let a=new Array(o.length);for(let r=0;r<o.length;r++){let t=o[r];ee=c.cartesianToCartographic(t,ee),a[r]=ee.height,o[r]=c.scaleToGeodeticSurface(t,t)}return a}function te(o,c,a,r){let t=o[0],n=o[1],f=e.angleBetween(t,n),s=Math.ceil(f/r),m=new Array(s),l;if(c===a){for(l=0;l<s;l++)m[l]=c;return m.push(a),m}let y=(a-c)/s;for(l=1;l<s;l++){let x=c+l*y;m[l]=x}return m[0]=c,m.push(a),m}var X=new e,Y=new e;function Oe(o,c,a,r){let t=new R(a,r),n=t.projectPointOntoPlane(e.add(a,o,X),X),f=t.projectPointOntoPlane(e.add(a,c,Y),Y),s=$.angleBetween(n,f);return f.x*n.y-f.y*n.x>=0?-s:s}var je=new e(-1,0,0),N=new v,De=new v,re=new j,Me=j.IDENTITY.clone(),ve=new e,Ne=new ae,ie=new e;function D(o,c,a,r,t,n,f,s){let m=ve,l=Ne;N=se.eastNorthUpToFixedFrame(o,t,N),m=v.multiplyByPointAsVector(N,je,m),m=e.normalize(m,m);let T=Oe(m,c,o,t);re=j.fromRotationZ(T,re),ie.z=n,N=v.multiplyTransformation(N,v.fromRotationTranslation(re,ie,De),N);let y=Me;y[0]=f;for(let x=0;x<s;x++)for(let i=0;i<a.length;i+=3)l=e.fromArray(a,i,l),l=j.multiplyByVector(y,l,l),l=v.multiplyByPoint(N,l,l),r.push(l.x,l.y,l.z);return r}var Ve=new e;function ne(o,c,a,r,t,n,f){for(let s=0;s<o.length;s+=3){let m=e.fromArray(o,s,Ve);r=D(m,c,a,r,t,n[s/3],f,1)}return r}function be(o,c){let a=o.length,r=new Array(a*6),t=0,n=c.x+c.width/2,f=c.y+c.height/2,s=o[0];r[t++]=s.x-n,r[t++]=0,r[t++]=s.y-f;for(let m=1;m<a;m++){s=o[m];let l=s.x-n,T=s.y-f;r[t++]=l,r[t++]=0,r[t++]=T,r[t++]=l,r[t++]=0,r[t++]=T}return s=o[0],r[t++]=s.x-n,r[t++]=0,r[t++]=s.y-f,r}function fe(o,c){let a=o.length,r=new Array(a*3),t=0,n=c.x+c.width/2,f=c.y+c.height/2;for(let s=0;s<a;s++)r[t++]=o[s].x-n,r[t++]=0,r[t++]=o[s].y-f;return r}var me=new _,ue=new e,he=new j;function ye(o,c,a,r,t,n,f,s,m,l){let T=e.angleBetween(e.subtract(c,o,P),e.subtract(a,o,W)),y=r===L.BEVELED?0:Math.ceil(T/Q.toRadians(5)),x;t?x=j.fromQuaternion(_.fromAxisAngle(e.negate(o,P),T/(y+1),me),he):x=j.fromQuaternion(_.fromAxisAngle(o,T/(y+1),me),he);let i,d;if(c=e.clone(c,ue),y>0){let M=l?2:1;for(let w=0;w<y;w++)c=j.multiplyByVector(x,c,c),i=e.subtract(c,o,P),i=e.normalize(i,i),t||(i=e.negate(i,i)),d=n.scaleToGeodeticSurface(c,W),f=D(d,i,s,f,n,m,1,M)}else i=e.subtract(c,o,P),i=e.normalize(i,i),t||(i=e.negate(i,i)),d=n.scaleToGeodeticSurface(c,W),f=D(d,i,s,f,n,m,1,1),a=e.clone(a,ue),i=e.subtract(a,o,P),i=e.normalize(i,i),t||(i=e.negate(i,i)),d=n.scaleToGeodeticSurface(a,W),f=D(d,i,s,f,n,m,1,1);return f}I.removeDuplicatesFromShape=function(o){let c=o.length,a=[];for(let r=c-1,t=0;t<c;r=t++){let n=o[r],f=o[t];$.equals(n,f)||a.push(f)}return a};I.angleIsGreaterThanPi=function(o,c,a,r){let t=new R(a,r),n=t.projectPointOntoPlane(e.add(a,o,X),X),f=t.projectPointOntoPlane(e.add(a,c,Y),Y);return f.x*n.y-f.y*n.x>=0};var Fe=new e,Ge=new e;I.computePositions=function(o,c,a,r,t){let n=r._ellipsoid,f=Ae(o,n),s=r._granularity,m=r._cornerType,l=t?be(c,a):fe(c,a),T=t?fe(c,a):void 0,y=a.height/2,x=a.width/2,i=o.length,d=[],M=t?[]:void 0,w=ge,O=pe,h=xe,S=Se,B=Te,C=Ee,z=Be,u=Ce,E=ze,p=o[0],V=o[1];S=n.geodeticSurfaceNormal(p,S),w=e.subtract(V,p,w),w=e.normalize(w,w),u=e.cross(S,w,u),u=e.normalize(u,u);let b=f[0],A=f[1];t&&(M=D(p,u,T,M,n,b+y,1,1)),E=e.clone(p,E),p=V,O=e.negate(w,O);let F,G;for(let U=1;U<i-1;U++){let oe=t?2:1;if(V=o[U+1],p.equals(V)){le("Positions are too close and are considered equivalent with rounding error.");continue}w=e.subtract(V,p,w),w=e.normalize(w,w),S=n.geodeticSurfaceNormal(p,S);let q=e.multiplyByScalar(S,e.dot(w,S),Fe);e.subtract(w,q,q),e.normalize(q,q);let H=e.multiplyByScalar(S,e.dot(O,S),Ge);if(e.subtract(O,H,H),e.normalize(H,H),!Q.equalsEpsilon(Math.abs(e.dot(q,H)),1,Q.EPSILON7)){h=e.add(w,O,h),h=e.normalize(h,h),h=e.cross(h,S,h),h=e.cross(S,h,h),h=e.normalize(h,h);let k=1/Math.max(.25,e.magnitude(e.cross(h,O,P))),K=I.angleIsGreaterThanPi(w,O,p,n);K?(B=e.add(p,e.multiplyByScalar(h,k*x,h),B),C=e.add(B,e.multiplyByScalar(u,x,C),C),g[0]=e.clone(E,g[0]),g[1]=e.clone(C,g[1]),F=te(g,b+y,A+y,s),G=Z.generateArc({positions:g,granularity:s,ellipsoid:n}),d=ne(G,u,l,d,n,F,1),u=e.cross(S,w,u),u=e.normalize(u,u),z=e.add(B,e.multiplyByScalar(u,x,z),z),m===L.ROUNDED||m===L.BEVELED?ye(B,C,z,m,K,n,d,l,A+y,t):(h=e.negate(h,h),d=D(p,h,l,d,n,A+y,k,oe)),E=e.clone(z,E)):(B=e.add(p,e.multiplyByScalar(h,k*x,h),B),C=e.add(B,e.multiplyByScalar(u,-x,C),C),g[0]=e.clone(E,g[0]),g[1]=e.clone(C,g[1]),F=te(g,b+y,A+y,s),G=Z.generateArc({positions:g,granularity:s,ellipsoid:n}),d=ne(G,u,l,d,n,F,1),u=e.cross(S,w,u),u=e.normalize(u,u),z=e.add(B,e.multiplyByScalar(u,-x,z),z),m===L.ROUNDED||m===L.BEVELED?ye(B,C,z,m,K,n,d,l,A+y,t):d=D(p,h,l,d,n,A+y,k,oe),E=e.clone(z,E)),O=e.negate(w,O)}else d=D(E,u,l,d,n,b+y,1,1),E=p;b=A,A=f[U+1],p=V}g[0]=e.clone(E,g[0]),g[1]=e.clone(p,g[1]),F=te(g,b+y,A+y,s),G=Z.generateArc({positions:g,granularity:s,ellipsoid:n}),d=ne(G,u,l,d,n,F,1),t&&(M=D(p,u,T,M,n,A+y,1,1)),i=d.length;let de=t?i+M.length:i,J=new Float64Array(de);return J.set(d),t&&J.set(M,i),J};var $e=I;export{L as a,$e as b};
public/CimSDK/Workers/chunk-TMZSBMX2.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as h}from"./chunk-W5L3OOEF.js";import{b as n,d as y,f as a}from"./chunk-VDZXURWO.js";import{b as f}from"./chunk-3K67FZLU.js";var x={},b=new n,P=new n,B=new n,M=new n,w=new h;x.validOutline=function(i){f.defined("positions",i);let o=h.fromPoints(i,w).halfAxes,e=a.getColumn(o,0,P),r=a.getColumn(o,1,B),t=a.getColumn(o,2,M),u=n.magnitude(e),s=n.magnitude(r),l=n.magnitude(t);return!(u===0&&(s===0||l===0)||s===0&&l===0)};x.computeProjectTo2DArguments=function(i,c,o,e){f.defined("positions",i),f.defined("centerResult",c),f.defined("planeAxis1Result",o),f.defined("planeAxis2Result",e);let r=h.fromPoints(i,w),t=r.halfAxes,u=a.getColumn(t,0,P),s=a.getColumn(t,1,B),l=a.getColumn(t,2,M),A=n.magnitude(u),d=n.magnitude(s),g=n.magnitude(l),m=Math.min(A,d,g);if(A===0&&(d===0||g===0)||d===0&&g===0)return!1;let p,C;return(m===d||m===g)&&(p=u),m===A?p=s:m===g&&(C=s),(m===A||m===d)&&(C=l),n.normalize(p,o),n.normalize(C,e),n.clone(r.center,c),!0};function z(i,c,o,e,r){let t=n.subtract(i,c,b),u=n.dot(o,t),s=n.dot(e,t);return y.fromElements(u,s,r)}x.createProjectPointsTo2DFunction=function(i,c,o){return function(e){let r=new Array(e.length);for(let t=0;t<e.length;t++)r[t]=z(e[t],i,c,o);return r}};x.createProjectPointTo2DFunction=function(i,c,o){return function(e,r){return z(e,i,c,o,r)}};var O=x;export{O as a};
public/CimSDK/Workers/chunk-UEFEFMYS.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as f}from"./chunk-5HWP5DW7.js";import{a as n,b as c}from"./chunk-3K67FZLU.js";import{c as I,d as _,e as o}from"./chunk-55TU6MJR.js";var P=I((O,d)=>{var u=function(t){t==null&&(t=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,t.constructor==Array?this.init_by_array(t,t.length):this.init_seed(t)};u.prototype.init_seed=function(t){for(this.mt[0]=t>>>0,this.mti=1;this.mti<this.N;this.mti++){var t=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((t&4294901760)>>>16)*1812433253<<16)+(t&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}};u.prototype.init_by_array=function(t,i){var e,s,h;for(this.init_seed(19650218),e=1,s=0,h=this.N>i?this.N:i;h;h--){var a=this.mt[e-1]^this.mt[e-1]>>>30;this.mt[e]=(this.mt[e]^(((a&4294901760)>>>16)*1664525<<16)+(a&65535)*1664525)+t[s]+s,this.mt[e]>>>=0,e++,s++,e>=this.N&&(this.mt[0]=this.mt[this.N-1],e=1),s>=i&&(s=0)}for(h=this.N-1;h;h--){var a=this.mt[e-1]^this.mt[e-1]>>>30;this.mt[e]=(this.mt[e]^(((a&4294901760)>>>16)*1566083941<<16)+(a&65535)*1566083941)-e,this.mt[e]>>>=0,e++,e>=this.N&&(this.mt[0]=this.mt[this.N-1],e=1)}this.mt[0]=2147483648};u.prototype.random_int=function(){var t,i=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var e;for(this.mti==this.N+1&&this.init_seed(5489),e=0;e<this.N-this.M;e++)t=this.mt[e]&this.UPPER_MASK|this.mt[e+1]&this.LOWER_MASK,this.mt[e]=this.mt[e+this.M]^t>>>1^i[t&1];for(;e<this.N-1;e++)t=this.mt[e]&this.UPPER_MASK|this.mt[e+1]&this.LOWER_MASK,this.mt[e]=this.mt[e+(this.M-this.N)]^t>>>1^i[t&1];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^i[t&1],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,t^=t>>>18,t>>>0};u.prototype.random_int31=function(){return this.random_int()>>>1};u.prototype.random_incl=function(){return this.random_int()*(1/4294967295)};u.prototype.random=function(){return this.random_int()*(1/4294967296)};u.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)};u.prototype.random_long=function(){var t=this.random_int()>>>5,i=this.random_int()>>>6;return(t*67108864+i)*(1/9007199254740992)};d.exports=u});var m=_(P(),1);var r={};r.EPSILON1=.1;r.EPSILON2=.01;r.EPSILON3=.001;r.EPSILON4=1e-4;r.EPSILON5=1e-5;r.EPSILON6=1e-6;r.EPSILON7=1e-7;r.EPSILON8=1e-8;r.EPSILON9=1e-9;r.EPSILON10=1e-10;r.EPSILON11=1e-11;r.EPSILON12=1e-12;r.EPSILON13=1e-13;r.EPSILON14=1e-14;r.EPSILON15=1e-15;r.EPSILON16=1e-16;r.EPSILON17=1e-17;r.EPSILON18=1e-18;r.EPSILON19=1e-19;r.EPSILON20=1e-20;r.EPSILON21=1e-21;r.GRAVITATIONALPARAMETER=3986004418e5;r.SOLAR_RADIUS=6955e5;r.LUNAR_RADIUS=1737400;r.SIXTY_FOUR_KILOBYTES=64*1024;r.FOUR_GIGABYTES=4*1024*1024*1024;r.sign=f(Math.sign,function(i){return i=+i,i===0||i!==i?i:i>0?1:-1});r.signNotZero=function(t){return t<0?-1:1};r.toSNorm=function(t,i){return i=f(i,255),Math.round((r.clamp(t,-1,1)*.5+.5)*i)};r.fromSNorm=function(t,i){return i=f(i,255),r.clamp(t,0,i)/i*2-1};r.normalize=function(t,i,e){return e=Math.max(e-i,0),e===0?0:r.clamp((t-i)/e,0,1)};r.sinh=f(Math.sinh,function(i){return(Math.exp(i)-Math.exp(-i))/2});r.cosh=f(Math.cosh,function(i){return(Math.exp(i)+Math.exp(-i))/2});r.lerp=function(t,i,e){return(1-e)*t+e*i};r.PI=Math.PI;r.ONE_OVER_PI=1/Math.PI;r.PI_OVER_TWO=Math.PI/2;r.PI_OVER_THREE=Math.PI/3;r.PI_OVER_FOUR=Math.PI/4;r.PI_OVER_SIX=Math.PI/6;r.THREE_PI_OVER_TWO=3*Math.PI/2;r.TWO_PI=2*Math.PI;r.ONE_OVER_TWO_PI=1/(2*Math.PI);r.RADIANS_PER_DEGREE=Math.PI/180;r.DEGREES_PER_RADIAN=180/Math.PI;r.RADIANS_PER_ARCSECOND=r.RADIANS_PER_DEGREE/3600;r.toRadians=function(t){if(!o(t))throw new n("degrees is required.");return t*r.RADIANS_PER_DEGREE};r.toDegrees=function(t){if(!o(t))throw new n("radians is required.");return t*r.DEGREES_PER_RADIAN};r.convertLongitudeRange=function(t){if(!o(t))throw new n("angle is required.");let i=r.TWO_PI,e=t-Math.floor(t/i)*i;return e<-Math.PI?e+i:e>=Math.PI?e-i:e};r.clampToLatitudeRange=function(t){if(!o(t))throw new n("angle is required.");return r.clamp(t,-1*r.PI_OVER_TWO,r.PI_OVER_TWO)};r.negativePiToPi=function(t){if(!o(t))throw new n("angle is required.");return t>=-r.PI&&t<=r.PI?t:r.zeroToTwoPi(t+r.PI)-r.PI};r.zeroToTwoPi=function(t){if(!o(t))throw new n("angle is required.");if(t>=0&&t<=r.TWO_PI)return t;let i=r.mod(t,r.TWO_PI);return Math.abs(i)<r.EPSILON14&&Math.abs(t)>r.EPSILON14?r.TWO_PI:i};r.mod=function(t,i){if(!o(t))throw new n("m is required.");if(!o(i))throw new n("n is required.");if(i===0)throw new n("divisor cannot be 0.");return r.sign(t)===r.sign(i)&&Math.abs(t)<Math.abs(i)?t:(t%i+i)%i};r.equalsEpsilon=function(t,i,e,s){if(!o(t))throw new n("left is required.");if(!o(i))throw new n("right is required.");e=f(e,0),s=f(s,e);let h=Math.abs(t-i);return h<=s||h<=e*Math.max(Math.abs(t),Math.abs(i))};r.lessThan=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i<-e};r.lessThanOrEquals=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i<e};r.greaterThan=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i>e};r.greaterThanOrEquals=function(t,i,e){if(!o(t))throw new n("first is required.");if(!o(i))throw new n("second is required.");if(!o(e))throw new n("absoluteEpsilon is required.");return t-i>-e};var w=[1];r.factorial=function(t){if(typeof t!="number"||t<0)throw new n("A number greater than or equal to 0 is required.");let i=w.length;if(t>=i){let e=w[i-1];for(let s=i;s<=t;s++){let h=e*s;w.push(h),e=h}}return w[t]};r.incrementWrap=function(t,i,e){if(e=f(e,0),!o(t))throw new n("n is required.");if(i<=e)throw new n("maximumValue must be greater than minimumValue.");return++t,t>i&&(t=e),t};r.isPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>4294967295)throw new n("A number between 0 and (2^32)-1 is required.");return t!==0&&(t&t-1)===0};r.nextPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>2147483648)throw new n("A number between 0 and 2^31 is required.");return--t,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t,t};r.previousPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>4294967295)throw new n("A number between 0 and (2^32)-1 is required.");return t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t|=t>>32,t=(t>>>0)-(t>>>1),t};r.clamp=function(t,i,e){return c.typeOf.number("value",t),c.typeOf.number("min",i),c.typeOf.number("max",e),t<i?i:t>e?e:t};var E=new m.default;r.setRandomNumberSeed=function(t){if(!o(t))throw new n("seed is required.");E=new m.default(t)};r.nextRandomNumber=function(){return E.random()};r.randomBetween=function(t,i){return r.nextRandomNumber()*(i-t)+t};r.acosClamped=function(t){if(!o(t))throw new n("value is required.");return Math.acos(r.clamp(t,-1,1))};r.asinClamped=function(t){if(!o(t))throw new n("value is required.");return Math.asin(r.clamp(t,-1,1))};r.chordLength=function(t,i){if(!o(t))throw new n("angle is required.");if(!o(i))throw new n("radius is required.");return 2*i*Math.sin(t*.5)};r.logBase=function(t,i){if(!o(t))throw new n("number is required.");if(!o(i))throw new n("base is required.");return Math.log(t)/Math.log(i)};r.cbrt=f(Math.cbrt,function(i){let e=Math.pow(Math.abs(i),.3333333333333333);return i<0?-e:e});r.log2=f(Math.log2,function(i){return Math.log(i)*Math.LOG2E});r.fog=function(t,i){let e=t*i;return 1-Math.exp(-(e*e))};r.fastApproximateAtan=function(t){return c.typeOf.number("x",t),t*(-.1784*Math.abs(t)-.0663*t*t+1.0301)};r.fastApproximateAtan2=function(t,i){c.typeOf.number("x",t),c.typeOf.number("y",i);let e,s=Math.abs(t);e=Math.abs(i);let h=Math.max(s,e);e=Math.min(s,e);let a=e/h;if(isNaN(a))throw new n("either x or y must be nonzero");return s=r.fastApproximateAtan(a),s=Math.abs(i)>Math.abs(t)?r.PI_OVER_TWO-s:s,s=t<0?r.PI-s:s,s=i<0?-s:s,s};var A=r;export{A as a};
public/CimSDK/Workers/chunk-V5KKODOM.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{b as p,c as P,e as q}from"./chunk-VDZXURWO.js";import{a}from"./chunk-UEFEFMYS.js";import{a as T}from"./chunk-5HWP5DW7.js";import{a as I,b as g}from"./chunk-3K67FZLU.js";import{e as l}from"./chunk-55TU6MJR.js";function y(n,i,o){if(n===0)return i*o;let t=n*n,e=t*t,c=e*t,r=c*t,h=r*t,s=h*t,d=o,u=Math.sin(2*d),f=Math.sin(4*d),M=Math.sin(6*d),_=Math.sin(8*d),E=Math.sin(10*d),S=Math.sin(12*d);return i*((1-t/4-3*e/64-5*c/256-175*r/16384-441*h/65536-4851*s/1048576)*d-(3*t/8+3*e/32+45*c/1024+105*r/4096+2205*h/131072+6237*s/524288)*u+(15*e/256+45*c/1024+525*r/16384+1575*h/65536+155925*s/8388608)*f-(35*c/3072+175*r/12288+3675*h/262144+13475*s/1048576)*M+(315*r/131072+2205*h/524288+43659*s/8388608)*_-(693*h/1310720+6237*s/5242880)*E+1001*s/8388608*S)}function z(n,i,o){let t=n/o;if(i===0)return t;let e=t*t,c=e*t,r=c*t,h=i,s=h*h,d=s*s,u=d*s,f=u*s,M=f*s,_=M*s,E=Math.sin(2*t),S=Math.cos(2*t),W=Math.sin(4*t),V=Math.cos(4*t),C=Math.sin(6*t),N=Math.cos(6*t),R=Math.sin(8*t),b=Math.cos(8*t),x=Math.sin(10*t),U=Math.cos(10*t),H=Math.sin(12*t);return t+t*s/4+7*t*d/64+15*t*u/256+579*t*f/16384+1515*t*M/65536+16837*t*_/1048576+(3*t*d/16+45*t*u/256-t*(32*e-561)*f/4096-t*(232*e-1677)*M/16384+t*(399985-90560*e+512*r)*_/5242880)*S+(21*t*u/256+483*t*f/4096-t*(224*e-1969)*M/16384-t*(33152*e-112599)*_/1048576)*V+(151*t*f/4096+4681*t*M/65536+1479*t*_/16384-453*c*_/32768)*N+(1097*t*M/65536+42783*t*_/1048576)*b+8011*t*_/1048576*U+(3*s/8+3*d/16+213*u/2048-3*e*u/64+255*f/4096-33*e*f/512+20861*M/524288-33*e*M/512+r*M/1024+28273*_/1048576-471*e*_/8192+9*r*_/4096)*E+(21*d/256+21*u/256+533*f/8192-21*e*f/512+197*M/4096-315*e*M/4096+584039*_/16777216-12517*e*_/131072+7*r*_/2048)*W+(151*u/6144+151*f/4096+5019*M/131072-453*e*M/16384+26965*_/786432-8607*e*_/131072)*C+(1097*f/131072+1097*M/65536+225797*_/10485760-1097*e*_/65536)*R+(8011*M/2621440+8011*_/1048576)*x+293393*_/251658240*H}function O(n,i){if(n===0)return Math.log(Math.tan(.5*(a.PI_OVER_TWO+i)));let o=n*Math.sin(i);return Math.log(Math.tan(.5*(a.PI_OVER_TWO+i)))-n/2*Math.log((1+o)/(1-o))}function k(n,i,o,t,e){let c=O(n._ellipticity,o),r=O(n._ellipticity,e);return Math.atan2(a.negativePiToPi(t-i),r-c)}function A(n,i,o,t,e,c,r){let h=n._heading,s=c-t,d=0;if(a.equalsEpsilon(Math.abs(h),a.PI_OVER_TWO,a.EPSILON8))if(i===o)d=i*Math.cos(e)*a.negativePiToPi(s);else{let u=Math.sin(e);d=i*Math.cos(e)*a.negativePiToPi(s)/Math.sqrt(1-n._ellipticitySquared*u*u)}else{let u=y(n._ellipticity,i,e);d=(y(n._ellipticity,i,r)-u)/Math.cos(h)}return Math.abs(d)}var B=new p,w=new p;function D(n,i,o,t){let e=p.normalize(t.cartographicToCartesian(i,w),B),c=p.normalize(t.cartographicToCartesian(o,w),w);g.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(p.angleBetween(e,c))-Math.PI),.0125);let r=t.maximumRadius,h=t.minimumRadius,s=r*r,d=h*h;n._ellipticitySquared=(s-d)/s,n._ellipticity=Math.sqrt(n._ellipticitySquared),n._start=P.clone(i,n._start),n._start.height=0,n._end=P.clone(o,n._end),n._end.height=0,n._heading=k(n,i.longitude,i.latitude,o.longitude,o.latitude),n._distance=A(n,t.maximumRadius,t.minimumRadius,i.longitude,i.latitude,o.longitude,o.latitude)}function v(n,i,o,t,e,c){if(o===0)return P.clone(n,c);let r=e*e,h,s,d;if(Math.abs(a.PI_OVER_TWO-Math.abs(i))>a.EPSILON8){let u=y(e,t,n.latitude),f=o*Math.cos(i),M=u+f;if(s=z(M,e,t),Math.abs(i)<a.EPSILON10)h=a.negativePiToPi(n.longitude);else{let _=O(e,n.latitude),E=O(e,s);d=Math.tan(i)*(E-_),h=a.negativePiToPi(n.longitude+d)}}else{s=n.latitude;let u;if(e===0)u=t*Math.cos(n.latitude);else{let f=Math.sin(n.latitude);u=t*Math.cos(n.latitude)/Math.sqrt(1-r*f*f)}d=o/u,i>0?h=a.negativePiToPi(n.longitude+d):h=a.negativePiToPi(n.longitude-d)}return l(c)?(c.longitude=h,c.latitude=s,c.height=0,c):new P(h,s,0)}function m(n,i,o){let t=T(o,q.default);this._ellipsoid=t,this._start=new P,this._end=new P,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,l(n)&&l(i)&&D(this,n,i,t)}Object.defineProperties(m.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return g.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return g.defined("distance",this._distance),this._heading}}});m.fromStartHeadingDistance=function(n,i,o,t,e){g.defined("start",n),g.defined("heading",i),g.defined("distance",o),g.typeOf.number.greaterThan("distance",o,0);let c=T(t,q.default),r=c.maximumRadius,h=c.minimumRadius,s=r*r,d=h*h,u=Math.sqrt((s-d)/s);i=a.negativePiToPi(i);let f=v(n,i,o,c.maximumRadius,u);return!l(e)||l(t)&&!t.equals(e.ellipsoid)?new m(n,f,c):(e.setEndPoints(n,f),e)};m.prototype.setEndPoints=function(n,i){g.defined("start",n),g.defined("end",i),D(this,n,i,this._ellipsoid)};m.prototype.interpolateUsingFraction=function(n,i){return this.interpolateUsingSurfaceDistance(n*this._distance,i)};m.prototype.interpolateUsingSurfaceDistance=function(n,i){if(g.typeOf.number("distance",n),!l(this._distance)||this._distance===0)throw new I("EllipsoidRhumbLine must have distinct start and end set.");return v(this._start,this._heading,n,this._ellipsoid.maximumRadius,this._ellipticity,i)};m.prototype.findIntersectionWithLongitude=function(n,i){if(g.typeOf.number("intersectionLongitude",n),!l(this._distance)||this._distance===0)throw new I("EllipsoidRhumbLine must have distinct start and end set.");let o=this._ellipticity,t=this._heading,e=Math.abs(t),c=this._start;if(n=a.negativePiToPi(n),a.equalsEpsilon(Math.abs(n),Math.PI,a.EPSILON14)&&(n=a.sign(c.longitude)*Math.PI),l(i)||(i=new P),Math.abs(a.PI_OVER_TWO-e)<=a.EPSILON8)return i.longitude=n,i.latitude=c.latitude,i.height=0,i;if(a.equalsEpsilon(Math.abs(a.PI_OVER_TWO-e),a.PI_OVER_TWO,a.EPSILON8))return a.equalsEpsilon(n,c.longitude,a.EPSILON12)?void 0:(i.longitude=n,i.latitude=a.PI_OVER_TWO*a.sign(a.PI_OVER_TWO-t),i.height=0,i);let r=c.latitude,h=o*Math.sin(r),s=Math.tan(.5*(a.PI_OVER_TWO+r))*Math.exp((n-c.longitude)/Math.tan(t)),d=(1+h)/(1-h),u=c.latitude,f;do{f=u;let M=o*Math.sin(f),_=(1+M)/(1-M);u=2*Math.atan(s*Math.pow(_/d,o/2))-a.PI_OVER_TWO}while(!a.equalsEpsilon(u,f,a.EPSILON12));return i.longitude=n,i.latitude=u,i.height=0,i};m.prototype.findIntersectionWithLatitude=function(n,i){if(g.typeOf.number("intersectionLatitude",n),!l(this._distance)||this._distance===0)throw new I("EllipsoidRhumbLine must have distinct start and end set.");let o=this._ellipticity,t=this._heading,e=this._start;if(a.equalsEpsilon(Math.abs(t),a.PI_OVER_TWO,a.EPSILON8))return;let c=O(o,e.latitude),r=O(o,n),h=Math.tan(t)*(r-c),s=a.negativePiToPi(e.longitude+h);return l(i)?(i.longitude=s,i.latitude=n,i.height=0,i):new P(s,n,0)};var $=m;export{$ as a};
public/CimSDK/Workers/chunk-VDNLYVKB.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as st}from"./chunk-V5KKODOM.js";import{b as at,c as ht,d as nt}from"./chunk-WI5KIEME.js";import{a as et}from"./chunk-NFDMGE7Q.js";import{b as h,c as tt,d as v,e as vt}from"./chunk-VDZXURWO.js";import{a as Y}from"./chunk-UEFEFMYS.js";import{a as xt}from"./chunk-YGIPMXAD.js";import{a as K}from"./chunk-5HWP5DW7.js";import{b as C}from"./chunk-3K67FZLU.js";import{e as D}from"./chunk-55TU6MJR.js";var ct={CLOCKWISE:xt.CW,COUNTER_CLOCKWISE:xt.CCW};ct.validate=function(t){return t===ct.CLOCKWISE||t===ct.COUNTER_CLOCKWISE};var pt=Object.freeze(ct);function dt(t,n,e=2){let c=n&&n.length,r=c?n[0]*e:t.length,o=bt(t,0,r,e,!0),i=[];if(!o||o.next===o.prev)return i;let s,f,u;if(c&&(o=It(t,n,o,e)),t.length>80*e){s=1/0,f=1/0;let a=-1/0,y=-1/0;for(let d=e;d<r;d+=e){let S=t[d],p=t[d+1];S<s&&(s=S),p<f&&(f=p),S>a&&(a=S),p>y&&(y=p)}u=Math.max(a-s,y-f),u=u!==0?32767/u:0}return rt(o,i,e,s,f,u,0),i}function bt(t,n,e,c,r){let o;if(r===jt(t,n,e,c)>0)for(let i=n;i<e;i+=c)o=wt(i/c|0,t[i],t[i+1],o);else for(let i=e-c;i>=n;i-=c)o=wt(i/c|0,t[i],t[i+1],o);return o&&ft(o,o.next)&&(ot(o),o=o.next),o}function N(t,n){if(!t)return t;n||(n=t);let e=t,c;do if(c=!1,!e.steiner&&(ft(e,e.next)||b(e.prev,e,e.next)===0)){if(ot(e),e=n=e.prev,e===e.next)break;c=!0}else e=e.next;while(c||e!==n);return n}function rt(t,n,e,c,r,o,i){if(!t)return;!i&&o&&Nt(t,c,r,o);let s=t;for(;t.prev!==t.next;){let f=t.prev,u=t.next;if(o?Rt(t,c,r,o):Pt(t)){n.push(f.i,t.i,u.i),ot(t),t=u.next,s=u.next;continue}if(t=u,t===s){i?i===1?(t=zt(N(t),n),rt(t,n,e,c,r,o,2)):i===2&&Bt(t,n,e,c,r,o):rt(N(t),n,e,c,r,o,1);break}}}function Pt(t){let n=t.prev,e=t,c=t.next;if(b(n,e,c)>=0)return!1;let r=n.x,o=e.x,i=c.x,s=n.y,f=e.y,u=c.y,a=r<o?r<i?r:i:o<i?o:i,y=s<f?s<u?s:u:f<u?f:u,d=r>o?r>i?r:i:o>i?o:i,S=s>f?s>u?s:u:f>u?f:u,p=c.next;for(;p!==n;){if(p.x>=a&&p.x<=d&&p.y>=y&&p.y<=S&&V(r,s,o,f,i,u,p.x,p.y)&&b(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function Rt(t,n,e,c){let r=t.prev,o=t,i=t.next;if(b(r,o,i)>=0)return!1;let s=r.x,f=o.x,u=i.x,a=r.y,y=o.y,d=i.y,S=s<f?s<u?s:u:f<u?f:u,p=a<y?a<d?a:d:y<d?y:d,T=s>f?s>u?s:u:f>u?f:u,L=a>y?a>d?a:d:y>d?y:d,z=yt(S,p,n,e,c),F=yt(T,L,n,e,c),l=t.prevZ,x=t.nextZ;for(;l&&l.z>=z&&x&&x.z<=F;){if(l.x>=S&&l.x<=T&&l.y>=p&&l.y<=L&&l!==r&&l!==i&&V(s,a,f,y,u,d,l.x,l.y)&&b(l.prev,l,l.next)>=0||(l=l.prevZ,x.x>=S&&x.x<=T&&x.y>=p&&x.y<=L&&x!==r&&x!==i&&V(s,a,f,y,u,d,x.x,x.y)&&b(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;l&&l.z>=z;){if(l.x>=S&&l.x<=T&&l.y>=p&&l.y<=L&&l!==r&&l!==i&&V(s,a,f,y,u,d,l.x,l.y)&&b(l.prev,l,l.next)>=0)return!1;l=l.prevZ}for(;x&&x.z<=F;){if(x.x>=S&&x.x<=T&&x.y>=p&&x.y<=L&&x!==r&&x!==i&&V(s,a,f,y,u,d,x.x,x.y)&&b(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function zt(t,n){let e=t;do{let c=e.prev,r=e.next.next;!ft(c,r)&&St(c,e,e.next,r)&&it(c,r)&&it(r,c)&&(n.push(c.i,e.i,r.i),ot(e),ot(e.next),e=t=r),e=e.next}while(e!==t);return N(e)}function Bt(t,n,e,c,r,o){let i=t;do{let s=i.next.next;for(;s!==i.prev;){if(i.i!==s.i&&_t(i,s)){let f=At(i,s);i=N(i,i.next),f=N(f,f.next),rt(i,n,e,c,r,o,0),rt(f,n,e,c,r,o,0);return}s=s.next}i=i.next}while(i!==t)}function It(t,n,e,c){let r=[];for(let o=0,i=n.length;o<i;o++){let s=n[o]*c,f=o<i-1?n[o+1]*c:t.length,u=bt(t,s,f,c,!1);u===u.next&&(u.steiner=!0),r.push(Ut(u))}r.sort(Wt);for(let o=0;o<r.length;o++)e=$t(r[o],e);return e}function Wt(t,n){return t.x-n.x}function $t(t,n){let e=Gt(t,n);if(!e)return n;let c=At(e,t);return N(c,c.next),N(e,e.next)}function Gt(t,n){let e=n,c=t.x,r=t.y,o=-1/0,i;do{if(r<=e.y&&r>=e.next.y&&e.next.y!==e.y){let y=e.x+(r-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(y<=c&&y>o&&(o=y,i=e.x<e.next.x?e:e.next,y===c))return i}e=e.next}while(e!==n);if(!i)return null;let s=i,f=i.x,u=i.y,a=1/0;e=i;do{if(c>=e.x&&e.x>=f&&c!==e.x&&V(r<u?c:o,r,f,u,r<u?o:c,r,e.x,e.y)){let y=Math.abs(r-e.y)/(c-e.x);it(e,t)&&(y<a||y===a&&(e.x>i.x||e.x===i.x&&Ht(i,e)))&&(i=e,a=y)}e=e.next}while(e!==s);return i}function Ht(t,n){return b(t.prev,t,n.prev)<0&&b(n.next,t,t.next)<0}function Nt(t,n,e,c){let r=t;do r.z===0&&(r.z=yt(r.x,r.y,n,e,c)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,kt(r)}function kt(t){let n,e=1;do{let c=t,r;t=null;let o=null;for(n=0;c;){n++;let i=c,s=0;for(let u=0;u<e&&(s++,i=i.nextZ,!!i);u++);let f=e;for(;s>0||f>0&&i;)s!==0&&(f===0||!i||c.z<=i.z)?(r=c,c=c.nextZ,s--):(r=i,i=i.nextZ,f--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;c=i}o.nextZ=null,e*=2}while(n>1);return t}function yt(t,n,e,c,r){return t=(t-e)*r|0,n=(n-c)*r|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,t|n<<1}function Ut(t){let n=t,e=t;do(n.x<e.x||n.x===e.x&&n.y<e.y)&&(e=n),n=n.next;while(n!==t);return e}function V(t,n,e,c,r,o,i,s){return(r-i)*(n-s)>=(t-i)*(o-s)&&(t-i)*(c-s)>=(e-i)*(n-s)&&(e-i)*(o-s)>=(r-i)*(c-s)}function _t(t,n){return t.next.i!==n.i&&t.prev.i!==n.i&&!Kt(t,n)&&(it(t,n)&&it(n,t)&&Vt(t,n)&&(b(t.prev,t,n.prev)||b(t,n.prev,n))||ft(t,n)&&b(t.prev,t,t.next)>0&&b(n.prev,n,n.next)>0)}function b(t,n,e){return(n.y-t.y)*(e.x-n.x)-(n.x-t.x)*(e.y-n.y)}function ft(t,n){return t.x===n.x&&t.y===n.y}function St(t,n,e,c){let r=lt(b(t,n,e)),o=lt(b(t,n,c)),i=lt(b(e,c,t)),s=lt(b(e,c,n));return!!(r!==o&&i!==s||r===0&&ut(t,e,n)||o===0&&ut(t,c,n)||i===0&&ut(e,t,c)||s===0&&ut(e,n,c))}function ut(t,n,e){return n.x<=Math.max(t.x,e.x)&&n.x>=Math.min(t.x,e.x)&&n.y<=Math.max(t.y,e.y)&&n.y>=Math.min(t.y,e.y)}function lt(t){return t>0?1:t<0?-1:0}function Kt(t,n){let e=t;do{if(e.i!==t.i&&e.next.i!==t.i&&e.i!==n.i&&e.next.i!==n.i&&St(e,e.next,t,n))return!0;e=e.next}while(e!==t);return!1}function it(t,n){return b(t.prev,t,t.next)<0?b(t,n,t.next)>=0&&b(t,t.prev,n)>=0:b(t,n,t.prev)<0||b(t,t.next,n)<0}function Vt(t,n){let e=t,c=!1,r=(t.x+n.x)/2,o=(t.y+n.y)/2;do e.y>o!=e.next.y>o&&e.next.y!==e.y&&r<(e.next.x-e.x)*(o-e.y)/(e.next.y-e.y)+e.x&&(c=!c),e=e.next;while(e!==t);return c}function At(t,n){let e=mt(t.i,t.x,t.y),c=mt(n.i,n.x,n.y),r=t.next,o=n.prev;return t.next=n,n.prev=t,e.next=r,r.prev=e,c.next=e,e.prev=c,o.next=c,c.prev=o,c}function wt(t,n,e,c){let r=mt(t,n,e);return c?(r.next=c.next,r.prev=c,c.next.prev=r,c.next=r):(r.prev=r,r.next=r),r}function ot(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function mt(t,n,e){return{i:t,x:n,y:e,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function jt(t,n,e,c){let r=0;for(let o=n,i=e-c;o<e;o+=c)r+=(t[i]-t[o])*(t[o+1]+t[i+1]),i=o;return r}var qt=new h,Jt=new h,B={};B.computeArea2D=function(t){C.defined("positions",t),C.typeOf.number.greaterThanOrEquals("positions.length",t.length,3);let n=t.length,e=0;for(let c=n-1,r=0;r<n;c=r++){let o=t[c],i=t[r];e+=o.x*i.y-i.x*o.y}return e*.5};B.computeWindingOrder2D=function(t){return B.computeArea2D(t)>0?pt.COUNTER_CLOCKWISE:pt.CLOCKWISE};B.triangulate=function(t,n){C.defined("positions",t);let e=v.packArray(t);return dt(e,n,2)};var Tt=new h,Mt=new h,Zt=new h,Ct=new h,Et=new h,Ot=new h,R=new h,Lt=new v,Dt=new v,Ft=new v,j=new v;B.computeSubdivision=function(t,n,e,c,r){r=K(r,Y.RADIANS_PER_DEGREE);let o=D(c);C.typeOf.object("ellipsoid",t),C.defined("positions",n),C.defined("indices",e),C.typeOf.number.greaterThanOrEquals("indices.length",e.length,3),C.typeOf.number.equals("indices.length % 3","0",e.length%3,0),C.typeOf.number.greaterThan("granularity",r,0);let i=e.slice(0),s,f=n.length,u=new Array(f*3),a=new Array(f*2),y=0,d=0;for(s=0;s<f;s++){let l=n[s];if(u[y++]=l.x,u[y++]=l.y,u[y++]=l.z,o){let x=c[s];a[d++]=x.x,a[d++]=x.y}}let S=[],p={},T=t.maximumRadius,L=Y.chordLength(r,T),z=L*L;for(;i.length>0;){let l=i.pop(),x=i.pop(),m=i.pop(),A=h.fromArray(u,m*3,Tt),E=h.fromArray(u,x*3,Mt),q=h.fromArray(u,l*3,Zt),J,Q,I;o&&(J=v.fromArray(a,m*2,Lt),Q=v.fromArray(a,x*2,Dt),I=v.fromArray(a,l*2,Ft));let k=h.multiplyByScalar(h.normalize(A,Ct),T,Ct),U=h.multiplyByScalar(h.normalize(E,Et),T,Et),W=h.multiplyByScalar(h.normalize(q,Ot),T,Ot),$=h.magnitudeSquared(h.subtract(k,U,R)),G=h.magnitudeSquared(h.subtract(U,W,R)),X=h.magnitudeSquared(h.subtract(W,k,R)),H=Math.max($,G,X),M,w,g;H>z?$===H?(M=`${Math.min(m,x)} ${Math.max(m,x)}`,s=p[M],D(s)||(w=h.add(A,E,R),h.multiplyByScalar(w,.5,w),u.push(w.x,w.y,w.z),s=u.length/3-1,p[M]=s,o&&(g=v.add(J,Q,j),v.multiplyByScalar(g,.5,g),a.push(g.x,g.y))),i.push(m,s,l),i.push(s,x,l)):G===H?(M=`${Math.min(x,l)} ${Math.max(x,l)}`,s=p[M],D(s)||(w=h.add(E,q,R),h.multiplyByScalar(w,.5,w),u.push(w.x,w.y,w.z),s=u.length/3-1,p[M]=s,o&&(g=v.add(Q,I,j),v.multiplyByScalar(g,.5,g),a.push(g.x,g.y))),i.push(x,s,m),i.push(s,l,m)):X===H&&(M=`${Math.min(l,m)} ${Math.max(l,m)}`,s=p[M],D(s)||(w=h.add(q,A,R),h.multiplyByScalar(w,.5,w),u.push(w.x,w.y,w.z),s=u.length/3-1,p[M]=s,o&&(g=v.add(I,J,j),v.multiplyByScalar(g,.5,g),a.push(g.x,g.y))),i.push(l,s,x),i.push(s,m,x)):(S.push(m),S.push(x),S.push(l))}let F={attributes:{position:new nt({componentDatatype:et.DOUBLE,componentsPerAttribute:3,values:u})},indices:S,primitiveType:at.TRIANGLES};return o&&(F.attributes.st=new nt({componentDatatype:et.FLOAT,componentsPerAttribute:2,values:a})),new ht(F)};var Qt=new tt,Xt=new tt,Yt=new tt,gt=new tt;B.computeRhumbLineSubdivision=function(t,n,e,c,r){r=K(r,Y.RADIANS_PER_DEGREE);let o=D(c);C.typeOf.object("ellipsoid",t),C.defined("positions",n),C.defined("indices",e),C.typeOf.number.greaterThanOrEquals("indices.length",e.length,3),C.typeOf.number.equals("indices.length % 3","0",e.length%3,0),C.typeOf.number.greaterThan("granularity",r,0);let i=e.slice(0),s,f=n.length,u=new Array(f*3),a=new Array(f*2),y=0,d=0;for(s=0;s<f;s++){let m=n[s];if(u[y++]=m.x,u[y++]=m.y,u[y++]=m.z,o){let A=c[s];a[d++]=A.x,a[d++]=A.y}}let S=[],p={},T=t.maximumRadius,L=Y.chordLength(r,T),z=new st(void 0,void 0,t),F=new st(void 0,void 0,t),l=new st(void 0,void 0,t);for(;i.length>0;){let m=i.pop(),A=i.pop(),E=i.pop(),q=h.fromArray(u,E*3,Tt),J=h.fromArray(u,A*3,Mt),Q=h.fromArray(u,m*3,Zt),I,k,U;o&&(I=v.fromArray(a,E*2,Lt),k=v.fromArray(a,A*2,Dt),U=v.fromArray(a,m*2,Ft));let W=t.cartesianToCartographic(q,Qt),$=t.cartesianToCartographic(J,Xt),G=t.cartesianToCartographic(Q,Yt);z.setEndPoints(W,$);let X=z.surfaceDistance;F.setEndPoints($,G);let H=F.surfaceDistance;l.setEndPoints(G,W);let M=l.surfaceDistance,w=Math.max(X,H,M),g,P,_,Z,O;w>L?X===w?(g=`${Math.min(E,A)} ${Math.max(E,A)}`,s=p[g],D(s)||(P=z.interpolateUsingFraction(.5,gt),_=(W.height+$.height)*.5,Z=h.fromRadians(P.longitude,P.latitude,_,t,R),u.push(Z.x,Z.y,Z.z),s=u.length/3-1,p[g]=s,o&&(O=v.add(I,k,j),v.multiplyByScalar(O,.5,O),a.push(O.x,O.y))),i.push(E,s,m),i.push(s,A,m)):H===w?(g=`${Math.min(A,m)} ${Math.max(A,m)}`,s=p[g],D(s)||(P=F.interpolateUsingFraction(.5,gt),_=($.height+G.height)*.5,Z=h.fromRadians(P.longitude,P.latitude,_,t,R),u.push(Z.x,Z.y,Z.z),s=u.length/3-1,p[g]=s,o&&(O=v.add(k,U,j),v.multiplyByScalar(O,.5,O),a.push(O.x,O.y))),i.push(A,s,E),i.push(s,m,E)):M===w&&(g=`${Math.min(m,E)} ${Math.max(m,E)}`,s=p[g],D(s)||(P=l.interpolateUsingFraction(.5,gt),_=(G.height+W.height)*.5,Z=h.fromRadians(P.longitude,P.latitude,_,t,R),u.push(Z.x,Z.y,Z.z),s=u.length/3-1,p[g]=s,o&&(O=v.add(U,I,j),v.multiplyByScalar(O,.5,O),a.push(O.x,O.y))),i.push(m,s,A),i.push(s,E,A)):(S.push(E),S.push(A),S.push(m))}let x={attributes:{position:new nt({componentDatatype:et.DOUBLE,componentsPerAttribute:3,values:u})},indices:S,primitiveType:at.TRIANGLES};return o&&(x.attributes.st=new nt({componentDatatype:et.FLOAT,componentsPerAttribute:2,values:a})),new ht(x)};B.scaleToGeodeticHeight=function(t,n,e,c){e=K(e,vt.default);let r=qt,o=Jt;if(n=K(n,0),c=K(c,!0),D(t)){let i=t.length;for(let s=0;s<i;s+=3)h.fromArray(t,s,o),c&&(o=e.scaleToGeodeticSurface(o,o)),n!==0&&(r=e.geodeticSurfaceNormal(o,r),h.multiplyByScalar(r,n,r),h.add(o,r,o)),t[s]=o.x,t[s+1]=o.y,t[s+2]=o.z}return t};var ge=B;export{pt as a,ge as b};
public/CimSDK/Workers/chunk-VDZXURWO.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as h}from"./chunk-UEFEFMYS.js";import{a as b}from"./chunk-5HWP5DW7.js";import{a as g,b as i}from"./chunk-3K67FZLU.js";import{e as a}from"./chunk-55TU6MJR.js";var $={ellipsoidCoordinates:null,changeApproximateTerrainHeights:!1,minTerrainHeight:-2e4,maxTerrainHeight:2e4,hasVertexNormals:!1};$.isMoon=function(){return $.ellipsoidCoordinates==="MOON"||$.ellipsoidCoordinates==="MOON2000"};$.isVertexNormals=function(){return $.hasVertexNormals};var k=$;function f(n,e,o){this.x=b(n,0),this.y=b(e,0),this.z=b(o,0)}f.fromSpherical=function(n,e){i.typeOf.object("spherical",n),a(e)||(e=new f);let o=n.clock,t=n.cone,c=b(n.magnitude,1),p=c*Math.sin(t);return e.x=p*Math.cos(o),e.y=p*Math.sin(o),e.z=c*Math.cos(t),e};f.fromElements=function(n,e,o,t){return a(t)?(t.x=n,t.y=e,t.z=o,t):new f(n,e,o)};f.clone=function(n,e){if(a(n))return a(e)?(e.x=n.x,e.y=n.y,e.z=n.z,e):new f(n.x,n.y,n.z)};f.fromCartesian4=f.clone;f.packedLength=3;f.pack=function(n,e,o){return i.typeOf.object("value",n),i.defined("array",e),o=b(o,0),e[o++]=n.x,e[o++]=n.y,e[o]=n.z,e};f.unpack=function(n,e,o){return i.defined("array",n),e=b(e,0),a(o)||(o=new f),o.x=n[e++],o.y=n[e++],o.z=n[e],o};f.packArray=function(n,e){i.defined("array",n);let o=n.length,t=o*3;if(!a(e))e=new Array(t);else{if(!Array.isArray(e)&&e.length!==t)throw new g("If result is a typed array, it must have exactly array.length * 3 elements");e.length!==t&&(e.length=t)}for(let c=0;c<o;++c)f.pack(n[c],e,c*3);return e};f.unpackArray=function(n,e){if(i.defined("array",n),i.typeOf.number.greaterThanOrEquals("array.length",n.length,3),n.length%3!==0)throw new g("array length must be a multiple of 3.");let o=n.length;a(e)?e.length=o/3:e=new Array(o/3);for(let t=0;t<o;t+=3){let c=t/3;e[c]=f.unpack(n,t,e[c])}return e};f.fromArray=f.unpack;f.maximumComponent=function(n){return i.typeOf.object("cartesian",n),Math.max(n.x,n.y,n.z)};f.minimumComponent=function(n){return i.typeOf.object("cartesian",n),Math.min(n.x,n.y,n.z)};f.minimumByComponent=function(n,e,o){return i.typeOf.object("first",n),i.typeOf.object("second",e),i.typeOf.object("result",o),o.x=Math.min(n.x,e.x),o.y=Math.min(n.y,e.y),o.z=Math.min(n.z,e.z),o};f.maximumByComponent=function(n,e,o){return i.typeOf.object("first",n),i.typeOf.object("second",e),i.typeOf.object("result",o),o.x=Math.max(n.x,e.x),o.y=Math.max(n.y,e.y),o.z=Math.max(n.z,e.z),o};f.clamp=function(n,e,o,t){i.typeOf.object("value",n),i.typeOf.object("min",e),i.typeOf.object("max",o),i.typeOf.object("result",t);let c=h.clamp(n.x,e.x,o.x),p=h.clamp(n.y,e.y,o.y),d=h.clamp(n.z,e.z,o.z);return t.x=c,t.y=p,t.z=d,t};f.magnitudeSquared=function(n){return i.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y+n.z*n.z};f.magnitude=function(n){return Math.sqrt(f.magnitudeSquared(n))};var Q=new f;f.distance=function(n,e){return i.typeOf.object("left",n),i.typeOf.object("right",e),f.subtract(n,e,Q),f.magnitude(Q)};f.distanceSquared=function(n,e){return i.typeOf.object("left",n),i.typeOf.object("right",e),f.subtract(n,e,Q),f.magnitudeSquared(Q)};f.normalize=function(n,e){i.typeOf.object("cartesian",n),i.typeOf.object("result",e);let o=f.magnitude(n);if(e.x=n.x/o,e.y=n.y/o,e.z=n.z/o,isNaN(e.x)||isNaN(e.y)||isNaN(e.z))throw new g("normalized result is not a number");return e};f.dot=function(n,e){return i.typeOf.object("left",n),i.typeOf.object("right",e),n.x*e.x+n.y*e.y+n.z*e.z};f.multiplyComponents=function(n,e,o){return i.typeOf.object("left",n),i.typeOf.object("right",e),i.typeOf.object("result",o),o.x=n.x*e.x,o.y=n.y*e.y,o.z=n.z*e.z,o};f.divideComponents=function(n,e,o){return i.typeOf.object("left",n),i.typeOf.object("right",e),i.typeOf.object("result",o),o.x=n.x/e.x,o.y=n.y/e.y,o.z=n.z/e.z,o};f.add=function(n,e,o){return i.typeOf.object("left",n),i.typeOf.object("right",e),i.typeOf.object("result",o),o.x=n.x+e.x,o.y=n.y+e.y,o.z=n.z+e.z,o};f.subtract=function(n,e,o){return i.typeOf.object("left",n),i.typeOf.object("right",e),i.typeOf.object("result",o),o.x=n.x-e.x,o.y=n.y-e.y,o.z=n.z-e.z,o};f.multiplyByScalar=function(n,e,o){return i.typeOf.object("cartesian",n),i.typeOf.number("scalar",e),i.typeOf.object("result",o),o.x=n.x*e,o.y=n.y*e,o.z=n.z*e,o};f.divideByScalar=function(n,e,o){return i.typeOf.object("cartesian",n),i.typeOf.number("scalar",e),i.typeOf.object("result",o),o.x=n.x/e,o.y=n.y/e,o.z=n.z/e,o};f.negate=function(n,e){return i.typeOf.object("cartesian",n),i.typeOf.object("result",e),e.x=-n.x,e.y=-n.y,e.z=-n.z,e};f.abs=function(n,e){return i.typeOf.object("cartesian",n),i.typeOf.object("result",e),e.x=Math.abs(n.x),e.y=Math.abs(n.y),e.z=Math.abs(n.z),e};var Tn=new f;f.lerp=function(n,e,o,t){return i.typeOf.object("start",n),i.typeOf.object("end",e),i.typeOf.number("t",o),i.typeOf.object("result",t),f.multiplyByScalar(e,o,Tn),t=f.multiplyByScalar(n,1-o,t),f.add(Tn,t,t)};var H=new f,sn=new f;f.angleBetween=function(n,e){i.typeOf.object("left",n),i.typeOf.object("right",e),f.normalize(n,H),f.normalize(e,sn);let o=f.dot(H,sn),t=f.magnitude(f.cross(H,sn,H));return Math.atan2(t,o)};var Hn=new f;f.mostOrthogonalAxis=function(n,e){i.typeOf.object("cartesian",n),i.typeOf.object("result",e);let o=f.normalize(n,Hn);return f.abs(o,o),o.x<=o.y?o.x<=o.z?e=f.clone(f.UNIT_X,e):e=f.clone(f.UNIT_Z,e):o.y<=o.z?e=f.clone(f.UNIT_Y,e):e=f.clone(f.UNIT_Z,e),e};f.projectVector=function(n,e,o){i.defined("a",n),i.defined("b",e),i.defined("result",o);let t=f.dot(n,e)/f.dot(e,e);return f.multiplyByScalar(e,t,o)};f.equals=function(n,e){return n===e||a(n)&&a(e)&&n.x===e.x&&n.y===e.y&&n.z===e.z};f.equalsArray=function(n,e,o){return n.x===e[o]&&n.y===e[o+1]&&n.z===e[o+2]};f.equalsEpsilon=function(n,e,o,t){return n===e||a(n)&&a(e)&&h.equalsEpsilon(n.x,e.x,o,t)&&h.equalsEpsilon(n.y,e.y,o,t)&&h.equalsEpsilon(n.z,e.z,o,t)};f.cross=function(n,e,o){i.typeOf.object("left",n),i.typeOf.object("right",e),i.typeOf.object("result",o);let t=n.x,c=n.y,p=n.z,d=e.x,m=e.y,s=e.z,w=c*s-p*m,j=p*d-t*s,z=t*m-c*d;return o.x=w,o.y=j,o.z=z,o};f.midpoint=function(n,e,o){return i.typeOf.object("left",n),i.typeOf.object("right",e),i.typeOf.object("result",o),o.x=(n.x+e.x)*.5,o.y=(n.y+e.y)*.5,o.z=(n.z+e.z)*.5,o};f.fromDegrees=function(n,e,o,t,c){return i.typeOf.number("longitude",n),i.typeOf.number("latitude",e),n=h.toRadians(n),e=h.toRadians(e),f.fromRadians(n,e,o,t,c)};var R=new f,_=new f;f._ellipsoidRadiiSquared=new f(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);f.fromCGCS2000Degrees=function(n,e,o,t){return i.typeOf.number("longitude",n),i.typeOf.number("latitude",e),n=h.toRadians(n),e=h.toRadians(e),f.fromcgcs2000Radians(n,e,o,t)};var Nn=new f(6378137*6378137,6378137*6378137,6356752314140356e-9*6356752314140356e-9);f.fromcgcs2000Radians=function(n,e,o,t){i.typeOf.number("longitude",n),i.typeOf.number("latitude",e),o=b(o,0);let c=Nn,p=Math.cos(e);R.x=p*Math.cos(n),R.y=p*Math.sin(n),R.z=Math.sin(e),R=f.normalize(R,R),f.multiplyComponents(c,R,_);let d=Math.sqrt(f.dot(R,_));return _=f.divideByScalar(_,d,_),R=f.multiplyByScalar(R,o,R),a(t)||(t=new f),f.add(_,R,t)};R=new f;_=new f;var Qn=new f(1737400*1737400,1737400*1737400,1737400*1737400);f.fromRadians=function(n,e,o,t,c){i.typeOf.number("longitude",n),i.typeOf.number("latitude",e),o=b(o,0);let p=null;k.ellipsoidCoordinates==="CGCS2000"?p=Nn:k.ellipsoidCoordinates==="MOON"||k.ellipsoidCoordinates==="MOON2000"?p=Qn:p=a(t)?t.radiiSquared:f._ellipsoidRadiiSquared;let d=Math.cos(e);R.x=d*Math.cos(n),R.y=d*Math.sin(n),R.z=Math.sin(e),R=f.normalize(R,R),f.multiplyComponents(p,R,_);let m=Math.sqrt(f.dot(R,_));return _=f.divideByScalar(_,m,_),R=f.multiplyByScalar(R,o,R),a(c)||(c=new f),f.add(_,R,c)};f.fromDegreesArray=function(n,e,o){if(i.defined("coordinates",n),n.length<2||n.length%2!==0)throw new g("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;a(o)?o.length=t/2:o=new Array(t/2);for(let c=0;c<t;c+=2){let p=n[c],d=n[c+1],m=c/2;o[m]=f.fromDegrees(p,d,0,e,o[m])}return o};f.fromRadiansArray=function(n,e,o){if(i.defined("coordinates",n),n.length<2||n.length%2!==0)throw new g("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;a(o)?o.length=t/2:o=new Array(t/2);for(let c=0;c<t;c+=2){let p=n[c],d=n[c+1],m=c/2;o[m]=f.fromRadians(p,d,0,e,o[m])}return o};f.fromDegreesArrayHeights=function(n,e,o){if(i.defined("coordinates",n),n.length<3||n.length%3!==0)throw new g("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;a(o)?o.length=t/3:o=new Array(t/3);for(let c=0;c<t;c+=3){let p=n[c],d=n[c+1],m=n[c+2],s=c/3;o[s]=f.fromDegrees(p,d,m,e,o[s])}return o};f.fromRadiansArrayHeights=function(n,e,o){if(i.defined("coordinates",n),n.length<3||n.length%3!==0)throw new g("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;a(o)?o.length=t/3:o=new Array(t/3);for(let c=0;c<t;c+=3){let p=n[c],d=n[c+1],m=n[c+2],s=c/3;o[s]=f.fromRadians(p,d,m,e,o[s])}return o};f.ZERO=Object.freeze(new f(0,0,0));f.ONE=Object.freeze(new f(1,1,1));f.UNIT_X=Object.freeze(new f(1,0,0));f.UNIT_Y=Object.freeze(new f(0,1,0));f.UNIT_Z=Object.freeze(new f(0,0,1));f.prototype.clone=function(n){return f.clone(this,n)};f.prototype.equals=function(n){return f.equals(this,n)};f.prototype.equalsEpsilon=function(n,e,o){return f.equalsEpsilon(this,n,e,o)};f.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};var u=f;var Kn=new u,Jn=new u;function ne(n,e,o,t,c){if(!a(n))throw new g("cartesian is required.");if(!a(e))throw new g("oneOverRadii is required.");if(!a(o))throw new g("oneOverRadiiSquared is required.");if(!a(t))throw new g("centerToleranceSquared is required.");let p=n.x,d=n.y,m=n.z,s=e.x,w=e.y,j=e.z,z=p*p*s*s,M=d*d*w*w,q=m*m*j*j,x=z+M+q,T=Math.sqrt(1/x),F=u.multiplyByScalar(n,T,Kn);if(x<t)return isFinite(T)?u.clone(F,c):void 0;let V=o.x,I=o.y,L=o.z,U=Jn;U.x=F.x*V*2,U.y=F.y*I*2,U.z=F.z*L*2;let Y=(1-T)*u.magnitude(n)/(.5*u.magnitude(U)),qn=0,un,En,W,v,D,dn,yn,mn,An,Cn,_n;do{Y-=qn,W=1/(1+Y*V),v=1/(1+Y*I),D=1/(1+Y*L),dn=W*W,yn=v*v,mn=D*D,An=dn*W,Cn=yn*v,_n=mn*D,un=z*dn+M*yn+q*mn-1,En=z*An*V+M*Cn*I+q*_n*L;let Yn=-2*En;qn=un/Yn}while(Math.abs(un)>h.EPSILON12);return a(c)?(c.x=p*W,c.y=d*v,c.z=m*D,c):new u(p*W,d*v,m*D)}var K=ne;function S(n,e,o){this.longitude=b(n,0),this.latitude=b(e,0),this.height=b(o,0)}S.fromRadians=function(n,e,o,t){return i.typeOf.number("longitude",n),i.typeOf.number("latitude",e),o=b(o,0),a(t)?(t.longitude=n,t.latitude=e,t.height=o,t):new S(n,e,o)};S.fromDegrees=function(n,e,o,t){return i.typeOf.number("longitude",n),i.typeOf.number("latitude",e),n=h.toRadians(n),e=h.toRadians(e),S.fromRadians(n,e,o,t)};var ee=new u,oe=new u,te=new u;S._ellipsoidOneOverRadii=new u(1/6378137,1/6378137,1/6356752314245179e-9);S._ellipsoidOneOverRadiiSquared=new u(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9));var ie=new u(1/1737400,1/1737400,1/1737400),ce=new u(1/(1737400*1737400),1/(1737400*1737400),1/(1737400*1737400)),fe=new u(1/6378137,1/6378137,1/6356752314140356e-9),re=new u(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314140356e-9*6356752314140356e-9));S._ellipsoidCenterToleranceSquared=h.EPSILON1;S.fromCartesian=function(n,e,o){let t=null,c=null,p=a(e)?e._centerToleranceSquared:S._ellipsoidCenterToleranceSquared;k.ellipsoidCoordinates==="CGCS2000"?(t=fe,c=re):k.ellipsoidCoordinates==="MOON"||k.ellipsoidCoordinates==="MOON2000"?(t=ie,c=ce):(t=a(e)?e.oneOverRadii:S._ellipsoidOneOverRadii,c=a(e)?e.oneOverRadiiSquared:S._ellipsoidOneOverRadiiSquared);let d=K(n,t,c,p,oe);if(!a(d))return;let m=u.multiplyComponents(d,c,ee);m=u.normalize(m,m);let s=u.subtract(n,d,te),w=Math.atan2(m.y,m.x),j=Math.asin(m.z),z=h.sign(u.dot(s,n))*u.magnitude(s);return a(o)?(o.longitude=w,o.latitude=j,o.height=z,o):new S(w,j,z)};S.toCartesian=function(n,e,o){return i.defined("cartographic",n),u.fromRadians(n.longitude,n.latitude,n.height,e,o)};S.clone=function(n,e){if(a(n))return a(e)?(e.longitude=n.longitude,e.latitude=n.latitude,e.height=n.height,e):new S(n.longitude,n.latitude,n.height)};S.equals=function(n,e){return n===e||a(n)&&a(e)&&n.longitude===e.longitude&&n.latitude===e.latitude&&n.height===e.height};S.equalsEpsilon=function(n,e,o){return o=b(o,0),n===e||a(n)&&a(e)&&Math.abs(n.longitude-e.longitude)<=o&&Math.abs(n.latitude-e.latitude)<=o&&Math.abs(n.height-e.height)<=o};S.ZERO=Object.freeze(new S(0,0,0));S.prototype.clone=function(n){return S.clone(this,n)};S.prototype.equals=function(n){return S.equals(this,n)};S.prototype.equalsEpsilon=function(n,e){return S.equalsEpsilon(this,n,e)};S.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var G=S;function y(n,e){this.x=b(n,0),this.y=b(e,0)}y.fromElements=function(n,e,o){return a(o)?(o.x=n,o.y=e,o):new y(n,e)};y.clone=function(n,e){if(a(n))return a(e)?(e.x=n.x,e.y=n.y,e):new y(n.x,n.y)};y.fromCartesian3=y.clone;y.fromCartesian4=y.clone;y.packedLength=2;y.pack=function(n,e,o){return i.typeOf.object("value",n),i.defined("array",e),o=b(o,0),e[o++]=n.x,e[o]=n.y,e};y.unpack=function(n,e,o){return i.defined("array",n),e=b(e,0),a(o)||(o=new y),o.x=n[e++],o.y=n[e],o};y.packArray=function(n,e){i.defined("array",n);let o=n.length,t=o*2;if(!a(e))e=new Array(t);else{if(!Array.isArray(e)&&e.length!==t)throw new g("If result is a typed array, it must have exactly array.length * 2 elements");e.length!==t&&(e.length=t)}for(let c=0;c<o;++c)y.pack(n[c],e,c*2);return e};y.unpackArray=function(n,e){if(i.defined("array",n),i.typeOf.number.greaterThanOrEquals("array.length",n.length,2),n.length%2!==0)throw new g("array length must be a multiple of 2.");let o=n.length;a(e)?e.length=o/2:e=new Array(o/2);for(let t=0;t<o;t+=2){let c=t/2;e[c]=y.unpack(n,t,e[c])}return e};y.fromArray=y.unpack;y.maximumComponent=function(n){return i.typeOf.object("cartesian",n),Math.max(n.x,n.y)};y.minimumComponent=function(n){return i.typeOf.object("cartesian",n),Math.min(n.x,n.y)};y.minimumByComponent=function(n,e,o){return i.typeOf.object("first",n),i.typeOf.object("second",e),i.typeOf.object("result",o),o.x=Math.min(n.x,e.x),o.y=Math.min(n.y,e.y),o};y.maximumByComponent=function(n,e,o){return i.typeOf.object("first",n),i.typeOf.object("second",e),i.typeOf.object("result",o),o.x=Math.max(n.x,e.x),o.y=Math.max(n.y,e.y),o};y.clamp=function(n,e,o,t){i.typeOf.object("value",n),i.typeOf.object("min",e),i.typeOf.object("max",o),i.typeOf.object("result",t);let c=h.clamp(n.x,e.x,o.x),p=h.clamp(n.y,e.y,o.y);return t.x=c,t.y=p,t};y.magnitudeSquared=function(n){return i.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y};y.magnitude=function(n){return Math.sqrt(y.magnitudeSquared(n))};var J=new y;y.distance=function(n,e){return i.typeOf.object("left",n),i.typeOf.object("right",e),y.subtract(n,e,J),y.magnitude(J)};y.distanceSquared=function(n,e){return i.typeOf.object("left",n),i.typeOf.object("right",e),y.subtract(n,e,J),y.magnitudeSquared(J)};y.normalize=function(n,e){i.typeOf.object("cartesian",n),i.typeOf.object("result",e);let o=y.magnitude(n);if(e.x=n.x/o,e.y=n.y/o,isNaN(e.x)||isNaN(e.y))throw new g("normalized result is not a number");return e};y.dot=function(n,e){return i.typeOf.object("left",n),i.typeOf.object("right",e),n.x*e.x+n.y*e.y};y.cross=function(n,e){return i.typeOf.object("left",n),i.typeOf.object("right",e),n.x*e.y-n.y*e.x};y.multiplyComponents=function(n,e,o){return i.typeOf.object("left",n),i.typeOf.object("right",e),i.typeOf.object("result",o),o.x=n.x*e.x,o.y=n.y*e.y,o};y.divideComponents=function(n,e,o){return i.typeOf.object("left",n),i.typeOf.object("right",e),i.typeOf.object("result",o),o.x=n.x/e.x,o.y=n.y/e.y,o};y.add=function(n,e,o){return i.typeOf.object("left",n),i.typeOf.object("right",e),i.typeOf.object("result",o),o.x=n.x+e.x,o.y=n.y+e.y,o};y.subtract=function(n,e,o){return i.typeOf.object("left",n),i.typeOf.object("right",e),i.typeOf.object("result",o),o.x=n.x-e.x,o.y=n.y-e.y,o};y.multiplyByScalar=function(n,e,o){return i.typeOf.object("cartesian",n),i.typeOf.number("scalar",e),i.typeOf.object("result",o),o.x=n.x*e,o.y=n.y*e,o};y.divideByScalar=function(n,e,o){return i.typeOf.object("cartesian",n),i.typeOf.number("scalar",e),i.typeOf.object("result",o),o.x=n.x/e,o.y=n.y/e,o};y.negate=function(n,e){return i.typeOf.object("cartesian",n),i.typeOf.object("result",e),e.x=-n.x,e.y=-n.y,e};y.abs=function(n,e){return i.typeOf.object("cartesian",n),i.typeOf.object("result",e),e.x=Math.abs(n.x),e.y=Math.abs(n.y),e};var xn=new y;y.lerp=function(n,e,o,t){return i.typeOf.object("start",n),i.typeOf.object("end",e),i.typeOf.number("t",o),i.typeOf.object("result",t),y.multiplyByScalar(e,o,xn),t=y.multiplyByScalar(n,1-o,t),y.add(xn,t,t)};var Fn=new y,kn=new y;y.angleBetween=function(n,e){return i.typeOf.object("left",n),i.typeOf.object("right",e),y.normalize(n,Fn),y.normalize(e,kn),h.acosClamped(y.dot(Fn,kn))};var pe=new y;y.mostOrthogonalAxis=function(n,e){i.typeOf.object("cartesian",n),i.typeOf.object("result",e);let o=y.normalize(n,pe);return y.abs(o,o),o.x<=o.y?e=y.clone(y.UNIT_X,e):e=y.clone(y.UNIT_Y,e),e};y.equals=function(n,e){return n===e||a(n)&&a(e)&&n.x===e.x&&n.y===e.y};y.equalsArray=function(n,e,o){return n.x===e[o]&&n.y===e[o+1]};y.equalsEpsilon=function(n,e,o,t){return n===e||a(n)&&a(e)&&h.equalsEpsilon(n.x,e.x,o,t)&&h.equalsEpsilon(n.y,e.y,o,t)};y.ZERO=Object.freeze(new y(0,0));y.ONE=Object.freeze(new y(1,1));y.UNIT_X=Object.freeze(new y(1,0));y.UNIT_Y=Object.freeze(new y(0,1));y.prototype.clone=function(n){return y.clone(this,n)};y.prototype.equals=function(n){return y.equals(this,n)};y.prototype.equalsEpsilon=function(n,e,o){return y.equalsEpsilon(this,n,e,o)};y.prototype.toString=function(){return`(${this.x}, ${this.y})`};var On=y;function Un(n,e,o,t){e=b(e,0),o=b(o,0),t=b(t,0),i.typeOf.number.greaterThanOrEquals("x",e,0),i.typeOf.number.greaterThanOrEquals("y",o,0),i.typeOf.number.greaterThanOrEquals("z",t,0),n._radii=new u(e,o,t),n._radiiSquared=new u(e*e,o*o,t*t),n._radiiToTheFourth=new u(e*e*e*e,o*o*o*o,t*t*t*t),n._oneOverRadii=new u(e===0?0:1/e,o===0?0:1/o,t===0?0:1/t),n._oneOverRadiiSquared=new u(e===0?0:1/(e*e),o===0?0:1/(o*o),t===0?0:1/(t*t)),n._minimumRadius=Math.min(e,o,t),n._maximumRadius=Math.max(e,o,t),n._centerToleranceSquared=h.EPSILON1,n._radiiSquared.z!==0&&(n._squaredXOverSquaredZ=n._radiiSquared.x/n._radiiSquared.z)}function O(n,e,o){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,Un(this,n,e,o)}Object.defineProperties(O.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}});O.clone=function(n,e){if(!a(n))return;let o=n._radii;return a(e)?(u.clone(o,e._radii),u.clone(n._radiiSquared,e._radiiSquared),u.clone(n._radiiToTheFourth,e._radiiToTheFourth),u.clone(n._oneOverRadii,e._oneOverRadii),u.clone(n._oneOverRadiiSquared,e._oneOverRadiiSquared),e._minimumRadius=n._minimumRadius,e._maximumRadius=n._maximumRadius,e._centerToleranceSquared=n._centerToleranceSquared,e):new O(o.x,o.y,o.z)};O.fromCartesian3=function(n,e){return a(e)||(e=new O),a(n)&&Un(e,n.x,n.y,n.z),e};O.WGS84=Object.freeze(new O(6378137,6378137,6356752314245179e-9));O.CGCS2000=Object.freeze(new O(6378137,6378137,6356752314140356e-9));O.MOON2000=Object.freeze(new O(1737400,1737400,1737400));O.UNIT_SPHERE=Object.freeze(new O(1,1,1));O.MOON=Object.freeze(new O(h.LUNAR_RADIUS,h.LUNAR_RADIUS,h.LUNAR_RADIUS));O._default=O.WGS84;Object.defineProperties(O,{default:{get:function(){return O._default},set:function(n){i.typeOf.object("value",n),O._default=n,u._ellipsoidRadiiSquared=n.radiiSquared,G._ellipsoidOneOverRadii=n.oneOverRadii,G._ellipsoidOneOverRadiiSquared=n.oneOverRadiiSquared,G._ellipsoidCenterToleranceSquared=n._centerToleranceSquared}}});O.prototype.clone=function(n){return O.clone(this,n)};O.packedLength=u.packedLength;O.pack=function(n,e,o){return i.typeOf.object("value",n),i.defined("array",e),o=b(o,0),u.pack(n._radii,e,o),e};O.unpack=function(n,e,o){i.defined("array",n),e=b(e,0);let t=u.unpack(n,e);return O.fromCartesian3(t,o)};O.prototype.geocentricSurfaceNormal=u.normalize;O.prototype.geodeticSurfaceNormalCartographic=function(n,e){i.typeOf.object("cartographic",n);let o=n.longitude,t=n.latitude,c=Math.cos(t),p=c*Math.cos(o),d=c*Math.sin(o),m=Math.sin(t);return a(e)||(e=new u),e.x=p,e.y=d,e.z=m,u.normalize(e,e)};O.prototype.geodeticSurfaceNormal=function(n,e){if(i.typeOf.object("cartesian",n),isNaN(n.x)||isNaN(n.y)||isNaN(n.z))throw new g("cartesian has a NaN component");if(!u.equalsEpsilon(n,u.ZERO,h.EPSILON14))return a(e)||(e=new u),e=u.multiplyComponents(n,this._oneOverRadiiSquared,e),u.normalize(e,e)};var ae=new u,ue=new u;O.prototype.cartographicToCartesian=function(n,e){let o=ae,t=ue;this.geodeticSurfaceNormalCartographic(n,o),u.multiplyComponents(this._radiiSquared,o,t);let c=Math.sqrt(u.dot(o,t));return u.divideByScalar(t,c,t),u.multiplyByScalar(o,n.height,o),a(e)||(e=new u),u.add(t,o,e)};O.prototype.cartographicArrayToCartesianArray=function(n,e){i.defined("cartographics",n);let o=n.length;a(e)?e.length=o:e=new Array(o);for(let t=0;t<o;t++)e[t]=this.cartographicToCartesian(n[t],e[t]);return e};var de=new u,ye=new u,me=new u;O.prototype.cartesianToCartographic=function(n,e){let o=this.scaleToGeodeticSurface(n,ye);if(!a(o))return;let t=this.geodeticSurfaceNormal(o,de),c=u.subtract(n,o,me),p=Math.atan2(t.y,t.x),d=Math.asin(t.z),m=h.sign(u.dot(c,n))*u.magnitude(c);return a(e)?(e.longitude=p,e.latitude=d,e.height=m,e):new G(p,d,m)};O.prototype.cartesianArrayToCartographicArray=function(n,e){i.defined("cartesians",n);let o=n.length;a(e)?e.length=o:e=new Array(o);for(let t=0;t<o;++t)e[t]=this.cartesianToCartographic(n[t],e[t]);return e};O.prototype.scaleToGeodeticSurface=function(n,e){return K(n,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,e)};O.prototype.scaleToGeocentricSurface=function(n,e){i.typeOf.object("cartesian",n),a(e)||(e=new u);let o=n.x,t=n.y,c=n.z,p=this._oneOverRadiiSquared,d=1/Math.sqrt(o*o*p.x+t*t*p.y+c*c*p.z);return u.multiplyByScalar(n,d,e)};O.prototype.transformPositionToScaledSpace=function(n,e){return a(e)||(e=new u),u.multiplyComponents(n,this._oneOverRadii,e)};O.prototype.transformPositionFromScaledSpace=function(n,e){return a(e)||(e=new u),u.multiplyComponents(n,this._radii,e)};O.prototype.equals=function(n){return this===n||a(n)&&u.equals(this._radii,n._radii)};O.prototype.toString=function(){return this._radii.toString()};O.prototype.getSurfaceNormalIntersectionWithZAxis=function(n,e,o){if(i.typeOf.object("position",n),!h.equalsEpsilon(this._radii.x,this._radii.y,h.EPSILON15))throw new g("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");i.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),e=b(e,0);let t=this._squaredXOverSquaredZ;if(a(o)||(o=new u),o.x=0,o.y=0,o.z=n.z*(1-t),!(Math.abs(o.z)>=this._radii.z-e))return o};var se=new u;O.prototype.getLocalCurvature=function(n,e){i.typeOf.object("surfacePosition",n),a(e)||(e=new On);let o=this.getSurfaceNormalIntersectionWithZAxis(n,0,se),t=u.distance(n,o),c=this.minimumRadius*t/this.maximumRadius**2,p=t*c**2;return On.fromElements(1/t,1/p,e)};var Oe=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],be=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function Bn(n,e,o){i.typeOf.number("a",n),i.typeOf.number("b",e),i.typeOf.func("func",o);let t=.5*(e+n),c=.5*(e-n),p=0;for(let d=0;d<5;d++){let m=c*Oe[d];p+=be[d]*(o(t+m)+o(t-m))}return p*=c,p}O.prototype.surfaceArea=function(n){i.typeOf.object("rectangle",n);let e=n.west,o=n.east,t=n.south,c=n.north;for(;o<e;)o+=h.TWO_PI;let p=this._radiiSquared,d=p.x,m=p.y,s=p.z,w=d*m;return Bn(t,c,function(j){let z=Math.cos(j),M=Math.sin(j);return Math.cos(j)*Bn(e,o,function(q){let x=Math.cos(q),T=Math.sin(q);return Math.sqrt(w*M*M+s*(m*x*x+d*T*T)*z*z)})})};var wo=O;function r(n,e,o,t,c,p,d,m,s){this[0]=b(n,0),this[1]=b(t,0),this[2]=b(d,0),this[3]=b(e,0),this[4]=b(c,0),this[5]=b(m,0),this[6]=b(o,0),this[7]=b(p,0),this[8]=b(s,0)}r.packedLength=9;r.pack=function(n,e,o){return i.typeOf.object("value",n),i.defined("array",e),o=b(o,0),e[o++]=n[0],e[o++]=n[1],e[o++]=n[2],e[o++]=n[3],e[o++]=n[4],e[o++]=n[5],e[o++]=n[6],e[o++]=n[7],e[o++]=n[8],e};r.unpack=function(n,e,o){return i.defined("array",n),e=b(e,0),a(o)||(o=new r),o[0]=n[e++],o[1]=n[e++],o[2]=n[e++],o[3]=n[e++],o[4]=n[e++],o[5]=n[e++],o[6]=n[e++],o[7]=n[e++],o[8]=n[e++],o};r.packArray=function(n,e){i.defined("array",n);let o=n.length,t=o*9;if(!a(e))e=new Array(t);else{if(!Array.isArray(e)&&e.length!==t)throw new g("If result is a typed array, it must have exactly array.length * 9 elements");e.length!==t&&(e.length=t)}for(let c=0;c<o;++c)r.pack(n[c],e,c*9);return e};r.unpackArray=function(n,e){if(i.defined("array",n),i.typeOf.number.greaterThanOrEquals("array.length",n.length,9),n.length%9!==0)throw new g("array length must be a multiple of 9.");let o=n.length;a(e)?e.length=o/9:e=new Array(o/9);for(let t=0;t<o;t+=9){let c=t/9;e[c]=r.unpack(n,t,e[c])}return e};r.clone=function(n,e){if(a(n))return a(e)?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e):new r(n[0],n[3],n[6],n[1],n[4],n[7],n[2],n[5],n[8])};r.fromArray=r.unpack;r.fromColumnMajorArray=function(n,e){return i.defined("values",n),r.clone(n,e)};r.fromRowMajorArray=function(n,e){return i.defined("values",n),a(e)?(e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],e):new r(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8])};r.fromQuaternion=function(n,e){i.typeOf.object("quaternion",n);let o=n.x*n.x,t=n.x*n.y,c=n.x*n.z,p=n.x*n.w,d=n.y*n.y,m=n.y*n.z,s=n.y*n.w,w=n.z*n.z,j=n.z*n.w,z=n.w*n.w,M=o-d-w+z,q=2*(t-j),x=2*(c+s),T=2*(t+j),F=-o+d-w+z,V=2*(m-p),I=2*(c-s),L=2*(m+p),U=-o-d+w+z;return a(e)?(e[0]=M,e[1]=T,e[2]=I,e[3]=q,e[4]=F,e[5]=L,e[6]=x,e[7]=V,e[8]=U,e):new r(M,q,x,T,F,V,I,L,U)};r.fromHeadingPitchRoll=function(n,e){i.typeOf.object("headingPitchRoll",n);let o=Math.cos(-n.pitch),t=Math.cos(-n.heading),c=Math.cos(n.roll),p=Math.sin(-n.pitch),d=Math.sin(-n.heading),m=Math.sin(n.roll),s=o*t,w=-c*d+m*p*t,j=m*d+c*p*t,z=o*d,M=c*t+m*p*d,q=-m*t+c*p*d,x=-p,T=m*o,F=c*o;return a(e)?(e[0]=s,e[1]=z,e[2]=x,e[3]=w,e[4]=M,e[5]=T,e[6]=j,e[7]=q,e[8]=F,e):new r(s,w,j,z,M,q,x,T,F)};r.fromScale=function(n,e){return i.typeOf.object("scale",n),a(e)?(e[0]=n.x,e[1]=0,e[2]=0,e[3]=0,e[4]=n.y,e[5]=0,e[6]=0,e[7]=0,e[8]=n.z,e):new r(n.x,0,0,0,n.y,0,0,0,n.z)};r.fromUniformScale=function(n,e){return i.typeOf.number("scale",n),a(e)?(e[0]=n,e[1]=0,e[2]=0,e[3]=0,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=n,e):new r(n,0,0,0,n,0,0,0,n)};r.fromCrossProduct=function(n,e){return i.typeOf.object("vector",n),a(e)?(e[0]=0,e[1]=n.z,e[2]=-n.y,e[3]=-n.z,e[4]=0,e[5]=n.x,e[6]=n.y,e[7]=-n.x,e[8]=0,e):new r(0,-n.z,n.y,n.z,0,-n.x,-n.y,n.x,0)};r.fromRotationX=function(n,e){i.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return a(e)?(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=o,e[5]=t,e[6]=0,e[7]=-t,e[8]=o,e):new r(1,0,0,0,o,-t,0,t,o)};r.fromRotationY=function(n,e){i.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return a(e)?(e[0]=o,e[1]=0,e[2]=-t,e[3]=0,e[4]=1,e[5]=0,e[6]=t,e[7]=0,e[8]=o,e):new r(o,0,t,0,1,0,-t,0,o)};r.fromRotationZ=function(n,e){i.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return a(e)?(e[0]=o,e[1]=t,e[2]=0,e[3]=-t,e[4]=o,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e):new r(o,-t,0,t,o,0,0,0,1)};r.toArray=function(n,e){return i.typeOf.object("matrix",n),a(e)?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e):[n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8]]};r.getElementIndex=function(n,e){return i.typeOf.number.greaterThanOrEquals("row",e,0),i.typeOf.number.lessThanOrEquals("row",e,2),i.typeOf.number.greaterThanOrEquals("column",n,0),i.typeOf.number.lessThanOrEquals("column",n,2),n*3+e};r.getColumn=function(n,e,o){i.typeOf.object("matrix",n),i.typeOf.number.greaterThanOrEquals("index",e,0),i.typeOf.number.lessThanOrEquals("index",e,2),i.typeOf.object("result",o);let t=e*3,c=n[t],p=n[t+1],d=n[t+2];return o.x=c,o.y=p,o.z=d,o};r.setColumn=function(n,e,o,t){i.typeOf.object("matrix",n),i.typeOf.number.greaterThanOrEquals("index",e,0),i.typeOf.number.lessThanOrEquals("index",e,2),i.typeOf.object("cartesian",o),i.typeOf.object("result",t),t=r.clone(n,t);let c=e*3;return t[c]=o.x,t[c+1]=o.y,t[c+2]=o.z,t};r.getRow=function(n,e,o){i.typeOf.object("matrix",n),i.typeOf.number.greaterThanOrEquals("index",e,0),i.typeOf.number.lessThanOrEquals("index",e,2),i.typeOf.object("result",o);let t=n[e],c=n[e+3],p=n[e+6];return o.x=t,o.y=c,o.z=p,o};r.setRow=function(n,e,o,t){return i.typeOf.object("matrix",n),i.typeOf.number.greaterThanOrEquals("index",e,0),i.typeOf.number.lessThanOrEquals("index",e,2),i.typeOf.object("cartesian",o),i.typeOf.object("result",t),t=r.clone(n,t),t[e]=o.x,t[e+3]=o.y,t[e+6]=o.z,t};var he=new u;r.setScale=function(n,e,o){i.typeOf.object("matrix",n),i.typeOf.object("scale",e),i.typeOf.object("result",o);let t=r.getScale(n,he),c=e.x/t.x,p=e.y/t.y,d=e.z/t.z;return o[0]=n[0]*c,o[1]=n[1]*c,o[2]=n[2]*c,o[3]=n[3]*p,o[4]=n[4]*p,o[5]=n[5]*p,o[6]=n[6]*d,o[7]=n[7]*d,o[8]=n[8]*d,o};var we=new u;r.setUniformScale=function(n,e,o){i.typeOf.object("matrix",n),i.typeOf.number("scale",e),i.typeOf.object("result",o);let t=r.getScale(n,we),c=e/t.x,p=e/t.y,d=e/t.z;return o[0]=n[0]*c,o[1]=n[1]*c,o[2]=n[2]*c,o[3]=n[3]*p,o[4]=n[4]*p,o[5]=n[5]*p,o[6]=n[6]*d,o[7]=n[7]*d,o[8]=n[8]*d,o};var bn=new u;r.getScale=function(n,e){return i.typeOf.object("matrix",n),i.typeOf.object("result",e),e.x=u.magnitude(u.fromElements(n[0],n[1],n[2],bn)),e.y=u.magnitude(u.fromElements(n[3],n[4],n[5],bn)),e.z=u.magnitude(u.fromElements(n[6],n[7],n[8],bn)),e};var Pn=new u;r.getMaximumScale=function(n){return r.getScale(n,Pn),u.maximumComponent(Pn)};var je=new u;r.setRotation=function(n,e,o){i.typeOf.object("matrix",n),i.typeOf.object("result",o);let t=r.getScale(n,je);return o[0]=e[0]*t.x,o[1]=e[1]*t.x,o[2]=e[2]*t.x,o[3]=e[3]*t.y,o[4]=e[4]*t.y,o[5]=e[5]*t.y,o[6]=e[6]*t.z,o[7]=e[7]*t.z,o[8]=e[8]*t.z,o};var Se=new u;r.getRotation=function(n,e){i.typeOf.object("matrix",n),i.typeOf.object("result",e);let o=r.getScale(n,Se);return e[0]=n[0]/o.x,e[1]=n[1]/o.x,e[2]=n[2]/o.x,e[3]=n[3]/o.y,e[4]=n[4]/o.y,e[5]=n[5]/o.y,e[6]=n[6]/o.z,e[7]=n[7]/o.z,e[8]=n[8]/o.z,e};r.multiply=function(n,e,o){i.typeOf.object("left",n),i.typeOf.object("right",e),i.typeOf.object("result",o);let t=n[0]*e[0]+n[3]*e[1]+n[6]*e[2],c=n[1]*e[0]+n[4]*e[1]+n[7]*e[2],p=n[2]*e[0]+n[5]*e[1]+n[8]*e[2],d=n[0]*e[3]+n[3]*e[4]+n[6]*e[5],m=n[1]*e[3]+n[4]*e[4]+n[7]*e[5],s=n[2]*e[3]+n[5]*e[4]+n[8]*e[5],w=n[0]*e[6]+n[3]*e[7]+n[6]*e[8],j=n[1]*e[6]+n[4]*e[7]+n[7]*e[8],z=n[2]*e[6]+n[5]*e[7]+n[8]*e[8];return o[0]=t,o[1]=c,o[2]=p,o[3]=d,o[4]=m,o[5]=s,o[6]=w,o[7]=j,o[8]=z,o};r.add=function(n,e,o){return i.typeOf.object("left",n),i.typeOf.object("right",e),i.typeOf.object("result",o),o[0]=n[0]+e[0],o[1]=n[1]+e[1],o[2]=n[2]+e[2],o[3]=n[3]+e[3],o[4]=n[4]+e[4],o[5]=n[5]+e[5],o[6]=n[6]+e[6],o[7]=n[7]+e[7],o[8]=n[8]+e[8],o};r.subtract=function(n,e,o){return i.typeOf.object("left",n),i.typeOf.object("right",e),i.typeOf.object("result",o),o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],o[3]=n[3]-e[3],o[4]=n[4]-e[4],o[5]=n[5]-e[5],o[6]=n[6]-e[6],o[7]=n[7]-e[7],o[8]=n[8]-e[8],o};r.multiplyByVector=function(n,e,o){i.typeOf.object("matrix",n),i.typeOf.object("cartesian",e),i.typeOf.object("result",o);let t=e.x,c=e.y,p=e.z,d=n[0]*t+n[3]*c+n[6]*p,m=n[1]*t+n[4]*c+n[7]*p,s=n[2]*t+n[5]*c+n[8]*p;return o.x=d,o.y=m,o.z=s,o};r.multiplyByScalar=function(n,e,o){return i.typeOf.object("matrix",n),i.typeOf.number("scalar",e),i.typeOf.object("result",o),o[0]=n[0]*e,o[1]=n[1]*e,o[2]=n[2]*e,o[3]=n[3]*e,o[4]=n[4]*e,o[5]=n[5]*e,o[6]=n[6]*e,o[7]=n[7]*e,o[8]=n[8]*e,o};r.multiplyByScale=function(n,e,o){return i.typeOf.object("matrix",n),i.typeOf.object("scale",e),i.typeOf.object("result",o),o[0]=n[0]*e.x,o[1]=n[1]*e.x,o[2]=n[2]*e.x,o[3]=n[3]*e.y,o[4]=n[4]*e.y,o[5]=n[5]*e.y,o[6]=n[6]*e.z,o[7]=n[7]*e.z,o[8]=n[8]*e.z,o};r.multiplyByUniformScale=function(n,e,o){return i.typeOf.object("matrix",n),i.typeOf.number("scale",e),i.typeOf.object("result",o),o[0]=n[0]*e,o[1]=n[1]*e,o[2]=n[2]*e,o[3]=n[3]*e,o[4]=n[4]*e,o[5]=n[5]*e,o[6]=n[6]*e,o[7]=n[7]*e,o[8]=n[8]*e,o};r.negate=function(n,e){return i.typeOf.object("matrix",n),i.typeOf.object("result",e),e[0]=-n[0],e[1]=-n[1],e[2]=-n[2],e[3]=-n[3],e[4]=-n[4],e[5]=-n[5],e[6]=-n[6],e[7]=-n[7],e[8]=-n[8],e};r.transpose=function(n,e){i.typeOf.object("matrix",n),i.typeOf.object("result",e);let o=n[0],t=n[3],c=n[6],p=n[1],d=n[4],m=n[7],s=n[2],w=n[5],j=n[8];return e[0]=o,e[1]=t,e[2]=c,e[3]=p,e[4]=d,e[5]=m,e[6]=s,e[7]=w,e[8]=j,e};function ge(n){let e=0;for(let o=0;o<9;++o){let t=n[o];e+=t*t}return Math.sqrt(e)}var hn=[1,0,0],wn=[2,2,1];function ze(n){let e=0;for(let o=0;o<3;++o){let t=n[r.getElementIndex(wn[o],hn[o])];e+=2*t*t}return Math.sqrt(e)}function Re(n,e){let o=h.EPSILON15,t=0,c=1;for(let w=0;w<3;++w){let j=Math.abs(n[r.getElementIndex(wn[w],hn[w])]);j>t&&(c=w,t=j)}let p=1,d=0,m=hn[c],s=wn[c];if(Math.abs(n[r.getElementIndex(s,m)])>o){let w=n[r.getElementIndex(s,s)],j=n[r.getElementIndex(m,m)],z=n[r.getElementIndex(s,m)],M=(w-j)/2/z,q;M<0?q=-1/(-M+Math.sqrt(1+M*M)):q=1/(M+Math.sqrt(1+M*M)),p=1/Math.sqrt(1+q*q),d=q*p}return e=r.clone(r.IDENTITY,e),e[r.getElementIndex(m,m)]=e[r.getElementIndex(s,s)]=p,e[r.getElementIndex(s,m)]=d,e[r.getElementIndex(m,s)]=-d,e}var nn=new r,Vn=new r;r.computeEigenDecomposition=function(n,e){i.typeOf.object("matrix",n);let o=h.EPSILON20,t=10,c=0,p=0;a(e)||(e={});let d=e.unitary=r.clone(r.IDENTITY,e.unitary),m=e.diagonal=r.clone(n,e.diagonal),s=o*ge(m);for(;p<t&&ze(m)>s;)Re(m,nn),r.transpose(nn,Vn),r.multiply(m,nn,m),r.multiply(Vn,m,m),r.multiply(d,nn,d),++c>2&&(++p,c=0);return e};r.abs=function(n,e){return i.typeOf.object("matrix",n),i.typeOf.object("result",e),e[0]=Math.abs(n[0]),e[1]=Math.abs(n[1]),e[2]=Math.abs(n[2]),e[3]=Math.abs(n[3]),e[4]=Math.abs(n[4]),e[5]=Math.abs(n[5]),e[6]=Math.abs(n[6]),e[7]=Math.abs(n[7]),e[8]=Math.abs(n[8]),e};r.determinant=function(n){i.typeOf.object("matrix",n);let e=n[0],o=n[3],t=n[6],c=n[1],p=n[4],d=n[7],m=n[2],s=n[5],w=n[8];return e*(p*w-s*d)+c*(s*t-o*w)+m*(o*d-p*t)};r.inverse=function(n,e){i.typeOf.object("matrix",n),i.typeOf.object("result",e);let o=n[0],t=n[1],c=n[2],p=n[3],d=n[4],m=n[5],s=n[6],w=n[7],j=n[8],z=r.determinant(n);if(Math.abs(z)<=h.EPSILON15)throw new g("matrix is not invertible");e[0]=d*j-w*m,e[1]=w*c-t*j,e[2]=t*m-d*c,e[3]=s*m-p*j,e[4]=o*j-s*c,e[5]=p*c-o*m,e[6]=p*w-s*d,e[7]=s*t-o*w,e[8]=o*d-p*t;let M=1/z;return r.multiplyByScalar(e,M,e)};var le=new r;r.inverseTranspose=function(n,e){return i.typeOf.object("matrix",n),i.typeOf.object("result",e),r.inverse(r.transpose(n,le),e)};r.equals=function(n,e){return n===e||a(n)&&a(e)&&n[0]===e[0]&&n[1]===e[1]&&n[2]===e[2]&&n[3]===e[3]&&n[4]===e[4]&&n[5]===e[5]&&n[6]===e[6]&&n[7]===e[7]&&n[8]===e[8]};r.equalsEpsilon=function(n,e,o){return o=b(o,0),n===e||a(n)&&a(e)&&Math.abs(n[0]-e[0])<=o&&Math.abs(n[1]-e[1])<=o&&Math.abs(n[2]-e[2])<=o&&Math.abs(n[3]-e[3])<=o&&Math.abs(n[4]-e[4])<=o&&Math.abs(n[5]-e[5])<=o&&Math.abs(n[6]-e[6])<=o&&Math.abs(n[7]-e[7])<=o&&Math.abs(n[8]-e[8])<=o};r.IDENTITY=Object.freeze(new r(1,0,0,0,1,0,0,0,1));r.ZERO=Object.freeze(new r(0,0,0,0,0,0,0,0,0));r.COLUMN0ROW0=0;r.COLUMN0ROW1=1;r.COLUMN0ROW2=2;r.COLUMN1ROW0=3;r.COLUMN1ROW1=4;r.COLUMN1ROW2=5;r.COLUMN2ROW0=6;r.COLUMN2ROW1=7;r.COLUMN2ROW2=8;Object.defineProperties(r.prototype,{length:{get:function(){return r.packedLength}}});r.prototype.clone=function(n){return r.clone(this,n)};r.prototype.equals=function(n){return r.equals(this,n)};r.equalsArray=function(n,e,o){return n[0]===e[o]&&n[1]===e[o+1]&&n[2]===e[o+2]&&n[3]===e[o+3]&&n[4]===e[o+4]&&n[5]===e[o+5]&&n[6]===e[o+6]&&n[7]===e[o+7]&&n[8]===e[o+8]};r.prototype.equalsEpsilon=function(n,e){return r.equalsEpsilon(this,n,e)};r.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})
(${this[1]}, ${this[4]}, ${this[7]})
(${this[2]}, ${this[5]}, ${this[8]})`};var qo=r;var B,l={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},C={};Object.defineProperties(C,{element:{get:function(){if(C.supportsFullscreen())return document[l.fullscreenElement]}},changeEventName:{get:function(){if(C.supportsFullscreen())return l.fullscreenchange}},errorEventName:{get:function(){if(C.supportsFullscreen())return l.fullscreenerror}},enabled:{get:function(){if(C.supportsFullscreen())return document[l.fullscreenEnabled]}},fullscreen:{get:function(){if(C.supportsFullscreen())return C.element!==null}}});C.supportsFullscreen=function(){if(a(B))return B;B=!1;let n=document.body;if(typeof n.requestFullscreen=="function")return l.requestFullscreen="requestFullscreen",l.exitFullscreen="exitFullscreen",l.fullscreenEnabled="fullscreenEnabled",l.fullscreenElement="fullscreenElement",l.fullscreenchange="fullscreenchange",l.fullscreenerror="fullscreenerror",B=!0,B;let e=["webkit","moz","o","ms","khtml"],o;for(let t=0,c=e.length;t<c;++t){let p=e[t];o=`${p}RequestFullscreen`,typeof n[o]=="function"?(l.requestFullscreen=o,B=!0):(o=`${p}RequestFullScreen`,typeof n[o]=="function"&&(l.requestFullscreen=o,B=!0)),o=`${p}ExitFullscreen`,typeof document[o]=="function"?l.exitFullscreen=o:(o=`${p}CancelFullScreen`,typeof document[o]=="function"&&(l.exitFullscreen=o)),o=`${p}FullscreenEnabled`,document[o]!==void 0?l.fullscreenEnabled=o:(o=`${p}FullScreenEnabled`,document[o]!==void 0&&(l.fullscreenEnabled=o)),o=`${p}FullscreenElement`,document[o]!==void 0?l.fullscreenElement=o:(o=`${p}FullScreenElement`,document[o]!==void 0&&(l.fullscreenElement=o)),o=`${p}fullscreenchange`,document[`on${o}`]!==void 0&&(p==="ms"&&(o="MSFullscreenChange"),l.fullscreenchange=o),o=`${p}fullscreenerror`,document[`on${o}`]!==void 0&&(p==="ms"&&(o="MSFullscreenError"),l.fullscreenerror=o)}return B};C.requestFullscreen=function(n,e){C.supportsFullscreen()&&n[l.requestFullscreen]({vrDisplay:e})};C.exitFullscreen=function(){C.supportsFullscreen()&&document[l.exitFullscreen]()};C._names=l;var In=C;var A;typeof navigator<"u"?A=navigator:A={};function P(n){let e=n.split(".");for(let o=0,t=e.length;o<t;++o)e[o]=parseInt(e[o],10);return e}var en,Ln;function ln(){if(!a(en)&&(en=!1,!pn())){let n=/ Chrome\/([\.0-9]+)/.exec(A.userAgent);n!==null&&(en=!0,Ln=P(n[1]))}return en}function Me(){return ln()&&Ln}var on,Wn;function vn(){if(!a(on)&&(on=!1,!ln()&&!pn()&&/ Safari\/[\.0-9]+/.test(A.userAgent))){let n=/ Version\/([\.0-9]+)/.exec(A.userAgent);n!==null&&(on=!0,Wn=P(n[1]))}return on}function qe(){return vn()&&Wn}var tn,zn;function Dn(){if(!a(tn)){tn=!1;let n=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(A.userAgent);n!==null&&(tn=!0,zn=P(n[1]),zn.isNightly=!!n[2])}return tn}function Ee(){return Dn()&&zn}var X,Rn;function $n(){if(!a(X)){X=!1;let n;A.appName==="Microsoft Internet Explorer"?(n=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(A.userAgent),n!==null&&(X=!0,Rn=P(n[1]))):A.appName==="Netscape"&&(n=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(A.userAgent),n!==null&&(X=!0,Rn=P(n[1])))}return X}function Ae(){return $n()&&Rn}var cn,Zn;function pn(){if(!a(cn)){cn=!1;let n=/ Edg\/([\.0-9]+)/.exec(A.userAgent);n!==null&&(cn=!0,Zn=P(n[1]))}return cn}function Ce(){return pn()&&Zn}var fn,Mn;function an(){if(!a(fn)){fn=!1;let n=/Firefox\/([\.0-9]+)/.exec(A.userAgent);n!==null&&(fn=!0,Mn=P(n[1]))}return fn}var jn;function _e(){return a(jn)||(jn=/Windows/i.test(A.appVersion)),jn}var Sn;function Te(){return a(Sn)||(Sn=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),Sn}function Ne(){return an()&&Mn}var gn;function xe(){return a(gn)||(gn=!an()&&typeof PointerEvent<"u"&&(!a(A.pointerEnabled)||A.pointerEnabled)),gn}var Gn,rn;function Xn(){if(!a(rn)){let n=document.createElement("canvas");n.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");let e=n.style.imageRendering;rn=a(e)&&e!=="",rn&&(Gn=e)}return rn}function Fe(){return Xn()?Gn:void 0}function E(){if(!E.initialized)throw new g("You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP");return E._result}E._promise=void 0;E._result=void 0;E.initialize=function(){return a(E._promise)||(E._promise=new Promise(n=>{let e=new Image;e.onload=function(){E._result=e.width>0&&e.height>0,n(E._result)},e.onerror=function(){E._result=!1,n(E._result)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),E._promise};Object.defineProperties(E,{initialized:{get:function(){return a(E._result)}}});var Z=[];typeof ArrayBuffer<"u"&&(Z.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&Z.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&Z.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&Z.push(BigInt64Array),typeof BigUint64Array<"u"&&Z.push(BigUint64Array));var N={isChrome:ln,chromeVersion:Me,isSafari:vn,safariVersion:qe,isWebkit:Dn,webkitVersion:Ee,isInternetExplorer:$n,internetExplorerVersion:Ae,isEdge:pn,edgeVersion:Ce,isFirefox:an,firefoxVersion:Ne,isWindows:_e,isIPadOrIOS:Te,hardwareConcurrency:b(A.hardwareConcurrency,3),supportsPointerEvents:xe,supportsImageRenderingPixelated:Xn,supportsWebP:E,imageRenderingValue:Fe,typedArrayTypes:Z};N.supportsBasis=function(n){return N.supportsWebAssembly()&&n.context.supportsBasis};N.supportsFullscreen=function(){return In.supportsFullscreen()};N.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};N.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};N.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};N.supportsBigInt=function(){return typeof BigInt<"u"};N.supportsWebWorkers=function(){return typeof Worker<"u"};N.supportsWebAssembly=function(){return typeof WebAssembly<"u"};N.supportsWebgl2=function(n){return i.defined("scene",n),n.context.webgl2};N.supportsEsmWebWorkers=function(){return!an()||parseInt(Mn)>=114};var ko=N;export{k as a,u as b,G as c,On as d,wo as e,qo as f,ko as g};
public/CimSDK/Workers/chunk-W5L3OOEF.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as K}from"./chunk-TBSK33NR.js";import{a as L}from"./chunk-FBQDLPON.js";import{b as v,c as J,d as Z}from"./chunk-ZPW6H6BB.js";import{b as B,i as k}from"./chunk-HMXXHGCW.js";import{b as t,c as S,d as I,e as G,f as d}from"./chunk-VDZXURWO.js";import{a as g}from"./chunk-UEFEFMYS.js";import{a as W}from"./chunk-5HWP5DW7.js";import{a as b,b as z}from"./chunk-3K67FZLU.js";import{e as p}from"./chunk-55TU6MJR.js";function m(n,e){this.center=t.clone(W(n,t.ZERO)),this.halfAxes=d.clone(W(e,d.ZERO))}m.packedLength=t.packedLength+d.packedLength;m.pack=function(n,e,c){return z.typeOf.object("value",n),z.defined("array",e),c=W(c,0),t.pack(n.center,e,c),d.pack(n.halfAxes,e,c+t.packedLength),e};m.unpack=function(n,e,c){return z.defined("array",n),e=W(e,0),p(c)||(c=new m),t.unpack(n,e,c.center),d.unpack(n,e+t.packedLength,c.halfAxes),c};var Ct=new t,ut=new t,Pt=new t,xt=new t,yt=new t,At=new t,Nt=new d,Mt={unitary:new d,diagonal:new d};m.fromPoints=function(n,e){if(p(e)||(e=new m),!p(n)||n.length===0)return e.halfAxes=d.ZERO,e.center=t.ZERO,e;let c,h=n.length,r=t.clone(n[0],Ct);for(c=1;c<h;c++)t.add(r,n[c],r);let o=1/h;t.multiplyByScalar(r,o,r);let i=0,C=0,w=0,l=0,u=0,a=0,s;for(c=0;c<h;c++)s=t.subtract(n[c],r,ut),i+=s.x*s.x,C+=s.x*s.y,w+=s.x*s.z,l+=s.y*s.y,u+=s.y*s.z,a+=s.z*s.z;i*=o,C*=o,w*=o,l*=o,u*=o,a*=o;let f=Nt;f[0]=i,f[1]=C,f[2]=w,f[3]=C,f[4]=l,f[5]=u,f[6]=w,f[7]=u,f[8]=a;let A=d.computeEigenDecomposition(f,Mt),M=d.clone(A.unitary,e.halfAxes),x=d.getColumn(M,0,xt),y=d.getColumn(M,1,yt),N=d.getColumn(M,2,At),P=-Number.MAX_VALUE,O=-Number.MAX_VALUE,U=-Number.MAX_VALUE,q=Number.MAX_VALUE,R=Number.MAX_VALUE,j=Number.MAX_VALUE;for(c=0;c<h;c++)s=n[c],P=Math.max(t.dot(x,s),P),O=Math.max(t.dot(y,s),O),U=Math.max(t.dot(N,s),U),q=Math.min(t.dot(x,s),q),R=Math.min(t.dot(y,s),R),j=Math.min(t.dot(N,s),j);x=t.multiplyByScalar(x,.5*(q+P),x),y=t.multiplyByScalar(y,.5*(R+O),y),N=t.multiplyByScalar(N,.5*(j+U),N);let T=t.add(x,y,e.center);t.add(T,N,T);let E=Pt;return E.x=P-q,E.y=O-R,E.z=U-j,t.multiplyByScalar(E,.5,E),d.multiplyByScale(e.halfAxes,E,e.halfAxes),e};var nt=new t,Ot=new t;function Q(n,e,c,h,r,o,i,C,w,l,u){if(!p(r)||!p(o)||!p(i)||!p(C)||!p(w)||!p(l))throw new b("all extents (minimum/maximum X/Y/Z) are required.");p(u)||(u=new m);let a=u.halfAxes;d.setColumn(a,0,e,a),d.setColumn(a,1,c,a),d.setColumn(a,2,h,a);let s=nt;s.x=(r+o)/2,s.y=(i+C)/2,s.z=(w+l)/2;let f=Ot;f.x=(o-r)/2,f.y=(C-i)/2,f.z=(l-w)/2;let A=u.center;return s=d.multiplyByVector(a,s,s),t.add(n,s,A),d.multiplyByScale(a,f,a),u}var $=new S,bt=new t,Tt=new S,St=new S,gt=new S,Et=new S,Rt=new S,Wt=new t,H=new t,zt=new t,tt=new t,It=new t,Lt=new I,Ut=new I,qt=new I,jt=new I,Bt=new I,vt=new t,Vt=new t,_t=new t,Dt=new t,Xt=new I,kt=new t,Zt=new t,Yt=new t,Ft=new L(t.UNIT_X,0);m.fromRectangle=function(n,e,c,h,r){if(!p(n))throw new b("rectangle is required");if(n.width<0||n.width>g.TWO_PI)throw new b("Rectangle width must be between 0 and 2 * pi");if(n.height<0||n.height>g.PI)throw new b("Rectangle height must be between 0 and pi");if(p(h)&&!g.equalsEpsilon(h.radii.x,h.radii.y,g.EPSILON15))throw new b("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");e=W(e,0),c=W(c,0),h=W(h,G.default);let o,i,C,w,l,u,a;if(n.width<=g.PI){let R=k.center(n,$),j=h.cartographicToCartesian(R,bt),T=new K(j,h);a=T.plane;let E=R.longitude,ot=n.south<0&&n.north>0?0:R.latitude,st=S.fromRadians(E,n.north,c,Tt),V=S.fromRadians(n.west,n.north,c,St),it=S.fromRadians(n.west,ot,c,gt),_=S.fromRadians(n.west,n.south,c,Et),ht=S.fromRadians(E,n.south,c,Rt),ft=h.cartographicToCartesian(st,Wt),D=h.cartographicToCartesian(V,H),dt=h.cartographicToCartesian(it,zt),X=h.cartographicToCartesian(_,tt),mt=h.cartographicToCartesian(ht,It),wt=T.projectPointToNearestOnPlane(ft,Lt),Y=T.projectPointToNearestOnPlane(D,Ut),lt=T.projectPointToNearestOnPlane(dt,qt),F=T.projectPointToNearestOnPlane(X,jt),pt=T.projectPointToNearestOnPlane(mt,Bt);return o=Math.min(Y.x,lt.x,F.x),i=-o,w=Math.max(Y.y,wt.y),C=Math.min(F.y,pt.y),V.height=_.height=e,D=h.cartographicToCartesian(V,H),X=h.cartographicToCartesian(_,tt),l=Math.min(L.getPointDistance(a,D),L.getPointDistance(a,X)),u=c,Q(T.origin,T.xAxis,T.yAxis,T.zAxis,o,i,C,w,l,u,r)}let s=n.south>0,f=n.north<0,A=s?n.south:f?n.north:0,M=k.center(n,$).longitude,x=t.fromRadians(M,A,c,h,vt);x.z=0;let N=Math.abs(x.x)<g.EPSILON10&&Math.abs(x.y)<g.EPSILON10?t.UNIT_X:t.normalize(x,Vt),P=t.UNIT_Z,O=t.cross(N,P,_t);a=L.fromPointNormal(x,N,Ft);let U=t.fromRadians(M+g.PI_OVER_TWO,A,c,h,Dt);i=t.dot(L.projectPointOntoPlane(a,U,Xt),O),o=-i,w=t.fromRadians(0,n.north,f?e:c,h,kt).z,C=t.fromRadians(0,n.south,s?e:c,h,Zt).z;let q=t.fromRadians(n.east,A,c,h,Yt);return l=L.getPointDistance(a,q),u=0,Q(x,O,P,N,o,i,C,w,l,u,r)};m.fromTransformation=function(n,e){return z.typeOf.object("transformation",n),p(e)||(e=new m),e.center=B.getTranslation(n,e.center),e.halfAxes=B.getMatrix3(n,e.halfAxes),e.halfAxes=d.multiplyByScalar(e.halfAxes,.5,e.halfAxes),e};m.clone=function(n,e){if(p(n))return p(e)?(t.clone(n.center,e.center),d.clone(n.halfAxes,e.halfAxes),e):new m(n.center,n.halfAxes)};m.intersectPlane=function(n,e){if(!p(n))throw new b("box is required.");if(!p(e))throw new b("plane is required.");let c=n.center,h=e.normal,r=n.halfAxes,o=h.x,i=h.y,C=h.z,w=Math.abs(o*r[d.COLUMN0ROW0]+i*r[d.COLUMN0ROW1]+C*r[d.COLUMN0ROW2])+Math.abs(o*r[d.COLUMN1ROW0]+i*r[d.COLUMN1ROW1]+C*r[d.COLUMN1ROW2])+Math.abs(o*r[d.COLUMN2ROW0]+i*r[d.COLUMN2ROW1]+C*r[d.COLUMN2ROW2]),l=t.dot(h,c)+e.distance;return l<=-w?v.OUTSIDE:l>=w?v.INSIDE:v.INTERSECTING};var at=new t,ct=new t,rt=new t,Gt=new t,et=new t,Jt=new t;m.distanceSquaredTo=function(n,e){if(!p(n))throw new b("box is required.");if(!p(e))throw new b("cartesian is required.");let c=t.subtract(e,n.center,nt),h=n.halfAxes,r=d.getColumn(h,0,at),o=d.getColumn(h,1,ct),i=d.getColumn(h,2,rt),C=t.magnitude(r),w=t.magnitude(o),l=t.magnitude(i),u=!0,a=!0,s=!0;C>0?t.divideByScalar(r,C,r):u=!1,w>0?t.divideByScalar(o,w,o):a=!1,l>0?t.divideByScalar(i,l,i):s=!1;let f=!u+!a+!s,A,M,x;if(f===1){let O=r;A=o,M=i,a?s||(O=i,M=r):(O=o,A=r),x=t.cross(A,M,et),O===r?r=x:O===o?o=x:O===i&&(i=x)}else if(f===2){A=r,a?A=o:s&&(A=i);let O=t.UNIT_Y;O.equalsEpsilon(A,g.EPSILON3)&&(O=t.UNIT_X),M=t.cross(A,O,Gt),t.normalize(M,M),x=t.cross(A,M,et),t.normalize(x,x),A===r?(o=M,i=x):A===o?(i=M,r=x):A===i&&(r=M,o=x)}else f===3&&(r=t.UNIT_X,o=t.UNIT_Y,i=t.UNIT_Z);let y=Jt;y.x=t.dot(c,r),y.y=t.dot(c,o),y.z=t.dot(c,i);let N=0,P;return y.x<-C?(P=y.x+C,N+=P*P):y.x>C&&(P=y.x-C,N+=P*P),y.y<-w?(P=y.y+w,N+=P*P):y.y>w&&(P=y.y-w,N+=P*P),y.z<-l?(P=y.z+l,N+=P*P):y.z>l&&(P=y.z-l,N+=P*P),N};var Kt=new t,Qt=new t;m.computePlaneDistances=function(n,e,c,h){if(!p(n))throw new b("box is required.");if(!p(e))throw new b("position is required.");if(!p(c))throw new b("direction is required.");p(h)||(h=new J);let r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=n.center,C=n.halfAxes,w=d.getColumn(C,0,at),l=d.getColumn(C,1,ct),u=d.getColumn(C,2,rt),a=t.add(w,l,Kt);t.add(a,u,a),t.add(a,i,a);let s=t.subtract(a,e,Qt),f=t.dot(c,s);return r=Math.min(f,r),o=Math.max(f,o),t.add(i,w,a),t.add(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.add(i,w,a),t.subtract(a,l,a),t.add(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.add(i,w,a),t.subtract(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,w,a),t.add(a,l,a),t.add(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,w,a),t.add(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,w,a),t.subtract(a,l,a),t.add(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,w,a),t.subtract(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),h.start=r,h.stop=o,h};var $t=new t,Ht=new t,te=new t;m.computeCorners=function(n,e){z.typeOf.object("box",n),p(e)||(e=[new t,new t,new t,new t,new t,new t,new t,new t]);let c=n.center,h=n.halfAxes,r=d.getColumn(h,0,$t),o=d.getColumn(h,1,Ht),i=d.getColumn(h,2,te);return t.clone(c,e[0]),t.subtract(e[0],r,e[0]),t.subtract(e[0],o,e[0]),t.subtract(e[0],i,e[0]),t.clone(c,e[1]),t.subtract(e[1],r,e[1]),t.subtract(e[1],o,e[1]),t.add(e[1],i,e[1]),t.clone(c,e[2]),t.subtract(e[2],r,e[2]),t.add(e[2],o,e[2]),t.subtract(e[2],i,e[2]),t.clone(c,e[3]),t.subtract(e[3],r,e[3]),t.add(e[3],o,e[3]),t.add(e[3],i,e[3]),t.clone(c,e[4]),t.add(e[4],r,e[4]),t.subtract(e[4],o,e[4]),t.subtract(e[4],i,e[4]),t.clone(c,e[5]),t.add(e[5],r,e[5]),t.subtract(e[5],o,e[5]),t.add(e[5],i,e[5]),t.clone(c,e[6]),t.add(e[6],r,e[6]),t.add(e[6],o,e[6]),t.subtract(e[6],i,e[6]),t.clone(c,e[7]),t.add(e[7],r,e[7]),t.add(e[7],o,e[7]),t.add(e[7],i,e[7]),e};var ee=new d;m.computeTransformation=function(n,e){z.typeOf.object("box",n),p(e)||(e=new B);let c=n.center,h=d.multiplyByUniformScale(n.halfAxes,2,ee);return B.fromRotationTranslation(h,c,e)};var ne=new Z;m.isOccluded=function(n,e){if(!p(n))throw new b("box is required.");if(!p(e))throw new b("occluder is required.");let c=Z.fromOrientedBoundingBox(n,ne);return!e.isBoundingSphereVisible(c)};m.prototype.intersectPlane=function(n){return m.intersectPlane(this,n)};m.prototype.distanceSquaredTo=function(n){return m.distanceSquaredTo(this,n)};m.prototype.computePlaneDistances=function(n,e,c){return m.computePlaneDistances(this,n,e,c)};m.prototype.computeCorners=function(n){return m.computeCorners(this,n)};m.prototype.computeTransformation=function(n){return m.computeTransformation(this,n)};m.prototype.isOccluded=function(n){return m.isOccluded(this,n)};m.equals=function(n,e){return n===e||p(n)&&p(e)&&t.equals(n.center,e.center)&&d.equals(n.halfAxes,e.halfAxes)};m.prototype.clone=function(n){return m.clone(this,n)};m.prototype.equals=function(n){return m.equals(this,n)};var ye=m;export{ye as a};
public/CimSDK/Workers/chunk-WI5KIEME.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{b as l,f as O,g as R,i as G,j as L}from"./chunk-HMXXHGCW.js";import{b as A,c as h,d as a,f as y}from"./chunk-VDZXURWO.js";import{a as c}from"./chunk-YGIPMXAD.js";import{a as s}from"./chunk-5HWP5DW7.js";import{a as N,b as w}from"./chunk-3K67FZLU.js";import{e as I}from"./chunk-55TU6MJR.js";var U={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},M=Object.freeze(U);var r={POINTS:c.POINTS,LINES:c.LINES,LINE_LOOP:c.LINE_LOOP,LINE_STRIP:c.LINE_STRIP,TRIANGLES:c.TRIANGLES,TRIANGLE_STRIP:c.TRIANGLE_STRIP,TRIANGLE_FAN:c.TRIANGLE_FAN};r.isLines=function(t){return t===r.LINES||t===r.LINE_LOOP||t===r.LINE_STRIP};r.isTriangles=function(t){return t===r.TRIANGLES||t===r.TRIANGLE_STRIP||t===r.TRIANGLE_FAN};r.validate=function(t){return t===r.POINTS||t===r.LINES||t===r.LINE_LOOP||t===r.LINE_STRIP||t===r.TRIANGLES||t===r.TRIANGLE_STRIP||t===r.TRIANGLE_FAN};var F=Object.freeze(r);function _(t){t=s(t,s.EMPTY_OBJECT),w.typeOf.object("options.attributes",t.attributes),this.attributes=t.attributes,this.indices=t.indices,this.primitiveType=s(t.primitiveType,F.TRIANGLES),this.boundingSphere=t.boundingSphere,this.geometryType=s(t.geometryType,M.NONE),this.boundingSphereCV=t.boundingSphereCV,this.offsetAttribute=t.offsetAttribute}_.computeNumberOfVertices=function(t){w.typeOf.object("geometry",t);let m=-1;for(let u in t.attributes)if(t.attributes.hasOwnProperty(u)&&I(t.attributes[u])&&I(t.attributes[u].values)){let o=t.attributes[u],e=o.values.length/o.componentsPerAttribute;if(m!==e&&m!==-1)throw new N("All attribute lists must have the same number of attributes.");m=e}return m};var W=new h,H=new A,V=new l,Z=[new h,new h,new h],K=[new a,new a,new a],$=[new a,new a,new a],tt=new A,et=new O,rt=new l,nt=new L;_._textureCoordinateRotationPoints=function(t,m,u,o){let e,g=G.center(o,W),D=h.toCartesian(g,u,H),Y=R.eastNorthUpToFixedFrame(D,u,V),C=l.inverse(Y,V),b=K,f=Z;f[0].longitude=o.west,f[0].latitude=o.south,f[1].longitude=o.west,f[1].latitude=o.north,f[2].longitude=o.east,f[2].latitude=o.south;let n=tt;for(e=0;e<3;e++)h.toCartesian(f[e],u,n),n=l.multiplyByPointAsVector(C,n,n),b[e].x=n.x,b[e].y=n.y;let B=O.fromAxisAngle(A.UNIT_Z,-m,et),v=y.fromQuaternion(B,rt),j=t.length,T=Number.POSITIVE_INFINITY,p=Number.POSITIVE_INFINITY,d=Number.NEGATIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(e=0;e<j;e++)n=l.multiplyByPointAsVector(C,t[e],n),n=y.multiplyByVector(v,n,n),T=Math.min(T,n.x),p=Math.min(p,n.y),d=Math.max(d,n.x),x=Math.max(x,n.y);let k=L.fromRotation(m,nt),i=$;i[0].x=T,i[0].y=p,i[1].x=T,i[1].y=x,i[2].x=d,i[2].y=p;let P=b[0],z=b[2].x-P.x,X=b[1].y-P.y;for(e=0;e<3;e++){let E=i[e];L.multiplyByVector(k,E,E),E.x=(E.x-P.x)/z,E.y=(E.y-P.y)/X}let q=i[0],J=i[1],Q=i[2],S=new Array(6);return a.pack(q,S),a.pack(J,S,2),a.pack(Q,S,4),S};var Lt=_;function ot(t){if(t=s(t,s.EMPTY_OBJECT),!I(t.componentDatatype))throw new N("options.componentDatatype is required.");if(!I(t.componentsPerAttribute))throw new N("options.componentsPerAttribute is required.");if(t.componentsPerAttribute<1||t.componentsPerAttribute>4)throw new N("options.componentsPerAttribute must be between 1 and 4.");if(!I(t.values))throw new N("options.values is required.");this.componentDatatype=t.componentDatatype,this.componentsPerAttribute=t.componentsPerAttribute,this.normalize=s(t.normalize,!1),this.values=t.values}var Ot=ot;export{M as a,F as b,Lt as c,Ot as d};
public/CimSDK/Workers/chunk-XDTNLL4L.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as _}from"./chunk-45NF2JU3.js";import{a as M}from"./chunk-V5KKODOM.js";import{b as G}from"./chunk-AIYLFSI3.js";import{a as b}from"./chunk-FBQDLPON.js";import{b as R}from"./chunk-HMXXHGCW.js";import{b as a,c as L,e as z}from"./chunk-VDZXURWO.js";import{a as E}from"./chunk-UEFEFMYS.js";import{a as C}from"./chunk-5HWP5DW7.js";import{a as I}from"./chunk-3K67FZLU.js";import{e as T}from"./chunk-55TU6MJR.js";var p={};p.numberOfPoints=function(r,n,o){let e=a.distance(r,n);return Math.ceil(e/o)};p.numberOfPointsRhumbLine=function(r,n,o){let e=Math.pow(r.longitude-n.longitude,2)+Math.pow(r.latitude-n.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(e/(o*o))))};var V=new L;p.extractHeights=function(r,n){let o=r.length,e=new Array(o);for(let t=0;t<o;t++){let l=r[t];e[t]=n.cartesianToCartographic(l,V).height}return e};var Y=new R,F=new a,v=new a,j=new b(a.UNIT_X,0),H=new a,J=new b(a.UNIT_X,0),K=new a,Q=new a,k=[];function q(r,n,o){let e=k;e.length=r;let t;if(n===o){for(t=0;t<r;t++)e[t]=n;return e}let u=(o-n)/r;for(t=0;t<r;t++){let d=n+t*u;e[t]=d}return e}var x=new L,N=new L,D=new a,B=new a,W=new a,O=new _,S=new M;function $(r,n,o,e,t,l,u,d){let i=e.scaleToGeodeticSurface(r,B),w=e.scaleToGeodeticSurface(n,W),h=p.numberOfPoints(r,n,o),f=e.cartesianToCartographic(i,x),y=e.cartesianToCartographic(w,N),g=q(h,t,l);O.setEndPoints(f,y);let P=O.surfaceDistance/h,c=d;f.height=t;let s=e.cartographicToCartesian(f,D);a.pack(s,u,c),c+=3;for(let m=1;m<h;m++){let A=O.interpolateUsingSurfaceDistance(m*P,N);A.height=g[m],s=e.cartographicToCartesian(A,D),a.pack(s,u,c),c+=3}return c}function tt(r,n,o,e,t,l,u,d){let i=e.cartesianToCartographic(r,x),w=e.cartesianToCartographic(n,N),h=p.numberOfPointsRhumbLine(i,w,o);i.height=0,w.height=0;let f=q(h,t,l);S.ellipsoid.equals(e)||(S=new M(void 0,void 0,e)),S.setEndPoints(i,w);let y=S.surfaceDistance/h,g=d;i.height=t;let P=e.cartographicToCartesian(i,D);a.pack(P,u,g),g+=3;for(let c=1;c<h;c++){let s=S.interpolateUsingSurfaceDistance(c*y,N);s.height=f[c],P=e.cartographicToCartesian(s,D),a.pack(P,u,g),g+=3}return g}p.wrapLongitude=function(r,n){let o=[],e=[];if(T(r)&&r.length>0){n=C(n,R.IDENTITY);let t=R.inverseTransformation(n,Y),l=R.multiplyByPoint(t,a.ZERO,F),u=a.normalize(R.multiplyByPointAsVector(t,a.UNIT_Y,v),v),d=b.fromPointNormal(l,u,j),i=a.normalize(R.multiplyByPointAsVector(t,a.UNIT_X,H),H),w=b.fromPointNormal(l,i,J),h=1;o.push(a.clone(r[0]));let f=o[0],y=r.length;for(let g=1;g<y;++g){let P=r[g];if(b.getPointDistance(w,f)<0||b.getPointDistance(w,P)<0){let c=G.lineSegmentPlane(f,P,d,K);if(T(c)){let s=a.multiplyByScalar(u,5e-9,Q);b.getPointDistance(d,f)<0&&a.negate(s,s),o.push(a.add(c,s,new a)),e.push(h+1),a.negate(s,s),o.push(a.add(c,s,new a)),h=1}}o.push(a.clone(r[g])),h++,f=P}e.push(h)}return{positions:o,lengths:e}};p.generateArc=function(r){T(r)||(r={});let n=r.positions;if(!T(n))throw new I("options.positions is required.");let o=n.length,e=C(r.ellipsoid,z.default),t=C(r.height,0),l=Array.isArray(t);if(o<1)return[];if(o===1){let c=e.scaleToGeodeticSurface(n[0],B);if(t=l?t[0]:t,t!==0){let s=e.geodeticSurfaceNormal(c,D);a.multiplyByScalar(s,t,s),a.add(c,s,c)}return[c.x,c.y,c.z]}let u=r.minDistance;if(!T(u)){let c=C(r.granularity,E.RADIANS_PER_DEGREE);u=E.chordLength(c,e.maximumRadius)}let d=0,i;for(i=0;i<o-1;i++)d+=p.numberOfPoints(n[i],n[i+1],u);let w=(d+1)*3,h=new Array(w),f=0;for(i=0;i<o-1;i++){let c=n[i],s=n[i+1],m=l?t[i]:t,A=l?t[i+1]:t;f=$(c,s,u,e,m,A,h,f)}k.length=0;let y=n[o-1],g=e.cartesianToCartographic(y,x);g.height=l?t[o-1]:t;let P=e.cartographicToCartesian(g,D);return a.pack(P,h,w-3),h};var U=new L,et=new L;p.generateRhumbArc=function(r){T(r)||(r={});let n=r.positions;if(!T(n))throw new I("options.positions is required.");let o=n.length,e=C(r.ellipsoid,z.default),t=C(r.height,0),l=Array.isArray(t);if(o<1)return[];if(o===1){let m=e.scaleToGeodeticSurface(n[0],B);if(t=l?t[0]:t,t!==0){let A=e.geodeticSurfaceNormal(m,D);a.multiplyByScalar(A,t,A),a.add(m,A,m)}return[m.x,m.y,m.z]}let u=C(r.granularity,E.RADIANS_PER_DEGREE),d=0,i,w=e.cartesianToCartographic(n[0],U),h;for(i=0;i<o-1;i++)h=e.cartesianToCartographic(n[i+1],et),d+=p.numberOfPointsRhumbLine(w,h,u),w=L.clone(h,U);let f=(d+1)*3,y=new Array(f),g=0;for(i=0;i<o-1;i++){let m=n[i],A=n[i+1],X=l?t[i]:t,Z=l?t[i+1]:t;g=tt(m,A,u,e,X,Z,y,g)}k.length=0;let P=n[o-1],c=e.cartesianToCartographic(P,x);c.height=l?t[o-1]:t;let s=e.cartographicToCartesian(c,D);return a.pack(s,y,f-3),y};p.generateCartesianArc=function(r){let n=p.generateArc(r),o=n.length/3,e=new Array(o);for(let t=0;t<o;t++)e[t]=a.unpack(n,t*3);return e};p.generateCartesianRhumbArc=function(r){let n=p.generateRhumbArc(r),o=n.length/3,e=new Array(o);for(let t=0;t<o;t++)e[t]=a.unpack(n,t*3);return e};var mt=p;export{mt as a};
public/CimSDK/Workers/chunk-YMLWFA65.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{a as z,b as q}from"./chunk-TGH7B4GN.js";import{a as U}from"./chunk-XDTNLL4L.js";import{f as I}from"./chunk-HMXXHGCW.js";import{b as e,f as C}from"./chunk-VDZXURWO.js";import{a as O}from"./chunk-UEFEFMYS.js";import{e as j}from"./chunk-55TU6MJR.js";var G={},B=new e,J=new e,_=new e,v=new e,g=[new e,new e],K=new e,W=new e,X=new e,$=new e,ee=new e,te=new e,ne=new e,oe=new e,re=new e,se=new e,F=new I,k=new C;function V(o,s,a,c,r){let d=e.angleBetween(e.subtract(s,o,B),e.subtract(a,o,J)),y=c===z.BEVELED?1:Math.ceil(d/O.toRadians(5))+1,n=y*3,l=new Array(n);l[n-3]=a.x,l[n-2]=a.y,l[n-1]=a.z;let m;r?m=C.fromQuaternion(I.fromAxisAngle(e.negate(o,B),d/y,F),k):m=C.fromQuaternion(I.fromAxisAngle(o,d/y,F),k);let t=0;s=e.clone(s,B);for(let i=0;i<y;i++)s=C.multiplyByVector(m,s,s),l[t++]=s.x,l[t++]=s.y,l[t++]=s.z;return l}function ae(o){let s=K,a=W,c=X,r=o[1];a=e.fromArray(o[1],r.length-3,a),c=e.fromArray(o[0],0,c),s=e.midpoint(a,c,s);let d=V(s,a,c,z.ROUNDED,!1),y=o.length-1,n=o[y-1];r=o[y],a=e.fromArray(n,n.length-3,a),c=e.fromArray(r,0,c),s=e.midpoint(a,c,s);let l=V(s,a,c,z.ROUNDED,!1);return[d,l]}function H(o,s,a,c){let r=B;return c?r=e.add(o,s,r):(s=e.negate(s,s),r=e.add(o,s,r)),[r.x,r.y,r.z,a.x,a.y,a.z]}function T(o,s,a,c){let r=new Array(o.length),d=new Array(o.length),y=e.multiplyByScalar(s,a,B),n=e.negate(y,J),l=0,m=o.length-1;for(let t=0;t<o.length;t+=3){let i=e.fromArray(o,t,_),w=e.add(i,n,v);r[l++]=w.x,r[l++]=w.y,r[l++]=w.z;let f=e.add(i,y,v);d[m--]=f.z,d[m--]=f.y,d[m--]=f.x}return c.push(r,d),c}G.addAttribute=function(o,s,a,c){let r=s.x,d=s.y,y=s.z;j(a)&&(o[a]=r,o[a+1]=d,o[a+2]=y),j(c)&&(o[c]=y,o[c-1]=d,o[c-2]=r)};var le=new e,ce=new e;G.computePositions=function(o){let s=o.granularity,a=o.positions,c=o.ellipsoid,r=o.width/2,d=o.cornerType,y=o.saveAttributes,n=K,l=W,m=X,t=$,i=ee,w=te,f=ne,u=oe,p=re,x=se,E=[],S=y?[]:void 0,D=y?[]:void 0,h=a[0],N=a[1];l=e.normalize(e.subtract(N,h,l),l),n=c.geodeticSurfaceNormal(h,n),t=e.normalize(e.cross(n,l,t),t),y&&(S.push(t.x,t.y,t.z),D.push(n.x,n.y,n.z)),f=e.clone(h,f),h=N,m=e.negate(l,m);let A,P=[],M,Y=a.length;for(M=1;M<Y-1;M++){n=c.geodeticSurfaceNormal(h,n),N=a[M+1],l=e.normalize(e.subtract(N,h,l),l);let L=e.multiplyByScalar(n,e.dot(l,n),le);e.subtract(l,L,L),e.normalize(L,L);let R=e.multiplyByScalar(n,e.dot(m,n),ce);if(e.subtract(m,R,R),e.normalize(R,R),!O.equalsEpsilon(Math.abs(e.dot(L,R)),1,O.EPSILON7)){i=e.normalize(e.add(l,m,i),i),i=e.cross(i,n,i),i=e.cross(n,i,i),i=e.normalize(i,i);let Z=r/Math.max(.25,e.magnitude(e.cross(i,m,B))),b=q.angleIsGreaterThanPi(l,m,h,c);i=e.multiplyByScalar(i,Z,i),b?(u=e.add(h,i,u),x=e.add(u,e.multiplyByScalar(t,r,x),x),p=e.add(u,e.multiplyByScalar(t,r*2,p),p),g[0]=e.clone(f,g[0]),g[1]=e.clone(x,g[1]),A=U.generateArc({positions:g,granularity:s,ellipsoid:c}),E=T(A,t,r,E),y&&(S.push(t.x,t.y,t.z),D.push(n.x,n.y,n.z)),w=e.clone(p,w),t=e.normalize(e.cross(n,l,t),t),p=e.add(u,e.multiplyByScalar(t,r*2,p),p),f=e.add(u,e.multiplyByScalar(t,r,f),f),d===z.ROUNDED||d===z.BEVELED?P.push({leftPositions:V(u,w,p,d,b)}):P.push({leftPositions:H(h,e.negate(i,i),p,b)})):(p=e.add(h,i,p),x=e.add(p,e.negate(e.multiplyByScalar(t,r,x),x),x),u=e.add(p,e.negate(e.multiplyByScalar(t,r*2,u),u),u),g[0]=e.clone(f,g[0]),g[1]=e.clone(x,g[1]),A=U.generateArc({positions:g,granularity:s,ellipsoid:c}),E=T(A,t,r,E),y&&(S.push(t.x,t.y,t.z),D.push(n.x,n.y,n.z)),w=e.clone(u,w),t=e.normalize(e.cross(n,l,t),t),u=e.add(p,e.negate(e.multiplyByScalar(t,r*2,u),u),u),f=e.add(p,e.negate(e.multiplyByScalar(t,r,f),f),f),d===z.ROUNDED||d===z.BEVELED?P.push({rightPositions:V(p,w,u,d,b)}):P.push({rightPositions:H(h,i,u,b)})),m=e.negate(l,m)}h=N}n=c.geodeticSurfaceNormal(h,n),g[0]=e.clone(f,g[0]),g[1]=e.clone(h,g[1]),A=U.generateArc({positions:g,granularity:s,ellipsoid:c}),E=T(A,t,r,E),y&&(S.push(t.x,t.y,t.z),D.push(n.x,n.y,n.z));let Q;return d===z.ROUNDED&&(Q=ae(E)),{positions:E,corners:P,lefts:S,normals:D,endPositions:Q}};var we=G;export{we as a};
public/CimSDK/Workers/chunk-ZPW6H6BB.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,6 @@
/**
 * SmartEarth WebSDK - https://websdk.terra-it.cn
 * Version 5.3.1
 */
import{b as _,i as I}from"./chunk-HMXXHGCW.js";import{b as n,c as N,e as Z,f as A}from"./chunk-VDZXURWO.js";import{a as cn}from"./chunk-UEFEFMYS.js";import{a as T}from"./chunk-5HWP5DW7.js";import{a as on,b as h}from"./chunk-3K67FZLU.js";import{e as x}from"./chunk-55TU6MJR.js";function V(e){this._ellipsoid=T(e,Z.default),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(V.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});V.prototype.project=function(e,t){let o=this._semimajorAxis,c=e.longitude*o,r=e.latitude*o,d=e.height;return x(t)?(t.x=c,t.y=r,t.z=d,t):new n(c,r,d)};V.prototype.unproject=function(e,t){if(!x(e))throw new on("cartesian is required");let o=this._oneOverSemimajorAxis,c=e.x*o,r=e.y*o,d=e.z;return x(t)?(t.longitude=c,t.latitude=r,t.height=d,t):new N(c,r,d)};var k=V;var mn={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},U=Object.freeze(mn);function un(e,t){this.start=T(e,0),this.stop=T(t,0)}var rn=un;function a(e,t){this.center=n.clone(T(e,n.ZERO)),this.radius=T(t,0)}var F=new n,Y=new n,J=new n,K=new n,Q=new n,$=new n,L=new n,b=new n,H=new n,nn=new n,tn=new n,en=new n,xn=4/3*cn.PI;a.fromPoints=function(e,t){if(x(t)||(t=new a),!x(e)||e.length===0)return t.center=n.clone(n.ZERO,t.center),t.radius=0,t;let o=n.clone(e[0],L),c=n.clone(o,F),r=n.clone(o,Y),d=n.clone(o,J),f=n.clone(o,K),s=n.clone(o,Q),m=n.clone(o,$),z=e.length,y;for(y=1;y<z;y++){n.clone(e[y],o);let R=o.x,M=o.y,w=o.z;R<c.x&&n.clone(o,c),R>f.x&&n.clone(o,f),M<r.y&&n.clone(o,r),M>s.y&&n.clone(o,s),w<d.z&&n.clone(o,d),w>m.z&&n.clone(o,m)}let u=n.magnitudeSquared(n.subtract(f,c,b)),i=n.magnitudeSquared(n.subtract(s,r,b)),v=n.magnitudeSquared(n.subtract(m,d,b)),C=c,q=f,O=u;i>O&&(O=i,C=r,q=s),v>O&&(O=v,C=d,q=m);let p=H;p.x=(C.x+q.x)*.5,p.y=(C.y+q.y)*.5,p.z=(C.z+q.z)*.5;let S=n.magnitudeSquared(n.subtract(q,p,b)),l=Math.sqrt(S),j=nn;j.x=c.x,j.y=r.y,j.z=d.z;let P=tn;P.x=f.x,P.y=s.y,P.z=m.z;let D=n.midpoint(j,P,en),B=0;for(y=0;y<z;y++){n.clone(e[y],o);let R=n.magnitude(n.subtract(o,D,b));R>B&&(B=R);let M=n.magnitudeSquared(n.subtract(o,p,b));if(M>S){let w=Math.sqrt(M);l=(l+w)*.5,S=l*l;let g=w-l;p.x=(l*p.x+g*o.x)/w,p.y=(l*p.y+g*o.y)/w,p.z=(l*p.z+g*o.z)/w}}return l<B?(n.clone(p,t.center),t.radius=l):(n.clone(D,t.center),t.radius=B),t};var an=new k,yn=new n,ln=new n,G=new N,X=new N;a.fromRectangle2D=function(e,t,o){return a.fromRectangleWithHeights2D(e,t,0,0,o)};a.fromRectangleWithHeights2D=function(e,t,o,c,r){if(x(r)||(r=new a),!x(e))return r.center=n.clone(n.ZERO,r.center),r.radius=0,r;an._ellipsoid=Z.default,t=T(t,an),I.southwest(e,G),G.height=o,I.northeast(e,X),X.height=c;let d=t.project(G,yn),f=t.project(X,ln),s=f.x-d.x,m=f.y-d.y,z=f.z-d.z;r.radius=Math.sqrt(s*s+m*m+z*z)*.5;let y=r.center;return y.x=d.x+s*.5,y.y=d.y+m*.5,y.z=d.z+z*.5,r};var pn=[];a.fromRectangle3D=function(e,t,o,c){if(t=T(t,Z.default),o=T(o,0),x(c)||(c=new a),!x(e))return c.center=n.clone(n.ZERO,c.center),c.radius=0,c;let r=I.subsample(e,t,o,pn);return a.fromPoints(r,c)};a.fromVertices=function(e,t,o,c){if(x(c)||(c=new a),!x(e)||e.length===0)return c.center=n.clone(n.ZERO,c.center),c.radius=0,c;t=T(t,n.ZERO),o=T(o,3),h.typeOf.number.greaterThanOrEquals("stride",o,3);let r=L;r.x=e[0]+t.x,r.y=e[1]+t.y,r.z=e[2]+t.z;let d=n.clone(r,F),f=n.clone(r,Y),s=n.clone(r,J),m=n.clone(r,K),z=n.clone(r,Q),y=n.clone(r,$),u=e.length,i;for(i=0;i<u;i+=o){let w=e[i]+t.x,g=e[i+1]+t.y,E=e[i+2]+t.z;r.x=w,r.y=g,r.z=E,w<d.x&&n.clone(r,d),w>m.x&&n.clone(r,m),g<f.y&&n.clone(r,f),g>z.y&&n.clone(r,z),E<s.z&&n.clone(r,s),E>y.z&&n.clone(r,y)}let v=n.magnitudeSquared(n.subtract(m,d,b)),C=n.magnitudeSquared(n.subtract(z,f,b)),q=n.magnitudeSquared(n.subtract(y,s,b)),O=d,p=m,S=v;C>S&&(S=C,O=f,p=z),q>S&&(S=q,O=s,p=y);let l=H;l.x=(O.x+p.x)*.5,l.y=(O.y+p.y)*.5,l.z=(O.z+p.z)*.5;let j=n.magnitudeSquared(n.subtract(p,l,b)),P=Math.sqrt(j),D=nn;D.x=d.x,D.y=f.y,D.z=s.z;let B=tn;B.x=m.x,B.y=z.y,B.z=y.z;let R=n.midpoint(D,B,en),M=0;for(i=0;i<u;i+=o){r.x=e[i]+t.x,r.y=e[i+1]+t.y,r.z=e[i+2]+t.z;let w=n.magnitude(n.subtract(r,R,b));w>M&&(M=w);let g=n.magnitudeSquared(n.subtract(r,l,b));if(g>j){let E=Math.sqrt(g);P=(P+E)*.5,j=P*P;let W=E-P;l.x=(P*l.x+W*r.x)/E,l.y=(P*l.y+W*r.y)/E,l.z=(P*l.z+W*r.z)/E}}return P<M?(n.clone(l,c.center),c.radius=P):(n.clone(R,c.center),c.radius=M),c};a.fromEncodedCartesianVertices=function(e,t,o){if(x(o)||(o=new a),!x(e)||!x(t)||e.length!==t.length||e.length===0)return o.center=n.clone(n.ZERO,o.center),o.radius=0,o;let c=L;c.x=e[0]+t[0],c.y=e[1]+t[1],c.z=e[2]+t[2];let r=n.clone(c,F),d=n.clone(c,Y),f=n.clone(c,J),s=n.clone(c,K),m=n.clone(c,Q),z=n.clone(c,$),y=e.length,u;for(u=0;u<y;u+=3){let M=e[u]+t[u],w=e[u+1]+t[u+1],g=e[u+2]+t[u+2];c.x=M,c.y=w,c.z=g,M<r.x&&n.clone(c,r),M>s.x&&n.clone(c,s),w<d.y&&n.clone(c,d),w>m.y&&n.clone(c,m),g<f.z&&n.clone(c,f),g>z.z&&n.clone(c,z)}let i=n.magnitudeSquared(n.subtract(s,r,b)),v=n.magnitudeSquared(n.subtract(m,d,b)),C=n.magnitudeSquared(n.subtract(z,f,b)),q=r,O=s,p=i;v>p&&(p=v,q=d,O=m),C>p&&(p=C,q=f,O=z);let S=H;S.x=(q.x+O.x)*.5,S.y=(q.y+O.y)*.5,S.z=(q.z+O.z)*.5;let l=n.magnitudeSquared(n.subtract(O,S,b)),j=Math.sqrt(l),P=nn;P.x=r.x,P.y=d.y,P.z=f.z;let D=tn;D.x=s.x,D.y=m.y,D.z=z.z;let B=n.midpoint(P,D,en),R=0;for(u=0;u<y;u+=3){c.x=e[u]+t[u],c.y=e[u+1]+t[u+1],c.z=e[u+2]+t[u+2];let M=n.magnitude(n.subtract(c,B,b));M>R&&(R=M);let w=n.magnitudeSquared(n.subtract(c,S,b));if(w>l){let g=Math.sqrt(w);j=(j+g)*.5,l=j*j;let E=g-j;S.x=(j*S.x+E*c.x)/g,S.y=(j*S.y+E*c.y)/g,S.z=(j*S.z+E*c.z)/g}}return j<R?(n.clone(S,o.center),o.radius=j):(n.clone(B,o.center),o.radius=R),o};a.fromCornerPoints=function(e,t,o){h.typeOf.object("corner",e),h.typeOf.object("oppositeCorner",t),x(o)||(o=new a);let c=n.midpoint(e,t,o.center);return o.radius=n.distance(c,t),o};a.fromEllipsoid=function(e,t){return h.typeOf.object("ellipsoid",e),x(t)||(t=new a),n.clone(n.ZERO,t.center),t.radius=e.maximumRadius,t};var hn=new n;a.fromBoundingSpheres=function(e,t){if(x(t)||(t=new a),!x(e)||e.length===0)return t.center=n.clone(n.ZERO,t.center),t.radius=0,t;let o=e.length;if(o===1)return a.clone(e[0],t);if(o===2)return a.union(e[0],e[1],t);let c=[],r;for(r=0;r<o;r++)c.push(e[r].center);t=a.fromPoints(c,t);let d=t.center,f=t.radius;for(r=0;r<o;r++){let s=e[r];f=Math.max(f,n.distance(d,s.center,hn)+s.radius)}return t.radius=f,t};var zn=new n,Sn=new n,wn=new n;a.fromOrientedBoundingBox=function(e,t){h.defined("orientedBoundingBox",e),x(t)||(t=new a);let o=e.halfAxes,c=A.getColumn(o,0,zn),r=A.getColumn(o,1,Sn),d=A.getColumn(o,2,wn);return n.add(c,r,c),n.add(c,d,c),t.center=n.clone(e.center,t.center),t.radius=n.magnitude(c),t};var Pn=new n,gn=new n;a.fromTransformation=function(e,t){h.typeOf.object("transformation",e),x(t)||(t=new a);let o=_.getTranslation(e,Pn),c=_.getScale(e,gn),r=.5*n.magnitude(c);return t.center=n.clone(o,t.center),t.radius=r,t};a.clone=function(e,t){if(x(e))return x(t)?(t.center=n.clone(e.center,t.center),t.radius=e.radius,t):new a(e.center,e.radius)};a.packedLength=4;a.pack=function(e,t,o){h.typeOf.object("value",e),h.defined("array",t),o=T(o,0);let c=e.center;return t[o++]=c.x,t[o++]=c.y,t[o++]=c.z,t[o]=e.radius,t};a.unpack=function(e,t,o){h.defined("array",e),t=T(t,0),x(o)||(o=new a);let c=o.center;return c.x=e[t++],c.y=e[t++],c.z=e[t++],o.radius=e[t],o};var On=new n,jn=new n;a.union=function(e,t,o){h.typeOf.object("left",e),h.typeOf.object("right",t),x(o)||(o=new a);let c=e.center,r=e.radius,d=t.center,f=t.radius,s=n.subtract(d,c,On),m=n.magnitude(s);if(r>=m+f)return e.clone(o),o;if(f>=m+r)return t.clone(o),o;let z=(r+m+f)*.5,y=n.multiplyByScalar(s,(-r+z)/m,jn);return n.add(y,c,y),n.clone(y,o.center),o.radius=z,o};var bn=new n;a.expand=function(e,t,o){h.typeOf.object("sphere",e),h.typeOf.object("point",t),o=a.clone(e,o);let c=n.magnitude(n.subtract(t,o.center,bn));return c>o.radius&&(o.radius=c),o};a.intersectPlane=function(e,t){h.typeOf.object("sphere",e),h.typeOf.object("plane",t);let o=e.center,c=e.radius,r=t.normal,d=n.dot(r,o)+t.distance;return d<-c?U.OUTSIDE:d<c?U.INTERSECTING:U.INSIDE};a.transform=function(e,t,o){return h.typeOf.object("sphere",e),h.typeOf.object("transform",t),x(o)||(o=new a),o.center=_.multiplyByPoint(t,e.center,o.center),o.radius=_.getMaximumScale(t)*e.radius,o};var qn=new n;a.distanceSquaredTo=function(e,t){h.typeOf.object("sphere",e),h.typeOf.object("cartesian",t);let o=n.subtract(e.center,t,qn),c=n.magnitude(o)-e.radius;return c<=0?0:c*c};a.transformWithoutScale=function(e,t,o){return h.typeOf.object("sphere",e),h.typeOf.object("transform",t),x(o)||(o=new a),o.center=_.multiplyByPoint(t,e.center,o.center),o.radius=e.radius,o};var Mn=new n;a.computePlaneDistances=function(e,t,o,c){h.typeOf.object("sphere",e),h.typeOf.object("position",t),h.typeOf.object("direction",o),x(c)||(c=new rn);let r=n.subtract(e.center,t,Mn),d=n.dot(o,r);return c.start=d-e.radius,c.stop=d+e.radius,c};var dn=new n,Tn=new n,Cn=new n,Rn=new n,En=new n,Dn=new N,sn=new Array(8);for(let e=0;e<8;++e)sn[e]=new n;var fn=new k;a.projectTo2D=function(e,t,o){h.typeOf.object("sphere",e),fn._ellipsoid=Z.default,t=T(t,fn);let c=t.ellipsoid,r=e.center,d=e.radius,f;n.equals(r,n.ZERO)?f=n.clone(n.UNIT_X,dn):f=c.geodeticSurfaceNormal(r,dn);let s=n.cross(n.UNIT_Z,f,Tn);n.normalize(s,s);let m=n.cross(f,s,Cn);n.normalize(m,m),n.multiplyByScalar(f,d,f),n.multiplyByScalar(m,d,m),n.multiplyByScalar(s,d,s);let z=n.negate(m,En),y=n.negate(s,Rn),u=sn,i=u[0];n.add(f,m,i),n.add(i,s,i),i=u[1],n.add(f,m,i),n.add(i,y,i),i=u[2],n.add(f,z,i),n.add(i,y,i),i=u[3],n.add(f,z,i),n.add(i,s,i),n.negate(f,f),i=u[4],n.add(f,m,i),n.add(i,s,i),i=u[5],n.add(f,m,i),n.add(i,y,i),i=u[6],n.add(f,z,i),n.add(i,y,i),i=u[7],n.add(f,z,i),n.add(i,s,i);let v=u.length;for(let p=0;p<v;++p){let S=u[p];n.add(r,S,S);let l=c.cartesianToCartographic(S,Dn);t.project(l,S)}o=a.fromPoints(u,o),r=o.center;let C=r.x,q=r.y,O=r.z;return r.x=O,r.y=C,r.z=q,o};a.isOccluded=function(e,t){return h.typeOf.object("sphere",e),h.typeOf.object("occluder",t),!t.isBoundingSphereVisible(e)};a.equals=function(e,t){return e===t||x(e)&&x(t)&&n.equals(e.center,t.center)&&e.radius===t.radius};a.prototype.intersectPlane=function(e){return a.intersectPlane(this,e)};a.prototype.distanceSquaredTo=function(e){return a.distanceSquaredTo(this,e)};a.prototype.computePlaneDistances=function(e,t,o){return a.computePlaneDistances(this,e,t,o)};a.prototype.isOccluded=function(e){return a.isOccluded(this,e)};a.prototype.equals=function(e){return a.equals(this,e)};a.prototype.clone=function(e){return a.clone(this,e)};a.prototype.volume=function(){let e=this.radius;return xn*e*e*e};var et=a;export{k as a,U as b,rn as c,et as d};
public/CimSDK/Workers/combineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as e}from"./chunk-Q2B3IPUZ.js";import{a as r}from"./chunk-CQELY6Z3.js";import"./chunk-DMXICNHG.js";import"./chunk-NLFLNVCF.js";import"./chunk-HV57XH4K.js";import"./chunk-X2QIAW2L.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import"./chunk-ZDNS2GYV.js";import"./chunk-LH4TAMBV.js";import"./chunk-TNSV6TPX.js";import"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import"./chunk-INT7THOB.js";import"./chunk-PPCZYYBW.js";function n(o,t){let m=e.unpackCombineGeometryParameters(o),i=e.combineGeometry(m);return e.packCombineGeometryResults(i,t)}var c=r(n);export{c as default};
import{a as e}from"./chunk-6NBUVVUT.js";import{a as r}from"./chunk-6MN6BBPN.js";import"./chunk-NJVIDNJ6.js";import"./chunk-OOGG7EHS.js";import"./chunk-EZRSLM27.js";import"./chunk-E5FOJ77O.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import"./chunk-563CJZT3.js";import"./chunk-LH4TAMBV.js";import"./chunk-WI5KIEME.js";import"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import"./chunk-3K67FZLU.js";import"./chunk-55TU6MJR.js";function n(o,t){let m=e.unpackCombineGeometryParameters(o),i=e.combineGeometry(m);return e.packCombineGeometryResults(i,t)}var c=r(n);export{c as default};
public/CimSDK/Workers/createBoxGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as r}from"./chunk-VYRAY47W.js";import"./chunk-55FFQILS.js";import"./chunk-WF3WCQMH.js";import"./chunk-LH4TAMBV.js";import"./chunk-TNSV6TPX.js";import"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import"./chunk-INT7THOB.js";import{e as o}from"./chunk-PPCZYYBW.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default};
import{a as r}from"./chunk-JZ3QHGBZ.js";import"./chunk-55FFQILS.js";import"./chunk-32UDSAPU.js";import"./chunk-LH4TAMBV.js";import"./chunk-WI5KIEME.js";import"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import"./chunk-3K67FZLU.js";import{e as o}from"./chunk-55TU6MJR.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default};
public/CimSDK/Workers/createBoxOutlineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as d}from"./chunk-55FFQILS.js";import{a as l}from"./chunk-LH4TAMBV.js";import{b as O,c as h,d as p}from"./chunk-TNSV6TPX.js";import{d as A}from"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import{a}from"./chunk-3LWOQSP3.js";import{b as m}from"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as u}from"./chunk-5HWP5DW7.js";import{a as b,b as r}from"./chunk-INT7THOB.js";import{e as c}from"./chunk-PPCZYYBW.js";var g=new m;function f(e){e=u(e,u.EMPTY_OBJECT);let t=e.minimum,n=e.maximum;if(r.typeOf.object("min",t),r.typeOf.object("max",n),c(e.offsetAttribute)&&e.offsetAttribute===d.TOP)throw new b("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=m.clone(t),this._max=m.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}f.fromDimensions=function(e){e=u(e,u.EMPTY_OBJECT);let t=e.dimensions;r.typeOf.object("dimensions",t),r.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),r.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),r.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);let n=m.multiplyByScalar(t,.5,new m);return new f({minimum:m.negate(n,new m),maximum:n,offsetAttribute:e.offsetAttribute})};f.fromAxisAlignedBoundingBox=function(e){return r.typeOf.object("boundindBox",e),new f({minimum:e.minimum,maximum:e.maximum})};f.packedLength=2*m.packedLength+1;f.pack=function(e,t,n){return r.typeOf.object("value",e),r.defined("array",t),n=u(n,0),m.pack(e._min,t,n),m.pack(e._max,t,n+m.packedLength),t[n+m.packedLength*2]=u(e._offsetAttribute,-1),t};var w=new m,x=new m,_={minimum:w,maximum:x,offsetAttribute:void 0};f.unpack=function(e,t,n){r.defined("array",e),t=u(t,0);let s=m.unpack(e,t,w),o=m.unpack(e,t+m.packedLength,x),i=e[t+m.packedLength*2];return c(n)?(n._min=m.clone(s,n._min),n._max=m.clone(o,n._max),n._offsetAttribute=i===-1?void 0:i,n):(_.offsetAttribute=i===-1?void 0:i,new f(_))};f.createGeometry=function(e){let t=e._min,n=e._max;if(m.equals(t,n))return;let s=new l,o=new Uint16Array(12*2),i=new Float64Array(8*3);i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=n.x,i[4]=t.y,i[5]=t.z,i[6]=n.x,i[7]=n.y,i[8]=t.z,i[9]=t.x,i[10]=n.y,i[11]=t.z,i[12]=t.x,i[13]=t.y,i[14]=n.z,i[15]=n.x,i[16]=t.y,i[17]=n.z,i[18]=n.x,i[19]=n.y,i[20]=n.z,i[21]=t.x,i[22]=n.y,i[23]=n.z,s.position=new p({componentDatatype:a.DOUBLE,componentsPerAttribute:3,values:i}),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 k=m.subtract(n,t,g),E=m.magnitude(k)*.5;if(c(e._offsetAttribute)){let T=i.length,B=e._offsetAttribute===d.NONE?0:1,z=new Uint8Array(T/3).fill(B);s.applyOffset=new p({componentDatatype:a.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}return new h({attributes:s,indices:o,primitiveType:O.LINES,boundingSphere:new A(m.ZERO,E),offsetAttribute:e._offsetAttribute})};var y=f;function L(e,t){return c(t)&&(e=y.unpack(e,t)),y.createGeometry(e)}var R=L;export{R as default};
import{a as d}from"./chunk-55FFQILS.js";import{a as l}from"./chunk-LH4TAMBV.js";import{b as O,c as h,d as p}from"./chunk-WI5KIEME.js";import{d as A}from"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import{a}from"./chunk-NFDMGE7Q.js";import{b as m}from"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as u}from"./chunk-5HWP5DW7.js";import{a as b,b as r}from"./chunk-3K67FZLU.js";import{e as c}from"./chunk-55TU6MJR.js";var g=new m;function f(e){e=u(e,u.EMPTY_OBJECT);let t=e.minimum,n=e.maximum;if(r.typeOf.object("min",t),r.typeOf.object("max",n),c(e.offsetAttribute)&&e.offsetAttribute===d.TOP)throw new b("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=m.clone(t),this._max=m.clone(n),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}f.fromDimensions=function(e){e=u(e,u.EMPTY_OBJECT);let t=e.dimensions;r.typeOf.object("dimensions",t),r.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),r.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),r.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);let n=m.multiplyByScalar(t,.5,new m);return new f({minimum:m.negate(n,new m),maximum:n,offsetAttribute:e.offsetAttribute})};f.fromAxisAlignedBoundingBox=function(e){return r.typeOf.object("boundindBox",e),new f({minimum:e.minimum,maximum:e.maximum})};f.packedLength=2*m.packedLength+1;f.pack=function(e,t,n){return r.typeOf.object("value",e),r.defined("array",t),n=u(n,0),m.pack(e._min,t,n),m.pack(e._max,t,n+m.packedLength),t[n+m.packedLength*2]=u(e._offsetAttribute,-1),t};var w=new m,x=new m,_={minimum:w,maximum:x,offsetAttribute:void 0};f.unpack=function(e,t,n){r.defined("array",e),t=u(t,0);let s=m.unpack(e,t,w),o=m.unpack(e,t+m.packedLength,x),i=e[t+m.packedLength*2];return c(n)?(n._min=m.clone(s,n._min),n._max=m.clone(o,n._max),n._offsetAttribute=i===-1?void 0:i,n):(_.offsetAttribute=i===-1?void 0:i,new f(_))};f.createGeometry=function(e){let t=e._min,n=e._max;if(m.equals(t,n))return;let s=new l,o=new Uint16Array(12*2),i=new Float64Array(8*3);i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=n.x,i[4]=t.y,i[5]=t.z,i[6]=n.x,i[7]=n.y,i[8]=t.z,i[9]=t.x,i[10]=n.y,i[11]=t.z,i[12]=t.x,i[13]=t.y,i[14]=n.z,i[15]=n.x,i[16]=t.y,i[17]=n.z,i[18]=n.x,i[19]=n.y,i[20]=n.z,i[21]=t.x,i[22]=n.y,i[23]=n.z,s.position=new p({componentDatatype:a.DOUBLE,componentsPerAttribute:3,values:i}),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 k=m.subtract(n,t,g),E=m.magnitude(k)*.5;if(c(e._offsetAttribute)){let T=i.length,B=e._offsetAttribute===d.NONE?0:1,z=new Uint8Array(T/3).fill(B);s.applyOffset=new p({componentDatatype:a.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}return new h({attributes:s,indices:o,primitiveType:O.LINES,boundingSphere:new A(m.ZERO,E),offsetAttribute:e._offsetAttribute})};var y=f;function L(e,t){return c(t)&&(e=y.unpack(e,t)),y.createGeometry(e)}var R=L;export{R as default};
public/CimSDK/Workers/createCircleGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as l}from"./chunk-3VV4IUYO.js";import"./chunk-KG2EYIEQ.js";import"./chunk-KBTPUVX4.js";import"./chunk-NLFLNVCF.js";import"./chunk-HV57XH4K.js";import"./chunk-X2QIAW2L.js";import"./chunk-55FFQILS.js";import{a as m}from"./chunk-WF3WCQMH.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import"./chunk-ZDNS2GYV.js";import"./chunk-LH4TAMBV.js";import"./chunk-TNSV6TPX.js";import"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import{b as a,e as s}from"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as c}from"./chunk-5HWP5DW7.js";import{b as p}from"./chunk-INT7THOB.js";import{e as d}from"./chunk-PPCZYYBW.js";function n(e){e=c(e,c.EMPTY_OBJECT);let r=e.radius;p.typeOf.number("radius",r);let o={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new l(o),this._workerName="createCircleGeometry"}n.packedLength=l.packedLength;n.pack=function(e,r,o){return p.typeOf.object("value",e),l.pack(e._ellipseGeometry,r,o)};var f=new l({center:new a,semiMajorAxis:1,semiMinorAxis:1}),t={center:new a,radius:void 0,ellipsoid:s.clone(s.default),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new m,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};n.unpack=function(e,r,o){let i=l.unpack(e,r,f);return t.center=a.clone(i._center,t.center),t.ellipsoid=s.clone(i._ellipsoid,t.ellipsoid),t.ellipsoid=s.clone(i._ellipsoid,f._ellipsoid),t.height=i._height,t.extrudedHeight=i._extrudedHeight,t.granularity=i._granularity,t.vertexFormat=m.clone(i._vertexFormat,t.vertexFormat),t.stRotation=i._stRotation,t.shadowVolume=i._shadowVolume,d(o)?(t.semiMajorAxis=i._semiMajorAxis,t.semiMinorAxis=i._semiMinorAxis,o._ellipseGeometry=new l(t),o):(t.radius=i._semiMajorAxis,new n(t))};n.createGeometry=function(e){return l.createGeometry(e._ellipseGeometry)};n.createShadowVolume=function(e,r,o){let i=e._ellipseGeometry._granularity,u=e._ellipseGeometry._ellipsoid,h=r(i,u),x=o(i,u);return new n({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:u,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:h,height:x,vertexFormat:m.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(n.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var _=n;function g(e,r){return d(r)&&(e=_.unpack(e,r)),e._ellipseGeometry._center=a.clone(e._ellipseGeometry._center),e._ellipseGeometry._ellipsoid=s.clone(e._ellipseGeometry._ellipsoid),_.createGeometry(e)}var H=g;export{H as default};
import{a as l}from"./chunk-3I5K75MC.js";import"./chunk-QP426X7X.js";import"./chunk-S5MWIP3D.js";import"./chunk-OOGG7EHS.js";import"./chunk-EZRSLM27.js";import"./chunk-E5FOJ77O.js";import"./chunk-55FFQILS.js";import{a as m}from"./chunk-32UDSAPU.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import"./chunk-563CJZT3.js";import"./chunk-LH4TAMBV.js";import"./chunk-WI5KIEME.js";import"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import{b as a,e as s}from"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as c}from"./chunk-5HWP5DW7.js";import{b as p}from"./chunk-3K67FZLU.js";import{e as d}from"./chunk-55TU6MJR.js";function n(e){e=c(e,c.EMPTY_OBJECT);let r=e.radius;p.typeOf.number("radius",r);let o={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new l(o),this._workerName="createCircleGeometry"}n.packedLength=l.packedLength;n.pack=function(e,r,o){return p.typeOf.object("value",e),l.pack(e._ellipseGeometry,r,o)};var f=new l({center:new a,semiMajorAxis:1,semiMinorAxis:1}),t={center:new a,radius:void 0,ellipsoid:s.clone(s.default),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new m,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};n.unpack=function(e,r,o){let i=l.unpack(e,r,f);return t.center=a.clone(i._center,t.center),t.ellipsoid=s.clone(i._ellipsoid,t.ellipsoid),t.ellipsoid=s.clone(i._ellipsoid,f._ellipsoid),t.height=i._height,t.extrudedHeight=i._extrudedHeight,t.granularity=i._granularity,t.vertexFormat=m.clone(i._vertexFormat,t.vertexFormat),t.stRotation=i._stRotation,t.shadowVolume=i._shadowVolume,d(o)?(t.semiMajorAxis=i._semiMajorAxis,t.semiMinorAxis=i._semiMinorAxis,o._ellipseGeometry=new l(t),o):(t.radius=i._semiMajorAxis,new n(t))};n.createGeometry=function(e){return l.createGeometry(e._ellipseGeometry)};n.createShadowVolume=function(e,r,o){let i=e._ellipseGeometry._granularity,u=e._ellipseGeometry._ellipsoid,h=r(i,u),x=o(i,u);return new n({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:u,stRotation:e._ellipseGeometry._stRotation,granularity:i,extrudedHeight:h,height:x,vertexFormat:m.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(n.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}});var _=n;function g(e,r){return d(r)&&(e=_.unpack(e,r)),e._ellipseGeometry._center=a.clone(e._ellipseGeometry._center),e._ellipseGeometry._ellipsoid=s.clone(e._ellipseGeometry._ellipsoid),_.createGeometry(e)}var H=g;export{H as default};
public/CimSDK/Workers/createCircleOutlineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as n}from"./chunk-WEAECJWM.js";import"./chunk-KG2EYIEQ.js";import"./chunk-55FFQILS.js";import"./chunk-ZDNS2GYV.js";import"./chunk-LH4TAMBV.js";import"./chunk-TNSV6TPX.js";import"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import{b as o,e as s}from"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as u}from"./chunk-5HWP5DW7.js";import{b as d}from"./chunk-INT7THOB.js";import{e as a}from"./chunk-PPCZYYBW.js";function m(e){e=u(e,u.EMPTY_OBJECT);let r=e.radius;d.typeOf.number("radius",r);let l={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new n(l),this._workerName="createCircleOutlineGeometry"}m.packedLength=n.packedLength;m.pack=function(e,r,l){return d.typeOf.object("value",e),n.pack(e._ellipseGeometry,r,l)};var p=new n({center:new o,semiMajorAxis:1,semiMinorAxis:1}),i={center:new o,radius:void 0,ellipsoid:s.clone(s.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};m.unpack=function(e,r,l){let t=n.unpack(e,r,p);return i.center=o.clone(t._center,i.center),i.ellipsoid=s.clone(t._ellipsoid,i.ellipsoid),i.height=t._height,i.extrudedHeight=t._extrudedHeight,i.granularity=t._granularity,i.numberOfVerticalLines=t._numberOfVerticalLines,a(l)?(i.semiMajorAxis=t._semiMajorAxis,i.semiMinorAxis=t._semiMinorAxis,l._ellipseGeometry=new n(i),l):(i.radius=t._semiMajorAxis,new m(i))};m.createGeometry=function(e){return n.createGeometry(e._ellipseGeometry)};var c=m;function f(e,r){return a(r)&&(e=c.unpack(e,r)),e._ellipseGeometry._center=o.clone(e._ellipseGeometry._center),e._ellipseGeometry._ellipsoid=s.clone(e._ellipseGeometry._ellipsoid),c.createGeometry(e)}var E=f;export{E as default};
import{a as n}from"./chunk-MQCAYMIH.js";import"./chunk-QP426X7X.js";import"./chunk-55FFQILS.js";import"./chunk-563CJZT3.js";import"./chunk-LH4TAMBV.js";import"./chunk-WI5KIEME.js";import"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import{b as o,e as s}from"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as u}from"./chunk-5HWP5DW7.js";import{b as d}from"./chunk-3K67FZLU.js";import{e as a}from"./chunk-55TU6MJR.js";function m(e){e=u(e,u.EMPTY_OBJECT);let r=e.radius;d.typeOf.number("radius",r);let l={center:e.center,semiMajorAxis:r,semiMinorAxis:r,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,numberOfVerticalLines:e.numberOfVerticalLines};this._ellipseGeometry=new n(l),this._workerName="createCircleOutlineGeometry"}m.packedLength=n.packedLength;m.pack=function(e,r,l){return d.typeOf.object("value",e),n.pack(e._ellipseGeometry,r,l)};var p=new n({center:new o,semiMajorAxis:1,semiMinorAxis:1}),i={center:new o,radius:void 0,ellipsoid:s.clone(s.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,numberOfVerticalLines:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0};m.unpack=function(e,r,l){let t=n.unpack(e,r,p);return i.center=o.clone(t._center,i.center),i.ellipsoid=s.clone(t._ellipsoid,i.ellipsoid),i.height=t._height,i.extrudedHeight=t._extrudedHeight,i.granularity=t._granularity,i.numberOfVerticalLines=t._numberOfVerticalLines,a(l)?(i.semiMajorAxis=t._semiMajorAxis,i.semiMinorAxis=t._semiMinorAxis,l._ellipseGeometry=new n(i),l):(i.radius=t._semiMajorAxis,new m(i))};m.createGeometry=function(e){return n.createGeometry(e._ellipseGeometry)};var c=m;function f(e,r){return a(r)&&(e=c.unpack(e,r)),e._ellipseGeometry._center=o.clone(e._ellipseGeometry._center),e._ellipseGeometry._ellipsoid=s.clone(e._ellipseGeometry._ellipsoid),c.createGeometry(e)}var E=f;export{E as default};
public/CimSDK/Workers/createCoplanarPolygonGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as et}from"./chunk-UDJW7K3P.js";import{a as U}from"./chunk-DOZGBIYZ.js";import"./chunk-RPFXEG5U.js";import{a as y}from"./chunk-YBGQTN3R.js";import"./chunk-3B3UDCHP.js";import{a as I}from"./chunk-KBTPUVX4.js";import{a as $}from"./chunk-NLFLNVCF.js";import"./chunk-HV57XH4K.js";import"./chunk-X2QIAW2L.js";import{a as u}from"./chunk-WF3WCQMH.js";import"./chunk-P5SE5XVC.js";import"./chunk-ZPRLAWII.js";import{b as ot}from"./chunk-IRIBHMN7.js";import{a as tt}from"./chunk-A6RR2BLJ.js";import"./chunk-EPQZOCRV.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{a as J}from"./chunk-ZDNS2GYV.js";import{a as X}from"./chunk-LH4TAMBV.js";import{b as W,c as Y,d as z}from"./chunk-TNSV6TPX.js";import{d as K}from"./chunk-QHUUGFLC.js";import{f as Q}from"./chunk-BHJLM5NY.js";import{a as N}from"./chunk-3LWOQSP3.js";import{b as i,d as x,e as m,f as P}from"./chunk-7DK7KB7Q.js";import{a as q}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as f}from"./chunk-5HWP5DW7.js";import{b as B}from"./chunk-INT7THOB.js";import{e as g}from"./chunk-PPCZYYBW.js";var st=new i,at=new et,pt=new x,lt=new x,mt=new i,ft=new i,ut=new i,V=new i,yt=new i,ht=new i,nt=new Q,dt=new P,gt=new P,Pt=new i;function wt(e,t,o,a,h,A,r,n,p){let b=e.positions,c=ot.triangulate(e.positions2D,e.holes);c.length<3&&(c=[0,1,2]);let w=J.createTypedArray(b.length,c.length);w.set(c);let D=dt;if(a!==0){let d=Q.fromAxisAngle(r,a,nt);if(D=P.fromQuaternion(d,D),t.tangent||t.bitangent){d=Q.fromAxisAngle(r,-a,nt);let G=P.fromQuaternion(d,gt);n=i.normalize(P.multiplyByVector(G,n,n),n),t.bitangent&&(p=i.normalize(i.cross(r,n,p),p))}}else D=P.clone(P.IDENTITY,D);let j=lt;t.st&&(j.x=o.x,j.y=o.y);let k=b.length,C=k*3,L=new Float64Array(C),T=t.normal?new Float32Array(C):void 0,R=t.tangent?new Float32Array(C):void 0,S=t.bitangent?new Float32Array(C):void 0,H=t.st?new Float32Array(k*2):void 0,M=0,F=0,l=0,O=0,s=0;for(let d=0;d<k;d++){let G=b[d];if(L[M++]=G.x,L[M++]=G.y,L[M++]=G.z,t.st)if(g(h)&&h.positions.length===k)H[s++]=h.positions[d].x,H[s++]=h.positions[d].y;else{let it=P.multiplyByVector(D,G,st),v=A(it,pt);x.subtract(v,j,v);let rt=q.clamp(v.x/o.width,0,1),ct=q.clamp(v.y/o.height,0,1);H[s++]=rt,H[s++]=ct}t.normal&&(T[F++]=r.x,T[F++]=r.y,T[F++]=r.z),t.tangent&&(R[O++]=n.x,R[O++]=n.y,R[O++]=n.z),t.bitangent&&(S[l++]=p.x,S[l++]=p.y,S[l++]=p.z)}let _=new X;return t.position&&(_.position=new z({componentDatatype:N.DOUBLE,componentsPerAttribute:3,values:L})),t.normal&&(_.normal=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:T})),t.tangent&&(_.tangent=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:R})),t.bitangent&&(_.bitangent=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:S})),t.st&&(_.st=new z({componentDatatype:N.FLOAT,componentsPerAttribute:2,values:H})),new Y({attributes:_,indices:w,primitiveType:W.TRIANGLES})}function E(e){e=f(e,f.EMPTY_OBJECT);let t=e.polygonHierarchy,o=e.textureCoordinates;B.defined("options.polygonHierarchy",t);let a=f(e.vertexFormat,u.DEFAULT);this._vertexFormat=u.clone(a),this._polygonHierarchy=t,this._stRotation=f(e.stRotation,0),this._ellipsoid=m.clone(f(e.ellipsoid,m.default)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=o,this.packedLength=y.computeHierarchyPackedLength(t,i)+u.packedLength+m.packedLength+(g(o)?y.computeHierarchyPackedLength(o,x):1)+2}E.fromPositions=function(e){e=f(e,f.EMPTY_OBJECT),B.defined("options.positions",e.positions);let t={polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates};return new E(t)};E.pack=function(e,t,o){return B.typeOf.object("value",e),B.defined("array",t),o=f(o,0),o=y.packPolygonHierarchy(e._polygonHierarchy,t,o,i),m.pack(e._ellipsoid,t,o),o+=m.packedLength,u.pack(e._vertexFormat,t,o),o+=u.packedLength,t[o++]=e._stRotation,g(e._textureCoordinates)?o=y.packPolygonHierarchy(e._textureCoordinates,t,o,x):t[o++]=-1,t[o++]=e.packedLength,t};var _t=m.clone(m.UNIT_SPHERE),At=new u,bt={polygonHierarchy:{}};E.unpack=function(e,t,o){B.defined("array",e),t=f(t,0);let a=y.unpackPolygonHierarchy(e,t,i);t=a.startingIndex,delete a.startingIndex;let h=m.unpack(e,t,_t);t+=m.packedLength;let A=u.unpack(e,t,At);t+=u.packedLength;let r=e[t++],n=e[t]===-1?void 0:y.unpackPolygonHierarchy(e,t,x);g(n)?(t=n.startingIndex,delete n.startingIndex):t++;let p=e[t++];return g(o)||(o=new E(bt)),o._polygonHierarchy=a,o._ellipsoid=m.clone(h,o._ellipsoid),o._vertexFormat=u.clone(A,o._vertexFormat),o._stRotation=r,o._textureCoordinates=n,o.packedLength=p,o};E.createGeometry=function(e){let t=e._vertexFormat,o=e._polygonHierarchy,a=e._stRotation,h=e._textureCoordinates,A=g(h),r=o.positions;if(r=tt(r,i.equalsEpsilon,!0),r.length<3)return;let n=mt,p=ft,b=ut,c=yt,w=ht;if(!U.computeProjectTo2DArguments(r,V,c,w))return;if(n=i.cross(c,w,n),n=i.normalize(n,n),!i.equalsEpsilon(V,i.ZERO,q.EPSILON6)){let s=e._ellipsoid.geodeticSurfaceNormal(V,Pt);i.dot(n,s)<0&&(n=i.negate(n,n),c=i.negate(c,c))}let j=U.createProjectPointsTo2DFunction(V,c,w),k=U.createProjectPointTo2DFunction(V,c,w);t.tangent&&(p=i.clone(c,p)),t.bitangent&&(b=i.clone(w,b));let C=y.polygonsFromHierarchy(o,A,j,!1),L=C.hierarchy,T=C.polygons,R=function(s){return s},S=A?y.polygonsFromHierarchy(h,!0,R,!1).polygons:void 0;if(L.length===0)return;r=L[0].outerRing;let H=K.fromPoints(r),M=y.computeBoundingRectangle(n,k,r,a,at),F=[];for(let s=0;s<T.length;s++){let _=new I({geometry:wt(T[s],t,M,a,A?S[s]:void 0,k,n,p,b)});F.push(_)}let l=$.combineInstances(F)[0];l.attributes.position.values=new Float64Array(l.attributes.position.values),l.indices=J.createTypedArray(l.attributes.position.values.length/3,l.indices);let O=l.attributes;return t.position||delete O.position,new Y({attributes:O,indices:l.indices,primitiveType:l.primitiveType,boundingSphere:H})};var Z=E;function kt(e,t){return g(t)&&(e=Z.unpack(e,t)),Z.createGeometry(e)}var Xt=kt;export{Xt as default};
import{a as et}from"./chunk-LZCCFKBI.js";import{a as U}from"./chunk-TMZSBMX2.js";import"./chunk-W5L3OOEF.js";import{a as y}from"./chunk-GN3R6MXA.js";import"./chunk-3B3UDCHP.js";import{a as I}from"./chunk-S5MWIP3D.js";import{a as $}from"./chunk-OOGG7EHS.js";import"./chunk-EZRSLM27.js";import"./chunk-E5FOJ77O.js";import{a as u}from"./chunk-32UDSAPU.js";import"./chunk-TBSK33NR.js";import"./chunk-LSAUAD4X.js";import{b as ot}from"./chunk-VDNLYVKB.js";import{a as tt}from"./chunk-EX67AA2G.js";import"./chunk-V5KKODOM.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{a as J}from"./chunk-563CJZT3.js";import{a as X}from"./chunk-LH4TAMBV.js";import{b as W,c as Y,d as z}from"./chunk-WI5KIEME.js";import{d as K}from"./chunk-ZPW6H6BB.js";import{f as Q}from"./chunk-HMXXHGCW.js";import{a as N}from"./chunk-NFDMGE7Q.js";import{b as i,d as x,e as m,f as P}from"./chunk-VDZXURWO.js";import{a as q}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as f}from"./chunk-5HWP5DW7.js";import{b as B}from"./chunk-3K67FZLU.js";import{e as g}from"./chunk-55TU6MJR.js";var st=new i,at=new et,pt=new x,lt=new x,mt=new i,ft=new i,ut=new i,V=new i,yt=new i,ht=new i,nt=new Q,dt=new P,gt=new P,Pt=new i;function wt(e,t,o,a,h,A,r,n,p){let b=e.positions,c=ot.triangulate(e.positions2D,e.holes);c.length<3&&(c=[0,1,2]);let w=J.createTypedArray(b.length,c.length);w.set(c);let D=dt;if(a!==0){let d=Q.fromAxisAngle(r,a,nt);if(D=P.fromQuaternion(d,D),t.tangent||t.bitangent){d=Q.fromAxisAngle(r,-a,nt);let G=P.fromQuaternion(d,gt);n=i.normalize(P.multiplyByVector(G,n,n),n),t.bitangent&&(p=i.normalize(i.cross(r,n,p),p))}}else D=P.clone(P.IDENTITY,D);let j=lt;t.st&&(j.x=o.x,j.y=o.y);let k=b.length,C=k*3,L=new Float64Array(C),T=t.normal?new Float32Array(C):void 0,R=t.tangent?new Float32Array(C):void 0,S=t.bitangent?new Float32Array(C):void 0,H=t.st?new Float32Array(k*2):void 0,M=0,F=0,l=0,O=0,s=0;for(let d=0;d<k;d++){let G=b[d];if(L[M++]=G.x,L[M++]=G.y,L[M++]=G.z,t.st)if(g(h)&&h.positions.length===k)H[s++]=h.positions[d].x,H[s++]=h.positions[d].y;else{let it=P.multiplyByVector(D,G,st),v=A(it,pt);x.subtract(v,j,v);let rt=q.clamp(v.x/o.width,0,1),ct=q.clamp(v.y/o.height,0,1);H[s++]=rt,H[s++]=ct}t.normal&&(T[F++]=r.x,T[F++]=r.y,T[F++]=r.z),t.tangent&&(R[O++]=n.x,R[O++]=n.y,R[O++]=n.z),t.bitangent&&(S[l++]=p.x,S[l++]=p.y,S[l++]=p.z)}let _=new X;return t.position&&(_.position=new z({componentDatatype:N.DOUBLE,componentsPerAttribute:3,values:L})),t.normal&&(_.normal=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:T})),t.tangent&&(_.tangent=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:R})),t.bitangent&&(_.bitangent=new z({componentDatatype:N.FLOAT,componentsPerAttribute:3,values:S})),t.st&&(_.st=new z({componentDatatype:N.FLOAT,componentsPerAttribute:2,values:H})),new Y({attributes:_,indices:w,primitiveType:W.TRIANGLES})}function E(e){e=f(e,f.EMPTY_OBJECT);let t=e.polygonHierarchy,o=e.textureCoordinates;B.defined("options.polygonHierarchy",t);let a=f(e.vertexFormat,u.DEFAULT);this._vertexFormat=u.clone(a),this._polygonHierarchy=t,this._stRotation=f(e.stRotation,0),this._ellipsoid=m.clone(f(e.ellipsoid,m.default)),this._workerName="createCoplanarPolygonGeometry",this._textureCoordinates=o,this.packedLength=y.computeHierarchyPackedLength(t,i)+u.packedLength+m.packedLength+(g(o)?y.computeHierarchyPackedLength(o,x):1)+2}E.fromPositions=function(e){e=f(e,f.EMPTY_OBJECT),B.defined("options.positions",e.positions);let t={polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid,textureCoordinates:e.textureCoordinates};return new E(t)};E.pack=function(e,t,o){return B.typeOf.object("value",e),B.defined("array",t),o=f(o,0),o=y.packPolygonHierarchy(e._polygonHierarchy,t,o,i),m.pack(e._ellipsoid,t,o),o+=m.packedLength,u.pack(e._vertexFormat,t,o),o+=u.packedLength,t[o++]=e._stRotation,g(e._textureCoordinates)?o=y.packPolygonHierarchy(e._textureCoordinates,t,o,x):t[o++]=-1,t[o++]=e.packedLength,t};var _t=m.clone(m.UNIT_SPHERE),At=new u,bt={polygonHierarchy:{}};E.unpack=function(e,t,o){B.defined("array",e),t=f(t,0);let a=y.unpackPolygonHierarchy(e,t,i);t=a.startingIndex,delete a.startingIndex;let h=m.unpack(e,t,_t);t+=m.packedLength;let A=u.unpack(e,t,At);t+=u.packedLength;let r=e[t++],n=e[t]===-1?void 0:y.unpackPolygonHierarchy(e,t,x);g(n)?(t=n.startingIndex,delete n.startingIndex):t++;let p=e[t++];return g(o)||(o=new E(bt)),o._polygonHierarchy=a,o._ellipsoid=m.clone(h,o._ellipsoid),o._vertexFormat=u.clone(A,o._vertexFormat),o._stRotation=r,o._textureCoordinates=n,o.packedLength=p,o};E.createGeometry=function(e){let t=e._vertexFormat,o=e._polygonHierarchy,a=e._stRotation,h=e._textureCoordinates,A=g(h),r=o.positions;if(r=tt(r,i.equalsEpsilon,!0),r.length<3)return;let n=mt,p=ft,b=ut,c=yt,w=ht;if(!U.computeProjectTo2DArguments(r,V,c,w))return;if(n=i.cross(c,w,n),n=i.normalize(n,n),!i.equalsEpsilon(V,i.ZERO,q.EPSILON6)){let s=e._ellipsoid.geodeticSurfaceNormal(V,Pt);i.dot(n,s)<0&&(n=i.negate(n,n),c=i.negate(c,c))}let j=U.createProjectPointsTo2DFunction(V,c,w),k=U.createProjectPointTo2DFunction(V,c,w);t.tangent&&(p=i.clone(c,p)),t.bitangent&&(b=i.clone(w,b));let C=y.polygonsFromHierarchy(o,A,j,!1),L=C.hierarchy,T=C.polygons,R=function(s){return s},S=A?y.polygonsFromHierarchy(h,!0,R,!1).polygons:void 0;if(L.length===0)return;r=L[0].outerRing;let H=K.fromPoints(r),M=y.computeBoundingRectangle(n,k,r,a,at),F=[];for(let s=0;s<T.length;s++){let _=new I({geometry:wt(T[s],t,M,a,A?S[s]:void 0,k,n,p,b)});F.push(_)}let l=$.combineInstances(F)[0];l.attributes.position.values=new Float64Array(l.attributes.position.values),l.indices=J.createTypedArray(l.attributes.position.values.length/3,l.indices);let O=l.attributes;return t.position||delete O.position,new Y({attributes:O,indices:l.indices,primitiveType:l.primitiveType,boundingSphere:H})};var Z=E;function kt(e,t){return g(t)&&(e=Z.unpack(e,t)),Z.createGeometry(e)}var Xt=kt;export{Xt as default};
public/CimSDK/Workers/createCoplanarPolygonOutlineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as T}from"./chunk-DOZGBIYZ.js";import"./chunk-RPFXEG5U.js";import{a as f}from"./chunk-YBGQTN3R.js";import"./chunk-3B3UDCHP.js";import{a as G}from"./chunk-KBTPUVX4.js";import{a as C}from"./chunk-NLFLNVCF.js";import"./chunk-HV57XH4K.js";import"./chunk-X2QIAW2L.js";import"./chunk-P5SE5XVC.js";import"./chunk-ZPRLAWII.js";import"./chunk-IRIBHMN7.js";import{a as L}from"./chunk-A6RR2BLJ.js";import"./chunk-EPQZOCRV.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{a as w}from"./chunk-ZDNS2GYV.js";import{a as O}from"./chunk-LH4TAMBV.js";import{b,c as d,d as k}from"./chunk-TNSV6TPX.js";import{d as P}from"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import{a as H}from"./chunk-3LWOQSP3.js";import{b as l,e as g}from"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as c}from"./chunk-5HWP5DW7.js";import{b as a}from"./chunk-INT7THOB.js";import{e as u}from"./chunk-PPCZYYBW.js";function E(o){let e=o.length,t=new Float64Array(e*3),r=w.createTypedArray(e,e*2),i=0,s=0;for(let n=0;n<e;n++){let p=o[n];t[i++]=p.x,t[i++]=p.y,t[i++]=p.z,r[s++]=n,r[s++]=(n+1)%e}let y=new O({position:new k({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:t})});return new d({attributes:y,indices:r,primitiveType:b.LINES})}function m(o){o=c(o,c.EMPTY_OBJECT);let e=o.polygonHierarchy;a.defined("options.polygonHierarchy",e),this._polygonHierarchy=e,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=f.computeHierarchyPackedLength(e,l)+1}m.fromPositions=function(o){o=c(o,c.EMPTY_OBJECT),a.defined("options.positions",o.positions);let e={polygonHierarchy:{positions:o.positions}};return new m(e)};m.pack=function(o,e,t){return a.typeOf.object("value",o),a.defined("array",e),t=c(t,0),t=f.packPolygonHierarchy(o._polygonHierarchy,e,t,l),e[t]=o.packedLength,e};var v={polygonHierarchy:{}};m.unpack=function(o,e,t){a.defined("array",o),e=c(e,0);let r=f.unpackPolygonHierarchy(o,e,l);e=r.startingIndex,delete r.startingIndex;let i=o[e];return u(t)||(t=new m(v)),t._polygonHierarchy=r,t.packedLength=i,t};m.createGeometry=function(o){let e=o._polygonHierarchy,t=e.positions;if(t=L(t,l.equalsEpsilon,!0),t.length<3||!T.validOutline(t))return;let i=f.polygonOutlinesFromHierarchy(e,!1);if(i.length===0)return;let s=[];for(let p=0;p<i.length;p++){let _=new G({geometry:E(i[p])});s.push(_)}let y=C.combineInstances(s)[0],n=P.fromPoints(e.positions);return new d({attributes:y.attributes,indices:y.indices,primitiveType:y.primitiveType,boundingSphere:n})};var h=m;function A(o,e){return u(e)&&(o=h.unpack(o,e)),o._ellipsoid=g.clone(o._ellipsoid),h.createGeometry(o)}var Z=A;export{Z as default};
import{a as T}from"./chunk-TMZSBMX2.js";import"./chunk-W5L3OOEF.js";import{a as f}from"./chunk-GN3R6MXA.js";import"./chunk-3B3UDCHP.js";import{a as G}from"./chunk-S5MWIP3D.js";import{a as C}from"./chunk-OOGG7EHS.js";import"./chunk-EZRSLM27.js";import"./chunk-E5FOJ77O.js";import"./chunk-TBSK33NR.js";import"./chunk-LSAUAD4X.js";import"./chunk-VDNLYVKB.js";import{a as L}from"./chunk-EX67AA2G.js";import"./chunk-V5KKODOM.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{a as w}from"./chunk-563CJZT3.js";import{a as O}from"./chunk-LH4TAMBV.js";import{b,c as d,d as k}from"./chunk-WI5KIEME.js";import{d as P}from"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import{a as H}from"./chunk-NFDMGE7Q.js";import{b as l,e as g}from"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as c}from"./chunk-5HWP5DW7.js";import{b as a}from"./chunk-3K67FZLU.js";import{e as u}from"./chunk-55TU6MJR.js";function E(o){let e=o.length,t=new Float64Array(e*3),r=w.createTypedArray(e,e*2),i=0,s=0;for(let n=0;n<e;n++){let p=o[n];t[i++]=p.x,t[i++]=p.y,t[i++]=p.z,r[s++]=n,r[s++]=(n+1)%e}let y=new O({position:new k({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:t})});return new d({attributes:y,indices:r,primitiveType:b.LINES})}function m(o){o=c(o,c.EMPTY_OBJECT);let e=o.polygonHierarchy;a.defined("options.polygonHierarchy",e),this._polygonHierarchy=e,this._workerName="createCoplanarPolygonOutlineGeometry",this.packedLength=f.computeHierarchyPackedLength(e,l)+1}m.fromPositions=function(o){o=c(o,c.EMPTY_OBJECT),a.defined("options.positions",o.positions);let e={polygonHierarchy:{positions:o.positions}};return new m(e)};m.pack=function(o,e,t){return a.typeOf.object("value",o),a.defined("array",e),t=c(t,0),t=f.packPolygonHierarchy(o._polygonHierarchy,e,t,l),e[t]=o.packedLength,e};var v={polygonHierarchy:{}};m.unpack=function(o,e,t){a.defined("array",o),e=c(e,0);let r=f.unpackPolygonHierarchy(o,e,l);e=r.startingIndex,delete r.startingIndex;let i=o[e];return u(t)||(t=new m(v)),t._polygonHierarchy=r,t.packedLength=i,t};m.createGeometry=function(o){let e=o._polygonHierarchy,t=e.positions;if(t=L(t,l.equalsEpsilon,!0),t.length<3||!T.validOutline(t))return;let i=f.polygonOutlinesFromHierarchy(e,!1);if(i.length===0)return;let s=[];for(let p=0;p<i.length;p++){let _=new G({geometry:E(i[p])});s.push(_)}let y=C.combineInstances(s)[0],n=P.fromPoints(e.positions);return new d({attributes:y.attributes,indices:y.indices,primitiveType:y.primitiveType,boundingSphere:n})};var h=m;function A(o,e){return u(e)&&(o=h.unpack(o,e)),o._ellipsoid=g.clone(o._ellipsoid),h.createGeometry(o)}var Z=A;export{Z as default};
public/CimSDK/Workers/createCorridorGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as M}from"./chunk-LH5VIH3W.js";import{a as ht}from"./chunk-KHYDR4FN.js";import"./chunk-WGRWYGAM.js";import"./chunk-5B7R4ODL.js";import{a as _t}from"./chunk-55FFQILS.js";import{a as G}from"./chunk-WF3WCQMH.js";import"./chunk-P5SE5XVC.js";import"./chunk-ZPRLAWII.js";import{b as yt}from"./chunk-IRIBHMN7.js";import{a as Pt}from"./chunk-A6RR2BLJ.js";import"./chunk-EPQZOCRV.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{a as Nt}from"./chunk-ZDNS2GYV.js";import{a as Ct}from"./chunk-LH4TAMBV.js";import{b as Mt,c as Vt,d as x}from"./chunk-TNSV6TPX.js";import{d as St}from"./chunk-QHUUGFLC.js";import{i as Et}from"./chunk-BHJLM5NY.js";import{a as F}from"./chunk-3LWOQSP3.js";import{b as o,c as bt,e as I}from"./chunk-7DK7KB7Q.js";import{a as st}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as B}from"./chunk-5HWP5DW7.js";import{b as it}from"./chunk-INT7THOB.js";import{e as X}from"./chunk-PPCZYYBW.js";var zt=new o,kt=new o,wt=new o,Tt=new o,jt=new o,Ht=new o,at=new o,ft=new o;function Ut(t,e){for(let i=0;i<t.length;i++)t[i]=e.scaleToGeodeticSurface(t[i],t[i]);return t}function Z(t,e,i,l,d,f){let h=t.normals,O=t.tangents,g=t.bitangents,r=o.normalize(o.cross(i,e,at),at);f.normal&&M.addAttribute(h,e,l,d),f.tangent&&M.addAttribute(O,r,l,d),f.bitangent&&M.addAttribute(g,i,l,d)}function Bt(t,e,i){let l=t.positions,d=t.corners,f=t.endPositions,h=t.lefts,O=t.normals,g=new Ct,r,a=0,s=0,n,A=0,u;for(n=0;n<l.length;n+=2)u=l[n].length-3,a+=u,A+=u*2,s+=l[n+1].length-3;for(a+=3,s+=3,n=0;n<d.length;n++){r=d[n];let c=d[n].leftPositions;X(c)?(u=c.length,a+=u,A+=u):(u=d[n].rightPositions.length,s+=u,A+=u)}let b=X(f),p;b&&(p=f[0].length-3,a+=p,s+=p,p/=3,A+=p*6);let R=a+s,m=new Float64Array(R),C=e.normal?new Float32Array(R):void 0,D=e.tangent?new Float32Array(R):void 0,lt=e.bitangent?new Float32Array(R):void 0,z={normals:C,tangents:D,bitangents:lt},y=0,E=R-1,S,V,H,J,P=zt,w=kt,nt,ot,mt=p/2,_=Nt.createTypedArray(R/3,A),T=0;if(b){ot=wt,nt=Tt;let c=f[0];for(P=o.fromArray(O,0,P),w=o.fromArray(h,0,w),n=0;n<mt;n++)ot=o.fromArray(c,(mt-1-n)*3,ot),nt=o.fromArray(c,(mt+n)*3,nt),M.addAttribute(m,nt,y),M.addAttribute(m,ot,void 0,E),Z(z,P,w,y,E,e),V=y/3,J=V+1,S=(E-2)/3,H=S-1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=J,y+=3,E-=3}let At=0,ut=0,rt=l[At++],q=l[At++];m.set(rt,y),m.set(q,E-q.length+1),w=o.fromArray(h,ut,w);let ct,dt;for(u=q.length-3,n=0;n<u;n+=3)ct=i.geodeticSurfaceNormal(o.fromArray(rt,n,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u-n,ft),ft),P=o.normalize(o.add(ct,dt,P),P),Z(z,P,w,y,E,e),V=y/3,J=V+1,S=(E-2)/3,H=S-1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=J,y+=3,E-=3;for(ct=i.geodeticSurfaceNormal(o.fromArray(rt,u,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u,ft),ft),P=o.normalize(o.add(ct,dt,P),P),ut+=3,n=0;n<d.length;n++){let c;r=d[n];let $=r.leftPositions,v=r.rightPositions,L,U,N=Ht,k=wt,Y=Tt;if(P=o.fromArray(O,ut,P),X($)){for(Z(z,P,w,void 0,E,e),E-=3,L=J,U=H,c=0;c<$.length/3;c++)N=o.fromArray($,c*3,N),_[T++]=L,_[T++]=U-c-1,_[T++]=U-c,M.addAttribute(m,N,void 0,E),k=o.fromArray(m,(U-c-1)*3,k),Y=o.fromArray(m,L*3,Y),w=o.normalize(o.subtract(k,Y,w),w),Z(z,P,w,void 0,E,e),E-=3;N=o.fromArray(m,L*3,N),k=o.subtract(o.fromArray(m,U*3,k),N,k),Y=o.subtract(o.fromArray(m,(U-c)*3,Y),N,Y),w=o.normalize(o.add(k,Y,w),w),Z(z,P,w,y,void 0,e),y+=3}else{for(Z(z,P,w,y,void 0,e),y+=3,L=H,U=J,c=0;c<v.length/3;c++)N=o.fromArray(v,c*3,N),_[T++]=L,_[T++]=U+c,_[T++]=U+c+1,M.addAttribute(m,N,y),k=o.fromArray(m,L*3,k),Y=o.fromArray(m,(U+c)*3,Y),w=o.normalize(o.subtract(k,Y,w),w),Z(z,P,w,y,void 0,e),y+=3;N=o.fromArray(m,L*3,N),k=o.subtract(o.fromArray(m,(U+c)*3,k),N,k),Y=o.subtract(o.fromArray(m,U*3,Y),N,Y),w=o.normalize(o.negate(o.add(Y,k,w),w),w),Z(z,P,w,void 0,E,e),E-=3}for(rt=l[At++],q=l[At++],rt.splice(0,3),q.splice(q.length-3,3),m.set(rt,y),m.set(q,E-q.length+1),u=q.length-3,ut+=3,w=o.fromArray(h,ut,w),c=0;c<q.length;c+=3)ct=i.geodeticSurfaceNormal(o.fromArray(rt,c,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u-c,ft),ft),P=o.normalize(o.add(ct,dt,P),P),Z(z,P,w,y,E,e),J=y/3,V=J-1,H=(E-2)/3,S=H+1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=J,y+=3,E-=3;y-=3,E+=3}if(P=o.fromArray(O,O.length-3,P),Z(z,P,w,y,E,e),b){y+=3,E-=3,ot=wt,nt=Tt;let c=f[1];for(n=0;n<mt;n++)ot=o.fromArray(c,(p-n-1)*3,ot),nt=o.fromArray(c,n*3,nt),M.addAttribute(m,ot,void 0,E),M.addAttribute(m,nt,y),Z(z,P,w,y,E,e),J=y/3,V=J-1,H=(E-2)/3,S=H+1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=J,y+=3,E-=3}if(g.position=new x({componentDatatype:F.DOUBLE,componentsPerAttribute:3,values:m}),e.st){let c=new Float32Array(R/3*2),$,v,L=0;if(b){a/=3,s/=3;let U=Math.PI/(p+1);v=1/(a-p+1),$=1/(s-p+1);let N,k=p/2;for(n=k+1;n<p+1;n++)N=st.PI_OVER_TWO+U*n,c[L++]=$*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=1;n<s-p+1;n++)c[L++]=n*$,c[L++]=0;for(n=p;n>k;n--)N=st.PI_OVER_TWO-n*U,c[L++]=1-$*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=k;n>0;n--)N=st.PI_OVER_TWO-U*n,c[L++]=1-v*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=a-p;n>0;n--)c[L++]=n*v,c[L++]=1;for(n=1;n<k+1;n++)N=st.PI_OVER_TWO+U*n,c[L++]=v*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N))}else{for(a/=3,s/=3,v=1/(a-1),$=1/(s-1),n=0;n<s;n++)c[L++]=n*$,c[L++]=0;for(n=a;n>0;n--)c[L++]=(n-1)*v,c[L++]=1}g.st=new x({componentDatatype:F.FLOAT,componentsPerAttribute:2,values:c})}return e.normal&&(g.normal=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.normals})),e.tangent&&(g.tangent=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.tangents})),e.bitangent&&(g.bitangent=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.bitangents})),{attributes:g,indices:_}}function qt(t,e){if(!e.normal&&!e.tangent&&!e.bitangent&&!e.st)return t;let i=t.position.values,l,d;(e.normal||e.bitangent)&&(l=t.normal.values,d=t.bitangent.values);let f=t.position.values.length/18,h=f*3,O=f*2,g=h*2,r;if(e.normal||e.bitangent||e.tangent){let a=e.normal?new Float32Array(h*6):void 0,s=e.tangent?new Float32Array(h*6):void 0,n=e.bitangent?new Float32Array(h*6):void 0,A=zt,u=kt,b=wt,p=Tt,R=jt,m=Ht,C=g;for(r=0;r<h;r+=3){let D=C+g;A=o.fromArray(i,r,A),u=o.fromArray(i,r+h,u),b=o.fromArray(i,(r+3)%h,b),u=o.subtract(u,A,u),b=o.subtract(b,A,b),p=o.normalize(o.cross(u,b,p),p),e.normal&&(M.addAttribute(a,p,D),M.addAttribute(a,p,D+3),M.addAttribute(a,p,C),M.addAttribute(a,p,C+3)),(e.tangent||e.bitangent)&&(m=o.fromArray(l,r,m),e.bitangent&&(M.addAttribute(n,m,D),M.addAttribute(n,m,D+3),M.addAttribute(n,m,C),M.addAttribute(n,m,C+3)),e.tangent&&(R=o.normalize(o.cross(m,p,R),R),M.addAttribute(s,R,D),M.addAttribute(s,R,D+3),M.addAttribute(s,R,C),M.addAttribute(s,R,C+3))),C+=6}if(e.normal){for(a.set(l),r=0;r<h;r+=3)a[r+h]=-l[r],a[r+h+1]=-l[r+1],a[r+h+2]=-l[r+2];t.normal.values=a}else t.normal=void 0;if(e.bitangent?(n.set(d),n.set(d,h),t.bitangent.values=n):t.bitangent=void 0,e.tangent){let D=t.tangent.values;s.set(D),s.set(D,h),t.tangent.values=s}}if(e.st){let a=t.st.values,s=new Float32Array(O*6);s.set(a),s.set(a,O);let n=O*2;for(let A=0;A<2;A++){for(s[n++]=a[0],s[n++]=a[1],r=2;r<O;r+=2){let u=a[r],b=a[r+1];s[n++]=u,s[n++]=b,s[n++]=u,s[n++]=b}s[n++]=a[0],s[n++]=a[1]}t.st.values=s}return t}function Ot(t,e,i){i[e++]=t[0],i[e++]=t[1],i[e++]=t[2];for(let l=3;l<t.length;l+=3){let d=t[l],f=t[l+1],h=t[l+2];i[e++]=d,i[e++]=f,i[e++]=h,i[e++]=d,i[e++]=f,i[e++]=h}return i[e++]=t[0],i[e++]=t[1],i[e++]=t[2],i}function Jt(t,e){let i=new G({position:e.position,normal:e.normal||e.bitangent||t.shadowVolume,tangent:e.tangent,bitangent:e.normal||e.bitangent,st:e.st}),l=t.ellipsoid,d=M.computePositions(t),f=Bt(d,i,l),h=t.height,O=t.extrudedHeight,g=f.attributes,r=f.indices,a=g.position.values,s=a.length,n=new Float64Array(s*6),A=new Float64Array(s);A.set(a);let u=new Float64Array(s*4);a=yt.scaleToGeodeticHeight(a,h,l),u=Ot(a,0,u),A=yt.scaleToGeodeticHeight(A,O,l),u=Ot(A,s*2,u),n.set(a),n.set(A,s),n.set(u,s*2),g.position.values=n,g=qt(g,e);let b,p=s/3;if(t.shadowVolume){let S=g.normal.values;s=S.length;let V=new Float32Array(s*6);for(b=0;b<s;b++)S[b]=-S[b];V.set(S,s),V=Ot(S,s*4,V),g.extrudeDirection=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:V}),e.normal||(g.normal=void 0)}if(X(t.offsetAttribute)){let S=new Uint8Array(p*6);if(t.offsetAttribute===_t.TOP)S=S.fill(1,0,p).fill(1,p*2,p*4);else{let V=t.offsetAttribute===_t.NONE?0:1;S=S.fill(V)}g.applyOffset=new x({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:S})}let R=r.length,m=p+p,C=Nt.createTypedArray(n.length/3,R*2+m*3);C.set(r);let D=R;for(b=0;b<R;b+=3){let S=r[b],V=r[b+1],H=r[b+2];C[D++]=H+p,C[D++]=V+p,C[D++]=S+p}let lt,z,y,E;for(b=0;b<m;b+=2)lt=b+m,z=lt+m,y=lt+1,E=z+1,C[D++]=lt,C[D++]=z,C[D++]=y,C[D++]=y,C[D++]=z,C[D++]=E;return{attributes:g,indices:C}}var Dt=new o,gt=new o,Q=new bt;function Rt(t,e,i,l,d,f){let h=o.subtract(e,t,Dt);o.normalize(h,h);let O=i.geodeticSurfaceNormal(t,gt),g=o.cross(h,O,Dt);o.multiplyByScalar(g,l,g);let r=d.latitude,a=d.longitude,s=f.latitude,n=f.longitude;o.add(t,g,gt),i.cartesianToCartographic(gt,Q);let A=Q.latitude,u=Q.longitude;r=Math.min(r,A),a=Math.min(a,u),s=Math.max(s,A),n=Math.max(n,u),o.subtract(t,g,gt),i.cartesianToCartographic(gt,Q),A=Q.latitude,u=Q.longitude,r=Math.min(r,A),a=Math.min(a,u),s=Math.max(s,A),n=Math.max(n,u),d.latitude=r,d.longitude=a,f.latitude=s,f.longitude=n}var K=new o,pt=new o,W=new bt,j=new bt;function Yt(t,e,i,l,d){t=Ut(t,e);let f=Pt(t,o.equalsEpsilon),h=f.length;if(h<2||i<=0)return new Et;let O=i*.5;W.latitude=Number.POSITIVE_INFINITY,W.longitude=Number.POSITIVE_INFINITY,j.latitude=Number.NEGATIVE_INFINITY,j.longitude=Number.NEGATIVE_INFINITY;let g,r;if(l===ht.ROUNDED){let n=f[0];o.subtract(n,f[1],K),o.normalize(K,K),o.multiplyByScalar(K,O,K),o.add(n,K,pt),e.cartesianToCartographic(pt,Q),g=Q.latitude,r=Q.longitude,W.latitude=Math.min(W.latitude,g),W.longitude=Math.min(W.longitude,r),j.latitude=Math.max(j.latitude,g),j.longitude=Math.max(j.longitude,r)}for(let n=0;n<h-1;++n)Rt(f[n],f[n+1],e,O,W,j);let a=f[h-1];o.subtract(a,f[h-2],K),o.normalize(K,K),o.multiplyByScalar(K,O,K),o.add(a,K,pt),Rt(a,pt,e,O,W,j),l===ht.ROUNDED&&(e.cartesianToCartographic(pt,Q),g=Q.latitude,r=Q.longitude,W.latitude=Math.min(W.latitude,g),W.longitude=Math.min(W.longitude,r),j.latitude=Math.max(j.latitude,g),j.longitude=Math.max(j.longitude,r));let s=X(d)?d:new Et;return s.north=j.latitude,s.south=W.latitude,s.east=j.longitude,s.west=W.longitude,s}function et(t){t=B(t,B.EMPTY_OBJECT);let e=t.positions,i=t.width;it.defined("options.positions",e),it.defined("options.width",i);let l=B(t.height,0),d=B(t.extrudedHeight,l);this._positions=e,this._ellipsoid=I.clone(B(t.ellipsoid,I.default)),this._vertexFormat=G.clone(B(t.vertexFormat,G.DEFAULT)),this._width=i,this._height=Math.max(l,d),this._extrudedHeight=Math.min(l,d),this._cornerType=B(t.cornerType,ht.ROUNDED),this._granularity=B(t.granularity,st.RADIANS_PER_DEGREE),this._shadowVolume=B(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*o.packedLength+I.packedLength+G.packedLength+7}et.pack=function(t,e,i){it.defined("value",t),it.defined("array",e),i=B(i,0);let l=t._positions,d=l.length;e[i++]=d;for(let f=0;f<d;++f,i+=o.packedLength)o.pack(l[f],e,i);return I.pack(t._ellipsoid,e,i),i+=I.packedLength,G.pack(t._vertexFormat,e,i),i+=G.packedLength,e[i++]=t._width,e[i++]=t._height,e[i++]=t._extrudedHeight,e[i++]=t._cornerType,e[i++]=t._granularity,e[i++]=t._shadowVolume?1:0,e[i]=B(t._offsetAttribute,-1),e};var It=I.clone(I.UNIT_SPHERE),Wt=new G,tt={positions:void 0,ellipsoid:It,vertexFormat:Wt,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};et.unpack=function(t,e,i){it.defined("array",t),e=B(e,0);let l=t[e++],d=new Array(l);for(let u=0;u<l;++u,e+=o.packedLength)d[u]=o.unpack(t,e);let f=I.unpack(t,e,It);e+=I.packedLength;let h=G.unpack(t,e,Wt);e+=G.packedLength;let O=t[e++],g=t[e++],r=t[e++],a=t[e++],s=t[e++],n=t[e++]===1,A=t[e];return X(i)?(i._positions=d,i._ellipsoid=I.clone(f,i._ellipsoid),i._vertexFormat=G.clone(h,i._vertexFormat),i._width=O,i._height=g,i._extrudedHeight=r,i._cornerType=a,i._granularity=s,i._shadowVolume=n,i._offsetAttribute=A===-1?void 0:A,i):(tt.positions=d,tt.width=O,tt.height=g,tt.extrudedHeight=r,tt.cornerType=a,tt.granularity=s,tt.shadowVolume=n,tt.offsetAttribute=A===-1?void 0:A,new et(tt))};et.computeRectangle=function(t,e){t=B(t,B.EMPTY_OBJECT);let i=t.positions,l=t.width;it.defined("options.positions",i),it.defined("options.width",l);let d=B(t.ellipsoid,I.default),f=B(t.cornerType,ht.ROUNDED);return Yt(i,d,l,f,e)};et.createGeometry=function(t){let e=t._positions,i=t._width,l=t._ellipsoid;e=Ut(e,l);let d=Pt(e,o.equalsEpsilon);if(d.length<2||i<=0)return;let f=t._height,h=t._extrudedHeight,O=!st.equalsEpsilon(f,h,0,st.EPSILON2),g=t._vertexFormat,r={ellipsoid:l,positions:d,width:i,cornerType:t._cornerType,granularity:t._granularity,saveAttributes:!0},a;if(O)r.height=f,r.extrudedHeight=h,r.shadowVolume=t._shadowVolume,r.offsetAttribute=t._offsetAttribute,a=Jt(r,g);else{let A=M.computePositions(r);if(a=Bt(A,g,l),a.attributes.position.values=yt.scaleToGeodeticHeight(a.attributes.position.values,f,l),X(t._offsetAttribute)){let u=t._offsetAttribute===_t.NONE?0:1,b=a.attributes.position.values.length,p=new Uint8Array(b/3).fill(u);a.attributes.applyOffset=new x({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:p})}}let s=a.attributes,n=St.fromVertices(s.position.values,void 0,3);return g.position||(a.attributes.position.values=void 0),new Vt({attributes:s,indices:a.indices,primitiveType:Mt.TRIANGLES,boundingSphere:n,offsetAttribute:t._offsetAttribute})};et.createShadowVolume=function(t,e,i){let l=t._granularity,d=t._ellipsoid,f=e(l,d),h=i(l,d);return new et({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:d,granularity:l,extrudedHeight:f,height:h,vertexFormat:G.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(et.prototype,{rectangle:{get:function(){return X(this._rectangle)||(this._rectangle=Yt(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var Lt=et;function Gt(t,e){return X(e)&&(t=Lt.unpack(t,e)),t._ellipsoid=I.clone(t._ellipsoid),Lt.createGeometry(t)}var Ae=Gt;export{Ae as default};
import{a as M}from"./chunk-YMLWFA65.js";import{a as ht}from"./chunk-TGH7B4GN.js";import"./chunk-XDTNLL4L.js";import"./chunk-45NF2JU3.js";import{a as _t}from"./chunk-55FFQILS.js";import{a as G}from"./chunk-32UDSAPU.js";import"./chunk-TBSK33NR.js";import"./chunk-LSAUAD4X.js";import{b as yt}from"./chunk-VDNLYVKB.js";import{a as Pt}from"./chunk-EX67AA2G.js";import"./chunk-V5KKODOM.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{a as Nt}from"./chunk-563CJZT3.js";import{a as Ct}from"./chunk-LH4TAMBV.js";import{b as Mt,c as Vt,d as x}from"./chunk-WI5KIEME.js";import{d as St}from"./chunk-ZPW6H6BB.js";import{i as Et}from"./chunk-HMXXHGCW.js";import{a as F}from"./chunk-NFDMGE7Q.js";import{b as o,c as bt,e as I}from"./chunk-VDZXURWO.js";import{a as st}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as B}from"./chunk-5HWP5DW7.js";import{b as it}from"./chunk-3K67FZLU.js";import{e as X}from"./chunk-55TU6MJR.js";var zt=new o,kt=new o,wt=new o,Tt=new o,jt=new o,Ht=new o,at=new o,ft=new o;function Ut(t,e){for(let i=0;i<t.length;i++)t[i]=e.scaleToGeodeticSurface(t[i],t[i]);return t}function Z(t,e,i,l,d,f){let h=t.normals,O=t.tangents,g=t.bitangents,r=o.normalize(o.cross(i,e,at),at);f.normal&&M.addAttribute(h,e,l,d),f.tangent&&M.addAttribute(O,r,l,d),f.bitangent&&M.addAttribute(g,i,l,d)}function Bt(t,e,i){let l=t.positions,d=t.corners,f=t.endPositions,h=t.lefts,O=t.normals,g=new Ct,r,a=0,s=0,n,A=0,u;for(n=0;n<l.length;n+=2)u=l[n].length-3,a+=u,A+=u*2,s+=l[n+1].length-3;for(a+=3,s+=3,n=0;n<d.length;n++){r=d[n];let c=d[n].leftPositions;X(c)?(u=c.length,a+=u,A+=u):(u=d[n].rightPositions.length,s+=u,A+=u)}let b=X(f),p;b&&(p=f[0].length-3,a+=p,s+=p,p/=3,A+=p*6);let R=a+s,m=new Float64Array(R),C=e.normal?new Float32Array(R):void 0,D=e.tangent?new Float32Array(R):void 0,lt=e.bitangent?new Float32Array(R):void 0,z={normals:C,tangents:D,bitangents:lt},y=0,E=R-1,S,V,H,J,P=zt,w=kt,nt,ot,mt=p/2,_=Nt.createTypedArray(R/3,A),T=0;if(b){ot=wt,nt=Tt;let c=f[0];for(P=o.fromArray(O,0,P),w=o.fromArray(h,0,w),n=0;n<mt;n++)ot=o.fromArray(c,(mt-1-n)*3,ot),nt=o.fromArray(c,(mt+n)*3,nt),M.addAttribute(m,nt,y),M.addAttribute(m,ot,void 0,E),Z(z,P,w,y,E,e),V=y/3,J=V+1,S=(E-2)/3,H=S-1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=J,y+=3,E-=3}let At=0,ut=0,rt=l[At++],q=l[At++];m.set(rt,y),m.set(q,E-q.length+1),w=o.fromArray(h,ut,w);let ct,dt;for(u=q.length-3,n=0;n<u;n+=3)ct=i.geodeticSurfaceNormal(o.fromArray(rt,n,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u-n,ft),ft),P=o.normalize(o.add(ct,dt,P),P),Z(z,P,w,y,E,e),V=y/3,J=V+1,S=(E-2)/3,H=S-1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=J,y+=3,E-=3;for(ct=i.geodeticSurfaceNormal(o.fromArray(rt,u,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u,ft),ft),P=o.normalize(o.add(ct,dt,P),P),ut+=3,n=0;n<d.length;n++){let c;r=d[n];let $=r.leftPositions,v=r.rightPositions,L,U,N=Ht,k=wt,Y=Tt;if(P=o.fromArray(O,ut,P),X($)){for(Z(z,P,w,void 0,E,e),E-=3,L=J,U=H,c=0;c<$.length/3;c++)N=o.fromArray($,c*3,N),_[T++]=L,_[T++]=U-c-1,_[T++]=U-c,M.addAttribute(m,N,void 0,E),k=o.fromArray(m,(U-c-1)*3,k),Y=o.fromArray(m,L*3,Y),w=o.normalize(o.subtract(k,Y,w),w),Z(z,P,w,void 0,E,e),E-=3;N=o.fromArray(m,L*3,N),k=o.subtract(o.fromArray(m,U*3,k),N,k),Y=o.subtract(o.fromArray(m,(U-c)*3,Y),N,Y),w=o.normalize(o.add(k,Y,w),w),Z(z,P,w,y,void 0,e),y+=3}else{for(Z(z,P,w,y,void 0,e),y+=3,L=H,U=J,c=0;c<v.length/3;c++)N=o.fromArray(v,c*3,N),_[T++]=L,_[T++]=U+c,_[T++]=U+c+1,M.addAttribute(m,N,y),k=o.fromArray(m,L*3,k),Y=o.fromArray(m,(U+c)*3,Y),w=o.normalize(o.subtract(k,Y,w),w),Z(z,P,w,y,void 0,e),y+=3;N=o.fromArray(m,L*3,N),k=o.subtract(o.fromArray(m,(U+c)*3,k),N,k),Y=o.subtract(o.fromArray(m,U*3,Y),N,Y),w=o.normalize(o.negate(o.add(Y,k,w),w),w),Z(z,P,w,void 0,E,e),E-=3}for(rt=l[At++],q=l[At++],rt.splice(0,3),q.splice(q.length-3,3),m.set(rt,y),m.set(q,E-q.length+1),u=q.length-3,ut+=3,w=o.fromArray(h,ut,w),c=0;c<q.length;c+=3)ct=i.geodeticSurfaceNormal(o.fromArray(rt,c,at),at),dt=i.geodeticSurfaceNormal(o.fromArray(q,u-c,ft),ft),P=o.normalize(o.add(ct,dt,P),P),Z(z,P,w,y,E,e),J=y/3,V=J-1,H=(E-2)/3,S=H+1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=J,y+=3,E-=3;y-=3,E+=3}if(P=o.fromArray(O,O.length-3,P),Z(z,P,w,y,E,e),b){y+=3,E-=3,ot=wt,nt=Tt;let c=f[1];for(n=0;n<mt;n++)ot=o.fromArray(c,(p-n-1)*3,ot),nt=o.fromArray(c,n*3,nt),M.addAttribute(m,ot,void 0,E),M.addAttribute(m,nt,y),Z(z,P,w,y,E,e),J=y/3,V=J-1,H=(E-2)/3,S=H+1,_[T++]=S,_[T++]=V,_[T++]=H,_[T++]=H,_[T++]=V,_[T++]=J,y+=3,E-=3}if(g.position=new x({componentDatatype:F.DOUBLE,componentsPerAttribute:3,values:m}),e.st){let c=new Float32Array(R/3*2),$,v,L=0;if(b){a/=3,s/=3;let U=Math.PI/(p+1);v=1/(a-p+1),$=1/(s-p+1);let N,k=p/2;for(n=k+1;n<p+1;n++)N=st.PI_OVER_TWO+U*n,c[L++]=$*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=1;n<s-p+1;n++)c[L++]=n*$,c[L++]=0;for(n=p;n>k;n--)N=st.PI_OVER_TWO-n*U,c[L++]=1-$*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=k;n>0;n--)N=st.PI_OVER_TWO-U*n,c[L++]=1-v*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N));for(n=a-p;n>0;n--)c[L++]=n*v,c[L++]=1;for(n=1;n<k+1;n++)N=st.PI_OVER_TWO+U*n,c[L++]=v*(1+Math.cos(N)),c[L++]=.5*(1+Math.sin(N))}else{for(a/=3,s/=3,v=1/(a-1),$=1/(s-1),n=0;n<s;n++)c[L++]=n*$,c[L++]=0;for(n=a;n>0;n--)c[L++]=(n-1)*v,c[L++]=1}g.st=new x({componentDatatype:F.FLOAT,componentsPerAttribute:2,values:c})}return e.normal&&(g.normal=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.normals})),e.tangent&&(g.tangent=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.tangents})),e.bitangent&&(g.bitangent=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:z.bitangents})),{attributes:g,indices:_}}function qt(t,e){if(!e.normal&&!e.tangent&&!e.bitangent&&!e.st)return t;let i=t.position.values,l,d;(e.normal||e.bitangent)&&(l=t.normal.values,d=t.bitangent.values);let f=t.position.values.length/18,h=f*3,O=f*2,g=h*2,r;if(e.normal||e.bitangent||e.tangent){let a=e.normal?new Float32Array(h*6):void 0,s=e.tangent?new Float32Array(h*6):void 0,n=e.bitangent?new Float32Array(h*6):void 0,A=zt,u=kt,b=wt,p=Tt,R=jt,m=Ht,C=g;for(r=0;r<h;r+=3){let D=C+g;A=o.fromArray(i,r,A),u=o.fromArray(i,r+h,u),b=o.fromArray(i,(r+3)%h,b),u=o.subtract(u,A,u),b=o.subtract(b,A,b),p=o.normalize(o.cross(u,b,p),p),e.normal&&(M.addAttribute(a,p,D),M.addAttribute(a,p,D+3),M.addAttribute(a,p,C),M.addAttribute(a,p,C+3)),(e.tangent||e.bitangent)&&(m=o.fromArray(l,r,m),e.bitangent&&(M.addAttribute(n,m,D),M.addAttribute(n,m,D+3),M.addAttribute(n,m,C),M.addAttribute(n,m,C+3)),e.tangent&&(R=o.normalize(o.cross(m,p,R),R),M.addAttribute(s,R,D),M.addAttribute(s,R,D+3),M.addAttribute(s,R,C),M.addAttribute(s,R,C+3))),C+=6}if(e.normal){for(a.set(l),r=0;r<h;r+=3)a[r+h]=-l[r],a[r+h+1]=-l[r+1],a[r+h+2]=-l[r+2];t.normal.values=a}else t.normal=void 0;if(e.bitangent?(n.set(d),n.set(d,h),t.bitangent.values=n):t.bitangent=void 0,e.tangent){let D=t.tangent.values;s.set(D),s.set(D,h),t.tangent.values=s}}if(e.st){let a=t.st.values,s=new Float32Array(O*6);s.set(a),s.set(a,O);let n=O*2;for(let A=0;A<2;A++){for(s[n++]=a[0],s[n++]=a[1],r=2;r<O;r+=2){let u=a[r],b=a[r+1];s[n++]=u,s[n++]=b,s[n++]=u,s[n++]=b}s[n++]=a[0],s[n++]=a[1]}t.st.values=s}return t}function Ot(t,e,i){i[e++]=t[0],i[e++]=t[1],i[e++]=t[2];for(let l=3;l<t.length;l+=3){let d=t[l],f=t[l+1],h=t[l+2];i[e++]=d,i[e++]=f,i[e++]=h,i[e++]=d,i[e++]=f,i[e++]=h}return i[e++]=t[0],i[e++]=t[1],i[e++]=t[2],i}function Jt(t,e){let i=new G({position:e.position,normal:e.normal||e.bitangent||t.shadowVolume,tangent:e.tangent,bitangent:e.normal||e.bitangent,st:e.st}),l=t.ellipsoid,d=M.computePositions(t),f=Bt(d,i,l),h=t.height,O=t.extrudedHeight,g=f.attributes,r=f.indices,a=g.position.values,s=a.length,n=new Float64Array(s*6),A=new Float64Array(s);A.set(a);let u=new Float64Array(s*4);a=yt.scaleToGeodeticHeight(a,h,l),u=Ot(a,0,u),A=yt.scaleToGeodeticHeight(A,O,l),u=Ot(A,s*2,u),n.set(a),n.set(A,s),n.set(u,s*2),g.position.values=n,g=qt(g,e);let b,p=s/3;if(t.shadowVolume){let S=g.normal.values;s=S.length;let V=new Float32Array(s*6);for(b=0;b<s;b++)S[b]=-S[b];V.set(S,s),V=Ot(S,s*4,V),g.extrudeDirection=new x({componentDatatype:F.FLOAT,componentsPerAttribute:3,values:V}),e.normal||(g.normal=void 0)}if(X(t.offsetAttribute)){let S=new Uint8Array(p*6);if(t.offsetAttribute===_t.TOP)S=S.fill(1,0,p).fill(1,p*2,p*4);else{let V=t.offsetAttribute===_t.NONE?0:1;S=S.fill(V)}g.applyOffset=new x({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:S})}let R=r.length,m=p+p,C=Nt.createTypedArray(n.length/3,R*2+m*3);C.set(r);let D=R;for(b=0;b<R;b+=3){let S=r[b],V=r[b+1],H=r[b+2];C[D++]=H+p,C[D++]=V+p,C[D++]=S+p}let lt,z,y,E;for(b=0;b<m;b+=2)lt=b+m,z=lt+m,y=lt+1,E=z+1,C[D++]=lt,C[D++]=z,C[D++]=y,C[D++]=y,C[D++]=z,C[D++]=E;return{attributes:g,indices:C}}var Dt=new o,gt=new o,Q=new bt;function Rt(t,e,i,l,d,f){let h=o.subtract(e,t,Dt);o.normalize(h,h);let O=i.geodeticSurfaceNormal(t,gt),g=o.cross(h,O,Dt);o.multiplyByScalar(g,l,g);let r=d.latitude,a=d.longitude,s=f.latitude,n=f.longitude;o.add(t,g,gt),i.cartesianToCartographic(gt,Q);let A=Q.latitude,u=Q.longitude;r=Math.min(r,A),a=Math.min(a,u),s=Math.max(s,A),n=Math.max(n,u),o.subtract(t,g,gt),i.cartesianToCartographic(gt,Q),A=Q.latitude,u=Q.longitude,r=Math.min(r,A),a=Math.min(a,u),s=Math.max(s,A),n=Math.max(n,u),d.latitude=r,d.longitude=a,f.latitude=s,f.longitude=n}var K=new o,pt=new o,W=new bt,j=new bt;function Yt(t,e,i,l,d){t=Ut(t,e);let f=Pt(t,o.equalsEpsilon),h=f.length;if(h<2||i<=0)return new Et;let O=i*.5;W.latitude=Number.POSITIVE_INFINITY,W.longitude=Number.POSITIVE_INFINITY,j.latitude=Number.NEGATIVE_INFINITY,j.longitude=Number.NEGATIVE_INFINITY;let g,r;if(l===ht.ROUNDED){let n=f[0];o.subtract(n,f[1],K),o.normalize(K,K),o.multiplyByScalar(K,O,K),o.add(n,K,pt),e.cartesianToCartographic(pt,Q),g=Q.latitude,r=Q.longitude,W.latitude=Math.min(W.latitude,g),W.longitude=Math.min(W.longitude,r),j.latitude=Math.max(j.latitude,g),j.longitude=Math.max(j.longitude,r)}for(let n=0;n<h-1;++n)Rt(f[n],f[n+1],e,O,W,j);let a=f[h-1];o.subtract(a,f[h-2],K),o.normalize(K,K),o.multiplyByScalar(K,O,K),o.add(a,K,pt),Rt(a,pt,e,O,W,j),l===ht.ROUNDED&&(e.cartesianToCartographic(pt,Q),g=Q.latitude,r=Q.longitude,W.latitude=Math.min(W.latitude,g),W.longitude=Math.min(W.longitude,r),j.latitude=Math.max(j.latitude,g),j.longitude=Math.max(j.longitude,r));let s=X(d)?d:new Et;return s.north=j.latitude,s.south=W.latitude,s.east=j.longitude,s.west=W.longitude,s}function et(t){t=B(t,B.EMPTY_OBJECT);let e=t.positions,i=t.width;it.defined("options.positions",e),it.defined("options.width",i);let l=B(t.height,0),d=B(t.extrudedHeight,l);this._positions=e,this._ellipsoid=I.clone(B(t.ellipsoid,I.default)),this._vertexFormat=G.clone(B(t.vertexFormat,G.DEFAULT)),this._width=i,this._height=Math.max(l,d),this._extrudedHeight=Math.min(l,d),this._cornerType=B(t.cornerType,ht.ROUNDED),this._granularity=B(t.granularity,st.RADIANS_PER_DEGREE),this._shadowVolume=B(t.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=t.offsetAttribute,this._rectangle=void 0,this.packedLength=1+e.length*o.packedLength+I.packedLength+G.packedLength+7}et.pack=function(t,e,i){it.defined("value",t),it.defined("array",e),i=B(i,0);let l=t._positions,d=l.length;e[i++]=d;for(let f=0;f<d;++f,i+=o.packedLength)o.pack(l[f],e,i);return I.pack(t._ellipsoid,e,i),i+=I.packedLength,G.pack(t._vertexFormat,e,i),i+=G.packedLength,e[i++]=t._width,e[i++]=t._height,e[i++]=t._extrudedHeight,e[i++]=t._cornerType,e[i++]=t._granularity,e[i++]=t._shadowVolume?1:0,e[i]=B(t._offsetAttribute,-1),e};var It=I.clone(I.UNIT_SPHERE),Wt=new G,tt={positions:void 0,ellipsoid:It,vertexFormat:Wt,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};et.unpack=function(t,e,i){it.defined("array",t),e=B(e,0);let l=t[e++],d=new Array(l);for(let u=0;u<l;++u,e+=o.packedLength)d[u]=o.unpack(t,e);let f=I.unpack(t,e,It);e+=I.packedLength;let h=G.unpack(t,e,Wt);e+=G.packedLength;let O=t[e++],g=t[e++],r=t[e++],a=t[e++],s=t[e++],n=t[e++]===1,A=t[e];return X(i)?(i._positions=d,i._ellipsoid=I.clone(f,i._ellipsoid),i._vertexFormat=G.clone(h,i._vertexFormat),i._width=O,i._height=g,i._extrudedHeight=r,i._cornerType=a,i._granularity=s,i._shadowVolume=n,i._offsetAttribute=A===-1?void 0:A,i):(tt.positions=d,tt.width=O,tt.height=g,tt.extrudedHeight=r,tt.cornerType=a,tt.granularity=s,tt.shadowVolume=n,tt.offsetAttribute=A===-1?void 0:A,new et(tt))};et.computeRectangle=function(t,e){t=B(t,B.EMPTY_OBJECT);let i=t.positions,l=t.width;it.defined("options.positions",i),it.defined("options.width",l);let d=B(t.ellipsoid,I.default),f=B(t.cornerType,ht.ROUNDED);return Yt(i,d,l,f,e)};et.createGeometry=function(t){let e=t._positions,i=t._width,l=t._ellipsoid;e=Ut(e,l);let d=Pt(e,o.equalsEpsilon);if(d.length<2||i<=0)return;let f=t._height,h=t._extrudedHeight,O=!st.equalsEpsilon(f,h,0,st.EPSILON2),g=t._vertexFormat,r={ellipsoid:l,positions:d,width:i,cornerType:t._cornerType,granularity:t._granularity,saveAttributes:!0},a;if(O)r.height=f,r.extrudedHeight=h,r.shadowVolume=t._shadowVolume,r.offsetAttribute=t._offsetAttribute,a=Jt(r,g);else{let A=M.computePositions(r);if(a=Bt(A,g,l),a.attributes.position.values=yt.scaleToGeodeticHeight(a.attributes.position.values,f,l),X(t._offsetAttribute)){let u=t._offsetAttribute===_t.NONE?0:1,b=a.attributes.position.values.length,p=new Uint8Array(b/3).fill(u);a.attributes.applyOffset=new x({componentDatatype:F.UNSIGNED_BYTE,componentsPerAttribute:1,values:p})}}let s=a.attributes,n=St.fromVertices(s.position.values,void 0,3);return g.position||(a.attributes.position.values=void 0),new Vt({attributes:s,indices:a.indices,primitiveType:Mt.TRIANGLES,boundingSphere:n,offsetAttribute:t._offsetAttribute})};et.createShadowVolume=function(t,e,i){let l=t._granularity,d=t._ellipsoid,f=e(l,d),h=i(l,d);return new et({positions:t._positions,width:t._width,cornerType:t._cornerType,ellipsoid:d,granularity:l,extrudedHeight:f,height:h,vertexFormat:G.POSITION_ONLY,shadowVolume:!0})};Object.defineProperties(et.prototype,{rectangle:{get:function(){return X(this._rectangle)||(this._rectangle=Yt(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}});var Lt=et;function Gt(t,e){return X(e)&&(t=Lt.unpack(t,e)),t._ellipsoid=I.clone(t._ellipsoid),Lt.createGeometry(t)}var Ae=Gt;export{Ae as default};
public/CimSDK/Workers/createCorridorOutlineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as S}from"./chunk-LH5VIH3W.js";import{a as W}from"./chunk-KHYDR4FN.js";import"./chunk-WGRWYGAM.js";import"./chunk-5B7R4ODL.js";import{a as K}from"./chunk-55FFQILS.js";import"./chunk-P5SE5XVC.js";import"./chunk-ZPRLAWII.js";import{b as Q}from"./chunk-IRIBHMN7.js";import{a as it}from"./chunk-A6RR2BLJ.js";import"./chunk-EPQZOCRV.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{a as Z}from"./chunk-ZDNS2GYV.js";import{a as et}from"./chunk-LH4TAMBV.js";import{b as I,c as tt,d as J}from"./chunk-TNSV6TPX.js";import{d as x}from"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import{a as z}from"./chunk-3LWOQSP3.js";import{b as A,e as P}from"./chunk-7DK7KB7Q.js";import{a as q}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as H}from"./chunk-5HWP5DW7.js";import{b as M}from"./chunk-INT7THOB.js";import{e as C}from"./chunk-PPCZYYBW.js";var ot=new A,nt=new A,rt=new A;function ft(t,i){for(let e=0;e<t.length;e++)t[e]=i.scaleToGeodeticSurface(t[e],t[e]);return t}function st(t,i){let e=[],l=t.positions,h=t.corners,m=t.endPositions,D=new et,y,u=0,p=0,o,g=0,d;for(o=0;o<l.length;o+=2)d=l[o].length-3,u+=d,g+=d/3*4,p+=l[o+1].length-3;for(u+=3,p+=3,o=0;o<h.length;o++){y=h[o];let c=h[o].leftPositions;C(c)?(d=c.length,u+=d,g+=d/3*2):(d=h[o].rightPositions.length,p+=d,g+=d/3*2)}let _=C(m),w;_&&(w=m[0].length-3,u+=w,p+=w,w/=3,g+=w*4);let T=u+p,b=new Float64Array(T),n=0,s=T-1,a,E,L,k,U,O,j=w/2,r=Z.createTypedArray(T/3,g+4),f=0;if(r[f++]=n/3,r[f++]=(s-2)/3,_){e.push(n/3),O=ot,U=nt;let c=m[0];for(o=0;o<j;o++)O=A.fromArray(c,(j-1-o)*3,O),U=A.fromArray(c,(j+o)*3,U),S.addAttribute(b,U,n),S.addAttribute(b,O,void 0,s),E=n/3,k=E+1,a=(s-2)/3,L=a-1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3}let G=0,F=l[G++],N=l[G++];for(b.set(F,n),b.set(N,s-N.length+1),d=N.length-3,e.push(n/3,(s-2)/3),o=0;o<d;o+=3)E=n/3,k=E+1,a=(s-2)/3,L=a-1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;for(o=0;o<h.length;o++){let c;y=h[o];let Y=y.leftPositions,X=y.rightPositions,v,B=rt;if(C(Y)){for(s-=3,v=L,e.push(k),c=0;c<Y.length/3;c++)B=A.fromArray(Y,c*3,B),r[f++]=v-c-1,r[f++]=v-c,S.addAttribute(b,B,void 0,s),s-=3;e.push(v-Math.floor(Y.length/6)),i===W.BEVELED&&e.push((s-2)/3+1),n+=3}else{for(n+=3,v=k,e.push(L),c=0;c<X.length/3;c++)B=A.fromArray(X,c*3,B),r[f++]=v+c,r[f++]=v+c+1,S.addAttribute(b,B,n),n+=3;e.push(v+Math.floor(X.length/6)),i===W.BEVELED&&e.push(n/3-1),s-=3}for(F=l[G++],N=l[G++],F.splice(0,3),N.splice(N.length-3,3),b.set(F,n),b.set(N,s-N.length+1),d=N.length-3,c=0;c<N.length;c+=3)k=n/3,E=k-1,L=(s-2)/3,a=L+1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;n-=3,s+=3,e.push(n/3,(s-2)/3)}if(_){n+=3,s-=3,O=ot,U=nt;let c=m[1];for(o=0;o<j;o++)O=A.fromArray(c,(w-o-1)*3,O),U=A.fromArray(c,o*3,U),S.addAttribute(b,O,void 0,s),S.addAttribute(b,U,n),k=n/3,E=k-1,L=(s-2)/3,a=L+1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;e.push(n/3)}else e.push(n/3,(s-2)/3);return r[f++]=n/3,r[f++]=(s-2)/3,D.position=new J({componentDatatype:z.DOUBLE,componentsPerAttribute:3,values:b}),{attributes:D,indices:r,wallIndices:e}}function ct(t){let i=t.ellipsoid,e=S.computePositions(t),l=st(e,t.cornerType),h=l.wallIndices,m=t.height,D=t.extrudedHeight,y=l.attributes,u=l.indices,p=y.position.values,o=p.length,g=new Float64Array(o);g.set(p);let d=new Float64Array(o*2);if(p=Q.scaleToGeodeticHeight(p,m,i),g=Q.scaleToGeodeticHeight(g,D,i),d.set(p),d.set(g,o),y.position.values=d,o/=3,C(t.offsetAttribute)){let a=new Uint8Array(o*2);if(t.offsetAttribute===K.TOP)a=a.fill(1,0,o);else{let E=t.offsetAttribute===K.NONE?0:1;a=a.fill(E)}y.applyOffset=new J({componentDatatype:z.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}let _,w=u.length,T=Z.createTypedArray(d.length/3,(w+h.length)*2);T.set(u);let b=w;for(_=0;_<w;_+=2){let a=u[_],E=u[_+1];T[b++]=a+o,T[b++]=E+o}let n,s;for(_=0;_<h.length;_++)n=h[_],s=n+o,T[b++]=n,T[b++]=s;return{attributes:y,indices:T}}function V(t){t=H(t,H.EMPTY_OBJECT);let i=t.positions,e=t.width;M.typeOf.object("options.positions",i),M.typeOf.number("options.width",e);let l=H(t.height,0),h=H(t.extrudedHeight,l);this._positions=i,this._ellipsoid=P.clone(H(t.ellipsoid,P.default)),this._width=e,this._height=Math.max(l,h),this._extrudedHeight=Math.min(l,h),this._cornerType=H(t.cornerType,W.ROUNDED),this._granularity=H(t.granularity,q.RADIANS_PER_DEGREE),this._offsetAttribute=t.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+i.length*A.packedLength+P.packedLength+6}V.pack=function(t,i,e){M.typeOf.object("value",t),M.typeOf.object("array",i),e=H(e,0);let l=t._positions,h=l.length;i[e++]=h;for(let m=0;m<h;++m,e+=A.packedLength)A.pack(l[m],i,e);return P.pack(t._ellipsoid,i,e),e+=P.packedLength,i[e++]=t._width,i[e++]=t._height,i[e++]=t._extrudedHeight,i[e++]=t._cornerType,i[e++]=t._granularity,i[e]=H(t._offsetAttribute,-1),i};var lt=P.clone(P.UNIT_SPHERE),R={positions:void 0,ellipsoid:lt,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};V.unpack=function(t,i,e){M.typeOf.object("array",t),i=H(i,0);let l=t[i++],h=new Array(l);for(let d=0;d<l;++d,i+=A.packedLength)h[d]=A.unpack(t,i);let m=P.unpack(t,i,lt);i+=P.packedLength;let D=t[i++],y=t[i++],u=t[i++],p=t[i++],o=t[i++],g=t[i];return C(e)?(e._positions=h,e._ellipsoid=P.clone(m,e._ellipsoid),e._width=D,e._height=y,e._extrudedHeight=u,e._cornerType=p,e._granularity=o,e._offsetAttribute=g===-1?void 0:g,e):(R.positions=h,R.width=D,R.height=y,R.extrudedHeight=u,R.cornerType=p,R.granularity=o,R.offsetAttribute=g===-1?void 0:g,new V(R))};V.createGeometry=function(t){let i=t._positions,e=t._width,l=t._ellipsoid;i=ft(i,l);let h=it(i,A.equalsEpsilon);if(h.length<2||e<=0)return;let m=t._height,D=t._extrudedHeight,y=!q.equalsEpsilon(m,D,0,q.EPSILON2),u={ellipsoid:l,positions:h,width:e,cornerType:t._cornerType,granularity:t._granularity,saveAttributes:!1},p;if(y)u.height=m,u.extrudedHeight=D,u.offsetAttribute=t._offsetAttribute,p=ct(u);else{let d=S.computePositions(u);if(p=st(d,u.cornerType),p.attributes.position.values=Q.scaleToGeodeticHeight(p.attributes.position.values,m,l),C(t._offsetAttribute)){let _=p.attributes.position.values.length,w=t._offsetAttribute===K.NONE?0:1,T=new Uint8Array(_/3).fill(w);p.attributes.applyOffset=new J({componentDatatype:z.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})}}let o=p.attributes,g=x.fromVertices(o.position.values,void 0,3);return new tt({attributes:o,indices:p.indices,primitiveType:I.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})};var $=V;function ht(t,i){return C(i)&&(t=$.unpack(t,i)),t._ellipsoid=P.clone(t._ellipsoid),$.createGeometry(t)}var Ot=ht;export{Ot as default};
import{a as S}from"./chunk-YMLWFA65.js";import{a as W}from"./chunk-TGH7B4GN.js";import"./chunk-XDTNLL4L.js";import"./chunk-45NF2JU3.js";import{a as K}from"./chunk-55FFQILS.js";import"./chunk-TBSK33NR.js";import"./chunk-LSAUAD4X.js";import{b as Q}from"./chunk-VDNLYVKB.js";import{a as it}from"./chunk-EX67AA2G.js";import"./chunk-V5KKODOM.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{a as Z}from"./chunk-563CJZT3.js";import{a as et}from"./chunk-LH4TAMBV.js";import{b as I,c as tt,d as J}from"./chunk-WI5KIEME.js";import{d as x}from"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import{a as z}from"./chunk-NFDMGE7Q.js";import{b as A,e as P}from"./chunk-VDZXURWO.js";import{a as q}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as H}from"./chunk-5HWP5DW7.js";import{b as M}from"./chunk-3K67FZLU.js";import{e as C}from"./chunk-55TU6MJR.js";var ot=new A,nt=new A,rt=new A;function ft(t,i){for(let e=0;e<t.length;e++)t[e]=i.scaleToGeodeticSurface(t[e],t[e]);return t}function st(t,i){let e=[],l=t.positions,h=t.corners,m=t.endPositions,D=new et,y,u=0,p=0,o,g=0,d;for(o=0;o<l.length;o+=2)d=l[o].length-3,u+=d,g+=d/3*4,p+=l[o+1].length-3;for(u+=3,p+=3,o=0;o<h.length;o++){y=h[o];let c=h[o].leftPositions;C(c)?(d=c.length,u+=d,g+=d/3*2):(d=h[o].rightPositions.length,p+=d,g+=d/3*2)}let _=C(m),w;_&&(w=m[0].length-3,u+=w,p+=w,w/=3,g+=w*4);let T=u+p,b=new Float64Array(T),n=0,s=T-1,a,E,L,k,U,O,j=w/2,r=Z.createTypedArray(T/3,g+4),f=0;if(r[f++]=n/3,r[f++]=(s-2)/3,_){e.push(n/3),O=ot,U=nt;let c=m[0];for(o=0;o<j;o++)O=A.fromArray(c,(j-1-o)*3,O),U=A.fromArray(c,(j+o)*3,U),S.addAttribute(b,U,n),S.addAttribute(b,O,void 0,s),E=n/3,k=E+1,a=(s-2)/3,L=a-1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3}let G=0,F=l[G++],N=l[G++];for(b.set(F,n),b.set(N,s-N.length+1),d=N.length-3,e.push(n/3,(s-2)/3),o=0;o<d;o+=3)E=n/3,k=E+1,a=(s-2)/3,L=a-1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;for(o=0;o<h.length;o++){let c;y=h[o];let Y=y.leftPositions,X=y.rightPositions,v,B=rt;if(C(Y)){for(s-=3,v=L,e.push(k),c=0;c<Y.length/3;c++)B=A.fromArray(Y,c*3,B),r[f++]=v-c-1,r[f++]=v-c,S.addAttribute(b,B,void 0,s),s-=3;e.push(v-Math.floor(Y.length/6)),i===W.BEVELED&&e.push((s-2)/3+1),n+=3}else{for(n+=3,v=k,e.push(L),c=0;c<X.length/3;c++)B=A.fromArray(X,c*3,B),r[f++]=v+c,r[f++]=v+c+1,S.addAttribute(b,B,n),n+=3;e.push(v+Math.floor(X.length/6)),i===W.BEVELED&&e.push(n/3-1),s-=3}for(F=l[G++],N=l[G++],F.splice(0,3),N.splice(N.length-3,3),b.set(F,n),b.set(N,s-N.length+1),d=N.length-3,c=0;c<N.length;c+=3)k=n/3,E=k-1,L=(s-2)/3,a=L+1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;n-=3,s+=3,e.push(n/3,(s-2)/3)}if(_){n+=3,s-=3,O=ot,U=nt;let c=m[1];for(o=0;o<j;o++)O=A.fromArray(c,(w-o-1)*3,O),U=A.fromArray(c,o*3,U),S.addAttribute(b,O,void 0,s),S.addAttribute(b,U,n),k=n/3,E=k-1,L=(s-2)/3,a=L+1,r[f++]=a,r[f++]=L,r[f++]=E,r[f++]=k,n+=3,s-=3;e.push(n/3)}else e.push(n/3,(s-2)/3);return r[f++]=n/3,r[f++]=(s-2)/3,D.position=new J({componentDatatype:z.DOUBLE,componentsPerAttribute:3,values:b}),{attributes:D,indices:r,wallIndices:e}}function ct(t){let i=t.ellipsoid,e=S.computePositions(t),l=st(e,t.cornerType),h=l.wallIndices,m=t.height,D=t.extrudedHeight,y=l.attributes,u=l.indices,p=y.position.values,o=p.length,g=new Float64Array(o);g.set(p);let d=new Float64Array(o*2);if(p=Q.scaleToGeodeticHeight(p,m,i),g=Q.scaleToGeodeticHeight(g,D,i),d.set(p),d.set(g,o),y.position.values=d,o/=3,C(t.offsetAttribute)){let a=new Uint8Array(o*2);if(t.offsetAttribute===K.TOP)a=a.fill(1,0,o);else{let E=t.offsetAttribute===K.NONE?0:1;a=a.fill(E)}y.applyOffset=new J({componentDatatype:z.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}let _,w=u.length,T=Z.createTypedArray(d.length/3,(w+h.length)*2);T.set(u);let b=w;for(_=0;_<w;_+=2){let a=u[_],E=u[_+1];T[b++]=a+o,T[b++]=E+o}let n,s;for(_=0;_<h.length;_++)n=h[_],s=n+o,T[b++]=n,T[b++]=s;return{attributes:y,indices:T}}function V(t){t=H(t,H.EMPTY_OBJECT);let i=t.positions,e=t.width;M.typeOf.object("options.positions",i),M.typeOf.number("options.width",e);let l=H(t.height,0),h=H(t.extrudedHeight,l);this._positions=i,this._ellipsoid=P.clone(H(t.ellipsoid,P.default)),this._width=e,this._height=Math.max(l,h),this._extrudedHeight=Math.min(l,h),this._cornerType=H(t.cornerType,W.ROUNDED),this._granularity=H(t.granularity,q.RADIANS_PER_DEGREE),this._offsetAttribute=t.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+i.length*A.packedLength+P.packedLength+6}V.pack=function(t,i,e){M.typeOf.object("value",t),M.typeOf.object("array",i),e=H(e,0);let l=t._positions,h=l.length;i[e++]=h;for(let m=0;m<h;++m,e+=A.packedLength)A.pack(l[m],i,e);return P.pack(t._ellipsoid,i,e),e+=P.packedLength,i[e++]=t._width,i[e++]=t._height,i[e++]=t._extrudedHeight,i[e++]=t._cornerType,i[e++]=t._granularity,i[e]=H(t._offsetAttribute,-1),i};var lt=P.clone(P.UNIT_SPHERE),R={positions:void 0,ellipsoid:lt,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};V.unpack=function(t,i,e){M.typeOf.object("array",t),i=H(i,0);let l=t[i++],h=new Array(l);for(let d=0;d<l;++d,i+=A.packedLength)h[d]=A.unpack(t,i);let m=P.unpack(t,i,lt);i+=P.packedLength;let D=t[i++],y=t[i++],u=t[i++],p=t[i++],o=t[i++],g=t[i];return C(e)?(e._positions=h,e._ellipsoid=P.clone(m,e._ellipsoid),e._width=D,e._height=y,e._extrudedHeight=u,e._cornerType=p,e._granularity=o,e._offsetAttribute=g===-1?void 0:g,e):(R.positions=h,R.width=D,R.height=y,R.extrudedHeight=u,R.cornerType=p,R.granularity=o,R.offsetAttribute=g===-1?void 0:g,new V(R))};V.createGeometry=function(t){let i=t._positions,e=t._width,l=t._ellipsoid;i=ft(i,l);let h=it(i,A.equalsEpsilon);if(h.length<2||e<=0)return;let m=t._height,D=t._extrudedHeight,y=!q.equalsEpsilon(m,D,0,q.EPSILON2),u={ellipsoid:l,positions:h,width:e,cornerType:t._cornerType,granularity:t._granularity,saveAttributes:!1},p;if(y)u.height=m,u.extrudedHeight=D,u.offsetAttribute=t._offsetAttribute,p=ct(u);else{let d=S.computePositions(u);if(p=st(d,u.cornerType),p.attributes.position.values=Q.scaleToGeodeticHeight(p.attributes.position.values,m,l),C(t._offsetAttribute)){let _=p.attributes.position.values.length,w=t._offsetAttribute===K.NONE?0:1,T=new Uint8Array(_/3).fill(w);p.attributes.applyOffset=new J({componentDatatype:z.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})}}let o=p.attributes,g=x.fromVertices(o.position.values,void 0,3);return new tt({attributes:o,indices:p.indices,primitiveType:I.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})};var $=V;function ht(t,i){return C(i)&&(t=$.unpack(t,i)),t._ellipsoid=P.clone(t._ellipsoid),$.createGeometry(t)}var Ot=ht;export{Ot as default};
public/CimSDK/Workers/createCylinderGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as r}from"./chunk-CLLS3XBT.js";import"./chunk-H34PG7L2.js";import"./chunk-55FFQILS.js";import"./chunk-WF3WCQMH.js";import"./chunk-ZDNS2GYV.js";import"./chunk-LH4TAMBV.js";import"./chunk-TNSV6TPX.js";import"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import"./chunk-INT7THOB.js";import{e as o}from"./chunk-PPCZYYBW.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default};
import{a as r}from"./chunk-IQP74IF6.js";import"./chunk-4DMLXFUJ.js";import"./chunk-55FFQILS.js";import"./chunk-32UDSAPU.js";import"./chunk-563CJZT3.js";import"./chunk-LH4TAMBV.js";import"./chunk-WI5KIEME.js";import"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import"./chunk-3K67FZLU.js";import{e as o}from"./chunk-55TU6MJR.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default};
public/CimSDK/Workers/createCylinderOutlineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as M}from"./chunk-H34PG7L2.js";import{a as V}from"./chunk-55FFQILS.js";import{a as N}from"./chunk-ZDNS2GYV.js";import{a as k}from"./chunk-LH4TAMBV.js";import{b as D,c as P,d as L}from"./chunk-TNSV6TPX.js";import{d as y}from"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import{a as A}from"./chunk-3LWOQSP3.js";import{b as S,d as R}from"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as c}from"./chunk-5HWP5DW7.js";import{a as T,b as m}from"./chunk-INT7THOB.js";import{e as d}from"./chunk-PPCZYYBW.js";var w=new R;function a(t){t=c(t,c.EMPTY_OBJECT);let e=t.length,i=t.topRadius,f=t.bottomRadius,o=c(t.slices,128),r=Math.max(c(t.numberOfVerticalLines,16),0);if(m.typeOf.number("options.positions",e),m.typeOf.number("options.topRadius",i),m.typeOf.number("options.bottomRadius",f),m.typeOf.number.greaterThanOrEquals("options.slices",o,3),d(t.offsetAttribute)&&t.offsetAttribute===V.TOP)throw new T("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=e,this._topRadius=i,this._bottomRadius=f,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}a.packedLength=6;a.pack=function(t,e,i){return m.typeOf.object("value",t),m.defined("array",e),i=c(i,0),e[i++]=t._length,e[i++]=t._topRadius,e[i++]=t._bottomRadius,e[i++]=t._slices,e[i++]=t._numberOfVerticalLines,e[i]=c(t._offsetAttribute,-1),e};var b={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};a.unpack=function(t,e,i){m.defined("array",t),e=c(e,0);let f=t[e++],o=t[e++],r=t[e++],h=t[e++],l=t[e++],p=t[e];return d(i)?(i._length=f,i._topRadius=o,i._bottomRadius=r,i._slices=h,i._numberOfVerticalLines=l,i._offsetAttribute=p===-1?void 0:p,i):(b.length=f,b.topRadius=o,b.bottomRadius=r,b.slices=h,b.numberOfVerticalLines=l,b.offsetAttribute=p===-1?void 0:p,new a(b))};a.createGeometry=function(t){let e=t._length,i=t._topRadius,f=t._bottomRadius,o=t._slices,r=t._numberOfVerticalLines;if(e<=0||i<0||f<0||i===0&&f===0)return;let h=o*2,l=M.computePositions(e,i,f,o,!1),p=o*2,E;if(r>0){let O=Math.min(r,o);E=Math.round(o/O),p+=O}let s=N.createTypedArray(h,p*2),u=0,n;for(n=0;n<o-1;n++)s[u++]=n,s[u++]=n+1,s[u++]=n+o,s[u++]=n+1+o;if(s[u++]=o-1,s[u++]=0,s[u++]=o+o-1,s[u++]=o,r>0)for(n=0;n<o;n+=E)s[u++]=n,s[u++]=n+o;let _=new k;_.position=new L({componentDatatype:A.DOUBLE,componentsPerAttribute:3,values:l}),w.x=e*.5,w.y=Math.max(f,i);let g=new y(S.ZERO,R.magnitude(w));if(d(t._offsetAttribute)){e=l.length;let O=t._offsetAttribute===V.NONE?0:1,B=new Uint8Array(e/3).fill(O);_.applyOffset=new L({componentDatatype:A.UNSIGNED_BYTE,componentsPerAttribute:1,values:B})}return new P({attributes:_,indices:s,primitiveType:D.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})};var C=a;function G(t,e){return d(e)&&(t=C.unpack(t,e)),C.createGeometry(t)}var et=G;export{et as default};
import{a as M}from"./chunk-4DMLXFUJ.js";import{a as V}from"./chunk-55FFQILS.js";import{a as N}from"./chunk-563CJZT3.js";import{a as k}from"./chunk-LH4TAMBV.js";import{b as D,c as P,d as L}from"./chunk-WI5KIEME.js";import{d as y}from"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import{a as A}from"./chunk-NFDMGE7Q.js";import{b as S,d as R}from"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as c}from"./chunk-5HWP5DW7.js";import{a as T,b as m}from"./chunk-3K67FZLU.js";import{e as d}from"./chunk-55TU6MJR.js";var w=new R;function a(t){t=c(t,c.EMPTY_OBJECT);let e=t.length,i=t.topRadius,f=t.bottomRadius,o=c(t.slices,128),r=Math.max(c(t.numberOfVerticalLines,16),0);if(m.typeOf.number("options.positions",e),m.typeOf.number("options.topRadius",i),m.typeOf.number("options.bottomRadius",f),m.typeOf.number.greaterThanOrEquals("options.slices",o,3),d(t.offsetAttribute)&&t.offsetAttribute===V.TOP)throw new T("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=e,this._topRadius=i,this._bottomRadius=f,this._slices=o,this._numberOfVerticalLines=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}a.packedLength=6;a.pack=function(t,e,i){return m.typeOf.object("value",t),m.defined("array",e),i=c(i,0),e[i++]=t._length,e[i++]=t._topRadius,e[i++]=t._bottomRadius,e[i++]=t._slices,e[i++]=t._numberOfVerticalLines,e[i]=c(t._offsetAttribute,-1),e};var b={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};a.unpack=function(t,e,i){m.defined("array",t),e=c(e,0);let f=t[e++],o=t[e++],r=t[e++],h=t[e++],l=t[e++],p=t[e];return d(i)?(i._length=f,i._topRadius=o,i._bottomRadius=r,i._slices=h,i._numberOfVerticalLines=l,i._offsetAttribute=p===-1?void 0:p,i):(b.length=f,b.topRadius=o,b.bottomRadius=r,b.slices=h,b.numberOfVerticalLines=l,b.offsetAttribute=p===-1?void 0:p,new a(b))};a.createGeometry=function(t){let e=t._length,i=t._topRadius,f=t._bottomRadius,o=t._slices,r=t._numberOfVerticalLines;if(e<=0||i<0||f<0||i===0&&f===0)return;let h=o*2,l=M.computePositions(e,i,f,o,!1),p=o*2,E;if(r>0){let O=Math.min(r,o);E=Math.round(o/O),p+=O}let s=N.createTypedArray(h,p*2),u=0,n;for(n=0;n<o-1;n++)s[u++]=n,s[u++]=n+1,s[u++]=n+o,s[u++]=n+1+o;if(s[u++]=o-1,s[u++]=0,s[u++]=o+o-1,s[u++]=o,r>0)for(n=0;n<o;n+=E)s[u++]=n,s[u++]=n+o;let _=new k;_.position=new L({componentDatatype:A.DOUBLE,componentsPerAttribute:3,values:l}),w.x=e*.5,w.y=Math.max(f,i);let g=new y(S.ZERO,R.magnitude(w));if(d(t._offsetAttribute)){e=l.length;let O=t._offsetAttribute===V.NONE?0:1,B=new Uint8Array(e/3).fill(O);_.applyOffset=new L({componentDatatype:A.UNSIGNED_BYTE,componentsPerAttribute:1,values:B})}return new P({attributes:_,indices:s,primitiveType:D.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})};var C=a;function G(t,e){return d(e)&&(t=C.unpack(t,e)),C.createGeometry(t)}var et=G;export{et as default};
public/CimSDK/Workers/createEllipseGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as o}from"./chunk-3VV4IUYO.js";import"./chunk-KG2EYIEQ.js";import"./chunk-KBTPUVX4.js";import"./chunk-NLFLNVCF.js";import"./chunk-HV57XH4K.js";import"./chunk-X2QIAW2L.js";import"./chunk-55FFQILS.js";import"./chunk-WF3WCQMH.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import"./chunk-ZDNS2GYV.js";import"./chunk-LH4TAMBV.js";import"./chunk-TNSV6TPX.js";import"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import{b as t,e as c}from"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import"./chunk-INT7THOB.js";import{e as n}from"./chunk-PPCZYYBW.js";function a(r,i){return n(i)&&(r=o.unpack(r,i)),r._center=t.clone(r._center),r._ellipsoid=c.clone(r._ellipsoid),o.createGeometry(r)}var u=a;export{u as default};
import{a as o}from"./chunk-3I5K75MC.js";import"./chunk-QP426X7X.js";import"./chunk-S5MWIP3D.js";import"./chunk-OOGG7EHS.js";import"./chunk-EZRSLM27.js";import"./chunk-E5FOJ77O.js";import"./chunk-55FFQILS.js";import"./chunk-32UDSAPU.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import"./chunk-563CJZT3.js";import"./chunk-LH4TAMBV.js";import"./chunk-WI5KIEME.js";import"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import{b as t,e as c}from"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import"./chunk-3K67FZLU.js";import{e as n}from"./chunk-55TU6MJR.js";function a(r,i){return n(i)&&(r=o.unpack(r,i)),r._center=t.clone(r._center),r._ellipsoid=c.clone(r._ellipsoid),o.createGeometry(r)}var u=a;export{u as default};
public/CimSDK/Workers/createEllipseOutlineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as i}from"./chunk-WEAECJWM.js";import"./chunk-KG2EYIEQ.js";import"./chunk-55FFQILS.js";import"./chunk-ZDNS2GYV.js";import"./chunk-LH4TAMBV.js";import"./chunk-TNSV6TPX.js";import"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import{b as t,e as c}from"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import"./chunk-INT7THOB.js";import{e as o}from"./chunk-PPCZYYBW.js";function a(r,n){return o(n)&&(r=i.unpack(r,n)),r._center=t.clone(r._center),r._ellipsoid=c.clone(r._ellipsoid),i.createGeometry(r)}var p=a;export{p as default};
import{a as i}from"./chunk-MQCAYMIH.js";import"./chunk-QP426X7X.js";import"./chunk-55FFQILS.js";import"./chunk-563CJZT3.js";import"./chunk-LH4TAMBV.js";import"./chunk-WI5KIEME.js";import"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import{b as t,e as c}from"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import"./chunk-3K67FZLU.js";import{e as o}from"./chunk-55TU6MJR.js";function a(r,n){return o(n)&&(r=i.unpack(r,n)),r._center=t.clone(r._center),r._ellipsoid=c.clone(r._ellipsoid),i.createGeometry(r)}var p=a;export{p as default};
public/CimSDK/Workers/createEllipsoidGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as e}from"./chunk-KHV4IJNQ.js";import"./chunk-55FFQILS.js";import"./chunk-WF3WCQMH.js";import"./chunk-ZDNS2GYV.js";import"./chunk-LH4TAMBV.js";import"./chunk-TNSV6TPX.js";import"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import"./chunk-INT7THOB.js";import{e as o}from"./chunk-PPCZYYBW.js";function i(r,t){return o(t)&&(r=e.unpack(r,t)),e.createGeometry(r)}var a=i;export{a as default};
import{a as e}from"./chunk-IUDUZUOX.js";import"./chunk-55FFQILS.js";import"./chunk-32UDSAPU.js";import"./chunk-563CJZT3.js";import"./chunk-LH4TAMBV.js";import"./chunk-WI5KIEME.js";import"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import"./chunk-3K67FZLU.js";import{e as o}from"./chunk-55TU6MJR.js";function i(r,t){return o(t)&&(r=e.unpack(r,t)),e.createGeometry(r)}var a=i;export{a as default};
public/CimSDK/Workers/createEllipsoidOutlineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as t}from"./chunk-NGLWZE27.js";import"./chunk-55FFQILS.js";import"./chunk-ZDNS2GYV.js";import"./chunk-LH4TAMBV.js";import"./chunk-TNSV6TPX.js";import"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import"./chunk-INT7THOB.js";import{e as n}from"./chunk-PPCZYYBW.js";function u(r,e){return n(r.buffer,e)&&(r=t.unpack(r,e)),t.createGeometry(r)}var a=u;export{a as default};
import{a as t}from"./chunk-NGYBTBZC.js";import"./chunk-55FFQILS.js";import"./chunk-563CJZT3.js";import"./chunk-LH4TAMBV.js";import"./chunk-WI5KIEME.js";import"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import"./chunk-3K67FZLU.js";import{e as n}from"./chunk-55TU6MJR.js";function u(r,e){return n(r.buffer,e)&&(r=t.unpack(r,e)),t.createGeometry(r)}var a=u;export{a as default};
public/CimSDK/Workers/createFrustumGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{c as r}from"./chunk-O76LSB7J.js";import"./chunk-WF3WCQMH.js";import"./chunk-33CJ2NM7.js";import"./chunk-LH4TAMBV.js";import"./chunk-TNSV6TPX.js";import"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import"./chunk-INT7THOB.js";import{e as o}from"./chunk-PPCZYYBW.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default};
import{c as r}from"./chunk-ODAW2LJE.js";import"./chunk-32UDSAPU.js";import"./chunk-FBQDLPON.js";import"./chunk-LH4TAMBV.js";import"./chunk-WI5KIEME.js";import"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import"./chunk-3K67FZLU.js";import{e as o}from"./chunk-55TU6MJR.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default};
public/CimSDK/Workers/createFrustumOutlineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as k,b as _,c as j}from"./chunk-O76LSB7J.js";import"./chunk-WF3WCQMH.js";import"./chunk-33CJ2NM7.js";import{a as A}from"./chunk-LH4TAMBV.js";import{b as N,c as g,d as F}from"./chunk-TNSV6TPX.js";import{d as T}from"./chunk-QHUUGFLC.js";import{f as s}from"./chunk-BHJLM5NY.js";import{a as b}from"./chunk-3LWOQSP3.js";import{b as a}from"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as d}from"./chunk-5HWP5DW7.js";import{b as h}from"./chunk-INT7THOB.js";import{e as w}from"./chunk-PPCZYYBW.js";var L=0,C=1;function l(e){h.typeOf.object("options",e),h.typeOf.object("options.frustum",e.frustum),h.typeOf.object("options.origin",e.origin),h.typeOf.object("options.orientation",e.orientation);let t=e.frustum,o=e.orientation,u=e.origin,c=d(e._drawNearPlane,!0),m,p;t instanceof _?(m=L,p=_.packedLength):t instanceof k&&(m=C,p=k.packedLength),this._frustumType=m,this._frustum=t.clone(),this._origin=a.clone(u),this._orientation=s.clone(o),this._drawNearPlane=c,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+p+a.packedLength+s.packedLength}l.pack=function(e,t,o){h.typeOf.object("value",e),h.defined("array",t),o=d(o,0);let u=e._frustumType,c=e._frustum;return t[o++]=u,u===L?(_.pack(c,t,o),o+=_.packedLength):(k.pack(c,t,o),o+=k.packedLength),a.pack(e._origin,t,o),o+=a.packedLength,s.pack(e._orientation,t,o),o+=s.packedLength,t[o]=e._drawNearPlane?1:0,t};var E=new _,G=new k,R=new s,S=new a;l.unpack=function(e,t,o){h.defined("array",e),t=d(t,0);let u=e[t++],c;u===L?(c=_.unpack(e,t,E),t+=_.packedLength):(c=k.unpack(e,t,G),t+=k.packedLength);let m=a.unpack(e,t,S);t+=a.packedLength;let p=s.unpack(e,t,R);t+=s.packedLength;let P=e[t]===1;if(!w(o))return new l({frustum:c,origin:m,orientation:p,_drawNearPlane:P});let n=u===o._frustumType?o._frustum:void 0;return o._frustum=c.clone(n),o._frustumType=u,o._origin=a.clone(m,o._origin),o._orientation=s.clone(p,o._orientation),o._drawNearPlane=P,o};l.createGeometry=function(e){let t=e._frustumType,o=e._frustum,u=e._origin,c=e._orientation,m=e._drawNearPlane,p=new Float64Array(3*4*2);j._computeNearFarPlanes(u,c,t,o,p);let P=new A({position:new F({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:p})}),n,r,y=m?2:1,i=new Uint16Array(8*(y+1)),f=m?0:1;for(;f<2;++f)n=m?f*8:0,r=f*4,i[n]=r,i[n+1]=r+1,i[n+2]=r+1,i[n+3]=r+2,i[n+4]=r+2,i[n+5]=r+3,i[n+6]=r+3,i[n+7]=r;for(f=0;f<2;++f)n=(y+f)*8,r=f*4,i[n]=r,i[n+1]=r+4,i[n+2]=r+1,i[n+3]=r+5,i[n+4]=r+2,i[n+5]=r+6,i[n+6]=r+3,i[n+7]=r+7;return new g({attributes:P,indices:i,primitiveType:N.LINES,boundingSphere:T.fromVertices(p)})};var O=l;function D(e,t){return w(t)&&(e=O.unpack(e,t)),O.createGeometry(e)}var I=D;export{I as default};
import{a as k,b as _,c as j}from"./chunk-ODAW2LJE.js";import"./chunk-32UDSAPU.js";import"./chunk-FBQDLPON.js";import{a as A}from"./chunk-LH4TAMBV.js";import{b as N,c as g,d as F}from"./chunk-WI5KIEME.js";import{d as T}from"./chunk-ZPW6H6BB.js";import{f as s}from"./chunk-HMXXHGCW.js";import{a as b}from"./chunk-NFDMGE7Q.js";import{b as a}from"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as d}from"./chunk-5HWP5DW7.js";import{b as h}from"./chunk-3K67FZLU.js";import{e as w}from"./chunk-55TU6MJR.js";var L=0,C=1;function l(e){h.typeOf.object("options",e),h.typeOf.object("options.frustum",e.frustum),h.typeOf.object("options.origin",e.origin),h.typeOf.object("options.orientation",e.orientation);let t=e.frustum,o=e.orientation,u=e.origin,c=d(e._drawNearPlane,!0),m,p;t instanceof _?(m=L,p=_.packedLength):t instanceof k&&(m=C,p=k.packedLength),this._frustumType=m,this._frustum=t.clone(),this._origin=a.clone(u),this._orientation=s.clone(o),this._drawNearPlane=c,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+p+a.packedLength+s.packedLength}l.pack=function(e,t,o){h.typeOf.object("value",e),h.defined("array",t),o=d(o,0);let u=e._frustumType,c=e._frustum;return t[o++]=u,u===L?(_.pack(c,t,o),o+=_.packedLength):(k.pack(c,t,o),o+=k.packedLength),a.pack(e._origin,t,o),o+=a.packedLength,s.pack(e._orientation,t,o),o+=s.packedLength,t[o]=e._drawNearPlane?1:0,t};var E=new _,G=new k,R=new s,S=new a;l.unpack=function(e,t,o){h.defined("array",e),t=d(t,0);let u=e[t++],c;u===L?(c=_.unpack(e,t,E),t+=_.packedLength):(c=k.unpack(e,t,G),t+=k.packedLength);let m=a.unpack(e,t,S);t+=a.packedLength;let p=s.unpack(e,t,R);t+=s.packedLength;let P=e[t]===1;if(!w(o))return new l({frustum:c,origin:m,orientation:p,_drawNearPlane:P});let n=u===o._frustumType?o._frustum:void 0;return o._frustum=c.clone(n),o._frustumType=u,o._origin=a.clone(m,o._origin),o._orientation=s.clone(p,o._orientation),o._drawNearPlane=P,o};l.createGeometry=function(e){let t=e._frustumType,o=e._frustum,u=e._origin,c=e._orientation,m=e._drawNearPlane,p=new Float64Array(3*4*2);j._computeNearFarPlanes(u,c,t,o,p);let P=new A({position:new F({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:p})}),n,r,y=m?2:1,i=new Uint16Array(8*(y+1)),f=m?0:1;for(;f<2;++f)n=m?f*8:0,r=f*4,i[n]=r,i[n+1]=r+1,i[n+2]=r+1,i[n+3]=r+2,i[n+4]=r+2,i[n+5]=r+3,i[n+6]=r+3,i[n+7]=r;for(f=0;f<2;++f)n=(y+f)*8,r=f*4,i[n]=r,i[n+1]=r+4,i[n+2]=r+1,i[n+3]=r+5,i[n+4]=r+2,i[n+5]=r+6,i[n+6]=r+3,i[n+7]=r+7;return new g({attributes:P,indices:i,primitiveType:N.LINES,boundingSphere:T.fromVertices(p)})};var O=l;function D(e,t){return w(t)&&(e=O.unpack(e,t)),O.createGeometry(e)}var I=D;export{I as default};
public/CimSDK/Workers/createGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as d}from"./chunk-Q2B3IPUZ.js";import{a as w}from"./chunk-CQELY6Z3.js";import"./chunk-DMXICNHG.js";import"./chunk-NLFLNVCF.js";import"./chunk-HV57XH4K.js";import"./chunk-X2QIAW2L.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import"./chunk-ZDNS2GYV.js";import"./chunk-LH4TAMBV.js";import"./chunk-TNSV6TPX.js";import"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as k}from"./chunk-5HWP5DW7.js";import{a as y}from"./chunk-INT7THOB.js";import{a,b as p,e as r}from"./chunk-PPCZYYBW.js";var b=p({"./combineGeometry.js":()=>import("./combineGeometry.js"),"./createBoxGeometry.js":()=>import("./createBoxGeometry.js"),"./createBoxOutlineGeometry.js":()=>import("./createBoxOutlineGeometry.js"),"./createCircleGeometry.js":()=>import("./createCircleGeometry.js"),"./createCircleOutlineGeometry.js":()=>import("./createCircleOutlineGeometry.js"),"./createCoplanarPolygonGeometry.js":()=>import("./createCoplanarPolygonGeometry.js"),"./createCoplanarPolygonOutlineGeometry.js":()=>import("./createCoplanarPolygonOutlineGeometry.js"),"./createCorridorGeometry.js":()=>import("./createCorridorGeometry.js"),"./createCorridorOutlineGeometry.js":()=>import("./createCorridorOutlineGeometry.js"),"./createCylinderGeometry.js":()=>import("./createCylinderGeometry.js"),"./createCylinderOutlineGeometry.js":()=>import("./createCylinderOutlineGeometry.js"),"./createEllipseGeometry.js":()=>import("./createEllipseGeometry.js"),"./createEllipseOutlineGeometry.js":()=>import("./createEllipseOutlineGeometry.js"),"./createEllipsoidGeometry.js":()=>import("./createEllipsoidGeometry.js"),"./createEllipsoidOutlineGeometry.js":()=>import("./createEllipsoidOutlineGeometry.js"),"./createFrustumGeometry.js":()=>import("./createFrustumGeometry.js"),"./createFrustumOutlineGeometry.js":()=>import("./createFrustumOutlineGeometry.js"),"./createGeometry.js":()=>import("./createGeometry.js"),"./createGroundPolylineGeometry.js":()=>import("./createGroundPolylineGeometry.js"),"./createPlaneGeometry.js":()=>import("./createPlaneGeometry.js"),"./createPlaneOutlineGeometry.js":()=>import("./createPlaneOutlineGeometry.js"),"./createPolygonGeometry.js":()=>import("./createPolygonGeometry.js"),"./createPolygonOutlineGeometry.js":()=>import("./createPolygonOutlineGeometry.js"),"./createPolylineGeometry.js":()=>import("./createPolylineGeometry.js"),"./createPolylineVolumeGeometry.js":()=>import("./createPolylineVolumeGeometry.js"),"./createPolylineVolumeOutlineGeometry.js":()=>import("./createPolylineVolumeOutlineGeometry.js"),"./createRectangleGeometry.js":()=>import("./createRectangleGeometry.js"),"./createRectangleOutlineGeometry.js":()=>import("./createRectangleOutlineGeometry.js"),"./createSimplePolylineGeometry.js":()=>import("./createSimplePolylineGeometry.js"),"./createSphereGeometry.js":()=>import("./createSphereGeometry.js"),"./createSphereOutlineGeometry.js":()=>import("./createSphereOutlineGeometry.js"),"./createTaskProcessorWorker.js":()=>import("./createTaskProcessorWorker.js"),"./createVectorTileClampedPolylines.js":()=>import("./createVectorTileClampedPolylines.js"),"./createVectorTileGeometries.js":()=>import("./createVectorTileGeometries.js"),"./createVectorTilePoints.js":()=>import("./createVectorTilePoints.js"),"./createVectorTilePolygons.js":()=>import("./createVectorTilePolygons.js"),"./createVectorTilePolylines.js":()=>import("./createVectorTilePolylines.js"),"./createVerticesFromGoogleEarthEnterpriseBuffer.js":()=>import("./createVerticesFromGoogleEarthEnterpriseBuffer.js"),"./createVerticesFromHeightmap.js":()=>import("./createVerticesFromHeightmap.js"),"./createVerticesFromQuantizedTerrainMesh.js":()=>import("./createVerticesFromQuantizedTerrainMesh.js"),"./createWallGeometry.js":()=>import("./createWallGeometry.js"),"./createWallOutlineGeometry.js":()=>import("./createWallOutlineGeometry.js"),"./decodeDraco.js":()=>import("./decodeDraco.js"),"./decodeGoogleEarthEnterprisePacket.js":()=>import("./decodeGoogleEarthEnterprisePacket.js"),"./decodeI3S.js":()=>import("./decodeI3S.js"),"./transcodeKTX2.js":()=>import("./transcodeKTX2.js"),"./transferTypedArrayTest.js":()=>import("./transferTypedArrayTest.js"),"./upsampleQuantizedTerrainMesh.js":()=>import("./upsampleQuantizedTerrainMesh.js")});var f={};async function h(s,t){let e=k(f[t],f[s]);return r(e)?e:r(t)?(typeof exports=="object"?e=a(t):e=(await import(t)).default,f[t]=e,e):(typeof exports=="object"?e=a(`Workers/${s}`):e=(r(t)?await import(t):await b(`./${s}.js`)).default,f[s]=e,e)}async function x(s,t){let e=s.subTasks,n=e.length,u=new Array(n);for(let o=0;o<n;o++){let i=e[o],m=i.geometry,l=i.moduleName,c=i.modulePath;if(r(l)&&r(c))throw new y("Must only set moduleName or modulePath");r(l)||r(c)?u[o]=h(l,c).then(g=>g(m,i.offset)):u[o]=m}return Promise.all(u).then(function(o){return d.packCreateGeometryResults(o,t)})}var P=w(x);export{P as default};
import{a as d}from"./chunk-6NBUVVUT.js";import{a as w}from"./chunk-6MN6BBPN.js";import"./chunk-NJVIDNJ6.js";import"./chunk-OOGG7EHS.js";import"./chunk-EZRSLM27.js";import"./chunk-E5FOJ77O.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import"./chunk-563CJZT3.js";import"./chunk-LH4TAMBV.js";import"./chunk-WI5KIEME.js";import"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as k}from"./chunk-5HWP5DW7.js";import{a as y}from"./chunk-3K67FZLU.js";import{a,b as p,e as r}from"./chunk-55TU6MJR.js";var b=p({"./combineGeometry.js":()=>import("./combineGeometry.js"),"./createBoxGeometry.js":()=>import("./createBoxGeometry.js"),"./createBoxOutlineGeometry.js":()=>import("./createBoxOutlineGeometry.js"),"./createCircleGeometry.js":()=>import("./createCircleGeometry.js"),"./createCircleOutlineGeometry.js":()=>import("./createCircleOutlineGeometry.js"),"./createCoplanarPolygonGeometry.js":()=>import("./createCoplanarPolygonGeometry.js"),"./createCoplanarPolygonOutlineGeometry.js":()=>import("./createCoplanarPolygonOutlineGeometry.js"),"./createCorridorGeometry.js":()=>import("./createCorridorGeometry.js"),"./createCorridorOutlineGeometry.js":()=>import("./createCorridorOutlineGeometry.js"),"./createCylinderGeometry.js":()=>import("./createCylinderGeometry.js"),"./createCylinderOutlineGeometry.js":()=>import("./createCylinderOutlineGeometry.js"),"./createEllipseGeometry.js":()=>import("./createEllipseGeometry.js"),"./createEllipseOutlineGeometry.js":()=>import("./createEllipseOutlineGeometry.js"),"./createEllipsoidGeometry.js":()=>import("./createEllipsoidGeometry.js"),"./createEllipsoidOutlineGeometry.js":()=>import("./createEllipsoidOutlineGeometry.js"),"./createFrustumGeometry.js":()=>import("./createFrustumGeometry.js"),"./createFrustumOutlineGeometry.js":()=>import("./createFrustumOutlineGeometry.js"),"./createGeometry.js":()=>import("./createGeometry.js"),"./createGroundPolylineGeometry.js":()=>import("./createGroundPolylineGeometry.js"),"./createPlaneGeometry.js":()=>import("./createPlaneGeometry.js"),"./createPlaneOutlineGeometry.js":()=>import("./createPlaneOutlineGeometry.js"),"./createPolygonGeometry.js":()=>import("./createPolygonGeometry.js"),"./createPolygonOutlineGeometry.js":()=>import("./createPolygonOutlineGeometry.js"),"./createPolylineGeometry.js":()=>import("./createPolylineGeometry.js"),"./createPolylineVolumeGeometry.js":()=>import("./createPolylineVolumeGeometry.js"),"./createPolylineVolumeOutlineGeometry.js":()=>import("./createPolylineVolumeOutlineGeometry.js"),"./createRectangleGeometry.js":()=>import("./createRectangleGeometry.js"),"./createRectangleOutlineGeometry.js":()=>import("./createRectangleOutlineGeometry.js"),"./createSimplePolylineGeometry.js":()=>import("./createSimplePolylineGeometry.js"),"./createSphereGeometry.js":()=>import("./createSphereGeometry.js"),"./createSphereOutlineGeometry.js":()=>import("./createSphereOutlineGeometry.js"),"./createTaskProcessorWorker.js":()=>import("./createTaskProcessorWorker.js"),"./createVectorTileClampedPolylines.js":()=>import("./createVectorTileClampedPolylines.js"),"./createVectorTileGeometries.js":()=>import("./createVectorTileGeometries.js"),"./createVectorTilePoints.js":()=>import("./createVectorTilePoints.js"),"./createVectorTilePolygons.js":()=>import("./createVectorTilePolygons.js"),"./createVectorTilePolylines.js":()=>import("./createVectorTilePolylines.js"),"./createVerticesFromGoogleEarthEnterpriseBuffer.js":()=>import("./createVerticesFromGoogleEarthEnterpriseBuffer.js"),"./createVerticesFromHeightmap.js":()=>import("./createVerticesFromHeightmap.js"),"./createVerticesFromQuantizedTerrainMesh.js":()=>import("./createVerticesFromQuantizedTerrainMesh.js"),"./createWallGeometry.js":()=>import("./createWallGeometry.js"),"./createWallOutlineGeometry.js":()=>import("./createWallOutlineGeometry.js"),"./decodeDraco.js":()=>import("./decodeDraco.js"),"./decodeGoogleEarthEnterprisePacket.js":()=>import("./decodeGoogleEarthEnterprisePacket.js"),"./decodeI3S.js":()=>import("./decodeI3S.js"),"./transcodeKTX2.js":()=>import("./transcodeKTX2.js"),"./transferTypedArrayTest.js":()=>import("./transferTypedArrayTest.js"),"./upsampleQuantizedTerrainMesh.js":()=>import("./upsampleQuantizedTerrainMesh.js")});var f={};async function h(s,t){let e=k(f[t],f[s]);return r(e)?e:r(t)?(typeof exports=="object"?e=a(t):e=(await import(t)).default,f[t]=e,e):(typeof exports=="object"?e=a(`Workers/${s}`):e=(r(t)?await import(t):await b(`./${s}.js`)).default,f[s]=e,e)}async function x(s,t){let e=s.subTasks,n=e.length,u=new Array(n);for(let o=0;o<n;o++){let i=e[o],m=i.geometry,l=i.moduleName,c=i.modulePath;if(r(l)&&r(c))throw new y("Must only set moduleName or modulePath");r(l)||r(c)?u[o]=h(l,c).then(g=>g(m,i.offset)):u[o]=m}return Promise.all(u).then(function(o){return d.packCreateGeometryResults(o,t)})}var P=w(x);export{P as default};
public/CimSDK/Workers/createGroundPolylineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as Oe}from"./chunk-DMXICNHG.js";import{a as Z}from"./chunk-3B3UDCHP.js";import{a as Ct}from"./chunk-X2QIAW2L.js";import{a as De}from"./chunk-5B7R4ODL.js";import{a as Le}from"./chunk-A6RR2BLJ.js";import{a as ee}from"./chunk-EPQZOCRV.js";import{b as te}from"./chunk-BUR4N7VJ.js";import{a as Xt}from"./chunk-33CJ2NM7.js";import{c as Ce,d as jt}from"./chunk-TNSV6TPX.js";import{a as vt,d as G}from"./chunk-QHUUGFLC.js";import{d as _e,e as Ne,f as Qt,i as U}from"./chunk-BHJLM5NY.js";import{a as zt}from"./chunk-3LWOQSP3.js";import{a as At,b as t,c as u,d as Pt,e as z,f as Bt}from"./chunk-7DK7KB7Q.js";import{a as p}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as L}from"./chunk-5HWP5DW7.js";import{a as St,b as et}from"./chunk-INT7THOB.js";import{e as m}from"./chunk-PPCZYYBW.js";function rt(e){e=L(e,L.EMPTY_OBJECT),this._ellipsoid=L(e.ellipsoid,z.default),this._rectangle=L(e.rectangle,U.MAX_VALUE),this._bounds=L(e.bounds,[]),this._projection=new vt(this._ellipsoid),this._numberOfLevelZeroTilesX=L(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=L(e.numberOfLevelZeroTilesY,1),this._tileInfo=e.tileInfo}Object.defineProperties(rt.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},bounds:{get:function(){return this._bounds}},projection:{get:function(){return this._projection}}});rt.prototype.getNumberOfXTilesAtLevel=function(e){if(!m(this._tileInfo))return this._numberOfLevelZeroTilesX<<e;let r=this._tileInfo.lods.filter(function(n){return n.level===e})[0].resolution;return Math.round(360/(this._tileInfo.rows*r))};rt.prototype.getNumberOfYTilesAtLevel=function(e){if(!m(this._tileInfo))return this._numberOfLevelZeroTilesY<<e;let r=this._tileInfo.lods.filter(function(n){return n.level===e})[0].resolution;return Math.round(180/(this._tileInfo.cols*r))};rt.prototype.rectangleToNativeRectangle=function(e,o){et.defined("rectangle",e);let r=p.toDegrees(e.west),n=p.toDegrees(e.south),i=p.toDegrees(e.east),a=p.toDegrees(e.north);return m(o)?(o.west=r,o.south=n,o.east=i,o.north=a,o):new U(r,n,i,a)};rt.prototype.tileXYToNativeRectangle=function(e,o,r,n){let i=this.tileXYToRectangle(e,o,r,n);return i.west=p.toDegrees(i.west),i.south=p.toDegrees(i.south),i.east=p.toDegrees(i.east),i.north=p.toDegrees(i.north),i};rt.prototype.tileXYToRectangle=function(e,o,r,n){let i=this._rectangle,a=this.getNumberOfXTilesAtLevel(r),c=this.getNumberOfYTilesAtLevel(r),l=i.width/a,s=e*l+i.west,f=(e+1)*l+i.west,h=i.height/c,_=i.north-o*h,S=i.north-(o+1)*h;return m(n)||(n=new U(s,S,f,_)),n.west=s,n.south=S,n.east=f,n.north=_,n};rt.prototype.positionToTileXY=function(e,o,r){let n=this._rectangle;if(!U.contains(n,e))return;let i=this.getNumberOfXTilesAtLevel(o),a=this.getNumberOfYTilesAtLevel(o),c=n.width/i,l=n.height/a,s=e.longitude;n.east<n.west&&(s+=p.TWO_PI);let f=(s-n.west)/c|0;f>=i&&(f=i-1);let h=(n.north-e.latitude)/l|0;return h>=a&&(h=a-1),m(r)?(r.x=f,r.y=h,r):new Pt(f,h)};var Ie=rt;var He=new t,ye=new t,ke=new u,ne=new t,pn=new t,Me=new G,fn=new Ie,Ot=[new u,new u,new u,new u],Lt=new Pt,w={};w.initialize=function(){let e=w._initPromise;return m(e)||(e=_e.fetchJson(Ne("Assets/approximateTerrainHeights.json")).then(function(o){if(At.changeApproximateTerrainHeights===!0)for(let r in o)o.hasOwnProperty(r)&&(o[r][0]=At.minTerrainHeight,o[r][1]=At.maxTerrainHeight);w._terrainHeights=o}),w._initPromise=e),e};w.getMinimumMaximumHeights=function(e,o){if(et.defined("rectangle",e),!m(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");o=L(o,z.default);let r=be(e),n=w._defaultMinTerrainHeight,i=w._defaultMaxTerrainHeight;if(m(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];m(c)&&(n=c[0],i=c[1]),o.cartographicToCartesian(U.northeast(e,ke),He),o.cartographicToCartesian(U.southwest(e,ke),ye),t.midpoint(ye,He,ne);let l=o.scaleToGeodeticSurface(ne,pn);if(m(l)){let s=t.distance(ne,l);n=Math.min(n,-s)}else n=w._defaultMinTerrainHeight}return n=Math.max(w._defaultMinTerrainHeight,n),{minimumTerrainHeight:n,maximumTerrainHeight:i}};w.getBoundingSphere=function(e,o){if(et.defined("rectangle",e),!m(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");o=L(o,z.default);let r=be(e),n=w._defaultMaxTerrainHeight;if(m(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];m(c)&&(n=c[1])}let i=G.fromRectangle3D(e,o,0);return G.fromRectangle3D(e,o,n,Me),G.union(i,Me,i)};function be(e){u.fromRadians(e.east,e.north,0,Ot[0]),u.fromRadians(e.west,e.north,0,Ot[1]),u.fromRadians(e.east,e.south,0,Ot[2]),u.fromRadians(e.west,e.south,0,Ot[3]);let o=0,r=0,n=0,i=0,a=w._terrainHeightsMaxLevel,c;for(c=0;c<=a;++c){let l=!1;for(let s=0;s<4;++s){let f=Ot[s];if(fn.positionToTileXY(f,c,Lt),s===0)n=Lt.x,i=Lt.y;else if(n!==Lt.x||i!==Lt.y){l=!0;break}}if(l)break;o=n,r=i}if(c!==0)return{x:o,y:r,level:c>a?a:c-1}}w._terrainHeightsMaxLevel=6;w._defaultMaxTerrainHeight=9e3;w._defaultMinTerrainHeight=-1e5;w._terrainHeights=void 0;w._initPromise=void 0;Object.defineProperties(w,{initialized:{get:function(){return m(w._terrainHeights)}}});var Yt=w;var he=[vt,Oe],dn=he.length,Qe=Math.cos(p.toRadians(30)),Re=Math.cos(p.toRadians(150)),tn=0,en=1e3;function ct(e){e=L(e,L.EMPTY_OBJECT);let o=e.positions;if(!m(o)||o.length<2)throw new St("At least two positions are required.");if(m(e.arcType)&&e.arcType!==Z.GEODESIC&&e.arcType!==Z.RHUMB)throw new St("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=L(e.width,1),this._positions=o,this.granularity=L(e.granularity,9999),this.loop=L(e.loop,!1),this.arcType=L(e.arcType,Z.GEODESIC),this._ellipsoid=z.default,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(ct.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+z.packedLength+1+1}}});ct.setProjectionAndEllipsoid=function(e,o){let r=0;for(let n=0;n<dn;n++)if(o instanceof he[n]){r=n;break}e._projectionIndex=r,e._ellipsoid=o.ellipsoid};var mn=new t,Ae=new t,Pe=new t;function le(e,o,r,n,i){let a=A(n,e,0,mn),c=A(n,e,r,Ae),l=A(n,o,0,Pe),s=nt(c,a,Ae),f=nt(l,a,Pe);return t.cross(f,s,i),t.normalize(i,i)}var gn=new u,un=new t,wn=new t,Sn=new t;function oe(e,o,r,n,i,a,c,l,s,f,h){if(i===0)return;let _;a===Z.GEODESIC?_=new De(e,o,c):a===Z.RHUMB&&(_=new ee(e,o,c));let S=_.surfaceDistance;if(S<i)return;let R=le(e,o,n,c,Sn),D=Math.ceil(S/i),I=S/D,j=I,q=D-1,d=l.length;for(let X=0;X<q;X++){let v=_.interpolateUsingSurfaceDistance(j,gn),k=A(c,v,r,un),H=A(c,v,n,wn);t.pack(R,l,d),t.pack(k,s,d),t.pack(H,f,d),h.push(v.latitude),h.push(v.longitude),d+=3,j+=I}}var ie=new u;function A(e,o,r,n){return u.clone(o,ie),ie.height=r,u.toCartesian(ie,e,n)}ct.pack=function(e,o,r){et.typeOf.object("value",e),et.defined("array",o);let n=L(r,0),i=e._positions,a=i.length;o[n++]=a;for(let c=0;c<a;++c){let l=i[c];t.pack(l,o,n),n+=3}return o[n++]=e.granularity,o[n++]=e.loop?1:0,o[n++]=e.arcType,z.pack(e._ellipsoid,o,n),n+=z.packedLength,o[n++]=e._projectionIndex,o[n++]=e._scene3DOnly?1:0,o};ct.unpack=function(e,o,r){et.defined("array",e);let n=L(o,0),i=e[n++],a=new Array(i);for(let S=0;S<i;S++)a[S]=t.unpack(e,n),n+=3;let c=e[n++],l=e[n++]===1,s=e[n++],f=z.unpack(e,n);n+=z.packedLength;let h=e[n++],_=e[n++]===1;return m(r)||(r=new ct({positions:a})),r._positions=a,r.granularity=c,r.loop=l,r.arcType=s,r._ellipsoid=f,r._projectionIndex=h,r._scene3DOnly=_,r};function nt(e,o,r){return t.subtract(e,o,r),t.normalize(r,r),r}function ve(e,o,r,n){return n=nt(e,o,n),n=t.cross(n,r,n),n=t.normalize(n,n),n=t.cross(r,n,n),n}var Tn=new t,En=new t,xn=new t,nn=new t,_n=0,Nn=-1;function re(e,o,r,n,i){let a=nt(r,o,nn),c=ve(e,o,a,Tn),l=ve(n,o,a,En);if(p.equalsEpsilon(t.dot(c,l),Nn,p.EPSILON5))return i=t.cross(a,c,i),i=t.normalize(i,i),i;i=t.add(l,c,i),i=t.normalize(i,i);let s=t.cross(a,i,xn);return t.dot(l,s)<_n&&(i=t.negate(i,i)),i}var qt=Xt.fromPointNormal(t.ZERO,t.UNIT_Y),Cn=new t,On=new t,Ln=new t,Dn=new t,In=new t,Ft=new t,Ut=new u,Be=new u,ze=new u;ct.createGeometry=function(e){let o=!e._scene3DOnly,r=e.loop,n=e._ellipsoid,i=e.granularity,a=e.arcType,c=new he[e._projectionIndex](n),l=tn,s=en,f,h,_=e._positions,S=_.length;S===2&&(r=!1);let R,D,I,j,q=new ee(void 0,void 0,n),d,X,v,k=[_[0]];for(h=0;h<S-1;h++)R=_[h],D=_[h+1],d=te.lineSegmentPlane(R,D,qt,Ft),m(d)&&!t.equalsEpsilon(d,R,p.EPSILON7)&&!t.equalsEpsilon(d,D,p.EPSILON7)&&(e.arcType===Z.GEODESIC?k.push(t.clone(d)):e.arcType===Z.RHUMB&&(v=n.cartesianToCartographic(d,Ut).longitude,I=n.cartesianToCartographic(R,Ut),j=n.cartesianToCartographic(D,Be),q.setEndPoints(I,j),X=q.findIntersectionWithLongitude(v,ze),d=n.cartographicToCartesian(X,Ft),m(d)&&!t.equalsEpsilon(d,R,p.EPSILON7)&&!t.equalsEpsilon(d,D,p.EPSILON7)&&k.push(t.clone(d)))),k.push(D);r&&(R=_[S-1],D=_[0],d=te.lineSegmentPlane(R,D,qt,Ft),m(d)&&!t.equalsEpsilon(d,R,p.EPSILON7)&&!t.equalsEpsilon(d,D,p.EPSILON7)&&(e.arcType===Z.GEODESIC?k.push(t.clone(d)):e.arcType===Z.RHUMB&&(v=n.cartesianToCartographic(d,Ut).longitude,I=n.cartesianToCartographic(R,Ut),j=n.cartesianToCartographic(D,Be),q.setEndPoints(I,j),X=q.findIntersectionWithLongitude(v,ze),d=n.cartographicToCartesian(X,Ft),m(d)&&!t.equalsEpsilon(d,R,p.EPSILON7)&&!t.equalsEpsilon(d,D,p.EPSILON7)&&k.push(t.clone(d)))));let H=k.length,N=new Array(H);for(h=0;h<H;h++){let F=u.fromCartesian(k[h],n);F.height=0,N[h]=F}if(N=Le(N,u.equalsEpsilon),H=N.length,H<2)return;let y=[],P=[],B=[],E=[],x=Cn,O=On,C=Ln,Y=Dn,M=In,g=N[0],V=N[1],It=N[H-1];for(x=A(n,It,l,x),Y=A(n,V,l,Y),O=A(n,g,l,O),C=A(n,g,s,C),r?M=re(x,O,C,Y,M):M=le(g,V,s,n,M),t.pack(M,P,0),t.pack(O,B,0),t.pack(C,E,0),y.push(g.latitude),y.push(g.longitude),oe(g,V,l,s,i,a,n,P,B,E,y),h=1;h<H-1;++h){x=t.clone(O,x),O=t.clone(Y,O);let F=N[h];A(n,F,s,C),A(n,N[h+1],l,Y),re(x,O,C,Y,M),f=P.length,t.pack(M,P,f),t.pack(O,B,f),t.pack(C,E,f),y.push(F.latitude),y.push(F.longitude),oe(N[h],N[h+1],l,s,i,a,n,P,B,E,y)}let b=N[H-1],Tt=N[H-2];if(O=A(n,b,l,O),C=A(n,b,s,C),r){let F=N[0];x=A(n,Tt,l,x),Y=A(n,F,l,Y),M=re(x,O,C,Y,M)}else M=le(Tt,b,s,n,M);if(f=P.length,t.pack(M,P,f),t.pack(O,B,f),t.pack(C,E,f),y.push(b.latitude),y.push(b.longitude),r){for(oe(b,g,l,s,i,a,n,P,B,E,y),f=P.length,h=0;h<3;++h)P[f+h]=P[h],B[f+h]=B[h],E[f+h]=E[h];y.push(g.latitude),y.push(g.longitude)}return to(r,c,B,E,P,y,o)};var Hn=new t,yn=new Bt,kn=new Qt;function je(e,o,r,n){let i=nt(r,o,Hn),a=t.dot(i,e);if(a>Qe||a<Re){let c=nt(n,r,nn),l=a<Re?p.PI_OVER_TWO:-p.PI_OVER_TWO,s=Qt.fromAxisAngle(c,l,kn),f=Bt.fromQuaternion(s,yn);return Bt.multiplyByVector(f,e,e),!0}return!1}var Xe=new u,Mn=new t,Ye=new t;function Dt(e,o,r,n,i){let a=u.toCartesian(o,e._ellipsoid,Mn),c=t.add(a,r,Ye),l=!1,s=e._ellipsoid,f=s.cartesianToCartographic(c,Xe);Math.abs(o.longitude-f.longitude)>p.PI_OVER_TWO&&(l=!0,c=t.subtract(a,r,Ye),f=s.cartesianToCartographic(c,Xe)),f.height=0;let h=e.project(f,i);return i=t.subtract(h,n,i),i.z=0,i=t.normalize(i,i),l&&t.negate(i,i),i}var bn=new t,Fe=new t;function Ue(e,o,r,n,i,a){let c=t.subtract(o,e,bn);t.normalize(c,c);let l=r-tn,s=t.multiplyByScalar(c,l,Fe);t.add(e,s,i);let f=n-en;s=t.multiplyByScalar(c,f,Fe),t.add(o,s,a)}var Rn=new t;function Gt(e,o){let r=Xt.getPointDistance(qt,e),n=Xt.getPointDistance(qt,o),i=Rn;p.equalsEpsilon(r,0,p.EPSILON2)?(i=nt(o,e,i),t.multiplyByScalar(i,p.EPSILON2,i),t.add(e,i,e)):p.equalsEpsilon(n,0,p.EPSILON2)&&(i=nt(e,o,i),t.multiplyByScalar(i,p.EPSILON2,i),t.add(o,i,o))}function An(e,o){let r=Math.abs(e.longitude),n=Math.abs(o.longitude);if(p.equalsEpsilon(r,p.PI,p.EPSILON11)){let i=p.sign(o.longitude);return e.longitude=i*(r-p.EPSILON11),1}else if(p.equalsEpsilon(n,p.PI,p.EPSILON11)){let i=p.sign(e.longitude);return o.longitude=i*(n-p.EPSILON11),2}return 0}var on=new u,rn=new u,Ge=new t,ae=new t,qe=new t,We=new t,Pn=new t,Ze=new t,vn=[on,rn],Bn=new U,zn=new t,jn=new t,Xn=new t,Yn=new t,Fn=new t,Un=new t,ce=new t,se=new t,Gn=new t,qn=new t,Wn=new t,Ve=new t,Zn=new t,Vn=new t,$n=new Ct,Jn=new Ct,$e=new t,Kn=new t,Je=new t,Qn=[new G,new G],an=[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],Ke=an.length;function to(e,o,r,n,i,a,c){let l,s,f=o._ellipsoid,h=r.length/3-1,_=h*8,S=_*4,R=h*36,D=_>65535?new Uint32Array(R):new Uint16Array(R),I=new Float64Array(_*3),j=new Float32Array(S),q=new Float32Array(S),d=new Float32Array(S),X=new Float32Array(S),v=new Float32Array(S),k,H,N,y;c&&(k=new Float32Array(S),H=new Float32Array(S),N=new Float32Array(S),y=new Float32Array(_*2));let P=a.length/2,B=0,E=on;E.height=0;let x=rn;x.height=0;let O=Ge,C=ae;if(c)for(s=0,l=1;l<P;l++)E.latitude=a[s],E.longitude=a[s+1],x.latitude=a[s+2],x.longitude=a[s+3],O=o.project(E,O),C=o.project(x,C),B+=t.distance(O,C),s+=2;let Y=n.length/3;C=t.unpack(n,0,C);let M=0;for(s=3,l=1;l<Y;l++)O=t.clone(C,O),C=t.unpack(n,s,C),M+=t.distance(O,C),s+=3;let g;s=3;let V=0,It=0,b=0,Tt=0,F=!1,st=t.unpack(r,0,We),lt=t.unpack(n,0,ae),W=t.unpack(i,0,Ze);if(e){let ht=t.unpack(r,r.length-6,qe);je(W,ht,st,lt)&&(W=t.negate(W,W))}let fe=0,de=0,Wt=0;for(l=0;l<h;l++){let ht=t.clone(st,qe),Vt=t.clone(lt,Ge),mt=t.clone(W,Pn);F&&(mt=t.negate(mt,mt)),st=t.unpack(r,s,We),lt=t.unpack(n,s,ae),W=t.unpack(i,s,Ze),F=je(W,ht,st,lt),E.latitude=a[V],E.longitude=a[V+1],x.latitude=a[V+2],x.longitude=a[V+3];let pt,gt,ot,it;if(c){let T=An(E,x);pt=o.project(E,Fn),gt=o.project(x,Un);let wt=nt(gt,pt,$e);wt.y=Math.abs(wt.y),ot=ce,it=se,T===0||t.dot(wt,t.UNIT_Y)>Qe?(ot=Dt(o,E,mt,pt,ce),it=Dt(o,x,W,gt,se)):T===1?(it=Dt(o,x,W,gt,se),ot.x=0,ot.y=p.sign(E.longitude-Math.abs(x.longitude)),ot.z=0):(ot=Dt(o,E,mt,pt,ce),it.x=0,it.y=p.sign(E.longitude-x.longitude),it.z=0)}let ue=t.distance(Vt,lt),we=Ct.fromCartesian(ht,$n),Ht=t.subtract(st,ht,Gn),cn=t.normalize(Ht,Ve),xt=t.subtract(Vt,ht,qn);xt=t.normalize(xt,xt);let ut=t.cross(cn,xt,Ve);ut=t.normalize(ut,ut);let yt=t.cross(xt,mt,Zn);yt=t.normalize(yt,yt);let kt=t.subtract(lt,st,Wn);kt=t.normalize(kt,kt);let Mt=t.cross(W,kt,Vn);Mt=t.normalize(Mt,Mt);let sn=ue/M,ln=fe/M,$t=0,_t,bt,ft,Se=0,Te=0;if(c){$t=t.distance(pt,gt),_t=Ct.fromCartesian(pt,Jn),bt=t.subtract(gt,pt,$e),ft=t.normalize(bt,Kn);let T=ft.x;ft.x=ft.y,ft.y=-T,Se=$t/B,Te=de/B}for(g=0;g<8;g++){let T=Tt+g*4,wt=It+g*2,Nt=T+3,xe=g<4?1:-1,Rt=g===2||g===3||g===6||g===7?1:-1;t.pack(we.high,j,T),j[Nt]=Ht.x,t.pack(we.low,q,T),q[Nt]=Ht.y,t.pack(yt,d,T),d[Nt]=Ht.z,t.pack(Mt,X,T),X[Nt]=sn*xe,t.pack(ut,v,T);let dt=ln*Rt;dt===0&&Rt<0&&(dt=9),v[Nt]=dt,c&&(k[T]=_t.high.x,k[T+1]=_t.high.y,k[T+2]=_t.low.x,k[T+3]=_t.low.y,N[T]=-ot.y,N[T+1]=ot.x,N[T+2]=it.y,N[T+3]=-it.x,H[T]=bt.x,H[T+1]=bt.y,H[T+2]=ft.x,H[T+3]=ft.y,y[wt]=Se*xe,dt=Te*Rt,dt===0&&Rt<0&&(dt=9),y[wt+1]=dt)}let $=Xn,J=Yn,K=zn,Q=jn,hn=U.fromCartographicArray(vn,Bn),Ee=Yt.getMinimumMaximumHeights(hn,f),Jt=Ee.minimumTerrainHeight,Kt=Ee.maximumTerrainHeight;Wt+=Math.abs(Jt),Wt+=Math.abs(Kt),Ue(ht,Vt,Jt,Kt,$,K),Ue(st,lt,Jt,Kt,J,Q);let tt=t.multiplyByScalar(ut,p.EPSILON5,Je);t.add($,tt,$),t.add(J,tt,J),t.add(K,tt,K),t.add(Q,tt,Q),Gt($,J),Gt(K,Q),t.pack($,I,b),t.pack(J,I,b+3),t.pack(Q,I,b+6),t.pack(K,I,b+9),tt=t.multiplyByScalar(ut,-2*p.EPSILON5,Je),t.add($,tt,$),t.add(J,tt,J),t.add(K,tt,K),t.add(Q,tt,Q),Gt($,J),Gt(K,Q),t.pack($,I,b+12),t.pack(J,I,b+15),t.pack(Q,I,b+18),t.pack(K,I,b+21),V+=2,s+=3,It+=16,b+=24,Tt+=32,fe+=ue,de+=$t}s=0;let me=0;for(l=0;l<h;l++){for(g=0;g<Ke;g++)D[s+g]=an[g]+me;me+=8,s+=Ke}let Zt=Qn;G.fromVertices(r,t.ZERO,3,Zt[0]),G.fromVertices(n,t.ZERO,3,Zt[1]);let ge=G.fromBoundingSpheres(Zt);ge.radius+=Wt/(h*2);let Et={position:new jt({componentDatatype:zt.DOUBLE,componentsPerAttribute:3,normalize:!1,values:I}),startHiAndForwardOffsetX:at(j),startLoAndForwardOffsetY:at(q),startNormalAndForwardOffsetZ:at(d),endNormalAndTextureCoordinateNormalizationX:at(X),rightNormalAndTextureCoordinateNormalizationY:at(v)};return c&&(Et.startHiLo2D=at(k),Et.offsetAndRight2D=at(H),Et.startEndNormals2D=at(N),Et.texcoordNormalization2D=new jt({componentDatatype:zt.FLOAT,componentsPerAttribute:2,normalize:!1,values:y})),new Ce({attributes:Et,indices:D,boundingSphere:ge})}function at(e){return new jt({componentDatatype:zt.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}ct._projectNormal=Dt;var pe=ct;function eo(e,o){return Yt.initialize().then(function(){return m(o)&&(e=pe.unpack(e,o)),pe.createGeometry(e)})}var ni=eo;export{ni as default};
import{a as Oe}from"./chunk-NJVIDNJ6.js";import{a as Z}from"./chunk-3B3UDCHP.js";import{a as Ct}from"./chunk-E5FOJ77O.js";import{a as De}from"./chunk-45NF2JU3.js";import{a as Le}from"./chunk-EX67AA2G.js";import{a as ee}from"./chunk-V5KKODOM.js";import{b as te}from"./chunk-AIYLFSI3.js";import{a as Xt}from"./chunk-FBQDLPON.js";import{c as Ce,d as jt}from"./chunk-WI5KIEME.js";import{a as vt,d as G}from"./chunk-ZPW6H6BB.js";import{d as _e,e as Ne,f as Qt,i as U}from"./chunk-HMXXHGCW.js";import{a as zt}from"./chunk-NFDMGE7Q.js";import{a as At,b as t,c as u,d as Pt,e as z,f as Bt}from"./chunk-VDZXURWO.js";import{a as p}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as L}from"./chunk-5HWP5DW7.js";import{a as St,b as et}from"./chunk-3K67FZLU.js";import{e as m}from"./chunk-55TU6MJR.js";function rt(e){e=L(e,L.EMPTY_OBJECT),this._ellipsoid=L(e.ellipsoid,z.default),this._rectangle=L(e.rectangle,U.MAX_VALUE),this._bounds=L(e.bounds,[]),this._projection=new vt(this._ellipsoid),this._numberOfLevelZeroTilesX=L(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=L(e.numberOfLevelZeroTilesY,1),this._tileInfo=e.tileInfo}Object.defineProperties(rt.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},bounds:{get:function(){return this._bounds}},projection:{get:function(){return this._projection}}});rt.prototype.getNumberOfXTilesAtLevel=function(e){if(!m(this._tileInfo))return this._numberOfLevelZeroTilesX<<e;let r=this._tileInfo.lods.filter(function(n){return n.level===e})[0].resolution;return Math.round(360/(this._tileInfo.rows*r))};rt.prototype.getNumberOfYTilesAtLevel=function(e){if(!m(this._tileInfo))return this._numberOfLevelZeroTilesY<<e;let r=this._tileInfo.lods.filter(function(n){return n.level===e})[0].resolution;return Math.round(180/(this._tileInfo.cols*r))};rt.prototype.rectangleToNativeRectangle=function(e,o){et.defined("rectangle",e);let r=p.toDegrees(e.west),n=p.toDegrees(e.south),i=p.toDegrees(e.east),a=p.toDegrees(e.north);return m(o)?(o.west=r,o.south=n,o.east=i,o.north=a,o):new U(r,n,i,a)};rt.prototype.tileXYToNativeRectangle=function(e,o,r,n){let i=this.tileXYToRectangle(e,o,r,n);return i.west=p.toDegrees(i.west),i.south=p.toDegrees(i.south),i.east=p.toDegrees(i.east),i.north=p.toDegrees(i.north),i};rt.prototype.tileXYToRectangle=function(e,o,r,n){let i=this._rectangle,a=this.getNumberOfXTilesAtLevel(r),c=this.getNumberOfYTilesAtLevel(r),l=i.width/a,s=e*l+i.west,f=(e+1)*l+i.west,h=i.height/c,_=i.north-o*h,S=i.north-(o+1)*h;return m(n)||(n=new U(s,S,f,_)),n.west=s,n.south=S,n.east=f,n.north=_,n};rt.prototype.positionToTileXY=function(e,o,r){let n=this._rectangle;if(!U.contains(n,e))return;let i=this.getNumberOfXTilesAtLevel(o),a=this.getNumberOfYTilesAtLevel(o),c=n.width/i,l=n.height/a,s=e.longitude;n.east<n.west&&(s+=p.TWO_PI);let f=(s-n.west)/c|0;f>=i&&(f=i-1);let h=(n.north-e.latitude)/l|0;return h>=a&&(h=a-1),m(r)?(r.x=f,r.y=h,r):new Pt(f,h)};var Ie=rt;var He=new t,ye=new t,ke=new u,ne=new t,pn=new t,Me=new G,fn=new Ie,Ot=[new u,new u,new u,new u],Lt=new Pt,w={};w.initialize=function(){let e=w._initPromise;return m(e)||(e=_e.fetchJson(Ne("Assets/approximateTerrainHeights.json")).then(function(o){if(At.changeApproximateTerrainHeights===!0)for(let r in o)o.hasOwnProperty(r)&&(o[r][0]=At.minTerrainHeight,o[r][1]=At.maxTerrainHeight);w._terrainHeights=o}),w._initPromise=e),e};w.getMinimumMaximumHeights=function(e,o){if(et.defined("rectangle",e),!m(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");o=L(o,z.default);let r=be(e),n=w._defaultMinTerrainHeight,i=w._defaultMaxTerrainHeight;if(m(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];m(c)&&(n=c[0],i=c[1]),o.cartographicToCartesian(U.northeast(e,ke),He),o.cartographicToCartesian(U.southwest(e,ke),ye),t.midpoint(ye,He,ne);let l=o.scaleToGeodeticSurface(ne,pn);if(m(l)){let s=t.distance(ne,l);n=Math.min(n,-s)}else n=w._defaultMinTerrainHeight}return n=Math.max(w._defaultMinTerrainHeight,n),{minimumTerrainHeight:n,maximumTerrainHeight:i}};w.getBoundingSphere=function(e,o){if(et.defined("rectangle",e),!m(w._terrainHeights))throw new St("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");o=L(o,z.default);let r=be(e),n=w._defaultMaxTerrainHeight;if(m(r)){let a=`${r.level}-${r.x}-${r.y}`,c=w._terrainHeights[a];m(c)&&(n=c[1])}let i=G.fromRectangle3D(e,o,0);return G.fromRectangle3D(e,o,n,Me),G.union(i,Me,i)};function be(e){u.fromRadians(e.east,e.north,0,Ot[0]),u.fromRadians(e.west,e.north,0,Ot[1]),u.fromRadians(e.east,e.south,0,Ot[2]),u.fromRadians(e.west,e.south,0,Ot[3]);let o=0,r=0,n=0,i=0,a=w._terrainHeightsMaxLevel,c;for(c=0;c<=a;++c){let l=!1;for(let s=0;s<4;++s){let f=Ot[s];if(fn.positionToTileXY(f,c,Lt),s===0)n=Lt.x,i=Lt.y;else if(n!==Lt.x||i!==Lt.y){l=!0;break}}if(l)break;o=n,r=i}if(c!==0)return{x:o,y:r,level:c>a?a:c-1}}w._terrainHeightsMaxLevel=6;w._defaultMaxTerrainHeight=9e3;w._defaultMinTerrainHeight=-1e5;w._terrainHeights=void 0;w._initPromise=void 0;Object.defineProperties(w,{initialized:{get:function(){return m(w._terrainHeights)}}});var Yt=w;var he=[vt,Oe],dn=he.length,Qe=Math.cos(p.toRadians(30)),Re=Math.cos(p.toRadians(150)),tn=0,en=1e3;function ct(e){e=L(e,L.EMPTY_OBJECT);let o=e.positions;if(!m(o)||o.length<2)throw new St("At least two positions are required.");if(m(e.arcType)&&e.arcType!==Z.GEODESIC&&e.arcType!==Z.RHUMB)throw new St("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=L(e.width,1),this._positions=o,this.granularity=L(e.granularity,9999),this.loop=L(e.loop,!1),this.arcType=L(e.arcType,Z.GEODESIC),this._ellipsoid=z.default,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(ct.prototype,{packedLength:{get:function(){return 1+this._positions.length*3+1+1+1+z.packedLength+1+1}}});ct.setProjectionAndEllipsoid=function(e,o){let r=0;for(let n=0;n<dn;n++)if(o instanceof he[n]){r=n;break}e._projectionIndex=r,e._ellipsoid=o.ellipsoid};var mn=new t,Ae=new t,Pe=new t;function le(e,o,r,n,i){let a=A(n,e,0,mn),c=A(n,e,r,Ae),l=A(n,o,0,Pe),s=nt(c,a,Ae),f=nt(l,a,Pe);return t.cross(f,s,i),t.normalize(i,i)}var gn=new u,un=new t,wn=new t,Sn=new t;function oe(e,o,r,n,i,a,c,l,s,f,h){if(i===0)return;let _;a===Z.GEODESIC?_=new De(e,o,c):a===Z.RHUMB&&(_=new ee(e,o,c));let S=_.surfaceDistance;if(S<i)return;let R=le(e,o,n,c,Sn),D=Math.ceil(S/i),I=S/D,j=I,q=D-1,d=l.length;for(let X=0;X<q;X++){let v=_.interpolateUsingSurfaceDistance(j,gn),k=A(c,v,r,un),H=A(c,v,n,wn);t.pack(R,l,d),t.pack(k,s,d),t.pack(H,f,d),h.push(v.latitude),h.push(v.longitude),d+=3,j+=I}}var ie=new u;function A(e,o,r,n){return u.clone(o,ie),ie.height=r,u.toCartesian(ie,e,n)}ct.pack=function(e,o,r){et.typeOf.object("value",e),et.defined("array",o);let n=L(r,0),i=e._positions,a=i.length;o[n++]=a;for(let c=0;c<a;++c){let l=i[c];t.pack(l,o,n),n+=3}return o[n++]=e.granularity,o[n++]=e.loop?1:0,o[n++]=e.arcType,z.pack(e._ellipsoid,o,n),n+=z.packedLength,o[n++]=e._projectionIndex,o[n++]=e._scene3DOnly?1:0,o};ct.unpack=function(e,o,r){et.defined("array",e);let n=L(o,0),i=e[n++],a=new Array(i);for(let S=0;S<i;S++)a[S]=t.unpack(e,n),n+=3;let c=e[n++],l=e[n++]===1,s=e[n++],f=z.unpack(e,n);n+=z.packedLength;let h=e[n++],_=e[n++]===1;return m(r)||(r=new ct({positions:a})),r._positions=a,r.granularity=c,r.loop=l,r.arcType=s,r._ellipsoid=f,r._projectionIndex=h,r._scene3DOnly=_,r};function nt(e,o,r){return t.subtract(e,o,r),t.normalize(r,r),r}function ve(e,o,r,n){return n=nt(e,o,n),n=t.cross(n,r,n),n=t.normalize(n,n),n=t.cross(r,n,n),n}var Tn=new t,En=new t,xn=new t,nn=new t,_n=0,Nn=-1;function re(e,o,r,n,i){let a=nt(r,o,nn),c=ve(e,o,a,Tn),l=ve(n,o,a,En);if(p.equalsEpsilon(t.dot(c,l),Nn,p.EPSILON5))return i=t.cross(a,c,i),i=t.normalize(i,i),i;i=t.add(l,c,i),i=t.normalize(i,i);let s=t.cross(a,i,xn);return t.dot(l,s)<_n&&(i=t.negate(i,i)),i}var qt=Xt.fromPointNormal(t.ZERO,t.UNIT_Y),Cn=new t,On=new t,Ln=new t,Dn=new t,In=new t,Ft=new t,Ut=new u,Be=new u,ze=new u;ct.createGeometry=function(e){let o=!e._scene3DOnly,r=e.loop,n=e._ellipsoid,i=e.granularity,a=e.arcType,c=new he[e._projectionIndex](n),l=tn,s=en,f,h,_=e._positions,S=_.length;S===2&&(r=!1);let R,D,I,j,q=new ee(void 0,void 0,n),d,X,v,k=[_[0]];for(h=0;h<S-1;h++)R=_[h],D=_[h+1],d=te.lineSegmentPlane(R,D,qt,Ft),m(d)&&!t.equalsEpsilon(d,R,p.EPSILON7)&&!t.equalsEpsilon(d,D,p.EPSILON7)&&(e.arcType===Z.GEODESIC?k.push(t.clone(d)):e.arcType===Z.RHUMB&&(v=n.cartesianToCartographic(d,Ut).longitude,I=n.cartesianToCartographic(R,Ut),j=n.cartesianToCartographic(D,Be),q.setEndPoints(I,j),X=q.findIntersectionWithLongitude(v,ze),d=n.cartographicToCartesian(X,Ft),m(d)&&!t.equalsEpsilon(d,R,p.EPSILON7)&&!t.equalsEpsilon(d,D,p.EPSILON7)&&k.push(t.clone(d)))),k.push(D);r&&(R=_[S-1],D=_[0],d=te.lineSegmentPlane(R,D,qt,Ft),m(d)&&!t.equalsEpsilon(d,R,p.EPSILON7)&&!t.equalsEpsilon(d,D,p.EPSILON7)&&(e.arcType===Z.GEODESIC?k.push(t.clone(d)):e.arcType===Z.RHUMB&&(v=n.cartesianToCartographic(d,Ut).longitude,I=n.cartesianToCartographic(R,Ut),j=n.cartesianToCartographic(D,Be),q.setEndPoints(I,j),X=q.findIntersectionWithLongitude(v,ze),d=n.cartographicToCartesian(X,Ft),m(d)&&!t.equalsEpsilon(d,R,p.EPSILON7)&&!t.equalsEpsilon(d,D,p.EPSILON7)&&k.push(t.clone(d)))));let H=k.length,N=new Array(H);for(h=0;h<H;h++){let F=u.fromCartesian(k[h],n);F.height=0,N[h]=F}if(N=Le(N,u.equalsEpsilon),H=N.length,H<2)return;let y=[],P=[],B=[],E=[],x=Cn,O=On,C=Ln,Y=Dn,M=In,g=N[0],V=N[1],It=N[H-1];for(x=A(n,It,l,x),Y=A(n,V,l,Y),O=A(n,g,l,O),C=A(n,g,s,C),r?M=re(x,O,C,Y,M):M=le(g,V,s,n,M),t.pack(M,P,0),t.pack(O,B,0),t.pack(C,E,0),y.push(g.latitude),y.push(g.longitude),oe(g,V,l,s,i,a,n,P,B,E,y),h=1;h<H-1;++h){x=t.clone(O,x),O=t.clone(Y,O);let F=N[h];A(n,F,s,C),A(n,N[h+1],l,Y),re(x,O,C,Y,M),f=P.length,t.pack(M,P,f),t.pack(O,B,f),t.pack(C,E,f),y.push(F.latitude),y.push(F.longitude),oe(N[h],N[h+1],l,s,i,a,n,P,B,E,y)}let b=N[H-1],Tt=N[H-2];if(O=A(n,b,l,O),C=A(n,b,s,C),r){let F=N[0];x=A(n,Tt,l,x),Y=A(n,F,l,Y),M=re(x,O,C,Y,M)}else M=le(Tt,b,s,n,M);if(f=P.length,t.pack(M,P,f),t.pack(O,B,f),t.pack(C,E,f),y.push(b.latitude),y.push(b.longitude),r){for(oe(b,g,l,s,i,a,n,P,B,E,y),f=P.length,h=0;h<3;++h)P[f+h]=P[h],B[f+h]=B[h],E[f+h]=E[h];y.push(g.latitude),y.push(g.longitude)}return to(r,c,B,E,P,y,o)};var Hn=new t,yn=new Bt,kn=new Qt;function je(e,o,r,n){let i=nt(r,o,Hn),a=t.dot(i,e);if(a>Qe||a<Re){let c=nt(n,r,nn),l=a<Re?p.PI_OVER_TWO:-p.PI_OVER_TWO,s=Qt.fromAxisAngle(c,l,kn),f=Bt.fromQuaternion(s,yn);return Bt.multiplyByVector(f,e,e),!0}return!1}var Xe=new u,Mn=new t,Ye=new t;function Dt(e,o,r,n,i){let a=u.toCartesian(o,e._ellipsoid,Mn),c=t.add(a,r,Ye),l=!1,s=e._ellipsoid,f=s.cartesianToCartographic(c,Xe);Math.abs(o.longitude-f.longitude)>p.PI_OVER_TWO&&(l=!0,c=t.subtract(a,r,Ye),f=s.cartesianToCartographic(c,Xe)),f.height=0;let h=e.project(f,i);return i=t.subtract(h,n,i),i.z=0,i=t.normalize(i,i),l&&t.negate(i,i),i}var bn=new t,Fe=new t;function Ue(e,o,r,n,i,a){let c=t.subtract(o,e,bn);t.normalize(c,c);let l=r-tn,s=t.multiplyByScalar(c,l,Fe);t.add(e,s,i);let f=n-en;s=t.multiplyByScalar(c,f,Fe),t.add(o,s,a)}var Rn=new t;function Gt(e,o){let r=Xt.getPointDistance(qt,e),n=Xt.getPointDistance(qt,o),i=Rn;p.equalsEpsilon(r,0,p.EPSILON2)?(i=nt(o,e,i),t.multiplyByScalar(i,p.EPSILON2,i),t.add(e,i,e)):p.equalsEpsilon(n,0,p.EPSILON2)&&(i=nt(e,o,i),t.multiplyByScalar(i,p.EPSILON2,i),t.add(o,i,o))}function An(e,o){let r=Math.abs(e.longitude),n=Math.abs(o.longitude);if(p.equalsEpsilon(r,p.PI,p.EPSILON11)){let i=p.sign(o.longitude);return e.longitude=i*(r-p.EPSILON11),1}else if(p.equalsEpsilon(n,p.PI,p.EPSILON11)){let i=p.sign(e.longitude);return o.longitude=i*(n-p.EPSILON11),2}return 0}var on=new u,rn=new u,Ge=new t,ae=new t,qe=new t,We=new t,Pn=new t,Ze=new t,vn=[on,rn],Bn=new U,zn=new t,jn=new t,Xn=new t,Yn=new t,Fn=new t,Un=new t,ce=new t,se=new t,Gn=new t,qn=new t,Wn=new t,Ve=new t,Zn=new t,Vn=new t,$n=new Ct,Jn=new Ct,$e=new t,Kn=new t,Je=new t,Qn=[new G,new G],an=[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],Ke=an.length;function to(e,o,r,n,i,a,c){let l,s,f=o._ellipsoid,h=r.length/3-1,_=h*8,S=_*4,R=h*36,D=_>65535?new Uint32Array(R):new Uint16Array(R),I=new Float64Array(_*3),j=new Float32Array(S),q=new Float32Array(S),d=new Float32Array(S),X=new Float32Array(S),v=new Float32Array(S),k,H,N,y;c&&(k=new Float32Array(S),H=new Float32Array(S),N=new Float32Array(S),y=new Float32Array(_*2));let P=a.length/2,B=0,E=on;E.height=0;let x=rn;x.height=0;let O=Ge,C=ae;if(c)for(s=0,l=1;l<P;l++)E.latitude=a[s],E.longitude=a[s+1],x.latitude=a[s+2],x.longitude=a[s+3],O=o.project(E,O),C=o.project(x,C),B+=t.distance(O,C),s+=2;let Y=n.length/3;C=t.unpack(n,0,C);let M=0;for(s=3,l=1;l<Y;l++)O=t.clone(C,O),C=t.unpack(n,s,C),M+=t.distance(O,C),s+=3;let g;s=3;let V=0,It=0,b=0,Tt=0,F=!1,st=t.unpack(r,0,We),lt=t.unpack(n,0,ae),W=t.unpack(i,0,Ze);if(e){let ht=t.unpack(r,r.length-6,qe);je(W,ht,st,lt)&&(W=t.negate(W,W))}let fe=0,de=0,Wt=0;for(l=0;l<h;l++){let ht=t.clone(st,qe),Vt=t.clone(lt,Ge),mt=t.clone(W,Pn);F&&(mt=t.negate(mt,mt)),st=t.unpack(r,s,We),lt=t.unpack(n,s,ae),W=t.unpack(i,s,Ze),F=je(W,ht,st,lt),E.latitude=a[V],E.longitude=a[V+1],x.latitude=a[V+2],x.longitude=a[V+3];let pt,gt,ot,it;if(c){let T=An(E,x);pt=o.project(E,Fn),gt=o.project(x,Un);let wt=nt(gt,pt,$e);wt.y=Math.abs(wt.y),ot=ce,it=se,T===0||t.dot(wt,t.UNIT_Y)>Qe?(ot=Dt(o,E,mt,pt,ce),it=Dt(o,x,W,gt,se)):T===1?(it=Dt(o,x,W,gt,se),ot.x=0,ot.y=p.sign(E.longitude-Math.abs(x.longitude)),ot.z=0):(ot=Dt(o,E,mt,pt,ce),it.x=0,it.y=p.sign(E.longitude-x.longitude),it.z=0)}let ue=t.distance(Vt,lt),we=Ct.fromCartesian(ht,$n),Ht=t.subtract(st,ht,Gn),cn=t.normalize(Ht,Ve),xt=t.subtract(Vt,ht,qn);xt=t.normalize(xt,xt);let ut=t.cross(cn,xt,Ve);ut=t.normalize(ut,ut);let yt=t.cross(xt,mt,Zn);yt=t.normalize(yt,yt);let kt=t.subtract(lt,st,Wn);kt=t.normalize(kt,kt);let Mt=t.cross(W,kt,Vn);Mt=t.normalize(Mt,Mt);let sn=ue/M,ln=fe/M,$t=0,_t,bt,ft,Se=0,Te=0;if(c){$t=t.distance(pt,gt),_t=Ct.fromCartesian(pt,Jn),bt=t.subtract(gt,pt,$e),ft=t.normalize(bt,Kn);let T=ft.x;ft.x=ft.y,ft.y=-T,Se=$t/B,Te=de/B}for(g=0;g<8;g++){let T=Tt+g*4,wt=It+g*2,Nt=T+3,xe=g<4?1:-1,Rt=g===2||g===3||g===6||g===7?1:-1;t.pack(we.high,j,T),j[Nt]=Ht.x,t.pack(we.low,q,T),q[Nt]=Ht.y,t.pack(yt,d,T),d[Nt]=Ht.z,t.pack(Mt,X,T),X[Nt]=sn*xe,t.pack(ut,v,T);let dt=ln*Rt;dt===0&&Rt<0&&(dt=9),v[Nt]=dt,c&&(k[T]=_t.high.x,k[T+1]=_t.high.y,k[T+2]=_t.low.x,k[T+3]=_t.low.y,N[T]=-ot.y,N[T+1]=ot.x,N[T+2]=it.y,N[T+3]=-it.x,H[T]=bt.x,H[T+1]=bt.y,H[T+2]=ft.x,H[T+3]=ft.y,y[wt]=Se*xe,dt=Te*Rt,dt===0&&Rt<0&&(dt=9),y[wt+1]=dt)}let $=Xn,J=Yn,K=zn,Q=jn,hn=U.fromCartographicArray(vn,Bn),Ee=Yt.getMinimumMaximumHeights(hn,f),Jt=Ee.minimumTerrainHeight,Kt=Ee.maximumTerrainHeight;Wt+=Math.abs(Jt),Wt+=Math.abs(Kt),Ue(ht,Vt,Jt,Kt,$,K),Ue(st,lt,Jt,Kt,J,Q);let tt=t.multiplyByScalar(ut,p.EPSILON5,Je);t.add($,tt,$),t.add(J,tt,J),t.add(K,tt,K),t.add(Q,tt,Q),Gt($,J),Gt(K,Q),t.pack($,I,b),t.pack(J,I,b+3),t.pack(Q,I,b+6),t.pack(K,I,b+9),tt=t.multiplyByScalar(ut,-2*p.EPSILON5,Je),t.add($,tt,$),t.add(J,tt,J),t.add(K,tt,K),t.add(Q,tt,Q),Gt($,J),Gt(K,Q),t.pack($,I,b+12),t.pack(J,I,b+15),t.pack(Q,I,b+18),t.pack(K,I,b+21),V+=2,s+=3,It+=16,b+=24,Tt+=32,fe+=ue,de+=$t}s=0;let me=0;for(l=0;l<h;l++){for(g=0;g<Ke;g++)D[s+g]=an[g]+me;me+=8,s+=Ke}let Zt=Qn;G.fromVertices(r,t.ZERO,3,Zt[0]),G.fromVertices(n,t.ZERO,3,Zt[1]);let ge=G.fromBoundingSpheres(Zt);ge.radius+=Wt/(h*2);let Et={position:new jt({componentDatatype:zt.DOUBLE,componentsPerAttribute:3,normalize:!1,values:I}),startHiAndForwardOffsetX:at(j),startLoAndForwardOffsetY:at(q),startNormalAndForwardOffsetZ:at(d),endNormalAndTextureCoordinateNormalizationX:at(X),rightNormalAndTextureCoordinateNormalizationY:at(v)};return c&&(Et.startHiLo2D=at(k),Et.offsetAndRight2D=at(H),Et.startEndNormals2D=at(N),Et.texcoordNormalization2D=new jt({componentDatatype:zt.FLOAT,componentsPerAttribute:2,normalize:!1,values:y})),new Ce({attributes:Et,indices:D,boundingSphere:ge})}function at(e){return new jt({componentDatatype:zt.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}ct._projectNormal=Dt;var pe=ct;function eo(e,o){return Yt.initialize().then(function(){return m(o)&&(e=pe.unpack(e,o)),pe.createGeometry(e)})}var ni=eo;export{ni as default};
public/CimSDK/Workers/createPlaneGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as m}from"./chunk-WF3WCQMH.js";import{a as b}from"./chunk-LH4TAMBV.js";import{b as v,c as x,d as p}from"./chunk-TNSV6TPX.js";import{d as A}from"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import{a as c}from"./chunk-3LWOQSP3.js";import{b as y}from"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as i}from"./chunk-5HWP5DW7.js";import{b as u}from"./chunk-INT7THOB.js";import{e as f}from"./chunk-PPCZYYBW.js";function s(r){r=i(r,i.EMPTY_OBJECT);let e=i(r.vertexFormat,m.DEFAULT);this._vertexFormat=e,this._workerName="createPlaneGeometry"}s.packedLength=m.packedLength;s.pack=function(r,e,o){return u.typeOf.object("value",r),u.defined("array",e),o=i(o,0),m.pack(r._vertexFormat,e,o),e};var d=new m,P={vertexFormat:d};s.unpack=function(r,e,o){u.defined("array",r),e=i(e,0);let a=m.unpack(r,e,d);return f(o)?(o._vertexFormat=m.clone(a,o._vertexFormat),o):new s(P)};var F=new y(-.5,-.5,0),l=new y(.5,.5,0);s.createGeometry=function(r){let e=r._vertexFormat,o=new b,a,n;if(e.position){if(n=new Float64Array(4*3),n[0]=F.x,n[1]=F.y,n[2]=0,n[3]=l.x,n[4]=F.y,n[5]=0,n[6]=l.x,n[7]=l.y,n[8]=0,n[9]=F.x,n[10]=l.y,n[11]=0,o.position=new p({componentDatatype:c.DOUBLE,componentsPerAttribute:3,values:n}),e.normal){let t=new Float32Array(12);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,o.normal=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}if(e.st){let t=new Float32Array(8);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,o.st=new p({componentDatatype:c.FLOAT,componentsPerAttribute:2,values:t})}if(e.tangent){let t=new Float32Array(12);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,o.tangent=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}if(e.bitangent){let t=new Float32Array(12);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,o.bitangent=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}a=new Uint16Array(2*3),a[0]=0,a[1]=1,a[2]=2,a[3]=0,a[4]=2,a[5]=3}return new x({attributes:o,indices:a,primitiveType:v.TRIANGLES,boundingSphere:new A(y.ZERO,Math.sqrt(2))})};var w=s;function h(r,e){return f(e)&&(r=w.unpack(r,e)),w.createGeometry(r)}var M=h;export{M as default};
import{a as m}from"./chunk-32UDSAPU.js";import{a as b}from"./chunk-LH4TAMBV.js";import{b as v,c as x,d as p}from"./chunk-WI5KIEME.js";import{d as A}from"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import{a as c}from"./chunk-NFDMGE7Q.js";import{b as y}from"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as i}from"./chunk-5HWP5DW7.js";import{b as u}from"./chunk-3K67FZLU.js";import{e as f}from"./chunk-55TU6MJR.js";function s(r){r=i(r,i.EMPTY_OBJECT);let e=i(r.vertexFormat,m.DEFAULT);this._vertexFormat=e,this._workerName="createPlaneGeometry"}s.packedLength=m.packedLength;s.pack=function(r,e,o){return u.typeOf.object("value",r),u.defined("array",e),o=i(o,0),m.pack(r._vertexFormat,e,o),e};var d=new m,P={vertexFormat:d};s.unpack=function(r,e,o){u.defined("array",r),e=i(e,0);let a=m.unpack(r,e,d);return f(o)?(o._vertexFormat=m.clone(a,o._vertexFormat),o):new s(P)};var F=new y(-.5,-.5,0),l=new y(.5,.5,0);s.createGeometry=function(r){let e=r._vertexFormat,o=new b,a,n;if(e.position){if(n=new Float64Array(4*3),n[0]=F.x,n[1]=F.y,n[2]=0,n[3]=l.x,n[4]=F.y,n[5]=0,n[6]=l.x,n[7]=l.y,n[8]=0,n[9]=F.x,n[10]=l.y,n[11]=0,o.position=new p({componentDatatype:c.DOUBLE,componentsPerAttribute:3,values:n}),e.normal){let t=new Float32Array(12);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=1,t[9]=0,t[10]=0,t[11]=1,o.normal=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}if(e.st){let t=new Float32Array(8);t[0]=0,t[1]=0,t[2]=1,t[3]=0,t[4]=1,t[5]=1,t[6]=0,t[7]=1,o.st=new p({componentDatatype:c.FLOAT,componentsPerAttribute:2,values:t})}if(e.tangent){let t=new Float32Array(12);t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=1,t[10]=0,t[11]=0,o.tangent=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}if(e.bitangent){let t=new Float32Array(12);t[0]=0,t[1]=1,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=1,t[8]=0,t[9]=0,t[10]=1,t[11]=0,o.bitangent=new p({componentDatatype:c.FLOAT,componentsPerAttribute:3,values:t})}a=new Uint16Array(2*3),a[0]=0,a[1]=1,a[2]=2,a[3]=0,a[4]=2,a[5]=3}return new x({attributes:o,indices:a,primitiveType:v.TRIANGLES,boundingSphere:new A(y.ZERO,Math.sqrt(2))})};var w=s;function h(r,e){return f(e)&&(r=w.unpack(r,e)),w.createGeometry(r)}var M=h;export{M as default};
public/CimSDK/Workers/createPlaneOutlineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as l}from"./chunk-LH4TAMBV.js";import{b as d,c as y,d as s}from"./chunk-TNSV6TPX.js";import{d as c}from"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import{a as f}from"./chunk-3LWOQSP3.js";import{b as a}from"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import{b as m}from"./chunk-INT7THOB.js";import{e as i}from"./chunk-PPCZYYBW.js";function o(){this._workerName="createPlaneOutlineGeometry"}o.packedLength=0;o.pack=function(r,e){return m.defined("value",r),m.defined("array",e),e};o.unpack=function(r,e,t){return m.defined("array",r),i(t)?t:new o};var n=new a(-.5,-.5,0),p=new a(.5,.5,0);o.createGeometry=function(){let r=new l,e=new Uint16Array(4*2),t=new Float64Array(4*3);return t[0]=n.x,t[1]=n.y,t[2]=n.z,t[3]=p.x,t[4]=n.y,t[5]=n.z,t[6]=p.x,t[7]=p.y,t[8]=n.z,t[9]=n.x,t[10]=p.y,t[11]=n.z,r.position=new s({componentDatatype:f.DOUBLE,componentsPerAttribute:3,values:t}),e[0]=0,e[1]=1,e[2]=1,e[3]=2,e[4]=2,e[5]=3,e[6]=3,e[7]=0,new y({attributes:r,indices:e,primitiveType:d.LINES,boundingSphere:new c(a.ZERO,Math.sqrt(2))})};var u=o;function w(r,e){return i(e)&&(r=u.unpack(r,e)),u.createGeometry(r)}var D=w;export{D as default};
import{a as l}from"./chunk-LH4TAMBV.js";import{b as d,c as y,d as s}from"./chunk-WI5KIEME.js";import{d as c}from"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import{a as f}from"./chunk-NFDMGE7Q.js";import{b as a}from"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import{b as m}from"./chunk-3K67FZLU.js";import{e as i}from"./chunk-55TU6MJR.js";function o(){this._workerName="createPlaneOutlineGeometry"}o.packedLength=0;o.pack=function(r,e){return m.defined("value",r),m.defined("array",e),e};o.unpack=function(r,e,t){return m.defined("array",r),i(t)?t:new o};var n=new a(-.5,-.5,0),p=new a(.5,.5,0);o.createGeometry=function(){let r=new l,e=new Uint16Array(4*2),t=new Float64Array(4*3);return t[0]=n.x,t[1]=n.y,t[2]=n.z,t[3]=p.x,t[4]=n.y,t[5]=n.z,t[6]=p.x,t[7]=p.y,t[8]=n.z,t[9]=n.x,t[10]=p.y,t[11]=n.z,r.position=new s({componentDatatype:f.DOUBLE,componentsPerAttribute:3,values:t}),e[0]=0,e[1]=1,e[2]=1,e[3]=2,e[4]=2,e[5]=3,e[6]=3,e[7]=0,new y({attributes:r,indices:e,primitiveType:d.LINES,boundingSphere:new c(a.ZERO,Math.sqrt(2))})};var u=o;function w(r,e){return i(e)&&(r=u.unpack(r,e)),u.createGeometry(r)}var D=w;export{D as default};
public/CimSDK/Workers/createPolygonGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as pt}from"./chunk-UDJW7K3P.js";import{a as F}from"./chunk-YBGQTN3R.js";import{a as lt}from"./chunk-3B3UDCHP.js";import{a as ct}from"./chunk-KBTPUVX4.js";import{a as At}from"./chunk-NLFLNVCF.js";import"./chunk-HV57XH4K.js";import"./chunk-X2QIAW2L.js";import{a as ut}from"./chunk-55FFQILS.js";import{a as q}from"./chunk-WF3WCQMH.js";import{a as tt}from"./chunk-P5SE5XVC.js";import"./chunk-ZPRLAWII.js";import{a as Pt,b as it}from"./chunk-IRIBHMN7.js";import"./chunk-A6RR2BLJ.js";import"./chunk-EPQZOCRV.js";import{a as bt,b as Ot}from"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{a as ft}from"./chunk-ZDNS2GYV.js";import"./chunk-LH4TAMBV.js";import{c as gt,d as $}from"./chunk-TNSV6TPX.js";import{d as yt}from"./chunk-QHUUGFLC.js";import{f as ht,i as wt}from"./chunk-BHJLM5NY.js";import{a as X}from"./chunk-3LWOQSP3.js";import{b as c,c as nt,d as A,e as V,f as U}from"./chunk-7DK7KB7Q.js";import{a as l}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as L}from"./chunk-5HWP5DW7.js";import{a as dt,b as Y}from"./chunk-INT7THOB.js";import{e as P}from"./chunk-PPCZYYBW.js";function O(t,e){this.position=t,P(this.position)||(this.position=new A),this.tangentPlane=e,P(this.tangentPlane)||(this.tangentPlane=O.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(O.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 t=A.magnitude(this.position),e=2*this.ellipsoid.maximumRadius;return this.tangentPlane.plane.normal.z*(l.PI_OVER_TWO-2*Math.atan2(t,e))}},longitude:{get:function(){let t=l.PI_OVER_TWO+Math.atan2(this.y,this.x);return t>Math.PI&&(t-=l.TWO_PI),t}}});var rt=new nt,Ft=new c;O.prototype.getLatitude=function(t){P(t)||(t=V.default),rt.latitude=this.conformalLatitude,rt.longitude=this.longitude,rt.height=0;let e=this.ellipsoid.cartographicToCartesian(rt,Ft);return t.cartesianToCartographic(e,rt),rt.latitude};var vt=new bt,St=new c,Vt=new c;O.fromCartesian=function(t,e){Y.defined("cartesian",t);let o=l.signNotZero(t.z),n=O.NORTH_POLE_TANGENT_PLANE,s=O.SOUTH_POLE;o<0&&(n=O.SOUTH_POLE_TANGENT_PLANE,s=O.NORTH_POLE);let i=vt;i.origin=n.ellipsoid.scaleToGeocentricSurface(t,i.origin),i.direction=c.subtract(i.origin,s,St),c.normalize(i.direction,i.direction);let r=Ot.rayPlane(i,n.plane,Vt),f=c.subtract(r,s,r),m=c.dot(n.xAxis,f),g=o*c.dot(n.yAxis,f);return P(e)?(e.position=new A(m,g),e.tangentPlane=n,e):new O(new A(m,g),n)};O.fromCartesianArray=function(t,e){Y.defined("cartesians",t);let o=t.length;P(e)?e.length=o:e=new Array(o);for(let n=0;n<o;n++)e[n]=O.fromCartesian(t[n],e[n]);return e};O.clone=function(t,e){if(P(t))return P(e)?(e.position=t.position,e.tangentPlane=t.tangentPlane,e):new O(t.position,t.tangentPlane)};O.HALF_UNIT_SPHERE=Object.freeze(new V(.5,.5,.5));O.NORTH_POLE=Object.freeze(new c(0,0,.5));O.SOUTH_POLE=Object.freeze(new c(0,0,-.5));O.NORTH_POLE_TANGENT_PLANE=Object.freeze(new tt(O.NORTH_POLE,O.HALF_UNIT_SPHERE));O.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new tt(O.SOUTH_POLE,O.HALF_UNIT_SPHERE));var z=O;var Bt=new nt,Et=new nt;function Mt(t,e,o,n){let i=n.cartesianToCartographic(t,Bt).height,r=n.cartesianToCartographic(e,Et);r.height=i,n.cartographicToCartesian(r,e);let f=n.cartesianToCartographic(o,Et);f.height=i-100,n.cartographicToCartesian(f,o)}var Ht=new pt,jt=new c,kt=new c,zt=new c,Dt=new c,Ut=new c,Wt=new c,mt=new c,Q=new c,st=new c,Gt=new A,Yt=new A,qt=new c,xt=new ht,Qt=new U,Zt=new U;function _t(t){let e=t.vertexFormat,o=t.geometry,n=t.shadowVolume,s=o.attributes.position.values,i=P(o.attributes.st)?o.attributes.st.values:void 0,r=s.length,f=t.wall,m=t.top||f,g=t.bottom||f;if(e.st||e.normal||e.tangent||e.bitangent||n){let w=t.boundingRectangle,a=t.rotationAxis,H=t.projectTo2d,x=t.ellipsoid,M=t.stRotation,C=t.perPositionHeight,R=Gt;R.x=w.x,R.y=w.y;let B=e.st?new Float32Array(2*(r/3)):void 0,_=new Float32Array(r/3),Z=0,y;e.normal&&(C&&m&&!f?y=o.attributes.normal.values:y=new Float32Array(r));let T=e.tangent?new Float32Array(r):void 0,d=e.bitangent?new Float32Array(r):void 0,k=n?new Float32Array(r):void 0,D=0,u=0,h=kt,p=zt,I=Dt,at=!0,N=Qt,E=Zt;if(M!==0){let j=ht.fromAxisAngle(a,M,xt);N=U.fromQuaternion(j,N),j=ht.fromAxisAngle(a,-M,xt),E=U.fromQuaternion(j,E)}else N=U.clone(U.IDENTITY,N),E=U.clone(U.IDENTITY,E);let b=0,K=0;m&&g&&(b=r/2,K=r/3,r/=2);for(let j=0;j<r;j+=3){let J=c.fromArray(s,j,qt);if(e.st&&!P(i)){let v=U.multiplyByVector(N,J,jt);v=x.scaleToGeodeticSurface(v,v);let S=H([v],Yt)[0];A.subtract(S,R,S);let et=l.clamp(S.x/w.width,0,1),ot=l.clamp(S.y/w.height,0,1);g&&(B[D+K]=et,B[D+1+K]=ot),m&&(B[D]=et,B[D+1]=ot);let Lt=nt.fromCartesian(J);_[Z++]=Math.floor(Lt.height+1e-5),D+=2}if(e.normal||e.tangent||e.bitangent||n){let v=u+1,S=u+2;if(f){if(j+3<r){let et=c.fromArray(s,j+3,Ut);if(at){let ot=c.fromArray(s,j+r,Wt);C&&Mt(J,et,ot,x),c.subtract(et,J,et),c.subtract(ot,J,ot),h=c.normalize(c.cross(ot,et,h),h),at=!1}c.equalsEpsilon(et,J,l.EPSILON10)&&(at=!0)}(e.tangent||e.bitangent)&&(I=x.geodeticSurfaceNormal(J,I),e.tangent&&(p=c.normalize(c.cross(I,h,p),p)))}else h=x.geodeticSurfaceNormal(J,h),(e.tangent||e.bitangent)&&(C&&(mt=c.fromArray(y,u,mt),Q=c.cross(c.UNIT_Z,mt,Q),Q=c.normalize(U.multiplyByVector(E,Q,Q),Q),e.bitangent&&(st=c.normalize(c.cross(mt,Q,st),st))),p=c.cross(c.UNIT_Z,h,p),p=c.normalize(U.multiplyByVector(E,p,p),p),e.bitangent&&(I=c.normalize(c.cross(h,p,I),I)));e.normal&&(t.wall?(y[u+b]=h.x,y[v+b]=h.y,y[S+b]=h.z):g&&(y[u+b]=-h.x,y[v+b]=-h.y,y[S+b]=-h.z),(m&&!C||f)&&(y[u]=h.x,y[v]=h.y,y[S]=h.z)),n&&(f&&(h=x.geodeticSurfaceNormal(J,h)),k[u+b]=-h.x,k[v+b]=-h.y,k[S+b]=-h.z),e.tangent&&(t.wall?(T[u+b]=p.x,T[v+b]=p.y,T[S+b]=p.z):g&&(T[u+b]=-p.x,T[v+b]=-p.y,T[S+b]=-p.z),m&&(C?(T[u]=Q.x,T[v]=Q.y,T[S]=Q.z):(T[u]=p.x,T[v]=p.y,T[S]=p.z))),e.bitangent&&(g&&(d[u+b]=I.x,d[v+b]=I.y,d[S+b]=I.z),m&&(C?(d[u]=st.x,d[v]=st.y,d[S]=st.z):(d[u]=I.x,d[v]=I.y,d[S]=I.z))),u+=3}}e.st&&!P(i)&&(o.attributes.st=new $({componentDatatype:X.FLOAT,componentsPerAttribute:2,values:B}),o.attributes.height=new $({componentDatatype:X.FLOAT,componentsPerAttribute:1,values:_})),e.normal&&(o.attributes.normal=new $({componentDatatype:X.FLOAT,componentsPerAttribute:3,values:y})),e.tangent&&(o.attributes.tangent=new $({componentDatatype:X.FLOAT,componentsPerAttribute:3,values:T})),e.bitangent&&(o.attributes.bitangent=new $({componentDatatype:X.FLOAT,componentsPerAttribute:3,values:d})),n&&(o.attributes.extrudeDirection=new $({componentDatatype:X.FLOAT,componentsPerAttribute:3,values:k}))}if(t.extrude&&P(t.offsetAttribute)){let w=s.length/3,a=new Uint8Array(w);if(t.offsetAttribute===ut.TOP)m&&g||f?a=a.fill(1,0,w/2):m&&(a=a.fill(1));else{let H=t.offsetAttribute===ut.NONE?0:1;a=a.fill(H)}o.attributes.applyOffset=new $({componentDatatype:X.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}return o}var Ct=[];function Kt(t,e,o,n,s,i,r,f,m,g){let w={walls:[]},a;if(r||f){let _=F.createGeometryFromPositions(t,e,o,n,i,m,g),Z=_.attributes.position.values,y=_.indices,T,d;if(r&&f){let k=Z.concat(Z);T=k.length/3,d=ft.createTypedArray(T,y.length*2),d.set(y);let D=y.length,u=T/2;for(a=0;a<D;a+=3){let h=d[a]+u,p=d[a+1]+u,I=d[a+2]+u;d[a+D]=I,d[a+1+D]=p,d[a+2+D]=h}if(_.attributes.position.values=k,i&&m.normal){let h=_.attributes.normal.values;_.attributes.normal.values=new Float32Array(k.length),_.attributes.normal.values.set(h)}if(m.st&&P(o)){let h=_.attributes.st.values;_.attributes.st.values=new Float32Array(T*2),_.attributes.st.values=h.concat(h)}_.indices=d}else if(f){for(T=Z.length/3,d=ft.createTypedArray(T,y.length),a=0;a<y.length;a+=3)d[a]=y[a+2],d[a+1]=y[a+1],d[a+2]=y[a];_.indices=d}w.topAndBottom=new ct({geometry:_})}let H=s.outerRing,x=tt.fromPoints(H,t),M=x.projectPointsOntoPlane(H,Ct),C=it.computeWindingOrder2D(M);C===Pt.CLOCKWISE&&(H=H.slice().reverse());let R=F.computeWallGeometry(H,o,t,n,i,g);w.walls.push(new ct({geometry:R}));let B=s.holes;for(a=0;a<B.length;a++){let _=B[a];M=x.projectPointsOntoPlane(_,Ct),C=it.computeWindingOrder2D(M),C===Pt.COUNTER_CLOCKWISE&&(_=_.slice().reverse()),R=F.computeWallGeometry(_,o,t,n,i,g),w.walls.push(new ct({geometry:R}))}return w}function G(t){if(Y.typeOf.object("options",t),Y.typeOf.object("options.polygonHierarchy",t.polygonHierarchy),P(t.perPositionHeight)&&t.perPositionHeight&&P(t.height))throw new dt("Cannot use both options.perPositionHeight and options.height");if(P(t.arcType)&&t.arcType!==lt.GEODESIC&&t.arcType!==lt.RHUMB)throw new dt("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let e=t.polygonHierarchy,o=L(t.vertexFormat,q.DEFAULT),n=L(t.ellipsoid,V.default),s=L(t.granularity,l.RADIANS_PER_DEGREE),i=L(t.stRotation,0),r=t.textureCoordinates,f=L(t.perPositionHeight,!1),m=f&&P(t.extrudedHeight),g=L(t.height,0),w=L(t.extrudedHeight,g);if(!m){let a=Math.max(g,w);w=Math.min(g,w),g=a}this._vertexFormat=q.clone(o),this._ellipsoid=V.clone(n),this._granularity=s,this._stRotation=i,this._height=g,this._extrudedHeight=w,this._closeTop=L(t.closeTop,!0),this._closeBottom=L(t.closeBottom,!0),this._polygonHierarchy=e,this._perPositionHeight=f,this._perPositionHeightExtrude=m,this._shadowVolume=L(t.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=t.offsetAttribute,this._arcType=L(t.arcType,lt.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=r,this.packedLength=F.computeHierarchyPackedLength(e,c)+V.packedLength+q.packedLength+(r?F.computeHierarchyPackedLength(r,A):1)+12}G.fromPositions=function(t){t=L(t,L.EMPTY_OBJECT),Y.defined("options.positions",t.positions);let e={polygonHierarchy:{positions:t.positions},height:t.height,extrudedHeight:t.extrudedHeight,vertexFormat:t.vertexFormat,stRotation:t.stRotation,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,closeTop:t.closeTop,closeBottom:t.closeBottom,offsetAttribute:t.offsetAttribute,arcType:t.arcType,textureCoordinates:t.textureCoordinates};return new G(e)};G.pack=function(t,e,o){return Y.typeOf.object("value",t),Y.defined("array",e),o=L(o,0),o=F.packPolygonHierarchy(t._polygonHierarchy,e,o,c),V.pack(t._ellipsoid,e,o),o+=V.packedLength,q.pack(t._vertexFormat,e,o),o+=q.packedLength,e[o++]=t._height,e[o++]=t._extrudedHeight,e[o++]=t._granularity,e[o++]=t._stRotation,e[o++]=t._perPositionHeightExtrude?1:0,e[o++]=t._perPositionHeight?1:0,e[o++]=t._closeTop?1:0,e[o++]=t._closeBottom?1:0,e[o++]=t._shadowVolume?1:0,e[o++]=L(t._offsetAttribute,-1),e[o++]=t._arcType,P(t._textureCoordinates)?o=F.packPolygonHierarchy(t._textureCoordinates,e,o,A):e[o++]=-1,e[o++]=t.packedLength,e};var Jt=V.clone(V.UNIT_SPHERE),Xt=new q,$t={polygonHierarchy:{}};G.unpack=function(t,e,o){Y.defined("array",t),e=L(e,0);let n=F.unpackPolygonHierarchy(t,e,c);e=n.startingIndex,delete n.startingIndex;let s=V.unpack(t,e,Jt);e+=V.packedLength;let i=q.unpack(t,e,Xt);e+=q.packedLength;let r=t[e++],f=t[e++],m=t[e++],g=t[e++],w=t[e++]===1,a=t[e++]===1,H=t[e++]===1,x=t[e++]===1,M=t[e++]===1,C=t[e++],R=t[e++],B=t[e]===-1?void 0:F.unpackPolygonHierarchy(t,e,A);P(B)?(e=B.startingIndex,delete B.startingIndex):e++;let _=t[e++];return P(o)||(o=new G($t)),o._polygonHierarchy=n,o._ellipsoid=V.clone(s,o._ellipsoid),o._vertexFormat=q.clone(i,o._vertexFormat),o._height=r,o._extrudedHeight=f,o._granularity=m,o._stRotation=g,o._perPositionHeightExtrude=w,o._perPositionHeight=a,o._closeTop=H,o._closeBottom=x,o._shadowVolume=M,o._offsetAttribute=C===-1?void 0:C,o._arcType=R,o._textureCoordinates=B,o.packedLength=_,o};var te=new A,ee=new A,oe=new z;function Nt(t,e,o,n,s,i){let r=t.longitude,f=r>=0?r:r+l.TWO_PI;s.westOverIdl=Math.min(s.westOverIdl,f),s.eastOverIdl=Math.max(s.eastOverIdl,f),i.west=Math.min(i.west,r),i.east=Math.max(i.east,r);let m=t.getLatitude(o),g=m;if(i.south=Math.min(i.south,m),i.north=Math.max(i.north,m),n!==lt.RHUMB){let H=A.subtract(e.position,t.position,te),x=A.dot(e.position,H)/A.dot(H,H);if(x>0&&x<1){let M=A.add(e.position,A.multiplyByScalar(H,-x,H),ee),C=z.clone(e,oe);C.position=M;let R=C.getLatitude(o);i.south=Math.min(i.south,R),i.north=Math.max(i.north,R),Math.abs(m)>Math.abs(R)&&(g=R)}}let w=e.x*t.y-t.x*e.y,a=Math.sign(w);a!==0&&(a*=A.angleBetween(e.position,t.position)),g>=0&&(s.northAngle+=a),g<=0&&(s.southAngle+=a)}var Rt=new z,ne=new z,W={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};G.computeRectangleFromPositions=function(t,e,o,n){if(Y.defined("positions",t),P(n)||(n=new wt),t.length<3)return n;n.west=Number.POSITIVE_INFINITY,n.east=Number.NEGATIVE_INFINITY,n.south=Number.POSITIVE_INFINITY,n.north=Number.NEGATIVE_INFINITY,W.northAngle=0,W.southAngle=0,W.westOverIdl=Number.POSITIVE_INFINITY,W.eastOverIdl=Number.NEGATIVE_INFINITY;let s=t.length,i=z.fromCartesian(t[0],ne);for(let r=1;r<s;r++){let f=z.fromCartesian(t[r],Rt);Nt(f,i,e,o,W,n),i=z.clone(f,i)}return Nt(z.fromCartesian(t[0],Rt),i,e,o,W,n),n.east-n.west>W.eastOverIdl-W.westOverIdl&&(n.west=W.westOverIdl,n.east=W.eastOverIdl,n.east>l.PI&&(n.east=n.east-l.TWO_PI),n.west>l.PI&&(n.west=n.west-l.TWO_PI)),l.equalsEpsilon(Math.abs(W.northAngle),l.TWO_PI,l.EPSILON10)&&(n.north=l.PI_OVER_TWO,n.east=l.PI,n.west=-l.PI),l.equalsEpsilon(Math.abs(W.southAngle),l.TWO_PI,l.EPSILON10)&&(n.south=-l.PI_OVER_TWO,n.east=l.PI,n.west=-l.PI),n};var ie=new z;function re(t,e,o){return t.height>=l.PI||t.width>=l.PI?z.fromCartesian(e[0],ie).tangentPlane:tt.fromPoints(e,o)}var It=new nt;function se(t,e,o){return(n,s)=>{if(t.height>=l.PI||t.width>=l.PI){if(t.south<0&&t.north>0){P(s)||(s=[]);for(let r=0;r<n.length;++r){let f=o.cartesianToCartographic(n[r],It);s[r]=new A(f.longitude/l.PI,f.latitude/l.PI_OVER_TWO)}return s.length=n.length,s}return z.fromCartesianArray(n,s)}return tt.fromPoints(e,o).projectPointsOntoPlane(n,s)}}function ae(t,e,o){if(t.height>=l.PI||t.width>=l.PI)return(s,i)=>{if(t.south<0&&t.north>0){let r=o.cartesianToCartographic(s,It);return P(i)||(i=new A),i.x=r.longitude/l.PI,i.y=r.latitude/l.PI_OVER_TWO,i}return z.fromCartesian(s,i)};let n=tt.fromPoints(e,o);return(s,i)=>n.projectPointsOntoPlane(s,i)}function ce(t,e,o,n){return(s,i)=>!n&&(t.height>=l.PI_OVER_TWO||t.width>=2*l.PI_OVER_THREE)?F.splitPolygonsOnEquator(s,e,o,i):s}function le(t,e,o,n){if(e.height>=l.PI||e.width>=l.PI)return pt.fromRectangle(e,void 0,Ht);let s=t,i=tt.fromPoints(s,o);return F.computeBoundingRectangle(i.plane.normal,i.projectPointOntoPlane.bind(i),s,n,Ht)}G.createGeometry=function(t){let e=t._vertexFormat,o=t._ellipsoid,n=t._granularity,s=t._stRotation,i=t._polygonHierarchy,r=t._perPositionHeight,f=t._closeTop,m=t._closeBottom,g=t._arcType,w=t._textureCoordinates,a=P(w),H=i.positions;if(H.length<3)return;let x=t.rectangle,M=F.polygonsFromHierarchy(i,a,se(x,H,o),!r,o,ce(x,o,g,r)),C=M.hierarchy,R=M.polygons,B=function(N){return N},_=a?F.polygonsFromHierarchy(w,!0,B,!1,o).polygons:void 0;if(C.length===0)return;let Z=C[0].outerRing,y=le(Z,x,o,s),T=[],d=t._height,k=t._extrudedHeight,D=t._perPositionHeightExtrude||!l.equalsEpsilon(d,k,0,l.EPSILON2),u={perPositionHeight:r,vertexFormat:e,geometry:void 0,rotationAxis:re(x,Z,o).plane.normal,projectTo2d:ae(x,Z,o),boundingRectangle:y,ellipsoid:o,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:g},h;if(D)for(u.extrude=!0,u.top=f,u.bottom=m,u.shadowVolume=t._shadowVolume,u.offsetAttribute=t._offsetAttribute,h=0;h<R.length;h++){let N=Kt(o,R[h],a?_[h]:void 0,n,C[h],r,f,m,e,g),E;f&&m?(E=N.topAndBottom,u.geometry=F.scaleToGeodeticHeightExtruded(E.geometry,d,k,o,r)):f?(E=N.topAndBottom,E.geometry.attributes.position.values=it.scaleToGeodeticHeight(E.geometry.attributes.position.values,d,o,!r),u.geometry=E.geometry):m&&(E=N.topAndBottom,E.geometry.attributes.position.values=it.scaleToGeodeticHeight(E.geometry.attributes.position.values,k,o,!0),u.geometry=E.geometry),(f||m)&&(u.wall=!1,E.geometry=_t(u),T.push(E));let b=N.walls;u.wall=!0;for(let K=0;K<b.length;K++){let j=b[K];u.geometry=F.scaleToGeodeticHeightExtruded(j.geometry,d,k,o,r),j.geometry=_t(u),T.push(j)}}else for(h=0;h<R.length;h++){let N=new ct({geometry:F.createGeometryFromPositions(o,R[h],a?_[h]:void 0,n,r,e,g)});if(N.geometry.attributes.position.values=it.scaleToGeodeticHeight(N.geometry.attributes.position.values,d,o,!r),u.geometry=N.geometry,N.geometry=_t(u),P(t._offsetAttribute)){let E=N.geometry.attributes.position.values.length,b=t._offsetAttribute===ut.NONE?0:1,K=new Uint8Array(E/3).fill(b);N.geometry.attributes.applyOffset=new $({componentDatatype:X.UNSIGNED_BYTE,componentsPerAttribute:1,values:K})}T.push(N)}let p=At.combineInstances(T)[0];p.attributes.position.values=new Float64Array(p.attributes.position.values),p.indices=ft.createTypedArray(p.attributes.position.values.length/3,p.indices);let I=p.attributes,at=yt.fromVertices(I.position.values);return e.position||delete I.position,new gt({attributes:I,indices:p.indices,primitiveType:p.primitiveType,boundingSphere:at,offsetAttribute:t._offsetAttribute})};G.createShadowVolume=function(t,e,o){let n=t._granularity,s=t._ellipsoid,i=e(n,s),r=o(n,s);return new G({polygonHierarchy:t._polygonHierarchy,ellipsoid:s,stRotation:t._stRotation,granularity:n,perPositionHeight:!1,extrudedHeight:i,height:r,vertexFormat:q.POSITION_ONLY,shadowVolume:!0,arcType:t._arcType})};function he(t){let e=-t._stRotation;if(e===0)return[0,0,0,1,1,0];let o=t._ellipsoid,n=t._polygonHierarchy.positions,s=t.rectangle;return gt._textureCoordinateRotationPoints(n,e,o,s)}Object.defineProperties(G.prototype,{rectangle:{get:function(){if(!P(this._rectangle)){let t=this._polygonHierarchy.positions;this._rectangle=G.computeRectangleFromPositions(t,this._ellipsoid,this._arcType)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return P(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=he(this)),this._textureCoordinateRotationPoints}}});var Tt=G;function fe(t,e){return P(e)&&(t=Tt.unpack(t,e)),t._ellipsoid=V.clone(t._ellipsoid),Tt.createGeometry(t)}var eo=fe;export{eo as default};
import{a as pt}from"./chunk-LZCCFKBI.js";import{a as F}from"./chunk-GN3R6MXA.js";import{a as lt}from"./chunk-3B3UDCHP.js";import{a as ct}from"./chunk-S5MWIP3D.js";import{a as At}from"./chunk-OOGG7EHS.js";import"./chunk-EZRSLM27.js";import"./chunk-E5FOJ77O.js";import{a as ut}from"./chunk-55FFQILS.js";import{a as q}from"./chunk-32UDSAPU.js";import{a as tt}from"./chunk-TBSK33NR.js";import"./chunk-LSAUAD4X.js";import{a as Pt,b as it}from"./chunk-VDNLYVKB.js";import"./chunk-EX67AA2G.js";import"./chunk-V5KKODOM.js";import{a as bt,b as Ot}from"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{a as ft}from"./chunk-563CJZT3.js";import"./chunk-LH4TAMBV.js";import{c as gt,d as $}from"./chunk-WI5KIEME.js";import{d as yt}from"./chunk-ZPW6H6BB.js";import{f as ht,i as wt}from"./chunk-HMXXHGCW.js";import{a as X}from"./chunk-NFDMGE7Q.js";import{b as c,c as nt,d as A,e as V,f as U}from"./chunk-VDZXURWO.js";import{a as l}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as L}from"./chunk-5HWP5DW7.js";import{a as dt,b as Y}from"./chunk-3K67FZLU.js";import{e as P}from"./chunk-55TU6MJR.js";function O(t,e){this.position=t,P(this.position)||(this.position=new A),this.tangentPlane=e,P(this.tangentPlane)||(this.tangentPlane=O.NORTH_POLE_TANGENT_PLANE)}Object.defineProperties(O.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 t=A.magnitude(this.position),e=2*this.ellipsoid.maximumRadius;return this.tangentPlane.plane.normal.z*(l.PI_OVER_TWO-2*Math.atan2(t,e))}},longitude:{get:function(){let t=l.PI_OVER_TWO+Math.atan2(this.y,this.x);return t>Math.PI&&(t-=l.TWO_PI),t}}});var rt=new nt,Ft=new c;O.prototype.getLatitude=function(t){P(t)||(t=V.default),rt.latitude=this.conformalLatitude,rt.longitude=this.longitude,rt.height=0;let e=this.ellipsoid.cartographicToCartesian(rt,Ft);return t.cartesianToCartographic(e,rt),rt.latitude};var vt=new bt,St=new c,Vt=new c;O.fromCartesian=function(t,e){Y.defined("cartesian",t);let o=l.signNotZero(t.z),n=O.NORTH_POLE_TANGENT_PLANE,s=O.SOUTH_POLE;o<0&&(n=O.SOUTH_POLE_TANGENT_PLANE,s=O.NORTH_POLE);let i=vt;i.origin=n.ellipsoid.scaleToGeocentricSurface(t,i.origin),i.direction=c.subtract(i.origin,s,St),c.normalize(i.direction,i.direction);let r=Ot.rayPlane(i,n.plane,Vt),f=c.subtract(r,s,r),m=c.dot(n.xAxis,f),g=o*c.dot(n.yAxis,f);return P(e)?(e.position=new A(m,g),e.tangentPlane=n,e):new O(new A(m,g),n)};O.fromCartesianArray=function(t,e){Y.defined("cartesians",t);let o=t.length;P(e)?e.length=o:e=new Array(o);for(let n=0;n<o;n++)e[n]=O.fromCartesian(t[n],e[n]);return e};O.clone=function(t,e){if(P(t))return P(e)?(e.position=t.position,e.tangentPlane=t.tangentPlane,e):new O(t.position,t.tangentPlane)};O.HALF_UNIT_SPHERE=Object.freeze(new V(.5,.5,.5));O.NORTH_POLE=Object.freeze(new c(0,0,.5));O.SOUTH_POLE=Object.freeze(new c(0,0,-.5));O.NORTH_POLE_TANGENT_PLANE=Object.freeze(new tt(O.NORTH_POLE,O.HALF_UNIT_SPHERE));O.SOUTH_POLE_TANGENT_PLANE=Object.freeze(new tt(O.SOUTH_POLE,O.HALF_UNIT_SPHERE));var z=O;var Bt=new nt,Et=new nt;function Mt(t,e,o,n){let i=n.cartesianToCartographic(t,Bt).height,r=n.cartesianToCartographic(e,Et);r.height=i,n.cartographicToCartesian(r,e);let f=n.cartesianToCartographic(o,Et);f.height=i-100,n.cartographicToCartesian(f,o)}var Ht=new pt,jt=new c,kt=new c,zt=new c,Dt=new c,Ut=new c,Wt=new c,mt=new c,Q=new c,st=new c,Gt=new A,Yt=new A,qt=new c,xt=new ht,Qt=new U,Zt=new U;function _t(t){let e=t.vertexFormat,o=t.geometry,n=t.shadowVolume,s=o.attributes.position.values,i=P(o.attributes.st)?o.attributes.st.values:void 0,r=s.length,f=t.wall,m=t.top||f,g=t.bottom||f;if(e.st||e.normal||e.tangent||e.bitangent||n){let w=t.boundingRectangle,a=t.rotationAxis,H=t.projectTo2d,x=t.ellipsoid,M=t.stRotation,C=t.perPositionHeight,R=Gt;R.x=w.x,R.y=w.y;let B=e.st?new Float32Array(2*(r/3)):void 0,_=new Float32Array(r/3),Z=0,y;e.normal&&(C&&m&&!f?y=o.attributes.normal.values:y=new Float32Array(r));let T=e.tangent?new Float32Array(r):void 0,d=e.bitangent?new Float32Array(r):void 0,k=n?new Float32Array(r):void 0,D=0,u=0,h=kt,p=zt,I=Dt,at=!0,N=Qt,E=Zt;if(M!==0){let j=ht.fromAxisAngle(a,M,xt);N=U.fromQuaternion(j,N),j=ht.fromAxisAngle(a,-M,xt),E=U.fromQuaternion(j,E)}else N=U.clone(U.IDENTITY,N),E=U.clone(U.IDENTITY,E);let b=0,K=0;m&&g&&(b=r/2,K=r/3,r/=2);for(let j=0;j<r;j+=3){let J=c.fromArray(s,j,qt);if(e.st&&!P(i)){let v=U.multiplyByVector(N,J,jt);v=x.scaleToGeodeticSurface(v,v);let S=H([v],Yt)[0];A.subtract(S,R,S);let et=l.clamp(S.x/w.width,0,1),ot=l.clamp(S.y/w.height,0,1);g&&(B[D+K]=et,B[D+1+K]=ot),m&&(B[D]=et,B[D+1]=ot);let Lt=nt.fromCartesian(J);_[Z++]=Math.floor(Lt.height+1e-5),D+=2}if(e.normal||e.tangent||e.bitangent||n){let v=u+1,S=u+2;if(f){if(j+3<r){let et=c.fromArray(s,j+3,Ut);if(at){let ot=c.fromArray(s,j+r,Wt);C&&Mt(J,et,ot,x),c.subtract(et,J,et),c.subtract(ot,J,ot),h=c.normalize(c.cross(ot,et,h),h),at=!1}c.equalsEpsilon(et,J,l.EPSILON10)&&(at=!0)}(e.tangent||e.bitangent)&&(I=x.geodeticSurfaceNormal(J,I),e.tangent&&(p=c.normalize(c.cross(I,h,p),p)))}else h=x.geodeticSurfaceNormal(J,h),(e.tangent||e.bitangent)&&(C&&(mt=c.fromArray(y,u,mt),Q=c.cross(c.UNIT_Z,mt,Q),Q=c.normalize(U.multiplyByVector(E,Q,Q),Q),e.bitangent&&(st=c.normalize(c.cross(mt,Q,st),st))),p=c.cross(c.UNIT_Z,h,p),p=c.normalize(U.multiplyByVector(E,p,p),p),e.bitangent&&(I=c.normalize(c.cross(h,p,I),I)));e.normal&&(t.wall?(y[u+b]=h.x,y[v+b]=h.y,y[S+b]=h.z):g&&(y[u+b]=-h.x,y[v+b]=-h.y,y[S+b]=-h.z),(m&&!C||f)&&(y[u]=h.x,y[v]=h.y,y[S]=h.z)),n&&(f&&(h=x.geodeticSurfaceNormal(J,h)),k[u+b]=-h.x,k[v+b]=-h.y,k[S+b]=-h.z),e.tangent&&(t.wall?(T[u+b]=p.x,T[v+b]=p.y,T[S+b]=p.z):g&&(T[u+b]=-p.x,T[v+b]=-p.y,T[S+b]=-p.z),m&&(C?(T[u]=Q.x,T[v]=Q.y,T[S]=Q.z):(T[u]=p.x,T[v]=p.y,T[S]=p.z))),e.bitangent&&(g&&(d[u+b]=I.x,d[v+b]=I.y,d[S+b]=I.z),m&&(C?(d[u]=st.x,d[v]=st.y,d[S]=st.z):(d[u]=I.x,d[v]=I.y,d[S]=I.z))),u+=3}}e.st&&!P(i)&&(o.attributes.st=new $({componentDatatype:X.FLOAT,componentsPerAttribute:2,values:B}),o.attributes.height=new $({componentDatatype:X.FLOAT,componentsPerAttribute:1,values:_})),e.normal&&(o.attributes.normal=new $({componentDatatype:X.FLOAT,componentsPerAttribute:3,values:y})),e.tangent&&(o.attributes.tangent=new $({componentDatatype:X.FLOAT,componentsPerAttribute:3,values:T})),e.bitangent&&(o.attributes.bitangent=new $({componentDatatype:X.FLOAT,componentsPerAttribute:3,values:d})),n&&(o.attributes.extrudeDirection=new $({componentDatatype:X.FLOAT,componentsPerAttribute:3,values:k}))}if(t.extrude&&P(t.offsetAttribute)){let w=s.length/3,a=new Uint8Array(w);if(t.offsetAttribute===ut.TOP)m&&g||f?a=a.fill(1,0,w/2):m&&(a=a.fill(1));else{let H=t.offsetAttribute===ut.NONE?0:1;a=a.fill(H)}o.attributes.applyOffset=new $({componentDatatype:X.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}return o}var Ct=[];function Kt(t,e,o,n,s,i,r,f,m,g){let w={walls:[]},a;if(r||f){let _=F.createGeometryFromPositions(t,e,o,n,i,m,g),Z=_.attributes.position.values,y=_.indices,T,d;if(r&&f){let k=Z.concat(Z);T=k.length/3,d=ft.createTypedArray(T,y.length*2),d.set(y);let D=y.length,u=T/2;for(a=0;a<D;a+=3){let h=d[a]+u,p=d[a+1]+u,I=d[a+2]+u;d[a+D]=I,d[a+1+D]=p,d[a+2+D]=h}if(_.attributes.position.values=k,i&&m.normal){let h=_.attributes.normal.values;_.attributes.normal.values=new Float32Array(k.length),_.attributes.normal.values.set(h)}if(m.st&&P(o)){let h=_.attributes.st.values;_.attributes.st.values=new Float32Array(T*2),_.attributes.st.values=h.concat(h)}_.indices=d}else if(f){for(T=Z.length/3,d=ft.createTypedArray(T,y.length),a=0;a<y.length;a+=3)d[a]=y[a+2],d[a+1]=y[a+1],d[a+2]=y[a];_.indices=d}w.topAndBottom=new ct({geometry:_})}let H=s.outerRing,x=tt.fromPoints(H,t),M=x.projectPointsOntoPlane(H,Ct),C=it.computeWindingOrder2D(M);C===Pt.CLOCKWISE&&(H=H.slice().reverse());let R=F.computeWallGeometry(H,o,t,n,i,g);w.walls.push(new ct({geometry:R}));let B=s.holes;for(a=0;a<B.length;a++){let _=B[a];M=x.projectPointsOntoPlane(_,Ct),C=it.computeWindingOrder2D(M),C===Pt.COUNTER_CLOCKWISE&&(_=_.slice().reverse()),R=F.computeWallGeometry(_,o,t,n,i,g),w.walls.push(new ct({geometry:R}))}return w}function G(t){if(Y.typeOf.object("options",t),Y.typeOf.object("options.polygonHierarchy",t.polygonHierarchy),P(t.perPositionHeight)&&t.perPositionHeight&&P(t.height))throw new dt("Cannot use both options.perPositionHeight and options.height");if(P(t.arcType)&&t.arcType!==lt.GEODESIC&&t.arcType!==lt.RHUMB)throw new dt("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let e=t.polygonHierarchy,o=L(t.vertexFormat,q.DEFAULT),n=L(t.ellipsoid,V.default),s=L(t.granularity,l.RADIANS_PER_DEGREE),i=L(t.stRotation,0),r=t.textureCoordinates,f=L(t.perPositionHeight,!1),m=f&&P(t.extrudedHeight),g=L(t.height,0),w=L(t.extrudedHeight,g);if(!m){let a=Math.max(g,w);w=Math.min(g,w),g=a}this._vertexFormat=q.clone(o),this._ellipsoid=V.clone(n),this._granularity=s,this._stRotation=i,this._height=g,this._extrudedHeight=w,this._closeTop=L(t.closeTop,!0),this._closeBottom=L(t.closeBottom,!0),this._polygonHierarchy=e,this._perPositionHeight=f,this._perPositionHeightExtrude=m,this._shadowVolume=L(t.shadowVolume,!1),this._workerName="createPolygonGeometry",this._offsetAttribute=t.offsetAttribute,this._arcType=L(t.arcType,lt.GEODESIC),this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0,this._textureCoordinates=r,this.packedLength=F.computeHierarchyPackedLength(e,c)+V.packedLength+q.packedLength+(r?F.computeHierarchyPackedLength(r,A):1)+12}G.fromPositions=function(t){t=L(t,L.EMPTY_OBJECT),Y.defined("options.positions",t.positions);let e={polygonHierarchy:{positions:t.positions},height:t.height,extrudedHeight:t.extrudedHeight,vertexFormat:t.vertexFormat,stRotation:t.stRotation,ellipsoid:t.ellipsoid,granularity:t.granularity,perPositionHeight:t.perPositionHeight,closeTop:t.closeTop,closeBottom:t.closeBottom,offsetAttribute:t.offsetAttribute,arcType:t.arcType,textureCoordinates:t.textureCoordinates};return new G(e)};G.pack=function(t,e,o){return Y.typeOf.object("value",t),Y.defined("array",e),o=L(o,0),o=F.packPolygonHierarchy(t._polygonHierarchy,e,o,c),V.pack(t._ellipsoid,e,o),o+=V.packedLength,q.pack(t._vertexFormat,e,o),o+=q.packedLength,e[o++]=t._height,e[o++]=t._extrudedHeight,e[o++]=t._granularity,e[o++]=t._stRotation,e[o++]=t._perPositionHeightExtrude?1:0,e[o++]=t._perPositionHeight?1:0,e[o++]=t._closeTop?1:0,e[o++]=t._closeBottom?1:0,e[o++]=t._shadowVolume?1:0,e[o++]=L(t._offsetAttribute,-1),e[o++]=t._arcType,P(t._textureCoordinates)?o=F.packPolygonHierarchy(t._textureCoordinates,e,o,A):e[o++]=-1,e[o++]=t.packedLength,e};var Jt=V.clone(V.UNIT_SPHERE),Xt=new q,$t={polygonHierarchy:{}};G.unpack=function(t,e,o){Y.defined("array",t),e=L(e,0);let n=F.unpackPolygonHierarchy(t,e,c);e=n.startingIndex,delete n.startingIndex;let s=V.unpack(t,e,Jt);e+=V.packedLength;let i=q.unpack(t,e,Xt);e+=q.packedLength;let r=t[e++],f=t[e++],m=t[e++],g=t[e++],w=t[e++]===1,a=t[e++]===1,H=t[e++]===1,x=t[e++]===1,M=t[e++]===1,C=t[e++],R=t[e++],B=t[e]===-1?void 0:F.unpackPolygonHierarchy(t,e,A);P(B)?(e=B.startingIndex,delete B.startingIndex):e++;let _=t[e++];return P(o)||(o=new G($t)),o._polygonHierarchy=n,o._ellipsoid=V.clone(s,o._ellipsoid),o._vertexFormat=q.clone(i,o._vertexFormat),o._height=r,o._extrudedHeight=f,o._granularity=m,o._stRotation=g,o._perPositionHeightExtrude=w,o._perPositionHeight=a,o._closeTop=H,o._closeBottom=x,o._shadowVolume=M,o._offsetAttribute=C===-1?void 0:C,o._arcType=R,o._textureCoordinates=B,o.packedLength=_,o};var te=new A,ee=new A,oe=new z;function Nt(t,e,o,n,s,i){let r=t.longitude,f=r>=0?r:r+l.TWO_PI;s.westOverIdl=Math.min(s.westOverIdl,f),s.eastOverIdl=Math.max(s.eastOverIdl,f),i.west=Math.min(i.west,r),i.east=Math.max(i.east,r);let m=t.getLatitude(o),g=m;if(i.south=Math.min(i.south,m),i.north=Math.max(i.north,m),n!==lt.RHUMB){let H=A.subtract(e.position,t.position,te),x=A.dot(e.position,H)/A.dot(H,H);if(x>0&&x<1){let M=A.add(e.position,A.multiplyByScalar(H,-x,H),ee),C=z.clone(e,oe);C.position=M;let R=C.getLatitude(o);i.south=Math.min(i.south,R),i.north=Math.max(i.north,R),Math.abs(m)>Math.abs(R)&&(g=R)}}let w=e.x*t.y-t.x*e.y,a=Math.sign(w);a!==0&&(a*=A.angleBetween(e.position,t.position)),g>=0&&(s.northAngle+=a),g<=0&&(s.southAngle+=a)}var Rt=new z,ne=new z,W={northAngle:0,southAngle:0,westOverIdl:0,eastOverIdl:0};G.computeRectangleFromPositions=function(t,e,o,n){if(Y.defined("positions",t),P(n)||(n=new wt),t.length<3)return n;n.west=Number.POSITIVE_INFINITY,n.east=Number.NEGATIVE_INFINITY,n.south=Number.POSITIVE_INFINITY,n.north=Number.NEGATIVE_INFINITY,W.northAngle=0,W.southAngle=0,W.westOverIdl=Number.POSITIVE_INFINITY,W.eastOverIdl=Number.NEGATIVE_INFINITY;let s=t.length,i=z.fromCartesian(t[0],ne);for(let r=1;r<s;r++){let f=z.fromCartesian(t[r],Rt);Nt(f,i,e,o,W,n),i=z.clone(f,i)}return Nt(z.fromCartesian(t[0],Rt),i,e,o,W,n),n.east-n.west>W.eastOverIdl-W.westOverIdl&&(n.west=W.westOverIdl,n.east=W.eastOverIdl,n.east>l.PI&&(n.east=n.east-l.TWO_PI),n.west>l.PI&&(n.west=n.west-l.TWO_PI)),l.equalsEpsilon(Math.abs(W.northAngle),l.TWO_PI,l.EPSILON10)&&(n.north=l.PI_OVER_TWO,n.east=l.PI,n.west=-l.PI),l.equalsEpsilon(Math.abs(W.southAngle),l.TWO_PI,l.EPSILON10)&&(n.south=-l.PI_OVER_TWO,n.east=l.PI,n.west=-l.PI),n};var ie=new z;function re(t,e,o){return t.height>=l.PI||t.width>=l.PI?z.fromCartesian(e[0],ie).tangentPlane:tt.fromPoints(e,o)}var It=new nt;function se(t,e,o){return(n,s)=>{if(t.height>=l.PI||t.width>=l.PI){if(t.south<0&&t.north>0){P(s)||(s=[]);for(let r=0;r<n.length;++r){let f=o.cartesianToCartographic(n[r],It);s[r]=new A(f.longitude/l.PI,f.latitude/l.PI_OVER_TWO)}return s.length=n.length,s}return z.fromCartesianArray(n,s)}return tt.fromPoints(e,o).projectPointsOntoPlane(n,s)}}function ae(t,e,o){if(t.height>=l.PI||t.width>=l.PI)return(s,i)=>{if(t.south<0&&t.north>0){let r=o.cartesianToCartographic(s,It);return P(i)||(i=new A),i.x=r.longitude/l.PI,i.y=r.latitude/l.PI_OVER_TWO,i}return z.fromCartesian(s,i)};let n=tt.fromPoints(e,o);return(s,i)=>n.projectPointsOntoPlane(s,i)}function ce(t,e,o,n){return(s,i)=>!n&&(t.height>=l.PI_OVER_TWO||t.width>=2*l.PI_OVER_THREE)?F.splitPolygonsOnEquator(s,e,o,i):s}function le(t,e,o,n){if(e.height>=l.PI||e.width>=l.PI)return pt.fromRectangle(e,void 0,Ht);let s=t,i=tt.fromPoints(s,o);return F.computeBoundingRectangle(i.plane.normal,i.projectPointOntoPlane.bind(i),s,n,Ht)}G.createGeometry=function(t){let e=t._vertexFormat,o=t._ellipsoid,n=t._granularity,s=t._stRotation,i=t._polygonHierarchy,r=t._perPositionHeight,f=t._closeTop,m=t._closeBottom,g=t._arcType,w=t._textureCoordinates,a=P(w),H=i.positions;if(H.length<3)return;let x=t.rectangle,M=F.polygonsFromHierarchy(i,a,se(x,H,o),!r,o,ce(x,o,g,r)),C=M.hierarchy,R=M.polygons,B=function(N){return N},_=a?F.polygonsFromHierarchy(w,!0,B,!1,o).polygons:void 0;if(C.length===0)return;let Z=C[0].outerRing,y=le(Z,x,o,s),T=[],d=t._height,k=t._extrudedHeight,D=t._perPositionHeightExtrude||!l.equalsEpsilon(d,k,0,l.EPSILON2),u={perPositionHeight:r,vertexFormat:e,geometry:void 0,rotationAxis:re(x,Z,o).plane.normal,projectTo2d:ae(x,Z,o),boundingRectangle:y,ellipsoid:o,stRotation:s,textureCoordinates:void 0,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:g},h;if(D)for(u.extrude=!0,u.top=f,u.bottom=m,u.shadowVolume=t._shadowVolume,u.offsetAttribute=t._offsetAttribute,h=0;h<R.length;h++){let N=Kt(o,R[h],a?_[h]:void 0,n,C[h],r,f,m,e,g),E;f&&m?(E=N.topAndBottom,u.geometry=F.scaleToGeodeticHeightExtruded(E.geometry,d,k,o,r)):f?(E=N.topAndBottom,E.geometry.attributes.position.values=it.scaleToGeodeticHeight(E.geometry.attributes.position.values,d,o,!r),u.geometry=E.geometry):m&&(E=N.topAndBottom,E.geometry.attributes.position.values=it.scaleToGeodeticHeight(E.geometry.attributes.position.values,k,o,!0),u.geometry=E.geometry),(f||m)&&(u.wall=!1,E.geometry=_t(u),T.push(E));let b=N.walls;u.wall=!0;for(let K=0;K<b.length;K++){let j=b[K];u.geometry=F.scaleToGeodeticHeightExtruded(j.geometry,d,k,o,r),j.geometry=_t(u),T.push(j)}}else for(h=0;h<R.length;h++){let N=new ct({geometry:F.createGeometryFromPositions(o,R[h],a?_[h]:void 0,n,r,e,g)});if(N.geometry.attributes.position.values=it.scaleToGeodeticHeight(N.geometry.attributes.position.values,d,o,!r),u.geometry=N.geometry,N.geometry=_t(u),P(t._offsetAttribute)){let E=N.geometry.attributes.position.values.length,b=t._offsetAttribute===ut.NONE?0:1,K=new Uint8Array(E/3).fill(b);N.geometry.attributes.applyOffset=new $({componentDatatype:X.UNSIGNED_BYTE,componentsPerAttribute:1,values:K})}T.push(N)}let p=At.combineInstances(T)[0];p.attributes.position.values=new Float64Array(p.attributes.position.values),p.indices=ft.createTypedArray(p.attributes.position.values.length/3,p.indices);let I=p.attributes,at=yt.fromVertices(I.position.values);return e.position||delete I.position,new gt({attributes:I,indices:p.indices,primitiveType:p.primitiveType,boundingSphere:at,offsetAttribute:t._offsetAttribute})};G.createShadowVolume=function(t,e,o){let n=t._granularity,s=t._ellipsoid,i=e(n,s),r=o(n,s);return new G({polygonHierarchy:t._polygonHierarchy,ellipsoid:s,stRotation:t._stRotation,granularity:n,perPositionHeight:!1,extrudedHeight:i,height:r,vertexFormat:q.POSITION_ONLY,shadowVolume:!0,arcType:t._arcType})};function he(t){let e=-t._stRotation;if(e===0)return[0,0,0,1,1,0];let o=t._ellipsoid,n=t._polygonHierarchy.positions,s=t.rectangle;return gt._textureCoordinateRotationPoints(n,e,o,s)}Object.defineProperties(G.prototype,{rectangle:{get:function(){if(!P(this._rectangle)){let t=this._polygonHierarchy.positions;this._rectangle=G.computeRectangleFromPositions(t,this._ellipsoid,this._arcType)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return P(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=he(this)),this._textureCoordinateRotationPoints}}});var Tt=G;function fe(t,e){return P(e)&&(t=Tt.unpack(t,e)),t._ellipsoid=V.clone(t._ellipsoid),Tt.createGeometry(t)}var eo=fe;export{eo as default};
public/CimSDK/Workers/createPolygonOutlineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a}from"./chunk-YBGQTN3R.js";import{a as b}from"./chunk-3B3UDCHP.js";import{a as F}from"./chunk-KBTPUVX4.js";import{a as V}from"./chunk-NLFLNVCF.js";import"./chunk-HV57XH4K.js";import"./chunk-X2QIAW2L.js";import{a as D}from"./chunk-55FFQILS.js";import{a as W}from"./chunk-P5SE5XVC.js";import"./chunk-ZPRLAWII.js";import{a as j,b as k}from"./chunk-IRIBHMN7.js";import"./chunk-A6RR2BLJ.js";import"./chunk-EPQZOCRV.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{a as M}from"./chunk-ZDNS2GYV.js";import{a as G}from"./chunk-LH4TAMBV.js";import{b as B,c as C,d as v}from"./chunk-TNSV6TPX.js";import{d as z}from"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import{a as w}from"./chunk-3LWOQSP3.js";import{b as S,e as y}from"./chunk-7DK7KB7Q.js";import{a as T}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as P}from"./chunk-5HWP5DW7.js";import{a as U,b as A}from"./chunk-INT7THOB.js";import{e as O}from"./chunk-PPCZYYBW.js";var Y=[],R=[];function K(e,t,r,H,l){let p=W.fromPoints(t,e).projectPointsOntoPlane(t,Y);k.computeWindingOrder2D(p)===j.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let n,i,o=t.length,c=0;if(H)for(n=new Float64Array(o*2*3),i=0;i<o;i++){let u=t[i],h=t[(i+1)%o];n[c++]=u.x,n[c++]=u.y,n[c++]=u.z,n[c++]=h.x,n[c++]=h.y,n[c++]=h.z}else{let u=0;if(l===b.GEODESIC)for(i=0;i<o;i++)u+=a.subdivideLineCount(t[i],t[(i+1)%o],r);else if(l===b.RHUMB)for(i=0;i<o;i++)u+=a.subdivideRhumbLineCount(e,t[i],t[(i+1)%o],r);for(n=new Float64Array(u*3),i=0;i<o;i++){let h;l===b.GEODESIC?h=a.subdivideLine(t[i],t[(i+1)%o],r,R):l===b.RHUMB&&(h=a.subdivideRhumbLine(e,t[i],t[(i+1)%o],r,R));let g=h.length;for(let d=0;d<g;++d)n[c++]=h[d]}}o=n.length/3;let f=o*2,m=M.createTypedArray(o,f);for(c=0,i=0;i<o-1;i++)m[c++]=i,m[c++]=i+1;return m[c++]=o-1,m[c++]=0,new F({geometry:new C({attributes:new G({position:new v({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:m,primitiveType:B.LINES})})}function q(e,t,r,H,l){let p=W.fromPoints(t,e).projectPointsOntoPlane(t,Y);k.computeWindingOrder2D(p)===j.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let n,i,o=t.length,c=new Array(o),f=0;if(H)for(n=new Float64Array(o*2*3*2),i=0;i<o;++i){c[i]=f/3;let g=t[i],d=t[(i+1)%o];n[f++]=g.x,n[f++]=g.y,n[f++]=g.z,n[f++]=d.x,n[f++]=d.y,n[f++]=d.z}else{let g=0;if(l===b.GEODESIC)for(i=0;i<o;i++)g+=a.subdivideLineCount(t[i],t[(i+1)%o],r);else if(l===b.RHUMB)for(i=0;i<o;i++)g+=a.subdivideRhumbLineCount(e,t[i],t[(i+1)%o],r);for(n=new Float64Array(g*3*2),i=0;i<o;++i){c[i]=f/3;let d;l===b.GEODESIC?d=a.subdivideLine(t[i],t[(i+1)%o],r,R):l===b.RHUMB&&(d=a.subdivideRhumbLine(e,t[i],t[(i+1)%o],r,R));let E=d.length;for(let N=0;N<E;++N)n[f++]=d[N]}}o=n.length/(3*2);let m=c.length,u=(o*2+m)*2,h=M.createTypedArray(o+m,u);for(f=0,i=0;i<o;++i)h[f++]=i,h[f++]=(i+1)%o,h[f++]=i+o,h[f++]=(i+1)%o+o;for(i=0;i<m;i++){let g=c[i];h[f++]=g,h[f++]=g+o}return new F({geometry:new C({attributes:new G({position:new v({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:h,primitiveType:B.LINES})})}function L(e){if(A.typeOf.object("options",e),A.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&O(e.height))throw new U("Cannot use both options.perPositionHeight and options.height");if(O(e.arcType)&&e.arcType!==b.GEODESIC&&e.arcType!==b.RHUMB)throw new U("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let t=e.polygonHierarchy,r=P(e.ellipsoid,y.default),H=P(e.granularity,T.RADIANS_PER_DEGREE),l=P(e.perPositionHeight,!1),_=l&&O(e.extrudedHeight),p=P(e.arcType,b.GEODESIC),s=P(e.height,0),n=P(e.extrudedHeight,s);if(!_){let i=Math.max(s,n);n=Math.min(s,n),s=i}this._ellipsoid=y.clone(r),this._granularity=H,this._height=s,this._extrudedHeight=n,this._arcType=p,this._polygonHierarchy=t,this._perPositionHeight=l,this._perPositionHeightExtrude=_,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=a.computeHierarchyPackedLength(t,S)+y.packedLength+8}L.pack=function(e,t,r){return A.typeOf.object("value",e),A.defined("array",t),r=P(r,0),r=a.packPolygonHierarchy(e._polygonHierarchy,t,r,S),y.pack(e._ellipsoid,t,r),r+=y.packedLength,t[r++]=e._height,t[r++]=e._extrudedHeight,t[r++]=e._granularity,t[r++]=e._perPositionHeightExtrude?1:0,t[r++]=e._perPositionHeight?1:0,t[r++]=e._arcType,t[r++]=P(e._offsetAttribute,-1),t[r]=e.packedLength,t};var J=y.clone(y.UNIT_SPHERE),Q={polygonHierarchy:{}};L.unpack=function(e,t,r){A.defined("array",e),t=P(t,0);let H=a.unpackPolygonHierarchy(e,t,S);t=H.startingIndex,delete H.startingIndex;let l=y.unpack(e,t,J);t+=y.packedLength;let _=e[t++],p=e[t++],s=e[t++],n=e[t++]===1,i=e[t++]===1,o=e[t++],c=e[t++],f=e[t];return O(r)||(r=new L(Q)),r._polygonHierarchy=H,r._ellipsoid=y.clone(l,r._ellipsoid),r._height=_,r._extrudedHeight=p,r._granularity=s,r._perPositionHeight=i,r._perPositionHeightExtrude=n,r._arcType=o,r._offsetAttribute=c===-1?void 0:c,r.packedLength=f,r};L.fromPositions=function(e){e=P(e,P.EMPTY_OBJECT),A.defined("options.positions",e.positions);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 L(t)};L.createGeometry=function(e){let t=e._ellipsoid,r=e._granularity,H=e._polygonHierarchy,l=e._perPositionHeight,_=e._arcType,p=a.polygonOutlinesFromHierarchy(H,!l,t);if(p.length===0)return;let s,n=[],i=T.chordLength(r,t.maximumRadius),o=e._height,c=e._extrudedHeight,f=e._perPositionHeightExtrude||!T.equalsEpsilon(o,c,0,T.EPSILON2),m,u;if(f)for(u=0;u<p.length;u++){if(s=q(t,p[u],i,l,_),s.geometry=a.scaleToGeodeticHeightExtruded(s.geometry,o,c,t,l),O(e._offsetAttribute)){let d=s.geometry.attributes.position.values.length/3,E=new Uint8Array(d);e._offsetAttribute===D.TOP?E=E.fill(1,0,d/2):(m=e._offsetAttribute===D.NONE?0:1,E=E.fill(m)),s.geometry.attributes.applyOffset=new v({componentDatatype:w.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}n.push(s)}else for(u=0;u<p.length;u++){if(s=K(t,p[u],i,l,_),s.geometry.attributes.position.values=k.scaleToGeodeticHeight(s.geometry.attributes.position.values,o,t,!l),O(e._offsetAttribute)){let d=s.geometry.attributes.position.values.length;m=e._offsetAttribute===D.NONE?0:1;let E=new Uint8Array(d/3).fill(m);s.geometry.attributes.applyOffset=new v({componentDatatype:w.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}n.push(s)}let h=V.combineInstances(n)[0],g=z.fromVertices(h.attributes.position.values);return new C({attributes:h.attributes,indices:h.indices,primitiveType:h.primitiveType,boundingSphere:g,offsetAttribute:e._offsetAttribute})};var x=L;function X(e,t){return O(t)&&(e=x.unpack(e,t)),e._ellipsoid=y.clone(e._ellipsoid),x.createGeometry(e)}var Oe=X;export{Oe as default};
import{a}from"./chunk-GN3R6MXA.js";import{a as b}from"./chunk-3B3UDCHP.js";import{a as F}from"./chunk-S5MWIP3D.js";import{a as V}from"./chunk-OOGG7EHS.js";import"./chunk-EZRSLM27.js";import"./chunk-E5FOJ77O.js";import{a as D}from"./chunk-55FFQILS.js";import{a as W}from"./chunk-TBSK33NR.js";import"./chunk-LSAUAD4X.js";import{a as j,b as k}from"./chunk-VDNLYVKB.js";import"./chunk-EX67AA2G.js";import"./chunk-V5KKODOM.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{a as M}from"./chunk-563CJZT3.js";import{a as G}from"./chunk-LH4TAMBV.js";import{b as B,c as C,d as v}from"./chunk-WI5KIEME.js";import{d as z}from"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import{a as w}from"./chunk-NFDMGE7Q.js";import{b as S,e as y}from"./chunk-VDZXURWO.js";import{a as T}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as P}from"./chunk-5HWP5DW7.js";import{a as U,b as A}from"./chunk-3K67FZLU.js";import{e as O}from"./chunk-55TU6MJR.js";var Y=[],R=[];function K(e,t,r,H,l){let p=W.fromPoints(t,e).projectPointsOntoPlane(t,Y);k.computeWindingOrder2D(p)===j.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let n,i,o=t.length,c=0;if(H)for(n=new Float64Array(o*2*3),i=0;i<o;i++){let u=t[i],h=t[(i+1)%o];n[c++]=u.x,n[c++]=u.y,n[c++]=u.z,n[c++]=h.x,n[c++]=h.y,n[c++]=h.z}else{let u=0;if(l===b.GEODESIC)for(i=0;i<o;i++)u+=a.subdivideLineCount(t[i],t[(i+1)%o],r);else if(l===b.RHUMB)for(i=0;i<o;i++)u+=a.subdivideRhumbLineCount(e,t[i],t[(i+1)%o],r);for(n=new Float64Array(u*3),i=0;i<o;i++){let h;l===b.GEODESIC?h=a.subdivideLine(t[i],t[(i+1)%o],r,R):l===b.RHUMB&&(h=a.subdivideRhumbLine(e,t[i],t[(i+1)%o],r,R));let g=h.length;for(let d=0;d<g;++d)n[c++]=h[d]}}o=n.length/3;let f=o*2,m=M.createTypedArray(o,f);for(c=0,i=0;i<o-1;i++)m[c++]=i,m[c++]=i+1;return m[c++]=o-1,m[c++]=0,new F({geometry:new C({attributes:new G({position:new v({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:m,primitiveType:B.LINES})})}function q(e,t,r,H,l){let p=W.fromPoints(t,e).projectPointsOntoPlane(t,Y);k.computeWindingOrder2D(p)===j.CLOCKWISE&&(p.reverse(),t=t.slice().reverse());let n,i,o=t.length,c=new Array(o),f=0;if(H)for(n=new Float64Array(o*2*3*2),i=0;i<o;++i){c[i]=f/3;let g=t[i],d=t[(i+1)%o];n[f++]=g.x,n[f++]=g.y,n[f++]=g.z,n[f++]=d.x,n[f++]=d.y,n[f++]=d.z}else{let g=0;if(l===b.GEODESIC)for(i=0;i<o;i++)g+=a.subdivideLineCount(t[i],t[(i+1)%o],r);else if(l===b.RHUMB)for(i=0;i<o;i++)g+=a.subdivideRhumbLineCount(e,t[i],t[(i+1)%o],r);for(n=new Float64Array(g*3*2),i=0;i<o;++i){c[i]=f/3;let d;l===b.GEODESIC?d=a.subdivideLine(t[i],t[(i+1)%o],r,R):l===b.RHUMB&&(d=a.subdivideRhumbLine(e,t[i],t[(i+1)%o],r,R));let E=d.length;for(let N=0;N<E;++N)n[f++]=d[N]}}o=n.length/(3*2);let m=c.length,u=(o*2+m)*2,h=M.createTypedArray(o+m,u);for(f=0,i=0;i<o;++i)h[f++]=i,h[f++]=(i+1)%o,h[f++]=i+o,h[f++]=(i+1)%o+o;for(i=0;i<m;i++){let g=c[i];h[f++]=g,h[f++]=g+o}return new F({geometry:new C({attributes:new G({position:new v({componentDatatype:w.DOUBLE,componentsPerAttribute:3,values:n})}),indices:h,primitiveType:B.LINES})})}function L(e){if(A.typeOf.object("options",e),A.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&O(e.height))throw new U("Cannot use both options.perPositionHeight and options.height");if(O(e.arcType)&&e.arcType!==b.GEODESIC&&e.arcType!==b.RHUMB)throw new U("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");let t=e.polygonHierarchy,r=P(e.ellipsoid,y.default),H=P(e.granularity,T.RADIANS_PER_DEGREE),l=P(e.perPositionHeight,!1),_=l&&O(e.extrudedHeight),p=P(e.arcType,b.GEODESIC),s=P(e.height,0),n=P(e.extrudedHeight,s);if(!_){let i=Math.max(s,n);n=Math.min(s,n),s=i}this._ellipsoid=y.clone(r),this._granularity=H,this._height=s,this._extrudedHeight=n,this._arcType=p,this._polygonHierarchy=t,this._perPositionHeight=l,this._perPositionHeightExtrude=_,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=a.computeHierarchyPackedLength(t,S)+y.packedLength+8}L.pack=function(e,t,r){return A.typeOf.object("value",e),A.defined("array",t),r=P(r,0),r=a.packPolygonHierarchy(e._polygonHierarchy,t,r,S),y.pack(e._ellipsoid,t,r),r+=y.packedLength,t[r++]=e._height,t[r++]=e._extrudedHeight,t[r++]=e._granularity,t[r++]=e._perPositionHeightExtrude?1:0,t[r++]=e._perPositionHeight?1:0,t[r++]=e._arcType,t[r++]=P(e._offsetAttribute,-1),t[r]=e.packedLength,t};var J=y.clone(y.UNIT_SPHERE),Q={polygonHierarchy:{}};L.unpack=function(e,t,r){A.defined("array",e),t=P(t,0);let H=a.unpackPolygonHierarchy(e,t,S);t=H.startingIndex,delete H.startingIndex;let l=y.unpack(e,t,J);t+=y.packedLength;let _=e[t++],p=e[t++],s=e[t++],n=e[t++]===1,i=e[t++]===1,o=e[t++],c=e[t++],f=e[t];return O(r)||(r=new L(Q)),r._polygonHierarchy=H,r._ellipsoid=y.clone(l,r._ellipsoid),r._height=_,r._extrudedHeight=p,r._granularity=s,r._perPositionHeight=i,r._perPositionHeightExtrude=n,r._arcType=o,r._offsetAttribute=c===-1?void 0:c,r.packedLength=f,r};L.fromPositions=function(e){e=P(e,P.EMPTY_OBJECT),A.defined("options.positions",e.positions);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 L(t)};L.createGeometry=function(e){let t=e._ellipsoid,r=e._granularity,H=e._polygonHierarchy,l=e._perPositionHeight,_=e._arcType,p=a.polygonOutlinesFromHierarchy(H,!l,t);if(p.length===0)return;let s,n=[],i=T.chordLength(r,t.maximumRadius),o=e._height,c=e._extrudedHeight,f=e._perPositionHeightExtrude||!T.equalsEpsilon(o,c,0,T.EPSILON2),m,u;if(f)for(u=0;u<p.length;u++){if(s=q(t,p[u],i,l,_),s.geometry=a.scaleToGeodeticHeightExtruded(s.geometry,o,c,t,l),O(e._offsetAttribute)){let d=s.geometry.attributes.position.values.length/3,E=new Uint8Array(d);e._offsetAttribute===D.TOP?E=E.fill(1,0,d/2):(m=e._offsetAttribute===D.NONE?0:1,E=E.fill(m)),s.geometry.attributes.applyOffset=new v({componentDatatype:w.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}n.push(s)}else for(u=0;u<p.length;u++){if(s=K(t,p[u],i,l,_),s.geometry.attributes.position.values=k.scaleToGeodeticHeight(s.geometry.attributes.position.values,o,t,!l),O(e._offsetAttribute)){let d=s.geometry.attributes.position.values.length;m=e._offsetAttribute===D.NONE?0:1;let E=new Uint8Array(d/3).fill(m);s.geometry.attributes.applyOffset=new v({componentDatatype:w.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}n.push(s)}let h=V.combineInstances(n)[0],g=z.fromVertices(h.attributes.position.values);return new C({attributes:h.attributes,indices:h.indices,primitiveType:h.primitiveType,boundingSphere:g,offsetAttribute:e._offsetAttribute})};var x=L;function X(e,t){return O(t)&&(e=x.unpack(e,t)),e._ellipsoid=y.clone(e._ellipsoid),x.createGeometry(e)}var Oe=X;export{Oe as default};
public/CimSDK/Workers/createPolylineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as m}from"./chunk-6PVEYJU3.js";import{a as N}from"./chunk-3B3UDCHP.js";import{a as U}from"./chunk-WGRWYGAM.js";import"./chunk-5B7R4ODL.js";import{a as k}from"./chunk-WF3WCQMH.js";import{a as le}from"./chunk-A6RR2BLJ.js";import"./chunk-EPQZOCRV.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{a as se}from"./chunk-ZDNS2GYV.js";import{a as ce}from"./chunk-LH4TAMBV.js";import{a as ne,b as re,c as ie,d as O}from"./chunk-TNSV6TPX.js";import{d as oe}from"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import{a as x}from"./chunk-3LWOQSP3.js";import{b as p,e as u}from"./chunk-7DK7KB7Q.js";import{a as J}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as A}from"./chunk-5HWP5DW7.js";import{a as V}from"./chunk-INT7THOB.js";import{e as h}from"./chunk-PPCZYYBW.js";var me=[];function Ae(e,o,t,n,c){let s=me;s.length=c;let l,E=t.red,a=t.green,r=t.blue,w=t.alpha,b=n.red,i=n.green,f=n.blue,L=n.alpha;if(m.equals(t,n)){for(l=0;l<c;l++)s[l]=m.clone(t);return s}let M=(b-E)/c,z=(i-a)/c,H=(f-r)/c,B=(L-w)/c;for(l=0;l<c;l++)s[l]=new m(E+l*M,a+l*z,r+l*H,w+l*B);return s}function G(e){e=A(e,A.EMPTY_OBJECT);let o=e.positions,t=e.colors,n=A(e.width,1),c=A(e.colorsPerVertex,!1);if(!h(o)||o.length<2)throw new V("At least two positions are required.");if(typeof n!="number")throw new V("width must be a number");if(h(t)&&(c&&t.length<o.length||!c&&t.length<o.length-1))throw new V("colors has an invalid length.");this._positions=o,this._colors=t,this._width=n,this._colorsPerVertex=c,this._vertexFormat=k.clone(A(e.vertexFormat,k.DEFAULT)),this._arcType=A(e.arcType,N.GEODESIC),this._granularity=A(e.granularity,J.RADIANS_PER_DEGREE),this._ellipsoid=u.clone(A(e.ellipsoid,u.default)),this._workerName="createPolylineGeometry";let s=1+o.length*p.packedLength;s+=h(t)?1+t.length*m.packedLength:1,this.packedLength=s+u.packedLength+k.packedLength+4}G.pack=function(e,o,t){if(!h(e))throw new V("value is required");if(!h(o))throw new V("array is required");t=A(t,0);let n,c=e._positions,s=c.length;for(o[t++]=s,n=0;n<s;++n,t+=p.packedLength)p.pack(c[n],o,t);let l=e._colors;for(s=h(l)?l.length:0,o[t++]=s,n=0;n<s;++n,t+=m.packedLength)m.pack(l[n],o,t);return u.pack(e._ellipsoid,o,t),t+=u.packedLength,k.pack(e._vertexFormat,o,t),t+=k.packedLength,o[t++]=e._width,o[t++]=e._colorsPerVertex?1:0,o[t++]=e._arcType,o[t]=e._granularity,o};var de=u.clone(u.UNIT_SPHERE),ue=new k,S={positions:void 0,colors:void 0,ellipsoid:de,vertexFormat:ue,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};G.unpack=function(e,o,t){if(!h(e))throw new V("array is required");o=A(o,0);let n,c=e[o++],s=new Array(c);for(n=0;n<c;++n,o+=p.packedLength)s[n]=p.unpack(e,o);c=e[o++];let l=c>0?new Array(c):void 0;for(n=0;n<c;++n,o+=m.packedLength)l[n]=m.unpack(e,o);let E=u.unpack(e,o,de);o+=u.packedLength;let a=k.unpack(e,o,ue);o+=k.packedLength;let r=e[o++],w=e[o++]===1,b=e[o++],i=e[o];return h(t)?(t._positions=s,t._colors=l,t._ellipsoid=u.clone(E,t._ellipsoid),t._vertexFormat=k.clone(a,t._vertexFormat),t._width=r,t._colorsPerVertex=w,t._arcType=b,t._granularity=i,t):(S.positions=s,S.colors=l,S.width=r,S.colorsPerVertex=w,S.arcType=b,S.granularity=i,new G(S))};var pe=new p,ae=new p,fe=new p,he=new p;G.createGeometry=function(e){let o=e._width,t=e._vertexFormat,n=e._colors,c=e._colorsPerVertex,s=e._arcType,l=e._granularity,E=e._ellipsoid,a,r,w,b=[],i=le(e._positions,p.equalsEpsilon,!1,b);if(h(n)&&b.length>0){let d=0,P=b[0];n=n.filter(function(q,T){let g=!1;return c?g=T===P||T===0&&P===1:g=T+1===P,g?(d++,P=b[d],!1):!0})}let f=i.length;if(f<2||o<=0)return;if(s===N.GEODESIC||s===N.RHUMB){let d,P;s===N.GEODESIC?(d=J.chordLength(l,E.maximumRadius),P=U.numberOfPoints):(d=l,P=U.numberOfPointsRhumbLine);let q=U.extractHeights(i,E);if(h(n)){let T=1;for(a=0;a<f-1;++a)T+=P(i[a],i[a+1],d);let g=new Array(T),D=0;for(a=0;a<f-1;++a){let Z=i[a],$=i[a+1],I=n[a],ee=P(Z,$,d);if(c&&a<T){let _e=n[a+1],te=Ae(Z,$,I,_e,ee),Pe=te.length;for(r=0;r<Pe;++r)g[D++]=te[r]}else for(r=0;r<ee;++r)g[D++]=m.clone(I)}g[D]=m.clone(n[n.length-1]),n=g,me.length=0}s===N.GEODESIC?i=U.generateCartesianArc({positions:i,minDistance:d,ellipsoid:E,height:q}):i=U.generateCartesianRhumbArc({positions:i,granularity:d,ellipsoid:E,height:q})}f=i.length;let L=f*4-4,M=new Float64Array(L*3),z=new Float64Array(L*3),H=new Float64Array(L*3),B=new Float32Array(L*2),K=t.st?new Float32Array(L*2):void 0,y=h(n)?new Uint8Array(L*4):void 0,W=0,j=0,X=0,Y=0,_;for(r=0;r<f;++r){r===0?(_=pe,p.subtract(i[0],i[1],_),p.add(i[0],_,_)):_=i[r-1],p.clone(_,fe),p.clone(i[r],ae),r===f-1?(_=pe,p.subtract(i[f-1],i[f-2],_),p.add(i[f-1],_,_)):_=i[r+1],p.clone(_,he);let d,P;h(y)&&(r!==0&&!c?d=n[r-1]:d=n[r],r!==f-1&&(P=n[r]));let q=r===0?2:0,T=r===f-1?2:4;for(w=q;w<T;++w){p.pack(ae,M,W),p.pack(fe,z,W),p.pack(he,H,W),W+=3;let g=w-2<0?-1:1;if(B[j++]=2*(w%2)-1,B[j++]=g*o,t.st&&(K[X++]=r/(f-1),K[X++]=Math.max(B[j-2],0)),h(y)){let D=w<2?d:P;y[Y++]=m.floatToByte(D.red),y[Y++]=m.floatToByte(D.green),y[Y++]=m.floatToByte(D.blue),y[Y++]=m.floatToByte(D.alpha)}}}let v=new ce;v.position=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:M}),v.prevPosition=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:z}),v.nextPosition=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:H}),v.expandAndWidth=new O({componentDatatype:x.FLOAT,componentsPerAttribute:2,values:B}),t.st&&(v.st=new O({componentDatatype:x.FLOAT,componentsPerAttribute:2,values:K})),h(y)&&(v.color=new O({componentDatatype:x.UNSIGNED_BYTE,componentsPerAttribute:4,values:y,normalize:!0}));let C=se.createTypedArray(L,f*6-6),F=0,R=0,we=f-1;for(r=0;r<we;++r)C[R++]=F,C[R++]=F+2,C[R++]=F+1,C[R++]=F+1,C[R++]=F+2,C[R++]=F+3,F+=4;return new ie({attributes:v,indices:C,primitiveType:re.TRIANGLES,boundingSphere:oe.fromPoints(i),geometryType:ne.POLYLINES})};var Q=G;function ge(e,o){return h(o)&&(e=Q.unpack(e,o)),e._ellipsoid=u.clone(e._ellipsoid),Q.createGeometry(e)}var We=ge;export{We as default};
import{a as m}from"./chunk-Q2L33INS.js";import{a as N}from"./chunk-3B3UDCHP.js";import{a as U}from"./chunk-XDTNLL4L.js";import"./chunk-45NF2JU3.js";import{a as k}from"./chunk-32UDSAPU.js";import{a as le}from"./chunk-EX67AA2G.js";import"./chunk-V5KKODOM.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{a as se}from"./chunk-563CJZT3.js";import{a as ce}from"./chunk-LH4TAMBV.js";import{a as ne,b as re,c as ie,d as O}from"./chunk-WI5KIEME.js";import{d as oe}from"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import{a as x}from"./chunk-NFDMGE7Q.js";import{b as p,e as u}from"./chunk-VDZXURWO.js";import{a as J}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as A}from"./chunk-5HWP5DW7.js";import{a as V}from"./chunk-3K67FZLU.js";import{e as h}from"./chunk-55TU6MJR.js";var me=[];function Ae(e,o,t,n,c){let s=me;s.length=c;let l,E=t.red,a=t.green,r=t.blue,w=t.alpha,b=n.red,i=n.green,f=n.blue,L=n.alpha;if(m.equals(t,n)){for(l=0;l<c;l++)s[l]=m.clone(t);return s}let M=(b-E)/c,z=(i-a)/c,H=(f-r)/c,B=(L-w)/c;for(l=0;l<c;l++)s[l]=new m(E+l*M,a+l*z,r+l*H,w+l*B);return s}function G(e){e=A(e,A.EMPTY_OBJECT);let o=e.positions,t=e.colors,n=A(e.width,1),c=A(e.colorsPerVertex,!1);if(!h(o)||o.length<2)throw new V("At least two positions are required.");if(typeof n!="number")throw new V("width must be a number");if(h(t)&&(c&&t.length<o.length||!c&&t.length<o.length-1))throw new V("colors has an invalid length.");this._positions=o,this._colors=t,this._width=n,this._colorsPerVertex=c,this._vertexFormat=k.clone(A(e.vertexFormat,k.DEFAULT)),this._arcType=A(e.arcType,N.GEODESIC),this._granularity=A(e.granularity,J.RADIANS_PER_DEGREE),this._ellipsoid=u.clone(A(e.ellipsoid,u.default)),this._workerName="createPolylineGeometry";let s=1+o.length*p.packedLength;s+=h(t)?1+t.length*m.packedLength:1,this.packedLength=s+u.packedLength+k.packedLength+4}G.pack=function(e,o,t){if(!h(e))throw new V("value is required");if(!h(o))throw new V("array is required");t=A(t,0);let n,c=e._positions,s=c.length;for(o[t++]=s,n=0;n<s;++n,t+=p.packedLength)p.pack(c[n],o,t);let l=e._colors;for(s=h(l)?l.length:0,o[t++]=s,n=0;n<s;++n,t+=m.packedLength)m.pack(l[n],o,t);return u.pack(e._ellipsoid,o,t),t+=u.packedLength,k.pack(e._vertexFormat,o,t),t+=k.packedLength,o[t++]=e._width,o[t++]=e._colorsPerVertex?1:0,o[t++]=e._arcType,o[t]=e._granularity,o};var de=u.clone(u.UNIT_SPHERE),ue=new k,S={positions:void 0,colors:void 0,ellipsoid:de,vertexFormat:ue,width:void 0,colorsPerVertex:void 0,arcType:void 0,granularity:void 0};G.unpack=function(e,o,t){if(!h(e))throw new V("array is required");o=A(o,0);let n,c=e[o++],s=new Array(c);for(n=0;n<c;++n,o+=p.packedLength)s[n]=p.unpack(e,o);c=e[o++];let l=c>0?new Array(c):void 0;for(n=0;n<c;++n,o+=m.packedLength)l[n]=m.unpack(e,o);let E=u.unpack(e,o,de);o+=u.packedLength;let a=k.unpack(e,o,ue);o+=k.packedLength;let r=e[o++],w=e[o++]===1,b=e[o++],i=e[o];return h(t)?(t._positions=s,t._colors=l,t._ellipsoid=u.clone(E,t._ellipsoid),t._vertexFormat=k.clone(a,t._vertexFormat),t._width=r,t._colorsPerVertex=w,t._arcType=b,t._granularity=i,t):(S.positions=s,S.colors=l,S.width=r,S.colorsPerVertex=w,S.arcType=b,S.granularity=i,new G(S))};var pe=new p,ae=new p,fe=new p,he=new p;G.createGeometry=function(e){let o=e._width,t=e._vertexFormat,n=e._colors,c=e._colorsPerVertex,s=e._arcType,l=e._granularity,E=e._ellipsoid,a,r,w,b=[],i=le(e._positions,p.equalsEpsilon,!1,b);if(h(n)&&b.length>0){let d=0,P=b[0];n=n.filter(function(q,T){let g=!1;return c?g=T===P||T===0&&P===1:g=T+1===P,g?(d++,P=b[d],!1):!0})}let f=i.length;if(f<2||o<=0)return;if(s===N.GEODESIC||s===N.RHUMB){let d,P;s===N.GEODESIC?(d=J.chordLength(l,E.maximumRadius),P=U.numberOfPoints):(d=l,P=U.numberOfPointsRhumbLine);let q=U.extractHeights(i,E);if(h(n)){let T=1;for(a=0;a<f-1;++a)T+=P(i[a],i[a+1],d);let g=new Array(T),D=0;for(a=0;a<f-1;++a){let Z=i[a],$=i[a+1],I=n[a],ee=P(Z,$,d);if(c&&a<T){let _e=n[a+1],te=Ae(Z,$,I,_e,ee),Pe=te.length;for(r=0;r<Pe;++r)g[D++]=te[r]}else for(r=0;r<ee;++r)g[D++]=m.clone(I)}g[D]=m.clone(n[n.length-1]),n=g,me.length=0}s===N.GEODESIC?i=U.generateCartesianArc({positions:i,minDistance:d,ellipsoid:E,height:q}):i=U.generateCartesianRhumbArc({positions:i,granularity:d,ellipsoid:E,height:q})}f=i.length;let L=f*4-4,M=new Float64Array(L*3),z=new Float64Array(L*3),H=new Float64Array(L*3),B=new Float32Array(L*2),K=t.st?new Float32Array(L*2):void 0,y=h(n)?new Uint8Array(L*4):void 0,W=0,j=0,X=0,Y=0,_;for(r=0;r<f;++r){r===0?(_=pe,p.subtract(i[0],i[1],_),p.add(i[0],_,_)):_=i[r-1],p.clone(_,fe),p.clone(i[r],ae),r===f-1?(_=pe,p.subtract(i[f-1],i[f-2],_),p.add(i[f-1],_,_)):_=i[r+1],p.clone(_,he);let d,P;h(y)&&(r!==0&&!c?d=n[r-1]:d=n[r],r!==f-1&&(P=n[r]));let q=r===0?2:0,T=r===f-1?2:4;for(w=q;w<T;++w){p.pack(ae,M,W),p.pack(fe,z,W),p.pack(he,H,W),W+=3;let g=w-2<0?-1:1;if(B[j++]=2*(w%2)-1,B[j++]=g*o,t.st&&(K[X++]=r/(f-1),K[X++]=Math.max(B[j-2],0)),h(y)){let D=w<2?d:P;y[Y++]=m.floatToByte(D.red),y[Y++]=m.floatToByte(D.green),y[Y++]=m.floatToByte(D.blue),y[Y++]=m.floatToByte(D.alpha)}}}let v=new ce;v.position=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:M}),v.prevPosition=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:z}),v.nextPosition=new O({componentDatatype:x.DOUBLE,componentsPerAttribute:3,values:H}),v.expandAndWidth=new O({componentDatatype:x.FLOAT,componentsPerAttribute:2,values:B}),t.st&&(v.st=new O({componentDatatype:x.FLOAT,componentsPerAttribute:2,values:K})),h(y)&&(v.color=new O({componentDatatype:x.UNSIGNED_BYTE,componentsPerAttribute:4,values:y,normalize:!0}));let C=se.createTypedArray(L,f*6-6),F=0,R=0,we=f-1;for(r=0;r<we;++r)C[R++]=F,C[R++]=F+2,C[R++]=F+1,C[R++]=F+1,C[R++]=F+2,C[R++]=F+3,F+=4;return new ie({attributes:v,indices:C,primitiveType:re.TRIANGLES,boundingSphere:oe.fromPoints(i),geometryType:ne.POLYLINES})};var Q=G;function ge(e,o){return h(o)&&(e=Q.unpack(e,o)),e._ellipsoid=u.clone(e._ellipsoid),Q.createGeometry(e)}var We=ge;export{We as default};
public/CimSDK/Workers/createPolylineVolumeGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as M}from"./chunk-UDJW7K3P.js";import{a as W}from"./chunk-NLFLNVCF.js";import"./chunk-HV57XH4K.js";import"./chunk-X2QIAW2L.js";import{a as I,b as j}from"./chunk-KHYDR4FN.js";import"./chunk-WGRWYGAM.js";import"./chunk-5B7R4ODL.js";import{a as g}from"./chunk-WF3WCQMH.js";import"./chunk-P5SE5XVC.js";import"./chunk-ZPRLAWII.js";import{a as x,b as V}from"./chunk-IRIBHMN7.js";import{a as $}from"./chunk-A6RR2BLJ.js";import"./chunk-EPQZOCRV.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{a as Z}from"./chunk-ZDNS2GYV.js";import{a as X}from"./chunk-LH4TAMBV.js";import{b as z,c as Q,d as U}from"./chunk-TNSV6TPX.js";import{d as Y}from"./chunk-QHUUGFLC.js";import{h as K}from"./chunk-BHJLM5NY.js";import{a as B}from"./chunk-3LWOQSP3.js";import{b as T,d as C,e as f}from"./chunk-7DK7KB7Q.js";import{a as J}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as k}from"./chunk-5HWP5DW7.js";import{a as D}from"./chunk-INT7THOB.js";import{e as _}from"./chunk-PPCZYYBW.js";function oe(t,e,n,o){let l=new X;o.position&&(l.position=new U({componentDatatype:B.DOUBLE,componentsPerAttribute:3,values:t}));let i=e.length,u=t.length/3,L=(u-i*2)/(i*2),E=V.triangulate(e),q=(L-1)*i*6+E.length*2,r=Z.createTypedArray(u,q),m,s,d,b,A,F,G=i*2,p=0;for(m=0;m<L-1;m++){for(s=0;s<i-1;s++)d=s*2+m*i*2,F=d+G,b=d+1,A=b+G,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=F;d=i*2-2+m*i*2,b=d+1,A=b+G,F=d+G,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=F}if(o.st||o.tangent||o.bitangent){let c=new Float32Array(u*2),O=1/(L-1),w=1/n.height,S=n.height/2,y,a,h=0;for(m=0;m<L;m++){for(y=m*O,a=w*(e[0].y+S),c[h++]=y,c[h++]=a,s=1;s<i;s++)a=w*(e[s].y+S),c[h++]=y,c[h++]=a,c[h++]=y,c[h++]=a;a=w*(e[0].y+S),c[h++]=y,c[h++]=a}for(s=0;s<i;s++)y=0,a=w*(e[s].y+S),c[h++]=y,c[h++]=a;for(s=0;s<i;s++)y=(L-1)*O,a=w*(e[s].y+S),c[h++]=y,c[h++]=a;l.st=new U({componentDatatype:B.FLOAT,componentsPerAttribute:2,values:new Float32Array(c)})}let N=u-i*2;for(m=0;m<E.length;m+=3){let c=E[m]+N,O=E[m+1]+N,w=E[m+2]+N;r[p++]=c,r[p++]=O,r[p++]=w,r[p++]=w+i,r[p++]=O+i,r[p++]=c+i}let P=new Q({attributes:l,indices:r,boundingSphere:Y.fromVertices(t),primitiveType:z.TRIANGLES});if(o.normal&&(P=W.computeNormal(P)),o.tangent||o.bitangent){try{P=W.computeTangentAndBitangent(P)}catch{K("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}o.tangent||(P.attributes.tangent=void 0),o.bitangent||(P.attributes.bitangent=void 0),o.st||(P.attributes.st=void 0)}return P}function R(t){t=k(t,k.EMPTY_OBJECT);let e=t.polylinePositions,n=t.shapePositions;if(!_(e))throw new D("options.polylinePositions is required.");if(!_(n))throw new D("options.shapePositions is required.");this._positions=e,this._shape=n,this._ellipsoid=f.clone(k(t.ellipsoid,f.default)),this._cornerType=k(t.cornerType,I.ROUNDED),this._vertexFormat=g.clone(k(t.vertexFormat,g.DEFAULT)),this._granularity=k(t.granularity,J.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let o=1+e.length*T.packedLength;o+=1+n.length*C.packedLength,this.packedLength=o+f.packedLength+g.packedLength+2}R.pack=function(t,e,n){if(!_(t))throw new D("value is required");if(!_(e))throw new D("array is required");n=k(n,0);let o,l=t._positions,i=l.length;for(e[n++]=i,o=0;o<i;++o,n+=T.packedLength)T.pack(l[o],e,n);let u=t._shape;for(i=u.length,e[n++]=i,o=0;o<i;++o,n+=C.packedLength)C.pack(u[o],e,n);return f.pack(t._ellipsoid,e,n),n+=f.packedLength,g.pack(t._vertexFormat,e,n),n+=g.packedLength,e[n++]=t._cornerType,e[n]=t._granularity,e};var ee=f.clone(f.UNIT_SPHERE),te=new g,v={polylinePositions:void 0,shapePositions:void 0,ellipsoid:ee,vertexFormat:te,cornerType:void 0,granularity:void 0};R.unpack=function(t,e,n){if(!_(t))throw new D("array is required");e=k(e,0);let o,l=t[e++],i=new Array(l);for(o=0;o<l;++o,e+=T.packedLength)i[o]=T.unpack(t,e);l=t[e++];let u=new Array(l);for(o=0;o<l;++o,e+=C.packedLength)u[o]=C.unpack(t,e);let L=f.unpack(t,e,ee);e+=f.packedLength;let E=g.unpack(t,e,te);e+=g.packedLength;let q=t[e++],r=t[e];return _(n)?(n._positions=i,n._shape=u,n._ellipsoid=f.clone(L,n._ellipsoid),n._vertexFormat=g.clone(E,n._vertexFormat),n._cornerType=q,n._granularity=r,n):(v.polylinePositions=i,v.shapePositions=u,v.cornerType=q,v.granularity=r,new R(v))};var ne=new M;R.createGeometry=function(t){let e=t._positions,n=$(e,T.equalsEpsilon),o=t._shape;if(o=j.removeDuplicatesFromShape(o),n.length<2||o.length<3)return;V.computeWindingOrder2D(o)===x.CLOCKWISE&&o.reverse();let l=M.fromPoints(o,ne),i=j.computePositions(n,o,l,t,!0);return oe(i,o,l,t._vertexFormat)};var H=R;function ie(t,e){return _(e)&&(t=H.unpack(t,e)),t._ellipsoid=f.clone(t._ellipsoid),H.createGeometry(t)}var Re=ie;export{Re as default};
import{a as M}from"./chunk-LZCCFKBI.js";import{a as W}from"./chunk-OOGG7EHS.js";import"./chunk-EZRSLM27.js";import"./chunk-E5FOJ77O.js";import{a as I,b as j}from"./chunk-TGH7B4GN.js";import"./chunk-XDTNLL4L.js";import"./chunk-45NF2JU3.js";import{a as g}from"./chunk-32UDSAPU.js";import"./chunk-TBSK33NR.js";import"./chunk-LSAUAD4X.js";import{a as x,b as V}from"./chunk-VDNLYVKB.js";import{a as $}from"./chunk-EX67AA2G.js";import"./chunk-V5KKODOM.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{a as Z}from"./chunk-563CJZT3.js";import{a as X}from"./chunk-LH4TAMBV.js";import{b as z,c as Q,d as U}from"./chunk-WI5KIEME.js";import{d as Y}from"./chunk-ZPW6H6BB.js";import{h as K}from"./chunk-HMXXHGCW.js";import{a as B}from"./chunk-NFDMGE7Q.js";import{b as T,d as C,e as f}from"./chunk-VDZXURWO.js";import{a as J}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as k}from"./chunk-5HWP5DW7.js";import{a as D}from"./chunk-3K67FZLU.js";import{e as _}from"./chunk-55TU6MJR.js";function oe(t,e,n,o){let l=new X;o.position&&(l.position=new U({componentDatatype:B.DOUBLE,componentsPerAttribute:3,values:t}));let i=e.length,u=t.length/3,L=(u-i*2)/(i*2),E=V.triangulate(e),q=(L-1)*i*6+E.length*2,r=Z.createTypedArray(u,q),m,s,d,b,A,F,G=i*2,p=0;for(m=0;m<L-1;m++){for(s=0;s<i-1;s++)d=s*2+m*i*2,F=d+G,b=d+1,A=b+G,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=F;d=i*2-2+m*i*2,b=d+1,A=b+G,F=d+G,r[p++]=b,r[p++]=d,r[p++]=A,r[p++]=A,r[p++]=d,r[p++]=F}if(o.st||o.tangent||o.bitangent){let c=new Float32Array(u*2),O=1/(L-1),w=1/n.height,S=n.height/2,y,a,h=0;for(m=0;m<L;m++){for(y=m*O,a=w*(e[0].y+S),c[h++]=y,c[h++]=a,s=1;s<i;s++)a=w*(e[s].y+S),c[h++]=y,c[h++]=a,c[h++]=y,c[h++]=a;a=w*(e[0].y+S),c[h++]=y,c[h++]=a}for(s=0;s<i;s++)y=0,a=w*(e[s].y+S),c[h++]=y,c[h++]=a;for(s=0;s<i;s++)y=(L-1)*O,a=w*(e[s].y+S),c[h++]=y,c[h++]=a;l.st=new U({componentDatatype:B.FLOAT,componentsPerAttribute:2,values:new Float32Array(c)})}let N=u-i*2;for(m=0;m<E.length;m+=3){let c=E[m]+N,O=E[m+1]+N,w=E[m+2]+N;r[p++]=c,r[p++]=O,r[p++]=w,r[p++]=w+i,r[p++]=O+i,r[p++]=c+i}let P=new Q({attributes:l,indices:r,boundingSphere:Y.fromVertices(t),primitiveType:z.TRIANGLES});if(o.normal&&(P=W.computeNormal(P)),o.tangent||o.bitangent){try{P=W.computeTangentAndBitangent(P)}catch{K("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}o.tangent||(P.attributes.tangent=void 0),o.bitangent||(P.attributes.bitangent=void 0),o.st||(P.attributes.st=void 0)}return P}function R(t){t=k(t,k.EMPTY_OBJECT);let e=t.polylinePositions,n=t.shapePositions;if(!_(e))throw new D("options.polylinePositions is required.");if(!_(n))throw new D("options.shapePositions is required.");this._positions=e,this._shape=n,this._ellipsoid=f.clone(k(t.ellipsoid,f.default)),this._cornerType=k(t.cornerType,I.ROUNDED),this._vertexFormat=g.clone(k(t.vertexFormat,g.DEFAULT)),this._granularity=k(t.granularity,J.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";let o=1+e.length*T.packedLength;o+=1+n.length*C.packedLength,this.packedLength=o+f.packedLength+g.packedLength+2}R.pack=function(t,e,n){if(!_(t))throw new D("value is required");if(!_(e))throw new D("array is required");n=k(n,0);let o,l=t._positions,i=l.length;for(e[n++]=i,o=0;o<i;++o,n+=T.packedLength)T.pack(l[o],e,n);let u=t._shape;for(i=u.length,e[n++]=i,o=0;o<i;++o,n+=C.packedLength)C.pack(u[o],e,n);return f.pack(t._ellipsoid,e,n),n+=f.packedLength,g.pack(t._vertexFormat,e,n),n+=g.packedLength,e[n++]=t._cornerType,e[n]=t._granularity,e};var ee=f.clone(f.UNIT_SPHERE),te=new g,v={polylinePositions:void 0,shapePositions:void 0,ellipsoid:ee,vertexFormat:te,cornerType:void 0,granularity:void 0};R.unpack=function(t,e,n){if(!_(t))throw new D("array is required");e=k(e,0);let o,l=t[e++],i=new Array(l);for(o=0;o<l;++o,e+=T.packedLength)i[o]=T.unpack(t,e);l=t[e++];let u=new Array(l);for(o=0;o<l;++o,e+=C.packedLength)u[o]=C.unpack(t,e);let L=f.unpack(t,e,ee);e+=f.packedLength;let E=g.unpack(t,e,te);e+=g.packedLength;let q=t[e++],r=t[e];return _(n)?(n._positions=i,n._shape=u,n._ellipsoid=f.clone(L,n._ellipsoid),n._vertexFormat=g.clone(E,n._vertexFormat),n._cornerType=q,n._granularity=r,n):(v.polylinePositions=i,v.shapePositions=u,v.cornerType=q,v.granularity=r,new R(v))};var ne=new M;R.createGeometry=function(t){let e=t._positions,n=$(e,T.equalsEpsilon),o=t._shape;if(o=j.removeDuplicatesFromShape(o),n.length<2||o.length<3)return;V.computeWindingOrder2D(o)===x.CLOCKWISE&&o.reverse();let l=M.fromPoints(o,ne),i=j.computePositions(n,o,l,t,!0);return oe(i,o,l,t._vertexFormat)};var H=R;function ie(t,e){return _(e)&&(t=H.unpack(t,e)),t._ellipsoid=f.clone(t._ellipsoid),H.createGeometry(t)}var Re=ie;export{Re as default};
public/CimSDK/Workers/createPolylineVolumeOutlineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as w}from"./chunk-UDJW7K3P.js";import{a as N,b as E}from"./chunk-KHYDR4FN.js";import"./chunk-WGRWYGAM.js";import"./chunk-5B7R4ODL.js";import"./chunk-P5SE5XVC.js";import"./chunk-ZPRLAWII.js";import{a as v,b as G}from"./chunk-IRIBHMN7.js";import{a as q}from"./chunk-A6RR2BLJ.js";import"./chunk-EPQZOCRV.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{a as k}from"./chunk-ZDNS2GYV.js";import{a as O}from"./chunk-LH4TAMBV.js";import{b as A,c as R,d as S}from"./chunk-TNSV6TPX.js";import{d as C}from"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import{a as b}from"./chunk-3LWOQSP3.js";import{b as a,d as _,e as s}from"./chunk-7DK7KB7Q.js";import{a as D}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as d}from"./chunk-5HWP5DW7.js";import{a as y}from"./chunk-INT7THOB.js";import{e as u}from"./chunk-PPCZYYBW.js";function W(o,i){let t=new O;t.position=new S({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:o});let e=i.length,r=t.position.values.length/3,f=o.length/3/e,p=k.createTypedArray(r,2*e*(f+1)),m,n,l=0;m=0;let h=m*e;for(n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=f-1,h=m*e,n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=0;m<f-1;m++){let T=e*m,U=T+e;for(n=0;n<e;n++)p[l++]=n+T,p[l++]=n+U}return new R({attributes:t,indices:k.createTypedArray(r,p),boundingSphere:C.fromVertices(o),primitiveType:A.LINES})}function g(o){o=d(o,d.EMPTY_OBJECT);let i=o.polylinePositions,t=o.shapePositions;if(!u(i))throw new y("options.polylinePositions is required.");if(!u(t))throw new y("options.shapePositions is required.");this._positions=i,this._shape=t,this._ellipsoid=s.clone(d(o.ellipsoid,s.default)),this._cornerType=d(o.cornerType,N.ROUNDED),this._granularity=d(o.granularity,D.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let e=1+i.length*a.packedLength;e+=1+t.length*_.packedLength,this.packedLength=e+s.packedLength+2}g.pack=function(o,i,t){if(!u(o))throw new y("value is required");if(!u(i))throw new y("array is required");t=d(t,0);let e,r=o._positions,c=r.length;for(i[t++]=c,e=0;e<c;++e,t+=a.packedLength)a.pack(r[e],i,t);let f=o._shape;for(c=f.length,i[t++]=c,e=0;e<c;++e,t+=_.packedLength)_.pack(f[e],i,t);return s.pack(o._ellipsoid,i,t),t+=s.packedLength,i[t++]=o._cornerType,i[t]=o._granularity,i};var B=s.clone(s.UNIT_SPHERE),P={polylinePositions:void 0,shapePositions:void 0,ellipsoid:B,height:void 0,cornerType:void 0,granularity:void 0};g.unpack=function(o,i,t){if(!u(o))throw new y("array is required");i=d(i,0);let e,r=o[i++],c=new Array(r);for(e=0;e<r;++e,i+=a.packedLength)c[e]=a.unpack(o,i);r=o[i++];let f=new Array(r);for(e=0;e<r;++e,i+=_.packedLength)f[e]=_.unpack(o,i);let p=s.unpack(o,i,B);i+=s.packedLength;let m=o[i++],n=o[i];return u(t)?(t._positions=c,t._shape=f,t._ellipsoid=s.clone(p,t._ellipsoid),t._cornerType=m,t._granularity=n,t):(P.polylinePositions=c,P.shapePositions=f,P.cornerType=m,P.granularity=n,new g(P))};var M=new w;g.createGeometry=function(o){let i=o._positions,t=q(i,a.equalsEpsilon),e=o._shape;if(e=E.removeDuplicatesFromShape(e),t.length<2||e.length<3)return;G.computeWindingOrder2D(e)===v.CLOCKWISE&&e.reverse();let r=w.fromPoints(e,M),c=E.computePositions(t,e,r,o,!1);return W(c,e)};var L=g;function j(o,i){return u(i)&&(o=L.unpack(o,i)),o._ellipsoid=s.clone(o._ellipsoid),L.createGeometry(o)}var he=j;export{he as default};
import{a as w}from"./chunk-LZCCFKBI.js";import{a as N,b as E}from"./chunk-TGH7B4GN.js";import"./chunk-XDTNLL4L.js";import"./chunk-45NF2JU3.js";import"./chunk-TBSK33NR.js";import"./chunk-LSAUAD4X.js";import{a as v,b as G}from"./chunk-VDNLYVKB.js";import{a as q}from"./chunk-EX67AA2G.js";import"./chunk-V5KKODOM.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{a as k}from"./chunk-563CJZT3.js";import{a as O}from"./chunk-LH4TAMBV.js";import{b as A,c as R,d as S}from"./chunk-WI5KIEME.js";import{d as C}from"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import{a as b}from"./chunk-NFDMGE7Q.js";import{b as a,d as _,e as s}from"./chunk-VDZXURWO.js";import{a as D}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as d}from"./chunk-5HWP5DW7.js";import{a as y}from"./chunk-3K67FZLU.js";import{e as u}from"./chunk-55TU6MJR.js";function W(o,i){let t=new O;t.position=new S({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:o});let e=i.length,r=t.position.values.length/3,f=o.length/3/e,p=k.createTypedArray(r,2*e*(f+1)),m,n,l=0;m=0;let h=m*e;for(n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=f-1,h=m*e,n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=0;m<f-1;m++){let T=e*m,U=T+e;for(n=0;n<e;n++)p[l++]=n+T,p[l++]=n+U}return new R({attributes:t,indices:k.createTypedArray(r,p),boundingSphere:C.fromVertices(o),primitiveType:A.LINES})}function g(o){o=d(o,d.EMPTY_OBJECT);let i=o.polylinePositions,t=o.shapePositions;if(!u(i))throw new y("options.polylinePositions is required.");if(!u(t))throw new y("options.shapePositions is required.");this._positions=i,this._shape=t,this._ellipsoid=s.clone(d(o.ellipsoid,s.default)),this._cornerType=d(o.cornerType,N.ROUNDED),this._granularity=d(o.granularity,D.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";let e=1+i.length*a.packedLength;e+=1+t.length*_.packedLength,this.packedLength=e+s.packedLength+2}g.pack=function(o,i,t){if(!u(o))throw new y("value is required");if(!u(i))throw new y("array is required");t=d(t,0);let e,r=o._positions,c=r.length;for(i[t++]=c,e=0;e<c;++e,t+=a.packedLength)a.pack(r[e],i,t);let f=o._shape;for(c=f.length,i[t++]=c,e=0;e<c;++e,t+=_.packedLength)_.pack(f[e],i,t);return s.pack(o._ellipsoid,i,t),t+=s.packedLength,i[t++]=o._cornerType,i[t]=o._granularity,i};var B=s.clone(s.UNIT_SPHERE),P={polylinePositions:void 0,shapePositions:void 0,ellipsoid:B,height:void 0,cornerType:void 0,granularity:void 0};g.unpack=function(o,i,t){if(!u(o))throw new y("array is required");i=d(i,0);let e,r=o[i++],c=new Array(r);for(e=0;e<r;++e,i+=a.packedLength)c[e]=a.unpack(o,i);r=o[i++];let f=new Array(r);for(e=0;e<r;++e,i+=_.packedLength)f[e]=_.unpack(o,i);let p=s.unpack(o,i,B);i+=s.packedLength;let m=o[i++],n=o[i];return u(t)?(t._positions=c,t._shape=f,t._ellipsoid=s.clone(p,t._ellipsoid),t._cornerType=m,t._granularity=n,t):(P.polylinePositions=c,P.shapePositions=f,P.cornerType=m,P.granularity=n,new g(P))};var M=new w;g.createGeometry=function(o){let i=o._positions,t=q(i,a.equalsEpsilon),e=o._shape;if(e=E.removeDuplicatesFromShape(e),t.length<2||e.length<3)return;G.computeWindingOrder2D(e)===v.CLOCKWISE&&e.reverse();let r=w.fromPoints(e,M),c=E.computePositions(t,e,r,o,!1);return W(c,e)};var L=g;function j(o,i){return u(i)&&(o=L.unpack(o,i)),o._ellipsoid=s.clone(o._ellipsoid),L.createGeometry(o)}var he=j;export{he as default};
public/CimSDK/Workers/createRectangleGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as J}from"./chunk-QF4KKRQA.js";import{a as Nt}from"./chunk-KBTPUVX4.js";import{a as zt}from"./chunk-NLFLNVCF.js";import"./chunk-HV57XH4K.js";import"./chunk-X2QIAW2L.js";import{a as ut}from"./chunk-55FFQILS.js";import{a as X}from"./chunk-WF3WCQMH.js";import{b as Rt}from"./chunk-IRIBHMN7.js";import"./chunk-EPQZOCRV.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{a as yt}from"./chunk-ZDNS2GYV.js";import{a as Vt}from"./chunk-LH4TAMBV.js";import{b as Mt,c as Pt,d as q}from"./chunk-TNSV6TPX.js";import{d as st}from"./chunk-QHUUGFLC.js";import{f as Lt,i as E,j as At}from"./chunk-BHJLM5NY.js";import{a as Y}from"./chunk-3LWOQSP3.js";import{b as w,c as _t,d as G,e as H,f as ft}from"./chunk-7DK7KB7Q.js";import{a as W}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as L}from"./chunk-5HWP5DW7.js";import{a as St,b as lt}from"./chunk-INT7THOB.js";import{e as $}from"./chunk-PPCZYYBW.js";var Tt=new w,Bt=new w,Ut=new w,Yt=new w,qt=new E,Zt=new G,Kt=new st,$t=new st;function Xt(t,e){let n=new Pt({attributes:new Vt,primitiveType:Mt.TRIANGLES});return n.attributes.position=new q({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}function Gt(t,e,n,r){let a=t.length,c=e.normal?new Float32Array(a):void 0,l=e.tangent?new Float32Array(a):void 0,u=e.bitangent?new Float32Array(a):void 0,d=0,p=Yt,o=Ut,i=Bt;if(e.normal||e.tangent||e.bitangent)for(let f=0;f<a;f+=3){let s=w.fromArray(t,f,Tt),h=d+1,g=d+2;i=n.geodeticSurfaceNormal(s,i),(e.tangent||e.bitangent)&&(w.cross(w.UNIT_Z,i,o),ft.multiplyByVector(r,o,o),w.normalize(o,o),e.bitangent&&w.normalize(w.cross(i,o,p),p)),e.normal&&(c[d]=i.x,c[h]=i.y,c[g]=i.z),e.tangent&&(l[d]=o.x,l[h]=o.y,l[g]=o.z),e.bitangent&&(u[d]=p.x,u[h]=p.y,u[g]=p.z),d+=3}return Xt(e,{positions:t,normals:c,tangents:l,bitangents:u})}var Ct=new w,jt=new w;function te(t,e,n){let r=t.length,a=e.normal?new Float32Array(r):void 0,c=e.tangent?new Float32Array(r):void 0,l=e.bitangent?new Float32Array(r):void 0,u=0,d=0,p=0,o=!0,i=Yt,f=Ut,s=Bt;if(e.normal||e.tangent||e.bitangent)for(let h=0;h<r;h+=6){let g=w.fromArray(t,h,Tt),A=w.fromArray(t,(h+6)%r,Ct);if(o){let b=w.fromArray(t,(h+3)%r,jt);w.subtract(A,g,A),w.subtract(b,g,b),s=w.normalize(w.cross(b,A,s),s),o=!1}w.equalsEpsilon(A,g,W.EPSILON10)&&(o=!0),(e.tangent||e.bitangent)&&(i=n.geodeticSurfaceNormal(g,i),e.tangent&&(f=w.normalize(w.cross(i,s,f),f))),e.normal&&(a[u++]=s.x,a[u++]=s.y,a[u++]=s.z,a[u++]=s.x,a[u++]=s.y,a[u++]=s.z),e.tangent&&(c[d++]=f.x,c[d++]=f.y,c[d++]=f.z,c[d++]=f.x,c[d++]=f.y,c[d++]=f.z),e.bitangent&&(l[p++]=i.x,l[p++]=i.y,l[p++]=i.z,l[p++]=i.x,l[p++]=i.y,l[p++]=i.z)}return Xt(e,{positions:t,normals:a,tangents:c,bitangents:l})}function It(t,e){let n=t._vertexFormat,r=t._ellipsoid,a=e.height,c=e.width,l=e.northCap,u=e.southCap,d=0,p=a,o=a,i=0;l&&(d=1,o-=1,i+=1),u&&(p-=1,o-=1,i+=1),i+=c*o;let f=n.position?new Float64Array(i*3):void 0,s=n.st?new Float32Array(i*2):void 0,h=0,g=0,A=Tt,b=Zt,z=Number.MAX_VALUE,F=Number.MAX_VALUE,j=-Number.MAX_VALUE,T=-Number.MAX_VALUE;for(let x=d;x<p;++x)for(let k=0;k<c;++k)J.computePosition(e,r,n.st,x,k,A,b),f[h++]=A.x,f[h++]=A.y,f[h++]=A.z,n.st&&(s[g++]=b.x,s[g++]=b.y,z=Math.min(z,b.x),F=Math.min(F,b.y),j=Math.max(j,b.x),T=Math.max(T,b.y));if(l&&(J.computePosition(e,r,n.st,0,0,A,b),f[h++]=A.x,f[h++]=A.y,f[h++]=A.z,n.st&&(s[g++]=b.x,s[g++]=b.y,z=b.x,F=b.y,j=b.x,T=b.y)),u&&(J.computePosition(e,r,n.st,a-1,0,A,b),f[h++]=A.x,f[h++]=A.y,f[h]=A.z,n.st&&(s[g++]=b.x,s[g]=b.y,z=Math.min(z,b.x),F=Math.min(F,b.y),j=Math.max(j,b.x),T=Math.max(T,b.y))),n.st&&(z<0||F<0||j>1||T>1))for(let x=0;x<s.length;x+=2)s[x]=(s[x]-z)/(j-z),s[x+1]=(s[x+1]-F)/(T-F);let m=Gt(f,n,r,e.tangentRotationMatrix),K=6*(c-1)*(o-1);l&&(K+=3*(c-1)),u&&(K+=3*(c-1));let P=yt.createTypedArray(i,K),D=0,N=0,O;for(O=0;O<o-1;++O){for(let x=0;x<c-1;++x){let k=D,M=k+c,I=M+1,rt=k+1;P[N++]=k,P[N++]=M,P[N++]=rt,P[N++]=rt,P[N++]=M,P[N++]=I,++D}++D}if(l||u){let x=i-1,k=i-1;l&&u&&(x=i-2);let M,I;if(D=0,l)for(O=0;O<c-1;O++)M=D,I=M+1,P[N++]=x,P[N++]=M,P[N++]=I,++D;if(u)for(D=(o-1)*c,O=0;O<c-1;O++)M=D,I=M+1,P[N++]=M,P[N++]=k,P[N++]=I,++D}return m.indices=P,n.st&&(m.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:s})),m}function ht(t,e,n,r,a){return t[e++]=r[n],t[e++]=r[n+1],t[e++]=r[n+2],t[e++]=a[n],t[e++]=a[n+1],t[e]=a[n+2],t}function dt(t,e,n,r){return t[e++]=r[n],t[e++]=r[n+1],t[e++]=r[n],t[e]=r[n+1],t}var Dt=new X;function ee(t,e){let n=t._shadowVolume,r=t._offsetAttribute,a=t._vertexFormat,c=t._extrudedHeight,l=t._surfaceHeight,u=t._ellipsoid,d=e.height,p=e.width,o;if(n){let R=X.clone(a,Dt);R.normal=!0,t._vertexFormat=R}let i=It(t,e);n&&(t._vertexFormat=a);let f=Rt.scaleToGeodeticHeight(i.attributes.position.values,l,u,!1);f=new Float64Array(f);let s=f.length,h=s*2,g=new Float64Array(h);g.set(f);let A=Rt.scaleToGeodeticHeight(i.attributes.position.values,c,u);g.set(A,s),i.attributes.position.values=g;let b=a.normal?new Float32Array(h):void 0,z=a.tangent?new Float32Array(h):void 0,F=a.bitangent?new Float32Array(h):void 0,j=a.st?new Float32Array(h/3*2):void 0,T,m;if(a.normal){for(m=i.attributes.normal.values,b.set(m),o=0;o<s;o++)m[o]=-m[o];b.set(m,s),i.attributes.normal.values=b}if(n){m=i.attributes.normal.values,a.normal||(i.attributes.normal=void 0);let R=new Float32Array(h);for(o=0;o<s;o++)m[o]=-m[o];R.set(m,s),i.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:R})}let K,P=$(r);if(P){let R=s/3*2,at=new Uint8Array(R);r===ut.TOP?at=at.fill(1,0,R/2):(K=r===ut.NONE?0:1,at=at.fill(K)),i.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:at})}if(a.tangent){let R=i.attributes.tangent.values;for(z.set(R),o=0;o<s;o++)R[o]=-R[o];z.set(R,s),i.attributes.tangent.values=z}if(a.bitangent){let R=i.attributes.bitangent.values;F.set(R),F.set(R,s),i.attributes.bitangent.values=F}a.st&&(T=i.attributes.st.values,j.set(T),j.set(T,s/3*2),i.attributes.st.values=j);let D=i.indices,N=D.length,O=s/3,x=yt.createTypedArray(h/3,N*2);for(x.set(D),o=0;o<N;o+=3)x[o+N]=D[o+2]+O,x[o+1+N]=D[o+1]+O,x[o+2+N]=D[o]+O;i.indices=x;let k=e.northCap,M=e.southCap,I=d,rt=2,pt=0,xt=4,Et=4;k&&(rt-=1,I-=1,pt+=1,xt-=2,Et-=1),M&&(rt-=1,I-=1,pt+=1,xt-=2,Et-=1),pt+=rt*p+2*I-xt;let gt=(pt+Et)*2,C=new Float64Array(gt*3),S=n?new Float32Array(gt*3):void 0,Z=P?new Uint8Array(gt):void 0,V=a.st?new Float32Array(gt*2):void 0,et=r===ut.TOP;P&&!et&&(K=r===ut.ALL?1:0,Z=Z.fill(K));let v=0,B=0,y=0,U=0,nt=p*I,_;for(o=0;o<nt;o+=p)_=o*3,C=ht(C,v,_,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[_],S[y++]=m[_+1],S[y++]=m[_+2]),et&&(Z[U++]=1,U+=1);if(M){let R=k?nt+1:nt;for(_=R*3,o=0;o<2;o++)C=ht(C,v,_,f,A),v+=6,a.st&&(V=dt(V,B,R*2,T),B+=4),n&&(y+=3,S[y++]=m[_],S[y++]=m[_+1],S[y++]=m[_+2]),et&&(Z[U++]=1,U+=1)}else for(o=nt-p;o<nt;o++)_=o*3,C=ht(C,v,_,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[_],S[y++]=m[_+1],S[y++]=m[_+2]),et&&(Z[U++]=1,U+=1);for(o=nt-1;o>0;o-=p)_=o*3,C=ht(C,v,_,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[_],S[y++]=m[_+1],S[y++]=m[_+2]),et&&(Z[U++]=1,U+=1);if(k){let R=nt;for(_=R*3,o=0;o<2;o++)C=ht(C,v,_,f,A),v+=6,a.st&&(V=dt(V,B,R*2,T),B+=4),n&&(y+=3,S[y++]=m[_],S[y++]=m[_+1],S[y++]=m[_+2]),et&&(Z[U++]=1,U+=1)}else for(o=p-1;o>=0;o--)_=o*3,C=ht(C,v,_,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[_],S[y++]=m[_+1],S[y++]=m[_+2]),et&&(Z[U++]=1,U+=1);let ot=te(C,a,u);a.st&&(ot.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:V})),n&&(ot.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:S})),P&&(ot.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:Z}));let it=yt.createTypedArray(gt,pt*6),mt,wt,kt,bt;s=C.length/3;let ct=0;for(o=0;o<s-1;o+=2){mt=o,bt=(mt+2)%s;let R=w.fromArray(C,mt*3,Ct),at=w.fromArray(C,bt*3,jt);w.equalsEpsilon(R,at,W.EPSILON10)||(wt=(mt+1)%s,kt=(wt+2)%s,it[ct++]=mt,it[ct++]=wt,it[ct++]=bt,it[ct++]=bt,it[ct++]=wt,it[ct++]=kt)}return ot.indices=it,ot=zt.combineInstances([new Nt({geometry:i}),new Nt({geometry:ot})]),ot[0]}var ne=[new w,new w,new w,new w],Wt=new _t,oe=new _t;function Ht(t,e,n,r,a){if(n===0)return E.clone(t,a);let c=J.computeOptions(t,e,n,0,qt,Wt),l=c.height,u=c.width,d=ne;return J.computePosition(c,r,!1,0,0,d[0]),J.computePosition(c,r,!1,0,u-1,d[1]),J.computePosition(c,r,!1,l-1,0,d[2]),J.computePosition(c,r,!1,l-1,u-1,d[3]),E.fromCartesianArray(d,r,a)}function Q(t){t=L(t,L.EMPTY_OBJECT);let e=t.rectangle;if(lt.typeOf.object("rectangle",e),E._validate(e),e.north<e.south)throw new St("options.rectangle.north must be greater than or equal to options.rectangle.south");let n=L(t.height,0),r=L(t.extrudedHeight,n);this._rectangle=E.clone(e),this._granularity=L(t.granularity,W.RADIANS_PER_DEGREE),this._ellipsoid=H.clone(L(t.ellipsoid,H.default)),this._surfaceHeight=Math.max(n,r),this._rotation=L(t.rotation,0),this._stRotation=L(t.stRotation,0),this._vertexFormat=X.clone(L(t.vertexFormat,X.DEFAULT)),this._extrudedHeight=Math.min(n,r),this._shadowVolume=L(t.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=t.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}Q.packedLength=E.packedLength+H.packedLength+X.packedLength+7;Q.pack=function(t,e,n){return lt.typeOf.object("value",t),lt.defined("array",e),n=L(n,0),E.pack(t._rectangle,e,n),n+=E.packedLength,H.pack(t._ellipsoid,e,n),n+=H.packedLength,X.pack(t._vertexFormat,e,n),n+=X.packedLength,e[n++]=t._granularity,e[n++]=t._surfaceHeight,e[n++]=t._rotation,e[n++]=t._stRotation,e[n++]=t._extrudedHeight,e[n++]=t._shadowVolume?1:0,e[n]=L(t._offsetAttribute,-1),e};var Jt=new E,Qt=H.clone(H.UNIT_SPHERE),tt={rectangle:Jt,ellipsoid:Qt,vertexFormat:Dt,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Q.unpack=function(t,e,n){lt.defined("array",t),e=L(e,0);let r=E.unpack(t,e,Jt);e+=E.packedLength;let a=H.unpack(t,e,Qt);e+=H.packedLength;let c=X.unpack(t,e,Dt);e+=X.packedLength;let l=t[e++],u=t[e++],d=t[e++],p=t[e++],o=t[e++],i=t[e++]===1,f=t[e];return $(n)?(n._rectangle=E.clone(r,n._rectangle),n._ellipsoid=H.clone(a,n._ellipsoid),n._vertexFormat=X.clone(c,n._vertexFormat),n._granularity=l,n._surfaceHeight=u,n._rotation=d,n._stRotation=p,n._extrudedHeight=o,n._shadowVolume=i,n._offsetAttribute=f===-1?void 0:f,n):(tt.granularity=l,tt.height=u,tt.rotation=d,tt.stRotation=p,tt.extrudedHeight=o,tt.shadowVolume=i,tt.offsetAttribute=f===-1?void 0:f,new Q(tt))};Q.computeRectangle=function(t,e){t=L(t,L.EMPTY_OBJECT);let n=t.rectangle;if(lt.typeOf.object("rectangle",n),E._validate(n),n.north<n.south)throw new St("options.rectangle.north must be greater than or equal to options.rectangle.south");let r=L(t.granularity,W.RADIANS_PER_DEGREE),a=L(t.ellipsoid,H.default),c=L(t.rotation,0);return Ht(n,r,c,a,e)};var ie=new ft,Ft=new Lt,ae=new _t;Q.createGeometry=function(t){if(W.equalsEpsilon(t._rectangle.north,t._rectangle.south,W.EPSILON10)||W.equalsEpsilon(t._rectangle.east,t._rectangle.west,W.EPSILON10))return;let e=t._rectangle,n=t._ellipsoid,r=t._rotation,a=t._stRotation,c=t._vertexFormat,l=J.computeOptions(e,t._granularity,r,a,qt,Wt,oe),u=ie;if(a!==0||r!==0){let s=E.center(e,ae),h=n.geodeticSurfaceNormalCartographic(s,Ct);Lt.fromAxisAngle(h,-a,Ft),ft.fromQuaternion(Ft,u)}else ft.clone(ft.IDENTITY,u);let d=t._surfaceHeight,p=t._extrudedHeight,o=!W.equalsEpsilon(d,p,0,W.EPSILON2);l.lonScalar=1/t._rectangle.width,l.latScalar=1/t._rectangle.height,l.tangentRotationMatrix=u;let i,f;if(e=t._rectangle,o){i=ee(t,l);let s=st.fromRectangle3D(e,n,d,$t),h=st.fromRectangle3D(e,n,p,Kt);f=st.union(s,h)}else{if(i=It(t,l),i.attributes.position.values=Rt.scaleToGeodeticHeight(i.attributes.position.values,d,n,!1),$(t._offsetAttribute)){let s=i.attributes.position.values.length,h=t._offsetAttribute===ut.NONE?0:1,g=new Uint8Array(s/3).fill(h);i.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}f=st.fromRectangle3D(e,n,d)}return c.position||delete i.attributes.position,new Pt({attributes:i.attributes,indices:i.indices,primitiveType:i.primitiveType,boundingSphere:f,offsetAttribute:t._offsetAttribute})};Q.createShadowVolume=function(t,e,n){let r=t._granularity,a=t._ellipsoid,c=e(r,a),l=n(r,a);return new Q({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:a,stRotation:t._stRotation,granularity:r,extrudedHeight:l,height:c,vertexFormat:X.POSITION_ONLY,shadowVolume:!0})};var vt=new E,se=[new G,new G,new G],re=new At,ce=new _t;function le(t){if(t._stRotation===0)return[0,0,0,1,1,0];let e=E.clone(t._rectangle,vt),n=t._granularity,r=t._ellipsoid,a=t._rotation-t._stRotation,c=Ht(e,n,a,r,vt),l=se;l[0].x=c.west,l[0].y=c.south,l[1].x=c.west,l[1].y=c.north,l[2].x=c.east,l[2].y=c.south;let u=t.rectangle,d=At.fromRotation(t._stRotation,re),p=E.center(u,ce);for(let h=0;h<3;++h){let g=l[h];g.x-=p.longitude,g.y-=p.latitude,At.multiplyByVector(d,g,g),g.x+=p.longitude,g.y+=p.latitude,g.x=(g.x-u.west)/u.width,g.y=(g.y-u.south)/u.height}let o=l[0],i=l[1],f=l[2],s=new Array(6);return G.pack(o,s),G.pack(i,s,2),G.pack(f,s,4),s}Object.defineProperties(Q.prototype,{rectangle:{get:function(){return $(this._rotatedRectangle)||(this._rotatedRectangle=Ht(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return $(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=le(this)),this._textureCoordinateRotationPoints}}});var Ot=Q;function fe(t,e){return $(e)&&(t=Ot.unpack(t,e)),t._ellipsoid=H.clone(t._ellipsoid),t._rectangle=E.clone(t._rectangle),Ot.createGeometry(t)}var Ye=fe;export{Ye as default};
import{a as J}from"./chunk-QPIV5DSQ.js";import{a as Nt}from"./chunk-S5MWIP3D.js";import{a as zt}from"./chunk-OOGG7EHS.js";import"./chunk-EZRSLM27.js";import"./chunk-E5FOJ77O.js";import{a as ut}from"./chunk-55FFQILS.js";import{a as X}from"./chunk-32UDSAPU.js";import{b as Rt}from"./chunk-VDNLYVKB.js";import"./chunk-V5KKODOM.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{a as yt}from"./chunk-563CJZT3.js";import{a as Vt}from"./chunk-LH4TAMBV.js";import{b as Mt,c as Pt,d as q}from"./chunk-WI5KIEME.js";import{d as st}from"./chunk-ZPW6H6BB.js";import{f as Lt,i as E,j as At}from"./chunk-HMXXHGCW.js";import{a as Y}from"./chunk-NFDMGE7Q.js";import{b as w,c as _t,d as G,e as H,f as ft}from"./chunk-VDZXURWO.js";import{a as W}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as L}from"./chunk-5HWP5DW7.js";import{a as St,b as lt}from"./chunk-3K67FZLU.js";import{e as $}from"./chunk-55TU6MJR.js";var Tt=new w,Bt=new w,Ut=new w,Yt=new w,qt=new E,Zt=new G,Kt=new st,$t=new st;function Xt(t,e){let n=new Pt({attributes:new Vt,primitiveType:Mt.TRIANGLES});return n.attributes.position=new q({componentDatatype:Y.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}function Gt(t,e,n,r){let a=t.length,c=e.normal?new Float32Array(a):void 0,l=e.tangent?new Float32Array(a):void 0,u=e.bitangent?new Float32Array(a):void 0,d=0,p=Yt,o=Ut,i=Bt;if(e.normal||e.tangent||e.bitangent)for(let f=0;f<a;f+=3){let s=w.fromArray(t,f,Tt),h=d+1,g=d+2;i=n.geodeticSurfaceNormal(s,i),(e.tangent||e.bitangent)&&(w.cross(w.UNIT_Z,i,o),ft.multiplyByVector(r,o,o),w.normalize(o,o),e.bitangent&&w.normalize(w.cross(i,o,p),p)),e.normal&&(c[d]=i.x,c[h]=i.y,c[g]=i.z),e.tangent&&(l[d]=o.x,l[h]=o.y,l[g]=o.z),e.bitangent&&(u[d]=p.x,u[h]=p.y,u[g]=p.z),d+=3}return Xt(e,{positions:t,normals:c,tangents:l,bitangents:u})}var Ct=new w,jt=new w;function te(t,e,n){let r=t.length,a=e.normal?new Float32Array(r):void 0,c=e.tangent?new Float32Array(r):void 0,l=e.bitangent?new Float32Array(r):void 0,u=0,d=0,p=0,o=!0,i=Yt,f=Ut,s=Bt;if(e.normal||e.tangent||e.bitangent)for(let h=0;h<r;h+=6){let g=w.fromArray(t,h,Tt),A=w.fromArray(t,(h+6)%r,Ct);if(o){let b=w.fromArray(t,(h+3)%r,jt);w.subtract(A,g,A),w.subtract(b,g,b),s=w.normalize(w.cross(b,A,s),s),o=!1}w.equalsEpsilon(A,g,W.EPSILON10)&&(o=!0),(e.tangent||e.bitangent)&&(i=n.geodeticSurfaceNormal(g,i),e.tangent&&(f=w.normalize(w.cross(i,s,f),f))),e.normal&&(a[u++]=s.x,a[u++]=s.y,a[u++]=s.z,a[u++]=s.x,a[u++]=s.y,a[u++]=s.z),e.tangent&&(c[d++]=f.x,c[d++]=f.y,c[d++]=f.z,c[d++]=f.x,c[d++]=f.y,c[d++]=f.z),e.bitangent&&(l[p++]=i.x,l[p++]=i.y,l[p++]=i.z,l[p++]=i.x,l[p++]=i.y,l[p++]=i.z)}return Xt(e,{positions:t,normals:a,tangents:c,bitangents:l})}function It(t,e){let n=t._vertexFormat,r=t._ellipsoid,a=e.height,c=e.width,l=e.northCap,u=e.southCap,d=0,p=a,o=a,i=0;l&&(d=1,o-=1,i+=1),u&&(p-=1,o-=1,i+=1),i+=c*o;let f=n.position?new Float64Array(i*3):void 0,s=n.st?new Float32Array(i*2):void 0,h=0,g=0,A=Tt,b=Zt,z=Number.MAX_VALUE,F=Number.MAX_VALUE,j=-Number.MAX_VALUE,T=-Number.MAX_VALUE;for(let x=d;x<p;++x)for(let k=0;k<c;++k)J.computePosition(e,r,n.st,x,k,A,b),f[h++]=A.x,f[h++]=A.y,f[h++]=A.z,n.st&&(s[g++]=b.x,s[g++]=b.y,z=Math.min(z,b.x),F=Math.min(F,b.y),j=Math.max(j,b.x),T=Math.max(T,b.y));if(l&&(J.computePosition(e,r,n.st,0,0,A,b),f[h++]=A.x,f[h++]=A.y,f[h++]=A.z,n.st&&(s[g++]=b.x,s[g++]=b.y,z=b.x,F=b.y,j=b.x,T=b.y)),u&&(J.computePosition(e,r,n.st,a-1,0,A,b),f[h++]=A.x,f[h++]=A.y,f[h]=A.z,n.st&&(s[g++]=b.x,s[g]=b.y,z=Math.min(z,b.x),F=Math.min(F,b.y),j=Math.max(j,b.x),T=Math.max(T,b.y))),n.st&&(z<0||F<0||j>1||T>1))for(let x=0;x<s.length;x+=2)s[x]=(s[x]-z)/(j-z),s[x+1]=(s[x+1]-F)/(T-F);let m=Gt(f,n,r,e.tangentRotationMatrix),K=6*(c-1)*(o-1);l&&(K+=3*(c-1)),u&&(K+=3*(c-1));let P=yt.createTypedArray(i,K),D=0,N=0,O;for(O=0;O<o-1;++O){for(let x=0;x<c-1;++x){let k=D,M=k+c,I=M+1,rt=k+1;P[N++]=k,P[N++]=M,P[N++]=rt,P[N++]=rt,P[N++]=M,P[N++]=I,++D}++D}if(l||u){let x=i-1,k=i-1;l&&u&&(x=i-2);let M,I;if(D=0,l)for(O=0;O<c-1;O++)M=D,I=M+1,P[N++]=x,P[N++]=M,P[N++]=I,++D;if(u)for(D=(o-1)*c,O=0;O<c-1;O++)M=D,I=M+1,P[N++]=M,P[N++]=k,P[N++]=I,++D}return m.indices=P,n.st&&(m.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:s})),m}function ht(t,e,n,r,a){return t[e++]=r[n],t[e++]=r[n+1],t[e++]=r[n+2],t[e++]=a[n],t[e++]=a[n+1],t[e]=a[n+2],t}function dt(t,e,n,r){return t[e++]=r[n],t[e++]=r[n+1],t[e++]=r[n],t[e]=r[n+1],t}var Dt=new X;function ee(t,e){let n=t._shadowVolume,r=t._offsetAttribute,a=t._vertexFormat,c=t._extrudedHeight,l=t._surfaceHeight,u=t._ellipsoid,d=e.height,p=e.width,o;if(n){let R=X.clone(a,Dt);R.normal=!0,t._vertexFormat=R}let i=It(t,e);n&&(t._vertexFormat=a);let f=Rt.scaleToGeodeticHeight(i.attributes.position.values,l,u,!1);f=new Float64Array(f);let s=f.length,h=s*2,g=new Float64Array(h);g.set(f);let A=Rt.scaleToGeodeticHeight(i.attributes.position.values,c,u);g.set(A,s),i.attributes.position.values=g;let b=a.normal?new Float32Array(h):void 0,z=a.tangent?new Float32Array(h):void 0,F=a.bitangent?new Float32Array(h):void 0,j=a.st?new Float32Array(h/3*2):void 0,T,m;if(a.normal){for(m=i.attributes.normal.values,b.set(m),o=0;o<s;o++)m[o]=-m[o];b.set(m,s),i.attributes.normal.values=b}if(n){m=i.attributes.normal.values,a.normal||(i.attributes.normal=void 0);let R=new Float32Array(h);for(o=0;o<s;o++)m[o]=-m[o];R.set(m,s),i.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:R})}let K,P=$(r);if(P){let R=s/3*2,at=new Uint8Array(R);r===ut.TOP?at=at.fill(1,0,R/2):(K=r===ut.NONE?0:1,at=at.fill(K)),i.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:at})}if(a.tangent){let R=i.attributes.tangent.values;for(z.set(R),o=0;o<s;o++)R[o]=-R[o];z.set(R,s),i.attributes.tangent.values=z}if(a.bitangent){let R=i.attributes.bitangent.values;F.set(R),F.set(R,s),i.attributes.bitangent.values=F}a.st&&(T=i.attributes.st.values,j.set(T),j.set(T,s/3*2),i.attributes.st.values=j);let D=i.indices,N=D.length,O=s/3,x=yt.createTypedArray(h/3,N*2);for(x.set(D),o=0;o<N;o+=3)x[o+N]=D[o+2]+O,x[o+1+N]=D[o+1]+O,x[o+2+N]=D[o]+O;i.indices=x;let k=e.northCap,M=e.southCap,I=d,rt=2,pt=0,xt=4,Et=4;k&&(rt-=1,I-=1,pt+=1,xt-=2,Et-=1),M&&(rt-=1,I-=1,pt+=1,xt-=2,Et-=1),pt+=rt*p+2*I-xt;let gt=(pt+Et)*2,C=new Float64Array(gt*3),S=n?new Float32Array(gt*3):void 0,Z=P?new Uint8Array(gt):void 0,V=a.st?new Float32Array(gt*2):void 0,et=r===ut.TOP;P&&!et&&(K=r===ut.ALL?1:0,Z=Z.fill(K));let v=0,B=0,y=0,U=0,nt=p*I,_;for(o=0;o<nt;o+=p)_=o*3,C=ht(C,v,_,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[_],S[y++]=m[_+1],S[y++]=m[_+2]),et&&(Z[U++]=1,U+=1);if(M){let R=k?nt+1:nt;for(_=R*3,o=0;o<2;o++)C=ht(C,v,_,f,A),v+=6,a.st&&(V=dt(V,B,R*2,T),B+=4),n&&(y+=3,S[y++]=m[_],S[y++]=m[_+1],S[y++]=m[_+2]),et&&(Z[U++]=1,U+=1)}else for(o=nt-p;o<nt;o++)_=o*3,C=ht(C,v,_,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[_],S[y++]=m[_+1],S[y++]=m[_+2]),et&&(Z[U++]=1,U+=1);for(o=nt-1;o>0;o-=p)_=o*3,C=ht(C,v,_,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[_],S[y++]=m[_+1],S[y++]=m[_+2]),et&&(Z[U++]=1,U+=1);if(k){let R=nt;for(_=R*3,o=0;o<2;o++)C=ht(C,v,_,f,A),v+=6,a.st&&(V=dt(V,B,R*2,T),B+=4),n&&(y+=3,S[y++]=m[_],S[y++]=m[_+1],S[y++]=m[_+2]),et&&(Z[U++]=1,U+=1)}else for(o=p-1;o>=0;o--)_=o*3,C=ht(C,v,_,f,A),v+=6,a.st&&(V=dt(V,B,o*2,T),B+=4),n&&(y+=3,S[y++]=m[_],S[y++]=m[_+1],S[y++]=m[_+2]),et&&(Z[U++]=1,U+=1);let ot=te(C,a,u);a.st&&(ot.attributes.st=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:2,values:V})),n&&(ot.attributes.extrudeDirection=new q({componentDatatype:Y.FLOAT,componentsPerAttribute:3,values:S})),P&&(ot.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:Z}));let it=yt.createTypedArray(gt,pt*6),mt,wt,kt,bt;s=C.length/3;let ct=0;for(o=0;o<s-1;o+=2){mt=o,bt=(mt+2)%s;let R=w.fromArray(C,mt*3,Ct),at=w.fromArray(C,bt*3,jt);w.equalsEpsilon(R,at,W.EPSILON10)||(wt=(mt+1)%s,kt=(wt+2)%s,it[ct++]=mt,it[ct++]=wt,it[ct++]=bt,it[ct++]=bt,it[ct++]=wt,it[ct++]=kt)}return ot.indices=it,ot=zt.combineInstances([new Nt({geometry:i}),new Nt({geometry:ot})]),ot[0]}var ne=[new w,new w,new w,new w],Wt=new _t,oe=new _t;function Ht(t,e,n,r,a){if(n===0)return E.clone(t,a);let c=J.computeOptions(t,e,n,0,qt,Wt),l=c.height,u=c.width,d=ne;return J.computePosition(c,r,!1,0,0,d[0]),J.computePosition(c,r,!1,0,u-1,d[1]),J.computePosition(c,r,!1,l-1,0,d[2]),J.computePosition(c,r,!1,l-1,u-1,d[3]),E.fromCartesianArray(d,r,a)}function Q(t){t=L(t,L.EMPTY_OBJECT);let e=t.rectangle;if(lt.typeOf.object("rectangle",e),E._validate(e),e.north<e.south)throw new St("options.rectangle.north must be greater than or equal to options.rectangle.south");let n=L(t.height,0),r=L(t.extrudedHeight,n);this._rectangle=E.clone(e),this._granularity=L(t.granularity,W.RADIANS_PER_DEGREE),this._ellipsoid=H.clone(L(t.ellipsoid,H.default)),this._surfaceHeight=Math.max(n,r),this._rotation=L(t.rotation,0),this._stRotation=L(t.stRotation,0),this._vertexFormat=X.clone(L(t.vertexFormat,X.DEFAULT)),this._extrudedHeight=Math.min(n,r),this._shadowVolume=L(t.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=t.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}Q.packedLength=E.packedLength+H.packedLength+X.packedLength+7;Q.pack=function(t,e,n){return lt.typeOf.object("value",t),lt.defined("array",e),n=L(n,0),E.pack(t._rectangle,e,n),n+=E.packedLength,H.pack(t._ellipsoid,e,n),n+=H.packedLength,X.pack(t._vertexFormat,e,n),n+=X.packedLength,e[n++]=t._granularity,e[n++]=t._surfaceHeight,e[n++]=t._rotation,e[n++]=t._stRotation,e[n++]=t._extrudedHeight,e[n++]=t._shadowVolume?1:0,e[n]=L(t._offsetAttribute,-1),e};var Jt=new E,Qt=H.clone(H.UNIT_SPHERE),tt={rectangle:Jt,ellipsoid:Qt,vertexFormat:Dt,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Q.unpack=function(t,e,n){lt.defined("array",t),e=L(e,0);let r=E.unpack(t,e,Jt);e+=E.packedLength;let a=H.unpack(t,e,Qt);e+=H.packedLength;let c=X.unpack(t,e,Dt);e+=X.packedLength;let l=t[e++],u=t[e++],d=t[e++],p=t[e++],o=t[e++],i=t[e++]===1,f=t[e];return $(n)?(n._rectangle=E.clone(r,n._rectangle),n._ellipsoid=H.clone(a,n._ellipsoid),n._vertexFormat=X.clone(c,n._vertexFormat),n._granularity=l,n._surfaceHeight=u,n._rotation=d,n._stRotation=p,n._extrudedHeight=o,n._shadowVolume=i,n._offsetAttribute=f===-1?void 0:f,n):(tt.granularity=l,tt.height=u,tt.rotation=d,tt.stRotation=p,tt.extrudedHeight=o,tt.shadowVolume=i,tt.offsetAttribute=f===-1?void 0:f,new Q(tt))};Q.computeRectangle=function(t,e){t=L(t,L.EMPTY_OBJECT);let n=t.rectangle;if(lt.typeOf.object("rectangle",n),E._validate(n),n.north<n.south)throw new St("options.rectangle.north must be greater than or equal to options.rectangle.south");let r=L(t.granularity,W.RADIANS_PER_DEGREE),a=L(t.ellipsoid,H.default),c=L(t.rotation,0);return Ht(n,r,c,a,e)};var ie=new ft,Ft=new Lt,ae=new _t;Q.createGeometry=function(t){if(W.equalsEpsilon(t._rectangle.north,t._rectangle.south,W.EPSILON10)||W.equalsEpsilon(t._rectangle.east,t._rectangle.west,W.EPSILON10))return;let e=t._rectangle,n=t._ellipsoid,r=t._rotation,a=t._stRotation,c=t._vertexFormat,l=J.computeOptions(e,t._granularity,r,a,qt,Wt,oe),u=ie;if(a!==0||r!==0){let s=E.center(e,ae),h=n.geodeticSurfaceNormalCartographic(s,Ct);Lt.fromAxisAngle(h,-a,Ft),ft.fromQuaternion(Ft,u)}else ft.clone(ft.IDENTITY,u);let d=t._surfaceHeight,p=t._extrudedHeight,o=!W.equalsEpsilon(d,p,0,W.EPSILON2);l.lonScalar=1/t._rectangle.width,l.latScalar=1/t._rectangle.height,l.tangentRotationMatrix=u;let i,f;if(e=t._rectangle,o){i=ee(t,l);let s=st.fromRectangle3D(e,n,d,$t),h=st.fromRectangle3D(e,n,p,Kt);f=st.union(s,h)}else{if(i=It(t,l),i.attributes.position.values=Rt.scaleToGeodeticHeight(i.attributes.position.values,d,n,!1),$(t._offsetAttribute)){let s=i.attributes.position.values.length,h=t._offsetAttribute===ut.NONE?0:1,g=new Uint8Array(s/3).fill(h);i.attributes.applyOffset=new q({componentDatatype:Y.UNSIGNED_BYTE,componentsPerAttribute:1,values:g})}f=st.fromRectangle3D(e,n,d)}return c.position||delete i.attributes.position,new Pt({attributes:i.attributes,indices:i.indices,primitiveType:i.primitiveType,boundingSphere:f,offsetAttribute:t._offsetAttribute})};Q.createShadowVolume=function(t,e,n){let r=t._granularity,a=t._ellipsoid,c=e(r,a),l=n(r,a);return new Q({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:a,stRotation:t._stRotation,granularity:r,extrudedHeight:l,height:c,vertexFormat:X.POSITION_ONLY,shadowVolume:!0})};var vt=new E,se=[new G,new G,new G],re=new At,ce=new _t;function le(t){if(t._stRotation===0)return[0,0,0,1,1,0];let e=E.clone(t._rectangle,vt),n=t._granularity,r=t._ellipsoid,a=t._rotation-t._stRotation,c=Ht(e,n,a,r,vt),l=se;l[0].x=c.west,l[0].y=c.south,l[1].x=c.west,l[1].y=c.north,l[2].x=c.east,l[2].y=c.south;let u=t.rectangle,d=At.fromRotation(t._stRotation,re),p=E.center(u,ce);for(let h=0;h<3;++h){let g=l[h];g.x-=p.longitude,g.y-=p.latitude,At.multiplyByVector(d,g,g),g.x+=p.longitude,g.y+=p.latitude,g.x=(g.x-u.west)/u.width,g.y=(g.y-u.south)/u.height}let o=l[0],i=l[1],f=l[2],s=new Array(6);return G.pack(o,s),G.pack(i,s,2),G.pack(f,s,4),s}Object.defineProperties(Q.prototype,{rectangle:{get:function(){return $(this._rotatedRectangle)||(this._rotatedRectangle=Ht(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return $(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=le(this)),this._textureCoordinateRotationPoints}}});var Ot=Q;function fe(t,e){return $(e)&&(t=Ot.unpack(t,e)),t._ellipsoid=H.clone(t._ellipsoid),t._rectangle=E.clone(t._rectangle),Ot.createGeometry(t)}var Ye=fe;export{Ye as default};
public/CimSDK/Workers/createRectangleOutlineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as C}from"./chunk-QF4KKRQA.js";import{a as v}from"./chunk-55FFQILS.js";import{b as z}from"./chunk-IRIBHMN7.js";import"./chunk-EPQZOCRV.js";import{a as O}from"./chunk-ZDNS2GYV.js";import{a as Y}from"./chunk-LH4TAMBV.js";import{b as B,c as q,d as y}from"./chunk-TNSV6TPX.js";import{d as R}from"./chunk-QHUUGFLC.js";import{i as b}from"./chunk-BHJLM5NY.js";import{a as T}from"./chunk-3LWOQSP3.js";import{b as U,c as M,e as w}from"./chunk-7DK7KB7Q.js";import{a as P}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as E}from"./chunk-5HWP5DW7.js";import{a as N}from"./chunk-INT7THOB.js";import{e as S}from"./chunk-PPCZYYBW.js";var j=new R,K=new R,Q=new U,W=new b;function F(t,e){let i=t._ellipsoid,m=e.height,s=e.width,h=e.northCap,a=e.southCap,_=m,A=2,o=0,g=4;h&&(A-=1,_-=1,o+=1,g-=2),a&&(A-=1,_-=1,o+=1,g-=2),o+=A*s+2*_-g;let n=new Float64Array(o*3),l=0,f=0,p,r=Q;if(h)C.computePosition(e,i,!1,f,0,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;else for(p=0;p<s;p++)C.computePosition(e,i,!1,f,p,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;for(p=s-1,f=1;f<m;f++)C.computePosition(e,i,!1,f,p,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;if(f=m-1,!a)for(p=s-2;p>=0;p--)C.computePosition(e,i,!1,f,p,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;for(p=0,f=m-2;f>0;f--)C.computePosition(e,i,!1,f,p,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;let u=n.length/3*2,c=O.createTypedArray(n.length/3,u),H=0;for(let D=0;D<n.length/3-1;D++)c[H++]=D,c[H++]=D+1;c[H++]=n.length/3-1,c[H++]=0;let d=new q({attributes:new Y,primitiveType:B.LINES});return d.attributes.position=new y({componentDatatype:T.DOUBLE,componentsPerAttribute:3,values:n}),d.indices=c,d}function X(t,e){let i=t._surfaceHeight,m=t._extrudedHeight,s=t._ellipsoid,h=F(t,e),a=e.height,_=e.width,A=z.scaleToGeodeticHeight(h.attributes.position.values,i,s,!1),o=A.length,g=new Float64Array(o*2);g.set(A);let n=z.scaleToGeodeticHeight(h.attributes.position.values,m,s);g.set(n,o),h.attributes.position.values=g;let l=e.northCap,f=e.southCap,p=4;l&&(p-=1),f&&(p-=1);let r=(g.length/3+p)*2,u=O.createTypedArray(g.length/3,r);o=g.length/6;let c=0;for(let d=0;d<o-1;d++)u[c++]=d,u[c++]=d+1,u[c++]=d+o,u[c++]=d+o+1;u[c++]=o-1,u[c++]=0,u[c++]=o+o-1,u[c++]=o,u[c++]=0,u[c++]=o;let H;if(l)H=a-1;else{let d=_-1;u[c++]=d,u[c++]=d+o,H=_+a-2}if(u[c++]=H,u[c++]=H+o,!f){let d=_+H-1;u[c++]=d,u[c]=d+o}return h.indices=u,h}function L(t){t=E(t,E.EMPTY_OBJECT);let e=t.rectangle,i=E(t.granularity,P.RADIANS_PER_DEGREE),m=E(t.ellipsoid,w.default),s=E(t.rotation,0);if(!S(e))throw new N("rectangle is required.");if(b._validate(e),e.north<e.south)throw new N("options.rectangle.north must be greater than options.rectangle.south");let h=E(t.height,0),a=E(t.extrudedHeight,h);this._rectangle=b.clone(e),this._granularity=i,this._ellipsoid=m,this._surfaceHeight=Math.max(h,a),this._rotation=s,this._extrudedHeight=Math.min(h,a),this._offsetAttribute=t.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}L.packedLength=b.packedLength+w.packedLength+5;L.pack=function(t,e,i){if(!S(t))throw new N("value is required");if(!S(e))throw new N("array is required");return i=E(i,0),b.pack(t._rectangle,e,i),i+=b.packedLength,w.pack(t._ellipsoid,e,i),i+=w.packedLength,e[i++]=t._granularity,e[i++]=t._surfaceHeight,e[i++]=t._rotation,e[i++]=t._extrudedHeight,e[i]=E(t._offsetAttribute,-1),e};var V=new b,J=w.clone(w.UNIT_SPHERE),k={rectangle:V,ellipsoid:J,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};L.unpack=function(t,e,i){if(!S(t))throw new N("array is required");e=E(e,0);let m=b.unpack(t,e,V);e+=b.packedLength;let s=w.unpack(t,e,J);e+=w.packedLength;let h=t[e++],a=t[e++],_=t[e++],A=t[e++],o=t[e];return S(i)?(i._rectangle=b.clone(m,i._rectangle),i._ellipsoid=w.clone(s,i._ellipsoid),i._surfaceHeight=a,i._rotation=_,i._extrudedHeight=A,i._offsetAttribute=o===-1?void 0:o,i):(k.granularity=h,k.height=a,k.rotation=_,k.extrudedHeight=A,k.offsetAttribute=o===-1?void 0:o,new L(k))};var Z=new M;L.createGeometry=function(t){let e=t._rectangle,i=t._ellipsoid,m=C.computeOptions(e,t._granularity,t._rotation,0,W,Z),s,h;if(P.equalsEpsilon(e.north,e.south,P.EPSILON10)||P.equalsEpsilon(e.east,e.west,P.EPSILON10))return;let a=t._surfaceHeight,_=t._extrudedHeight,A=!P.equalsEpsilon(a,_,0,P.EPSILON2),o;if(A){if(s=X(t,m),S(t._offsetAttribute)){let l=s.attributes.position.values.length/3,f=new Uint8Array(l);t._offsetAttribute===v.TOP?f=f.fill(1,0,l/2):(o=t._offsetAttribute===v.NONE?0:1,f=f.fill(o)),s.attributes.applyOffset=new y({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}let g=R.fromRectangle3D(e,i,a,K),n=R.fromRectangle3D(e,i,_,j);h=R.union(g,n)}else{if(s=F(t,m),s.attributes.position.values=z.scaleToGeodeticHeight(s.attributes.position.values,a,i,!1),S(t._offsetAttribute)){let g=s.attributes.position.values.length;o=t._offsetAttribute===v.NONE?0:1;let n=new Uint8Array(g/3).fill(o);s.attributes.applyOffset=new y({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}h=R.fromRectangle3D(e,i,a)}return new q({attributes:s.attributes,indices:s.indices,primitiveType:B.LINES,boundingSphere:h,offsetAttribute:t._offsetAttribute})};var x=L;function $(t,e){return S(e)&&(t=x.unpack(t,e)),t._ellipsoid=w.clone(t._ellipsoid),t._rectangle=b.clone(t._rectangle),x.createGeometry(t)}var Et=$;export{Et as default};
import{a as C}from"./chunk-QPIV5DSQ.js";import{a as v}from"./chunk-55FFQILS.js";import{b as z}from"./chunk-VDNLYVKB.js";import"./chunk-V5KKODOM.js";import{a as O}from"./chunk-563CJZT3.js";import{a as Y}from"./chunk-LH4TAMBV.js";import{b as B,c as q,d as y}from"./chunk-WI5KIEME.js";import{d as R}from"./chunk-ZPW6H6BB.js";import{i as b}from"./chunk-HMXXHGCW.js";import{a as T}from"./chunk-NFDMGE7Q.js";import{b as U,c as M,e as w}from"./chunk-VDZXURWO.js";import{a as P}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as E}from"./chunk-5HWP5DW7.js";import{a as N}from"./chunk-3K67FZLU.js";import{e as S}from"./chunk-55TU6MJR.js";var j=new R,K=new R,Q=new U,W=new b;function F(t,e){let i=t._ellipsoid,m=e.height,s=e.width,h=e.northCap,a=e.southCap,_=m,A=2,o=0,g=4;h&&(A-=1,_-=1,o+=1,g-=2),a&&(A-=1,_-=1,o+=1,g-=2),o+=A*s+2*_-g;let n=new Float64Array(o*3),l=0,f=0,p,r=Q;if(h)C.computePosition(e,i,!1,f,0,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;else for(p=0;p<s;p++)C.computePosition(e,i,!1,f,p,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;for(p=s-1,f=1;f<m;f++)C.computePosition(e,i,!1,f,p,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;if(f=m-1,!a)for(p=s-2;p>=0;p--)C.computePosition(e,i,!1,f,p,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;for(p=0,f=m-2;f>0;f--)C.computePosition(e,i,!1,f,p,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;let u=n.length/3*2,c=O.createTypedArray(n.length/3,u),H=0;for(let D=0;D<n.length/3-1;D++)c[H++]=D,c[H++]=D+1;c[H++]=n.length/3-1,c[H++]=0;let d=new q({attributes:new Y,primitiveType:B.LINES});return d.attributes.position=new y({componentDatatype:T.DOUBLE,componentsPerAttribute:3,values:n}),d.indices=c,d}function X(t,e){let i=t._surfaceHeight,m=t._extrudedHeight,s=t._ellipsoid,h=F(t,e),a=e.height,_=e.width,A=z.scaleToGeodeticHeight(h.attributes.position.values,i,s,!1),o=A.length,g=new Float64Array(o*2);g.set(A);let n=z.scaleToGeodeticHeight(h.attributes.position.values,m,s);g.set(n,o),h.attributes.position.values=g;let l=e.northCap,f=e.southCap,p=4;l&&(p-=1),f&&(p-=1);let r=(g.length/3+p)*2,u=O.createTypedArray(g.length/3,r);o=g.length/6;let c=0;for(let d=0;d<o-1;d++)u[c++]=d,u[c++]=d+1,u[c++]=d+o,u[c++]=d+o+1;u[c++]=o-1,u[c++]=0,u[c++]=o+o-1,u[c++]=o,u[c++]=0,u[c++]=o;let H;if(l)H=a-1;else{let d=_-1;u[c++]=d,u[c++]=d+o,H=_+a-2}if(u[c++]=H,u[c++]=H+o,!f){let d=_+H-1;u[c++]=d,u[c]=d+o}return h.indices=u,h}function L(t){t=E(t,E.EMPTY_OBJECT);let e=t.rectangle,i=E(t.granularity,P.RADIANS_PER_DEGREE),m=E(t.ellipsoid,w.default),s=E(t.rotation,0);if(!S(e))throw new N("rectangle is required.");if(b._validate(e),e.north<e.south)throw new N("options.rectangle.north must be greater than options.rectangle.south");let h=E(t.height,0),a=E(t.extrudedHeight,h);this._rectangle=b.clone(e),this._granularity=i,this._ellipsoid=m,this._surfaceHeight=Math.max(h,a),this._rotation=s,this._extrudedHeight=Math.min(h,a),this._offsetAttribute=t.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}L.packedLength=b.packedLength+w.packedLength+5;L.pack=function(t,e,i){if(!S(t))throw new N("value is required");if(!S(e))throw new N("array is required");return i=E(i,0),b.pack(t._rectangle,e,i),i+=b.packedLength,w.pack(t._ellipsoid,e,i),i+=w.packedLength,e[i++]=t._granularity,e[i++]=t._surfaceHeight,e[i++]=t._rotation,e[i++]=t._extrudedHeight,e[i]=E(t._offsetAttribute,-1),e};var V=new b,J=w.clone(w.UNIT_SPHERE),k={rectangle:V,ellipsoid:J,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};L.unpack=function(t,e,i){if(!S(t))throw new N("array is required");e=E(e,0);let m=b.unpack(t,e,V);e+=b.packedLength;let s=w.unpack(t,e,J);e+=w.packedLength;let h=t[e++],a=t[e++],_=t[e++],A=t[e++],o=t[e];return S(i)?(i._rectangle=b.clone(m,i._rectangle),i._ellipsoid=w.clone(s,i._ellipsoid),i._surfaceHeight=a,i._rotation=_,i._extrudedHeight=A,i._offsetAttribute=o===-1?void 0:o,i):(k.granularity=h,k.height=a,k.rotation=_,k.extrudedHeight=A,k.offsetAttribute=o===-1?void 0:o,new L(k))};var Z=new M;L.createGeometry=function(t){let e=t._rectangle,i=t._ellipsoid,m=C.computeOptions(e,t._granularity,t._rotation,0,W,Z),s,h;if(P.equalsEpsilon(e.north,e.south,P.EPSILON10)||P.equalsEpsilon(e.east,e.west,P.EPSILON10))return;let a=t._surfaceHeight,_=t._extrudedHeight,A=!P.equalsEpsilon(a,_,0,P.EPSILON2),o;if(A){if(s=X(t,m),S(t._offsetAttribute)){let l=s.attributes.position.values.length/3,f=new Uint8Array(l);t._offsetAttribute===v.TOP?f=f.fill(1,0,l/2):(o=t._offsetAttribute===v.NONE?0:1,f=f.fill(o)),s.attributes.applyOffset=new y({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}let g=R.fromRectangle3D(e,i,a,K),n=R.fromRectangle3D(e,i,_,j);h=R.union(g,n)}else{if(s=F(t,m),s.attributes.position.values=z.scaleToGeodeticHeight(s.attributes.position.values,a,i,!1),S(t._offsetAttribute)){let g=s.attributes.position.values.length;o=t._offsetAttribute===v.NONE?0:1;let n=new Uint8Array(g/3).fill(o);s.attributes.applyOffset=new y({componentDatatype:T.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}h=R.fromRectangle3D(e,i,a)}return new q({attributes:s.attributes,indices:s.indices,primitiveType:B.LINES,boundingSphere:h,offsetAttribute:t._offsetAttribute})};var x=L;function $(t,e){return S(e)&&(t=x.unpack(t,e)),t._ellipsoid=w.clone(t._ellipsoid),t._rectangle=b.clone(t._rectangle),x.createGeometry(t)}var Et=$;export{Et as default};
public/CimSDK/Workers/createSimplePolylineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as r}from"./chunk-6PVEYJU3.js";import{a as S}from"./chunk-3B3UDCHP.js";import{a as E}from"./chunk-WGRWYGAM.js";import"./chunk-5B7R4ODL.js";import"./chunk-EPQZOCRV.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{a as X}from"./chunk-ZDNS2GYV.js";import{a as W}from"./chunk-LH4TAMBV.js";import{b as K,c as Q,d as Y}from"./chunk-TNSV6TPX.js";import{d as j}from"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import{a as H}from"./chunk-3LWOQSP3.js";import{b as k,e as b}from"./chunk-7DK7KB7Q.js";import{a as q}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as w}from"./chunk-5HWP5DW7.js";import{a as L}from"./chunk-INT7THOB.js";import{e as u}from"./chunk-PPCZYYBW.js";function Z(t,e,o,i,s,l,p){let g=E.numberOfPoints(t,e,s),f,n=o.red,m=o.green,d=o.blue,T=o.alpha,c=i.red,h=i.green,y=i.blue,V=i.alpha;if(r.equals(o,i)){for(f=0;f<g;f++)l[p++]=r.floatToByte(n),l[p++]=r.floatToByte(m),l[p++]=r.floatToByte(d),l[p++]=r.floatToByte(T);return p}let M=(c-n)/g,C=(h-m)/g,G=(y-d)/g,_=(V-T)/g,a=p;for(f=0;f<g;f++)l[a++]=r.floatToByte(n+f*M),l[a++]=r.floatToByte(m+f*C),l[a++]=r.floatToByte(d+f*G),l[a++]=r.floatToByte(T+f*_);return a}function R(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions,o=t.colors,i=w(t.colorsPerVertex,!1);if(!u(e)||e.length<2)throw new L("At least two positions are required.");if(u(o)&&(i&&o.length<e.length||!i&&o.length<e.length-1))throw new L("colors has an invalid length.");this._positions=e,this._colors=o,this._colorsPerVertex=i,this._arcType=w(t.arcType,S.GEODESIC),this._granularity=w(t.granularity,q.RADIANS_PER_DEGREE),this._ellipsoid=w(t.ellipsoid,b.default),this._workerName="createSimplePolylineGeometry";let s=1+e.length*k.packedLength;s+=u(o)?1+o.length*r.packedLength:1,this.packedLength=s+b.packedLength+3}R.pack=function(t,e,o){if(!u(t))throw new L("value is required");if(!u(e))throw new L("array is required");o=w(o,0);let i,s=t._positions,l=s.length;for(e[o++]=l,i=0;i<l;++i,o+=k.packedLength)k.pack(s[i],e,o);let p=t._colors;for(l=u(p)?p.length:0,e[o++]=l,i=0;i<l;++i,o+=r.packedLength)r.pack(p[i],e,o);return b.pack(t._ellipsoid,e,o),o+=b.packedLength,e[o++]=t._colorsPerVertex?1:0,e[o++]=t._arcType,e[o]=t._granularity,e};R.unpack=function(t,e,o){if(!u(t))throw new L("array is required");e=w(e,0);let i,s=t[e++],l=new Array(s);for(i=0;i<s;++i,e+=k.packedLength)l[i]=k.unpack(t,e);s=t[e++];let p=s>0?new Array(s):void 0;for(i=0;i<s;++i,e+=r.packedLength)p[i]=r.unpack(t,e);let g=b.unpack(t,e);e+=b.packedLength;let f=t[e++]===1,n=t[e++],m=t[e];return u(o)?(o._positions=l,o._colors=p,o._ellipsoid=g,o._colorsPerVertex=f,o._arcType=n,o._granularity=m,o):new R({positions:l,colors:p,ellipsoid:g,colorsPerVertex:f,arcType:n,granularity:m})};var F=new Array(2),N=new Array(2),$={positions:F,height:N,ellipsoid:void 0,minDistance:void 0,granularity:void 0};R.createGeometry=function(t){let e=t._positions,o=t._colors,i=t._colorsPerVertex,s=t._arcType,l=t._granularity,p=t._ellipsoid,g=q.chordLength(l,p.maximumRadius),f=u(o)&&!i,n,m=e.length,d,T,c,h,y=0;if(s===S.GEODESIC||s===S.RHUMB){let _,a,P;s===S.GEODESIC?(_=q.chordLength(l,p.maximumRadius),a=E.numberOfPoints,P=E.generateArc):(_=l,a=E.numberOfPointsRhumbLine,P=E.generateRhumbArc);let v=E.extractHeights(e,p),B=$;if(s===S.GEODESIC?B.minDistance=g:B.granularity=l,B.ellipsoid=p,f){let A=0;for(n=0;n<m-1;n++)A+=a(e[n],e[n+1],_)+1;d=new Float64Array(A*3),c=new Uint8Array(A*4),B.positions=F,B.height=N;let D=0;for(n=0;n<m-1;++n){F[0]=e[n],F[1]=e[n+1],N[0]=v[n],N[1]=v[n+1];let O=P(B);if(u(o)){let z=O.length/3;h=o[n];for(let U=0;U<z;++U)c[D++]=r.floatToByte(h.red),c[D++]=r.floatToByte(h.green),c[D++]=r.floatToByte(h.blue),c[D++]=r.floatToByte(h.alpha)}d.set(O,y),y+=O.length}}else if(B.positions=e,B.height=v,d=new Float64Array(P(B)),u(o)){for(c=new Uint8Array(d.length/3*4),n=0;n<m-1;++n){let D=e[n],O=e[n+1],z=o[n],U=o[n+1];y=Z(D,O,z,U,g,c,y)}let A=o[m-1];c[y++]=r.floatToByte(A.red),c[y++]=r.floatToByte(A.green),c[y++]=r.floatToByte(A.blue),c[y++]=r.floatToByte(A.alpha)}}else{T=f?m*2-2:m,d=new Float64Array(T*3),c=u(o)?new Uint8Array(T*4):void 0;let _=0,a=0;for(n=0;n<m;++n){let P=e[n];if(f&&n>0&&(k.pack(P,d,_),_+=3,h=o[n-1],c[a++]=r.floatToByte(h.red),c[a++]=r.floatToByte(h.green),c[a++]=r.floatToByte(h.blue),c[a++]=r.floatToByte(h.alpha)),f&&n===m-1)break;k.pack(P,d,_),_+=3,u(o)&&(h=o[n],c[a++]=r.floatToByte(h.red),c[a++]=r.floatToByte(h.green),c[a++]=r.floatToByte(h.blue),c[a++]=r.floatToByte(h.alpha))}}let V=new W;V.position=new Y({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:d}),u(o)&&(V.color=new Y({componentDatatype:H.UNSIGNED_BYTE,componentsPerAttribute:4,values:c,normalize:!0})),T=d.length/3;let M=(T-1)*2,C=X.createTypedArray(T,M),G=0;for(n=0;n<T-1;++n)C[G++]=n,C[G++]=n+1;return new Q({attributes:V,indices:C,primitiveType:K.LINES,boundingSphere:j.fromPoints(e)})};var J=R;function x(t,e){return u(e)&&(t=J.unpack(t,e)),t._ellipsoid=b.clone(t._ellipsoid),J.createGeometry(t)}var _e=x;export{_e as default};
import{a as r}from"./chunk-Q2L33INS.js";import{a as S}from"./chunk-3B3UDCHP.js";import{a as E}from"./chunk-XDTNLL4L.js";import"./chunk-45NF2JU3.js";import"./chunk-V5KKODOM.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{a as X}from"./chunk-563CJZT3.js";import{a as W}from"./chunk-LH4TAMBV.js";import{b as K,c as Q,d as Y}from"./chunk-WI5KIEME.js";import{d as j}from"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import{a as H}from"./chunk-NFDMGE7Q.js";import{b as k,e as b}from"./chunk-VDZXURWO.js";import{a as q}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as w}from"./chunk-5HWP5DW7.js";import{a as L}from"./chunk-3K67FZLU.js";import{e as u}from"./chunk-55TU6MJR.js";function Z(t,e,o,i,s,l,p){let g=E.numberOfPoints(t,e,s),f,n=o.red,m=o.green,d=o.blue,T=o.alpha,c=i.red,h=i.green,y=i.blue,V=i.alpha;if(r.equals(o,i)){for(f=0;f<g;f++)l[p++]=r.floatToByte(n),l[p++]=r.floatToByte(m),l[p++]=r.floatToByte(d),l[p++]=r.floatToByte(T);return p}let M=(c-n)/g,C=(h-m)/g,G=(y-d)/g,_=(V-T)/g,a=p;for(f=0;f<g;f++)l[a++]=r.floatToByte(n+f*M),l[a++]=r.floatToByte(m+f*C),l[a++]=r.floatToByte(d+f*G),l[a++]=r.floatToByte(T+f*_);return a}function R(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions,o=t.colors,i=w(t.colorsPerVertex,!1);if(!u(e)||e.length<2)throw new L("At least two positions are required.");if(u(o)&&(i&&o.length<e.length||!i&&o.length<e.length-1))throw new L("colors has an invalid length.");this._positions=e,this._colors=o,this._colorsPerVertex=i,this._arcType=w(t.arcType,S.GEODESIC),this._granularity=w(t.granularity,q.RADIANS_PER_DEGREE),this._ellipsoid=w(t.ellipsoid,b.default),this._workerName="createSimplePolylineGeometry";let s=1+e.length*k.packedLength;s+=u(o)?1+o.length*r.packedLength:1,this.packedLength=s+b.packedLength+3}R.pack=function(t,e,o){if(!u(t))throw new L("value is required");if(!u(e))throw new L("array is required");o=w(o,0);let i,s=t._positions,l=s.length;for(e[o++]=l,i=0;i<l;++i,o+=k.packedLength)k.pack(s[i],e,o);let p=t._colors;for(l=u(p)?p.length:0,e[o++]=l,i=0;i<l;++i,o+=r.packedLength)r.pack(p[i],e,o);return b.pack(t._ellipsoid,e,o),o+=b.packedLength,e[o++]=t._colorsPerVertex?1:0,e[o++]=t._arcType,e[o]=t._granularity,e};R.unpack=function(t,e,o){if(!u(t))throw new L("array is required");e=w(e,0);let i,s=t[e++],l=new Array(s);for(i=0;i<s;++i,e+=k.packedLength)l[i]=k.unpack(t,e);s=t[e++];let p=s>0?new Array(s):void 0;for(i=0;i<s;++i,e+=r.packedLength)p[i]=r.unpack(t,e);let g=b.unpack(t,e);e+=b.packedLength;let f=t[e++]===1,n=t[e++],m=t[e];return u(o)?(o._positions=l,o._colors=p,o._ellipsoid=g,o._colorsPerVertex=f,o._arcType=n,o._granularity=m,o):new R({positions:l,colors:p,ellipsoid:g,colorsPerVertex:f,arcType:n,granularity:m})};var F=new Array(2),N=new Array(2),$={positions:F,height:N,ellipsoid:void 0,minDistance:void 0,granularity:void 0};R.createGeometry=function(t){let e=t._positions,o=t._colors,i=t._colorsPerVertex,s=t._arcType,l=t._granularity,p=t._ellipsoid,g=q.chordLength(l,p.maximumRadius),f=u(o)&&!i,n,m=e.length,d,T,c,h,y=0;if(s===S.GEODESIC||s===S.RHUMB){let _,a,P;s===S.GEODESIC?(_=q.chordLength(l,p.maximumRadius),a=E.numberOfPoints,P=E.generateArc):(_=l,a=E.numberOfPointsRhumbLine,P=E.generateRhumbArc);let v=E.extractHeights(e,p),B=$;if(s===S.GEODESIC?B.minDistance=g:B.granularity=l,B.ellipsoid=p,f){let A=0;for(n=0;n<m-1;n++)A+=a(e[n],e[n+1],_)+1;d=new Float64Array(A*3),c=new Uint8Array(A*4),B.positions=F,B.height=N;let D=0;for(n=0;n<m-1;++n){F[0]=e[n],F[1]=e[n+1],N[0]=v[n],N[1]=v[n+1];let O=P(B);if(u(o)){let z=O.length/3;h=o[n];for(let U=0;U<z;++U)c[D++]=r.floatToByte(h.red),c[D++]=r.floatToByte(h.green),c[D++]=r.floatToByte(h.blue),c[D++]=r.floatToByte(h.alpha)}d.set(O,y),y+=O.length}}else if(B.positions=e,B.height=v,d=new Float64Array(P(B)),u(o)){for(c=new Uint8Array(d.length/3*4),n=0;n<m-1;++n){let D=e[n],O=e[n+1],z=o[n],U=o[n+1];y=Z(D,O,z,U,g,c,y)}let A=o[m-1];c[y++]=r.floatToByte(A.red),c[y++]=r.floatToByte(A.green),c[y++]=r.floatToByte(A.blue),c[y++]=r.floatToByte(A.alpha)}}else{T=f?m*2-2:m,d=new Float64Array(T*3),c=u(o)?new Uint8Array(T*4):void 0;let _=0,a=0;for(n=0;n<m;++n){let P=e[n];if(f&&n>0&&(k.pack(P,d,_),_+=3,h=o[n-1],c[a++]=r.floatToByte(h.red),c[a++]=r.floatToByte(h.green),c[a++]=r.floatToByte(h.blue),c[a++]=r.floatToByte(h.alpha)),f&&n===m-1)break;k.pack(P,d,_),_+=3,u(o)&&(h=o[n],c[a++]=r.floatToByte(h.red),c[a++]=r.floatToByte(h.green),c[a++]=r.floatToByte(h.blue),c[a++]=r.floatToByte(h.alpha))}}let V=new W;V.position=new Y({componentDatatype:H.DOUBLE,componentsPerAttribute:3,values:d}),u(o)&&(V.color=new Y({componentDatatype:H.UNSIGNED_BYTE,componentsPerAttribute:4,values:c,normalize:!0})),T=d.length/3;let M=(T-1)*2,C=X.createTypedArray(T,M),G=0;for(n=0;n<T-1;++n)C[G++]=n,C[G++]=n+1;return new Q({attributes:V,indices:C,primitiveType:K.LINES,boundingSphere:j.fromPoints(e)})};var J=R;function x(t,e){return u(e)&&(t=J.unpack(t,e)),t._ellipsoid=b.clone(t._ellipsoid),J.createGeometry(t)}var _e=x;export{_e as default};
public/CimSDK/Workers/createSphereGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as r}from"./chunk-KHV4IJNQ.js";import"./chunk-55FFQILS.js";import{a as m}from"./chunk-WF3WCQMH.js";import"./chunk-ZDNS2GYV.js";import"./chunk-LH4TAMBV.js";import"./chunk-TNSV6TPX.js";import"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import{b as s}from"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as l}from"./chunk-5HWP5DW7.js";import{b as p}from"./chunk-INT7THOB.js";import{e as c}from"./chunk-PPCZYYBW.js";function n(e){let t=l(e.radius,1),o={radii:new s(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new r(o),this._workerName="createSphereGeometry"}n.packedLength=r.packedLength;n.pack=function(e,t,a){return p.typeOf.object("value",e),r.pack(e._ellipsoidGeometry,t,a)};var f=new r,i={radius:void 0,radii:new s,vertexFormat:new m,stackPartitions:void 0,slicePartitions:void 0};n.unpack=function(e,t,a){let o=r.unpack(e,t,f);return i.vertexFormat=m.clone(o._vertexFormat,i.vertexFormat),i.stackPartitions=o._stackPartitions,i.slicePartitions=o._slicePartitions,c(a)?(s.clone(o._radii,i.radii),a._ellipsoidGeometry=new r(i),a):(i.radius=o._radii.x,new n(i))};n.createGeometry=function(e){return r.createGeometry(e._ellipsoidGeometry)};var d=n;function u(e,t){return c(t)&&(e=d.unpack(e,t)),d.createGeometry(e)}var v=u;export{v as default};
import{a as r}from"./chunk-IUDUZUOX.js";import"./chunk-55FFQILS.js";import{a as m}from"./chunk-32UDSAPU.js";import"./chunk-563CJZT3.js";import"./chunk-LH4TAMBV.js";import"./chunk-WI5KIEME.js";import"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import{b as s}from"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as l}from"./chunk-5HWP5DW7.js";import{b as p}from"./chunk-3K67FZLU.js";import{e as c}from"./chunk-55TU6MJR.js";function n(e){let t=l(e.radius,1),o={radii:new s(t,t,t),stackPartitions:e.stackPartitions,slicePartitions:e.slicePartitions,vertexFormat:e.vertexFormat};this._ellipsoidGeometry=new r(o),this._workerName="createSphereGeometry"}n.packedLength=r.packedLength;n.pack=function(e,t,a){return p.typeOf.object("value",e),r.pack(e._ellipsoidGeometry,t,a)};var f=new r,i={radius:void 0,radii:new s,vertexFormat:new m,stackPartitions:void 0,slicePartitions:void 0};n.unpack=function(e,t,a){let o=r.unpack(e,t,f);return i.vertexFormat=m.clone(o._vertexFormat,i.vertexFormat),i.stackPartitions=o._stackPartitions,i.slicePartitions=o._slicePartitions,c(a)?(s.clone(o._radii,i.radii),a._ellipsoidGeometry=new r(i),a):(i.radius=o._radii.x,new n(i))};n.createGeometry=function(e){return r.createGeometry(e._ellipsoidGeometry)};var d=n;function u(e,t){return c(t)&&(e=d.unpack(e,t)),d.createGeometry(e)}var v=u;export{v as default};
public/CimSDK/Workers/createSphereOutlineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as t}from"./chunk-NGLWZE27.js";import"./chunk-55FFQILS.js";import"./chunk-ZDNS2GYV.js";import"./chunk-LH4TAMBV.js";import"./chunk-TNSV6TPX.js";import"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import{b as d}from"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as l}from"./chunk-5HWP5DW7.js";import{b as u}from"./chunk-INT7THOB.js";import{e as a}from"./chunk-PPCZYYBW.js";function s(i){let e=l(i.radius,1),r={radii:new d(e,e,e),stackPartitions:i.stackPartitions,slicePartitions:i.slicePartitions,subdivisions:i.subdivisions};this._ellipsoidGeometry=new t(r),this._workerName="createSphereOutlineGeometry"}s.packedLength=t.packedLength;s.pack=function(i,e,o){return u.typeOf.object("value",i),t.pack(i._ellipsoidGeometry,e,o)};var m=new t,n={radius:void 0,radii:new d,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};s.unpack=function(i,e,o){let r=t.unpack(i,e,m);return n.stackPartitions=r._stackPartitions,n.slicePartitions=r._slicePartitions,n.subdivisions=r._subdivisions,a(o)?(d.clone(r._radii,n.radii),o._ellipsoidGeometry=new t(n),o):(n.radius=r._radii.x,new s(n))};s.createGeometry=function(i){return t.createGeometry(i._ellipsoidGeometry)};var c=s;function p(i,e){return a(e)&&(i=c.unpack(i,e)),c.createGeometry(i)}var w=p;export{w as default};
import{a as t}from"./chunk-NGYBTBZC.js";import"./chunk-55FFQILS.js";import"./chunk-563CJZT3.js";import"./chunk-LH4TAMBV.js";import"./chunk-WI5KIEME.js";import"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import{b as d}from"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as l}from"./chunk-5HWP5DW7.js";import{b as u}from"./chunk-3K67FZLU.js";import{e as a}from"./chunk-55TU6MJR.js";function s(i){let e=l(i.radius,1),r={radii:new d(e,e,e),stackPartitions:i.stackPartitions,slicePartitions:i.slicePartitions,subdivisions:i.subdivisions};this._ellipsoidGeometry=new t(r),this._workerName="createSphereOutlineGeometry"}s.packedLength=t.packedLength;s.pack=function(i,e,o){return u.typeOf.object("value",i),t.pack(i._ellipsoidGeometry,e,o)};var m=new t,n={radius:void 0,radii:new d,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0};s.unpack=function(i,e,o){let r=t.unpack(i,e,m);return n.stackPartitions=r._stackPartitions,n.slicePartitions=r._slicePartitions,n.subdivisions=r._subdivisions,a(o)?(d.clone(r._radii,n.radii),o._ellipsoidGeometry=new t(n),o):(n.radius=r._radii.x,new s(n))};s.createGeometry=function(i){return t.createGeometry(i._ellipsoidGeometry)};var c=s;function p(i,e){return a(e)&&(i=c.unpack(i,e)),c.createGeometry(i)}var w=p;export{w as default};
public/CimSDK/Workers/createTaskProcessorWorker.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a}from"./chunk-CQELY6Z3.js";import"./chunk-PPCZYYBW.js";export{a as default};
import{a}from"./chunk-6MN6BBPN.js";import"./chunk-55TU6MJR.js";export{a as default};
public/CimSDK/Workers/createVectorTileClampedPolylines.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as J}from"./chunk-CQELY6Z3.js";import{a as Y}from"./chunk-HV57XH4K.js";import{a as B}from"./chunk-ZDNS2GYV.js";import{c as X,i as W}from"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import{b as t,c as k,e as _}from"./chunk-7DK7KB7Q.js";import{a as v}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import"./chunk-INT7THOB.js";import"./chunk-PPCZYYBW.js";var V=32767,it=Math.cos(v.toRadians(150)),ct=new k,rt=new t;function at(e,o,c,i,s,A,h){let g=e.length,f=new Float64Array(g*3);for(let d=0;d<g;++d){let l=e[d],r=o[d],E=c[d],n=v.lerp(i.west,i.east,l/V),p=v.lerp(i.south,i.north,r/V),w=v.lerp(s,A,E/V),x=k.fromRadians(n,p,w,ct),P=h.cartographicToCartesian(x,rt);t.pack(P,f,d*3)}return f}function dt(e){let o=e.length,c=new Uint32Array(o+1),i=0;for(let s=0;s<o;++s)c[s]=i,i+=e[s];return c[o]=i,c}var lt=new k,ht=new k;function ft(e,o,c,i){let s=i.length,A=e.length,h=new Uint8Array(A),g=lt,f=ht,d=0;for(let r=0;r<s;r++){let E=i[r],n=E;for(let p=1;p<E;p++){let w=d+p,x=w-1;f.longitude=e[w],f.latitude=o[w],g.longitude=e[x],g.latitude=o[x],k.equals(f,g)&&(n--,h[x]=1)}i[r]=n,d+=E}let l=0;for(let r=0;r<A;r++)h[r]!==1&&(e[l]=e[r],o[l]=o[r],c[l]=c[r],l++)}function ot(e){let o=e*8,c=o*3,i=o*4;this.startEllipsoidNormals=new Float32Array(c),this.endEllipsoidNormals=new Float32Array(c),this.startPositionAndHeights=new Float32Array(i),this.startFaceNormalAndVertexCornerIds=new Float32Array(i),this.endPositionAndHeights=new Float32Array(i),this.endFaceNormalAndHalfWidths=new Float32Array(i),this.vertexBatchIds=new Uint16Array(o),this.indices=B.createTypedArray(o,36*e),this.vec3Offset=0,this.vec4Offset=0,this.batchIdOffset=0,this.indexOffset=0,this.volumeStartIndex=0}var Q=new t,pt=new t;function $(e,o,c,i,s){let A=t.subtract(c,o,pt),h=t.subtract(o,e,Q);return t.normalize(A,A),t.normalize(h,h),t.dot(A,h)<it&&(h=t.multiplyByScalar(h,-1,Q)),t.add(A,h,s),t.equals(s,t.ZERO)&&(s=t.subtract(e,o)),t.cross(s,i,s),t.cross(i,s,s),t.normalize(s,s),s}var st=[0,2,6,0,6,4,0,1,3,0,3,2,0,4,5,0,5,1,5,3,1,5,7,3,7,5,4,7,4,6,7,6,2,7,2,3],j=st.length,tt=new t,ut=new t,mt=new t,At=new t,Nt=new t;ot.prototype.addVolume=function(e,o,c,i,s,A,h,g,f,d){let l=t.add(o,f,tt),r=d.geodeticSurfaceNormal(l,ut);l=t.add(c,f,tt);let E=d.geodeticSurfaceNormal(l,At),n=$(e,o,c,r,mt),p=$(i,c,o,E,Nt),w=this.startEllipsoidNormals,x=this.endEllipsoidNormals,P=this.startPositionAndHeights,H=this.startFaceNormalAndVertexCornerIds,b=this.endPositionAndHeights,a=this.endFaceNormalAndHalfWidths,F=this.vertexBatchIds,m=this.batchIdOffset,I=this.vec3Offset,u=this.vec4Offset,N;for(N=0;N<8;N++)t.pack(r,w,I),t.pack(E,x,I),t.pack(o,P,u),P[u+3]=s,t.pack(c,b,u),b[u+3]=A,t.pack(n,H,u),H[u+3]=N,t.pack(p,a,u),a[u+3]=h,F[m++]=g,I+=3,u+=4;this.batchIdOffset=m,this.vec3Offset=I,this.vec4Offset=u;let C=this.indices,y=this.volumeStartIndex,z=this.indexOffset;for(N=0;N<j;N++)C[z+N]=st[N]+y;this.volumeStartIndex+=8,this.indexOffset+=j};var gt=new W,Et=new _,wt=new t,M=new t,It=new t,xt=new t,T=new t;function Pt(e,o){let c=new Uint16Array(e.positions),i=new Uint16Array(e.widths),s=new Uint32Array(e.counts),A=new Uint16Array(e.batchIds),h=gt,g=Et,f=wt,d=new Float64Array(e.packedBuffer),l=0,r=d[l++],E=d[l++];W.unpack(d,l,h),l+=W.packedLength,_.unpack(d,l,g),l+=_.packedLength,t.unpack(d,l,f);let n,p=c.length/3,w=c.subarray(0,p),x=c.subarray(p,2*p),P=c.subarray(2*p,3*p);Y.zigZagDeltaDecode(w,x,P),ft(w,x,P,s);let H=s.length,b=0;for(n=0;n<H;n++){let y=s[n];b+=y-1}let a=new ot(b),F=at(w,x,P,h,r,E,g,f);p=w.length;let m=new Float32Array(p*3);for(n=0;n<p;++n)m[n*3]=F[n*3]-f.x,m[n*3+1]=F[n*3+1]-f.y,m[n*3+2]=F[n*3+2]-f.z;let I=0,u=0;for(n=0;n<H;n++){let y=s[n]-1,z=i[n]*.5,et=A[n],q=I;for(let D=0;D<y;D++){let S=t.unpack(m,I,It),O=t.unpack(m,I+3,xt),G=P[u],Z=P[u+1];G=v.lerp(r,E,G/V),Z=v.lerp(r,E,Z/V),u++;let L=M,R=T;if(D===0){let U=q+y*3,K=t.unpack(m,U,M);if(t.equals(K,S))t.unpack(m,U-3,L);else{let nt=t.subtract(S,O,M);L=t.add(nt,S,M)}}else t.unpack(m,I-3,L);if(D===y-1){let U=t.unpack(m,q,T);if(t.equals(U,O))t.unpack(m,q+3,R);else{let K=t.subtract(O,S,T);R=t.add(K,O,T)}}else t.unpack(m,I+6,R);a.addVolume(L,S,O,R,G,Z,z,et,f,g),I+=3}I+=3,u++}let N=a.indices;o.push(a.startEllipsoidNormals.buffer),o.push(a.endEllipsoidNormals.buffer),o.push(a.startPositionAndHeights.buffer),o.push(a.startFaceNormalAndVertexCornerIds.buffer),o.push(a.endPositionAndHeights.buffer),o.push(a.endFaceNormalAndHalfWidths.buffer),o.push(a.vertexBatchIds.buffer),o.push(N.buffer);let C={indexDatatype:N.BYTES_PER_ELEMENT===2?B.UNSIGNED_SHORT:B.UNSIGNED_INT,startEllipsoidNormals:a.startEllipsoidNormals.buffer,endEllipsoidNormals:a.endEllipsoidNormals.buffer,startPositionAndHeights:a.startPositionAndHeights.buffer,startFaceNormalAndVertexCornerIds:a.startFaceNormalAndVertexCornerIds.buffer,endPositionAndHeights:a.endPositionAndHeights.buffer,endFaceNormalAndHalfWidths:a.endFaceNormalAndHalfWidths.buffer,vertexBatchIds:a.vertexBatchIds.buffer,indices:N.buffer};if(e.keepDecodedPositions){let y=dt(s);o.push(F.buffer,y.buffer),C=X(C,{decodedPositions:F.buffer,decodedPositionOffsets:y.buffer})}return C}var Vt=J(Pt);export{Vt as default};
import{a as J}from"./chunk-6MN6BBPN.js";import{a as Y}from"./chunk-EZRSLM27.js";import{a as B}from"./chunk-563CJZT3.js";import{c as X,i as W}from"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import{b as t,c as k,e as _}from"./chunk-VDZXURWO.js";import{a as v}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import"./chunk-3K67FZLU.js";import"./chunk-55TU6MJR.js";var V=32767,it=Math.cos(v.toRadians(150)),ct=new k,rt=new t;function at(e,o,c,i,s,A,h){let g=e.length,f=new Float64Array(g*3);for(let d=0;d<g;++d){let l=e[d],r=o[d],E=c[d],n=v.lerp(i.west,i.east,l/V),p=v.lerp(i.south,i.north,r/V),w=v.lerp(s,A,E/V),x=k.fromRadians(n,p,w,ct),P=h.cartographicToCartesian(x,rt);t.pack(P,f,d*3)}return f}function dt(e){let o=e.length,c=new Uint32Array(o+1),i=0;for(let s=0;s<o;++s)c[s]=i,i+=e[s];return c[o]=i,c}var lt=new k,ht=new k;function ft(e,o,c,i){let s=i.length,A=e.length,h=new Uint8Array(A),g=lt,f=ht,d=0;for(let r=0;r<s;r++){let E=i[r],n=E;for(let p=1;p<E;p++){let w=d+p,x=w-1;f.longitude=e[w],f.latitude=o[w],g.longitude=e[x],g.latitude=o[x],k.equals(f,g)&&(n--,h[x]=1)}i[r]=n,d+=E}let l=0;for(let r=0;r<A;r++)h[r]!==1&&(e[l]=e[r],o[l]=o[r],c[l]=c[r],l++)}function ot(e){let o=e*8,c=o*3,i=o*4;this.startEllipsoidNormals=new Float32Array(c),this.endEllipsoidNormals=new Float32Array(c),this.startPositionAndHeights=new Float32Array(i),this.startFaceNormalAndVertexCornerIds=new Float32Array(i),this.endPositionAndHeights=new Float32Array(i),this.endFaceNormalAndHalfWidths=new Float32Array(i),this.vertexBatchIds=new Uint16Array(o),this.indices=B.createTypedArray(o,36*e),this.vec3Offset=0,this.vec4Offset=0,this.batchIdOffset=0,this.indexOffset=0,this.volumeStartIndex=0}var Q=new t,pt=new t;function $(e,o,c,i,s){let A=t.subtract(c,o,pt),h=t.subtract(o,e,Q);return t.normalize(A,A),t.normalize(h,h),t.dot(A,h)<it&&(h=t.multiplyByScalar(h,-1,Q)),t.add(A,h,s),t.equals(s,t.ZERO)&&(s=t.subtract(e,o)),t.cross(s,i,s),t.cross(i,s,s),t.normalize(s,s),s}var st=[0,2,6,0,6,4,0,1,3,0,3,2,0,4,5,0,5,1,5,3,1,5,7,3,7,5,4,7,4,6,7,6,2,7,2,3],j=st.length,tt=new t,ut=new t,mt=new t,At=new t,Nt=new t;ot.prototype.addVolume=function(e,o,c,i,s,A,h,g,f,d){let l=t.add(o,f,tt),r=d.geodeticSurfaceNormal(l,ut);l=t.add(c,f,tt);let E=d.geodeticSurfaceNormal(l,At),n=$(e,o,c,r,mt),p=$(i,c,o,E,Nt),w=this.startEllipsoidNormals,x=this.endEllipsoidNormals,P=this.startPositionAndHeights,H=this.startFaceNormalAndVertexCornerIds,b=this.endPositionAndHeights,a=this.endFaceNormalAndHalfWidths,F=this.vertexBatchIds,m=this.batchIdOffset,I=this.vec3Offset,u=this.vec4Offset,N;for(N=0;N<8;N++)t.pack(r,w,I),t.pack(E,x,I),t.pack(o,P,u),P[u+3]=s,t.pack(c,b,u),b[u+3]=A,t.pack(n,H,u),H[u+3]=N,t.pack(p,a,u),a[u+3]=h,F[m++]=g,I+=3,u+=4;this.batchIdOffset=m,this.vec3Offset=I,this.vec4Offset=u;let C=this.indices,y=this.volumeStartIndex,z=this.indexOffset;for(N=0;N<j;N++)C[z+N]=st[N]+y;this.volumeStartIndex+=8,this.indexOffset+=j};var gt=new W,Et=new _,wt=new t,M=new t,It=new t,xt=new t,T=new t;function Pt(e,o){let c=new Uint16Array(e.positions),i=new Uint16Array(e.widths),s=new Uint32Array(e.counts),A=new Uint16Array(e.batchIds),h=gt,g=Et,f=wt,d=new Float64Array(e.packedBuffer),l=0,r=d[l++],E=d[l++];W.unpack(d,l,h),l+=W.packedLength,_.unpack(d,l,g),l+=_.packedLength,t.unpack(d,l,f);let n,p=c.length/3,w=c.subarray(0,p),x=c.subarray(p,2*p),P=c.subarray(2*p,3*p);Y.zigZagDeltaDecode(w,x,P),ft(w,x,P,s);let H=s.length,b=0;for(n=0;n<H;n++){let y=s[n];b+=y-1}let a=new ot(b),F=at(w,x,P,h,r,E,g,f);p=w.length;let m=new Float32Array(p*3);for(n=0;n<p;++n)m[n*3]=F[n*3]-f.x,m[n*3+1]=F[n*3+1]-f.y,m[n*3+2]=F[n*3+2]-f.z;let I=0,u=0;for(n=0;n<H;n++){let y=s[n]-1,z=i[n]*.5,et=A[n],q=I;for(let D=0;D<y;D++){let S=t.unpack(m,I,It),O=t.unpack(m,I+3,xt),G=P[u],Z=P[u+1];G=v.lerp(r,E,G/V),Z=v.lerp(r,E,Z/V),u++;let L=M,R=T;if(D===0){let U=q+y*3,K=t.unpack(m,U,M);if(t.equals(K,S))t.unpack(m,U-3,L);else{let nt=t.subtract(S,O,M);L=t.add(nt,S,M)}}else t.unpack(m,I-3,L);if(D===y-1){let U=t.unpack(m,q,T);if(t.equals(U,O))t.unpack(m,q+3,R);else{let K=t.subtract(O,S,T);R=t.add(K,O,T)}}else t.unpack(m,I+6,R);a.addVolume(L,S,O,R,G,Z,z,et,f,g),I+=3}I+=3,u++}let N=a.indices;o.push(a.startEllipsoidNormals.buffer),o.push(a.endEllipsoidNormals.buffer),o.push(a.startPositionAndHeights.buffer),o.push(a.startFaceNormalAndVertexCornerIds.buffer),o.push(a.endPositionAndHeights.buffer),o.push(a.endFaceNormalAndHalfWidths.buffer),o.push(a.vertexBatchIds.buffer),o.push(N.buffer);let C={indexDatatype:N.BYTES_PER_ELEMENT===2?B.UNSIGNED_SHORT:B.UNSIGNED_INT,startEllipsoidNormals:a.startEllipsoidNormals.buffer,endEllipsoidNormals:a.endEllipsoidNormals.buffer,startPositionAndHeights:a.startPositionAndHeights.buffer,startFaceNormalAndVertexCornerIds:a.startFaceNormalAndVertexCornerIds.buffer,endPositionAndHeights:a.endPositionAndHeights.buffer,endFaceNormalAndHalfWidths:a.endFaceNormalAndHalfWidths.buffer,vertexBatchIds:a.vertexBatchIds.buffer,indices:N.buffer};if(e.keepDecodedPositions){let y=dt(s);o.push(F.buffer,y.buffer),C=X(C,{decodedPositions:F.buffer,decodedPositionOffsets:y.buffer})}return C}var Vt=J(Pt);export{Vt as default};
public/CimSDK/Workers/createVectorTileGeometries.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as P}from"./chunk-6PVEYJU3.js";import{a as z}from"./chunk-CLLS3XBT.js";import"./chunk-H34PG7L2.js";import{a as H}from"./chunk-KHV4IJNQ.js";import{a as Y}from"./chunk-CQELY6Z3.js";import{a as j}from"./chunk-VYRAY47W.js";import"./chunk-55FFQILS.js";import"./chunk-WF3WCQMH.js";import{a as W}from"./chunk-ZDNS2GYV.js";import"./chunk-LH4TAMBV.js";import"./chunk-TNSV6TPX.js";import{d as E}from"./chunk-QHUUGFLC.js";import{b as d}from"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import{b as o}from"./chunk-7DK7KB7Q.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import"./chunk-INT7THOB.js";import{e as l}from"./chunk-PPCZYYBW.js";function X(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var J=X;var S=new o,$=d.packedLength+o.packedLength,ee=d.packedLength+2,ne=d.packedLength+o.packedLength,te=o.packedLength+1,u={modelMatrix:new d,boundingVolume:new E};function oe(e,c){let n=c*$,i=o.unpack(e,n,S);n+=o.packedLength;let r=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(r,i,r);let t=u.boundingVolume;return o.clone(o.ZERO,t.center),t.radius=Math.sqrt(3),u}function ce(e,c){let n=c*ee,i=e[n++],r=e[n++],t=o.fromElements(i,i,r,S),s=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(s,t,s);let h=u.boundingVolume;return o.clone(o.ZERO,h.center),h.radius=Math.sqrt(2),u}function se(e,c){let n=c*ne,i=o.unpack(e,n,S);n+=o.packedLength;let r=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(r,i,r);let t=u.boundingVolume;return o.clone(o.ZERO,t.center),t.radius=1,u}function ie(e,c){let n=c*te,i=e[n++],r=o.unpack(e,n,S),t=d.fromTranslation(r,u.modelMatrix);d.multiplyByUniformScale(t,i,t);let s=u.boundingVolume;return o.clone(o.ZERO,s.center),s.radius=1,u}var de=new o;function R(e,c,n,i,r){if(!l(c))return;let t=n.length,s=i.attributes.position.values,h=i.indices,a=e.positions,x=e.vertexBatchIds,y=e.indices,I=e.batchIds,p=e.batchTableColors,T=e.batchedIndices,U=e.indexOffsets,v=e.indexCounts,L=e.boundingVolumes,F=e.modelMatrix,Z=e.center,V=e.positionOffset,B=e.batchIdIndex,O=e.indexOffset,D=e.batchedIndicesOffset;for(let w=0;w<t;++w){let C=r(c,w),k=C.modelMatrix;d.multiply(F,k,k);let M=n[w],A=s.length;for(let f=0;f<A;f+=3){let m=o.unpack(s,f,de);d.multiplyByPoint(k,m,m),o.subtract(m,Z,m),o.pack(m,a,V*3+f),x[B++]=M}let b=h.length;for(let f=0;f<b;++f)y[O+f]=h[f]+V;let g=w+D;T[g]=new J({offset:O,count:b,color:P.fromRgba(p[M]),batchIds:[M]}),I[g]=M,U[g]=O,v[g]=b,L[g]=E.transform(C.boundingVolume,k),V+=A/3,O+=b}e.positionOffset=V,e.batchIdIndex=B,e.indexOffset=O,e.batchedIndicesOffset+=t}var K=new o,Q=new d;function re(e){let c=new Float64Array(e),n=0;o.unpack(c,n,K),n+=o.packedLength,d.unpack(c,n,Q)}function le(e){let c=e.length,n=0;for(let i=0;i<c;++i)n+=P.packedLength+3+e[i].batchIds.length;return n}function ae(e,c,n){let i=n.length,r=2+i*E.packedLength+1+le(c),t=new Float64Array(r),s=0;t[s++]=e,t[s++]=i;for(let a=0;a<i;++a)E.pack(n[a],t,s),s+=E.packedLength;let h=c.length;t[s++]=h;for(let a=0;a<h;++a){let x=c[a];P.pack(x.color,t,s),s+=P.packedLength,t[s++]=x.offset,t[s++]=x.count;let y=x.batchIds,I=y.length;t[s++]=I;for(let p=0;p<I;++p)t[s++]=y[p]}return t}function fe(e,c){let n=l(e.boxes)?new Float32Array(e.boxes):void 0,i=l(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,r=l(e.cylinders)?new Float32Array(e.cylinders):void 0,t=l(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,s=l(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,h=l(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,a=l(e.spheres)?new Float32Array(e.spheres):void 0,x=l(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,y=l(n)?i.length:0,I=l(r)?t.length:0,p=l(s)?h.length:0,T=l(a)?x.length:0,U=j.getUnitBox(),v=z.getUnitCylinder(),L=H.getUnitEllipsoid(),F=U.attributes.position.values,Z=v.attributes.position.values,V=L.attributes.position.values,B=F.length*y;B+=Z.length*I,B+=V.length*(p+T);let O=U.indices,D=v.indices,w=L.indices,C=O.length*y;C+=D.length*I,C+=w.length*(p+T);let k=new Float32Array(B),M=new Uint16Array(B/3),A=W.createTypedArray(B/3,C),b=y+I+p+T,g=new Uint16Array(b),f=new Array(b),m=new Uint32Array(b),q=new Uint32Array(b),_=new Array(b);re(e.packedBuffer);let G={batchTableColors:new Uint32Array(e.batchTableColors),positions:k,vertexBatchIds:M,indices:A,batchIds:g,batchedIndices:f,indexOffsets:m,indexCounts:q,boundingVolumes:_,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:Q,center:K};R(G,n,i,U,oe),R(G,r,t,v,ce),R(G,s,h,L,se),R(G,a,x,L,ie);let N=ae(A.BYTES_PER_ELEMENT,f,_);return c.push(k.buffer,M.buffer,A.buffer),c.push(g.buffer,m.buffer,q.buffer),c.push(N.buffer),{positions:k.buffer,vertexBatchIds:M.buffer,indices:A.buffer,indexOffsets:m.buffer,indexCounts:q.buffer,batchIds:g.buffer,packedBuffer:N.buffer}}var Oe=Y(fe);export{Oe as default};
import{a as P}from"./chunk-Q2L33INS.js";import{a as z}from"./chunk-IQP74IF6.js";import"./chunk-4DMLXFUJ.js";import{a as H}from"./chunk-IUDUZUOX.js";import{a as Y}from"./chunk-6MN6BBPN.js";import{a as j}from"./chunk-JZ3QHGBZ.js";import"./chunk-55FFQILS.js";import"./chunk-32UDSAPU.js";import{a as W}from"./chunk-563CJZT3.js";import"./chunk-LH4TAMBV.js";import"./chunk-WI5KIEME.js";import{d as E}from"./chunk-ZPW6H6BB.js";import{b as d}from"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import{b as o}from"./chunk-VDZXURWO.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import"./chunk-3K67FZLU.js";import{e as l}from"./chunk-55TU6MJR.js";function X(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var J=X;var S=new o,$=d.packedLength+o.packedLength,ee=d.packedLength+2,ne=d.packedLength+o.packedLength,te=o.packedLength+1,u={modelMatrix:new d,boundingVolume:new E};function oe(e,c){let n=c*$,i=o.unpack(e,n,S);n+=o.packedLength;let r=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(r,i,r);let t=u.boundingVolume;return o.clone(o.ZERO,t.center),t.radius=Math.sqrt(3),u}function ce(e,c){let n=c*ee,i=e[n++],r=e[n++],t=o.fromElements(i,i,r,S),s=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(s,t,s);let h=u.boundingVolume;return o.clone(o.ZERO,h.center),h.radius=Math.sqrt(2),u}function se(e,c){let n=c*ne,i=o.unpack(e,n,S);n+=o.packedLength;let r=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(r,i,r);let t=u.boundingVolume;return o.clone(o.ZERO,t.center),t.radius=1,u}function ie(e,c){let n=c*te,i=e[n++],r=o.unpack(e,n,S),t=d.fromTranslation(r,u.modelMatrix);d.multiplyByUniformScale(t,i,t);let s=u.boundingVolume;return o.clone(o.ZERO,s.center),s.radius=1,u}var de=new o;function R(e,c,n,i,r){if(!l(c))return;let t=n.length,s=i.attributes.position.values,h=i.indices,a=e.positions,x=e.vertexBatchIds,y=e.indices,I=e.batchIds,p=e.batchTableColors,T=e.batchedIndices,U=e.indexOffsets,v=e.indexCounts,L=e.boundingVolumes,F=e.modelMatrix,Z=e.center,V=e.positionOffset,B=e.batchIdIndex,O=e.indexOffset,D=e.batchedIndicesOffset;for(let w=0;w<t;++w){let C=r(c,w),k=C.modelMatrix;d.multiply(F,k,k);let M=n[w],A=s.length;for(let f=0;f<A;f+=3){let m=o.unpack(s,f,de);d.multiplyByPoint(k,m,m),o.subtract(m,Z,m),o.pack(m,a,V*3+f),x[B++]=M}let b=h.length;for(let f=0;f<b;++f)y[O+f]=h[f]+V;let g=w+D;T[g]=new J({offset:O,count:b,color:P.fromRgba(p[M]),batchIds:[M]}),I[g]=M,U[g]=O,v[g]=b,L[g]=E.transform(C.boundingVolume,k),V+=A/3,O+=b}e.positionOffset=V,e.batchIdIndex=B,e.indexOffset=O,e.batchedIndicesOffset+=t}var K=new o,Q=new d;function re(e){let c=new Float64Array(e),n=0;o.unpack(c,n,K),n+=o.packedLength,d.unpack(c,n,Q)}function le(e){let c=e.length,n=0;for(let i=0;i<c;++i)n+=P.packedLength+3+e[i].batchIds.length;return n}function ae(e,c,n){let i=n.length,r=2+i*E.packedLength+1+le(c),t=new Float64Array(r),s=0;t[s++]=e,t[s++]=i;for(let a=0;a<i;++a)E.pack(n[a],t,s),s+=E.packedLength;let h=c.length;t[s++]=h;for(let a=0;a<h;++a){let x=c[a];P.pack(x.color,t,s),s+=P.packedLength,t[s++]=x.offset,t[s++]=x.count;let y=x.batchIds,I=y.length;t[s++]=I;for(let p=0;p<I;++p)t[s++]=y[p]}return t}function fe(e,c){let n=l(e.boxes)?new Float32Array(e.boxes):void 0,i=l(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,r=l(e.cylinders)?new Float32Array(e.cylinders):void 0,t=l(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,s=l(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,h=l(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,a=l(e.spheres)?new Float32Array(e.spheres):void 0,x=l(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,y=l(n)?i.length:0,I=l(r)?t.length:0,p=l(s)?h.length:0,T=l(a)?x.length:0,U=j.getUnitBox(),v=z.getUnitCylinder(),L=H.getUnitEllipsoid(),F=U.attributes.position.values,Z=v.attributes.position.values,V=L.attributes.position.values,B=F.length*y;B+=Z.length*I,B+=V.length*(p+T);let O=U.indices,D=v.indices,w=L.indices,C=O.length*y;C+=D.length*I,C+=w.length*(p+T);let k=new Float32Array(B),M=new Uint16Array(B/3),A=W.createTypedArray(B/3,C),b=y+I+p+T,g=new Uint16Array(b),f=new Array(b),m=new Uint32Array(b),q=new Uint32Array(b),_=new Array(b);re(e.packedBuffer);let G={batchTableColors:new Uint32Array(e.batchTableColors),positions:k,vertexBatchIds:M,indices:A,batchIds:g,batchedIndices:f,indexOffsets:m,indexCounts:q,boundingVolumes:_,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:Q,center:K};R(G,n,i,U,oe),R(G,r,t,v,ce),R(G,s,h,L,se),R(G,a,x,L,ie);let N=ae(A.BYTES_PER_ELEMENT,f,_);return c.push(k.buffer,M.buffer,A.buffer),c.push(g.buffer,m.buffer,q.buffer),c.push(N.buffer),{positions:k.buffer,vertexBatchIds:M.buffer,indices:A.buffer,indexOffsets:m.buffer,indexCounts:q.buffer,batchIds:g.buffer,packedBuffer:N.buffer}}var Oe=Y(fe);export{Oe as default};
public/CimSDK/Workers/createVectorTilePoints.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as x}from"./chunk-CQELY6Z3.js";import{a as w}from"./chunk-HV57XH4K.js";import{i as c}from"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import{b as h,c as l,e as p}from"./chunk-7DK7KB7Q.js";import{a as i}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import"./chunk-INT7THOB.js";import"./chunk-PPCZYYBW.js";var u=32767,F=new l,L=new h,b=new c,y=new p,a={min:void 0,max:void 0};function V(t){t=new Float64Array(t);let o=0;a.min=t[o++],a.max=t[o++],c.unpack(t,o,b),o+=c.packedLength,p.unpack(t,o,y)}function z(t,o){let s=new Uint16Array(t.positions);V(t.packedBuffer);let e=b,C=y,A=a.min,P=a.max,n=s.length/3,f=s.subarray(0,n),g=s.subarray(n,2*n),d=s.subarray(2*n,3*n);w.zigZagDeltaDecode(f,g,d);let m=new Float64Array(s.length);for(let r=0;r<n;++r){let k=f[r],E=g[r],H=d[r],M=i.lerp(e.west,e.east,k/u),R=i.lerp(e.south,e.north,E/u),T=i.lerp(A,P,H/u),v=l.fromRadians(M,R,T,F),D=C.cartographicToCartesian(v,L);h.pack(D,m,r*3)}return o.push(m.buffer),{positions:m.buffer}}var G=x(z);export{G as default};
import{a as x}from"./chunk-6MN6BBPN.js";import{a as w}from"./chunk-EZRSLM27.js";import{i as c}from"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import{b as h,c as l,e as p}from"./chunk-VDZXURWO.js";import{a as i}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import"./chunk-3K67FZLU.js";import"./chunk-55TU6MJR.js";var u=32767,F=new l,L=new h,b=new c,y=new p,a={min:void 0,max:void 0};function V(t){t=new Float64Array(t);let o=0;a.min=t[o++],a.max=t[o++],c.unpack(t,o,b),o+=c.packedLength,p.unpack(t,o,y)}function z(t,o){let s=new Uint16Array(t.positions);V(t.packedBuffer);let e=b,C=y,A=a.min,P=a.max,n=s.length/3,f=s.subarray(0,n),g=s.subarray(n,2*n),d=s.subarray(2*n,3*n);w.zigZagDeltaDecode(f,g,d);let m=new Float64Array(s.length);for(let r=0;r<n;++r){let k=f[r],E=g[r],H=d[r],M=i.lerp(e.west,e.east,k/u),R=i.lerp(e.south,e.north,E/u),T=i.lerp(A,P,H/u),v=l.fromRadians(M,R,T,F),D=C.cartographicToCartesian(v,L);h.pack(D,m,r*3)}return o.push(m.buffer),{positions:m.buffer}}var G=x(z);export{G as default};
public/CimSDK/Workers/createVectorTilePolygons.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as R}from"./chunk-6PVEYJU3.js";import{a as It}from"./chunk-CQELY6Z3.js";import{a as M}from"./chunk-RPFXEG5U.js";import{a as bt}from"./chunk-HV57XH4K.js";import"./chunk-P5SE5XVC.js";import"./chunk-ZPRLAWII.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{a as W}from"./chunk-ZDNS2GYV.js";import"./chunk-QHUUGFLC.js";import{i as z}from"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import{b as o,c as nt,e as j}from"./chunk-7DK7KB7Q.js";import{a as et}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import"./chunk-INT7THOB.js";import{e as A}from"./chunk-PPCZYYBW.js";var kt=new o,Bt=new j,Nt=new z,E={min:void 0,max:void 0,indexBytesPerElement:void 0};function Pt(s){let u=new Float64Array(s),n=0;E.indexBytesPerElement=u[n++],E.min=u[n++],E.max=u[n++],o.unpack(u,n,kt),n+=o.packedLength,j.unpack(u,n,Bt),n+=j.packedLength,z.unpack(u,n,Nt)}function Tt(s){let u=s.length,n=0;for(let y=0;y<u;++y)n+=R.packedLength+3+s[y].batchIds.length;return n}function Ct(s,u,n){let y=u.length,O=2+y*M.packedLength+1+Tt(n),c=new Float64Array(O),i=0;c[i++]=s,c[i++]=y;for(let x=0;x<y;++x)M.pack(u[x],c,i),i+=M.packedLength;let V=n.length;c[i++]=V;for(let x=0;x<V;++x){let B=n[x];R.pack(B.color,c,i),i+=R.packedLength,c[i++]=B.offset,c[i++]=B.count;let P=B.batchIds,w=P.length;c[i++]=w;for(let h=0;h<w;++h)c[i++]=P[h]}return c}var yt=32767,wt=new o,Ht=new o,St=new o,Ut=new o,Ft=new o,Lt=new nt,Mt=new z;function Rt(s,u){Pt(s.packedBuffer);let n;E.indexBytesPerElement===2?n=new Uint16Array(s.indices):n=new Uint32Array(s.indices);let O=new Uint16Array(s.positions),c=new Uint32Array(s.counts),i=new Uint32Array(s.indexCounts),V=new Uint32Array(s.batchIds),x=new Uint32Array(s.batchTableColors),B=new Array(c.length),P=kt,w=Bt,h=Nt,ot=E.min,st=E.max,T=s.minimumHeights,C=s.maximumHeights;A(T)&&A(C)&&(T=new Float32Array(T),C=new Float32Array(C));let t,f,l,N=O.length/2,ct=O.subarray(0,N),it=O.subarray(N,2*N);bt.zigZagDeltaDecode(ct,it);let rt=new Float64Array(N*3);for(t=0;t<N;++t){let e=ct[t],p=it[t],L=et.lerp(h.west,h.east,e/yt),k=et.lerp(h.south,h.north,p/yt),b=nt.fromRadians(L,k,0,Lt),Y=w.cartographicToCartesian(b,wt);o.pack(Y,rt,t*3)}let H=c.length,at=new Array(H),Z=new Array(H),ft=0,lt=0;for(t=0;t<H;++t)at[t]=ft,Z[t]=lt,ft+=c[t],lt+=i[t];let S=new Float32Array(N*3*2),_=new Uint16Array(N*2),D=new Uint32Array(Z.length),G=new Uint32Array(i.length),r=[],g={};for(t=0;t<H;++t)l=x[t],A(g[l])?(g[l].positionLength+=c[t],g[l].indexLength+=i[t],g[l].batchIds.push(t)):g[l]={positionLength:c[t],indexLength:i[t],offset:0,indexOffset:0,batchIds:[t]};let a,dt=0,ht=0;for(l in g)if(g.hasOwnProperty(l)){a=g[l],a.offset=dt,a.indexOffset=ht;let e=a.positionLength*2,p=a.indexLength*2+a.positionLength*6;dt+=e,ht+=p,a.indexLength=p}let U=[];for(l in g)g.hasOwnProperty(l)&&(a=g[l],U.push({color:R.fromRgba(parseInt(l)),offset:a.indexOffset,count:a.indexLength,batchIds:a.batchIds}));for(t=0;t<H;++t){l=x[t],a=g[l];let e=a.offset,p=e*3,L=e,k=at[t],b=c[t],Y=V[t],mt=ot,gt=st;A(T)&&A(C)&&(mt=T[t],gt=C[t]);let q=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY,K=Number.POSITIVE_INFINITY,Q=Number.NEGATIVE_INFINITY;for(f=0;f<b;++f){let m=o.unpack(rt,k*3+f*3,wt);w.scaleToGeodeticSurface(m,m);let I=w.cartesianToCartographic(m,Lt),F=I.latitude,pt=I.longitude;q=Math.min(F,q),J=Math.max(F,J),K=Math.min(pt,K),Q=Math.max(pt,Q);let xt=w.geodeticSurfaceNormal(m,Ht),v=o.multiplyByScalar(xt,mt,St),$=o.add(m,v,Ut);v=o.multiplyByScalar(xt,gt,v);let tt=o.add(m,v,Ft);o.subtract(tt,P,tt),o.subtract($,P,$),o.pack(tt,S,p),o.pack($,S,p+3),_[L]=Y,_[L+1]=Y,p+=6,L+=2}h=Mt,h.west=K,h.east=Q,h.south=q,h.north=J,B[t]=M.fromRectangle(h,ot,st,w);let d=a.indexOffset,X=Z[t],Ot=i[t];for(D[t]=d,f=0;f<Ot;f+=3){let m=n[X+f]-k,I=n[X+f+1]-k,F=n[X+f+2]-k;r[d++]=m*2+e,r[d++]=I*2+e,r[d++]=F*2+e,r[d++]=F*2+1+e,r[d++]=I*2+1+e,r[d++]=m*2+1+e}for(f=0;f<b;++f){let m=f,I=(f+1)%b;r[d++]=m*2+1+e,r[d++]=I*2+e,r[d++]=m*2+e,r[d++]=m*2+1+e,r[d++]=I*2+1+e,r[d++]=I*2+e}a.offset+=b*2,a.indexOffset=d,G[t]=d-D[t]}r=W.createTypedArray(S.length/3,r);let At=U.length;for(let e=0;e<At;++e){let p=U[e].batchIds,L=0,k=p.length;for(let b=0;b<k;++b)L+=G[p[b]];U[e].count=L}let Et=r.BYTES_PER_ELEMENT===2?W.UNSIGNED_SHORT:W.UNSIGNED_INT,ut=Ct(Et,B,U);return u.push(S.buffer,r.buffer,D.buffer,G.buffer,_.buffer,ut.buffer),{positions:S.buffer,indices:r.buffer,indexOffsets:D.buffer,indexCounts:G.buffer,batchIds:_.buffer,packedBuffer:ut.buffer}}var Jt=It(Rt);export{Jt as default};
import{a as R}from"./chunk-Q2L33INS.js";import{a as It}from"./chunk-6MN6BBPN.js";import{a as M}from"./chunk-W5L3OOEF.js";import{a as bt}from"./chunk-EZRSLM27.js";import"./chunk-TBSK33NR.js";import"./chunk-LSAUAD4X.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{a as W}from"./chunk-563CJZT3.js";import"./chunk-ZPW6H6BB.js";import{i as z}from"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import{b as o,c as nt,e as j}from"./chunk-VDZXURWO.js";import{a as et}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import"./chunk-3K67FZLU.js";import{e as A}from"./chunk-55TU6MJR.js";var kt=new o,Bt=new j,Nt=new z,E={min:void 0,max:void 0,indexBytesPerElement:void 0};function Pt(s){let u=new Float64Array(s),n=0;E.indexBytesPerElement=u[n++],E.min=u[n++],E.max=u[n++],o.unpack(u,n,kt),n+=o.packedLength,j.unpack(u,n,Bt),n+=j.packedLength,z.unpack(u,n,Nt)}function Tt(s){let u=s.length,n=0;for(let y=0;y<u;++y)n+=R.packedLength+3+s[y].batchIds.length;return n}function Ct(s,u,n){let y=u.length,O=2+y*M.packedLength+1+Tt(n),c=new Float64Array(O),i=0;c[i++]=s,c[i++]=y;for(let x=0;x<y;++x)M.pack(u[x],c,i),i+=M.packedLength;let V=n.length;c[i++]=V;for(let x=0;x<V;++x){let B=n[x];R.pack(B.color,c,i),i+=R.packedLength,c[i++]=B.offset,c[i++]=B.count;let P=B.batchIds,w=P.length;c[i++]=w;for(let h=0;h<w;++h)c[i++]=P[h]}return c}var yt=32767,wt=new o,Ht=new o,St=new o,Ut=new o,Ft=new o,Lt=new nt,Mt=new z;function Rt(s,u){Pt(s.packedBuffer);let n;E.indexBytesPerElement===2?n=new Uint16Array(s.indices):n=new Uint32Array(s.indices);let O=new Uint16Array(s.positions),c=new Uint32Array(s.counts),i=new Uint32Array(s.indexCounts),V=new Uint32Array(s.batchIds),x=new Uint32Array(s.batchTableColors),B=new Array(c.length),P=kt,w=Bt,h=Nt,ot=E.min,st=E.max,T=s.minimumHeights,C=s.maximumHeights;A(T)&&A(C)&&(T=new Float32Array(T),C=new Float32Array(C));let t,f,l,N=O.length/2,ct=O.subarray(0,N),it=O.subarray(N,2*N);bt.zigZagDeltaDecode(ct,it);let rt=new Float64Array(N*3);for(t=0;t<N;++t){let e=ct[t],p=it[t],L=et.lerp(h.west,h.east,e/yt),k=et.lerp(h.south,h.north,p/yt),b=nt.fromRadians(L,k,0,Lt),Y=w.cartographicToCartesian(b,wt);o.pack(Y,rt,t*3)}let H=c.length,at=new Array(H),Z=new Array(H),ft=0,lt=0;for(t=0;t<H;++t)at[t]=ft,Z[t]=lt,ft+=c[t],lt+=i[t];let S=new Float32Array(N*3*2),_=new Uint16Array(N*2),D=new Uint32Array(Z.length),G=new Uint32Array(i.length),r=[],g={};for(t=0;t<H;++t)l=x[t],A(g[l])?(g[l].positionLength+=c[t],g[l].indexLength+=i[t],g[l].batchIds.push(t)):g[l]={positionLength:c[t],indexLength:i[t],offset:0,indexOffset:0,batchIds:[t]};let a,dt=0,ht=0;for(l in g)if(g.hasOwnProperty(l)){a=g[l],a.offset=dt,a.indexOffset=ht;let e=a.positionLength*2,p=a.indexLength*2+a.positionLength*6;dt+=e,ht+=p,a.indexLength=p}let U=[];for(l in g)g.hasOwnProperty(l)&&(a=g[l],U.push({color:R.fromRgba(parseInt(l)),offset:a.indexOffset,count:a.indexLength,batchIds:a.batchIds}));for(t=0;t<H;++t){l=x[t],a=g[l];let e=a.offset,p=e*3,L=e,k=at[t],b=c[t],Y=V[t],mt=ot,gt=st;A(T)&&A(C)&&(mt=T[t],gt=C[t]);let q=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY,K=Number.POSITIVE_INFINITY,Q=Number.NEGATIVE_INFINITY;for(f=0;f<b;++f){let m=o.unpack(rt,k*3+f*3,wt);w.scaleToGeodeticSurface(m,m);let I=w.cartesianToCartographic(m,Lt),F=I.latitude,pt=I.longitude;q=Math.min(F,q),J=Math.max(F,J),K=Math.min(pt,K),Q=Math.max(pt,Q);let xt=w.geodeticSurfaceNormal(m,Ht),v=o.multiplyByScalar(xt,mt,St),$=o.add(m,v,Ut);v=o.multiplyByScalar(xt,gt,v);let tt=o.add(m,v,Ft);o.subtract(tt,P,tt),o.subtract($,P,$),o.pack(tt,S,p),o.pack($,S,p+3),_[L]=Y,_[L+1]=Y,p+=6,L+=2}h=Mt,h.west=K,h.east=Q,h.south=q,h.north=J,B[t]=M.fromRectangle(h,ot,st,w);let d=a.indexOffset,X=Z[t],Ot=i[t];for(D[t]=d,f=0;f<Ot;f+=3){let m=n[X+f]-k,I=n[X+f+1]-k,F=n[X+f+2]-k;r[d++]=m*2+e,r[d++]=I*2+e,r[d++]=F*2+e,r[d++]=F*2+1+e,r[d++]=I*2+1+e,r[d++]=m*2+1+e}for(f=0;f<b;++f){let m=f,I=(f+1)%b;r[d++]=m*2+1+e,r[d++]=I*2+e,r[d++]=m*2+e,r[d++]=m*2+1+e,r[d++]=I*2+1+e,r[d++]=I*2+e}a.offset+=b*2,a.indexOffset=d,G[t]=d-D[t]}r=W.createTypedArray(S.length/3,r);let At=U.length;for(let e=0;e<At;++e){let p=U[e].batchIds,L=0,k=p.length;for(let b=0;b<k;++b)L+=G[p[b]];U[e].count=L}let Et=r.BYTES_PER_ELEMENT===2?W.UNSIGNED_SHORT:W.UNSIGNED_INT,ut=Ct(Et,B,U);return u.push(S.buffer,r.buffer,D.buffer,G.buffer,_.buffer,ut.buffer),{positions:S.buffer,indices:r.buffer,indexOffsets:D.buffer,indexCounts:G.buffer,batchIds:_.buffer,packedBuffer:ut.buffer}}var Jt=It(Rt);export{Jt as default};
public/CimSDK/Workers/createVectorTilePolylines.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as K}from"./chunk-CQELY6Z3.js";import{a as G}from"./chunk-HV57XH4K.js";import{a as S}from"./chunk-ZDNS2GYV.js";import{c as B,i as R}from"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import{b as t,c as _,e as L}from"./chunk-7DK7KB7Q.js";import{a as F}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import"./chunk-INT7THOB.js";import"./chunk-PPCZYYBW.js";var O=32767,ct=new _,rt=new t;function it(n,o,p,m,s){let d=n.length/3,U=n.subarray(0,d),v=n.subarray(d,2*d),P=n.subarray(2*d,3*d);G.zigZagDeltaDecode(U,v,P);let D=new Float64Array(n.length);for(let u=0;u<d;++u){let e=U[u],A=v[u],l=P[u],k=F.lerp(o.west,o.east,e/O),I=F.lerp(o.south,o.north,A/O),E=F.lerp(p,m,l/O),g=_.fromRadians(k,I,E,ct),C=s.cartographicToCartesian(g,rt);t.pack(C,D,u*3)}return D}var Y=it;var X=new R,$=new L,j=new t,H={min:void 0,max:void 0};function at(n){n=new Float64Array(n);let o=0;H.min=n[o++],H.max=n[o++],R.unpack(n,o,X),o+=R.packedLength,L.unpack(n,o,$),o+=L.packedLength,t.unpack(n,o,j)}function ft(n){let o=n.length,p=new Uint32Array(o+1),m=0;for(let s=0;s<o;++s)p[s]=m,m+=n[s];return p[o]=m,p}var Z=new t,q=new t,J=new t,dt=new t,Q=new t;function ut(n,o){let p=new Uint16Array(n.positions),m=new Uint16Array(n.widths),s=new Uint32Array(n.counts),d=new Uint16Array(n.batchIds);at(n.packedBuffer);let U=X,v=$,P=j,D=H.min,u=H.max,e=Y(p,U,D,u,v),A=e.length/3,l=A*4-4,k=new Float32Array(l*3),I=new Float32Array(l*3),E=new Float32Array(l*3),g=new Float32Array(l*2),C=new Uint16Array(l),N=0,z=0,tt=0,r,h=0,M=s.length;for(r=0;r<M;++r){let a=s[r],nt=m[r],ot=d[r];for(let f=0;f<a;++f){let w;if(f===0){let c=t.unpack(e,h*3,Z),T=t.unpack(e,(h+1)*3,q);w=t.subtract(c,T,J),t.add(c,w,w)}else w=t.unpack(e,(h+f-1)*3,J);let W=t.unpack(e,(h+f)*3,dt),x;if(f===a-1){let c=t.unpack(e,(h+a-1)*3,Z),T=t.unpack(e,(h+a-2)*3,q);x=t.subtract(c,T,Q),t.add(c,x,x)}else x=t.unpack(e,(h+f+1)*3,Q);t.subtract(w,P,w),t.subtract(W,P,W),t.subtract(x,P,x);let et=f===0?2:0,st=f===a-1?2:4;for(let c=et;c<st;++c){t.pack(W,k,N),t.pack(w,I,N),t.pack(x,E,N),N+=3;let T=c-2<0?-1:1;g[z++]=2*(c%2)-1,g[z++]=T*nt,C[tt++]=ot}}h+=a}let i=S.createTypedArray(l,A*6-6),b=0,y=0;for(M=A-1,r=0;r<M;++r)i[y++]=b,i[y++]=b+2,i[y++]=b+1,i[y++]=b+1,i[y++]=b+2,i[y++]=b+3,b+=4;o.push(k.buffer,I.buffer,E.buffer),o.push(g.buffer,C.buffer,i.buffer);let V={indexDatatype:i.BYTES_PER_ELEMENT===2?S.UNSIGNED_SHORT:S.UNSIGNED_INT,currentPositions:k.buffer,previousPositions:I.buffer,nextPositions:E.buffer,expandAndWidth:g.buffer,batchIds:C.buffer,indices:i.buffer};if(n.keepDecodedPositions){let a=ft(s);o.push(e.buffer,a.buffer),V=B(V,{decodedPositions:e.buffer,decodedPositionOffsets:a.buffer})}return V}var It=K(ut);export{It as default};
import{a as K}from"./chunk-6MN6BBPN.js";import{a as G}from"./chunk-EZRSLM27.js";import{a as S}from"./chunk-563CJZT3.js";import{c as B,i as R}from"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import{b as t,c as _,e as L}from"./chunk-VDZXURWO.js";import{a as F}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import"./chunk-3K67FZLU.js";import"./chunk-55TU6MJR.js";var O=32767,ct=new _,rt=new t;function it(n,o,p,m,s){let d=n.length/3,U=n.subarray(0,d),v=n.subarray(d,2*d),P=n.subarray(2*d,3*d);G.zigZagDeltaDecode(U,v,P);let D=new Float64Array(n.length);for(let u=0;u<d;++u){let e=U[u],A=v[u],l=P[u],k=F.lerp(o.west,o.east,e/O),I=F.lerp(o.south,o.north,A/O),E=F.lerp(p,m,l/O),g=_.fromRadians(k,I,E,ct),C=s.cartographicToCartesian(g,rt);t.pack(C,D,u*3)}return D}var Y=it;var X=new R,$=new L,j=new t,H={min:void 0,max:void 0};function at(n){n=new Float64Array(n);let o=0;H.min=n[o++],H.max=n[o++],R.unpack(n,o,X),o+=R.packedLength,L.unpack(n,o,$),o+=L.packedLength,t.unpack(n,o,j)}function ft(n){let o=n.length,p=new Uint32Array(o+1),m=0;for(let s=0;s<o;++s)p[s]=m,m+=n[s];return p[o]=m,p}var Z=new t,q=new t,J=new t,dt=new t,Q=new t;function ut(n,o){let p=new Uint16Array(n.positions),m=new Uint16Array(n.widths),s=new Uint32Array(n.counts),d=new Uint16Array(n.batchIds);at(n.packedBuffer);let U=X,v=$,P=j,D=H.min,u=H.max,e=Y(p,U,D,u,v),A=e.length/3,l=A*4-4,k=new Float32Array(l*3),I=new Float32Array(l*3),E=new Float32Array(l*3),g=new Float32Array(l*2),C=new Uint16Array(l),N=0,z=0,tt=0,r,h=0,M=s.length;for(r=0;r<M;++r){let a=s[r],nt=m[r],ot=d[r];for(let f=0;f<a;++f){let w;if(f===0){let c=t.unpack(e,h*3,Z),T=t.unpack(e,(h+1)*3,q);w=t.subtract(c,T,J),t.add(c,w,w)}else w=t.unpack(e,(h+f-1)*3,J);let W=t.unpack(e,(h+f)*3,dt),x;if(f===a-1){let c=t.unpack(e,(h+a-1)*3,Z),T=t.unpack(e,(h+a-2)*3,q);x=t.subtract(c,T,Q),t.add(c,x,x)}else x=t.unpack(e,(h+f+1)*3,Q);t.subtract(w,P,w),t.subtract(W,P,W),t.subtract(x,P,x);let et=f===0?2:0,st=f===a-1?2:4;for(let c=et;c<st;++c){t.pack(W,k,N),t.pack(w,I,N),t.pack(x,E,N),N+=3;let T=c-2<0?-1:1;g[z++]=2*(c%2)-1,g[z++]=T*nt,C[tt++]=ot}}h+=a}let i=S.createTypedArray(l,A*6-6),b=0,y=0;for(M=A-1,r=0;r<M;++r)i[y++]=b,i[y++]=b+2,i[y++]=b+1,i[y++]=b+1,i[y++]=b+2,i[y++]=b+3,b+=4;o.push(k.buffer,I.buffer,E.buffer),o.push(g.buffer,C.buffer,i.buffer);let V={indexDatatype:i.BYTES_PER_ELEMENT===2?S.UNSIGNED_SHORT:S.UNSIGNED_INT,currentPositions:k.buffer,previousPositions:I.buffer,nextPositions:E.buffer,expandAndWidth:g.buffer,batchIds:C.buffer,indices:i.buffer};if(n.keepDecodedPositions){let a=ft(s);o.push(e.buffer,a.buffer),V=B(V,{decodedPositions:e.buffer,decodedPositionOffsets:a.buffer})}return V}var It=K(ut);export{It as default};
public/CimSDK/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as Gt,b as Xt}from"./chunk-GNVRN42E.js";import{a as kt}from"./chunk-CQELY6Z3.js";import{a as lt}from"./chunk-DMXICNHG.js";import{a as Dt}from"./chunk-RPFXEG5U.js";import"./chunk-HV57XH4K.js";import"./chunk-P5SE5XVC.js";import{a as qt}from"./chunk-ZPRLAWII.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{d as Lt}from"./chunk-QHUUGFLC.js";import{b as $,g as Ot,i as zt}from"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import{b as P,c as N,d as wt,e as Ht}from"./chunk-7DK7KB7Q.js";import{a as r}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import{a as Vt}from"./chunk-54HAFFPJ.js";import{a as Ut}from"./chunk-5HWP5DW7.js";import"./chunk-INT7THOB.js";import{e as ht}from"./chunk-PPCZYYBW.js";var te=Uint16Array.BYTES_PER_ELEMENT,mt=Int32Array.BYTES_PER_ELEMENT,Pt=Uint32Array.BYTES_PER_ELEMENT,ee=Float32Array.BYTES_PER_ELEMENT,H=Float64Array.BYTES_PER_ELEMENT;function tt(n,l,e){e=Ut(e,r);let i=n.length;for(let c=0;c<i;++c)if(e.equalsEpsilon(n[c],l,r.EPSILON12))return c;return-1}function oe(n,l){n.ellipsoid=Ht.clone(n.ellipsoid),n.rectangle=zt.clone(n.rectangle);let e=se(n.buffer,n.relativeToCenter,n.ellipsoid,n.rectangle,n.nativeRectangle,n.exaggeration,n.exaggerationRelativeHeight,n.skirtHeight,n.includeWebMercatorT,n.negativeAltitudeExponentBias,n.negativeElevationThreshold),i=e.vertices;l.push(i.buffer);let c=e.indices;return l.push(c.buffer),{vertices:i.buffer,indices:c.buffer,numberOfAttributes:e.encoding.stride,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere3D:e.boundingSphere3D,orientedBoundingBox:e.orientedBoundingBox,occludeePointInScaledSpace:e.occludeePointInScaledSpace,encoding:e.encoding,vertexCountWithoutSkirts:e.vertexCountWithoutSkirts,indexCountWithoutSkirts:e.indexCountWithoutSkirts,westIndicesSouthToNorth:e.westIndicesSouthToNorth,southIndicesEastToWest:e.southIndicesEastToWest,eastIndicesNorthToSouth:e.eastIndicesNorthToSouth,northIndicesWestToEast:e.northIndicesWestToEast}}var u=new N,G=new P,ne=new P,ie=new P,re=new $;function se(n,l,e,i,c,et,m,ot,T,nt,it){let I,h,E,f,x,p;ht(i)?(I=i.west,h=i.south,E=i.east,f=i.north,x=i.width,p=i.height):(I=r.toRadians(c.west),h=r.toRadians(c.south),E=r.toRadians(c.east),f=r.toRadians(c.north),x=r.toRadians(i.width),p=r.toRadians(i.height));let X=[h,f],A=[I,E],V=Ot.eastNorthUpToFixedFrame(l,e),j=$.inverseTransformation(V,re),O,Q;T&&(O=lt.geodeticLatitudeToMercatorAngle(h),Q=1/(lt.geodeticLatitudeToMercatorAngle(f)-O));let y=et!==1,a=new DataView(n),z=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY,b=ne;b.x=Number.POSITIVE_INFINITY,b.y=Number.POSITIVE_INFINITY,b.z=Number.POSITIVE_INFINITY;let M=ie;M.x=Number.NEGATIVE_INFINITY,M.y=Number.NEGATIVE_INFINITY,M.z=Number.NEGATIVE_INFINITY;let o=0,S=0,At=0,rt,L;for(L=0;L<4;++L){let t=o;rt=a.getUint32(t,!0),t+=Pt;let d=r.toRadians(a.getFloat64(t,!0)*180);t+=H,tt(A,d)===-1&&A.push(d);let Y=r.toRadians(a.getFloat64(t,!0)*180);t+=H,tt(X,Y)===-1&&X.push(Y),t+=2*H;let B=a.getInt32(t,!0);t+=mt,S+=B,B=a.getInt32(t,!0),At+=B*3,o+=rt+Pt}let yt=[],bt=[],g=new Array(S),R=new Array(S),_=new Array(S),C=T?new Array(S):[],F=y?new Array(S):[],v=new Array(At),k=[],st=[],ct=[],W=[],s=0,pt=0;for(o=0,L=0;L<4;++L){rt=a.getUint32(o,!0),o+=Pt;let t=o,d=r.toRadians(a.getFloat64(o,!0)*180);o+=H;let Y=r.toRadians(a.getFloat64(o,!0)*180);o+=H;let B=r.toRadians(a.getFloat64(o,!0)*180),Ft=B*.5;o+=H;let vt=r.toRadians(a.getFloat64(o,!0)*180),Wt=vt*.5;o+=H;let Yt=a.getInt32(o,!0);o+=mt;let Zt=a.getInt32(o,!0);o+=mt,o+=mt;let St=new Array(Yt);for(let U=0;U<Yt;++U){let Z=d+a.getUint8(o++)*B;u.longitude=Z;let D=Y+a.getUint8(o++)*vt;u.latitude=D;let w=a.getFloat32(o,!0);if(o+=ee,w!==0&&w<it&&(w*=-Math.pow(2,nt)),w*=6371010,u.height=w,tt(A,Z)!==-1||tt(X,D)!==-1){let dt=tt(yt,u,N);if(dt===-1)yt.push(N.clone(u)),bt.push(s);else{St[U]=bt[dt];continue}}St[U]=s,Math.abs(Z-I)<Ft?k.push({index:s,cartographic:N.clone(u)}):Math.abs(Z-E)<Ft?ct.push({index:s,cartographic:N.clone(u)}):Math.abs(D-h)<Wt?st.push({index:s,cartographic:N.clone(u)}):Math.abs(D-f)<Wt&&W.push({index:s,cartographic:N.clone(u)}),z=Math.min(w,z),J=Math.max(w,J),_[s]=w;let Nt=e.cartographicToCartesian(u);if(g[s]=Nt,T&&(C[s]=(lt.geodeticLatitudeToMercatorAngle(D)-O)*Q),y){let dt=e.geodeticSurfaceNormal(Nt);F[s]=dt}$.multiplyByPoint(j,Nt,G),P.minimumByComponent(G,b,b),P.maximumByComponent(G,M,M);let Tt=(Z-I)/(E-I);Tt=r.clamp(Tt,0,1);let Bt=(D-h)/(f-h);Bt=r.clamp(Bt,0,1),R[s]=new wt(Tt,Bt),++s}let $t=Zt*3;for(let U=0;U<$t;++U,++pt)v[pt]=St[a.getUint16(o,!0)],o+=te;if(rt!==o-t)throw new Vt("Invalid terrain tile.")}g.length=s,R.length=s,_.length=s,T&&(C.length=s),y&&(F.length=s);let Mt=s,jt=pt,K={hMin:z,lastBorderPoint:void 0,skirtHeight:ot,toENU:j,ellipsoid:e,minimum:b,maximum:M};k.sort(function(t,d){return d.cartographic.latitude-t.cartographic.latitude}),st.sort(function(t,d){return t.cartographic.longitude-d.cartographic.longitude}),ct.sort(function(t,d){return t.cartographic.latitude-d.cartographic.latitude}),W.sort(function(t,d){return d.cartographic.longitude-t.cartographic.longitude});let q=1e-5;if(gt(g,_,R,C,F,v,K,k,-q*x,!0,-q*p),gt(g,_,R,C,F,v,K,st,-q*p,!1),gt(g,_,R,C,F,v,K,ct,q*x,!0,q*p),gt(g,_,R,C,F,v,K,W,q*p,!1),k.length>0&&W.length>0){let t=k[0].index,d=Mt,Y=W[W.length-1].index,B=g.length-1;v.push(Y,B,d,d,t,Y)}S=g.length;let Qt=Lt.fromPoints(g),Rt;ht(i)&&(Rt=Dt.fromRectangle(i,z,J,e));let Jt=new Gt(e).computeHorizonCullingPointPossiblyUnderEllipsoid(l,g,z),Kt=new qt(b,M,l),It=new Xt(l,Kt,K.hMin,J,V,!1,T,y,et,m),_t=new Float32Array(S*It.stride),Ct=0;for(let t=0;t<S;++t)Ct=It.encode(_t,Ct,g[t],R[t],_[t],void 0,C[t],F[t]);let at=k.map(function(t){return t.index}).reverse(),Et=st.map(function(t){return t.index}).reverse(),ut=ct.map(function(t){return t.index}).reverse(),xt=W.map(function(t){return t.index}).reverse();return Et.unshift(ut[ut.length-1]),Et.push(at[0]),xt.unshift(at[at.length-1]),xt.push(ut[0]),{vertices:_t,indices:new Uint16Array(v),maximumHeight:J,minimumHeight:z,encoding:It,boundingSphere3D:Qt,orientedBoundingBox:Rt,occludeePointInScaledSpace:Jt,vertexCountWithoutSkirts:Mt,indexCountWithoutSkirts:jt,westIndicesSouthToNorth:at,southIndicesEastToWest:Et,eastIndicesNorthToSouth:ut,northIndicesWestToEast:xt}}function gt(n,l,e,i,c,et,m,ot,T,nt,it){let I=ot.length;for(let h=0;h<I;++h){let E=ot[h],f=E.cartographic,x=E.index,p=n.length,X=f.longitude,A=f.latitude;A=r.clamp(A,-r.PI_OVER_TWO,r.PI_OVER_TWO);let V=f.height-m.skirtHeight;m.hMin=Math.min(m.hMin,V),N.fromRadians(X,A,V,u),nt&&(u.longitude+=T),nt?h===I-1?u.latitude+=it:h===0&&(u.latitude-=it):u.latitude+=T;let j=m.ellipsoid.cartographicToCartesian(u);n.push(j),l.push(V),e.push(wt.clone(e[x])),i.length>0&&i.push(i[x]),c.length>0&&c.push(c[x]),$.multiplyByPoint(m.toENU,j,G);let O=m.minimum,Q=m.maximum;P.minimumByComponent(G,O,O),P.maximumByComponent(G,Q,Q);let ft=m.lastBorderPoint;if(ht(ft)){let y=ft.index;et.push(y,p-1,p,p,x,y)}m.lastBorderPoint=E}}var Ae=kt(oe);export{Ae as default};
import{a as Gt,b as Xt}from"./chunk-FNJ2A2P5.js";import{a as kt}from"./chunk-6MN6BBPN.js";import{a as lt}from"./chunk-NJVIDNJ6.js";import{a as Dt}from"./chunk-W5L3OOEF.js";import"./chunk-EZRSLM27.js";import"./chunk-TBSK33NR.js";import{a as qt}from"./chunk-LSAUAD4X.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{d as Lt}from"./chunk-ZPW6H6BB.js";import{b as $,g as Ot,i as zt}from"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import{b as P,c as N,d as wt,e as Ht}from"./chunk-VDZXURWO.js";import{a as r}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import{a as Vt}from"./chunk-PZ34T7DL.js";import{a as Ut}from"./chunk-5HWP5DW7.js";import"./chunk-3K67FZLU.js";import{e as ht}from"./chunk-55TU6MJR.js";var te=Uint16Array.BYTES_PER_ELEMENT,mt=Int32Array.BYTES_PER_ELEMENT,Pt=Uint32Array.BYTES_PER_ELEMENT,ee=Float32Array.BYTES_PER_ELEMENT,H=Float64Array.BYTES_PER_ELEMENT;function tt(n,l,e){e=Ut(e,r);let i=n.length;for(let c=0;c<i;++c)if(e.equalsEpsilon(n[c],l,r.EPSILON12))return c;return-1}function oe(n,l){n.ellipsoid=Ht.clone(n.ellipsoid),n.rectangle=zt.clone(n.rectangle);let e=se(n.buffer,n.relativeToCenter,n.ellipsoid,n.rectangle,n.nativeRectangle,n.exaggeration,n.exaggerationRelativeHeight,n.skirtHeight,n.includeWebMercatorT,n.negativeAltitudeExponentBias,n.negativeElevationThreshold),i=e.vertices;l.push(i.buffer);let c=e.indices;return l.push(c.buffer),{vertices:i.buffer,indices:c.buffer,numberOfAttributes:e.encoding.stride,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere3D:e.boundingSphere3D,orientedBoundingBox:e.orientedBoundingBox,occludeePointInScaledSpace:e.occludeePointInScaledSpace,encoding:e.encoding,vertexCountWithoutSkirts:e.vertexCountWithoutSkirts,indexCountWithoutSkirts:e.indexCountWithoutSkirts,westIndicesSouthToNorth:e.westIndicesSouthToNorth,southIndicesEastToWest:e.southIndicesEastToWest,eastIndicesNorthToSouth:e.eastIndicesNorthToSouth,northIndicesWestToEast:e.northIndicesWestToEast}}var u=new N,G=new P,ne=new P,ie=new P,re=new $;function se(n,l,e,i,c,et,m,ot,T,nt,it){let I,h,E,f,x,p;ht(i)?(I=i.west,h=i.south,E=i.east,f=i.north,x=i.width,p=i.height):(I=r.toRadians(c.west),h=r.toRadians(c.south),E=r.toRadians(c.east),f=r.toRadians(c.north),x=r.toRadians(i.width),p=r.toRadians(i.height));let X=[h,f],A=[I,E],V=Ot.eastNorthUpToFixedFrame(l,e),j=$.inverseTransformation(V,re),O,Q;T&&(O=lt.geodeticLatitudeToMercatorAngle(h),Q=1/(lt.geodeticLatitudeToMercatorAngle(f)-O));let y=et!==1,a=new DataView(n),z=Number.POSITIVE_INFINITY,J=Number.NEGATIVE_INFINITY,b=ne;b.x=Number.POSITIVE_INFINITY,b.y=Number.POSITIVE_INFINITY,b.z=Number.POSITIVE_INFINITY;let M=ie;M.x=Number.NEGATIVE_INFINITY,M.y=Number.NEGATIVE_INFINITY,M.z=Number.NEGATIVE_INFINITY;let o=0,S=0,At=0,rt,L;for(L=0;L<4;++L){let t=o;rt=a.getUint32(t,!0),t+=Pt;let d=r.toRadians(a.getFloat64(t,!0)*180);t+=H,tt(A,d)===-1&&A.push(d);let Y=r.toRadians(a.getFloat64(t,!0)*180);t+=H,tt(X,Y)===-1&&X.push(Y),t+=2*H;let B=a.getInt32(t,!0);t+=mt,S+=B,B=a.getInt32(t,!0),At+=B*3,o+=rt+Pt}let yt=[],bt=[],g=new Array(S),R=new Array(S),_=new Array(S),C=T?new Array(S):[],F=y?new Array(S):[],v=new Array(At),k=[],st=[],ct=[],W=[],s=0,pt=0;for(o=0,L=0;L<4;++L){rt=a.getUint32(o,!0),o+=Pt;let t=o,d=r.toRadians(a.getFloat64(o,!0)*180);o+=H;let Y=r.toRadians(a.getFloat64(o,!0)*180);o+=H;let B=r.toRadians(a.getFloat64(o,!0)*180),Ft=B*.5;o+=H;let vt=r.toRadians(a.getFloat64(o,!0)*180),Wt=vt*.5;o+=H;let Yt=a.getInt32(o,!0);o+=mt;let Zt=a.getInt32(o,!0);o+=mt,o+=mt;let St=new Array(Yt);for(let U=0;U<Yt;++U){let Z=d+a.getUint8(o++)*B;u.longitude=Z;let D=Y+a.getUint8(o++)*vt;u.latitude=D;let w=a.getFloat32(o,!0);if(o+=ee,w!==0&&w<it&&(w*=-Math.pow(2,nt)),w*=6371010,u.height=w,tt(A,Z)!==-1||tt(X,D)!==-1){let dt=tt(yt,u,N);if(dt===-1)yt.push(N.clone(u)),bt.push(s);else{St[U]=bt[dt];continue}}St[U]=s,Math.abs(Z-I)<Ft?k.push({index:s,cartographic:N.clone(u)}):Math.abs(Z-E)<Ft?ct.push({index:s,cartographic:N.clone(u)}):Math.abs(D-h)<Wt?st.push({index:s,cartographic:N.clone(u)}):Math.abs(D-f)<Wt&&W.push({index:s,cartographic:N.clone(u)}),z=Math.min(w,z),J=Math.max(w,J),_[s]=w;let Nt=e.cartographicToCartesian(u);if(g[s]=Nt,T&&(C[s]=(lt.geodeticLatitudeToMercatorAngle(D)-O)*Q),y){let dt=e.geodeticSurfaceNormal(Nt);F[s]=dt}$.multiplyByPoint(j,Nt,G),P.minimumByComponent(G,b,b),P.maximumByComponent(G,M,M);let Tt=(Z-I)/(E-I);Tt=r.clamp(Tt,0,1);let Bt=(D-h)/(f-h);Bt=r.clamp(Bt,0,1),R[s]=new wt(Tt,Bt),++s}let $t=Zt*3;for(let U=0;U<$t;++U,++pt)v[pt]=St[a.getUint16(o,!0)],o+=te;if(rt!==o-t)throw new Vt("Invalid terrain tile.")}g.length=s,R.length=s,_.length=s,T&&(C.length=s),y&&(F.length=s);let Mt=s,jt=pt,K={hMin:z,lastBorderPoint:void 0,skirtHeight:ot,toENU:j,ellipsoid:e,minimum:b,maximum:M};k.sort(function(t,d){return d.cartographic.latitude-t.cartographic.latitude}),st.sort(function(t,d){return t.cartographic.longitude-d.cartographic.longitude}),ct.sort(function(t,d){return t.cartographic.latitude-d.cartographic.latitude}),W.sort(function(t,d){return d.cartographic.longitude-t.cartographic.longitude});let q=1e-5;if(gt(g,_,R,C,F,v,K,k,-q*x,!0,-q*p),gt(g,_,R,C,F,v,K,st,-q*p,!1),gt(g,_,R,C,F,v,K,ct,q*x,!0,q*p),gt(g,_,R,C,F,v,K,W,q*p,!1),k.length>0&&W.length>0){let t=k[0].index,d=Mt,Y=W[W.length-1].index,B=g.length-1;v.push(Y,B,d,d,t,Y)}S=g.length;let Qt=Lt.fromPoints(g),Rt;ht(i)&&(Rt=Dt.fromRectangle(i,z,J,e));let Jt=new Gt(e).computeHorizonCullingPointPossiblyUnderEllipsoid(l,g,z),Kt=new qt(b,M,l),It=new Xt(l,Kt,K.hMin,J,V,!1,T,y,et,m),_t=new Float32Array(S*It.stride),Ct=0;for(let t=0;t<S;++t)Ct=It.encode(_t,Ct,g[t],R[t],_[t],void 0,C[t],F[t]);let at=k.map(function(t){return t.index}).reverse(),Et=st.map(function(t){return t.index}).reverse(),ut=ct.map(function(t){return t.index}).reverse(),xt=W.map(function(t){return t.index}).reverse();return Et.unshift(ut[ut.length-1]),Et.push(at[0]),xt.unshift(at[at.length-1]),xt.push(ut[0]),{vertices:_t,indices:new Uint16Array(v),maximumHeight:J,minimumHeight:z,encoding:It,boundingSphere3D:Qt,orientedBoundingBox:Rt,occludeePointInScaledSpace:Jt,vertexCountWithoutSkirts:Mt,indexCountWithoutSkirts:jt,westIndicesSouthToNorth:at,southIndicesEastToWest:Et,eastIndicesNorthToSouth:ut,northIndicesWestToEast:xt}}function gt(n,l,e,i,c,et,m,ot,T,nt,it){let I=ot.length;for(let h=0;h<I;++h){let E=ot[h],f=E.cartographic,x=E.index,p=n.length,X=f.longitude,A=f.latitude;A=r.clamp(A,-r.PI_OVER_TWO,r.PI_OVER_TWO);let V=f.height-m.skirtHeight;m.hMin=Math.min(m.hMin,V),N.fromRadians(X,A,V,u),nt&&(u.longitude+=T),nt?h===I-1?u.latitude+=it:h===0&&(u.latitude-=it):u.latitude+=T;let j=m.ellipsoid.cartographicToCartesian(u);n.push(j),l.push(V),e.push(wt.clone(e[x])),i.length>0&&i.push(i[x]),c.length>0&&c.push(c[x]),$.multiplyByPoint(m.toENU,j,G);let O=m.minimum,Q=m.maximum;P.minimumByComponent(G,O,O),P.maximumByComponent(G,Q,Q);let ft=m.lastBorderPoint;if(ht(ft)){let y=ft.index;et.push(y,p-1,p,p,x,y)}m.lastBorderPoint=E}}var Ae=kt(oe);export{Ae as default};
public/CimSDK/Workers/createVerticesFromHeightmap.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as mr,b as hr}from"./chunk-GNVRN42E.js";import{a as lr}from"./chunk-CQELY6Z3.js";import{a as Ae}from"./chunk-DMXICNHG.js";import{a as cr}from"./chunk-RPFXEG5U.js";import{a as or}from"./chunk-HV57XH4K.js";import"./chunk-P5SE5XVC.js";import{a as ur}from"./chunk-ZPRLAWII.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{d as fr}from"./chunk-QHUUGFLC.js";import{b as De,g as sr,i as oe}from"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import{b as _,d as ar,e as Se}from"./chunk-7DK7KB7Q.js";import{a as Ue}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import{a as je}from"./chunk-54HAFFPJ.js";import{a as q}from"./chunk-5HWP5DW7.js";import{a as xe}from"./chunk-INT7THOB.js";import{c as Mr,d as Vr,e as ie}from"./chunk-PPCZYYBW.js";var dr=Mr((ei,Ee)=>{/* 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 M=function(){var A={};A.defaultNoDataValue=-34027999387901484e22,A.decode=function(r,a){a=a||{};var t=a.encodedMaskData||a.encodedMaskData===null,i=n(r,a.inputOffset||0,t),f=a.noDataValue!==null?a.noDataValue:A.defaultNoDataValue,o=T(i,a.pixelType||Float32Array,a.encodedMaskData,f,a.returnMask),c={width:i.width,height:i.height,pixelData:o.resultPixels,minValue:o.minValue,maxValue:i.pixels.maxValue,noDataValue:f};return o.resultMask&&(c.maskData=o.resultMask),a.returnEncodedMask&&i.mask&&(c.encodedMaskData=i.mask.bitset?i.mask.bitset:null),a.returnFileInfo&&(c.fileInfo=B(i),a.computeUsedBitDepths&&(c.fileInfo.bitDepths=W(i))),c};var T=function(r,a,t,i,f){var o=0,c=r.pixels.numBlocksX,m=r.pixels.numBlocksY,l=Math.floor(r.width/c),s=Math.floor(r.height/m),h=2*r.maxZError,u=Number.MAX_VALUE,g;t=t||(r.mask?r.mask.bitset:null);var v,U;v=new a(r.width*r.height),f&&t&&(U=new Uint8Array(r.width*r.height));for(var y=new Float32Array(l*s),V,w,S=0;S<=m;S++){var p=S!==m?s:r.height%m;if(p!==0)for(var d=0;d<=c;d++){var x=d!==c?l:r.width%c;if(x!==0){var k=S*r.width*s+d*l,D=r.width-x,I=r.pixels.blocks[o],E,F,L;I.encoding<2?(I.encoding===0?E=I.rawData:(e(I.stuffedData,I.bitsPerPixel,I.numValidPixels,I.offset,h,y,r.pixels.maxValue),E=y),F=0):I.encoding===2?L=0:L=I.offset;var X;if(t)for(w=0;w<p;w++){for(k&7&&(X=t[k>>3],X<<=k&7),V=0;V<x;V++)k&7||(X=t[k>>3]),X&128?(U&&(U[k]=1),g=I.encoding<2?E[F++]:L,u=u>g?g:u,v[k++]=g):(U&&(U[k]=0),v[k++]=i),X<<=1;k+=D}else if(I.encoding<2)for(w=0;w<p;w++){for(V=0;V<x;V++)g=E[F++],u=u>g?g:u,v[k++]=g;k+=D}else for(u=u>L?L:u,w=0;w<p;w++){for(V=0;V<x;V++)v[k++]=L;k+=D}if(I.encoding===1&&F!==I.numValidPixels)throw"Block and Mask do not match";o++}}}return{resultPixels:v,resultMask:U,minValue:u}},B=function(r){return{fileIdentifierString:r.fileIdentifierString,fileVersion:r.fileVersion,imageType:r.imageType,height:r.height,width:r.width,maxZError:r.maxZError,eofOffset:r.eofOffset,mask:r.mask?{numBlocksX:r.mask.numBlocksX,numBlocksY:r.mask.numBlocksY,numBytes:r.mask.numBytes,maxValue:r.mask.maxValue}:null,pixels:{numBlocksX:r.pixels.numBlocksX,numBlocksY:r.pixels.numBlocksY,numBytes:r.pixels.numBytes,maxValue:r.pixels.maxValue,noDataValue:r.noDataValue}}},W=function(r){for(var a=r.pixels.numBlocksX*r.pixels.numBlocksY,t={},i=0;i<a;i++){var f=r.pixels.blocks[i];f.encoding===0?t.float32=!0:f.encoding===1?t[f.bitsPerPixel]=!0:t[0]=!0}return Object.keys(t)},n=function(r,a,t){var i={},f=new Uint8Array(r,a,10);if(i.fileIdentifierString=String.fromCharCode.apply(null,f),i.fileIdentifierString.trim()!=="CntZImage")throw"Unexpected file identifier string: "+i.fileIdentifierString;a+=10;var o=new DataView(r,a,24);if(i.fileVersion=o.getInt32(0,!0),i.imageType=o.getInt32(4,!0),i.height=o.getUint32(8,!0),i.width=o.getUint32(12,!0),i.maxZError=o.getFloat64(16,!0),a+=24,!t)if(o=new DataView(r,a,16),i.mask={},i.mask.numBlocksY=o.getUint32(0,!0),i.mask.numBlocksX=o.getUint32(4,!0),i.mask.numBytes=o.getUint32(8,!0),i.mask.maxValue=o.getFloat32(12,!0),a+=16,i.mask.numBytes>0){var c=new Uint8Array(Math.ceil(i.width*i.height/8));o=new DataView(r,a,i.mask.numBytes);var m=o.getInt16(0,!0),l=2,s=0;do{if(m>0)for(;m--;)c[s++]=o.getUint8(l++);else{var h=o.getUint8(l++);for(m=-m;m--;)c[s++]=h}m=o.getInt16(l,!0),l+=2}while(l<i.mask.numBytes);if(m!==-32768||s<c.length)throw"Unexpected end of mask RLE encoding";i.mask.bitset=c,a+=i.mask.numBytes}else i.mask.numBytes|i.mask.numBlocksY|i.mask.maxValue||(i.mask.bitset=new Uint8Array(Math.ceil(i.width*i.height/8)));o=new DataView(r,a,16),i.pixels={},i.pixels.numBlocksY=o.getUint32(0,!0),i.pixels.numBlocksX=o.getUint32(4,!0),i.pixels.numBytes=o.getUint32(8,!0),i.pixels.maxValue=o.getFloat32(12,!0),a+=16;var u=i.pixels.numBlocksX,g=i.pixels.numBlocksY,v=u+(i.width%u>0?1:0),U=g+(i.height%g>0?1:0);i.pixels.blocks=new Array(v*U);for(var y=0,V=0;V<U;V++)for(var w=0;w<v;w++){var S=0,p=r.byteLength-a;o=new DataView(r,a,Math.min(10,p));var d={};i.pixels.blocks[y++]=d;var x=o.getUint8(0);if(S++,d.encoding=x&63,d.encoding>3)throw"Invalid block encoding ("+d.encoding+")";if(d.encoding===2){a++;continue}if(x!==0&&x!==2){if(x>>=6,d.offsetType=x,x===2)d.offset=o.getInt8(1),S++;else if(x===1)d.offset=o.getInt16(1,!0),S+=2;else if(x===0)d.offset=o.getFloat32(1,!0),S+=4;else throw"Invalid block offset type";if(d.encoding===1)if(x=o.getUint8(S),S++,d.bitsPerPixel=x&63,x>>=6,d.numValidPixelsType=x,x===2)d.numValidPixels=o.getUint8(S),S++;else if(x===1)d.numValidPixels=o.getUint16(S,!0),S+=2;else if(x===0)d.numValidPixels=o.getUint32(S,!0),S+=4;else throw"Invalid valid pixel count type"}if(a+=S,d.encoding!==3){var k,D;if(d.encoding===0){var I=(i.pixels.numBytes-1)/4;if(I!==Math.floor(I))throw"uncompressed block has invalid length";k=new ArrayBuffer(I*4),D=new Uint8Array(k),D.set(new Uint8Array(r,a,I*4));var E=new Float32Array(k);d.rawData=E,a+=I*4}else if(d.encoding===1){var F=Math.ceil(d.numValidPixels*d.bitsPerPixel/8),L=Math.ceil(F/4);k=new ArrayBuffer(L*4),D=new Uint8Array(k),D.set(new Uint8Array(r,a,F)),d.stuffedData=new Uint32Array(k),a+=F}}}return i.eofOffset=a,i},e=function(r,a,t,i,f,o,c){var m=(1<<a)-1,l=0,s,h=0,u,g,v=Math.ceil((c-i)/f),U=r.length*4-Math.ceil(a*t/8);for(r[r.length-1]<<=8*U,s=0;s<t;s++){if(h===0&&(g=r[l++],h=32),h>=a)u=g>>>h-a&m,h-=a;else{var y=a-h;u=(g&m)<<y&m,g=r[l++],h=32-y,u+=g>>>h}o[s]=u<v?i+u*f:c}return o};return A}(),J=function(){"use strict";var A={unstuff:function(n,e,r,a,t,i,f,o){var c=(1<<r)-1,m=0,l,s=0,h,u,g,v,U=n.length*4-Math.ceil(r*a/8);if(n[n.length-1]<<=8*U,t)for(l=0;l<a;l++)s===0&&(u=n[m++],s=32),s>=r?(h=u>>>s-r&c,s-=r):(g=r-s,h=(u&c)<<g&c,u=n[m++],s=32-g,h+=u>>>s),e[l]=t[h];else for(v=Math.ceil((o-i)/f),l=0;l<a;l++)s===0&&(u=n[m++],s=32),s>=r?(h=u>>>s-r&c,s-=r):(g=r-s,h=(u&c)<<g&c,u=n[m++],s=32-g,h+=u>>>s),e[l]=h<v?i+h*f:o},unstuffLUT:function(n,e,r,a,t,i){var f=(1<<e)-1,o=0,c=0,m=0,l=0,s=0,h,u=[],g=n.length*4-Math.ceil(e*r/8);n[n.length-1]<<=8*g;var v=Math.ceil((i-a)/t);for(c=0;c<r;c++)l===0&&(h=n[o++],l=32),l>=e?(s=h>>>l-e&f,l-=e):(m=e-l,s=(h&f)<<m&f,h=n[o++],l=32-m,s+=h>>>l),u[c]=s<v?a+s*t:i;return u.unshift(a),u},unstuff2:function(n,e,r,a,t,i,f,o){var c=(1<<r)-1,m=0,l,s=0,h=0,u,g,v;if(t)for(l=0;l<a;l++)s===0&&(g=n[m++],s=32,h=0),s>=r?(u=g>>>h&c,s-=r,h+=r):(v=r-s,u=g>>>h&c,g=n[m++],s=32-v,u|=(g&(1<<v)-1)<<r-v,h=v),e[l]=t[u];else{var U=Math.ceil((o-i)/f);for(l=0;l<a;l++)s===0&&(g=n[m++],s=32,h=0),s>=r?(u=g>>>h&c,s-=r,h+=r):(v=r-s,u=g>>>h&c,g=n[m++],s=32-v,u|=(g&(1<<v)-1)<<r-v,h=v),e[l]=u<U?i+u*f:o}return e},unstuffLUT2:function(n,e,r,a,t,i){var f=(1<<e)-1,o=0,c=0,m=0,l=0,s=0,h=0,u,g=[],v=Math.ceil((i-a)/t);for(c=0;c<r;c++)l===0&&(u=n[o++],l=32,h=0),l>=e?(s=u>>>h&f,l-=e,h+=e):(m=e-l,s=u>>>h&f,u=n[o++],l=32-m,s|=(u&(1<<m)-1)<<e-m,h=m),g[c]=s<v?a+s*t:i;return g.unshift(a),g},originalUnstuff:function(n,e,r,a){var t=(1<<r)-1,i=0,f,o=0,c,m,l,s=n.length*4-Math.ceil(r*a/8);for(n[n.length-1]<<=8*s,f=0;f<a;f++)o===0&&(m=n[i++],o=32),o>=r?(c=m>>>o-r&t,o-=r):(l=r-o,c=(m&t)<<l&t,m=n[i++],o=32-l,c+=m>>>o),e[f]=c;return e},originalUnstuff2:function(n,e,r,a){var t=(1<<r)-1,i=0,f,o=0,c=0,m,l,s;for(f=0;f<a;f++)o===0&&(l=n[i++],o=32,c=0),o>=r?(m=l>>>c&t,o-=r,c+=r):(s=r-o,m=l>>>c&t,l=n[i++],o=32-s,m|=(l&(1<<s)-1)<<r-s,c=s),e[f]=m;return e}},T={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(n){for(var e=65535,r=65535,a=n.length,t=Math.floor(a/2),i=0;t;){var f=t>=359?359:t;t-=f;do e+=n[i++]<<8,r+=e+=n[i++];while(--f);e=(e&65535)+(e>>>16),r=(r&65535)+(r>>>16)}return a&1&&(r+=e+=n[i]<<8),e=(e&65535)+(e>>>16),r=(r&65535)+(r>>>16),(r<<16|e)>>>0},readHeaderInfo:function(n,e){var r=e.ptr,a=new Uint8Array(n,r,6),t={};if(t.fileIdentifierString=String.fromCharCode.apply(null,a),t.fileIdentifierString.lastIndexOf("Lerc2",0)!==0)throw"Unexpected file identifier string (expect Lerc2 ): "+t.fileIdentifierString;r+=6;var i=new DataView(n,r,8),f=i.getInt32(0,!0);t.fileVersion=f,r+=4,f>=3&&(t.checksum=i.getUint32(4,!0),r+=4),i=new DataView(n,r,12),t.height=i.getUint32(0,!0),t.width=i.getUint32(4,!0),r+=8,f>=4?(t.numDims=i.getUint32(8,!0),r+=4):t.numDims=1,i=new DataView(n,r,40),t.numValidPixel=i.getUint32(0,!0),t.microBlockSize=i.getInt32(4,!0),t.blobSize=i.getInt32(8,!0),t.imageType=i.getInt32(12,!0),t.maxZError=i.getFloat64(16,!0),t.zMin=i.getFloat64(24,!0),t.zMax=i.getFloat64(32,!0),r+=40,e.headerInfo=t,e.ptr=r;var o,c;if(f>=3&&(c=f>=4?52:48,o=this.computeChecksumFletcher32(new Uint8Array(n,r-c,t.blobSize-14)),o!==t.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(n,e){var r=e.headerInfo,a=this.getDataTypeArray(r.imageType),t=r.numDims*this.getDataTypeSize(r.imageType),i=this.readSubArray(n,e.ptr,a,t),f=this.readSubArray(n,e.ptr+t,a,t);e.ptr+=2*t;var o,c=!0;for(o=0;o<r.numDims;o++)if(i[o]!==f[o]){c=!1;break}return r.minValues=i,r.maxValues=f,c},readSubArray:function(n,e,r,a){var t;if(r===Uint8Array)t=new Uint8Array(n,e,a);else{var i=new ArrayBuffer(a),f=new Uint8Array(i);f.set(new Uint8Array(n,e,a)),t=new r(i)}return t},readMask:function(n,e){var r=e.ptr,a=e.headerInfo,t=a.width*a.height,i=a.numValidPixel,f=new DataView(n,r,4),o={};if(o.numBytes=f.getUint32(0,!0),r+=4,(i===0||t===i)&&o.numBytes!==0)throw"invalid mask";var c,m;if(i===0)c=new Uint8Array(Math.ceil(t/8)),o.bitset=c,m=new Uint8Array(t),e.pixels.resultMask=m,r+=o.numBytes;else if(o.numBytes>0){c=new Uint8Array(Math.ceil(t/8)),f=new DataView(n,r,o.numBytes);var l=f.getInt16(0,!0),s=2,h=0,u=0;do{if(l>0)for(;l--;)c[h++]=f.getUint8(s++);else for(u=f.getUint8(s++),l=-l;l--;)c[h++]=u;l=f.getInt16(s,!0),s+=2}while(s<o.numBytes);if(l!==-32768||h<c.length)throw"Unexpected end of mask RLE encoding";m=new Uint8Array(t);var g=0,v=0;for(v=0;v<t;v++)v&7?(g=c[v>>3],g<<=v&7):g=c[v>>3],g&128&&(m[v]=1);e.pixels.resultMask=m,o.bitset=c,r+=o.numBytes}return e.ptr=r,e.mask=o,!0},readDataOneSweep:function(n,e,r){var a=e.ptr,t=e.headerInfo,i=t.numDims,f=t.width*t.height,o=t.imageType,c=t.numValidPixel*T.getDataTypeSize(o)*i,m,l=e.pixels.resultMask;if(r===Uint8Array)m=new Uint8Array(n,a,c);else{var s=new ArrayBuffer(c),h=new Uint8Array(s);h.set(new Uint8Array(n,a,c)),m=new r(s)}if(m.length===f*i)e.pixels.resultPixels=m;else{e.pixels.resultPixels=new r(f*i);var u=0,g=0,v=0,U=0;if(i>1)for(v=0;v<i;v++)for(U=v*f,g=0;g<f;g++)l[g]&&(e.pixels.resultPixels[U+g]=m[u++]);else for(g=0;g<f;g++)l[g]&&(e.pixels.resultPixels[g]=m[u++])}return a+=c,e.ptr=a,!0},readHuffmanTree:function(n,e){var r=this.HUFFMAN_LUT_BITS_MAX,a=new DataView(n,e.ptr,16);e.ptr+=16;var t=a.getInt32(0,!0);if(t<2)throw"unsupported Huffman version";var i=a.getInt32(4,!0),f=a.getInt32(8,!0),o=a.getInt32(12,!0);if(f>=o)return!1;var c=new Uint32Array(o-f);T.decodeBits(n,e,c);var m=[],l,s,h,u;for(l=f;l<o;l++)s=l-(l<i?0:i),m[s]={first:c[l-f],second:null};var g=n.byteLength-e.ptr,v=Math.ceil(g/4),U=new ArrayBuffer(v*4),y=new Uint8Array(U);y.set(new Uint8Array(n,e.ptr,g));var V=new Uint32Array(U),w=0,S,p=0;for(S=V[0],l=f;l<o;l++)s=l-(l<i?0:i),u=m[s].first,u>0&&(m[s].second=S<<w>>>32-u,32-w>=u?(w+=u,w===32&&(w=0,p++,S=V[p])):(w+=u-32,p++,S=V[p],m[s].second|=S>>>32-w));var d=0,x=0,k=new B;for(l=0;l<m.length;l++)m[l]!==void 0&&(d=Math.max(d,m[l].first));d>=r?x=r:x=d,d>=30&&console.log("WARning, large NUM LUT BITS IS "+d);var D=[],I,E,F,L,X,b;for(l=f;l<o;l++)if(s=l-(l<i?0:i),u=m[s].first,u>0)if(I=[u,s],u<=x)for(E=m[s].second<<x-u,F=1<<x-u,h=0;h<F;h++)D[E|h]=I;else for(E=m[s].second,b=k,L=u-1;L>=0;L--)X=E>>>L&1,X?(b.right||(b.right=new B),b=b.right):(b.left||(b.left=new B),b=b.left),L===0&&!b.val&&(b.val=I[1]);return{decodeLut:D,numBitsLUTQick:x,numBitsLUT:d,tree:k,stuffedData:V,srcPtr:p,bitPos:w}},readHuffman:function(n,e,r){var a=e.headerInfo,t=a.numDims,i=e.headerInfo.height,f=e.headerInfo.width,o=f*i,c=this.readHuffmanTree(n,e),m=c.decodeLut,l=c.tree,s=c.stuffedData,h=c.srcPtr,u=c.bitPos,g=c.numBitsLUTQick,v=c.numBitsLUT,U=e.headerInfo.imageType===0?128:0,y,V,w,S=e.pixels.resultMask,p,d,x,k,D,I,E,F=0;u>0&&(h++,u=0);var L=s[h],X=e.encodeMode===1,b=new r(o*t),O=b,ee;for(ee=0;ee<a.numDims;ee++){if(t>1&&(O=new r(b.buffer,o*ee,o),F=0),e.headerInfo.numValidPixel===f*i)for(I=0,k=0;k<i;k++)for(D=0;D<f;D++,I++){if(V=0,p=L<<u>>>32-g,d=p,32-u<g&&(p|=s[h+1]>>>64-u-g,d=p),m[d])V=m[d][1],u+=m[d][0];else for(p=L<<u>>>32-v,d=p,32-u<v&&(p|=s[h+1]>>>64-u-v,d=p),y=l,E=0;E<v;E++)if(x=p>>>v-E-1&1,y=x?y.right:y.left,!(y.left||y.right)){V=y.val,u=u+E+1;break}u>=32&&(u-=32,h++,L=s[h]),w=V-U,X?(D>0?w+=F:k>0?w+=O[I-f]:w+=F,w&=255,O[I]=w,F=w):O[I]=w}else for(I=0,k=0;k<i;k++)for(D=0;D<f;D++,I++)if(S[I]){if(V=0,p=L<<u>>>32-g,d=p,32-u<g&&(p|=s[h+1]>>>64-u-g,d=p),m[d])V=m[d][1],u+=m[d][0];else for(p=L<<u>>>32-v,d=p,32-u<v&&(p|=s[h+1]>>>64-u-v,d=p),y=l,E=0;E<v;E++)if(x=p>>>v-E-1&1,y=x?y.right:y.left,!(y.left||y.right)){V=y.val,u=u+E+1;break}u>=32&&(u-=32,h++,L=s[h]),w=V-U,X?(D>0&&S[I-1]?w+=F:k>0&&S[I-f]?w+=O[I-f]:w+=F,w&=255,O[I]=w,F=w):O[I]=w}e.ptr=e.ptr+(h+1)*4+(u>0?4:0)}e.pixels.resultPixels=b},decodeBits:function(n,e,r,a,t){{var i=e.headerInfo,f=i.fileVersion,o=0,c=new DataView(n,e.ptr,5),m=c.getUint8(0);o++;var l=m>>6,s=l===0?4:3-l,h=(m&32)>0,u=m&31,g=0;if(s===1)g=c.getUint8(o),o++;else if(s===2)g=c.getUint16(o,!0),o+=2;else if(s===4)g=c.getUint32(o,!0),o+=4;else throw"Invalid valid pixel count type";var v=2*i.maxZError,U,y,V,w,S,p,d,x,k,D,I=i.numDims>1?i.maxValues[t]:i.zMax;if(h){for(e.counter.lut++,x=c.getUint8(o),k=u,o++,w=Math.ceil((x-1)*u/8),S=Math.ceil(w/4),y=new ArrayBuffer(S*4),V=new Uint8Array(y),e.ptr+=o,V.set(new Uint8Array(n,e.ptr,w)),d=new Uint32Array(y),e.ptr+=w,D=0;x-1>>>D;)D++;w=Math.ceil(g*D/8),S=Math.ceil(w/4),y=new ArrayBuffer(S*4),V=new Uint8Array(y),V.set(new Uint8Array(n,e.ptr,w)),U=new Uint32Array(y),e.ptr+=w,f>=3?p=A.unstuffLUT2(d,u,x-1,a,v,I):p=A.unstuffLUT(d,u,x-1,a,v,I),f>=3?A.unstuff2(U,r,D,g,p):A.unstuff(U,r,D,g,p)}else e.counter.bitstuffer++,D=u,e.ptr+=o,D>0&&(w=Math.ceil(g*D/8),S=Math.ceil(w/4),y=new ArrayBuffer(S*4),V=new Uint8Array(y),V.set(new Uint8Array(n,e.ptr,w)),U=new Uint32Array(y),e.ptr+=w,f>=3?a==null?A.originalUnstuff2(U,r,D,g):A.unstuff2(U,r,D,g,!1,a,v,I):a==null?A.originalUnstuff(U,r,D,g):A.unstuff(U,r,D,g,!1,a,v,I))}},readTiles:function(n,e,r){var a=e.headerInfo,t=a.width,i=a.height,f=a.microBlockSize,o=a.imageType,c=T.getDataTypeSize(o),m=Math.ceil(t/f),l=Math.ceil(i/f);e.pixels.numBlocksY=l,e.pixels.numBlocksX=m,e.pixels.ptr=0;var s=0,h=0,u=0,g=0,v=0,U=0,y=0,V=0,w=0,S=0,p=0,d=0,x=0,k=0,D=0,I=0,E,F,L,X,b,O,ee=new r(f*f),Le=i%f||f,ve=t%f||f,de,le,Te=a.numDims,K,G=e.pixels.resultMask,re=e.pixels.resultPixels;for(u=0;u<l;u++)for(v=u!==l-1?f:Le,g=0;g<m;g++)for(U=g!==m-1?f:ve,p=u*t*f+g*f,d=t-U,K=0;K<Te;K++){if(Te>1&&(re=new r(e.pixels.resultPixels.buffer,t*i*K*c,t*i)),y=n.byteLength-e.ptr,E=new DataView(n,e.ptr,Math.min(10,y)),F={},I=0,V=E.getUint8(0),I++,w=V>>6&255,S=V>>2&15,S!==(g*f>>3&15))throw"integrity issue";if(O=V&3,O>3)throw e.ptr+=I,"Invalid block encoding ("+O+")";if(O===2){e.counter.constant++,e.ptr+=I;continue}else if(O===0){if(e.counter.uncompressed++,e.ptr+=I,x=v*U*c,k=n.byteLength-e.ptr,x=x<k?x:k,L=new ArrayBuffer(x%c===0?x:x+c-x%c),X=new Uint8Array(L),X.set(new Uint8Array(n,e.ptr,x)),b=new r(L),D=0,G)for(s=0;s<v;s++){for(h=0;h<U;h++)G[p]&&(re[p]=b[D++]),p++;p+=d}else for(s=0;s<v;s++){for(h=0;h<U;h++)re[p++]=b[D++];p+=d}e.ptr+=D*c}else if(de=T.getDataTypeUsed(o,w),le=T.getOnePixel(F,I,de,E),I+=T.getDataTypeSize(de),O===3)if(e.ptr+=I,e.counter.constantoffset++,G)for(s=0;s<v;s++){for(h=0;h<U;h++)G[p]&&(re[p]=le),p++;p+=d}else for(s=0;s<v;s++){for(h=0;h<U;h++)re[p++]=le;p+=d}else if(e.ptr+=I,T.decodeBits(n,e,ee,le,K),I=0,G)for(s=0;s<v;s++){for(h=0;h<U;h++)G[p]&&(re[p]=ee[I++]),p++;p+=d}else for(s=0;s<v;s++){for(h=0;h<U;h++)re[p++]=ee[I++];p+=d}}},formatFileInfo:function(n){return{fileIdentifierString:n.headerInfo.fileIdentifierString,fileVersion:n.headerInfo.fileVersion,imageType:n.headerInfo.imageType,height:n.headerInfo.height,width:n.headerInfo.width,numValidPixel:n.headerInfo.numValidPixel,microBlockSize:n.headerInfo.microBlockSize,blobSize:n.headerInfo.blobSize,maxZError:n.headerInfo.maxZError,pixelType:T.getPixelType(n.headerInfo.imageType),eofOffset:n.eofOffset,mask:n.mask?{numBytes:n.mask.numBytes}:null,pixels:{numBlocksX:n.pixels.numBlocksX,numBlocksY:n.pixels.numBlocksY,maxValue:n.headerInfo.zMax,minValue:n.headerInfo.zMin,noDataValue:n.noDataValue}}},constructConstantSurface:function(n){var e=n.headerInfo.zMax,r=n.headerInfo.numDims,a=n.headerInfo.height*n.headerInfo.width,t=a*r,i=0,f=0,o=0,c=n.pixels.resultMask;if(c)if(r>1)for(i=0;i<r;i++)for(o=i*a,f=0;f<a;f++)c[f]&&(n.pixels.resultPixels[o+f]=e);else for(f=0;f<a;f++)c[f]&&(n.pixels.resultPixels[f]=e);else if(n.pixels.resultPixels.fill)n.pixels.resultPixels.fill(e);else for(f=0;f<t;f++)n.pixels.resultPixels[f]=e},getDataTypeArray:function(n){var e;switch(n){case 0:e=Int8Array;break;case 1:e=Uint8Array;break;case 2:e=Int16Array;break;case 3:e=Uint16Array;break;case 4:e=Int32Array;break;case 5:e=Uint32Array;break;case 6:e=Float32Array;break;case 7:e=Float64Array;break;default:e=Float32Array}return e},getPixelType:function(n){var e;switch(n){case 0:e="S8";break;case 1:e="U8";break;case 2:e="S16";break;case 3:e="U16";break;case 4:e="S32";break;case 5:e="U32";break;case 6:e="F32";break;case 7:e="F64";break;default:e="F32"}return e},isValidPixelValue:function(n,e){if(e==null)return!1;var r;switch(n){case 0:r=e>=-128&&e<=127;break;case 1:r=e>=0&&e<=255;break;case 2:r=e>=-32768&&e<=32767;break;case 3:r=e>=0&&e<=65536;break;case 4:r=e>=-2147483648&&e<=2147483647;break;case 5:r=e>=0&&e<=4294967296;break;case 6:r=e>=-34027999387901484e22&&e<=34027999387901484e22;break;case 7:r=e>=5e-324&&e<=17976931348623157e292;break;default:r=!1}return r},getDataTypeSize:function(n){var e=0;switch(n){case 0:case 1:e=1;break;case 2:case 3:e=2;break;case 4:case 5:case 6:e=4;break;case 7:e=8;break;default:e=n}return e},getDataTypeUsed:function(n,e){var r=n;switch(n){case 2:case 4:r=n-e;break;case 3:case 5:r=n-2*e;break;case 6:e===0?r=n:e===1?r=2:r=1;break;case 7:e===0?r=n:r=n-2*e+1;break;default:r=n;break}return r},getOnePixel:function(n,e,r,a){var t=0;switch(r){case 0:t=a.getInt8(e);break;case 1:t=a.getUint8(e);break;case 2:t=a.getInt16(e,!0);break;case 3:t=a.getUint16(e,!0);break;case 4:t=a.getInt32(e,!0);break;case 5:t=a.getUInt32(e,!0);break;case 6:t=a.getFloat32(e,!0);break;case 7:t=a.getFloat64(e,!0);break;default:throw"the decoder does not understand this pixel type"}return t}},B=function(n,e,r){this.val=n,this.left=e,this.right=r},W={decode:function(n,e){e=e||{};var r=e.noDataValue,a=0,t={};if(t.ptr=e.inputOffset||0,t.pixels={},!!T.readHeaderInfo(n,t)){var i=t.headerInfo,f=i.fileVersion,o=T.getDataTypeArray(i.imageType);T.readMask(n,t),i.numValidPixel!==i.width*i.height&&!t.pixels.resultMask&&(t.pixels.resultMask=e.maskData);var c=i.width*i.height;if(t.pixels.resultPixels=new o(c*i.numDims),t.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},i.numValidPixel!==0)if(i.zMax===i.zMin)T.constructConstantSurface(t);else if(f>=4&&T.checkMinMaxRanges(n,t))T.constructConstantSurface(t);else{var m=new DataView(n,t.ptr,2),l=m.getUint8(0);if(t.ptr++,l)T.readDataOneSweep(n,t,o);else if(f>1&&i.imageType<=1&&Math.abs(i.maxZError-.5)<1e-5){var s=m.getUint8(1);if(t.ptr++,t.encodeMode=s,s>2||f<4&&s>1)throw"Invalid Huffman flag "+s;s?T.readHuffman(n,t,o):T.readTiles(n,t,o)}else T.readTiles(n,t,o)}t.eofOffset=t.ptr;var h;e.inputOffset?(h=t.headerInfo.blobSize+e.inputOffset-t.ptr,Math.abs(h)>=1&&(t.eofOffset=e.inputOffset+t.headerInfo.blobSize)):(h=t.headerInfo.blobSize-t.ptr,Math.abs(h)>=1&&(t.eofOffset=t.headerInfo.blobSize));var u={width:i.width,height:i.height,pixelData:t.pixels.resultPixels,minValue:i.zMin,maxValue:i.zMax,validPixelCount:i.numValidPixel,dimCount:i.numDims,dimStats:{minValues:i.minValues,maxValues:i.maxValues},maskData:t.pixels.resultMask};if(t.pixels.resultMask&&T.isValidPixelValue(i.imageType,r)){var g=t.pixels.resultMask;for(a=0;a<c;a++)g[a]||(u.pixelData[a]=r);u.noDataValue=r}return t.noDataValue=r,e.returnFileInfo&&(u.fileInfo=T.formatFileInfo(t)),u}},getBandCount:function(n){var e=0,r=0,a={};for(a.ptr=0,a.pixels={};r<n.byteLength-58;)T.readHeaderInfo(n,a),r+=a.headerInfo.blobSize,e++,a.ptr=r;return e}};return W}(),C=function(){var A=new ArrayBuffer(4),T=new Uint8Array(A),B=new Uint32Array(A);return B[0]=1,T[0]===1}(),j={decode:function(A,T){if(!C)throw"Big endian system is not supported.";T=T||{};var B=T.inputOffset||0,W=new Uint8Array(A,B,10),n=String.fromCharCode.apply(null,W),e,r;if(n.trim()==="CntZImage")e=M,r=1;else if(n.substring(0,5)==="Lerc2")e=J,r=2;else throw"Unexpected file identifier string: "+n;for(var a=0,t=A.byteLength-10,i,f=[],o,c,m={width:0,height:0,pixels:[],pixelType:T.pixelType,mask:null,statistics:[]};B<t;){var l=e.decode(A,{inputOffset:B,encodedMaskData:i,maskData:c,returnMask:a===0,returnEncodedMask:a===0,returnFileInfo:!0,pixelType:T.pixelType||null,noDataValue:T.noDataValue||null});B=l.fileInfo.eofOffset,a===0&&(i=l.encodedMaskData,c=l.maskData,m.width=l.width,m.height=l.height,m.dimCount=l.dimCount||1,m.pixelType=l.pixelType||l.fileInfo.pixelType,m.mask=l.maskData),r>1&&l.fileInfo.mask&&l.fileInfo.mask.numBytes>0&&f.push(l.maskData),a++,m.pixels.push(l.pixelData),m.statistics.push({minValue:l.minValue,maxValue:l.maxValue,noDataValue:l.noDataValue,dimStats:l.dimStats})}var s,h,u;if(r>1&&f.length>1){for(u=m.width*m.height,m.bandMasks=f,c=new Uint8Array(u),c.set(f[0]),s=1;s<f.length;s++)for(o=f[s],h=0;h<u;h++)c[h]=c[h]&o[h];m.maskData=c}return m}};typeof define=="function"&&define.amd?define([],function(){return j}):typeof Ee<"u"&&Ee.exports?Ee.exports=j:this.Lerc=j})()});var Sr={NONE:0,LERC:1},gr=Object.freeze(Sr);var te={};function Dr(M,J){let C=0,j,A,T,B,W=J.length;for(T=J[0],j=1;j<=W;j++)B=J[j%W],M[0]>Math.min(T[0],B[0])&&M[0]<=Math.max(T[0],B[0])&&M[1]<=Math.max(T[1],B[1])&&T[0]!==B[0]&&(A=(M[0]-T[0])*(B[1]-T[1])/(B[0]-T[0])+T[1],(T[1]===B[1]||M[1]<=A)&&C++),T=B;return C%2!==0}te.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var qe=new _,Ar=new De,Er=new _,Lr=new _;te.computeVertices=function(M){if(!ie(M)||!ie(M.heightmap))throw new xe("options.heightmap is required.");if(!ie(M.width)||!ie(M.height))throw new xe("options.width and options.height are required.");if(!ie(M.nativeRectangle))throw new xe("options.nativeRectangle is required.");if(!ie(M.skirtHeight))throw new xe("options.skirtHeight is required.");let J=M.flattenPolygonHeight||[1],C=M.flattenPolygon||[],j=M.VTN,A=Math.cos,T=Math.sin,B=Math.sqrt,W=Math.atan,n=Math.exp,e=Ue.PI_OVER_TWO,r=Ue.toRadians,a=M.heightmap,t=M.width,i=M.height,f=M.skirtHeight,o=f>0,c=q(M.isGeographic,!0),m=q(M.ellipsoid,Se.default),l=1/m.maximumRadius,s=oe.clone(M.nativeRectangle),h=oe.clone(M.rectangle),u,g,v,U;ie(h)?(u=h.west,g=h.south,v=h.east,U=h.north):c?(u=r(s.west),g=r(s.south),v=r(s.east),U=r(s.north)):(u=s.west*l,g=e-2*W(n(-s.south*l)),v=s.east*l,U=e-2*W(n(-s.north*l)));let y=M.relativeToCenter,V=ie(y);y=V?y:_.ZERO;let w=q(M.includeWebMercatorT,!1),S=q(M.exaggeration,1),p=q(M.exaggerationRelativeHeight,0),x=S!==1,k=q(M.structure,te.DEFAULT_STRUCTURE),D=q(k.heightScale,te.DEFAULT_STRUCTURE.heightScale),I=q(k.heightOffset,te.DEFAULT_STRUCTURE.heightOffset),E=q(k.elementsPerHeight,te.DEFAULT_STRUCTURE.elementsPerHeight),F=q(k.stride,te.DEFAULT_STRUCTURE.stride),L=q(k.elementMultiplier,te.DEFAULT_STRUCTURE.elementMultiplier),X=q(k.isBigEndian,te.DEFAULT_STRUCTURE.isBigEndian),b=oe.computeWidth(s),O=oe.computeHeight(s),ee=b/(t-1),Le=O/(i-1);c||(b*=l,O*=l);let ve=m.radiiSquared,de=ve.x,le=ve.y,Te=ve.z,K=65536,G=-65536,re=sr.eastNorthUpToFixedFrame(y,m),pr=De.inverseTransformation(re,Ar),Be,We;w&&(Be=Ae.geodeticLatitudeToMercatorAngle(g),We=1/(Ae.geodeticLatitudeToMercatorAngle(U)-Be));let ue=Er;ue.x=Number.POSITIVE_INFINITY,ue.y=Number.POSITIVE_INFINITY,ue.z=Number.POSITIVE_INFINITY;let ce=Lr;ce.x=Number.NEGATIVE_INFINITY,ce.y=Number.NEGATIVE_INFINITY,ce.z=Number.NEGATIVE_INFINITY;let Fe=Number.POSITIVE_INFINITY,we=t*i,Ir=f>0?t*2+i*2:0,ne=we+Ir,ae=new Array(ne),Ge=new Array(ne),Qe=new Array(ne),Je=w?new Array(ne):[],Ke=x?new Array(ne):[],be=new Array(ne),Ne=0,Ce=i,Oe=0,Re=t;o&&(--Ne,++Ce,--Oe,++Re);let ke=1e-5;for(let N=Ne;N<Ce;++N){let R=N;R<0&&(R=0),R>=i&&(R=i-1);let z=s.north-Le*R;c?z=r(z):z=e-2*W(n(-z*l));let me=(z-g)/(U-g);me=Ue.clamp(me,0,1);let Z=N===Ne,se=N===Ce-1;f>0&&(Z?z+=ke*O:se&&(z-=ke*O));let pe=A(z),he=T(z),ye=Te*he,Me;w&&(Me=(Ae.geodeticLatitudeToMercatorAngle(z)-Be)*We);for(let fe=Oe;fe<Re;++fe){let $=fe;$<0&&($=0),$>=t&&($=t-1);let Ie=R*(t*F)+$*F,H;if(E===1)H=a[Ie];else{H=0;let Y;if(X)for(Y=0;Y<E;++Y)H=H*L+a[Ie+Y];else for(Y=E-1;Y>=0;--Y)H=H*L+a[Ie+Y]}H=H*D+I,G=Math.max(G,H),K=Math.min(K,H);let Q=s.west+ee*$;c?Q=r(Q):Q=Q*l;let Xe=(Q-u)/(v-u);Xe=Ue.clamp(Xe,0,1);let P=R*t+$;if(be[P]=0,f>0){let Y=fe===Oe,Ve=fe===Re-1,nr=Z||se||Y||Ve;if((Z||se)&&(Y||Ve))continue;nr&&(H-=f,Y?(P=we+(i-R-1),Q-=ke*b):se?P=we+i+(t-$-1):Ve?(P=we+i+t+R,Q+=ke*b):Z&&(P=we+i+t+i+$),be[P]=1)}let _e=pe*A(Q),ze=pe*T(Q),ir=de*_e,tr=le*ze,Ze=1/B(ir*_e+tr*ze+ye*he),Tr=ir*Ze,kr=tr*Ze,yr=ye*Ze;for(let Y=0;Y<J.length;Y++)J[Y]!==1&&Dr([Q,z],C[Y])&&(H=J[Y]);let ge=new _;ge.x=Tr+_e*H,ge.y=kr+ze*H,ge.z=yr+he*H,De.multiplyByPoint(pr,ge,qe),_.minimumByComponent(qe,ue,ue),_.maximumByComponent(qe,ce,ce),Fe=Math.min(Fe,H),ae[P]=ge,Qe[P]=new ar(Xe,me),Ge[P]=H,w&&(Je[P]=Me),x&&(Ke[P]=m.geodeticSurfaceNormal(ge))}}let He=new Array(ne);if(f>0){let N=0;for(let R=0;R<i;++R){let z=-1,me=1;R<2&&(z=0),R>=i-1&&(me=0);for(let Z=0;Z<t;++Z){let se=-1,pe=1;Z<2&&(se=0),Z>=t-1&&(pe=0),N=R*t+Z;try{let he=ae[(R+z)*t+Z],ye=ae[(R+me)*t+Z],Me=ae[R*t+(Z+se)],fe=ae[R*t+(Z+pe)],$=_.subtract(Me,fe,new _),Ie=_.subtract(he,ye,new _),H=_.cross($,Ie,new _),Q=_.normalize(H,new _);He[N]=or.octEncodeFloat(Q)}catch{He[N]=0}}}}let xr=fr.fromPoints(ae),$e;ie(h)&&($e=cr.fromRectangle(h,K,G,m));let Pe;V&&(Pe=new mr(m).computeHorizonCullingPointPossiblyUnderEllipsoid(y,ae,K));let Ur=new ur(ue,ce,y),Ye=new hr(y,Ur,Fe,G,re,j?f>0:!1,w,x,S,p),er=new Float32Array(ne*Ye.stride),rr=0;for(let N=0;N<ne;++N)rr=Ye.encode(er,rr,ae[N],Qe[N],Ge[N],f>0?He[N]:void 0,Je[N],Ke[N],f>0||void 0,void 0,be[N]);return{vertices:er,maximumHeight:G,minimumHeight:K,encoding:Ye,boundingSphere3D:xr,orientedBoundingBox:$e,occludeePointInScaledSpace:Pe}};var vr=te;var wr=Vr(dr(),1);function Br(M,J){if(M.encoding===gr.LERC){let A;try{A=wr.default.decode(M.heightmap)}catch(B){throw new je(B)}if(A.statistics[0].minValue===Number.MAX_VALUE)throw new je("Invalid tile data");M.heightmap=A.pixels[0],M.width=A.width,M.height=A.height}M.ellipsoid=Se.clone(M.ellipsoid),M.rectangle=oe.clone(M.rectangle);let C=vr.computeVertices(M),j=C.vertices;return J.push(j.buffer),{vertices:j.buffer,numberOfAttributes:C.encoding.stride,minimumHeight:C.minimumHeight,maximumHeight:C.maximumHeight,gridWidth:M.width,gridHeight:M.height,boundingSphere3D:C.boundingSphere3D,orientedBoundingBox:C.orientedBoundingBox,occludeePointInScaledSpace:C.occludeePointInScaledSpace,encoding:C.encoding,westIndicesSouthToNorth:C.westIndicesSouthToNorth,southIndicesEastToWest:C.southIndicesEastToWest,eastIndicesNorthToSouth:C.eastIndicesNorthToSouth,northIndicesWestToEast:C.northIndicesWestToEast}}var fi=lr(Br);export{fi as default};
import{a as mr,b as hr}from"./chunk-FNJ2A2P5.js";import{a as lr}from"./chunk-6MN6BBPN.js";import{a as Ae}from"./chunk-NJVIDNJ6.js";import{a as cr}from"./chunk-W5L3OOEF.js";import{a as or}from"./chunk-EZRSLM27.js";import"./chunk-TBSK33NR.js";import{a as ur}from"./chunk-LSAUAD4X.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{d as fr}from"./chunk-ZPW6H6BB.js";import{b as De,g as sr,i as oe}from"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import{b as _,d as ar,e as Se}from"./chunk-VDZXURWO.js";import{a as Ue}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import{a as je}from"./chunk-PZ34T7DL.js";import{a as q}from"./chunk-5HWP5DW7.js";import{a as xe}from"./chunk-3K67FZLU.js";import{c as Mr,d as Vr,e as ie}from"./chunk-55TU6MJR.js";var dr=Mr((ei,Ee)=>{/* 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 M=function(){var A={};A.defaultNoDataValue=-34027999387901484e22,A.decode=function(r,a){a=a||{};var t=a.encodedMaskData||a.encodedMaskData===null,i=n(r,a.inputOffset||0,t),f=a.noDataValue!==null?a.noDataValue:A.defaultNoDataValue,o=T(i,a.pixelType||Float32Array,a.encodedMaskData,f,a.returnMask),c={width:i.width,height:i.height,pixelData:o.resultPixels,minValue:o.minValue,maxValue:i.pixels.maxValue,noDataValue:f};return o.resultMask&&(c.maskData=o.resultMask),a.returnEncodedMask&&i.mask&&(c.encodedMaskData=i.mask.bitset?i.mask.bitset:null),a.returnFileInfo&&(c.fileInfo=B(i),a.computeUsedBitDepths&&(c.fileInfo.bitDepths=W(i))),c};var T=function(r,a,t,i,f){var o=0,c=r.pixels.numBlocksX,m=r.pixels.numBlocksY,l=Math.floor(r.width/c),s=Math.floor(r.height/m),h=2*r.maxZError,u=Number.MAX_VALUE,g;t=t||(r.mask?r.mask.bitset:null);var v,U;v=new a(r.width*r.height),f&&t&&(U=new Uint8Array(r.width*r.height));for(var y=new Float32Array(l*s),V,w,S=0;S<=m;S++){var p=S!==m?s:r.height%m;if(p!==0)for(var d=0;d<=c;d++){var x=d!==c?l:r.width%c;if(x!==0){var k=S*r.width*s+d*l,D=r.width-x,I=r.pixels.blocks[o],E,F,L;I.encoding<2?(I.encoding===0?E=I.rawData:(e(I.stuffedData,I.bitsPerPixel,I.numValidPixels,I.offset,h,y,r.pixels.maxValue),E=y),F=0):I.encoding===2?L=0:L=I.offset;var X;if(t)for(w=0;w<p;w++){for(k&7&&(X=t[k>>3],X<<=k&7),V=0;V<x;V++)k&7||(X=t[k>>3]),X&128?(U&&(U[k]=1),g=I.encoding<2?E[F++]:L,u=u>g?g:u,v[k++]=g):(U&&(U[k]=0),v[k++]=i),X<<=1;k+=D}else if(I.encoding<2)for(w=0;w<p;w++){for(V=0;V<x;V++)g=E[F++],u=u>g?g:u,v[k++]=g;k+=D}else for(u=u>L?L:u,w=0;w<p;w++){for(V=0;V<x;V++)v[k++]=L;k+=D}if(I.encoding===1&&F!==I.numValidPixels)throw"Block and Mask do not match";o++}}}return{resultPixels:v,resultMask:U,minValue:u}},B=function(r){return{fileIdentifierString:r.fileIdentifierString,fileVersion:r.fileVersion,imageType:r.imageType,height:r.height,width:r.width,maxZError:r.maxZError,eofOffset:r.eofOffset,mask:r.mask?{numBlocksX:r.mask.numBlocksX,numBlocksY:r.mask.numBlocksY,numBytes:r.mask.numBytes,maxValue:r.mask.maxValue}:null,pixels:{numBlocksX:r.pixels.numBlocksX,numBlocksY:r.pixels.numBlocksY,numBytes:r.pixels.numBytes,maxValue:r.pixels.maxValue,noDataValue:r.noDataValue}}},W=function(r){for(var a=r.pixels.numBlocksX*r.pixels.numBlocksY,t={},i=0;i<a;i++){var f=r.pixels.blocks[i];f.encoding===0?t.float32=!0:f.encoding===1?t[f.bitsPerPixel]=!0:t[0]=!0}return Object.keys(t)},n=function(r,a,t){var i={},f=new Uint8Array(r,a,10);if(i.fileIdentifierString=String.fromCharCode.apply(null,f),i.fileIdentifierString.trim()!=="CntZImage")throw"Unexpected file identifier string: "+i.fileIdentifierString;a+=10;var o=new DataView(r,a,24);if(i.fileVersion=o.getInt32(0,!0),i.imageType=o.getInt32(4,!0),i.height=o.getUint32(8,!0),i.width=o.getUint32(12,!0),i.maxZError=o.getFloat64(16,!0),a+=24,!t)if(o=new DataView(r,a,16),i.mask={},i.mask.numBlocksY=o.getUint32(0,!0),i.mask.numBlocksX=o.getUint32(4,!0),i.mask.numBytes=o.getUint32(8,!0),i.mask.maxValue=o.getFloat32(12,!0),a+=16,i.mask.numBytes>0){var c=new Uint8Array(Math.ceil(i.width*i.height/8));o=new DataView(r,a,i.mask.numBytes);var m=o.getInt16(0,!0),l=2,s=0;do{if(m>0)for(;m--;)c[s++]=o.getUint8(l++);else{var h=o.getUint8(l++);for(m=-m;m--;)c[s++]=h}m=o.getInt16(l,!0),l+=2}while(l<i.mask.numBytes);if(m!==-32768||s<c.length)throw"Unexpected end of mask RLE encoding";i.mask.bitset=c,a+=i.mask.numBytes}else i.mask.numBytes|i.mask.numBlocksY|i.mask.maxValue||(i.mask.bitset=new Uint8Array(Math.ceil(i.width*i.height/8)));o=new DataView(r,a,16),i.pixels={},i.pixels.numBlocksY=o.getUint32(0,!0),i.pixels.numBlocksX=o.getUint32(4,!0),i.pixels.numBytes=o.getUint32(8,!0),i.pixels.maxValue=o.getFloat32(12,!0),a+=16;var u=i.pixels.numBlocksX,g=i.pixels.numBlocksY,v=u+(i.width%u>0?1:0),U=g+(i.height%g>0?1:0);i.pixels.blocks=new Array(v*U);for(var y=0,V=0;V<U;V++)for(var w=0;w<v;w++){var S=0,p=r.byteLength-a;o=new DataView(r,a,Math.min(10,p));var d={};i.pixels.blocks[y++]=d;var x=o.getUint8(0);if(S++,d.encoding=x&63,d.encoding>3)throw"Invalid block encoding ("+d.encoding+")";if(d.encoding===2){a++;continue}if(x!==0&&x!==2){if(x>>=6,d.offsetType=x,x===2)d.offset=o.getInt8(1),S++;else if(x===1)d.offset=o.getInt16(1,!0),S+=2;else if(x===0)d.offset=o.getFloat32(1,!0),S+=4;else throw"Invalid block offset type";if(d.encoding===1)if(x=o.getUint8(S),S++,d.bitsPerPixel=x&63,x>>=6,d.numValidPixelsType=x,x===2)d.numValidPixels=o.getUint8(S),S++;else if(x===1)d.numValidPixels=o.getUint16(S,!0),S+=2;else if(x===0)d.numValidPixels=o.getUint32(S,!0),S+=4;else throw"Invalid valid pixel count type"}if(a+=S,d.encoding!==3){var k,D;if(d.encoding===0){var I=(i.pixels.numBytes-1)/4;if(I!==Math.floor(I))throw"uncompressed block has invalid length";k=new ArrayBuffer(I*4),D=new Uint8Array(k),D.set(new Uint8Array(r,a,I*4));var E=new Float32Array(k);d.rawData=E,a+=I*4}else if(d.encoding===1){var F=Math.ceil(d.numValidPixels*d.bitsPerPixel/8),L=Math.ceil(F/4);k=new ArrayBuffer(L*4),D=new Uint8Array(k),D.set(new Uint8Array(r,a,F)),d.stuffedData=new Uint32Array(k),a+=F}}}return i.eofOffset=a,i},e=function(r,a,t,i,f,o,c){var m=(1<<a)-1,l=0,s,h=0,u,g,v=Math.ceil((c-i)/f),U=r.length*4-Math.ceil(a*t/8);for(r[r.length-1]<<=8*U,s=0;s<t;s++){if(h===0&&(g=r[l++],h=32),h>=a)u=g>>>h-a&m,h-=a;else{var y=a-h;u=(g&m)<<y&m,g=r[l++],h=32-y,u+=g>>>h}o[s]=u<v?i+u*f:c}return o};return A}(),J=function(){"use strict";var A={unstuff:function(n,e,r,a,t,i,f,o){var c=(1<<r)-1,m=0,l,s=0,h,u,g,v,U=n.length*4-Math.ceil(r*a/8);if(n[n.length-1]<<=8*U,t)for(l=0;l<a;l++)s===0&&(u=n[m++],s=32),s>=r?(h=u>>>s-r&c,s-=r):(g=r-s,h=(u&c)<<g&c,u=n[m++],s=32-g,h+=u>>>s),e[l]=t[h];else for(v=Math.ceil((o-i)/f),l=0;l<a;l++)s===0&&(u=n[m++],s=32),s>=r?(h=u>>>s-r&c,s-=r):(g=r-s,h=(u&c)<<g&c,u=n[m++],s=32-g,h+=u>>>s),e[l]=h<v?i+h*f:o},unstuffLUT:function(n,e,r,a,t,i){var f=(1<<e)-1,o=0,c=0,m=0,l=0,s=0,h,u=[],g=n.length*4-Math.ceil(e*r/8);n[n.length-1]<<=8*g;var v=Math.ceil((i-a)/t);for(c=0;c<r;c++)l===0&&(h=n[o++],l=32),l>=e?(s=h>>>l-e&f,l-=e):(m=e-l,s=(h&f)<<m&f,h=n[o++],l=32-m,s+=h>>>l),u[c]=s<v?a+s*t:i;return u.unshift(a),u},unstuff2:function(n,e,r,a,t,i,f,o){var c=(1<<r)-1,m=0,l,s=0,h=0,u,g,v;if(t)for(l=0;l<a;l++)s===0&&(g=n[m++],s=32,h=0),s>=r?(u=g>>>h&c,s-=r,h+=r):(v=r-s,u=g>>>h&c,g=n[m++],s=32-v,u|=(g&(1<<v)-1)<<r-v,h=v),e[l]=t[u];else{var U=Math.ceil((o-i)/f);for(l=0;l<a;l++)s===0&&(g=n[m++],s=32,h=0),s>=r?(u=g>>>h&c,s-=r,h+=r):(v=r-s,u=g>>>h&c,g=n[m++],s=32-v,u|=(g&(1<<v)-1)<<r-v,h=v),e[l]=u<U?i+u*f:o}return e},unstuffLUT2:function(n,e,r,a,t,i){var f=(1<<e)-1,o=0,c=0,m=0,l=0,s=0,h=0,u,g=[],v=Math.ceil((i-a)/t);for(c=0;c<r;c++)l===0&&(u=n[o++],l=32,h=0),l>=e?(s=u>>>h&f,l-=e,h+=e):(m=e-l,s=u>>>h&f,u=n[o++],l=32-m,s|=(u&(1<<m)-1)<<e-m,h=m),g[c]=s<v?a+s*t:i;return g.unshift(a),g},originalUnstuff:function(n,e,r,a){var t=(1<<r)-1,i=0,f,o=0,c,m,l,s=n.length*4-Math.ceil(r*a/8);for(n[n.length-1]<<=8*s,f=0;f<a;f++)o===0&&(m=n[i++],o=32),o>=r?(c=m>>>o-r&t,o-=r):(l=r-o,c=(m&t)<<l&t,m=n[i++],o=32-l,c+=m>>>o),e[f]=c;return e},originalUnstuff2:function(n,e,r,a){var t=(1<<r)-1,i=0,f,o=0,c=0,m,l,s;for(f=0;f<a;f++)o===0&&(l=n[i++],o=32,c=0),o>=r?(m=l>>>c&t,o-=r,c+=r):(s=r-o,m=l>>>c&t,l=n[i++],o=32-s,m|=(l&(1<<s)-1)<<r-s,c=s),e[f]=m;return e}},T={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(n){for(var e=65535,r=65535,a=n.length,t=Math.floor(a/2),i=0;t;){var f=t>=359?359:t;t-=f;do e+=n[i++]<<8,r+=e+=n[i++];while(--f);e=(e&65535)+(e>>>16),r=(r&65535)+(r>>>16)}return a&1&&(r+=e+=n[i]<<8),e=(e&65535)+(e>>>16),r=(r&65535)+(r>>>16),(r<<16|e)>>>0},readHeaderInfo:function(n,e){var r=e.ptr,a=new Uint8Array(n,r,6),t={};if(t.fileIdentifierString=String.fromCharCode.apply(null,a),t.fileIdentifierString.lastIndexOf("Lerc2",0)!==0)throw"Unexpected file identifier string (expect Lerc2 ): "+t.fileIdentifierString;r+=6;var i=new DataView(n,r,8),f=i.getInt32(0,!0);t.fileVersion=f,r+=4,f>=3&&(t.checksum=i.getUint32(4,!0),r+=4),i=new DataView(n,r,12),t.height=i.getUint32(0,!0),t.width=i.getUint32(4,!0),r+=8,f>=4?(t.numDims=i.getUint32(8,!0),r+=4):t.numDims=1,i=new DataView(n,r,40),t.numValidPixel=i.getUint32(0,!0),t.microBlockSize=i.getInt32(4,!0),t.blobSize=i.getInt32(8,!0),t.imageType=i.getInt32(12,!0),t.maxZError=i.getFloat64(16,!0),t.zMin=i.getFloat64(24,!0),t.zMax=i.getFloat64(32,!0),r+=40,e.headerInfo=t,e.ptr=r;var o,c;if(f>=3&&(c=f>=4?52:48,o=this.computeChecksumFletcher32(new Uint8Array(n,r-c,t.blobSize-14)),o!==t.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(n,e){var r=e.headerInfo,a=this.getDataTypeArray(r.imageType),t=r.numDims*this.getDataTypeSize(r.imageType),i=this.readSubArray(n,e.ptr,a,t),f=this.readSubArray(n,e.ptr+t,a,t);e.ptr+=2*t;var o,c=!0;for(o=0;o<r.numDims;o++)if(i[o]!==f[o]){c=!1;break}return r.minValues=i,r.maxValues=f,c},readSubArray:function(n,e,r,a){var t;if(r===Uint8Array)t=new Uint8Array(n,e,a);else{var i=new ArrayBuffer(a),f=new Uint8Array(i);f.set(new Uint8Array(n,e,a)),t=new r(i)}return t},readMask:function(n,e){var r=e.ptr,a=e.headerInfo,t=a.width*a.height,i=a.numValidPixel,f=new DataView(n,r,4),o={};if(o.numBytes=f.getUint32(0,!0),r+=4,(i===0||t===i)&&o.numBytes!==0)throw"invalid mask";var c,m;if(i===0)c=new Uint8Array(Math.ceil(t/8)),o.bitset=c,m=new Uint8Array(t),e.pixels.resultMask=m,r+=o.numBytes;else if(o.numBytes>0){c=new Uint8Array(Math.ceil(t/8)),f=new DataView(n,r,o.numBytes);var l=f.getInt16(0,!0),s=2,h=0,u=0;do{if(l>0)for(;l--;)c[h++]=f.getUint8(s++);else for(u=f.getUint8(s++),l=-l;l--;)c[h++]=u;l=f.getInt16(s,!0),s+=2}while(s<o.numBytes);if(l!==-32768||h<c.length)throw"Unexpected end of mask RLE encoding";m=new Uint8Array(t);var g=0,v=0;for(v=0;v<t;v++)v&7?(g=c[v>>3],g<<=v&7):g=c[v>>3],g&128&&(m[v]=1);e.pixels.resultMask=m,o.bitset=c,r+=o.numBytes}return e.ptr=r,e.mask=o,!0},readDataOneSweep:function(n,e,r){var a=e.ptr,t=e.headerInfo,i=t.numDims,f=t.width*t.height,o=t.imageType,c=t.numValidPixel*T.getDataTypeSize(o)*i,m,l=e.pixels.resultMask;if(r===Uint8Array)m=new Uint8Array(n,a,c);else{var s=new ArrayBuffer(c),h=new Uint8Array(s);h.set(new Uint8Array(n,a,c)),m=new r(s)}if(m.length===f*i)e.pixels.resultPixels=m;else{e.pixels.resultPixels=new r(f*i);var u=0,g=0,v=0,U=0;if(i>1)for(v=0;v<i;v++)for(U=v*f,g=0;g<f;g++)l[g]&&(e.pixels.resultPixels[U+g]=m[u++]);else for(g=0;g<f;g++)l[g]&&(e.pixels.resultPixels[g]=m[u++])}return a+=c,e.ptr=a,!0},readHuffmanTree:function(n,e){var r=this.HUFFMAN_LUT_BITS_MAX,a=new DataView(n,e.ptr,16);e.ptr+=16;var t=a.getInt32(0,!0);if(t<2)throw"unsupported Huffman version";var i=a.getInt32(4,!0),f=a.getInt32(8,!0),o=a.getInt32(12,!0);if(f>=o)return!1;var c=new Uint32Array(o-f);T.decodeBits(n,e,c);var m=[],l,s,h,u;for(l=f;l<o;l++)s=l-(l<i?0:i),m[s]={first:c[l-f],second:null};var g=n.byteLength-e.ptr,v=Math.ceil(g/4),U=new ArrayBuffer(v*4),y=new Uint8Array(U);y.set(new Uint8Array(n,e.ptr,g));var V=new Uint32Array(U),w=0,S,p=0;for(S=V[0],l=f;l<o;l++)s=l-(l<i?0:i),u=m[s].first,u>0&&(m[s].second=S<<w>>>32-u,32-w>=u?(w+=u,w===32&&(w=0,p++,S=V[p])):(w+=u-32,p++,S=V[p],m[s].second|=S>>>32-w));var d=0,x=0,k=new B;for(l=0;l<m.length;l++)m[l]!==void 0&&(d=Math.max(d,m[l].first));d>=r?x=r:x=d,d>=30&&console.log("WARning, large NUM LUT BITS IS "+d);var D=[],I,E,F,L,X,b;for(l=f;l<o;l++)if(s=l-(l<i?0:i),u=m[s].first,u>0)if(I=[u,s],u<=x)for(E=m[s].second<<x-u,F=1<<x-u,h=0;h<F;h++)D[E|h]=I;else for(E=m[s].second,b=k,L=u-1;L>=0;L--)X=E>>>L&1,X?(b.right||(b.right=new B),b=b.right):(b.left||(b.left=new B),b=b.left),L===0&&!b.val&&(b.val=I[1]);return{decodeLut:D,numBitsLUTQick:x,numBitsLUT:d,tree:k,stuffedData:V,srcPtr:p,bitPos:w}},readHuffman:function(n,e,r){var a=e.headerInfo,t=a.numDims,i=e.headerInfo.height,f=e.headerInfo.width,o=f*i,c=this.readHuffmanTree(n,e),m=c.decodeLut,l=c.tree,s=c.stuffedData,h=c.srcPtr,u=c.bitPos,g=c.numBitsLUTQick,v=c.numBitsLUT,U=e.headerInfo.imageType===0?128:0,y,V,w,S=e.pixels.resultMask,p,d,x,k,D,I,E,F=0;u>0&&(h++,u=0);var L=s[h],X=e.encodeMode===1,b=new r(o*t),O=b,ee;for(ee=0;ee<a.numDims;ee++){if(t>1&&(O=new r(b.buffer,o*ee,o),F=0),e.headerInfo.numValidPixel===f*i)for(I=0,k=0;k<i;k++)for(D=0;D<f;D++,I++){if(V=0,p=L<<u>>>32-g,d=p,32-u<g&&(p|=s[h+1]>>>64-u-g,d=p),m[d])V=m[d][1],u+=m[d][0];else for(p=L<<u>>>32-v,d=p,32-u<v&&(p|=s[h+1]>>>64-u-v,d=p),y=l,E=0;E<v;E++)if(x=p>>>v-E-1&1,y=x?y.right:y.left,!(y.left||y.right)){V=y.val,u=u+E+1;break}u>=32&&(u-=32,h++,L=s[h]),w=V-U,X?(D>0?w+=F:k>0?w+=O[I-f]:w+=F,w&=255,O[I]=w,F=w):O[I]=w}else for(I=0,k=0;k<i;k++)for(D=0;D<f;D++,I++)if(S[I]){if(V=0,p=L<<u>>>32-g,d=p,32-u<g&&(p|=s[h+1]>>>64-u-g,d=p),m[d])V=m[d][1],u+=m[d][0];else for(p=L<<u>>>32-v,d=p,32-u<v&&(p|=s[h+1]>>>64-u-v,d=p),y=l,E=0;E<v;E++)if(x=p>>>v-E-1&1,y=x?y.right:y.left,!(y.left||y.right)){V=y.val,u=u+E+1;break}u>=32&&(u-=32,h++,L=s[h]),w=V-U,X?(D>0&&S[I-1]?w+=F:k>0&&S[I-f]?w+=O[I-f]:w+=F,w&=255,O[I]=w,F=w):O[I]=w}e.ptr=e.ptr+(h+1)*4+(u>0?4:0)}e.pixels.resultPixels=b},decodeBits:function(n,e,r,a,t){{var i=e.headerInfo,f=i.fileVersion,o=0,c=new DataView(n,e.ptr,5),m=c.getUint8(0);o++;var l=m>>6,s=l===0?4:3-l,h=(m&32)>0,u=m&31,g=0;if(s===1)g=c.getUint8(o),o++;else if(s===2)g=c.getUint16(o,!0),o+=2;else if(s===4)g=c.getUint32(o,!0),o+=4;else throw"Invalid valid pixel count type";var v=2*i.maxZError,U,y,V,w,S,p,d,x,k,D,I=i.numDims>1?i.maxValues[t]:i.zMax;if(h){for(e.counter.lut++,x=c.getUint8(o),k=u,o++,w=Math.ceil((x-1)*u/8),S=Math.ceil(w/4),y=new ArrayBuffer(S*4),V=new Uint8Array(y),e.ptr+=o,V.set(new Uint8Array(n,e.ptr,w)),d=new Uint32Array(y),e.ptr+=w,D=0;x-1>>>D;)D++;w=Math.ceil(g*D/8),S=Math.ceil(w/4),y=new ArrayBuffer(S*4),V=new Uint8Array(y),V.set(new Uint8Array(n,e.ptr,w)),U=new Uint32Array(y),e.ptr+=w,f>=3?p=A.unstuffLUT2(d,u,x-1,a,v,I):p=A.unstuffLUT(d,u,x-1,a,v,I),f>=3?A.unstuff2(U,r,D,g,p):A.unstuff(U,r,D,g,p)}else e.counter.bitstuffer++,D=u,e.ptr+=o,D>0&&(w=Math.ceil(g*D/8),S=Math.ceil(w/4),y=new ArrayBuffer(S*4),V=new Uint8Array(y),V.set(new Uint8Array(n,e.ptr,w)),U=new Uint32Array(y),e.ptr+=w,f>=3?a==null?A.originalUnstuff2(U,r,D,g):A.unstuff2(U,r,D,g,!1,a,v,I):a==null?A.originalUnstuff(U,r,D,g):A.unstuff(U,r,D,g,!1,a,v,I))}},readTiles:function(n,e,r){var a=e.headerInfo,t=a.width,i=a.height,f=a.microBlockSize,o=a.imageType,c=T.getDataTypeSize(o),m=Math.ceil(t/f),l=Math.ceil(i/f);e.pixels.numBlocksY=l,e.pixels.numBlocksX=m,e.pixels.ptr=0;var s=0,h=0,u=0,g=0,v=0,U=0,y=0,V=0,w=0,S=0,p=0,d=0,x=0,k=0,D=0,I=0,E,F,L,X,b,O,ee=new r(f*f),Le=i%f||f,ve=t%f||f,de,le,Te=a.numDims,K,G=e.pixels.resultMask,re=e.pixels.resultPixels;for(u=0;u<l;u++)for(v=u!==l-1?f:Le,g=0;g<m;g++)for(U=g!==m-1?f:ve,p=u*t*f+g*f,d=t-U,K=0;K<Te;K++){if(Te>1&&(re=new r(e.pixels.resultPixels.buffer,t*i*K*c,t*i)),y=n.byteLength-e.ptr,E=new DataView(n,e.ptr,Math.min(10,y)),F={},I=0,V=E.getUint8(0),I++,w=V>>6&255,S=V>>2&15,S!==(g*f>>3&15))throw"integrity issue";if(O=V&3,O>3)throw e.ptr+=I,"Invalid block encoding ("+O+")";if(O===2){e.counter.constant++,e.ptr+=I;continue}else if(O===0){if(e.counter.uncompressed++,e.ptr+=I,x=v*U*c,k=n.byteLength-e.ptr,x=x<k?x:k,L=new ArrayBuffer(x%c===0?x:x+c-x%c),X=new Uint8Array(L),X.set(new Uint8Array(n,e.ptr,x)),b=new r(L),D=0,G)for(s=0;s<v;s++){for(h=0;h<U;h++)G[p]&&(re[p]=b[D++]),p++;p+=d}else for(s=0;s<v;s++){for(h=0;h<U;h++)re[p++]=b[D++];p+=d}e.ptr+=D*c}else if(de=T.getDataTypeUsed(o,w),le=T.getOnePixel(F,I,de,E),I+=T.getDataTypeSize(de),O===3)if(e.ptr+=I,e.counter.constantoffset++,G)for(s=0;s<v;s++){for(h=0;h<U;h++)G[p]&&(re[p]=le),p++;p+=d}else for(s=0;s<v;s++){for(h=0;h<U;h++)re[p++]=le;p+=d}else if(e.ptr+=I,T.decodeBits(n,e,ee,le,K),I=0,G)for(s=0;s<v;s++){for(h=0;h<U;h++)G[p]&&(re[p]=ee[I++]),p++;p+=d}else for(s=0;s<v;s++){for(h=0;h<U;h++)re[p++]=ee[I++];p+=d}}},formatFileInfo:function(n){return{fileIdentifierString:n.headerInfo.fileIdentifierString,fileVersion:n.headerInfo.fileVersion,imageType:n.headerInfo.imageType,height:n.headerInfo.height,width:n.headerInfo.width,numValidPixel:n.headerInfo.numValidPixel,microBlockSize:n.headerInfo.microBlockSize,blobSize:n.headerInfo.blobSize,maxZError:n.headerInfo.maxZError,pixelType:T.getPixelType(n.headerInfo.imageType),eofOffset:n.eofOffset,mask:n.mask?{numBytes:n.mask.numBytes}:null,pixels:{numBlocksX:n.pixels.numBlocksX,numBlocksY:n.pixels.numBlocksY,maxValue:n.headerInfo.zMax,minValue:n.headerInfo.zMin,noDataValue:n.noDataValue}}},constructConstantSurface:function(n){var e=n.headerInfo.zMax,r=n.headerInfo.numDims,a=n.headerInfo.height*n.headerInfo.width,t=a*r,i=0,f=0,o=0,c=n.pixels.resultMask;if(c)if(r>1)for(i=0;i<r;i++)for(o=i*a,f=0;f<a;f++)c[f]&&(n.pixels.resultPixels[o+f]=e);else for(f=0;f<a;f++)c[f]&&(n.pixels.resultPixels[f]=e);else if(n.pixels.resultPixels.fill)n.pixels.resultPixels.fill(e);else for(f=0;f<t;f++)n.pixels.resultPixels[f]=e},getDataTypeArray:function(n){var e;switch(n){case 0:e=Int8Array;break;case 1:e=Uint8Array;break;case 2:e=Int16Array;break;case 3:e=Uint16Array;break;case 4:e=Int32Array;break;case 5:e=Uint32Array;break;case 6:e=Float32Array;break;case 7:e=Float64Array;break;default:e=Float32Array}return e},getPixelType:function(n){var e;switch(n){case 0:e="S8";break;case 1:e="U8";break;case 2:e="S16";break;case 3:e="U16";break;case 4:e="S32";break;case 5:e="U32";break;case 6:e="F32";break;case 7:e="F64";break;default:e="F32"}return e},isValidPixelValue:function(n,e){if(e==null)return!1;var r;switch(n){case 0:r=e>=-128&&e<=127;break;case 1:r=e>=0&&e<=255;break;case 2:r=e>=-32768&&e<=32767;break;case 3:r=e>=0&&e<=65536;break;case 4:r=e>=-2147483648&&e<=2147483647;break;case 5:r=e>=0&&e<=4294967296;break;case 6:r=e>=-34027999387901484e22&&e<=34027999387901484e22;break;case 7:r=e>=5e-324&&e<=17976931348623157e292;break;default:r=!1}return r},getDataTypeSize:function(n){var e=0;switch(n){case 0:case 1:e=1;break;case 2:case 3:e=2;break;case 4:case 5:case 6:e=4;break;case 7:e=8;break;default:e=n}return e},getDataTypeUsed:function(n,e){var r=n;switch(n){case 2:case 4:r=n-e;break;case 3:case 5:r=n-2*e;break;case 6:e===0?r=n:e===1?r=2:r=1;break;case 7:e===0?r=n:r=n-2*e+1;break;default:r=n;break}return r},getOnePixel:function(n,e,r,a){var t=0;switch(r){case 0:t=a.getInt8(e);break;case 1:t=a.getUint8(e);break;case 2:t=a.getInt16(e,!0);break;case 3:t=a.getUint16(e,!0);break;case 4:t=a.getInt32(e,!0);break;case 5:t=a.getUInt32(e,!0);break;case 6:t=a.getFloat32(e,!0);break;case 7:t=a.getFloat64(e,!0);break;default:throw"the decoder does not understand this pixel type"}return t}},B=function(n,e,r){this.val=n,this.left=e,this.right=r},W={decode:function(n,e){e=e||{};var r=e.noDataValue,a=0,t={};if(t.ptr=e.inputOffset||0,t.pixels={},!!T.readHeaderInfo(n,t)){var i=t.headerInfo,f=i.fileVersion,o=T.getDataTypeArray(i.imageType);T.readMask(n,t),i.numValidPixel!==i.width*i.height&&!t.pixels.resultMask&&(t.pixels.resultMask=e.maskData);var c=i.width*i.height;if(t.pixels.resultPixels=new o(c*i.numDims),t.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},i.numValidPixel!==0)if(i.zMax===i.zMin)T.constructConstantSurface(t);else if(f>=4&&T.checkMinMaxRanges(n,t))T.constructConstantSurface(t);else{var m=new DataView(n,t.ptr,2),l=m.getUint8(0);if(t.ptr++,l)T.readDataOneSweep(n,t,o);else if(f>1&&i.imageType<=1&&Math.abs(i.maxZError-.5)<1e-5){var s=m.getUint8(1);if(t.ptr++,t.encodeMode=s,s>2||f<4&&s>1)throw"Invalid Huffman flag "+s;s?T.readHuffman(n,t,o):T.readTiles(n,t,o)}else T.readTiles(n,t,o)}t.eofOffset=t.ptr;var h;e.inputOffset?(h=t.headerInfo.blobSize+e.inputOffset-t.ptr,Math.abs(h)>=1&&(t.eofOffset=e.inputOffset+t.headerInfo.blobSize)):(h=t.headerInfo.blobSize-t.ptr,Math.abs(h)>=1&&(t.eofOffset=t.headerInfo.blobSize));var u={width:i.width,height:i.height,pixelData:t.pixels.resultPixels,minValue:i.zMin,maxValue:i.zMax,validPixelCount:i.numValidPixel,dimCount:i.numDims,dimStats:{minValues:i.minValues,maxValues:i.maxValues},maskData:t.pixels.resultMask};if(t.pixels.resultMask&&T.isValidPixelValue(i.imageType,r)){var g=t.pixels.resultMask;for(a=0;a<c;a++)g[a]||(u.pixelData[a]=r);u.noDataValue=r}return t.noDataValue=r,e.returnFileInfo&&(u.fileInfo=T.formatFileInfo(t)),u}},getBandCount:function(n){var e=0,r=0,a={};for(a.ptr=0,a.pixels={};r<n.byteLength-58;)T.readHeaderInfo(n,a),r+=a.headerInfo.blobSize,e++,a.ptr=r;return e}};return W}(),C=function(){var A=new ArrayBuffer(4),T=new Uint8Array(A),B=new Uint32Array(A);return B[0]=1,T[0]===1}(),j={decode:function(A,T){if(!C)throw"Big endian system is not supported.";T=T||{};var B=T.inputOffset||0,W=new Uint8Array(A,B,10),n=String.fromCharCode.apply(null,W),e,r;if(n.trim()==="CntZImage")e=M,r=1;else if(n.substring(0,5)==="Lerc2")e=J,r=2;else throw"Unexpected file identifier string: "+n;for(var a=0,t=A.byteLength-10,i,f=[],o,c,m={width:0,height:0,pixels:[],pixelType:T.pixelType,mask:null,statistics:[]};B<t;){var l=e.decode(A,{inputOffset:B,encodedMaskData:i,maskData:c,returnMask:a===0,returnEncodedMask:a===0,returnFileInfo:!0,pixelType:T.pixelType||null,noDataValue:T.noDataValue||null});B=l.fileInfo.eofOffset,a===0&&(i=l.encodedMaskData,c=l.maskData,m.width=l.width,m.height=l.height,m.dimCount=l.dimCount||1,m.pixelType=l.pixelType||l.fileInfo.pixelType,m.mask=l.maskData),r>1&&l.fileInfo.mask&&l.fileInfo.mask.numBytes>0&&f.push(l.maskData),a++,m.pixels.push(l.pixelData),m.statistics.push({minValue:l.minValue,maxValue:l.maxValue,noDataValue:l.noDataValue,dimStats:l.dimStats})}var s,h,u;if(r>1&&f.length>1){for(u=m.width*m.height,m.bandMasks=f,c=new Uint8Array(u),c.set(f[0]),s=1;s<f.length;s++)for(o=f[s],h=0;h<u;h++)c[h]=c[h]&o[h];m.maskData=c}return m}};typeof define=="function"&&define.amd?define([],function(){return j}):typeof Ee<"u"&&Ee.exports?Ee.exports=j:this.Lerc=j})()});var Sr={NONE:0,LERC:1},gr=Object.freeze(Sr);var te={};function Dr(M,J){let C=0,j,A,T,B,W=J.length;for(T=J[0],j=1;j<=W;j++)B=J[j%W],M[0]>Math.min(T[0],B[0])&&M[0]<=Math.max(T[0],B[0])&&M[1]<=Math.max(T[1],B[1])&&T[0]!==B[0]&&(A=(M[0]-T[0])*(B[1]-T[1])/(B[0]-T[0])+T[1],(T[1]===B[1]||M[1]<=A)&&C++),T=B;return C%2!==0}te.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var qe=new _,Ar=new De,Er=new _,Lr=new _;te.computeVertices=function(M){if(!ie(M)||!ie(M.heightmap))throw new xe("options.heightmap is required.");if(!ie(M.width)||!ie(M.height))throw new xe("options.width and options.height are required.");if(!ie(M.nativeRectangle))throw new xe("options.nativeRectangle is required.");if(!ie(M.skirtHeight))throw new xe("options.skirtHeight is required.");let J=M.flattenPolygonHeight||[1],C=M.flattenPolygon||[],j=M.VTN,A=Math.cos,T=Math.sin,B=Math.sqrt,W=Math.atan,n=Math.exp,e=Ue.PI_OVER_TWO,r=Ue.toRadians,a=M.heightmap,t=M.width,i=M.height,f=M.skirtHeight,o=f>0,c=q(M.isGeographic,!0),m=q(M.ellipsoid,Se.default),l=1/m.maximumRadius,s=oe.clone(M.nativeRectangle),h=oe.clone(M.rectangle),u,g,v,U;ie(h)?(u=h.west,g=h.south,v=h.east,U=h.north):c?(u=r(s.west),g=r(s.south),v=r(s.east),U=r(s.north)):(u=s.west*l,g=e-2*W(n(-s.south*l)),v=s.east*l,U=e-2*W(n(-s.north*l)));let y=M.relativeToCenter,V=ie(y);y=V?y:_.ZERO;let w=q(M.includeWebMercatorT,!1),S=q(M.exaggeration,1),p=q(M.exaggerationRelativeHeight,0),x=S!==1,k=q(M.structure,te.DEFAULT_STRUCTURE),D=q(k.heightScale,te.DEFAULT_STRUCTURE.heightScale),I=q(k.heightOffset,te.DEFAULT_STRUCTURE.heightOffset),E=q(k.elementsPerHeight,te.DEFAULT_STRUCTURE.elementsPerHeight),F=q(k.stride,te.DEFAULT_STRUCTURE.stride),L=q(k.elementMultiplier,te.DEFAULT_STRUCTURE.elementMultiplier),X=q(k.isBigEndian,te.DEFAULT_STRUCTURE.isBigEndian),b=oe.computeWidth(s),O=oe.computeHeight(s),ee=b/(t-1),Le=O/(i-1);c||(b*=l,O*=l);let ve=m.radiiSquared,de=ve.x,le=ve.y,Te=ve.z,K=65536,G=-65536,re=sr.eastNorthUpToFixedFrame(y,m),pr=De.inverseTransformation(re,Ar),Be,We;w&&(Be=Ae.geodeticLatitudeToMercatorAngle(g),We=1/(Ae.geodeticLatitudeToMercatorAngle(U)-Be));let ue=Er;ue.x=Number.POSITIVE_INFINITY,ue.y=Number.POSITIVE_INFINITY,ue.z=Number.POSITIVE_INFINITY;let ce=Lr;ce.x=Number.NEGATIVE_INFINITY,ce.y=Number.NEGATIVE_INFINITY,ce.z=Number.NEGATIVE_INFINITY;let Fe=Number.POSITIVE_INFINITY,we=t*i,Ir=f>0?t*2+i*2:0,ne=we+Ir,ae=new Array(ne),Ge=new Array(ne),Qe=new Array(ne),Je=w?new Array(ne):[],Ke=x?new Array(ne):[],be=new Array(ne),Ne=0,Ce=i,Oe=0,Re=t;o&&(--Ne,++Ce,--Oe,++Re);let ke=1e-5;for(let N=Ne;N<Ce;++N){let R=N;R<0&&(R=0),R>=i&&(R=i-1);let z=s.north-Le*R;c?z=r(z):z=e-2*W(n(-z*l));let me=(z-g)/(U-g);me=Ue.clamp(me,0,1);let Z=N===Ne,se=N===Ce-1;f>0&&(Z?z+=ke*O:se&&(z-=ke*O));let pe=A(z),he=T(z),ye=Te*he,Me;w&&(Me=(Ae.geodeticLatitudeToMercatorAngle(z)-Be)*We);for(let fe=Oe;fe<Re;++fe){let $=fe;$<0&&($=0),$>=t&&($=t-1);let Ie=R*(t*F)+$*F,H;if(E===1)H=a[Ie];else{H=0;let Y;if(X)for(Y=0;Y<E;++Y)H=H*L+a[Ie+Y];else for(Y=E-1;Y>=0;--Y)H=H*L+a[Ie+Y]}H=H*D+I,G=Math.max(G,H),K=Math.min(K,H);let Q=s.west+ee*$;c?Q=r(Q):Q=Q*l;let Xe=(Q-u)/(v-u);Xe=Ue.clamp(Xe,0,1);let P=R*t+$;if(be[P]=0,f>0){let Y=fe===Oe,Ve=fe===Re-1,nr=Z||se||Y||Ve;if((Z||se)&&(Y||Ve))continue;nr&&(H-=f,Y?(P=we+(i-R-1),Q-=ke*b):se?P=we+i+(t-$-1):Ve?(P=we+i+t+R,Q+=ke*b):Z&&(P=we+i+t+i+$),be[P]=1)}let _e=pe*A(Q),ze=pe*T(Q),ir=de*_e,tr=le*ze,Ze=1/B(ir*_e+tr*ze+ye*he),Tr=ir*Ze,kr=tr*Ze,yr=ye*Ze;for(let Y=0;Y<J.length;Y++)J[Y]!==1&&Dr([Q,z],C[Y])&&(H=J[Y]);let ge=new _;ge.x=Tr+_e*H,ge.y=kr+ze*H,ge.z=yr+he*H,De.multiplyByPoint(pr,ge,qe),_.minimumByComponent(qe,ue,ue),_.maximumByComponent(qe,ce,ce),Fe=Math.min(Fe,H),ae[P]=ge,Qe[P]=new ar(Xe,me),Ge[P]=H,w&&(Je[P]=Me),x&&(Ke[P]=m.geodeticSurfaceNormal(ge))}}let He=new Array(ne);if(f>0){let N=0;for(let R=0;R<i;++R){let z=-1,me=1;R<2&&(z=0),R>=i-1&&(me=0);for(let Z=0;Z<t;++Z){let se=-1,pe=1;Z<2&&(se=0),Z>=t-1&&(pe=0),N=R*t+Z;try{let he=ae[(R+z)*t+Z],ye=ae[(R+me)*t+Z],Me=ae[R*t+(Z+se)],fe=ae[R*t+(Z+pe)],$=_.subtract(Me,fe,new _),Ie=_.subtract(he,ye,new _),H=_.cross($,Ie,new _),Q=_.normalize(H,new _);He[N]=or.octEncodeFloat(Q)}catch{He[N]=0}}}}let xr=fr.fromPoints(ae),$e;ie(h)&&($e=cr.fromRectangle(h,K,G,m));let Pe;V&&(Pe=new mr(m).computeHorizonCullingPointPossiblyUnderEllipsoid(y,ae,K));let Ur=new ur(ue,ce,y),Ye=new hr(y,Ur,Fe,G,re,j?f>0:!1,w,x,S,p),er=new Float32Array(ne*Ye.stride),rr=0;for(let N=0;N<ne;++N)rr=Ye.encode(er,rr,ae[N],Qe[N],Ge[N],f>0?He[N]:void 0,Je[N],Ke[N],f>0||void 0,void 0,be[N]);return{vertices:er,maximumHeight:G,minimumHeight:K,encoding:Ye,boundingSphere3D:xr,orientedBoundingBox:$e,occludeePointInScaledSpace:Pe}};var vr=te;var wr=Vr(dr(),1);function Br(M,J){if(M.encoding===gr.LERC){let A;try{A=wr.default.decode(M.heightmap)}catch(B){throw new je(B)}if(A.statistics[0].minValue===Number.MAX_VALUE)throw new je("Invalid tile data");M.heightmap=A.pixels[0],M.width=A.width,M.height=A.height}M.ellipsoid=Se.clone(M.ellipsoid),M.rectangle=oe.clone(M.rectangle);let C=vr.computeVertices(M),j=C.vertices;return J.push(j.buffer),{vertices:j.buffer,numberOfAttributes:C.encoding.stride,minimumHeight:C.minimumHeight,maximumHeight:C.maximumHeight,gridWidth:M.width,gridHeight:M.height,boundingSphere3D:C.boundingSphere3D,orientedBoundingBox:C.orientedBoundingBox,occludeePointInScaledSpace:C.occludeePointInScaledSpace,encoding:C.encoding,westIndicesSouthToNorth:C.westIndicesSouthToNorth,southIndicesEastToWest:C.southIndicesEastToWest,eastIndicesNorthToSouth:C.eastIndicesNorthToSouth,northIndicesWestToEast:C.northIndicesWestToEast}}var fi=lr(Br);export{fi as default};
public/CimSDK/Workers/createVerticesFromQuantizedTerrainMesh.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as Ft,b as Lt}from"./chunk-GNVRN42E.js";import{a as Pt}from"./chunk-CQELY6Z3.js";import{a as tt}from"./chunk-DMXICNHG.js";import"./chunk-HV57XH4K.js";import{a as Ht}from"./chunk-ZPRLAWII.js";import{a as rt}from"./chunk-ZDNS2GYV.js";import"./chunk-QHUUGFLC.js";import{b as $,g as Gt,i as St}from"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import{b as V,c as Et,d as Nt,e as kt}from"./chunk-7DK7KB7Q.js";import{a as x}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import{a as T}from"./chunk-INT7THOB.js";import{e as b}from"./chunk-PPCZYYBW.js";function y(){T.throwInstantiationError()}Object.defineProperties(y.prototype,{errorEvent:{get:T.throwInstantiationError},credit:{get:T.throwInstantiationError},tilingScheme:{get:T.throwInstantiationError},hasWaterMask:{get:T.throwInstantiationError},hasVertexNormals:{get:T.throwInstantiationError},availability:{get:T.throwInstantiationError}});var _t=[];y.getRegularGridIndices=function(t,i){if(t*i>=x.FOUR_GIGABYTES)throw new T("The total number of vertices (width * height) must be less than 4,294,967,296.");let n=_t[t];b(n)||(_t[t]=n=[]);let o=n[i];return b(o)||(t*i<x.SIXTY_FOUR_KILOBYTES?o=n[i]=new Uint16Array((t-1)*(i-1)*6):o=n[i]=new Uint32Array((t-1)*(i-1)*6),Yt(t,i,o,0)),o};var Vt=[];y.getRegularGridIndicesAndEdgeIndices=function(t,i){if(t*i>=x.FOUR_GIGABYTES)throw new T("The total number of vertices (width * height) must be less than 4,294,967,296.");let n=Vt[t];b(n)||(Vt[t]=n=[]);let o=n[i];if(!b(o)){let a=y.getRegularGridIndices(t,i),r=Rt(t,i),e=r.westIndicesSouthToNorth,c=r.southIndicesEastToWest,d=r.eastIndicesNorthToSouth,I=r.northIndicesWestToEast;o=n[i]={indices:a,westIndicesSouthToNorth:e,southIndicesEastToWest:c,eastIndicesNorthToSouth:d,northIndicesWestToEast:I}}return o};var Bt=[];y.getRegularGridAndSkirtIndicesAndEdgeIndices=function(t,i){if(t*i>=x.FOUR_GIGABYTES)throw new T("The total number of vertices (width * height) must be less than 4,294,967,296.");let n=Bt[t];b(n)||(Bt[t]=n=[]);let o=n[i];if(!b(o)){let a=t*i,r=(t-1)*(i-1)*6,e=t*2+i*2,c=Math.max(0,e-4)*6,d=a+e,I=r+c,g=Rt(t,i),H=g.westIndicesSouthToNorth,O=g.southIndicesEastToWest,p=g.eastIndicesNorthToSouth,h=g.northIndicesWestToEast,N=rt.createTypedArray(d,I);Yt(t,i,N,0),y.addSkirtIndices(H,O,p,h,a,N,r),o=n[i]={indices:N,westIndicesSouthToNorth:H,southIndicesEastToWest:O,eastIndicesNorthToSouth:p,northIndicesWestToEast:h,indexCountWithoutSkirts:r}}return o};y.addSkirtIndices=function(t,i,n,o,a,r,e){let c=a;e=st(t,c,r,e),c+=t.length,e=st(i,c,r,e),c+=i.length,e=st(n,c,r,e),c+=n.length,st(o,c,r,e)};function Rt(t,i){let n=new Array(i),o=new Array(t),a=new Array(i),r=new Array(t),e;for(e=0;e<t;++e)r[e]=e,o[e]=t*i-1-e;for(e=0;e<i;++e)a[e]=(e+1)*t-1,n[e]=(i-e-1)*t;return{westIndicesSouthToNorth:n,southIndicesEastToWest:o,eastIndicesNorthToSouth:a,northIndicesWestToEast:r}}function Yt(t,i,n,o){let a=0;for(let r=0;r<i-1;++r){for(let e=0;e<t-1;++e){let c=a,d=c+t,I=d+1,g=c+1;n[o++]=c,n[o++]=d,n[o++]=g,n[o++]=g,n[o++]=d,n[o++]=I,++a}++a}}function st(t,i,n,o){let a=t[0],r=t.length;for(let e=1;e<r;++e){let c=t[e];n[o++]=a,n[o++]=c,n[o++]=i,n[o++]=i,n[o++]=c,n[o++]=i+1,a=c,++i}return o}y.heightmapTerrainQuality=.25;y.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(t,i,n){return t.maximumRadius*2*Math.PI*y.heightmapTerrainQuality/(i*n)};y.prototype.requestTileGeometry=T.throwInstantiationError;y.prototype.getLevelMaximumGeometricError=T.throwInstantiationError;y.prototype.getTileDataAvailable=T.throwInstantiationError;y.prototype.loadTileDataAvailability=T.throwInstantiationError;var Ut=y;var pt=32767,nt=new V,ce=new V,ae=new V,l=new Et,Q=new Nt,ct=new Et,q=[],et=[];function zt(t,i){let n=0,o,a,r,e,c=i.length;for(r=i[0],o=1;o<=c;o++)e=i[o%c],t[0]>Math.min(r[0],e[0])&&t[0]<=Math.max(r[0],e[0])&&t[1]<=Math.max(r[1],e[1])&&r[0]!==e[0]&&(a=(t[0]-r[0])*(e[1]-r[1])/(e[0]-r[0])+r[1],(r[1]===e[1]||t[1]<=a)&&n++),r=e;return n%2!==0}function ue(t,i,n,o){let a=(t.x-n.x)*(i.y-n.y)-(t.y-n.y)*(i.x-n.x),r=(t.x-o.x)*(i.y-o.y)-(t.y-o.y)*(i.x-o.x);if(a*r>=0)return!1;let e=(n.x-t.x)*(o.y-t.y)-(n.y-t.y)*(o.x-t.x),c=e+a-r;if(e*c>=0)return!1;let d=e/(r-a),I=d*(i.x-t.x),g=d*(i.y-t.y);return{x:t.x+I,y:t.y+g}}function le(t,i){let n=t.flattenPolygonHeight||[1],o=t.flattenPolygon||[],a=-65565,r=t.quantizedVertices,e=r.length/3,c=t.octEncodedNormals,d=t.westIndices.length+t.eastIndices.length+t.southIndices.length+t.northIndices.length,I=t.includeWebMercatorT,g=t.exaggeration,H=t.exaggerationRelativeHeight,p=g!==1,h=St.clone(t.rectangle),N=h.west,k=h.south,G=h.east,M=h.north;q.length=0,et.length=0;let E=!1,w=[[N,k],[G,k],[G,M],[N,M]];for(let s=0;s<n.length;s++)if(n[s]!==1){E=!1;for(let u=0;u<o[s].length;u++){let S=o[s][u];if(ct.longitude=S[0],ct.latitude=S[1],ct.height=0,St.contains(h,ct)){q.push(n[s]),et.push(o[s]),E=!0;break}}if(!E){for(let u=0;u<w.length;u++)if(zt(w[u],o[s])){q.push(n[s]),et.push(o[s]),E=!0;break}}if(!E)for(let u=0;u<o[s].length-1;u++){for(let S=0;S<w.length-1;S++){let X={x:w[S][0],y:w[S][1]},it={x:w[S+1][0],y:w[S+1][1]},Z={x:o[s][u][0],y:o[s][u][1]},J={x:o[s][u+1][0],y:o[s][u+1][1]};if(ue(X,it,Z,J)){q.push(n[s]),et.push(o[s]),E=!0;break}}if(E)break}}let m=kt.clone(t.ellipsoid),B=t.minimumHeight,F=t.maximumHeight,L=t.relativeToCenter,K=Gt.eastNorthUpToFixedFrame(L,m),_=$.inverseTransformation(K,new $),A,D;I&&(A=tt.geodeticLatitudeToMercatorAngle(k),D=1/(tt.geodeticLatitudeToMercatorAngle(M)-A));let jt=r.subarray(0,e),Dt=r.subarray(e,2*e),qt=r.subarray(e*2,3*e),wt=b(c),f=new Array(e),W=new Array(e),dt=new Array(e),bt=I?new Array(e):[],Mt=p?new Array(e):[],C=ce;C.x=Number.POSITIVE_INFINITY,C.y=Number.POSITIVE_INFINITY,C.z=Number.POSITIVE_INFINITY;let v=ae;v.x=Number.NEGATIVE_INFINITY,v.y=Number.NEGATIVE_INFINITY,v.z=Number.NEGATIVE_INFINITY;let ht=Number.POSITIVE_INFINITY,It=Number.NEGATIVE_INFINITY,ft=Number.POSITIVE_INFINITY,gt=Number.NEGATIVE_INFINITY;for(let s=0;s<e;++s){let u=jt[s],S=Dt[s],X=u/pt,it=S/pt,Z=x.lerp(B,F,qt[s]/pt);l.longitude=x.lerp(N,G,X),l.latitude=x.lerp(k,M,it),l.height=Z;for(let j=0;j<q.length;j++)if(q[j]!==1){let se=[l.longitude,l.latitude];zt(se,et[j])&&(l.height=Z=n[j],a=Math.max(a,n[j]))}ht=Math.min(l.longitude,ht),It=Math.max(l.longitude,It),ft=Math.min(l.latitude,ft),gt=Math.max(l.latitude,gt);let J=m.cartographicToCartesian(l);f[s]=new Nt(X,it),W[s]=Z,dt[s]=J,I&&(bt[s]=(tt.geodeticLatitudeToMercatorAngle(l.latitude)-A)*D),p&&(Mt[s]=m.geodeticSurfaceNormal(J)),$.multiplyByPoint(_,J,nt),V.minimumByComponent(nt,C,C),V.maximumByComponent(nt,v,v)}a!==-65565&&(F=a*1.2);let mt=lt(t.westIndices,function(s,u){return f[s].y-f[u].y}),Tt=lt(t.eastIndices,function(s,u){return f[u].y-f[s].y}),xt=lt(t.southIndices,function(s,u){return f[u].x-f[s].x}),yt=lt(t.northIndices,function(s,u){return f[s].x-f[u].x}),At;B<0&&(At=new Ft(m).computeHorizonCullingPointPossiblyUnderEllipsoid(L,dt,B));let P=B;P=Math.min(P,at(t.westIndices,t.westSkirtHeight,W,f,h,m,_,C,v)),P=Math.min(P,at(t.southIndices,t.southSkirtHeight,W,f,h,m,_,C,v)),P=Math.min(P,at(t.eastIndices,t.eastSkirtHeight,W,f,h,m,_,C,v)),P=Math.min(P,at(t.northIndices,t.northSkirtHeight,W,f,h,m,_,C,v));let Qt=new Ht(C,v,L),R=new Lt(L,Qt,P,F,K,wt,I,p,g,H),Y=R.stride,Kt=e*Y+d*Y,U=new Float32Array(Kt),Wt=0;for(let s=0;s<e;++s){if(wt){let u=s*2;Q.x=c[u],Q.y=c[u+1]}Wt=R.encode(U,Wt,dt[s],f[s],W[s],Q,bt[s],Mt[s])}let Xt=Math.max(0,(d-4)*2),Zt=t.indices.length+Xt*3,ot=rt.createTypedArray(e+d,Zt);ot.set(t.indices,0);let Ct=1e-4,vt=(It-ht)*Ct,Ot=(gt-ft)*Ct,Jt=-vt,$t=0,te=vt,ee=0,ne=0,oe=Ot,ie=0,re=-Ot,z=e*Y;return ut(U,z,mt,R,W,f,c,m,h,t.westSkirtHeight,A,D,Jt,$t),z+=t.westIndices.length*Y,ut(U,z,xt,R,W,f,c,m,h,t.southSkirtHeight,A,D,ie,re),z+=t.southIndices.length*Y,ut(U,z,Tt,R,W,f,c,m,h,t.eastSkirtHeight,A,D,te,ee),z+=t.eastIndices.length*Y,ut(U,z,yt,R,W,f,c,m,h,t.northSkirtHeight,A,D,ne,oe),Ut.addSkirtIndices(mt,xt,Tt,yt,e,ot,t.indices.length),i.push(U.buffer,ot.buffer),{vertices:U.buffer,indices:ot.buffer,westIndicesSouthToNorth:mt,southIndicesEastToWest:xt,eastIndicesNorthToSouth:Tt,northIndicesWestToEast:yt,vertexStride:Y,center:L,minimumHeight:B,maximumHeight:F,occludeePointInScaledSpace:At,encoding:R,indexCountWithoutSkirts:t.indices.length}}function at(t,i,n,o,a,r,e,c,d){let I=Number.POSITIVE_INFINITY,g=a.north,H=a.south,O=a.east,p=a.west;O<p&&(O+=x.TWO_PI);let h=t.length;for(let N=0;N<h;++N){let k=t[N],G=n[k],M=o[k];l.longitude=x.lerp(p,O,M.x),l.latitude=x.lerp(H,g,M.y),l.height=G-i;let E=r.cartographicToCartesian(l,nt);$.multiplyByPoint(e,E,E),V.minimumByComponent(E,c,c),V.maximumByComponent(E,d,d),I=Math.min(I,l.height)}return I}function ut(t,i,n,o,a,r,e,c,d,I,g,H,O,p){let h=b(e),N=d.north,k=d.south,G=d.east,M=d.west;G<M&&(G+=x.TWO_PI);let E=n.length;for(let w=0;w<E;++w){let m=n[w],B=a[m],F=r[m];l.longitude=x.lerp(M,G,F.x)+O,l.latitude=x.lerp(k,N,F.y)+p,l.height=B-I;let L=c.cartographicToCartesian(l,nt);if(h){let A=m*2;Q.x=e[A],Q.y=e[A+1]}let K;o.hasWebMercatorT&&(K=(tt.geodeticLatitudeToMercatorAngle(l.latitude)-g)*H);let _;o.hasGeodeticSurfaceNormals&&(_=c.geodeticSurfaceNormal(L)),i=o.encode(t,i,L,F,l.height,Q,K,_)}}function lt(t,i){let n;return typeof t.slice=="function"&&(n=t.slice(),typeof n.sort!="function"&&(n=void 0)),b(n)||(n=Array.prototype.slice.call(t)),n.sort(i),n}var Ge=Pt(le);export{Ge as default};
import{a as Ft,b as Lt}from"./chunk-FNJ2A2P5.js";import{a as Pt}from"./chunk-6MN6BBPN.js";import{a as tt}from"./chunk-NJVIDNJ6.js";import"./chunk-EZRSLM27.js";import{a as Ht}from"./chunk-LSAUAD4X.js";import{a as rt}from"./chunk-563CJZT3.js";import"./chunk-ZPW6H6BB.js";import{b as $,g as Gt,i as St}from"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import{b as V,c as Et,d as Nt,e as kt}from"./chunk-VDZXURWO.js";import{a as x}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import{a as T}from"./chunk-3K67FZLU.js";import{e as b}from"./chunk-55TU6MJR.js";function y(){T.throwInstantiationError()}Object.defineProperties(y.prototype,{errorEvent:{get:T.throwInstantiationError},credit:{get:T.throwInstantiationError},tilingScheme:{get:T.throwInstantiationError},hasWaterMask:{get:T.throwInstantiationError},hasVertexNormals:{get:T.throwInstantiationError},availability:{get:T.throwInstantiationError}});var _t=[];y.getRegularGridIndices=function(t,i){if(t*i>=x.FOUR_GIGABYTES)throw new T("The total number of vertices (width * height) must be less than 4,294,967,296.");let n=_t[t];b(n)||(_t[t]=n=[]);let o=n[i];return b(o)||(t*i<x.SIXTY_FOUR_KILOBYTES?o=n[i]=new Uint16Array((t-1)*(i-1)*6):o=n[i]=new Uint32Array((t-1)*(i-1)*6),Yt(t,i,o,0)),o};var Vt=[];y.getRegularGridIndicesAndEdgeIndices=function(t,i){if(t*i>=x.FOUR_GIGABYTES)throw new T("The total number of vertices (width * height) must be less than 4,294,967,296.");let n=Vt[t];b(n)||(Vt[t]=n=[]);let o=n[i];if(!b(o)){let a=y.getRegularGridIndices(t,i),r=Rt(t,i),e=r.westIndicesSouthToNorth,c=r.southIndicesEastToWest,d=r.eastIndicesNorthToSouth,I=r.northIndicesWestToEast;o=n[i]={indices:a,westIndicesSouthToNorth:e,southIndicesEastToWest:c,eastIndicesNorthToSouth:d,northIndicesWestToEast:I}}return o};var Bt=[];y.getRegularGridAndSkirtIndicesAndEdgeIndices=function(t,i){if(t*i>=x.FOUR_GIGABYTES)throw new T("The total number of vertices (width * height) must be less than 4,294,967,296.");let n=Bt[t];b(n)||(Bt[t]=n=[]);let o=n[i];if(!b(o)){let a=t*i,r=(t-1)*(i-1)*6,e=t*2+i*2,c=Math.max(0,e-4)*6,d=a+e,I=r+c,g=Rt(t,i),H=g.westIndicesSouthToNorth,O=g.southIndicesEastToWest,p=g.eastIndicesNorthToSouth,h=g.northIndicesWestToEast,N=rt.createTypedArray(d,I);Yt(t,i,N,0),y.addSkirtIndices(H,O,p,h,a,N,r),o=n[i]={indices:N,westIndicesSouthToNorth:H,southIndicesEastToWest:O,eastIndicesNorthToSouth:p,northIndicesWestToEast:h,indexCountWithoutSkirts:r}}return o};y.addSkirtIndices=function(t,i,n,o,a,r,e){let c=a;e=st(t,c,r,e),c+=t.length,e=st(i,c,r,e),c+=i.length,e=st(n,c,r,e),c+=n.length,st(o,c,r,e)};function Rt(t,i){let n=new Array(i),o=new Array(t),a=new Array(i),r=new Array(t),e;for(e=0;e<t;++e)r[e]=e,o[e]=t*i-1-e;for(e=0;e<i;++e)a[e]=(e+1)*t-1,n[e]=(i-e-1)*t;return{westIndicesSouthToNorth:n,southIndicesEastToWest:o,eastIndicesNorthToSouth:a,northIndicesWestToEast:r}}function Yt(t,i,n,o){let a=0;for(let r=0;r<i-1;++r){for(let e=0;e<t-1;++e){let c=a,d=c+t,I=d+1,g=c+1;n[o++]=c,n[o++]=d,n[o++]=g,n[o++]=g,n[o++]=d,n[o++]=I,++a}++a}}function st(t,i,n,o){let a=t[0],r=t.length;for(let e=1;e<r;++e){let c=t[e];n[o++]=a,n[o++]=c,n[o++]=i,n[o++]=i,n[o++]=c,n[o++]=i+1,a=c,++i}return o}y.heightmapTerrainQuality=.25;y.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(t,i,n){return t.maximumRadius*2*Math.PI*y.heightmapTerrainQuality/(i*n)};y.prototype.requestTileGeometry=T.throwInstantiationError;y.prototype.getLevelMaximumGeometricError=T.throwInstantiationError;y.prototype.getTileDataAvailable=T.throwInstantiationError;y.prototype.loadTileDataAvailability=T.throwInstantiationError;var Ut=y;var pt=32767,nt=new V,ce=new V,ae=new V,l=new Et,Q=new Nt,ct=new Et,q=[],et=[];function zt(t,i){let n=0,o,a,r,e,c=i.length;for(r=i[0],o=1;o<=c;o++)e=i[o%c],t[0]>Math.min(r[0],e[0])&&t[0]<=Math.max(r[0],e[0])&&t[1]<=Math.max(r[1],e[1])&&r[0]!==e[0]&&(a=(t[0]-r[0])*(e[1]-r[1])/(e[0]-r[0])+r[1],(r[1]===e[1]||t[1]<=a)&&n++),r=e;return n%2!==0}function ue(t,i,n,o){let a=(t.x-n.x)*(i.y-n.y)-(t.y-n.y)*(i.x-n.x),r=(t.x-o.x)*(i.y-o.y)-(t.y-o.y)*(i.x-o.x);if(a*r>=0)return!1;let e=(n.x-t.x)*(o.y-t.y)-(n.y-t.y)*(o.x-t.x),c=e+a-r;if(e*c>=0)return!1;let d=e/(r-a),I=d*(i.x-t.x),g=d*(i.y-t.y);return{x:t.x+I,y:t.y+g}}function le(t,i){let n=t.flattenPolygonHeight||[1],o=t.flattenPolygon||[],a=-65565,r=t.quantizedVertices,e=r.length/3,c=t.octEncodedNormals,d=t.westIndices.length+t.eastIndices.length+t.southIndices.length+t.northIndices.length,I=t.includeWebMercatorT,g=t.exaggeration,H=t.exaggerationRelativeHeight,p=g!==1,h=St.clone(t.rectangle),N=h.west,k=h.south,G=h.east,M=h.north;q.length=0,et.length=0;let E=!1,w=[[N,k],[G,k],[G,M],[N,M]];for(let s=0;s<n.length;s++)if(n[s]!==1){E=!1;for(let u=0;u<o[s].length;u++){let S=o[s][u];if(ct.longitude=S[0],ct.latitude=S[1],ct.height=0,St.contains(h,ct)){q.push(n[s]),et.push(o[s]),E=!0;break}}if(!E){for(let u=0;u<w.length;u++)if(zt(w[u],o[s])){q.push(n[s]),et.push(o[s]),E=!0;break}}if(!E)for(let u=0;u<o[s].length-1;u++){for(let S=0;S<w.length-1;S++){let X={x:w[S][0],y:w[S][1]},it={x:w[S+1][0],y:w[S+1][1]},Z={x:o[s][u][0],y:o[s][u][1]},J={x:o[s][u+1][0],y:o[s][u+1][1]};if(ue(X,it,Z,J)){q.push(n[s]),et.push(o[s]),E=!0;break}}if(E)break}}let m=kt.clone(t.ellipsoid),B=t.minimumHeight,F=t.maximumHeight,L=t.relativeToCenter,K=Gt.eastNorthUpToFixedFrame(L,m),_=$.inverseTransformation(K,new $),A,D;I&&(A=tt.geodeticLatitudeToMercatorAngle(k),D=1/(tt.geodeticLatitudeToMercatorAngle(M)-A));let jt=r.subarray(0,e),Dt=r.subarray(e,2*e),qt=r.subarray(e*2,3*e),wt=b(c),f=new Array(e),W=new Array(e),dt=new Array(e),bt=I?new Array(e):[],Mt=p?new Array(e):[],C=ce;C.x=Number.POSITIVE_INFINITY,C.y=Number.POSITIVE_INFINITY,C.z=Number.POSITIVE_INFINITY;let v=ae;v.x=Number.NEGATIVE_INFINITY,v.y=Number.NEGATIVE_INFINITY,v.z=Number.NEGATIVE_INFINITY;let ht=Number.POSITIVE_INFINITY,It=Number.NEGATIVE_INFINITY,ft=Number.POSITIVE_INFINITY,gt=Number.NEGATIVE_INFINITY;for(let s=0;s<e;++s){let u=jt[s],S=Dt[s],X=u/pt,it=S/pt,Z=x.lerp(B,F,qt[s]/pt);l.longitude=x.lerp(N,G,X),l.latitude=x.lerp(k,M,it),l.height=Z;for(let j=0;j<q.length;j++)if(q[j]!==1){let se=[l.longitude,l.latitude];zt(se,et[j])&&(l.height=Z=n[j],a=Math.max(a,n[j]))}ht=Math.min(l.longitude,ht),It=Math.max(l.longitude,It),ft=Math.min(l.latitude,ft),gt=Math.max(l.latitude,gt);let J=m.cartographicToCartesian(l);f[s]=new Nt(X,it),W[s]=Z,dt[s]=J,I&&(bt[s]=(tt.geodeticLatitudeToMercatorAngle(l.latitude)-A)*D),p&&(Mt[s]=m.geodeticSurfaceNormal(J)),$.multiplyByPoint(_,J,nt),V.minimumByComponent(nt,C,C),V.maximumByComponent(nt,v,v)}a!==-65565&&(F=a*1.2);let mt=lt(t.westIndices,function(s,u){return f[s].y-f[u].y}),Tt=lt(t.eastIndices,function(s,u){return f[u].y-f[s].y}),xt=lt(t.southIndices,function(s,u){return f[u].x-f[s].x}),yt=lt(t.northIndices,function(s,u){return f[s].x-f[u].x}),At;B<0&&(At=new Ft(m).computeHorizonCullingPointPossiblyUnderEllipsoid(L,dt,B));let P=B;P=Math.min(P,at(t.westIndices,t.westSkirtHeight,W,f,h,m,_,C,v)),P=Math.min(P,at(t.southIndices,t.southSkirtHeight,W,f,h,m,_,C,v)),P=Math.min(P,at(t.eastIndices,t.eastSkirtHeight,W,f,h,m,_,C,v)),P=Math.min(P,at(t.northIndices,t.northSkirtHeight,W,f,h,m,_,C,v));let Qt=new Ht(C,v,L),R=new Lt(L,Qt,P,F,K,wt,I,p,g,H),Y=R.stride,Kt=e*Y+d*Y,U=new Float32Array(Kt),Wt=0;for(let s=0;s<e;++s){if(wt){let u=s*2;Q.x=c[u],Q.y=c[u+1]}Wt=R.encode(U,Wt,dt[s],f[s],W[s],Q,bt[s],Mt[s])}let Xt=Math.max(0,(d-4)*2),Zt=t.indices.length+Xt*3,ot=rt.createTypedArray(e+d,Zt);ot.set(t.indices,0);let Ct=1e-4,vt=(It-ht)*Ct,Ot=(gt-ft)*Ct,Jt=-vt,$t=0,te=vt,ee=0,ne=0,oe=Ot,ie=0,re=-Ot,z=e*Y;return ut(U,z,mt,R,W,f,c,m,h,t.westSkirtHeight,A,D,Jt,$t),z+=t.westIndices.length*Y,ut(U,z,xt,R,W,f,c,m,h,t.southSkirtHeight,A,D,ie,re),z+=t.southIndices.length*Y,ut(U,z,Tt,R,W,f,c,m,h,t.eastSkirtHeight,A,D,te,ee),z+=t.eastIndices.length*Y,ut(U,z,yt,R,W,f,c,m,h,t.northSkirtHeight,A,D,ne,oe),Ut.addSkirtIndices(mt,xt,Tt,yt,e,ot,t.indices.length),i.push(U.buffer,ot.buffer),{vertices:U.buffer,indices:ot.buffer,westIndicesSouthToNorth:mt,southIndicesEastToWest:xt,eastIndicesNorthToSouth:Tt,northIndicesWestToEast:yt,vertexStride:Y,center:L,minimumHeight:B,maximumHeight:F,occludeePointInScaledSpace:At,encoding:R,indexCountWithoutSkirts:t.indices.length}}function at(t,i,n,o,a,r,e,c,d){let I=Number.POSITIVE_INFINITY,g=a.north,H=a.south,O=a.east,p=a.west;O<p&&(O+=x.TWO_PI);let h=t.length;for(let N=0;N<h;++N){let k=t[N],G=n[k],M=o[k];l.longitude=x.lerp(p,O,M.x),l.latitude=x.lerp(H,g,M.y),l.height=G-i;let E=r.cartographicToCartesian(l,nt);$.multiplyByPoint(e,E,E),V.minimumByComponent(E,c,c),V.maximumByComponent(E,d,d),I=Math.min(I,l.height)}return I}function ut(t,i,n,o,a,r,e,c,d,I,g,H,O,p){let h=b(e),N=d.north,k=d.south,G=d.east,M=d.west;G<M&&(G+=x.TWO_PI);let E=n.length;for(let w=0;w<E;++w){let m=n[w],B=a[m],F=r[m];l.longitude=x.lerp(M,G,F.x)+O,l.latitude=x.lerp(k,N,F.y)+p,l.height=B-I;let L=c.cartographicToCartesian(l,nt);if(h){let A=m*2;Q.x=e[A],Q.y=e[A+1]}let K;o.hasWebMercatorT&&(K=(tt.geodeticLatitudeToMercatorAngle(l.latitude)-g)*H);let _;o.hasGeodeticSurfaceNormals&&(_=c.geodeticSurfaceNormal(L)),i=o.encode(t,i,L,F,l.height,Q,K,_)}}function lt(t,i){let n;return typeof t.slice=="function"&&(n=t.slice(),typeof n.sort!="function"&&(n=void 0)),b(n)||(n=Array.prototype.slice.call(t)),n.sort(i),n}var Ge=Pt(le);export{Ge as default};
public/CimSDK/Workers/createWallGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as nt}from"./chunk-OUS3KKLX.js";import"./chunk-WGRWYGAM.js";import"./chunk-5B7R4ODL.js";import{a as _}from"./chunk-WF3WCQMH.js";import"./chunk-A6RR2BLJ.js";import"./chunk-EPQZOCRV.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{a as ot}from"./chunk-ZDNS2GYV.js";import{a as it}from"./chunk-LH4TAMBV.js";import{b as tt,c as et,d as S}from"./chunk-TNSV6TPX.js";import{d as I}from"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import{a as R}from"./chunk-3LWOQSP3.js";import{b as s,e as l}from"./chunk-7DK7KB7Q.js";import{a as J}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as w}from"./chunk-5HWP5DW7.js";import{a as P}from"./chunk-INT7THOB.js";import{e as r}from"./chunk-PPCZYYBW.js";var Q=new s,Y=new s,lt=new s,st=new s,pt=new s,ut=new s,ft=new s;function k(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions,o=t.maximumHeights,n=t.minimumHeights;if(!r(e))throw new P("options.positions is required.");if(r(o)&&o.length!==e.length)throw new P("options.positions and options.maximumHeights must have the same length.");if(r(n)&&n.length!==e.length)throw new P("options.positions and options.minimumHeights must have the same length.");let i=w(t.vertexFormat,_.DEFAULT),c=w(t.granularity,J.RADIANS_PER_DEGREE),a=w(t.ellipsoid,l.default);this._positions=e,this._minimumHeights=n,this._maximumHeights=o,this._vertexFormat=_.clone(i),this._granularity=c,this._ellipsoid=l.clone(a),this._workerName="createWallGeometry";let m=1+e.length*s.packedLength+2;r(n)&&(m+=n.length),r(o)&&(m+=o.length),this.packedLength=m+l.packedLength+_.packedLength+1}k.pack=function(t,e,o){if(!r(t))throw new P("value is required");if(!r(e))throw new P("array is required");o=w(o,0);let n,i=t._positions,c=i.length;for(e[o++]=c,n=0;n<c;++n,o+=s.packedLength)s.pack(i[n],e,o);let a=t._minimumHeights;if(c=r(a)?a.length:0,e[o++]=c,r(a))for(n=0;n<c;++n)e[o++]=a[n];let m=t._maximumHeights;if(c=r(m)?m.length:0,e[o++]=c,r(m))for(n=0;n<c;++n)e[o++]=m[n];return l.pack(t._ellipsoid,e,o),o+=l.packedLength,_.pack(t._vertexFormat,e,o),o+=_.packedLength,e[o]=t._granularity,e};var mt=l.clone(l.UNIT_SPHERE),rt=new _,V={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:mt,vertexFormat:rt,granularity:void 0};k.unpack=function(t,e,o){if(!r(t))throw new P("array is required");e=w(e,0);let n,i=t[e++],c=new Array(i);for(n=0;n<i;++n,e+=s.packedLength)c[n]=s.unpack(t,e);i=t[e++];let a;if(i>0)for(a=new Array(i),n=0;n<i;++n)a[n]=t[e++];i=t[e++];let m;if(i>0)for(m=new Array(i),n=0;n<i;++n)m[n]=t[e++];let q=l.unpack(t,e,mt);e+=l.packedLength;let H=_.unpack(t,e,rt);e+=_.packedLength;let f=t[e];return r(o)?(o._positions=c,o._minimumHeights=a,o._maximumHeights=m,o._ellipsoid=l.clone(q,o._ellipsoid),o._vertexFormat=_.clone(H,o._vertexFormat),o._granularity=f,o):(V.positions=c,V.minimumHeights=a,V.maximumHeights=m,V.granularity=f,new k(V))};k.fromConstantHeights=function(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions;if(!r(e))throw new P("options.positions is required.");let o,n,i=t.minimumHeight,c=t.maximumHeight,a=r(i),m=r(c);if(a||m){let H=e.length;o=a?new Array(H):void 0,n=m?new Array(H):void 0;for(let f=0;f<H;++f)a&&(o[f]=i),m&&(n[f]=c)}let q={positions:e,maximumHeights:n,minimumHeights:o,ellipsoid:t.ellipsoid,vertexFormat:t.vertexFormat};return new k(q)};k.createGeometry=function(t){let e=t._positions,o=t._minimumHeights,n=t._maximumHeights,i=t._vertexFormat,c=t._granularity,a=t._ellipsoid,m=nt.computePositions(a,e,n,o,c,!0);if(!r(m))return;let q=m.bottomPositions,H=m.topPositions,f=m.numCorners,B=H.length,y=B*2,h=i.position?new Float64Array(y):void 0,b=i.normal?new Float32Array(y):void 0,x=i.tangent?new Float32Array(y):void 0,F=i.bitangent?new Float32Array(y):void 0,M=i.st?new Float32Array(y/3*2):void 0,v=0,T=0,C=0,z=0,W=0,g=ft,d=ut,A=pt,Z=!0;B/=3;let p,j=0,ct=1/(B-f-1);for(p=0;p<B;++p){let E=p*3,u=s.fromArray(H,E,Q),U=s.fromArray(q,E,Y);if(i.position&&(h[v++]=U.x,h[v++]=U.y,h[v++]=U.z,h[v++]=u.x,h[v++]=u.y,h[v++]=u.z),i.st&&(M[W++]=j,M[W++]=0,M[W++]=j,M[W++]=1),i.normal||i.tangent||i.bitangent){let N=s.clone(s.ZERO,st),K=s.subtract(u,a.geodeticSurfaceNormal(u,Y),Y);if(p+1<B&&(N=s.fromArray(H,E+3,st)),Z){let G=s.subtract(N,u,lt),at=s.subtract(K,u,Q);g=s.normalize(s.cross(at,G,g),g),Z=!1}s.equalsEpsilon(u,N,J.EPSILON10)?Z=!0:(j+=ct,i.tangent&&(d=s.normalize(s.subtract(N,u,d),d)),i.bitangent&&(A=s.normalize(s.cross(g,d,A),A))),i.normal&&(b[T++]=g.x,b[T++]=g.y,b[T++]=g.z,b[T++]=g.x,b[T++]=g.y,b[T++]=g.z),i.tangent&&(x[z++]=d.x,x[z++]=d.y,x[z++]=d.z,x[z++]=d.x,x[z++]=d.y,x[z++]=d.z),i.bitangent&&(F[C++]=A.x,F[C++]=A.y,F[C++]=A.z,F[C++]=A.x,F[C++]=A.y,F[C++]=A.z)}}let D=new it;i.position&&(D.position=new S({componentDatatype:R.DOUBLE,componentsPerAttribute:3,values:h})),i.normal&&(D.normal=new S({componentDatatype:R.FLOAT,componentsPerAttribute:3,values:b})),i.tangent&&(D.tangent=new S({componentDatatype:R.FLOAT,componentsPerAttribute:3,values:x})),i.bitangent&&(D.bitangent=new S({componentDatatype:R.FLOAT,componentsPerAttribute:3,values:F})),i.st&&(D.st=new S({componentDatatype:R.FLOAT,componentsPerAttribute:2,values:M}));let $=y/3;y-=6*(f+1);let L=ot.createTypedArray($,y),O=0;for(p=0;p<$-2;p+=2){let E=p,u=p+2,U=s.fromArray(h,E*3,Q),N=s.fromArray(h,u*3,Y);if(s.equalsEpsilon(U,N,J.EPSILON10))continue;let K=p+1,G=p+3;L[O++]=K,L[O++]=E,L[O++]=G,L[O++]=G,L[O++]=E,L[O++]=u}return new et({attributes:D,indices:L,primitiveType:tt.TRIANGLES,boundingSphere:new I.fromVertices(h)})};var X=k;function ht(t,e){return r(e)&&(t=X.unpack(t,e)),t._ellipsoid=l.clone(t._ellipsoid),X.createGeometry(t)}var Ot=ht;export{Ot as default};
import{a as nt}from"./chunk-2BPIFUNJ.js";import"./chunk-XDTNLL4L.js";import"./chunk-45NF2JU3.js";import{a as _}from"./chunk-32UDSAPU.js";import"./chunk-EX67AA2G.js";import"./chunk-V5KKODOM.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{a as ot}from"./chunk-563CJZT3.js";import{a as it}from"./chunk-LH4TAMBV.js";import{b as tt,c as et,d as S}from"./chunk-WI5KIEME.js";import{d as I}from"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import{a as R}from"./chunk-NFDMGE7Q.js";import{b as s,e as l}from"./chunk-VDZXURWO.js";import{a as J}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as w}from"./chunk-5HWP5DW7.js";import{a as P}from"./chunk-3K67FZLU.js";import{e as r}from"./chunk-55TU6MJR.js";var Q=new s,Y=new s,lt=new s,st=new s,pt=new s,ut=new s,ft=new s;function k(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions,o=t.maximumHeights,n=t.minimumHeights;if(!r(e))throw new P("options.positions is required.");if(r(o)&&o.length!==e.length)throw new P("options.positions and options.maximumHeights must have the same length.");if(r(n)&&n.length!==e.length)throw new P("options.positions and options.minimumHeights must have the same length.");let i=w(t.vertexFormat,_.DEFAULT),c=w(t.granularity,J.RADIANS_PER_DEGREE),a=w(t.ellipsoid,l.default);this._positions=e,this._minimumHeights=n,this._maximumHeights=o,this._vertexFormat=_.clone(i),this._granularity=c,this._ellipsoid=l.clone(a),this._workerName="createWallGeometry";let m=1+e.length*s.packedLength+2;r(n)&&(m+=n.length),r(o)&&(m+=o.length),this.packedLength=m+l.packedLength+_.packedLength+1}k.pack=function(t,e,o){if(!r(t))throw new P("value is required");if(!r(e))throw new P("array is required");o=w(o,0);let n,i=t._positions,c=i.length;for(e[o++]=c,n=0;n<c;++n,o+=s.packedLength)s.pack(i[n],e,o);let a=t._minimumHeights;if(c=r(a)?a.length:0,e[o++]=c,r(a))for(n=0;n<c;++n)e[o++]=a[n];let m=t._maximumHeights;if(c=r(m)?m.length:0,e[o++]=c,r(m))for(n=0;n<c;++n)e[o++]=m[n];return l.pack(t._ellipsoid,e,o),o+=l.packedLength,_.pack(t._vertexFormat,e,o),o+=_.packedLength,e[o]=t._granularity,e};var mt=l.clone(l.UNIT_SPHERE),rt=new _,V={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:mt,vertexFormat:rt,granularity:void 0};k.unpack=function(t,e,o){if(!r(t))throw new P("array is required");e=w(e,0);let n,i=t[e++],c=new Array(i);for(n=0;n<i;++n,e+=s.packedLength)c[n]=s.unpack(t,e);i=t[e++];let a;if(i>0)for(a=new Array(i),n=0;n<i;++n)a[n]=t[e++];i=t[e++];let m;if(i>0)for(m=new Array(i),n=0;n<i;++n)m[n]=t[e++];let q=l.unpack(t,e,mt);e+=l.packedLength;let H=_.unpack(t,e,rt);e+=_.packedLength;let f=t[e];return r(o)?(o._positions=c,o._minimumHeights=a,o._maximumHeights=m,o._ellipsoid=l.clone(q,o._ellipsoid),o._vertexFormat=_.clone(H,o._vertexFormat),o._granularity=f,o):(V.positions=c,V.minimumHeights=a,V.maximumHeights=m,V.granularity=f,new k(V))};k.fromConstantHeights=function(t){t=w(t,w.EMPTY_OBJECT);let e=t.positions;if(!r(e))throw new P("options.positions is required.");let o,n,i=t.minimumHeight,c=t.maximumHeight,a=r(i),m=r(c);if(a||m){let H=e.length;o=a?new Array(H):void 0,n=m?new Array(H):void 0;for(let f=0;f<H;++f)a&&(o[f]=i),m&&(n[f]=c)}let q={positions:e,maximumHeights:n,minimumHeights:o,ellipsoid:t.ellipsoid,vertexFormat:t.vertexFormat};return new k(q)};k.createGeometry=function(t){let e=t._positions,o=t._minimumHeights,n=t._maximumHeights,i=t._vertexFormat,c=t._granularity,a=t._ellipsoid,m=nt.computePositions(a,e,n,o,c,!0);if(!r(m))return;let q=m.bottomPositions,H=m.topPositions,f=m.numCorners,B=H.length,y=B*2,h=i.position?new Float64Array(y):void 0,b=i.normal?new Float32Array(y):void 0,x=i.tangent?new Float32Array(y):void 0,F=i.bitangent?new Float32Array(y):void 0,M=i.st?new Float32Array(y/3*2):void 0,v=0,T=0,C=0,z=0,W=0,g=ft,d=ut,A=pt,Z=!0;B/=3;let p,j=0,ct=1/(B-f-1);for(p=0;p<B;++p){let E=p*3,u=s.fromArray(H,E,Q),U=s.fromArray(q,E,Y);if(i.position&&(h[v++]=U.x,h[v++]=U.y,h[v++]=U.z,h[v++]=u.x,h[v++]=u.y,h[v++]=u.z),i.st&&(M[W++]=j,M[W++]=0,M[W++]=j,M[W++]=1),i.normal||i.tangent||i.bitangent){let N=s.clone(s.ZERO,st),K=s.subtract(u,a.geodeticSurfaceNormal(u,Y),Y);if(p+1<B&&(N=s.fromArray(H,E+3,st)),Z){let G=s.subtract(N,u,lt),at=s.subtract(K,u,Q);g=s.normalize(s.cross(at,G,g),g),Z=!1}s.equalsEpsilon(u,N,J.EPSILON10)?Z=!0:(j+=ct,i.tangent&&(d=s.normalize(s.subtract(N,u,d),d)),i.bitangent&&(A=s.normalize(s.cross(g,d,A),A))),i.normal&&(b[T++]=g.x,b[T++]=g.y,b[T++]=g.z,b[T++]=g.x,b[T++]=g.y,b[T++]=g.z),i.tangent&&(x[z++]=d.x,x[z++]=d.y,x[z++]=d.z,x[z++]=d.x,x[z++]=d.y,x[z++]=d.z),i.bitangent&&(F[C++]=A.x,F[C++]=A.y,F[C++]=A.z,F[C++]=A.x,F[C++]=A.y,F[C++]=A.z)}}let D=new it;i.position&&(D.position=new S({componentDatatype:R.DOUBLE,componentsPerAttribute:3,values:h})),i.normal&&(D.normal=new S({componentDatatype:R.FLOAT,componentsPerAttribute:3,values:b})),i.tangent&&(D.tangent=new S({componentDatatype:R.FLOAT,componentsPerAttribute:3,values:x})),i.bitangent&&(D.bitangent=new S({componentDatatype:R.FLOAT,componentsPerAttribute:3,values:F})),i.st&&(D.st=new S({componentDatatype:R.FLOAT,componentsPerAttribute:2,values:M}));let $=y/3;y-=6*(f+1);let L=ot.createTypedArray($,y),O=0;for(p=0;p<$-2;p+=2){let E=p,u=p+2,U=s.fromArray(h,E*3,Q),N=s.fromArray(h,u*3,Y);if(s.equalsEpsilon(U,N,J.EPSILON10))continue;let K=p+1,G=p+3;L[O++]=K,L[O++]=E,L[O++]=G,L[O++]=G,L[O++]=E,L[O++]=u}return new et({attributes:D,indices:L,primitiveType:tt.TRIANGLES,boundingSphere:new I.fromVertices(h)})};var X=k;function ht(t,e){return r(e)&&(t=X.unpack(t,e)),t._ellipsoid=l.clone(t._ellipsoid),X.createGeometry(t)}var Ot=ht;export{Ot as default};
public/CimSDK/Workers/createWallOutlineGeometry.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as B}from"./chunk-OUS3KKLX.js";import"./chunk-WGRWYGAM.js";import"./chunk-5B7R4ODL.js";import"./chunk-A6RR2BLJ.js";import"./chunk-EPQZOCRV.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{a as W}from"./chunk-ZDNS2GYV.js";import{a as N}from"./chunk-LH4TAMBV.js";import{b as R,c as S,d as M}from"./chunk-TNSV6TPX.js";import{d as D}from"./chunk-QHUUGFLC.js";import"./chunk-BHJLM5NY.js";import{a as q}from"./chunk-3LWOQSP3.js";import{b as p,e as l}from"./chunk-7DK7KB7Q.js";import{a as O}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import{a as d}from"./chunk-5HWP5DW7.js";import{a as _}from"./chunk-INT7THOB.js";import{e as m}from"./chunk-PPCZYYBW.js";var U=new p,z=new p;function w(i){i=d(i,d.EMPTY_OBJECT);let t=i.positions,e=i.maximumHeights,o=i.minimumHeights;if(!m(t))throw new _("options.positions is required.");if(m(e)&&e.length!==t.length)throw new _("options.positions and options.maximumHeights must have the same length.");if(m(o)&&o.length!==t.length)throw new _("options.positions and options.minimumHeights must have the same length.");let s=d(i.granularity,O.RADIANS_PER_DEGREE),r=d(i.ellipsoid,l.default);this._positions=t,this._minimumHeights=o,this._maximumHeights=e,this._granularity=s,this._ellipsoid=l.clone(r),this._workerName="createWallOutlineGeometry";let n=1+t.length*p.packedLength+2;m(o)&&(n+=o.length),m(e)&&(n+=e.length),this.packedLength=n+l.packedLength+1}w.pack=function(i,t,e){if(!m(i))throw new _("value is required");if(!m(t))throw new _("array is required");e=d(e,0);let o,s=i._positions,r=s.length;for(t[e++]=r,o=0;o<r;++o,e+=p.packedLength)p.pack(s[o],t,e);let n=i._minimumHeights;if(r=m(n)?n.length:0,t[e++]=r,m(n))for(o=0;o<r;++o)t[e++]=n[o];let c=i._maximumHeights;if(r=m(c)?c.length:0,t[e++]=r,m(c))for(o=0;o<r;++o)t[e++]=c[o];return l.pack(i._ellipsoid,t,e),e+=l.packedLength,t[e]=i._granularity,t};var G=l.clone(l.UNIT_SPHERE),b={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:G,granularity:void 0};w.unpack=function(i,t,e){if(!m(i))throw new _("array is required");t=d(t,0);let o,s=i[t++],r=new Array(s);for(o=0;o<s;++o,t+=p.packedLength)r[o]=p.unpack(i,t);s=i[t++];let n;if(s>0)for(n=new Array(s),o=0;o<s;++o)n[o]=i[t++];s=i[t++];let c;if(s>0)for(c=new Array(s),o=0;o<s;++o)c[o]=i[t++];let E=l.unpack(i,t,G);t+=l.packedLength;let u=i[t];return m(e)?(e._positions=r,e._minimumHeights=n,e._maximumHeights=c,e._ellipsoid=l.clone(E,e._ellipsoid),e._granularity=u,e):(b.positions=r,b.minimumHeights=n,b.maximumHeights=c,b.granularity=u,new w(b))};w.fromConstantHeights=function(i){i=d(i,d.EMPTY_OBJECT);let t=i.positions;if(!m(t))throw new _("options.positions is required.");let e,o,s=i.minimumHeight,r=i.maximumHeight,n=m(s),c=m(r);if(n||c){let u=t.length;e=n?new Array(u):void 0,o=c?new Array(u):void 0;for(let a=0;a<u;++a)n&&(e[a]=s),c&&(o[a]=r)}let E={positions:t,maximumHeights:o,minimumHeights:e,ellipsoid:i.ellipsoid};return new w(E)};w.createGeometry=function(i){let t=i._positions,e=i._minimumHeights,o=i._maximumHeights,s=i._granularity,r=i._ellipsoid,n=B.computePositions(r,t,o,e,s,!1);if(!m(n))return;let c=n.bottomPositions,E=n.topPositions,u=E.length,a=u*2,f=new Float64Array(a),P=0;u/=3;let h;for(h=0;h<u;++h){let A=h*3,k=p.fromArray(E,A,U),L=p.fromArray(c,A,z);f[P++]=L.x,f[P++]=L.y,f[P++]=L.z,f[P++]=k.x,f[P++]=k.y,f[P++]=k.z}let V=new N({position:new M({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:f})}),y=a/3;a=2*y-4+y;let g=W.createTypedArray(y,a),H=0;for(h=0;h<y-2;h+=2){let A=h,k=h+2,L=p.fromArray(f,A*3,U),v=p.fromArray(f,k*3,z);if(p.equalsEpsilon(L,v,O.EPSILON10))continue;let T=h+1,x=h+3;g[H++]=T,g[H++]=A,g[H++]=T,g[H++]=x,g[H++]=A,g[H++]=k}return g[H++]=y-2,g[H++]=y-1,new S({attributes:V,indices:g,primitiveType:R.LINES,boundingSphere:new D.fromVertices(f)})};var C=w;function J(i,t){return m(t)&&(i=C.unpack(i,t)),i._ellipsoid=l.clone(i._ellipsoid),C.createGeometry(i)}var pi=J;export{pi as default};
import{a as B}from"./chunk-2BPIFUNJ.js";import"./chunk-XDTNLL4L.js";import"./chunk-45NF2JU3.js";import"./chunk-EX67AA2G.js";import"./chunk-V5KKODOM.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{a as W}from"./chunk-563CJZT3.js";import{a as N}from"./chunk-LH4TAMBV.js";import{b as R,c as S,d as M}from"./chunk-WI5KIEME.js";import{d as D}from"./chunk-ZPW6H6BB.js";import"./chunk-HMXXHGCW.js";import{a as q}from"./chunk-NFDMGE7Q.js";import{b as p,e as l}from"./chunk-VDZXURWO.js";import{a as O}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import{a as d}from"./chunk-5HWP5DW7.js";import{a as _}from"./chunk-3K67FZLU.js";import{e as m}from"./chunk-55TU6MJR.js";var U=new p,z=new p;function w(i){i=d(i,d.EMPTY_OBJECT);let t=i.positions,e=i.maximumHeights,o=i.minimumHeights;if(!m(t))throw new _("options.positions is required.");if(m(e)&&e.length!==t.length)throw new _("options.positions and options.maximumHeights must have the same length.");if(m(o)&&o.length!==t.length)throw new _("options.positions and options.minimumHeights must have the same length.");let s=d(i.granularity,O.RADIANS_PER_DEGREE),r=d(i.ellipsoid,l.default);this._positions=t,this._minimumHeights=o,this._maximumHeights=e,this._granularity=s,this._ellipsoid=l.clone(r),this._workerName="createWallOutlineGeometry";let n=1+t.length*p.packedLength+2;m(o)&&(n+=o.length),m(e)&&(n+=e.length),this.packedLength=n+l.packedLength+1}w.pack=function(i,t,e){if(!m(i))throw new _("value is required");if(!m(t))throw new _("array is required");e=d(e,0);let o,s=i._positions,r=s.length;for(t[e++]=r,o=0;o<r;++o,e+=p.packedLength)p.pack(s[o],t,e);let n=i._minimumHeights;if(r=m(n)?n.length:0,t[e++]=r,m(n))for(o=0;o<r;++o)t[e++]=n[o];let c=i._maximumHeights;if(r=m(c)?c.length:0,t[e++]=r,m(c))for(o=0;o<r;++o)t[e++]=c[o];return l.pack(i._ellipsoid,t,e),e+=l.packedLength,t[e]=i._granularity,t};var G=l.clone(l.UNIT_SPHERE),b={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:G,granularity:void 0};w.unpack=function(i,t,e){if(!m(i))throw new _("array is required");t=d(t,0);let o,s=i[t++],r=new Array(s);for(o=0;o<s;++o,t+=p.packedLength)r[o]=p.unpack(i,t);s=i[t++];let n;if(s>0)for(n=new Array(s),o=0;o<s;++o)n[o]=i[t++];s=i[t++];let c;if(s>0)for(c=new Array(s),o=0;o<s;++o)c[o]=i[t++];let E=l.unpack(i,t,G);t+=l.packedLength;let u=i[t];return m(e)?(e._positions=r,e._minimumHeights=n,e._maximumHeights=c,e._ellipsoid=l.clone(E,e._ellipsoid),e._granularity=u,e):(b.positions=r,b.minimumHeights=n,b.maximumHeights=c,b.granularity=u,new w(b))};w.fromConstantHeights=function(i){i=d(i,d.EMPTY_OBJECT);let t=i.positions;if(!m(t))throw new _("options.positions is required.");let e,o,s=i.minimumHeight,r=i.maximumHeight,n=m(s),c=m(r);if(n||c){let u=t.length;e=n?new Array(u):void 0,o=c?new Array(u):void 0;for(let a=0;a<u;++a)n&&(e[a]=s),c&&(o[a]=r)}let E={positions:t,maximumHeights:o,minimumHeights:e,ellipsoid:i.ellipsoid};return new w(E)};w.createGeometry=function(i){let t=i._positions,e=i._minimumHeights,o=i._maximumHeights,s=i._granularity,r=i._ellipsoid,n=B.computePositions(r,t,o,e,s,!1);if(!m(n))return;let c=n.bottomPositions,E=n.topPositions,u=E.length,a=u*2,f=new Float64Array(a),P=0;u/=3;let h;for(h=0;h<u;++h){let A=h*3,k=p.fromArray(E,A,U),L=p.fromArray(c,A,z);f[P++]=L.x,f[P++]=L.y,f[P++]=L.z,f[P++]=k.x,f[P++]=k.y,f[P++]=k.z}let V=new N({position:new M({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:f})}),y=a/3;a=2*y-4+y;let g=W.createTypedArray(y,a),H=0;for(h=0;h<y-2;h+=2){let A=h,k=h+2,L=p.fromArray(f,A*3,U),v=p.fromArray(f,k*3,z);if(p.equalsEpsilon(L,v,O.EPSILON10))continue;let T=h+1,x=h+3;g[H++]=T,g[H++]=A,g[H++]=T,g[H++]=x,g[H++]=A,g[H++]=k}return g[H++]=y-2,g[H++]=y-1,new S({attributes:V,indices:g,primitiveType:R.LINES,boundingSphere:new D.fromVertices(f)})};var C=w;function J(i,t){return m(t)&&(i=C.unpack(i,t)),i._ellipsoid=l.clone(i._ellipsoid),C.createGeometry(i)}var pi=J;export{pi as default};
public/CimSDK/Workers/decodeDraco.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as O}from"./chunk-O2XXE3LE.js";import{a as I}from"./chunk-CQELY6Z3.js";import{a as m}from"./chunk-ZDNS2GYV.js";import{a as w}from"./chunk-3LWOQSP3.js";import"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import{a as A}from"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import"./chunk-INT7THOB.js";import{d as D,e as d}from"./chunk-PPCZYYBW.js";var b=D(O(),1),o;function F(t,e){let i=t.num_points(),a=t.num_faces(),n=new o.DracoInt32Array,s=a*3,r=m.createTypedArray(i,s),u=0;for(let c=0;c<a;++c)e.GetFaceFromMesh(t,c,n),r[u+0]=n.GetValue(0),r[u+1]=n.GetValue(1),r[u+2]=n.GetValue(2),u+=3;return o.destroy(n),{typedArray:r,numberOfIndices:s}}function U(t,e,i,a,n){let s,r;a.quantizationBits<=8?(r=new o.DracoUInt8Array,s=new Uint8Array(n),e.GetAttributeUInt8ForAllPoints(t,i,r)):a.quantizationBits<=16?(r=new o.DracoUInt16Array,s=new Uint16Array(n),e.GetAttributeUInt16ForAllPoints(t,i,r)):(r=new o.DracoFloat32Array,s=new Float32Array(n),e.GetAttributeFloatForAllPoints(t,i,r));for(let u=0;u<n;++u)s[u]=r.GetValue(u);return o.destroy(r),s}function k(t,e,i,a){let n,s;switch(i.data_type()){case 1:case 11:s=new o.DracoInt8Array,n=new Int8Array(a),e.GetAttributeInt8ForAllPoints(t,i,s);break;case 2:s=new o.DracoUInt8Array,n=new Uint8Array(a),e.GetAttributeUInt8ForAllPoints(t,i,s);break;case 3:s=new o.DracoInt16Array,n=new Int16Array(a),e.GetAttributeInt16ForAllPoints(t,i,s);break;case 4:s=new o.DracoUInt16Array,n=new Uint16Array(a),e.GetAttributeUInt16ForAllPoints(t,i,s);break;case 5:case 7:s=new o.DracoInt32Array,n=new Int32Array(a),e.GetAttributeInt32ForAllPoints(t,i,s);break;case 6:case 8:s=new o.DracoUInt32Array,n=new Uint32Array(a),e.GetAttributeUInt32ForAllPoints(t,i,s);break;case 9:case 10:s=new o.DracoFloat32Array,n=new Float32Array(a),e.GetAttributeFloatForAllPoints(t,i,s);break}for(let r=0;r<a;++r)n[r]=s.GetValue(r);return o.destroy(s),n}function p(t,e,i){let a=t.num_points(),n=i.num_components(),s,r=new o.AttributeQuantizationTransform;if(r.InitFromAttribute(i)){let y=new Array(n);for(let f=0;f<n;++f)y[f]=r.min_value(f);s={quantizationBits:r.quantization_bits(),minValues:y,range:r.range(),octEncoded:!1}}o.destroy(r),r=new o.AttributeOctahedronTransform,r.InitFromAttribute(i)&&(s={quantizationBits:r.quantization_bits(),octEncoded:!0}),o.destroy(r);let u=a*n,c;d(s)?c=U(t,e,i,s,u):c=k(t,e,i,u);let l=w.fromTypedArray(c);return{array:c,data:{componentsPerAttribute:n,componentDatatype:l,byteOffset:i.byte_offset(),byteStride:w.getSizeInBytes(l)*n,normalized:i.normalized(),quantization:s}}}function _(t){let e=new o.Decoder;t.dequantizeInShader&&(e.SkipAttributeTransform(o.POSITION),e.SkipAttributeTransform(o.NORMAL));let i=new o.DecoderBuffer;if(i.Init(t.buffer,t.buffer.length),e.GetEncodedGeometryType(i)!==o.POINT_CLOUD)throw new A("Draco geometry type must be POINT_CLOUD.");let n=new o.PointCloud,s=e.DecodeBufferToPointCloud(i,n);if(!s.ok()||n.ptr===0)throw new A(`Error decoding draco point cloud: ${s.error_msg()}`);o.destroy(i);let r={},u=t.properties;for(let c in u)if(u.hasOwnProperty(c)){let l;if(c==="POSITION"||c==="NORMAL"){let y=e.GetAttributeId(n,o[c]);l=e.GetAttribute(n,y)}else{let y=u[c];l=e.GetAttributeByUniqueId(n,y)}r[c]=p(n,e,l)}return o.destroy(n),o.destroy(e),r}function g(t){let e=new o.Decoder,i=["POSITION","NORMAL","COLOR","TEX_COORD"];if(t.dequantizeInShader)for(let f=0;f<i.length;++f)e.SkipAttributeTransform(o[i[f]]);let a=t.bufferView,n=new o.DecoderBuffer;if(n.Init(t.array,a.byteLength),e.GetEncodedGeometryType(n)!==o.TRIANGULAR_MESH)throw new A("Unsupported draco mesh geometry type.");let r=new o.Mesh,u=e.DecodeBufferToMesh(n,r);if(!u.ok()||r.ptr===0)throw new A(`Error decoding draco mesh geometry: ${u.error_msg()}`);o.destroy(n);let c={},l=t.compressedAttributes;for(let f in l)if(l.hasOwnProperty(f)){let P=l[f],T=e.GetAttributeByUniqueId(r,P);c[f]=p(r,e,T)}let y={indexArray:F(r,e),attributeData:c};return o.destroy(r),o.destroy(e),y}async function z(t,e){return d(t.bufferView)?g(t):_(t)}async function C(t,e){let i=t.webAssemblyConfig;return d(i)&&d(i.wasmBinaryFile)?o=await(0,b.default)(i):o=await(0,b.default)(),!0}async function G(t,e){let i=t.webAssemblyConfig;return d(i)?C(t,e):z(t,e)}var h=I(G);export{h as default};
import{a as O}from"./chunk-T6ETJW3A.js";import{a as I}from"./chunk-6MN6BBPN.js";import{a as m}from"./chunk-563CJZT3.js";import{a as w}from"./chunk-NFDMGE7Q.js";import"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import{a as A}from"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import"./chunk-3K67FZLU.js";import{d as D,e as d}from"./chunk-55TU6MJR.js";var b=D(O(),1),o;function F(t,e){let i=t.num_points(),a=t.num_faces(),n=new o.DracoInt32Array,s=a*3,r=m.createTypedArray(i,s),u=0;for(let c=0;c<a;++c)e.GetFaceFromMesh(t,c,n),r[u+0]=n.GetValue(0),r[u+1]=n.GetValue(1),r[u+2]=n.GetValue(2),u+=3;return o.destroy(n),{typedArray:r,numberOfIndices:s}}function U(t,e,i,a,n){let s,r;a.quantizationBits<=8?(r=new o.DracoUInt8Array,s=new Uint8Array(n),e.GetAttributeUInt8ForAllPoints(t,i,r)):a.quantizationBits<=16?(r=new o.DracoUInt16Array,s=new Uint16Array(n),e.GetAttributeUInt16ForAllPoints(t,i,r)):(r=new o.DracoFloat32Array,s=new Float32Array(n),e.GetAttributeFloatForAllPoints(t,i,r));for(let u=0;u<n;++u)s[u]=r.GetValue(u);return o.destroy(r),s}function k(t,e,i,a){let n,s;switch(i.data_type()){case 1:case 11:s=new o.DracoInt8Array,n=new Int8Array(a),e.GetAttributeInt8ForAllPoints(t,i,s);break;case 2:s=new o.DracoUInt8Array,n=new Uint8Array(a),e.GetAttributeUInt8ForAllPoints(t,i,s);break;case 3:s=new o.DracoInt16Array,n=new Int16Array(a),e.GetAttributeInt16ForAllPoints(t,i,s);break;case 4:s=new o.DracoUInt16Array,n=new Uint16Array(a),e.GetAttributeUInt16ForAllPoints(t,i,s);break;case 5:case 7:s=new o.DracoInt32Array,n=new Int32Array(a),e.GetAttributeInt32ForAllPoints(t,i,s);break;case 6:case 8:s=new o.DracoUInt32Array,n=new Uint32Array(a),e.GetAttributeUInt32ForAllPoints(t,i,s);break;case 9:case 10:s=new o.DracoFloat32Array,n=new Float32Array(a),e.GetAttributeFloatForAllPoints(t,i,s);break}for(let r=0;r<a;++r)n[r]=s.GetValue(r);return o.destroy(s),n}function p(t,e,i){let a=t.num_points(),n=i.num_components(),s,r=new o.AttributeQuantizationTransform;if(r.InitFromAttribute(i)){let y=new Array(n);for(let f=0;f<n;++f)y[f]=r.min_value(f);s={quantizationBits:r.quantization_bits(),minValues:y,range:r.range(),octEncoded:!1}}o.destroy(r),r=new o.AttributeOctahedronTransform,r.InitFromAttribute(i)&&(s={quantizationBits:r.quantization_bits(),octEncoded:!0}),o.destroy(r);let u=a*n,c;d(s)?c=U(t,e,i,s,u):c=k(t,e,i,u);let l=w.fromTypedArray(c);return{array:c,data:{componentsPerAttribute:n,componentDatatype:l,byteOffset:i.byte_offset(),byteStride:w.getSizeInBytes(l)*n,normalized:i.normalized(),quantization:s}}}function _(t){let e=new o.Decoder;t.dequantizeInShader&&(e.SkipAttributeTransform(o.POSITION),e.SkipAttributeTransform(o.NORMAL));let i=new o.DecoderBuffer;if(i.Init(t.buffer,t.buffer.length),e.GetEncodedGeometryType(i)!==o.POINT_CLOUD)throw new A("Draco geometry type must be POINT_CLOUD.");let n=new o.PointCloud,s=e.DecodeBufferToPointCloud(i,n);if(!s.ok()||n.ptr===0)throw new A(`Error decoding draco point cloud: ${s.error_msg()}`);o.destroy(i);let r={},u=t.properties;for(let c in u)if(u.hasOwnProperty(c)){let l;if(c==="POSITION"||c==="NORMAL"){let y=e.GetAttributeId(n,o[c]);l=e.GetAttribute(n,y)}else{let y=u[c];l=e.GetAttributeByUniqueId(n,y)}r[c]=p(n,e,l)}return o.destroy(n),o.destroy(e),r}function g(t){let e=new o.Decoder,i=["POSITION","NORMAL","COLOR","TEX_COORD"];if(t.dequantizeInShader)for(let f=0;f<i.length;++f)e.SkipAttributeTransform(o[i[f]]);let a=t.bufferView,n=new o.DecoderBuffer;if(n.Init(t.array,a.byteLength),e.GetEncodedGeometryType(n)!==o.TRIANGULAR_MESH)throw new A("Unsupported draco mesh geometry type.");let r=new o.Mesh,u=e.DecodeBufferToMesh(n,r);if(!u.ok()||r.ptr===0)throw new A(`Error decoding draco mesh geometry: ${u.error_msg()}`);o.destroy(n);let c={},l=t.compressedAttributes;for(let f in l)if(l.hasOwnProperty(f)){let P=l[f],T=e.GetAttributeByUniqueId(r,P);c[f]=p(r,e,T)}let y={indexArray:F(r,e),attributeData:c};return o.destroy(r),o.destroy(e),y}async function z(t,e){return d(t.bufferView)?g(t):_(t)}async function C(t,e){let i=t.webAssemblyConfig;return d(i)&&d(i.wasmBinaryFile)?o=await(0,b.default)(i):o=await(0,b.default)(),!0}async function G(t,e){let i=t.webAssemblyConfig;return d(i)?C(t,e):z(t,e)}var h=I(G);export{h as default};
public/CimSDK/Workers/decodeGoogleEarthEnterprisePacket.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as Se}from"./chunk-CQELY6Z3.js";import{a as D}from"./chunk-54HAFFPJ.js";import{b as ae}from"./chunk-INT7THOB.js";import{c as R,d as Ot,e as me}from"./chunk-PPCZYYBW.js";var Ie=R((Li,Ae)=>{"use strict";var zt=(t,i,e,r)=>{let s=t&65535|0,n=t>>>16&65535|0,c=0;for(;e!==0;){c=e>2e3?2e3:e,e-=c;do s=s+i[r++]|0,n=n+s|0;while(--c);s%=65521,n%=65521}return s|n<<16|0};Ae.exports=zt});var De=R((Pi,Re)=>{"use strict";var Ht=()=>{let t,i=[];for(var e=0;e<256;e++){t=e;for(var r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;i[e]=t}return i},Ft=new Uint32Array(Ht()),Vt=(t,i,e,r)=>{let s=Ft,n=r+e;t^=-1;for(let c=r;c<n;c++)t=t>>>8^s[(t^i[c])&255];return t^-1};Re.exports=Vt});var Oe=R((zi,Ue)=>{"use strict";Ue.exports=function(i,e){let r,s,n,c,f,_,a,o,v,w,l,u,I,p,x,T,g,d,E,A,h,S,k,b,m=i.state;r=i.next_in,k=i.input,s=r+(i.avail_in-5),n=i.next_out,b=i.output,c=n-(e-i.avail_out),f=n+(i.avail_out-257),_=m.dmax,a=m.wsize,o=m.whave,v=m.wnext,w=m.window,l=m.hold,u=m.bits,I=m.lencode,p=m.distcode,x=(1<<m.lenbits)-1,T=(1<<m.distbits)-1;e:do{u<15&&(l+=k[r++]<<u,u+=8,l+=k[r++]<<u,u+=8),g=I[l&x];t:for(;;){if(d=g>>>24,l>>>=d,u-=d,d=g>>>16&255,d===0)b[n++]=g&65535;else if(d&16){E=g&65535,d&=15,d&&(u<d&&(l+=k[r++]<<u,u+=8),E+=l&(1<<d)-1,l>>>=d,u-=d),u<15&&(l+=k[r++]<<u,u+=8,l+=k[r++]<<u,u+=8),g=p[l&T];i:for(;;){if(d=g>>>24,l>>>=d,u-=d,d=g>>>16&255,d&16){if(A=g&65535,d&=15,u<d&&(l+=k[r++]<<u,u+=8,u<d&&(l+=k[r++]<<u,u+=8)),A+=l&(1<<d)-1,A>_){i.msg="invalid distance too far back",m.mode=16209;break e}if(l>>>=d,u-=d,d=n-c,A>d){if(d=A-d,d>o&&m.sane){i.msg="invalid distance too far back",m.mode=16209;break e}if(h=0,S=w,v===0){if(h+=a-d,d<E){E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}}else if(v<d){if(h+=a+v-d,d-=v,d<E){E-=d;do b[n++]=w[h++];while(--d);if(h=0,v<E){d=v,E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}}}else if(h+=v-d,d<E){E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}for(;E>2;)b[n++]=S[h++],b[n++]=S[h++],b[n++]=S[h++],E-=3;E&&(b[n++]=S[h++],E>1&&(b[n++]=S[h++]))}else{h=n-A;do b[n++]=b[h++],b[n++]=b[h++],b[n++]=b[h++],E-=3;while(E>2);E&&(b[n++]=b[h++],E>1&&(b[n++]=b[h++]))}}else if(d&64){i.msg="invalid distance code",m.mode=16209;break e}else{g=p[(g&65535)+(l&(1<<d)-1)];continue i}break}}else if(d&64)if(d&32){m.mode=16191;break e}else{i.msg="invalid literal/length code",m.mode=16209;break e}else{g=I[(g&65535)+(l&(1<<d)-1)];continue t}break}}while(r<s&&n<f);E=u>>3,r-=E,u-=E<<3,l&=(1<<u)-1,i.next_in=r,i.next_out=n,i.avail_in=r<s?5+(s-r):5-(r-s),i.avail_out=n<f?257+(f-n):257-(n-f),m.hold=l,m.bits=u}});var Me=R((Hi,Ne)=>{"use strict";var Gt=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Yt=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Xt=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),qt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Kt=(t,i,e,r,s,n,c,f)=>{let _=f.bits,a=0,o=0,v=0,w=0,l=0,u=0,I=0,p=0,x=0,T=0,g,d,E,A,h,S=null,k,b=new Uint16Array(16),m=new Uint16Array(16),L=null,Ee,W,Q;for(a=0;a<=15;a++)b[a]=0;for(o=0;o<r;o++)b[i[e+o]]++;for(l=_,w=15;w>=1&&b[w]===0;w--);if(l>w&&(l=w),w===0)return s[n++]=1<<24|64<<16|0,s[n++]=1<<24|64<<16|0,f.bits=1,0;for(v=1;v<w&&b[v]===0;v++);for(l<v&&(l=v),p=1,a=1;a<=15;a++)if(p<<=1,p-=b[a],p<0)return-1;if(p>0&&(t===0||w!==1))return-1;for(m[1]=0,a=1;a<15;a++)m[a+1]=m[a]+b[a];for(o=0;o<r;o++)i[e+o]!==0&&(c[m[i[e+o]]++]=o);if(t===0?(S=L=c,k=20):t===1?(S=Gt,L=Yt,k=257):(S=Xt,L=qt,k=0),T=0,o=0,a=v,h=n,u=l,I=0,E=-1,x=1<<l,A=x-1,t===1&&x>852||t===2&&x>592)return 1;for(;;){Ee=a-I,c[o]+1<k?(W=0,Q=c[o]):c[o]>=k?(W=L[c[o]-k],Q=S[c[o]-k]):(W=96,Q=0),g=1<<a-I,d=1<<u,v=d;do d-=g,s[h+(T>>I)+d]=Ee<<24|W<<16|Q|0;while(d!==0);for(g=1<<a-1;T&g;)g>>=1;if(g!==0?(T&=g-1,T+=g):T=0,o++,--b[a]===0){if(a===w)break;a=i[e+c[o]]}if(a>l&&(T&A)!==E){for(I===0&&(I=l),h+=v,u=a-I,p=1<<u;u+I<w&&(p-=b[u+I],!(p<=0));)u++,p<<=1;if(x+=1<<u,t===1&&x>852||t===2&&x>592)return 1;E=T&A,s[E]=l<<24|u<<16|h-n|0}}return T!==0&&(s[h+T]=a-I<<24|64<<16|0),f.bits=l,0};Ne.exports=Kt});var J=R((Fi,Ze)=>{"use strict";Ze.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var bt=R((Vi,O)=>{"use strict";var he=Ie(),M=De(),jt=Oe(),X=Me(),Wt=0,st=1,ft=2,{Z_FINISH:Be,Z_BLOCK:Qt,Z_TREES:$,Z_OK:P,Z_STREAM_END:Jt,Z_NEED_DICT:$t,Z_STREAM_ERROR:U,Z_DATA_ERROR:lt,Z_MEM_ERROR:ue,Z_BUF_ERROR:ei,Z_DEFLATED:Ce}=J(),ne=16180,Le=16181,Pe=16182,ze=16183,He=16184,Fe=16185,Ve=16186,Ge=16187,Ye=16188,Xe=16189,ie=16190,Z=16191,se=16192,qe=16193,fe=16194,Ke=16195,je=16196,We=16197,Qe=16198,ee=16199,te=16200,Je=16201,$e=16202,et=16203,tt=16204,it=16205,le=16206,nt=16207,rt=16208,y=16209,we=16210,ct=16211,ti=852,ii=592,ni=15,ri=ni,at=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function ai(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var z=t=>{if(!t)return 1;let i=t.state;return!i||i.strm!==t||i.mode<ne||i.mode>ct?1:0},dt=t=>{if(z(t))return U;let i=t.state;return t.total_in=t.total_out=i.total=0,t.msg="",i.wrap&&(t.adler=i.wrap&1),i.mode=ne,i.last=0,i.havedict=0,i.flags=-1,i.dmax=32768,i.head=null,i.hold=0,i.bits=0,i.lencode=i.lendyn=new Int32Array(ti),i.distcode=i.distdyn=new Int32Array(ii),i.sane=1,i.back=-1,P},ht=t=>{if(z(t))return U;let i=t.state;return i.wsize=0,i.whave=0,i.wnext=0,dt(t)},ut=(t,i)=>{let e;if(z(t))return U;let r=t.state;return i<0?(e=0,i=-i):(e=(i>>4)+5,i<48&&(i&=15)),i&&(i<8||i>15)?U:(r.window!==null&&r.wbits!==i&&(r.window=null),r.wrap=e,r.wbits=i,ht(t))},wt=(t,i)=>{if(!t)return U;let e=new ai;t.state=e,e.strm=t,e.window=null,e.mode=ne;let r=ut(t,i);return r!==P&&(t.state=null),r},oi=t=>wt(t,ri),ot=!0,ce,de,si=t=>{if(ot){ce=new Int32Array(512),de=new Int32Array(32);let i=0;for(;i<144;)t.lens[i++]=8;for(;i<256;)t.lens[i++]=9;for(;i<280;)t.lens[i++]=7;for(;i<288;)t.lens[i++]=8;for(X(st,t.lens,0,288,ce,0,t.work,{bits:9}),i=0;i<32;)t.lens[i++]=5;X(ft,t.lens,0,32,de,0,t.work,{bits:5}),ot=!1}t.lencode=ce,t.lenbits=9,t.distcode=de,t.distbits=5},xt=(t,i,e,r)=>{let s,n=t.state;return n.window===null&&(n.wsize=1<<n.wbits,n.wnext=0,n.whave=0,n.window=new Uint8Array(n.wsize)),r>=n.wsize?(n.window.set(i.subarray(e-n.wsize,e),0),n.wnext=0,n.whave=n.wsize):(s=n.wsize-n.wnext,s>r&&(s=r),n.window.set(i.subarray(e-r,e-r+s),n.wnext),r-=s,r?(n.window.set(i.subarray(e-r,e),0),n.wnext=r,n.whave=n.wsize):(n.wnext+=s,n.wnext===n.wsize&&(n.wnext=0),n.whave<n.wsize&&(n.whave+=s))),0},fi=(t,i)=>{let e,r,s,n,c,f,_,a,o,v,w,l,u,I,p=0,x,T,g,d,E,A,h,S,k=new Uint8Array(4),b,m,L=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(z(t)||!t.output||!t.input&&t.avail_in!==0)return U;e=t.state,e.mode===Z&&(e.mode=se),c=t.next_out,s=t.output,_=t.avail_out,n=t.next_in,r=t.input,f=t.avail_in,a=e.hold,o=e.bits,v=f,w=_,S=P;e:for(;;)switch(e.mode){case ne:if(e.wrap===0){e.mode=se;break}for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&2&&a===35615){e.wbits===0&&(e.wbits=15),e.check=0,k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0),a=0,o=0,e.mode=Le;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((a&255)<<8)+(a>>8))%31){t.msg="incorrect header check",e.mode=y;break}if((a&15)!==Ce){t.msg="unknown compression method",e.mode=y;break}if(a>>>=4,o-=4,h=(a&15)+8,e.wbits===0&&(e.wbits=h),h>15||h>e.wbits){t.msg="invalid window size",e.mode=y;break}e.dmax=1<<e.wbits,e.flags=0,t.adler=e.check=1,e.mode=a&512?Xe:Z,a=0,o=0;break;case Le:for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.flags=a,(e.flags&255)!==Ce){t.msg="unknown compression method",e.mode=y;break}if(e.flags&57344){t.msg="unknown header flags set",e.mode=y;break}e.head&&(e.head.text=a>>8&1),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0,e.mode=Pe;case Pe:for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.head&&(e.head.time=a),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,k[2]=a>>>16&255,k[3]=a>>>24&255,e.check=M(e.check,k,4,0)),a=0,o=0,e.mode=ze;case ze:for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.head&&(e.head.xflags=a&255,e.head.os=a>>8),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0,e.mode=He;case He:if(e.flags&1024){for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.length=a,e.head&&(e.head.extra_len=a),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0}else e.head&&(e.head.extra=null);e.mode=Fe;case Fe:if(e.flags&1024&&(l=e.length,l>f&&(l=f),l&&(e.head&&(h=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(n,n+l),h)),e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,e.length-=l),e.length))break e;e.length=0,e.mode=Ve;case Ve:if(e.flags&2048){if(f===0)break e;l=0;do h=r[n+l++],e.head&&h&&e.length<65536&&(e.head.name+=String.fromCharCode(h));while(h&&l<f);if(e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,h)break e}else e.head&&(e.head.name=null);e.length=0,e.mode=Ge;case Ge:if(e.flags&4096){if(f===0)break e;l=0;do h=r[n+l++],e.head&&h&&e.length<65536&&(e.head.comment+=String.fromCharCode(h));while(h&&l<f);if(e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,h)break e}else e.head&&(e.head.comment=null);e.mode=Ye;case Ye:if(e.flags&512){for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&4&&a!==(e.check&65535)){t.msg="header crc mismatch",e.mode=y;break}a=0,o=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),t.adler=e.check=0,e.mode=Z;break;case Xe:for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}t.adler=e.check=at(a),a=0,o=0,e.mode=ie;case ie:if(e.havedict===0)return t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,$t;t.adler=e.check=1,e.mode=Z;case Z:if(i===Qt||i===$)break e;case se:if(e.last){a>>>=o&7,o-=o&7,e.mode=le;break}for(;o<3;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}switch(e.last=a&1,a>>>=1,o-=1,a&3){case 0:e.mode=qe;break;case 1:if(si(e),e.mode=ee,i===$){a>>>=2,o-=2;break e}break;case 2:e.mode=je;break;case 3:t.msg="invalid block type",e.mode=y}a>>>=2,o-=2;break;case qe:for(a>>>=o&7,o-=o&7;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if((a&65535)!==(a>>>16^65535)){t.msg="invalid stored block lengths",e.mode=y;break}if(e.length=a&65535,a=0,o=0,e.mode=fe,i===$)break e;case fe:e.mode=Ke;case Ke:if(l=e.length,l){if(l>f&&(l=f),l>_&&(l=_),l===0)break e;s.set(r.subarray(n,n+l),c),f-=l,n+=l,_-=l,c+=l,e.length-=l;break}e.mode=Z;break;case je:for(;o<14;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.nlen=(a&31)+257,a>>>=5,o-=5,e.ndist=(a&31)+1,a>>>=5,o-=5,e.ncode=(a&15)+4,a>>>=4,o-=4,e.nlen>286||e.ndist>30){t.msg="too many length or distance symbols",e.mode=y;break}e.have=0,e.mode=We;case We:for(;e.have<e.ncode;){for(;o<3;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.lens[L[e.have++]]=a&7,a>>>=3,o-=3}for(;e.have<19;)e.lens[L[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,b={bits:e.lenbits},S=X(Wt,e.lens,0,19,e.lencode,0,e.work,b),e.lenbits=b.bits,S){t.msg="invalid code lengths set",e.mode=y;break}e.have=0,e.mode=Qe;case Qe:for(;e.have<e.nlen+e.ndist;){for(;p=e.lencode[a&(1<<e.lenbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(g<16)a>>>=x,o-=x,e.lens[e.have++]=g;else{if(g===16){for(m=x+2;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(a>>>=x,o-=x,e.have===0){t.msg="invalid bit length repeat",e.mode=y;break}h=e.lens[e.have-1],l=3+(a&3),a>>>=2,o-=2}else if(g===17){for(m=x+3;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=x,o-=x,h=0,l=3+(a&7),a>>>=3,o-=3}else{for(m=x+7;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=x,o-=x,h=0,l=11+(a&127),a>>>=7,o-=7}if(e.have+l>e.nlen+e.ndist){t.msg="invalid bit length repeat",e.mode=y;break}for(;l--;)e.lens[e.have++]=h}}if(e.mode===y)break;if(e.lens[256]===0){t.msg="invalid code -- missing end-of-block",e.mode=y;break}if(e.lenbits=9,b={bits:e.lenbits},S=X(st,e.lens,0,e.nlen,e.lencode,0,e.work,b),e.lenbits=b.bits,S){t.msg="invalid literal/lengths set",e.mode=y;break}if(e.distbits=6,e.distcode=e.distdyn,b={bits:e.distbits},S=X(ft,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,b),e.distbits=b.bits,S){t.msg="invalid distances set",e.mode=y;break}if(e.mode=ee,i===$)break e;case ee:e.mode=te;case te:if(f>=6&&_>=258){t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,jt(t,w),c=t.next_out,s=t.output,_=t.avail_out,n=t.next_in,r=t.input,f=t.avail_in,a=e.hold,o=e.bits,e.mode===Z&&(e.back=-1);break}for(e.back=0;p=e.lencode[a&(1<<e.lenbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(T&&!(T&240)){for(d=x,E=T,A=g;p=e.lencode[A+((a&(1<<d+E)-1)>>d)],x=p>>>24,T=p>>>16&255,g=p&65535,!(d+x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=d,o-=d,e.back+=d}if(a>>>=x,o-=x,e.back+=x,e.length=g,T===0){e.mode=it;break}if(T&32){e.back=-1,e.mode=Z;break}if(T&64){t.msg="invalid literal/length code",e.mode=y;break}e.extra=T&15,e.mode=Je;case Je:if(e.extra){for(m=e.extra;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.length+=a&(1<<e.extra)-1,a>>>=e.extra,o-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=$e;case $e:for(;p=e.distcode[a&(1<<e.distbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(!(T&240)){for(d=x,E=T,A=g;p=e.distcode[A+((a&(1<<d+E)-1)>>d)],x=p>>>24,T=p>>>16&255,g=p&65535,!(d+x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=d,o-=d,e.back+=d}if(a>>>=x,o-=x,e.back+=x,T&64){t.msg="invalid distance code",e.mode=y;break}e.offset=g,e.extra=T&15,e.mode=et;case et:if(e.extra){for(m=e.extra;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.offset+=a&(1<<e.extra)-1,a>>>=e.extra,o-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){t.msg="invalid distance too far back",e.mode=y;break}e.mode=tt;case tt:if(_===0)break e;if(l=w-_,e.offset>l){if(l=e.offset-l,l>e.whave&&e.sane){t.msg="invalid distance too far back",e.mode=y;break}l>e.wnext?(l-=e.wnext,u=e.wsize-l):u=e.wnext-l,l>e.length&&(l=e.length),I=e.window}else I=s,u=c-e.offset,l=e.length;l>_&&(l=_),_-=l,e.length-=l;do s[c++]=I[u++];while(--l);e.length===0&&(e.mode=te);break;case it:if(_===0)break e;s[c++]=e.length,_--,e.mode=te;break;case le:if(e.wrap){for(;o<32;){if(f===0)break e;f--,a|=r[n++]<<o,o+=8}if(w-=_,t.total_out+=w,e.total+=w,e.wrap&4&&w&&(t.adler=e.check=e.flags?M(e.check,s,w,c-w):he(e.check,s,w,c-w)),w=_,e.wrap&4&&(e.flags?a:at(a))!==e.check){t.msg="incorrect data check",e.mode=y;break}a=0,o=0}e.mode=nt;case nt:if(e.wrap&&e.flags){for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&4&&a!==(e.total&4294967295)){t.msg="incorrect length check",e.mode=y;break}a=0,o=0}e.mode=rt;case rt:S=Jt;break e;case y:S=lt;break e;case we:return ue;case ct:default:return U}return t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,(e.wsize||w!==t.avail_out&&e.mode<y&&(e.mode<le||i!==Be))&&xt(t,t.output,t.next_out,w-t.avail_out)?(e.mode=we,ue):(v-=t.avail_in,w-=t.avail_out,t.total_in+=v,t.total_out+=w,e.total+=w,e.wrap&4&&w&&(t.adler=e.check=e.flags?M(e.check,s,w,t.next_out-w):he(e.check,s,w,t.next_out-w)),t.data_type=e.bits+(e.last?64:0)+(e.mode===Z?128:0)+(e.mode===ee||e.mode===fe?256:0),(v===0&&w===0||i===Be)&&S===P&&(S=ei),S)},li=t=>{if(z(t))return U;let i=t.state;return i.window&&(i.window=null),t.state=null,P},ci=(t,i)=>{if(z(t))return U;let e=t.state;return e.wrap&2?(e.head=i,i.done=!1,P):U},di=(t,i)=>{let e=i.length,r,s,n;return z(t)||(r=t.state,r.wrap!==0&&r.mode!==ie)?U:r.mode===ie&&(s=1,s=he(s,i,e,0),s!==r.check)?lt:(n=xt(t,i,e,e),n?(r.mode=we,ue):(r.havedict=1,P))};O.exports.inflateReset=ht;O.exports.inflateReset2=ut;O.exports.inflateResetKeep=dt;O.exports.inflateInit=oi;O.exports.inflateInit2=wt;O.exports.inflate=fi;O.exports.inflateEnd=li;O.exports.inflateGetHeader=ci;O.exports.inflateSetDictionary=di;O.exports.inflateInfo="pako inflate (from Nodeca project)"});var _t=R((Gi,xe)=>{"use strict";var hi=(t,i)=>Object.prototype.hasOwnProperty.call(t,i);xe.exports.assign=function(t){let i=Array.prototype.slice.call(arguments,1);for(;i.length;){let e=i.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(let r in e)hi(e,r)&&(t[r]=e[r])}}return t};xe.exports.flattenChunks=t=>{let i=0;for(let r=0,s=t.length;r<s;r++)i+=t[r].length;let e=new Uint8Array(i);for(let r=0,s=0,n=t.length;r<n;r++){let c=t[r];e.set(c,s),s+=c.length}return e}});var kt=R((Yi,re)=>{"use strict";var gt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{gt=!1}var q=new Uint8Array(256);for(let t=0;t<256;t++)q[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;q[254]=q[254]=1;re.exports.string2buf=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let i,e,r,s,n,c=t.length,f=0;for(s=0;s<c;s++)e=t.charCodeAt(s),(e&64512)===55296&&s+1<c&&(r=t.charCodeAt(s+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),s++)),f+=e<128?1:e<2048?2:e<65536?3:4;for(i=new Uint8Array(f),n=0,s=0;n<f;s++)e=t.charCodeAt(s),(e&64512)===55296&&s+1<c&&(r=t.charCodeAt(s+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),s++)),e<128?i[n++]=e:e<2048?(i[n++]=192|e>>>6,i[n++]=128|e&63):e<65536?(i[n++]=224|e>>>12,i[n++]=128|e>>>6&63,i[n++]=128|e&63):(i[n++]=240|e>>>18,i[n++]=128|e>>>12&63,i[n++]=128|e>>>6&63,i[n++]=128|e&63);return i};var ui=(t,i)=>{if(i<65534&&t.subarray&&gt)return String.fromCharCode.apply(null,t.length===i?t:t.subarray(0,i));let e="";for(let r=0;r<i;r++)e+=String.fromCharCode(t[r]);return e};re.exports.buf2string=(t,i)=>{let e=i||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,i));let r,s,n=new Array(e*2);for(s=0,r=0;r<e;){let c=t[r++];if(c<128){n[s++]=c;continue}let f=q[c];if(f>4){n[s++]=65533,r+=f-1;continue}for(c&=f===2?31:f===3?15:7;f>1&&r<e;)c=c<<6|t[r++]&63,f--;if(f>1){n[s++]=65533;continue}c<65536?n[s++]=c:(c-=65536,n[s++]=55296|c>>10&1023,n[s++]=56320|c&1023)}return ui(n,s)};re.exports.utf8border=(t,i)=>{i=i||t.length,i>t.length&&(i=t.length);let e=i-1;for(;e>=0&&(t[e]&192)===128;)e--;return e<0||e===0?i:e+q[t[e]]>i?e:i}});var Et=R((Xi,pt)=>{"use strict";pt.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var St=R((qi,mt)=>{"use strict";function wi(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}mt.exports=wi});var vt=R((Ki,Tt)=>{"use strict";function xi(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}Tt.exports=xi});var Rt=R((ji,V)=>{"use strict";var B=bt(),At=_t(),ge=kt(),ke=Et(),bi=St(),_i=vt(),It=Object.prototype.toString,{Z_NO_FLUSH:gi,Z_FINISH:ki,Z_OK:K,Z_STREAM_END:be,Z_NEED_DICT:_e,Z_STREAM_ERROR:pi,Z_DATA_ERROR:yt,Z_MEM_ERROR:Ei}=J();function j(t){this.options=At.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});let i=this.options;i.raw&&i.windowBits>=0&&i.windowBits<16&&(i.windowBits=-i.windowBits,i.windowBits===0&&(i.windowBits=-15)),i.windowBits>=0&&i.windowBits<16&&!(t&&t.windowBits)&&(i.windowBits+=32),i.windowBits>15&&i.windowBits<48&&(i.windowBits&15||(i.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new bi,this.strm.avail_out=0;let e=B.inflateInit2(this.strm,i.windowBits);if(e!==K)throw new Error(ke[e]);if(this.header=new _i,B.inflateGetHeader(this.strm,this.header),i.dictionary&&(typeof i.dictionary=="string"?i.dictionary=ge.string2buf(i.dictionary):It.call(i.dictionary)==="[object ArrayBuffer]"&&(i.dictionary=new Uint8Array(i.dictionary)),i.raw&&(e=B.inflateSetDictionary(this.strm,i.dictionary),e!==K)))throw new Error(ke[e])}j.prototype.push=function(t,i){let e=this.strm,r=this.options.chunkSize,s=this.options.dictionary,n,c,f;if(this.ended)return!1;for(i===~~i?c=i:c=i===!0?ki:gi,It.call(t)==="[object ArrayBuffer]"?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),n=B.inflate(e,c),n===_e&&s&&(n=B.inflateSetDictionary(e,s),n===K?n=B.inflate(e,c):n===yt&&(n=_e));e.avail_in>0&&n===be&&e.state.wrap>0&&t[e.next_in]!==0;)B.inflateReset(e),n=B.inflate(e,c);switch(n){case pi:case yt:case _e:case Ei:return this.onEnd(n),this.ended=!0,!1}if(f=e.avail_out,e.next_out&&(e.avail_out===0||n===be))if(this.options.to==="string"){let _=ge.utf8border(e.output,e.next_out),a=e.next_out-_,o=ge.buf2string(e.output,_);e.next_out=a,e.avail_out=r-a,a&&e.output.set(e.output.subarray(_,_+a),0),this.onData(o)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(n===K&&f===0)){if(n===be)return n=B.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};j.prototype.onData=function(t){this.chunks.push(t)};j.prototype.onEnd=function(t){t===K&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=At.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function pe(t,i){let e=new j(i);if(e.push(t),e.err)throw e.msg||ke[e.err];return e.result}function mi(t,i){return i=i||{},i.raw=!0,pe(t,i)}V.exports.Inflate=j;V.exports.inflate=pe;V.exports.inflateRaw=mi;V.exports.ungzip=pe;V.exports.constants=J()});var Nt=1953029805,Mt=2917034100;function oe(t,i){if(oe.passThroughDataForTesting)return i;ae.typeOf.object("key",t),ae.typeOf.object("data",i);let e=t.byteLength;if(e===0||e%4!==0)throw new D("The length of key must be greater than 0 and a multiple of 4.");let r=new DataView(i),s=r.getUint32(0,!0);if(s===Nt||s===Mt)return i;let n=new DataView(t),c=0,f=i.byteLength,_=f-f%8,a=e,o,v=8;for(;c<_;)for(v=(v+8)%24,o=v;c<_&&o<a;)r.setUint32(c,r.getUint32(c,!0)^n.getUint32(o,!0),!0),r.setUint32(c+4,r.getUint32(c+4,!0)^n.getUint32(o+4,!0),!0),c+=8,o+=24;if(c<f)for(o>=a&&(v=(v+8)%24,o=v);c<f;)r.setUint8(c,r.getUint8(c)^n.getUint8(o)),c++,o++}oe.passThroughDataForTesting=!1;var Te=oe;function Zt(t,i){return(t&i)!==0}var F=Zt;var Bt=[1,2,4,8],ve=15,Ct=16,Lt=64,Pt=128;function N(t,i,e,r,s,n){this._bits=t,this.cnodeVersion=i,this.imageryVersion=e,this.terrainVersion=r,this.imageryProvider=s,this.terrainProvider=n,this.ancestorHasTerrain=!1,this.terrainState=void 0}N.clone=function(t,i){return me(i)?(i._bits=t._bits,i.cnodeVersion=t.cnodeVersion,i.imageryVersion=t.imageryVersion,i.terrainVersion=t.terrainVersion,i.imageryProvider=t.imageryProvider,i.terrainProvider=t.terrainProvider):i=new N(t._bits,t.cnodeVersion,t.imageryVersion,t.terrainVersion,t.imageryProvider,t.terrainProvider),i.ancestorHasTerrain=t.ancestorHasTerrain,i.terrainState=t.terrainState,i};N.prototype.setParent=function(t){this.ancestorHasTerrain=t.ancestorHasTerrain||this.hasTerrain()};N.prototype.hasSubtree=function(){return F(this._bits,Ct)};N.prototype.hasImagery=function(){return F(this._bits,Lt)};N.prototype.hasTerrain=function(){return F(this._bits,Pt)};N.prototype.hasChildren=function(){return F(this._bits,ve)};N.prototype.hasChild=function(t){return F(this._bits,Bt[t])};N.prototype.getChildBitmask=function(){return this._bits&ve};var ye=N;var Ut=Ot(Rt(),1);var G=Uint16Array.BYTES_PER_ELEMENT,H=Int32Array.BYTES_PER_ELEMENT,Y=Uint32Array.BYTES_PER_ELEMENT,C={METADATA:0,TERRAIN:1,DBROOT:2};C.fromString=function(t){if(t==="Metadata")return C.METADATA;if(t==="Terrain")return C.TERRAIN;if(t==="DbRoot")return C.DBROOT};function Si(t,i){let e=C.fromString(t.type),r=t.buffer;Te(t.key,r);let s=Di(r);r=s.buffer;let n=s.length;switch(e){case C.METADATA:return vi(r,n,t.quadKey);case C.TERRAIN:return Ii(r,n,i);case C.DBROOT:return i.push(r),{buffer:r}}}var Ti=32301;function vi(t,i,e){let r=new DataView(t),s=0,n=r.getUint32(s,!0);if(s+=Y,n!==Ti)throw new D("Invalid magic");let c=r.getUint32(s,!0);if(s+=Y,c!==1)throw new D("Invalid data type. Must be 1 for QuadTreePacket");let f=r.getUint32(s,!0);if(s+=Y,f!==2)throw new D("Invalid QuadTreePacket version. Only version 2 is supported.");let _=r.getInt32(s,!0);s+=H;let a=r.getInt32(s,!0);if(s+=H,a!==32)throw new D("Invalid instance size.");let o=r.getInt32(s,!0);s+=H;let v=r.getInt32(s,!0);s+=H;let w=r.getInt32(s,!0);if(s+=H,o!==_*a+s)throw new D("Invalid dataBufferOffset");if(o+v+w!==i)throw new D("Invalid packet offsets");let l=[];for(let g=0;g<_;++g){let d=r.getUint8(s);++s,++s;let E=r.getUint16(s,!0);s+=G;let A=r.getUint16(s,!0);s+=G;let h=r.getUint16(s,!0);s+=G,s+=G,s+=G,s+=H,s+=H,s+=8;let S=r.getUint8(s++),k=r.getUint8(s++);s+=G,l.push(new ye(d,E,A,h,S,k))}let u=[],I=0;function p(g,d,E){let A=!1;if(E===4){if(d.hasSubtree())return;A=!0}for(let h=0;h<4;++h){let S=g+h.toString();if(A)u[S]=null;else if(E<4)if(!d.hasChild(h))u[S]=null;else{if(I===_){console.log("Incorrect number of instances");return}let k=l[I++];u[S]=k,p(S,k,E+1)}}}let x=0,T=l[I++];return e===""?++x:u[e]=T,p(e,T,x),u}var yi=5,Ai=4;function Ii(t,i,e){let r=new DataView(t),s=function(f){for(let _=0;_<Ai;++_){let a=r.getUint32(f,!0);if(f+=Y,f+=a,f>i)throw new D("Malformed terrain packet found.")}return f},n=0,c=[];for(;c.length<yi;){let f=n;n=s(n);let _=t.slice(f,n);e.push(_),c.push(_)}return c}var Dt=1953029805,Ri=2917034100;function Di(t){let i=new DataView(t),e=0,r=i.getUint32(e,!0);if(e+=Y,r!==Dt&&r!==Ri)throw new D("Invalid magic");let s=i.getUint32(e,r===Dt);e+=Y;let n=new Uint8Array(t,e),c=Ut.default.inflate(n);if(c.length!==s)throw new D("Size of packet doesn't match header");return c}var en=Se(Si);export{en as default};
import{a as Se}from"./chunk-6MN6BBPN.js";import{a as D}from"./chunk-PZ34T7DL.js";import{b as ae}from"./chunk-3K67FZLU.js";import{c as R,d as Ot,e as me}from"./chunk-55TU6MJR.js";var Ie=R((Li,Ae)=>{"use strict";var zt=(t,i,e,r)=>{let s=t&65535|0,n=t>>>16&65535|0,c=0;for(;e!==0;){c=e>2e3?2e3:e,e-=c;do s=s+i[r++]|0,n=n+s|0;while(--c);s%=65521,n%=65521}return s|n<<16|0};Ae.exports=zt});var De=R((Pi,Re)=>{"use strict";var Ht=()=>{let t,i=[];for(var e=0;e<256;e++){t=e;for(var r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;i[e]=t}return i},Ft=new Uint32Array(Ht()),Vt=(t,i,e,r)=>{let s=Ft,n=r+e;t^=-1;for(let c=r;c<n;c++)t=t>>>8^s[(t^i[c])&255];return t^-1};Re.exports=Vt});var Oe=R((zi,Ue)=>{"use strict";Ue.exports=function(i,e){let r,s,n,c,f,_,a,o,v,w,l,u,I,p,x,T,g,d,E,A,h,S,k,b,m=i.state;r=i.next_in,k=i.input,s=r+(i.avail_in-5),n=i.next_out,b=i.output,c=n-(e-i.avail_out),f=n+(i.avail_out-257),_=m.dmax,a=m.wsize,o=m.whave,v=m.wnext,w=m.window,l=m.hold,u=m.bits,I=m.lencode,p=m.distcode,x=(1<<m.lenbits)-1,T=(1<<m.distbits)-1;e:do{u<15&&(l+=k[r++]<<u,u+=8,l+=k[r++]<<u,u+=8),g=I[l&x];t:for(;;){if(d=g>>>24,l>>>=d,u-=d,d=g>>>16&255,d===0)b[n++]=g&65535;else if(d&16){E=g&65535,d&=15,d&&(u<d&&(l+=k[r++]<<u,u+=8),E+=l&(1<<d)-1,l>>>=d,u-=d),u<15&&(l+=k[r++]<<u,u+=8,l+=k[r++]<<u,u+=8),g=p[l&T];i:for(;;){if(d=g>>>24,l>>>=d,u-=d,d=g>>>16&255,d&16){if(A=g&65535,d&=15,u<d&&(l+=k[r++]<<u,u+=8,u<d&&(l+=k[r++]<<u,u+=8)),A+=l&(1<<d)-1,A>_){i.msg="invalid distance too far back",m.mode=16209;break e}if(l>>>=d,u-=d,d=n-c,A>d){if(d=A-d,d>o&&m.sane){i.msg="invalid distance too far back",m.mode=16209;break e}if(h=0,S=w,v===0){if(h+=a-d,d<E){E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}}else if(v<d){if(h+=a+v-d,d-=v,d<E){E-=d;do b[n++]=w[h++];while(--d);if(h=0,v<E){d=v,E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}}}else if(h+=v-d,d<E){E-=d;do b[n++]=w[h++];while(--d);h=n-A,S=b}for(;E>2;)b[n++]=S[h++],b[n++]=S[h++],b[n++]=S[h++],E-=3;E&&(b[n++]=S[h++],E>1&&(b[n++]=S[h++]))}else{h=n-A;do b[n++]=b[h++],b[n++]=b[h++],b[n++]=b[h++],E-=3;while(E>2);E&&(b[n++]=b[h++],E>1&&(b[n++]=b[h++]))}}else if(d&64){i.msg="invalid distance code",m.mode=16209;break e}else{g=p[(g&65535)+(l&(1<<d)-1)];continue i}break}}else if(d&64)if(d&32){m.mode=16191;break e}else{i.msg="invalid literal/length code",m.mode=16209;break e}else{g=I[(g&65535)+(l&(1<<d)-1)];continue t}break}}while(r<s&&n<f);E=u>>3,r-=E,u-=E<<3,l&=(1<<u)-1,i.next_in=r,i.next_out=n,i.avail_in=r<s?5+(s-r):5-(r-s),i.avail_out=n<f?257+(f-n):257-(n-f),m.hold=l,m.bits=u}});var Me=R((Hi,Ne)=>{"use strict";var Gt=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Yt=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Xt=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),qt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Kt=(t,i,e,r,s,n,c,f)=>{let _=f.bits,a=0,o=0,v=0,w=0,l=0,u=0,I=0,p=0,x=0,T=0,g,d,E,A,h,S=null,k,b=new Uint16Array(16),m=new Uint16Array(16),L=null,Ee,W,Q;for(a=0;a<=15;a++)b[a]=0;for(o=0;o<r;o++)b[i[e+o]]++;for(l=_,w=15;w>=1&&b[w]===0;w--);if(l>w&&(l=w),w===0)return s[n++]=1<<24|64<<16|0,s[n++]=1<<24|64<<16|0,f.bits=1,0;for(v=1;v<w&&b[v]===0;v++);for(l<v&&(l=v),p=1,a=1;a<=15;a++)if(p<<=1,p-=b[a],p<0)return-1;if(p>0&&(t===0||w!==1))return-1;for(m[1]=0,a=1;a<15;a++)m[a+1]=m[a]+b[a];for(o=0;o<r;o++)i[e+o]!==0&&(c[m[i[e+o]]++]=o);if(t===0?(S=L=c,k=20):t===1?(S=Gt,L=Yt,k=257):(S=Xt,L=qt,k=0),T=0,o=0,a=v,h=n,u=l,I=0,E=-1,x=1<<l,A=x-1,t===1&&x>852||t===2&&x>592)return 1;for(;;){Ee=a-I,c[o]+1<k?(W=0,Q=c[o]):c[o]>=k?(W=L[c[o]-k],Q=S[c[o]-k]):(W=96,Q=0),g=1<<a-I,d=1<<u,v=d;do d-=g,s[h+(T>>I)+d]=Ee<<24|W<<16|Q|0;while(d!==0);for(g=1<<a-1;T&g;)g>>=1;if(g!==0?(T&=g-1,T+=g):T=0,o++,--b[a]===0){if(a===w)break;a=i[e+c[o]]}if(a>l&&(T&A)!==E){for(I===0&&(I=l),h+=v,u=a-I,p=1<<u;u+I<w&&(p-=b[u+I],!(p<=0));)u++,p<<=1;if(x+=1<<u,t===1&&x>852||t===2&&x>592)return 1;E=T&A,s[E]=l<<24|u<<16|h-n|0}}return T!==0&&(s[h+T]=a-I<<24|64<<16|0),f.bits=l,0};Ne.exports=Kt});var J=R((Fi,Ze)=>{"use strict";Ze.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var bt=R((Vi,O)=>{"use strict";var he=Ie(),M=De(),jt=Oe(),X=Me(),Wt=0,st=1,ft=2,{Z_FINISH:Be,Z_BLOCK:Qt,Z_TREES:$,Z_OK:P,Z_STREAM_END:Jt,Z_NEED_DICT:$t,Z_STREAM_ERROR:U,Z_DATA_ERROR:lt,Z_MEM_ERROR:ue,Z_BUF_ERROR:ei,Z_DEFLATED:Ce}=J(),ne=16180,Le=16181,Pe=16182,ze=16183,He=16184,Fe=16185,Ve=16186,Ge=16187,Ye=16188,Xe=16189,ie=16190,Z=16191,se=16192,qe=16193,fe=16194,Ke=16195,je=16196,We=16197,Qe=16198,ee=16199,te=16200,Je=16201,$e=16202,et=16203,tt=16204,it=16205,le=16206,nt=16207,rt=16208,y=16209,we=16210,ct=16211,ti=852,ii=592,ni=15,ri=ni,at=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function ai(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var z=t=>{if(!t)return 1;let i=t.state;return!i||i.strm!==t||i.mode<ne||i.mode>ct?1:0},dt=t=>{if(z(t))return U;let i=t.state;return t.total_in=t.total_out=i.total=0,t.msg="",i.wrap&&(t.adler=i.wrap&1),i.mode=ne,i.last=0,i.havedict=0,i.flags=-1,i.dmax=32768,i.head=null,i.hold=0,i.bits=0,i.lencode=i.lendyn=new Int32Array(ti),i.distcode=i.distdyn=new Int32Array(ii),i.sane=1,i.back=-1,P},ht=t=>{if(z(t))return U;let i=t.state;return i.wsize=0,i.whave=0,i.wnext=0,dt(t)},ut=(t,i)=>{let e;if(z(t))return U;let r=t.state;return i<0?(e=0,i=-i):(e=(i>>4)+5,i<48&&(i&=15)),i&&(i<8||i>15)?U:(r.window!==null&&r.wbits!==i&&(r.window=null),r.wrap=e,r.wbits=i,ht(t))},wt=(t,i)=>{if(!t)return U;let e=new ai;t.state=e,e.strm=t,e.window=null,e.mode=ne;let r=ut(t,i);return r!==P&&(t.state=null),r},oi=t=>wt(t,ri),ot=!0,ce,de,si=t=>{if(ot){ce=new Int32Array(512),de=new Int32Array(32);let i=0;for(;i<144;)t.lens[i++]=8;for(;i<256;)t.lens[i++]=9;for(;i<280;)t.lens[i++]=7;for(;i<288;)t.lens[i++]=8;for(X(st,t.lens,0,288,ce,0,t.work,{bits:9}),i=0;i<32;)t.lens[i++]=5;X(ft,t.lens,0,32,de,0,t.work,{bits:5}),ot=!1}t.lencode=ce,t.lenbits=9,t.distcode=de,t.distbits=5},xt=(t,i,e,r)=>{let s,n=t.state;return n.window===null&&(n.wsize=1<<n.wbits,n.wnext=0,n.whave=0,n.window=new Uint8Array(n.wsize)),r>=n.wsize?(n.window.set(i.subarray(e-n.wsize,e),0),n.wnext=0,n.whave=n.wsize):(s=n.wsize-n.wnext,s>r&&(s=r),n.window.set(i.subarray(e-r,e-r+s),n.wnext),r-=s,r?(n.window.set(i.subarray(e-r,e),0),n.wnext=r,n.whave=n.wsize):(n.wnext+=s,n.wnext===n.wsize&&(n.wnext=0),n.whave<n.wsize&&(n.whave+=s))),0},fi=(t,i)=>{let e,r,s,n,c,f,_,a,o,v,w,l,u,I,p=0,x,T,g,d,E,A,h,S,k=new Uint8Array(4),b,m,L=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(z(t)||!t.output||!t.input&&t.avail_in!==0)return U;e=t.state,e.mode===Z&&(e.mode=se),c=t.next_out,s=t.output,_=t.avail_out,n=t.next_in,r=t.input,f=t.avail_in,a=e.hold,o=e.bits,v=f,w=_,S=P;e:for(;;)switch(e.mode){case ne:if(e.wrap===0){e.mode=se;break}for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&2&&a===35615){e.wbits===0&&(e.wbits=15),e.check=0,k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0),a=0,o=0,e.mode=Le;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((a&255)<<8)+(a>>8))%31){t.msg="incorrect header check",e.mode=y;break}if((a&15)!==Ce){t.msg="unknown compression method",e.mode=y;break}if(a>>>=4,o-=4,h=(a&15)+8,e.wbits===0&&(e.wbits=h),h>15||h>e.wbits){t.msg="invalid window size",e.mode=y;break}e.dmax=1<<e.wbits,e.flags=0,t.adler=e.check=1,e.mode=a&512?Xe:Z,a=0,o=0;break;case Le:for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.flags=a,(e.flags&255)!==Ce){t.msg="unknown compression method",e.mode=y;break}if(e.flags&57344){t.msg="unknown header flags set",e.mode=y;break}e.head&&(e.head.text=a>>8&1),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0,e.mode=Pe;case Pe:for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.head&&(e.head.time=a),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,k[2]=a>>>16&255,k[3]=a>>>24&255,e.check=M(e.check,k,4,0)),a=0,o=0,e.mode=ze;case ze:for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.head&&(e.head.xflags=a&255,e.head.os=a>>8),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0,e.mode=He;case He:if(e.flags&1024){for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.length=a,e.head&&(e.head.extra_len=a),e.flags&512&&e.wrap&4&&(k[0]=a&255,k[1]=a>>>8&255,e.check=M(e.check,k,2,0)),a=0,o=0}else e.head&&(e.head.extra=null);e.mode=Fe;case Fe:if(e.flags&1024&&(l=e.length,l>f&&(l=f),l&&(e.head&&(h=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(r.subarray(n,n+l),h)),e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,e.length-=l),e.length))break e;e.length=0,e.mode=Ve;case Ve:if(e.flags&2048){if(f===0)break e;l=0;do h=r[n+l++],e.head&&h&&e.length<65536&&(e.head.name+=String.fromCharCode(h));while(h&&l<f);if(e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,h)break e}else e.head&&(e.head.name=null);e.length=0,e.mode=Ge;case Ge:if(e.flags&4096){if(f===0)break e;l=0;do h=r[n+l++],e.head&&h&&e.length<65536&&(e.head.comment+=String.fromCharCode(h));while(h&&l<f);if(e.flags&512&&e.wrap&4&&(e.check=M(e.check,r,l,n)),f-=l,n+=l,h)break e}else e.head&&(e.head.comment=null);e.mode=Ye;case Ye:if(e.flags&512){for(;o<16;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&4&&a!==(e.check&65535)){t.msg="header crc mismatch",e.mode=y;break}a=0,o=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),t.adler=e.check=0,e.mode=Z;break;case Xe:for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}t.adler=e.check=at(a),a=0,o=0,e.mode=ie;case ie:if(e.havedict===0)return t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,$t;t.adler=e.check=1,e.mode=Z;case Z:if(i===Qt||i===$)break e;case se:if(e.last){a>>>=o&7,o-=o&7,e.mode=le;break}for(;o<3;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}switch(e.last=a&1,a>>>=1,o-=1,a&3){case 0:e.mode=qe;break;case 1:if(si(e),e.mode=ee,i===$){a>>>=2,o-=2;break e}break;case 2:e.mode=je;break;case 3:t.msg="invalid block type",e.mode=y}a>>>=2,o-=2;break;case qe:for(a>>>=o&7,o-=o&7;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if((a&65535)!==(a>>>16^65535)){t.msg="invalid stored block lengths",e.mode=y;break}if(e.length=a&65535,a=0,o=0,e.mode=fe,i===$)break e;case fe:e.mode=Ke;case Ke:if(l=e.length,l){if(l>f&&(l=f),l>_&&(l=_),l===0)break e;s.set(r.subarray(n,n+l),c),f-=l,n+=l,_-=l,c+=l,e.length-=l;break}e.mode=Z;break;case je:for(;o<14;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.nlen=(a&31)+257,a>>>=5,o-=5,e.ndist=(a&31)+1,a>>>=5,o-=5,e.ncode=(a&15)+4,a>>>=4,o-=4,e.nlen>286||e.ndist>30){t.msg="too many length or distance symbols",e.mode=y;break}e.have=0,e.mode=We;case We:for(;e.have<e.ncode;){for(;o<3;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.lens[L[e.have++]]=a&7,a>>>=3,o-=3}for(;e.have<19;)e.lens[L[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,b={bits:e.lenbits},S=X(Wt,e.lens,0,19,e.lencode,0,e.work,b),e.lenbits=b.bits,S){t.msg="invalid code lengths set",e.mode=y;break}e.have=0,e.mode=Qe;case Qe:for(;e.have<e.nlen+e.ndist;){for(;p=e.lencode[a&(1<<e.lenbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(g<16)a>>>=x,o-=x,e.lens[e.have++]=g;else{if(g===16){for(m=x+2;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(a>>>=x,o-=x,e.have===0){t.msg="invalid bit length repeat",e.mode=y;break}h=e.lens[e.have-1],l=3+(a&3),a>>>=2,o-=2}else if(g===17){for(m=x+3;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=x,o-=x,h=0,l=3+(a&7),a>>>=3,o-=3}else{for(m=x+7;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=x,o-=x,h=0,l=11+(a&127),a>>>=7,o-=7}if(e.have+l>e.nlen+e.ndist){t.msg="invalid bit length repeat",e.mode=y;break}for(;l--;)e.lens[e.have++]=h}}if(e.mode===y)break;if(e.lens[256]===0){t.msg="invalid code -- missing end-of-block",e.mode=y;break}if(e.lenbits=9,b={bits:e.lenbits},S=X(st,e.lens,0,e.nlen,e.lencode,0,e.work,b),e.lenbits=b.bits,S){t.msg="invalid literal/lengths set",e.mode=y;break}if(e.distbits=6,e.distcode=e.distdyn,b={bits:e.distbits},S=X(ft,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,b),e.distbits=b.bits,S){t.msg="invalid distances set",e.mode=y;break}if(e.mode=ee,i===$)break e;case ee:e.mode=te;case te:if(f>=6&&_>=258){t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,jt(t,w),c=t.next_out,s=t.output,_=t.avail_out,n=t.next_in,r=t.input,f=t.avail_in,a=e.hold,o=e.bits,e.mode===Z&&(e.back=-1);break}for(e.back=0;p=e.lencode[a&(1<<e.lenbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(T&&!(T&240)){for(d=x,E=T,A=g;p=e.lencode[A+((a&(1<<d+E)-1)>>d)],x=p>>>24,T=p>>>16&255,g=p&65535,!(d+x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=d,o-=d,e.back+=d}if(a>>>=x,o-=x,e.back+=x,e.length=g,T===0){e.mode=it;break}if(T&32){e.back=-1,e.mode=Z;break}if(T&64){t.msg="invalid literal/length code",e.mode=y;break}e.extra=T&15,e.mode=Je;case Je:if(e.extra){for(m=e.extra;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.length+=a&(1<<e.extra)-1,a>>>=e.extra,o-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=$e;case $e:for(;p=e.distcode[a&(1<<e.distbits)-1],x=p>>>24,T=p>>>16&255,g=p&65535,!(x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(!(T&240)){for(d=x,E=T,A=g;p=e.distcode[A+((a&(1<<d+E)-1)>>d)],x=p>>>24,T=p>>>16&255,g=p&65535,!(d+x<=o);){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}a>>>=d,o-=d,e.back+=d}if(a>>>=x,o-=x,e.back+=x,T&64){t.msg="invalid distance code",e.mode=y;break}e.offset=g,e.extra=T&15,e.mode=et;case et:if(e.extra){for(m=e.extra;o<m;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}e.offset+=a&(1<<e.extra)-1,a>>>=e.extra,o-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){t.msg="invalid distance too far back",e.mode=y;break}e.mode=tt;case tt:if(_===0)break e;if(l=w-_,e.offset>l){if(l=e.offset-l,l>e.whave&&e.sane){t.msg="invalid distance too far back",e.mode=y;break}l>e.wnext?(l-=e.wnext,u=e.wsize-l):u=e.wnext-l,l>e.length&&(l=e.length),I=e.window}else I=s,u=c-e.offset,l=e.length;l>_&&(l=_),_-=l,e.length-=l;do s[c++]=I[u++];while(--l);e.length===0&&(e.mode=te);break;case it:if(_===0)break e;s[c++]=e.length,_--,e.mode=te;break;case le:if(e.wrap){for(;o<32;){if(f===0)break e;f--,a|=r[n++]<<o,o+=8}if(w-=_,t.total_out+=w,e.total+=w,e.wrap&4&&w&&(t.adler=e.check=e.flags?M(e.check,s,w,c-w):he(e.check,s,w,c-w)),w=_,e.wrap&4&&(e.flags?a:at(a))!==e.check){t.msg="incorrect data check",e.mode=y;break}a=0,o=0}e.mode=nt;case nt:if(e.wrap&&e.flags){for(;o<32;){if(f===0)break e;f--,a+=r[n++]<<o,o+=8}if(e.wrap&4&&a!==(e.total&4294967295)){t.msg="incorrect length check",e.mode=y;break}a=0,o=0}e.mode=rt;case rt:S=Jt;break e;case y:S=lt;break e;case we:return ue;case ct:default:return U}return t.next_out=c,t.avail_out=_,t.next_in=n,t.avail_in=f,e.hold=a,e.bits=o,(e.wsize||w!==t.avail_out&&e.mode<y&&(e.mode<le||i!==Be))&&xt(t,t.output,t.next_out,w-t.avail_out)?(e.mode=we,ue):(v-=t.avail_in,w-=t.avail_out,t.total_in+=v,t.total_out+=w,e.total+=w,e.wrap&4&&w&&(t.adler=e.check=e.flags?M(e.check,s,w,t.next_out-w):he(e.check,s,w,t.next_out-w)),t.data_type=e.bits+(e.last?64:0)+(e.mode===Z?128:0)+(e.mode===ee||e.mode===fe?256:0),(v===0&&w===0||i===Be)&&S===P&&(S=ei),S)},li=t=>{if(z(t))return U;let i=t.state;return i.window&&(i.window=null),t.state=null,P},ci=(t,i)=>{if(z(t))return U;let e=t.state;return e.wrap&2?(e.head=i,i.done=!1,P):U},di=(t,i)=>{let e=i.length,r,s,n;return z(t)||(r=t.state,r.wrap!==0&&r.mode!==ie)?U:r.mode===ie&&(s=1,s=he(s,i,e,0),s!==r.check)?lt:(n=xt(t,i,e,e),n?(r.mode=we,ue):(r.havedict=1,P))};O.exports.inflateReset=ht;O.exports.inflateReset2=ut;O.exports.inflateResetKeep=dt;O.exports.inflateInit=oi;O.exports.inflateInit2=wt;O.exports.inflate=fi;O.exports.inflateEnd=li;O.exports.inflateGetHeader=ci;O.exports.inflateSetDictionary=di;O.exports.inflateInfo="pako inflate (from Nodeca project)"});var _t=R((Gi,xe)=>{"use strict";var hi=(t,i)=>Object.prototype.hasOwnProperty.call(t,i);xe.exports.assign=function(t){let i=Array.prototype.slice.call(arguments,1);for(;i.length;){let e=i.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(let r in e)hi(e,r)&&(t[r]=e[r])}}return t};xe.exports.flattenChunks=t=>{let i=0;for(let r=0,s=t.length;r<s;r++)i+=t[r].length;let e=new Uint8Array(i);for(let r=0,s=0,n=t.length;r<n;r++){let c=t[r];e.set(c,s),s+=c.length}return e}});var kt=R((Yi,re)=>{"use strict";var gt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{gt=!1}var q=new Uint8Array(256);for(let t=0;t<256;t++)q[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;q[254]=q[254]=1;re.exports.string2buf=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let i,e,r,s,n,c=t.length,f=0;for(s=0;s<c;s++)e=t.charCodeAt(s),(e&64512)===55296&&s+1<c&&(r=t.charCodeAt(s+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),s++)),f+=e<128?1:e<2048?2:e<65536?3:4;for(i=new Uint8Array(f),n=0,s=0;n<f;s++)e=t.charCodeAt(s),(e&64512)===55296&&s+1<c&&(r=t.charCodeAt(s+1),(r&64512)===56320&&(e=65536+(e-55296<<10)+(r-56320),s++)),e<128?i[n++]=e:e<2048?(i[n++]=192|e>>>6,i[n++]=128|e&63):e<65536?(i[n++]=224|e>>>12,i[n++]=128|e>>>6&63,i[n++]=128|e&63):(i[n++]=240|e>>>18,i[n++]=128|e>>>12&63,i[n++]=128|e>>>6&63,i[n++]=128|e&63);return i};var ui=(t,i)=>{if(i<65534&&t.subarray&&gt)return String.fromCharCode.apply(null,t.length===i?t:t.subarray(0,i));let e="";for(let r=0;r<i;r++)e+=String.fromCharCode(t[r]);return e};re.exports.buf2string=(t,i)=>{let e=i||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,i));let r,s,n=new Array(e*2);for(s=0,r=0;r<e;){let c=t[r++];if(c<128){n[s++]=c;continue}let f=q[c];if(f>4){n[s++]=65533,r+=f-1;continue}for(c&=f===2?31:f===3?15:7;f>1&&r<e;)c=c<<6|t[r++]&63,f--;if(f>1){n[s++]=65533;continue}c<65536?n[s++]=c:(c-=65536,n[s++]=55296|c>>10&1023,n[s++]=56320|c&1023)}return ui(n,s)};re.exports.utf8border=(t,i)=>{i=i||t.length,i>t.length&&(i=t.length);let e=i-1;for(;e>=0&&(t[e]&192)===128;)e--;return e<0||e===0?i:e+q[t[e]]>i?e:i}});var Et=R((Xi,pt)=>{"use strict";pt.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var St=R((qi,mt)=>{"use strict";function wi(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}mt.exports=wi});var vt=R((Ki,Tt)=>{"use strict";function xi(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}Tt.exports=xi});var Rt=R((ji,V)=>{"use strict";var B=bt(),At=_t(),ge=kt(),ke=Et(),bi=St(),_i=vt(),It=Object.prototype.toString,{Z_NO_FLUSH:gi,Z_FINISH:ki,Z_OK:K,Z_STREAM_END:be,Z_NEED_DICT:_e,Z_STREAM_ERROR:pi,Z_DATA_ERROR:yt,Z_MEM_ERROR:Ei}=J();function j(t){this.options=At.assign({chunkSize:1024*64,windowBits:15,to:""},t||{});let i=this.options;i.raw&&i.windowBits>=0&&i.windowBits<16&&(i.windowBits=-i.windowBits,i.windowBits===0&&(i.windowBits=-15)),i.windowBits>=0&&i.windowBits<16&&!(t&&t.windowBits)&&(i.windowBits+=32),i.windowBits>15&&i.windowBits<48&&(i.windowBits&15||(i.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new bi,this.strm.avail_out=0;let e=B.inflateInit2(this.strm,i.windowBits);if(e!==K)throw new Error(ke[e]);if(this.header=new _i,B.inflateGetHeader(this.strm,this.header),i.dictionary&&(typeof i.dictionary=="string"?i.dictionary=ge.string2buf(i.dictionary):It.call(i.dictionary)==="[object ArrayBuffer]"&&(i.dictionary=new Uint8Array(i.dictionary)),i.raw&&(e=B.inflateSetDictionary(this.strm,i.dictionary),e!==K)))throw new Error(ke[e])}j.prototype.push=function(t,i){let e=this.strm,r=this.options.chunkSize,s=this.options.dictionary,n,c,f;if(this.ended)return!1;for(i===~~i?c=i:c=i===!0?ki:gi,It.call(t)==="[object ArrayBuffer]"?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(r),e.next_out=0,e.avail_out=r),n=B.inflate(e,c),n===_e&&s&&(n=B.inflateSetDictionary(e,s),n===K?n=B.inflate(e,c):n===yt&&(n=_e));e.avail_in>0&&n===be&&e.state.wrap>0&&t[e.next_in]!==0;)B.inflateReset(e),n=B.inflate(e,c);switch(n){case pi:case yt:case _e:case Ei:return this.onEnd(n),this.ended=!0,!1}if(f=e.avail_out,e.next_out&&(e.avail_out===0||n===be))if(this.options.to==="string"){let _=ge.utf8border(e.output,e.next_out),a=e.next_out-_,o=ge.buf2string(e.output,_);e.next_out=a,e.avail_out=r-a,a&&e.output.set(e.output.subarray(_,_+a),0),this.onData(o)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(n===K&&f===0)){if(n===be)return n=B.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};j.prototype.onData=function(t){this.chunks.push(t)};j.prototype.onEnd=function(t){t===K&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=At.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function pe(t,i){let e=new j(i);if(e.push(t),e.err)throw e.msg||ke[e.err];return e.result}function mi(t,i){return i=i||{},i.raw=!0,pe(t,i)}V.exports.Inflate=j;V.exports.inflate=pe;V.exports.inflateRaw=mi;V.exports.ungzip=pe;V.exports.constants=J()});var Nt=1953029805,Mt=2917034100;function oe(t,i){if(oe.passThroughDataForTesting)return i;ae.typeOf.object("key",t),ae.typeOf.object("data",i);let e=t.byteLength;if(e===0||e%4!==0)throw new D("The length of key must be greater than 0 and a multiple of 4.");let r=new DataView(i),s=r.getUint32(0,!0);if(s===Nt||s===Mt)return i;let n=new DataView(t),c=0,f=i.byteLength,_=f-f%8,a=e,o,v=8;for(;c<_;)for(v=(v+8)%24,o=v;c<_&&o<a;)r.setUint32(c,r.getUint32(c,!0)^n.getUint32(o,!0),!0),r.setUint32(c+4,r.getUint32(c+4,!0)^n.getUint32(o+4,!0),!0),c+=8,o+=24;if(c<f)for(o>=a&&(v=(v+8)%24,o=v);c<f;)r.setUint8(c,r.getUint8(c)^n.getUint8(o)),c++,o++}oe.passThroughDataForTesting=!1;var Te=oe;function Zt(t,i){return(t&i)!==0}var F=Zt;var Bt=[1,2,4,8],ve=15,Ct=16,Lt=64,Pt=128;function N(t,i,e,r,s,n){this._bits=t,this.cnodeVersion=i,this.imageryVersion=e,this.terrainVersion=r,this.imageryProvider=s,this.terrainProvider=n,this.ancestorHasTerrain=!1,this.terrainState=void 0}N.clone=function(t,i){return me(i)?(i._bits=t._bits,i.cnodeVersion=t.cnodeVersion,i.imageryVersion=t.imageryVersion,i.terrainVersion=t.terrainVersion,i.imageryProvider=t.imageryProvider,i.terrainProvider=t.terrainProvider):i=new N(t._bits,t.cnodeVersion,t.imageryVersion,t.terrainVersion,t.imageryProvider,t.terrainProvider),i.ancestorHasTerrain=t.ancestorHasTerrain,i.terrainState=t.terrainState,i};N.prototype.setParent=function(t){this.ancestorHasTerrain=t.ancestorHasTerrain||this.hasTerrain()};N.prototype.hasSubtree=function(){return F(this._bits,Ct)};N.prototype.hasImagery=function(){return F(this._bits,Lt)};N.prototype.hasTerrain=function(){return F(this._bits,Pt)};N.prototype.hasChildren=function(){return F(this._bits,ve)};N.prototype.hasChild=function(t){return F(this._bits,Bt[t])};N.prototype.getChildBitmask=function(){return this._bits&ve};var ye=N;var Ut=Ot(Rt(),1);var G=Uint16Array.BYTES_PER_ELEMENT,H=Int32Array.BYTES_PER_ELEMENT,Y=Uint32Array.BYTES_PER_ELEMENT,C={METADATA:0,TERRAIN:1,DBROOT:2};C.fromString=function(t){if(t==="Metadata")return C.METADATA;if(t==="Terrain")return C.TERRAIN;if(t==="DbRoot")return C.DBROOT};function Si(t,i){let e=C.fromString(t.type),r=t.buffer;Te(t.key,r);let s=Di(r);r=s.buffer;let n=s.length;switch(e){case C.METADATA:return vi(r,n,t.quadKey);case C.TERRAIN:return Ii(r,n,i);case C.DBROOT:return i.push(r),{buffer:r}}}var Ti=32301;function vi(t,i,e){let r=new DataView(t),s=0,n=r.getUint32(s,!0);if(s+=Y,n!==Ti)throw new D("Invalid magic");let c=r.getUint32(s,!0);if(s+=Y,c!==1)throw new D("Invalid data type. Must be 1 for QuadTreePacket");let f=r.getUint32(s,!0);if(s+=Y,f!==2)throw new D("Invalid QuadTreePacket version. Only version 2 is supported.");let _=r.getInt32(s,!0);s+=H;let a=r.getInt32(s,!0);if(s+=H,a!==32)throw new D("Invalid instance size.");let o=r.getInt32(s,!0);s+=H;let v=r.getInt32(s,!0);s+=H;let w=r.getInt32(s,!0);if(s+=H,o!==_*a+s)throw new D("Invalid dataBufferOffset");if(o+v+w!==i)throw new D("Invalid packet offsets");let l=[];for(let g=0;g<_;++g){let d=r.getUint8(s);++s,++s;let E=r.getUint16(s,!0);s+=G;let A=r.getUint16(s,!0);s+=G;let h=r.getUint16(s,!0);s+=G,s+=G,s+=G,s+=H,s+=H,s+=8;let S=r.getUint8(s++),k=r.getUint8(s++);s+=G,l.push(new ye(d,E,A,h,S,k))}let u=[],I=0;function p(g,d,E){let A=!1;if(E===4){if(d.hasSubtree())return;A=!0}for(let h=0;h<4;++h){let S=g+h.toString();if(A)u[S]=null;else if(E<4)if(!d.hasChild(h))u[S]=null;else{if(I===_){console.log("Incorrect number of instances");return}let k=l[I++];u[S]=k,p(S,k,E+1)}}}let x=0,T=l[I++];return e===""?++x:u[e]=T,p(e,T,x),u}var yi=5,Ai=4;function Ii(t,i,e){let r=new DataView(t),s=function(f){for(let _=0;_<Ai;++_){let a=r.getUint32(f,!0);if(f+=Y,f+=a,f>i)throw new D("Malformed terrain packet found.")}return f},n=0,c=[];for(;c.length<yi;){let f=n;n=s(n);let _=t.slice(f,n);e.push(_),c.push(_)}return c}var Dt=1953029805,Ri=2917034100;function Di(t){let i=new DataView(t),e=0,r=i.getUint32(e,!0);if(e+=Y,r!==Dt&&r!==Ri)throw new D("Invalid magic");let s=i.getUint32(e,r===Dt);e+=Y;let n=new Uint8Array(t,e),c=Ut.default.inflate(n);if(c.length!==s)throw new D("Size of packet doesn't match header");return c}var en=Se(Si);export{en as default};
public/CimSDK/Workers/decodeI3S.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as xt}from"./chunk-O2XXE3LE.js";import{a as P}from"./chunk-6PVEYJU3.js";import{a as yt}from"./chunk-CQELY6Z3.js";import{a as ht}from"./chunk-DMXICNHG.js";import{b as g,c as ot,e as st,f as it}from"./chunk-7DK7KB7Q.js";import{a as M}from"./chunk-JSZDCKFG.js";import{a as ft}from"./chunk-5HWP5DW7.js";import{b as lt}from"./chunk-INT7THOB.js";import{d as mt,e as h}from"./chunk-PPCZYYBW.js";var at=mt(xt(),1);function wt(n){return lt.defined("value",n),n<=.04045?n*.07739938080495357:Math.pow((n+.055)*.9478672985781991,2.4)}var k=wt;var ut;function It(n,t,e,o,a,i){let r=e*(1-n)+o*n,s=a*(1-n)+i*n;return r*(1-t)+s*t}function H(n,t,e,o){let a=n+t*e;return o[a]}function At(n,t,e){let o=e.nativeExtent,a=(n-o.west)/(o.east-o.west)*(e.width-1),i=(t-o.south)/(o.north-o.south)*(e.height-1),r=Math.floor(a),s=Math.floor(i);a-=r,i-=s;let c=r<e.width?r+1:r,u=s<e.height?s+1:s;s=e.height-1-s,u=e.height-1-u;let l=H(r,s,e.width,e.buffer),f=H(c,s,e.width,e.buffer),p=H(r,u,e.width,e.buffer),m=H(c,u,e.width,e.buffer),d=It(a,i,l,f,p,m);return d=d*e.scale+e.offset,d}function bt(n,t,e){for(let o=0;o<e.length;o++){let a=e[o].nativeExtent,i=new g;if(e[o].projectionType==="WebMercator"){let r=e[o].projection._ellipsoid._radii;i=new ht(new st(r.x,r.y,r.z)).project(new ot(n,t,0))}else i.x=n,i.y=t;if(i.x>a.west&&i.x<a.east&&i.y>a.south&&i.y<a.north)return At(i.x,i.y,e[o])}return 0}function Lt(n,t,e,o,a,i,r){if(r)return;let s=bt(a.longitude,a.latitude,i);for(let c=0;c<n;++c){let u=bt(a.longitude+M.toRadians(e*t[c*3]),a.latitude+M.toRadians(o*t[c*3+1]),i);t[c*3+2]+=u-s}}function Ot(n,t,e,o,a,i,r,s,c){if(n===0||!h(t)||t.length===0)return;let u=new st(Math.sqrt(r.x),Math.sqrt(r.y),Math.sqrt(r.z));for(let l=0;l<n;++l){let f=l*3,p=f+1,m=f+2,d=new ot;d.longitude=o.longitude+M.toRadians(s*t[f]),d.latitude=o.latitude+M.toRadians(c*t[p]),d.height=o.height+t[m];let b={};u.cartographicToCartesian(d,b),b.x-=a.x,b.y-=a.y,b.z-=a.z;let x={};if(it.multiplyByVector(i,b,x),t[f]=x.x,t[p]=x.y,t[m]=x.z,h(e)){let T=new g(e[f],e[p],e[m]),I={};it.multiplyByVector(i,T,I),e[f]=I.x,e[p]=I.y,e[m]=I.z}}}function Tt(n,t,e){for(let o=0;o<n;++o){let a=e[o*4]/65535,i=e[o*4+1]/65535,r=(e[o*4+2]-e[o*4])/65535,s=(e[o*4+3]-e[o*4+1])/65535;t[o*2]*=r,t[o*2]+=a,t[o*2+1]*=s,t[o*2+1]+=i}}function Ct(n,t,e,o){let a=new Uint32Array(n),i=h(t)?s=>t[s]:s=>s,r=0;if(o&&h(e)){let s=c=>e[i(c)*4+3]<255;for(let c=0;c<n;c+=3)!s(c)&&!s(c+1)&&!s(c+2)&&(a[r++]=i(c),a[r++]=i(c+1),a[r++]=i(c+2));if(r>0){let c=r;for(let u=0;u<n;u+=3)(s(u)||s(u+1)||s(u+2))&&(a[c++]=i(u),a[c++]=i(u+1),a[c++]=i(u+2))}else for(let c=0;c<n;++c)a[c]=i(c)}else{r=n;for(let s=0;s<n;++s)a[s]=i(s)}return{indexArray:a,transparentVertexOffset:r}}function Ft(n,t,e){let o=t[e];if(h(o))return o;let a=t[e]={positions:{},indices:{},edges:{}},i=ft(n[e],n.default);return a.hasOutline=h(i?.edges),a}function Ut(n,t,e,o){if(!h(n[e])){let a=e*3,i=t;for(let r=0;r<3;r++){let s=o[a+r];h(i[s])||(i[s]={}),i=i[s]}h(i.index)||(i.index=e),n[e]=i.index}}function Vt(n,t,e,o,a,i){let r,s;o<a?(r=o,s=a):(r=a,s=o);let c=n[r];h(c)||(c=n[r]={});let u=c[s];h(u)||(u=c[s]={normalsIndex:[],outlines:[]}),u.normalsIndex.push(i),(u.outlines.length===0||t!==o||e!==a)&&u.outlines.push(t,e)}function Et(n,t,e,o){let a=[];for(let i=0;i<e.length;i+=3){let r=h(t)?t[e[i]]:"default",s=Ft(n,a,r);if(!s.hasOutline)continue;let c=s.indices,u=s.positions;for(let f=0;f<3;f++){let p=e[i+f];Ut(c,u,p,o)}let l=s.edges;for(let f=0;f<3;f++){let p=e[i+f],m=e[i+(f+1)%3],d=c[p],b=c[m];Vt(l,p,m,d,b,i)}}return a}var O=new g,X=new g,Y=new g;function gt(n,t,e,o){let a=e[t]*3,i=e[t+1]*3,r=e[t+2]*3;g.fromArray(o,a,O),g.fromArray(o,i,X),g.fromArray(o,r,Y),g.subtract(X,O,X),g.subtract(Y,O,Y),g.cross(X,Y,O);let s=g.magnitude(O);s!==0&&g.divideByScalar(O,s,O);let c=t*3,u=(t+1)*3,l=(t+2)*3;g.pack(O,n,c),g.pack(O,n,u),g.pack(O,n,l)}var z=new g,ct=new g;function _t(n,t,e){g.fromArray(n,t,z),g.fromArray(n,e,ct);let o=g.dot(z,ct),a=g.magnitude(g.cross(z,ct,z));return Math.atan2(a,o)<.25}function Rt(n,t,e,o,a){if(t.normalsIndex.length>1){let i=o.length===a.length;for(let r=0;r<t.normalsIndex.length;r++){let s=t.normalsIndex[r];if(h(a[s*3])||gt(a,s,e,o),r!==0)for(let c=0;c<r;c++){let u=t.normalsIndex[c],l=i?e[s]*3:s*3,f=i?e[u]*3:u*3;if(_t(a,l,f))return}}}n.push(...t.outlines)}function Nt(n,t,e,o,a){let i=Object.keys(t);for(let r=0;r<i.length;r++){let s=t[i[r]],c=Object.keys(s);for(let u=0;u<c.length;u++){let l=s[c[u]];Rt(n,l,e,o,a)}}}function Bt(n,t,e,o){let a=[],i=Object.keys(n);for(let r=0;r<i.length;r++){let s=n[i[r]].edges;Nt(a,s,t,e,o)}return a}function Gt(n,t,e,o,a){if(!h(n)||Object.keys(n).length===0)return;let i=Et(n,t,e,o);(!h(a)||e.length*3!==a.length)&&(a=[]);let r=Bt(i,e,o,a);return r.length>0?new Uint32Array(r):void 0}function St(n){let t=new Float32Array(n.length);for(let e=0;e<n.length;e+=4)t[e]=k(P.byteToFloat(n[e])),t[e+1]=k(P.byteToFloat(n[e+1])),t[e+2]=k(P.byteToFloat(n[e+2])),t[e+3]=P.byteToFloat(n[e+3]);return t}function vt(n,t,e,o,a,i,r){let s={normals:void 0,positions:void 0,uv0s:void 0,colors:void 0,featureIndex:void 0,vertexCount:void 0};if(n===0||!h(e)||e.length===0||h(o))return s;if(h(t)){s.vertexCount=t.length,s.positions=new Float32Array(t.length*3),s.uv0s=h(a)?new Float32Array(t.length*2):void 0,s.colors=h(i)?new Uint8Array(t.length*4):void 0,s.featureIndex=h(r)?new Array(t.length):void 0;for(let c=0;c<t.length;c++){let u=t[c];s.positions[c*3]=e[u*3],s.positions[c*3+1]=e[u*3+1],s.positions[c*3+2]=e[u*3+2],h(s.uv0s)&&(s.uv0s[c*2]=a[u*2],s.uv0s[c*2+1]=a[u*2+1]),h(s.colors)&&(s.colors[c*4]=i[u*4],s.colors[c*4+1]=i[u*4+1],s.colors[c*4+2]=i[u*4+2],s.colors[c*4+3]=i[u*4+3]),h(s.featureIndex)&&(s.featureIndex[c]=r[u])}n=t.length,e=s.positions}t=new Array(n);for(let c=0;c<n;c++)t[c]=c;s.normals=new Float32Array(t.length*3);for(let c=0;c<t.length;c+=3)gt(s.normals,c,t,e);return s}function Mt(n,t,e,o,a,i,r,s){if(n===0||!h(e)||e.length===0)return{buffers:[],bufferViews:[],accessors:[],meshes:[],nodes:[],nodesInScene:[]};let c=[],u=[],l=[],f=[],p=[],m=[],d={},b=[];h(t)&&(n=t.length);let{indexArray:x,transparentVertexOffset:T}=Ct(n,t,i,s.splitGeometryByColorTransparency),I=new Blob([x],{type:"application/binary"}),A=URL.createObjectURL(I),w=n,F=s.enableFeatures&&h(r)?new Float32Array(r.length):void 0,C=0;if(h(F))for(let y=0;y<r.length;++y){F[y]=r[y];let E=r[y]+1;C<E&&(C=E)}let U,R=Gt(s.symbologyData,r,x,e,o);if(h(R)){let y=new Blob([R],{type:"application/binary"});U=URL.createObjectURL(y)}let L=e.subarray(0,w*3),dt=new Blob([L],{type:"application/binary"}),pt=URL.createObjectURL(dt),D=Number.POSITIVE_INFINITY,K=Number.NEGATIVE_INFINITY,Q=Number.POSITIVE_INFINITY,Z=Number.NEGATIVE_INFINITY,J=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY;for(let y=0;y<L.length/3;y++)D=Math.min(D,L[y*3+0]),K=Math.max(K,L[y*3+0]),Q=Math.min(Q,L[y*3+1]),Z=Math.max(Z,L[y*3+1]),J=Math.min(J,L[y*3+2]),$=Math.max($,L[y*3+2]);let N=o?o.subarray(0,w*3):void 0,q;if(h(N)){let y=new Blob([N],{type:"application/binary"});q=URL.createObjectURL(y)}let B=a?a.subarray(0,w*2):void 0,tt;if(h(B)){let y=new Blob([B],{type:"application/binary"});tt=URL.createObjectURL(y)}let G=h(i)?St(i.subarray(0,w*4)):void 0,et;if(h(G)){let y=new Blob([G],{type:"application/binary"});et=URL.createObjectURL(y)}let S=h(F)?F.subarray(0,w):void 0,nt;if(h(S)){let y=new Blob([S],{type:"application/binary"});nt=URL.createObjectURL(y)}let _=h(F)?new Float32Array(C):void 0,rt;if(h(_)){for(let E=0;E<_.length;++E)_[E]=E;let y=new Blob([_],{type:"application/binary"});rt=URL.createObjectURL(y)}let V={},j={};V.POSITION=l.length,c.push({uri:pt,byteLength:L.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:L.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:L.length/3,type:"VEC3",max:[D,Q,J],min:[K,Z,$]}),h(q)&&(V.NORMAL=l.length,c.push({uri:q,byteLength:N.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:N.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:N.length/3,type:"VEC3"})),h(tt)&&(V.TEXCOORD_0=l.length,c.push({uri:tt,byteLength:B.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:B.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:B.length/2,type:"VEC2"})),h(et)&&(V.COLOR_0=l.length,c.push({uri:et,byteLength:G.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:G.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:G.length/4,type:"VEC4"})),h(nt)&&(V._FEATURE_ID_0=l.length,c.push({uri:nt,byteLength:S.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:S.byteLength,target:34963}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:S.length,type:"SCALAR"}),j.EXT_mesh_features={featureIds:[{attribute:0,propertyTable:0,featureCount:C}]},b.push("EXT_mesh_features")),h(rt)&&(c.push({uri:rt,byteLength:_.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:_.byteLength,target:34963}),d.EXT_structural_metadata={schema:{id:"i3s-metadata-schema-001",name:"I3S metadata schema 001",description:"The schema for I3S metadata",version:"1.0",classes:{feature:{name:"feature",description:"Feature metadata",properties:{index:{description:"The feature index",type:"SCALAR",componentType:"FLOAT32",required:!0}}}}},propertyTables:[{name:"feature-indices-mapping",class:"feature",count:C,properties:{index:{values:u.length-1}}}]},b.push("EXT_structural_metadata")),h(U)&&(c.push({uri:U,byteLength:R.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:R.byteLength,target:34963}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5125,count:R.length,type:"SCALAR"}),j.CESIUM_primitive_outline={indices:l.length-1},b.push("CESIUM_primitive_outline")),c.push({uri:A,byteLength:x.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:x.byteLength,target:34963});let v=[];return T>0&&(l.push({bufferView:u.length-1,byteOffset:0,componentType:5125,count:T,type:"SCALAR"}),v.push({attributes:V,indices:l.length-1,material:v.length,extensions:j})),T<n&&(l.push({bufferView:u.length-1,byteOffset:4*T,componentType:5125,count:n-T,type:"SCALAR"}),v.push({attributes:V,indices:l.length-1,material:v.length,extensions:j,extra:{isTransparent:!0}})),f.push({primitives:v}),m.push(0),p.push({mesh:0}),{buffers:c,bufferViews:u,accessors:l,meshes:f,nodes:p,nodesInScene:m,rootExtensions:d,extensionsUsed:b}}function Pt(n,t,e,o){let a=new Uint8Array(n,0,5);return a[0]===68&&a[1]===82&&a[2]===65&&a[3]===67&&a[4]===79?jt(n,e):Ht(n,t,e,o)}function jt(n){let t=ut,e=new t.DecoderBuffer,o=new Uint8Array(n);e.Init(o,o.length);let a=new t.Decoder,i=a.GetEncodedGeometryType(e),r=new t.MetadataQuerier,s,c;i===t.TRIANGULAR_MESH&&(s=new t.Mesh,c=a.DecodeBufferToMesh(e,s));let u={vertexCount:[0],featureCount:0};if(h(c)&&c.ok()&&s.ptr!==0){let l=s.num_faces(),f=s.num_attributes(),p=s.num_points();u.indices=new Uint32Array(l*3);let m=u.indices;u.vertexCount[0]=p,u.scale_x=1,u.scale_y=1;let d=new t.DracoInt32Array(3);for(let b=0;b<l;++b)a.GetFaceFromMesh(s,b,d),m[b*3]=d.GetValue(0),m[b*3+1]=d.GetValue(1),m[b*3+2]=d.GetValue(2);t.destroy(d);for(let b=0;b<f;++b){let x=a.GetAttribute(s,b),T=kt(t,a,s,x,p),I=x.attribute_type(),A="unknown";I===t.POSITION?A="positions":I===t.NORMAL?A="normals":I===t.COLOR?A="colors":I===t.TEX_COORD&&(A="uv0s");let w=a.GetAttributeMetadata(s,b);if(w.ptr!==0){let F=r.NumEntries(w);for(let C=0;C<F;++C){let U=r.GetEntryName(w,C);U==="i3s-scale_x"?u.scale_x=r.GetDoubleEntry(w,"i3s-scale_x"):U==="i3s-scale_y"?u.scale_y=r.GetDoubleEntry(w,"i3s-scale_y"):U==="i3s-attribute-type"&&(A=r.GetStringEntry(w,"i3s-attribute-type"))}}h(u[A])&&console.log("Attribute already exists",A),u[A]=T,A==="feature-index"&&u.featureCount++}t.destroy(s)}return t.destroy(r),t.destroy(a),u}function kt(n,t,e,o,a){let i=o.num_components()*a,r,c=[function(){},function(){r=new n.DracoInt8Array(i),t.GetAttributeInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt8Array(i),t.GetAttributeUInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt16Array(i),t.GetAttributeInt16ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int16Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt16Array(i),t.GetAttributeUInt16ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint16Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt32Array(i),t.GetAttributeInt32ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt32Array(i),t.GetAttributeUInt32ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){},function(){},function(){r=new n.DracoFloat32Array(i),t.GetAttributeFloatForAllPoints(e,o,r)||console.error("Bad stream");let l=new Float32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){},function(){r=new n.DracoUInt8Array(i),t.GetAttributeUInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l}][o.data_type()]();return h(r)&&n.destroy(r),c}var W={position:function(n,t,e){let o=n.vertexCount*3;return n.positions=new Float32Array(t,e,o),e+=o*4,e},normal:function(n,t,e){let o=n.vertexCount*3;return n.normals=new Float32Array(t,e,o),e+=o*4,e},uv0:function(n,t,e){let o=n.vertexCount*2;return n.uv0s=new Float32Array(t,e,o),e+=o*4,e},color:function(n,t,e){let o=n.vertexCount*4;return n.colors=new Uint8Array(t,e,o),e+=o,e},featureId:function(n,t,e){let o=n.featureCount;return e+=o*8,e},id:function(n,t,e){let o=n.featureCount;return e+=o*8,e},faceRange:function(n,t,e){let o=n.featureCount*2;return n.faceRange=new Uint32Array(t,e,o),e+=o*4,e},uvRegion:function(n,t,e){let o=n.vertexCount*4;return n["uv-region"]=new Uint16Array(t,e,o),e+=o*2,e},region:function(n,t,e){let o=n.vertexCount*4;return n["uv-region"]=new Uint16Array(t,e,o),e+=o*2,e}};function Ht(n,t,e,o){let a={vertexCount:0},i=new DataView(n);try{let r=0;if(a.vertexCount=i.getUint32(r,1),r+=4,a.featureCount=i.getUint32(r,1),r+=4,h(e))for(let s=0;s<e.attributes.length;s++)h(W[e.attributes[s]])?r=W[e.attributes[s]](a,n,r):console.error("Unknown decoder for",e.attributes[s]);else{let s=t.ordering,c=t.featureAttributeOrder;h(o)&&h(o.geometryData)&&h(o.geometryData[0])&&h(o.geometryData[0].params)&&(s=Object.keys(o.geometryData[0].params.vertexAttributes),c=Object.keys(o.geometryData[0].params.featureAttributes));for(let u=0;u<s.length;u++){let l=W[s[u]];r=l(a,n,r)}for(let u=0;u<c.length;u++){let l=W[c[u]];r=l(a,n,r)}}}catch(r){console.error(r)}return a.scale_x=1,a.scale_y=1,a}function Xt(n){let t=Pt(n.binaryData,n.schema,n.bufferInfo,n.featureData);h(n.geoidDataList)&&n.geoidDataList.length>0&&Lt(t.vertexCount,t.positions,t.scale_x,t.scale_y,n.cartographicCenter,n.geoidDataList,!1),Ot(t.vertexCount,t.positions,t.normals,n.cartographicCenter,n.cartesianCenter,n.parentRotation,n.ellipsoidRadiiSquare,t.scale_x,t.scale_y),h(t.uv0s)&&h(t["uv-region"])&&Tt(t.vertexCount,t.uv0s,t["uv-region"]);let e;if(h(t["feature-index"]))e=t["feature-index"];else if(h(t.faceRange)){e=new Array(t.vertexCount);for(let r=0;r<t.faceRange.length-1;r+=2){let s=r/2,c=t.faceRange[r],u=t.faceRange[r+1];for(let l=c;l<=u;l++)e[l*3]=s,e[l*3+1]=s,e[l*3+2]=s}}if(n.calculateNormals){let r=vt(t.vertexCount,t.indices,t.positions,t.normals,t.uv0s,t.colors,e);h(r.normals)&&(t.normals=r.normals,h(r.vertexCount)&&(t.vertexCount=r.vertexCount,t.indices=r.indices,t.positions=r.positions,t.uv0s=r.uv0s,t.colors=r.colors,e=r.featureIndex))}let o=Mt(t.vertexCount,t.indices,t.positions,t.normals,t.uv0s,t.colors,e,n),a={positions:t.positions,indices:t.indices,featureIndex:e,sourceURL:n.url,cartesianCenter:n.cartesianCenter,parentRotation:n.parentRotation};return o._customAttributes=a,{meshData:o}}async function Yt(n,t){let e=n.webAssemblyConfig;return h(e)&&h(e.wasmBinaryFile)?ut=await(0,at.default)(e):ut=await(0,at.default)(),!0}function zt(n,t){let e=n.webAssemblyConfig;return h(e)?Yt(n,t):Xt(n,t)}var se=yt(zt);export{se as default};
import{a as xt}from"./chunk-T6ETJW3A.js";import{a as P}from"./chunk-Q2L33INS.js";import{a as yt}from"./chunk-6MN6BBPN.js";import{a as ht}from"./chunk-NJVIDNJ6.js";import{b as g,c as ot,e as st,f as it}from"./chunk-VDZXURWO.js";import{a as M}from"./chunk-UEFEFMYS.js";import{a as ft}from"./chunk-5HWP5DW7.js";import{b as lt}from"./chunk-3K67FZLU.js";import{d as mt,e as h}from"./chunk-55TU6MJR.js";var at=mt(xt(),1);function wt(n){return lt.defined("value",n),n<=.04045?n*.07739938080495357:Math.pow((n+.055)*.9478672985781991,2.4)}var k=wt;var ut;function It(n,t,e,o,a,i){let r=e*(1-n)+o*n,s=a*(1-n)+i*n;return r*(1-t)+s*t}function H(n,t,e,o){let a=n+t*e;return o[a]}function At(n,t,e){let o=e.nativeExtent,a=(n-o.west)/(o.east-o.west)*(e.width-1),i=(t-o.south)/(o.north-o.south)*(e.height-1),r=Math.floor(a),s=Math.floor(i);a-=r,i-=s;let c=r<e.width?r+1:r,u=s<e.height?s+1:s;s=e.height-1-s,u=e.height-1-u;let l=H(r,s,e.width,e.buffer),f=H(c,s,e.width,e.buffer),p=H(r,u,e.width,e.buffer),m=H(c,u,e.width,e.buffer),d=It(a,i,l,f,p,m);return d=d*e.scale+e.offset,d}function bt(n,t,e){for(let o=0;o<e.length;o++){let a=e[o].nativeExtent,i=new g;if(e[o].projectionType==="WebMercator"){let r=e[o].projection._ellipsoid._radii;i=new ht(new st(r.x,r.y,r.z)).project(new ot(n,t,0))}else i.x=n,i.y=t;if(i.x>a.west&&i.x<a.east&&i.y>a.south&&i.y<a.north)return At(i.x,i.y,e[o])}return 0}function Lt(n,t,e,o,a,i,r){if(r)return;let s=bt(a.longitude,a.latitude,i);for(let c=0;c<n;++c){let u=bt(a.longitude+M.toRadians(e*t[c*3]),a.latitude+M.toRadians(o*t[c*3+1]),i);t[c*3+2]+=u-s}}function Ot(n,t,e,o,a,i,r,s,c){if(n===0||!h(t)||t.length===0)return;let u=new st(Math.sqrt(r.x),Math.sqrt(r.y),Math.sqrt(r.z));for(let l=0;l<n;++l){let f=l*3,p=f+1,m=f+2,d=new ot;d.longitude=o.longitude+M.toRadians(s*t[f]),d.latitude=o.latitude+M.toRadians(c*t[p]),d.height=o.height+t[m];let b={};u.cartographicToCartesian(d,b),b.x-=a.x,b.y-=a.y,b.z-=a.z;let x={};if(it.multiplyByVector(i,b,x),t[f]=x.x,t[p]=x.y,t[m]=x.z,h(e)){let T=new g(e[f],e[p],e[m]),I={};it.multiplyByVector(i,T,I),e[f]=I.x,e[p]=I.y,e[m]=I.z}}}function Tt(n,t,e){for(let o=0;o<n;++o){let a=e[o*4]/65535,i=e[o*4+1]/65535,r=(e[o*4+2]-e[o*4])/65535,s=(e[o*4+3]-e[o*4+1])/65535;t[o*2]*=r,t[o*2]+=a,t[o*2+1]*=s,t[o*2+1]+=i}}function Ct(n,t,e,o){let a=new Uint32Array(n),i=h(t)?s=>t[s]:s=>s,r=0;if(o&&h(e)){let s=c=>e[i(c)*4+3]<255;for(let c=0;c<n;c+=3)!s(c)&&!s(c+1)&&!s(c+2)&&(a[r++]=i(c),a[r++]=i(c+1),a[r++]=i(c+2));if(r>0){let c=r;for(let u=0;u<n;u+=3)(s(u)||s(u+1)||s(u+2))&&(a[c++]=i(u),a[c++]=i(u+1),a[c++]=i(u+2))}else for(let c=0;c<n;++c)a[c]=i(c)}else{r=n;for(let s=0;s<n;++s)a[s]=i(s)}return{indexArray:a,transparentVertexOffset:r}}function Ft(n,t,e){let o=t[e];if(h(o))return o;let a=t[e]={positions:{},indices:{},edges:{}},i=ft(n[e],n.default);return a.hasOutline=h(i?.edges),a}function Ut(n,t,e,o){if(!h(n[e])){let a=e*3,i=t;for(let r=0;r<3;r++){let s=o[a+r];h(i[s])||(i[s]={}),i=i[s]}h(i.index)||(i.index=e),n[e]=i.index}}function Vt(n,t,e,o,a,i){let r,s;o<a?(r=o,s=a):(r=a,s=o);let c=n[r];h(c)||(c=n[r]={});let u=c[s];h(u)||(u=c[s]={normalsIndex:[],outlines:[]}),u.normalsIndex.push(i),(u.outlines.length===0||t!==o||e!==a)&&u.outlines.push(t,e)}function Et(n,t,e,o){let a=[];for(let i=0;i<e.length;i+=3){let r=h(t)?t[e[i]]:"default",s=Ft(n,a,r);if(!s.hasOutline)continue;let c=s.indices,u=s.positions;for(let f=0;f<3;f++){let p=e[i+f];Ut(c,u,p,o)}let l=s.edges;for(let f=0;f<3;f++){let p=e[i+f],m=e[i+(f+1)%3],d=c[p],b=c[m];Vt(l,p,m,d,b,i)}}return a}var O=new g,X=new g,Y=new g;function gt(n,t,e,o){let a=e[t]*3,i=e[t+1]*3,r=e[t+2]*3;g.fromArray(o,a,O),g.fromArray(o,i,X),g.fromArray(o,r,Y),g.subtract(X,O,X),g.subtract(Y,O,Y),g.cross(X,Y,O);let s=g.magnitude(O);s!==0&&g.divideByScalar(O,s,O);let c=t*3,u=(t+1)*3,l=(t+2)*3;g.pack(O,n,c),g.pack(O,n,u),g.pack(O,n,l)}var z=new g,ct=new g;function _t(n,t,e){g.fromArray(n,t,z),g.fromArray(n,e,ct);let o=g.dot(z,ct),a=g.magnitude(g.cross(z,ct,z));return Math.atan2(a,o)<.25}function Rt(n,t,e,o,a){if(t.normalsIndex.length>1){let i=o.length===a.length;for(let r=0;r<t.normalsIndex.length;r++){let s=t.normalsIndex[r];if(h(a[s*3])||gt(a,s,e,o),r!==0)for(let c=0;c<r;c++){let u=t.normalsIndex[c],l=i?e[s]*3:s*3,f=i?e[u]*3:u*3;if(_t(a,l,f))return}}}n.push(...t.outlines)}function Nt(n,t,e,o,a){let i=Object.keys(t);for(let r=0;r<i.length;r++){let s=t[i[r]],c=Object.keys(s);for(let u=0;u<c.length;u++){let l=s[c[u]];Rt(n,l,e,o,a)}}}function Bt(n,t,e,o){let a=[],i=Object.keys(n);for(let r=0;r<i.length;r++){let s=n[i[r]].edges;Nt(a,s,t,e,o)}return a}function Gt(n,t,e,o,a){if(!h(n)||Object.keys(n).length===0)return;let i=Et(n,t,e,o);(!h(a)||e.length*3!==a.length)&&(a=[]);let r=Bt(i,e,o,a);return r.length>0?new Uint32Array(r):void 0}function St(n){let t=new Float32Array(n.length);for(let e=0;e<n.length;e+=4)t[e]=k(P.byteToFloat(n[e])),t[e+1]=k(P.byteToFloat(n[e+1])),t[e+2]=k(P.byteToFloat(n[e+2])),t[e+3]=P.byteToFloat(n[e+3]);return t}function vt(n,t,e,o,a,i,r){let s={normals:void 0,positions:void 0,uv0s:void 0,colors:void 0,featureIndex:void 0,vertexCount:void 0};if(n===0||!h(e)||e.length===0||h(o))return s;if(h(t)){s.vertexCount=t.length,s.positions=new Float32Array(t.length*3),s.uv0s=h(a)?new Float32Array(t.length*2):void 0,s.colors=h(i)?new Uint8Array(t.length*4):void 0,s.featureIndex=h(r)?new Array(t.length):void 0;for(let c=0;c<t.length;c++){let u=t[c];s.positions[c*3]=e[u*3],s.positions[c*3+1]=e[u*3+1],s.positions[c*3+2]=e[u*3+2],h(s.uv0s)&&(s.uv0s[c*2]=a[u*2],s.uv0s[c*2+1]=a[u*2+1]),h(s.colors)&&(s.colors[c*4]=i[u*4],s.colors[c*4+1]=i[u*4+1],s.colors[c*4+2]=i[u*4+2],s.colors[c*4+3]=i[u*4+3]),h(s.featureIndex)&&(s.featureIndex[c]=r[u])}n=t.length,e=s.positions}t=new Array(n);for(let c=0;c<n;c++)t[c]=c;s.normals=new Float32Array(t.length*3);for(let c=0;c<t.length;c+=3)gt(s.normals,c,t,e);return s}function Mt(n,t,e,o,a,i,r,s){if(n===0||!h(e)||e.length===0)return{buffers:[],bufferViews:[],accessors:[],meshes:[],nodes:[],nodesInScene:[]};let c=[],u=[],l=[],f=[],p=[],m=[],d={},b=[];h(t)&&(n=t.length);let{indexArray:x,transparentVertexOffset:T}=Ct(n,t,i,s.splitGeometryByColorTransparency),I=new Blob([x],{type:"application/binary"}),A=URL.createObjectURL(I),w=n,F=s.enableFeatures&&h(r)?new Float32Array(r.length):void 0,C=0;if(h(F))for(let y=0;y<r.length;++y){F[y]=r[y];let E=r[y]+1;C<E&&(C=E)}let U,R=Gt(s.symbologyData,r,x,e,o);if(h(R)){let y=new Blob([R],{type:"application/binary"});U=URL.createObjectURL(y)}let L=e.subarray(0,w*3),dt=new Blob([L],{type:"application/binary"}),pt=URL.createObjectURL(dt),D=Number.POSITIVE_INFINITY,K=Number.NEGATIVE_INFINITY,Q=Number.POSITIVE_INFINITY,Z=Number.NEGATIVE_INFINITY,J=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY;for(let y=0;y<L.length/3;y++)D=Math.min(D,L[y*3+0]),K=Math.max(K,L[y*3+0]),Q=Math.min(Q,L[y*3+1]),Z=Math.max(Z,L[y*3+1]),J=Math.min(J,L[y*3+2]),$=Math.max($,L[y*3+2]);let N=o?o.subarray(0,w*3):void 0,q;if(h(N)){let y=new Blob([N],{type:"application/binary"});q=URL.createObjectURL(y)}let B=a?a.subarray(0,w*2):void 0,tt;if(h(B)){let y=new Blob([B],{type:"application/binary"});tt=URL.createObjectURL(y)}let G=h(i)?St(i.subarray(0,w*4)):void 0,et;if(h(G)){let y=new Blob([G],{type:"application/binary"});et=URL.createObjectURL(y)}let S=h(F)?F.subarray(0,w):void 0,nt;if(h(S)){let y=new Blob([S],{type:"application/binary"});nt=URL.createObjectURL(y)}let _=h(F)?new Float32Array(C):void 0,rt;if(h(_)){for(let E=0;E<_.length;++E)_[E]=E;let y=new Blob([_],{type:"application/binary"});rt=URL.createObjectURL(y)}let V={},j={};V.POSITION=l.length,c.push({uri:pt,byteLength:L.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:L.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:L.length/3,type:"VEC3",max:[D,Q,J],min:[K,Z,$]}),h(q)&&(V.NORMAL=l.length,c.push({uri:q,byteLength:N.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:N.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:N.length/3,type:"VEC3"})),h(tt)&&(V.TEXCOORD_0=l.length,c.push({uri:tt,byteLength:B.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:B.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:B.length/2,type:"VEC2"})),h(et)&&(V.COLOR_0=l.length,c.push({uri:et,byteLength:G.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:G.byteLength,target:34962}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:G.length/4,type:"VEC4"})),h(nt)&&(V._FEATURE_ID_0=l.length,c.push({uri:nt,byteLength:S.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:S.byteLength,target:34963}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5126,count:S.length,type:"SCALAR"}),j.EXT_mesh_features={featureIds:[{attribute:0,propertyTable:0,featureCount:C}]},b.push("EXT_mesh_features")),h(rt)&&(c.push({uri:rt,byteLength:_.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:_.byteLength,target:34963}),d.EXT_structural_metadata={schema:{id:"i3s-metadata-schema-001",name:"I3S metadata schema 001",description:"The schema for I3S metadata",version:"1.0",classes:{feature:{name:"feature",description:"Feature metadata",properties:{index:{description:"The feature index",type:"SCALAR",componentType:"FLOAT32",required:!0}}}}},propertyTables:[{name:"feature-indices-mapping",class:"feature",count:C,properties:{index:{values:u.length-1}}}]},b.push("EXT_structural_metadata")),h(U)&&(c.push({uri:U,byteLength:R.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:R.byteLength,target:34963}),l.push({bufferView:u.length-1,byteOffset:0,componentType:5125,count:R.length,type:"SCALAR"}),j.CESIUM_primitive_outline={indices:l.length-1},b.push("CESIUM_primitive_outline")),c.push({uri:A,byteLength:x.byteLength}),u.push({buffer:c.length-1,byteOffset:0,byteLength:x.byteLength,target:34963});let v=[];return T>0&&(l.push({bufferView:u.length-1,byteOffset:0,componentType:5125,count:T,type:"SCALAR"}),v.push({attributes:V,indices:l.length-1,material:v.length,extensions:j})),T<n&&(l.push({bufferView:u.length-1,byteOffset:4*T,componentType:5125,count:n-T,type:"SCALAR"}),v.push({attributes:V,indices:l.length-1,material:v.length,extensions:j,extra:{isTransparent:!0}})),f.push({primitives:v}),m.push(0),p.push({mesh:0}),{buffers:c,bufferViews:u,accessors:l,meshes:f,nodes:p,nodesInScene:m,rootExtensions:d,extensionsUsed:b}}function Pt(n,t,e,o){let a=new Uint8Array(n,0,5);return a[0]===68&&a[1]===82&&a[2]===65&&a[3]===67&&a[4]===79?jt(n,e):Ht(n,t,e,o)}function jt(n){let t=ut,e=new t.DecoderBuffer,o=new Uint8Array(n);e.Init(o,o.length);let a=new t.Decoder,i=a.GetEncodedGeometryType(e),r=new t.MetadataQuerier,s,c;i===t.TRIANGULAR_MESH&&(s=new t.Mesh,c=a.DecodeBufferToMesh(e,s));let u={vertexCount:[0],featureCount:0};if(h(c)&&c.ok()&&s.ptr!==0){let l=s.num_faces(),f=s.num_attributes(),p=s.num_points();u.indices=new Uint32Array(l*3);let m=u.indices;u.vertexCount[0]=p,u.scale_x=1,u.scale_y=1;let d=new t.DracoInt32Array(3);for(let b=0;b<l;++b)a.GetFaceFromMesh(s,b,d),m[b*3]=d.GetValue(0),m[b*3+1]=d.GetValue(1),m[b*3+2]=d.GetValue(2);t.destroy(d);for(let b=0;b<f;++b){let x=a.GetAttribute(s,b),T=kt(t,a,s,x,p),I=x.attribute_type(),A="unknown";I===t.POSITION?A="positions":I===t.NORMAL?A="normals":I===t.COLOR?A="colors":I===t.TEX_COORD&&(A="uv0s");let w=a.GetAttributeMetadata(s,b);if(w.ptr!==0){let F=r.NumEntries(w);for(let C=0;C<F;++C){let U=r.GetEntryName(w,C);U==="i3s-scale_x"?u.scale_x=r.GetDoubleEntry(w,"i3s-scale_x"):U==="i3s-scale_y"?u.scale_y=r.GetDoubleEntry(w,"i3s-scale_y"):U==="i3s-attribute-type"&&(A=r.GetStringEntry(w,"i3s-attribute-type"))}}h(u[A])&&console.log("Attribute already exists",A),u[A]=T,A==="feature-index"&&u.featureCount++}t.destroy(s)}return t.destroy(r),t.destroy(a),u}function kt(n,t,e,o,a){let i=o.num_components()*a,r,c=[function(){},function(){r=new n.DracoInt8Array(i),t.GetAttributeInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt8Array(i),t.GetAttributeUInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt16Array(i),t.GetAttributeInt16ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int16Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt16Array(i),t.GetAttributeUInt16ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint16Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt32Array(i),t.GetAttributeInt32ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Int32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){r=new n.DracoInt32Array(i),t.GetAttributeUInt32ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){},function(){},function(){r=new n.DracoFloat32Array(i),t.GetAttributeFloatForAllPoints(e,o,r)||console.error("Bad stream");let l=new Float32Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l},function(){},function(){r=new n.DracoUInt8Array(i),t.GetAttributeUInt8ForAllPoints(e,o,r)||console.error("Bad stream");let l=new Uint8Array(i);for(let f=0;f<i;++f)l[f]=r.GetValue(f);return l}][o.data_type()]();return h(r)&&n.destroy(r),c}var W={position:function(n,t,e){let o=n.vertexCount*3;return n.positions=new Float32Array(t,e,o),e+=o*4,e},normal:function(n,t,e){let o=n.vertexCount*3;return n.normals=new Float32Array(t,e,o),e+=o*4,e},uv0:function(n,t,e){let o=n.vertexCount*2;return n.uv0s=new Float32Array(t,e,o),e+=o*4,e},color:function(n,t,e){let o=n.vertexCount*4;return n.colors=new Uint8Array(t,e,o),e+=o,e},featureId:function(n,t,e){let o=n.featureCount;return e+=o*8,e},id:function(n,t,e){let o=n.featureCount;return e+=o*8,e},faceRange:function(n,t,e){let o=n.featureCount*2;return n.faceRange=new Uint32Array(t,e,o),e+=o*4,e},uvRegion:function(n,t,e){let o=n.vertexCount*4;return n["uv-region"]=new Uint16Array(t,e,o),e+=o*2,e},region:function(n,t,e){let o=n.vertexCount*4;return n["uv-region"]=new Uint16Array(t,e,o),e+=o*2,e}};function Ht(n,t,e,o){let a={vertexCount:0},i=new DataView(n);try{let r=0;if(a.vertexCount=i.getUint32(r,1),r+=4,a.featureCount=i.getUint32(r,1),r+=4,h(e))for(let s=0;s<e.attributes.length;s++)h(W[e.attributes[s]])?r=W[e.attributes[s]](a,n,r):console.error("Unknown decoder for",e.attributes[s]);else{let s=t.ordering,c=t.featureAttributeOrder;h(o)&&h(o.geometryData)&&h(o.geometryData[0])&&h(o.geometryData[0].params)&&(s=Object.keys(o.geometryData[0].params.vertexAttributes),c=Object.keys(o.geometryData[0].params.featureAttributes));for(let u=0;u<s.length;u++){let l=W[s[u]];r=l(a,n,r)}for(let u=0;u<c.length;u++){let l=W[c[u]];r=l(a,n,r)}}}catch(r){console.error(r)}return a.scale_x=1,a.scale_y=1,a}function Xt(n){let t=Pt(n.binaryData,n.schema,n.bufferInfo,n.featureData);h(n.geoidDataList)&&n.geoidDataList.length>0&&Lt(t.vertexCount,t.positions,t.scale_x,t.scale_y,n.cartographicCenter,n.geoidDataList,!1),Ot(t.vertexCount,t.positions,t.normals,n.cartographicCenter,n.cartesianCenter,n.parentRotation,n.ellipsoidRadiiSquare,t.scale_x,t.scale_y),h(t.uv0s)&&h(t["uv-region"])&&Tt(t.vertexCount,t.uv0s,t["uv-region"]);let e;if(h(t["feature-index"]))e=t["feature-index"];else if(h(t.faceRange)){e=new Array(t.vertexCount);for(let r=0;r<t.faceRange.length-1;r+=2){let s=r/2,c=t.faceRange[r],u=t.faceRange[r+1];for(let l=c;l<=u;l++)e[l*3]=s,e[l*3+1]=s,e[l*3+2]=s}}if(n.calculateNormals){let r=vt(t.vertexCount,t.indices,t.positions,t.normals,t.uv0s,t.colors,e);h(r.normals)&&(t.normals=r.normals,h(r.vertexCount)&&(t.vertexCount=r.vertexCount,t.indices=r.indices,t.positions=r.positions,t.uv0s=r.uv0s,t.colors=r.colors,e=r.featureIndex))}let o=Mt(t.vertexCount,t.indices,t.positions,t.normals,t.uv0s,t.colors,e,n),a={positions:t.positions,indices:t.indices,featureIndex:e,sourceURL:n.url,cartesianCenter:n.cartesianCenter,parentRotation:n.parentRotation};return o._customAttributes=a,{meshData:o}}async function Yt(n,t){let e=n.webAssemblyConfig;return h(e)&&h(e.wasmBinaryFile)?ut=await(0,at.default)(e):ut=await(0,at.default)(),!0}function zt(n,t){let e=n.webAssemblyConfig;return h(e)?Yt(n,t):Xt(n,t)}var se=yt(zt);export{se as default};
public/CimSDK/Workers/image/richtextpoint1.png

public/CimSDK/Workers/transcodeKTX2.js
@@ -3,7 +3,7 @@
 * Version 5.3.1
 */
import{a as rn}from"./chunk-CQELY6Z3.js";import{a as M}from"./chunk-YGIPMXAD.js";import{a as ie}from"./chunk-54HAFFPJ.js";import{a as _n}from"./chunk-5HWP5DW7.js";import{b as nn}from"./chunk-INT7THOB.js";import{a as Gt,c as or,d as sr,e as ge}from"./chunk-PPCZYYBW.js";var Rn=or((it,pt)=>{var Nt=function(){var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(i=i||__filename),function(f){f=f||{};var r=typeof f<"u"?f:{},C,l;r.ready=new Promise(function(e,t){C=e,l=t});var P={},F;for(F in r)r.hasOwnProperty(F)&&(P[F]=r[F]);var U=[],y="./this.program",m=function(e,t){throw t},V=!1,d=!1,p=!1,Q=!1;V=typeof window=="object",d=typeof importScripts=="function",p=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",Q=!V&&!p&&!d;var T="";function X(e){return r.locateFile?r.locateFile(e,T):T+e}var oe,le,W,J,g,Fe;p?(d?T=Gt("path").dirname(T)+"/":T=__dirname+"/",oe=function(t,n){return g||(g=Gt("fs")),Fe||(Fe=Gt("path")),t=Fe.normalize(t),g.readFileSync(t,n?null:"utf8")},W=function(t){var n=oe(t,!0);return n.buffer||(n=new Uint8Array(n)),Se(n.buffer),n},process.argv.length>1&&(y=process.argv[1].replace(/\\/g,"/")),U=process.argv.slice(2),process.on("uncaughtException",function(e){if(!(e instanceof rr))throw e}),process.on("unhandledRejection",Me),m=function(e){process.exit(e)},r.inspect=function(){return"[Emscripten Module object]"}):Q?(typeof read<"u"&&(oe=function(t){return read(t)}),W=function(t){var n;return typeof readbuffer=="function"?new Uint8Array(readbuffer(t)):(n=read(t,"binary"),Se(typeof n=="object"),n)},typeof scriptArgs<"u"?U=scriptArgs:typeof arguments<"u"&&(U=arguments),typeof quit=="function"&&(m=function(e){quit(e)}),typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(V||d)&&(d?T=self.location.href:typeof document<"u"&&document.currentScript&&(T=document.currentScript.src),i&&(T=i),T.indexOf("blob:")!==0?T=T.substr(0,T.lastIndexOf("/")+1):T="",oe=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(W=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),le=function(e,t,n){var _=new XMLHttpRequest;_.open("GET",e,!0),_.responseType="arraybuffer",_.onload=function(){if(_.status==200||_.status==0&&_.response){t(_.response);return}n()},_.onerror=n,_.send(null)},J=function(e){document.title=e});var ot=r.print||console.log.bind(console),ee=r.printErr||console.warn.bind(console);for(F in P)P.hasOwnProperty(F)&&(r[F]=P[F]);P=null,r.arguments&&(U=r.arguments),r.thisProgram&&(y=r.thisProgram),r.quit&&(m=r.quit);var De=0,Ie=function(e){De=e},ae;r.wasmBinary&&(ae=r.wasmBinary);var st=r.noExitRuntime||!0;typeof WebAssembly!="object"&&Me("no native wasm support detected");var ce,de=!1,be;function Se(e,t){e||Me("Assertion failed: "+t)}var we=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function He(e,t,n){for(var _=t+n,o=t;e[o]&&!(o>=_);)++o;if(o-t>16&&e.subarray&&we)return we.decode(e.subarray(t,o));for(var a="";t<o;){var c=e[t++];if(!(c&128)){a+=String.fromCharCode(c);continue}var s=e[t++]&63;if((c&224)==192){a+=String.fromCharCode((c&31)<<6|s);continue}var R=e[t++]&63;if((c&240)==224?c=(c&15)<<12|s<<6|R:c=(c&7)<<18|s<<12|R<<6|e[t++]&63,c<65536)a+=String.fromCharCode(c);else{var u=c-65536;a+=String.fromCharCode(55296|u>>10,56320|u&1023)}}return a}function Xe(e,t){return e?He(D,e,t):""}function Rt(e,t,n,_){if(!(_>0))return 0;for(var o=n,a=n+_-1,c=0;c<e.length;++c){var s=e.charCodeAt(c);if(s>=55296&&s<=57343){var R=e.charCodeAt(++c);s=65536+((s&1023)<<10)|R&1023}if(s<=127){if(n>=a)break;t[n++]=s}else if(s<=2047){if(n+1>=a)break;t[n++]=192|s>>6,t[n++]=128|s&63}else if(s<=65535){if(n+2>=a)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|s&63}else{if(n+3>=a)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|s&63}}return t[n]=0,n-o}function L(e,t,n){return Rt(e,D,t,n)}function j(e){for(var t=0,n=0;n<e.length;++n){var _=e.charCodeAt(n);_>=55296&&_<=57343&&(_=65536+((_&1023)<<10)|e.charCodeAt(++n)&1023),_<=127?++t:_<=2047?t+=2:_<=65535?t+=3:t+=4}return t}var Ae=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function at(e,t){for(var n=e,_=n>>1,o=_+t/2;!(_>=o)&&Ge[_];)++_;if(n=_<<1,n-e>32&&Ae)return Ae.decode(D.subarray(e,n));for(var a="",c=0;!(c>=t/2);++c){var s=fe[e+c*2>>1];if(s==0)break;a+=String.fromCharCode(s)}return a}function xe(e,t,n){if(n===void 0&&(n=2147483647),n<2)return 0;n-=2;for(var _=t,o=n<e.length*2?n/2:e.length,a=0;a<o;++a){var c=e.charCodeAt(a);fe[t>>1]=c,t+=2}return fe[t>>1]=0,t-_}function un(e){return e.length*2}function Tn(e,t){for(var n=0,_="";!(n>=t/4);){var o=w[e+n*4>>2];if(o==0)break;if(++n,o>=65536){var a=o-65536;_+=String.fromCharCode(55296|a>>10,56320|a&1023)}else _+=String.fromCharCode(o)}return _}function On(e,t,n){if(n===void 0&&(n=2147483647),n<4)return 0;for(var _=t,o=_+n-4,a=0;a<e.length;++a){var c=e.charCodeAt(a);if(c>=55296&&c<=57343){var s=e.charCodeAt(++a);c=65536+((c&1023)<<10)|s&1023}if(w[t>>2]=c,t+=4,t+4>o)break}return w[t>>2]=0,t-_}function ln(e){for(var t=0,n=0;n<e.length;++n){var _=e.charCodeAt(n);_>=55296&&_<=57343&&++n,t+=4}return t}function Mn(e,t){return e%t>0&&(e+=t-e%t),e}var ct,ke,D,fe,Ge,w,Y,Pt,Et;function vt(e){ct=e,r.HEAP8=ke=new Int8Array(e),r.HEAP16=fe=new Int16Array(e),r.HEAP32=w=new Int32Array(e),r.HEAPU8=D=new Uint8Array(e),r.HEAPU16=Ge=new Uint16Array(e),r.HEAPU32=Y=new Uint32Array(e),r.HEAPF32=Pt=new Float32Array(e),r.HEAPF64=Et=new Float64Array(e)}var Tr=r.INITIAL_MEMORY||16777216,Ve,ht=[],Ut=[],Kn=[],yt=[],Bn=!1;function Cn(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)Gn(r.preRun.shift());$e(ht)}function Fn(){Bn=!0,$e(Ut)}function dn(){$e(Kn)}function Sn(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)Nn(r.postRun.shift());$e(yt)}function Gn(e){ht.unshift(e)}function Vn(e){Ut.unshift(e)}function Nn(e){yt.unshift(e)}var ue=0,At=null,Ne=null;function pn(e){ue++,r.monitorRunDependencies&&r.monitorRunDependencies(ue)}function Pn(e){if(ue--,r.monitorRunDependencies&&r.monitorRunDependencies(ue),ue==0&&(At!==null&&(clearInterval(At),At=null),Ne)){var t=Ne;Ne=null,t()}}r.preloadedImages={},r.preloadedAudios={};function Me(e){r.onAbort&&r.onAbort(e),e+="",ee(e),de=!0,be=1,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(e);throw l(t),t}function gt(e,t){return String.prototype.startsWith?e.startsWith(t):e.indexOf(t)===0}var En="data:application/octet-stream;base64,";function Lt(e){return gt(e,En)}var vn="file://";function mt(e){return gt(e,vn)}var x="basis_transcoder.wasm";Lt(x)||(x=X(x));function Dt(e){try{if(e==x&&ae)return new Uint8Array(ae);if(W)return W(e);throw"both async and sync fetching of the wasm failed"}catch(t){Me(t)}}function hn(){if(!ae&&(V||d)){if(typeof fetch=="function"&&!mt(x))return fetch(x,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+x+"'";return e.arrayBuffer()}).catch(function(){return Dt(x)});if(le)return new Promise(function(e,t){le(x,function(n){e(new Uint8Array(n))},t)})}return Promise.resolve().then(function(){return Dt(x)})}function Un(){var e={a:er};function t(c,s){var R=c.exports;r.asm=R,ce=r.asm.K,vt(ce.buffer),Ve=r.asm.O,Vn(r.asm.L),Pn("wasm-instantiate")}pn("wasm-instantiate");function n(c){t(c.instance)}function _(c){return hn().then(function(s){var R=WebAssembly.instantiate(s,e);return R}).then(c,function(s){ee("failed to asynchronously prepare wasm: "+s),Me(s)})}function o(){return!ae&&typeof WebAssembly.instantiateStreaming=="function"&&!Lt(x)&&!mt(x)&&typeof fetch=="function"?fetch(x,{credentials:"same-origin"}).then(function(c){var s=WebAssembly.instantiateStreaming(c,e);return s.then(n,function(R){return ee("wasm streaming compile failed: "+R),ee("falling back to ArrayBuffer instantiation"),_(n)})}):_(n)}if(r.instantiateWasm)try{var a=r.instantiateWasm(e,t);return a}catch(c){return ee("Module.instantiateWasm callback failed with error: "+c),!1}return o().catch(l),{}}function $e(e){for(;e.length>0;){var t=e.shift();if(typeof t=="function"){t(r);continue}var n=t.func;typeof n=="number"?t.arg===void 0?Ve.get(n)():Ve.get(n)(t.arg):n(t.arg===void 0?null:t.arg)}}var We={};function je(e){for(;e.length;){var t=e.pop(),n=e.pop();n(t)}}function pe(e){return this.fromWireType(Y[e>>2])}var Ke={},Te={},ze={},yn=48,gn=57;function Ye(e){if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=yn&&t<=gn?"_"+e:e}function qe(e,t){return e=Ye(e),new Function("body","return function "+e+`() {
import{a as rn}from"./chunk-6MN6BBPN.js";import{a as M}from"./chunk-YGIPMXAD.js";import{a as ie}from"./chunk-PZ34T7DL.js";import{a as _n}from"./chunk-5HWP5DW7.js";import{b as nn}from"./chunk-3K67FZLU.js";import{a as Gt,c as or,d as sr,e as ge}from"./chunk-55TU6MJR.js";var Rn=or((it,pt)=>{var Nt=function(){var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(i=i||__filename),function(f){f=f||{};var r=typeof f<"u"?f:{},C,l;r.ready=new Promise(function(e,t){C=e,l=t});var P={},F;for(F in r)r.hasOwnProperty(F)&&(P[F]=r[F]);var U=[],y="./this.program",m=function(e,t){throw t},V=!1,d=!1,p=!1,Q=!1;V=typeof window=="object",d=typeof importScripts=="function",p=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",Q=!V&&!p&&!d;var T="";function X(e){return r.locateFile?r.locateFile(e,T):T+e}var oe,le,W,J,g,Fe;p?(d?T=Gt("path").dirname(T)+"/":T=__dirname+"/",oe=function(t,n){return g||(g=Gt("fs")),Fe||(Fe=Gt("path")),t=Fe.normalize(t),g.readFileSync(t,n?null:"utf8")},W=function(t){var n=oe(t,!0);return n.buffer||(n=new Uint8Array(n)),Se(n.buffer),n},process.argv.length>1&&(y=process.argv[1].replace(/\\/g,"/")),U=process.argv.slice(2),process.on("uncaughtException",function(e){if(!(e instanceof rr))throw e}),process.on("unhandledRejection",Me),m=function(e){process.exit(e)},r.inspect=function(){return"[Emscripten Module object]"}):Q?(typeof read<"u"&&(oe=function(t){return read(t)}),W=function(t){var n;return typeof readbuffer=="function"?new Uint8Array(readbuffer(t)):(n=read(t,"binary"),Se(typeof n=="object"),n)},typeof scriptArgs<"u"?U=scriptArgs:typeof arguments<"u"&&(U=arguments),typeof quit=="function"&&(m=function(e){quit(e)}),typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(V||d)&&(d?T=self.location.href:typeof document<"u"&&document.currentScript&&(T=document.currentScript.src),i&&(T=i),T.indexOf("blob:")!==0?T=T.substr(0,T.lastIndexOf("/")+1):T="",oe=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(W=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),le=function(e,t,n){var _=new XMLHttpRequest;_.open("GET",e,!0),_.responseType="arraybuffer",_.onload=function(){if(_.status==200||_.status==0&&_.response){t(_.response);return}n()},_.onerror=n,_.send(null)},J=function(e){document.title=e});var ot=r.print||console.log.bind(console),ee=r.printErr||console.warn.bind(console);for(F in P)P.hasOwnProperty(F)&&(r[F]=P[F]);P=null,r.arguments&&(U=r.arguments),r.thisProgram&&(y=r.thisProgram),r.quit&&(m=r.quit);var De=0,Ie=function(e){De=e},ae;r.wasmBinary&&(ae=r.wasmBinary);var st=r.noExitRuntime||!0;typeof WebAssembly!="object"&&Me("no native wasm support detected");var ce,de=!1,be;function Se(e,t){e||Me("Assertion failed: "+t)}var we=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function He(e,t,n){for(var _=t+n,o=t;e[o]&&!(o>=_);)++o;if(o-t>16&&e.subarray&&we)return we.decode(e.subarray(t,o));for(var a="";t<o;){var c=e[t++];if(!(c&128)){a+=String.fromCharCode(c);continue}var s=e[t++]&63;if((c&224)==192){a+=String.fromCharCode((c&31)<<6|s);continue}var R=e[t++]&63;if((c&240)==224?c=(c&15)<<12|s<<6|R:c=(c&7)<<18|s<<12|R<<6|e[t++]&63,c<65536)a+=String.fromCharCode(c);else{var u=c-65536;a+=String.fromCharCode(55296|u>>10,56320|u&1023)}}return a}function Xe(e,t){return e?He(D,e,t):""}function Rt(e,t,n,_){if(!(_>0))return 0;for(var o=n,a=n+_-1,c=0;c<e.length;++c){var s=e.charCodeAt(c);if(s>=55296&&s<=57343){var R=e.charCodeAt(++c);s=65536+((s&1023)<<10)|R&1023}if(s<=127){if(n>=a)break;t[n++]=s}else if(s<=2047){if(n+1>=a)break;t[n++]=192|s>>6,t[n++]=128|s&63}else if(s<=65535){if(n+2>=a)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|s&63}else{if(n+3>=a)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|s&63}}return t[n]=0,n-o}function L(e,t,n){return Rt(e,D,t,n)}function j(e){for(var t=0,n=0;n<e.length;++n){var _=e.charCodeAt(n);_>=55296&&_<=57343&&(_=65536+((_&1023)<<10)|e.charCodeAt(++n)&1023),_<=127?++t:_<=2047?t+=2:_<=65535?t+=3:t+=4}return t}var Ae=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function at(e,t){for(var n=e,_=n>>1,o=_+t/2;!(_>=o)&&Ge[_];)++_;if(n=_<<1,n-e>32&&Ae)return Ae.decode(D.subarray(e,n));for(var a="",c=0;!(c>=t/2);++c){var s=fe[e+c*2>>1];if(s==0)break;a+=String.fromCharCode(s)}return a}function xe(e,t,n){if(n===void 0&&(n=2147483647),n<2)return 0;n-=2;for(var _=t,o=n<e.length*2?n/2:e.length,a=0;a<o;++a){var c=e.charCodeAt(a);fe[t>>1]=c,t+=2}return fe[t>>1]=0,t-_}function un(e){return e.length*2}function Tn(e,t){for(var n=0,_="";!(n>=t/4);){var o=w[e+n*4>>2];if(o==0)break;if(++n,o>=65536){var a=o-65536;_+=String.fromCharCode(55296|a>>10,56320|a&1023)}else _+=String.fromCharCode(o)}return _}function On(e,t,n){if(n===void 0&&(n=2147483647),n<4)return 0;for(var _=t,o=_+n-4,a=0;a<e.length;++a){var c=e.charCodeAt(a);if(c>=55296&&c<=57343){var s=e.charCodeAt(++a);c=65536+((c&1023)<<10)|s&1023}if(w[t>>2]=c,t+=4,t+4>o)break}return w[t>>2]=0,t-_}function ln(e){for(var t=0,n=0;n<e.length;++n){var _=e.charCodeAt(n);_>=55296&&_<=57343&&++n,t+=4}return t}function Mn(e,t){return e%t>0&&(e+=t-e%t),e}var ct,ke,D,fe,Ge,w,Y,Pt,Et;function vt(e){ct=e,r.HEAP8=ke=new Int8Array(e),r.HEAP16=fe=new Int16Array(e),r.HEAP32=w=new Int32Array(e),r.HEAPU8=D=new Uint8Array(e),r.HEAPU16=Ge=new Uint16Array(e),r.HEAPU32=Y=new Uint32Array(e),r.HEAPF32=Pt=new Float32Array(e),r.HEAPF64=Et=new Float64Array(e)}var Tr=r.INITIAL_MEMORY||16777216,Ve,ht=[],Ut=[],Kn=[],yt=[],Bn=!1;function Cn(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)Gn(r.preRun.shift());$e(ht)}function Fn(){Bn=!0,$e(Ut)}function dn(){$e(Kn)}function Sn(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)Nn(r.postRun.shift());$e(yt)}function Gn(e){ht.unshift(e)}function Vn(e){Ut.unshift(e)}function Nn(e){yt.unshift(e)}var ue=0,At=null,Ne=null;function pn(e){ue++,r.monitorRunDependencies&&r.monitorRunDependencies(ue)}function Pn(e){if(ue--,r.monitorRunDependencies&&r.monitorRunDependencies(ue),ue==0&&(At!==null&&(clearInterval(At),At=null),Ne)){var t=Ne;Ne=null,t()}}r.preloadedImages={},r.preloadedAudios={};function Me(e){r.onAbort&&r.onAbort(e),e+="",ee(e),de=!0,be=1,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(e);throw l(t),t}function gt(e,t){return String.prototype.startsWith?e.startsWith(t):e.indexOf(t)===0}var En="data:application/octet-stream;base64,";function Lt(e){return gt(e,En)}var vn="file://";function mt(e){return gt(e,vn)}var x="basis_transcoder.wasm";Lt(x)||(x=X(x));function Dt(e){try{if(e==x&&ae)return new Uint8Array(ae);if(W)return W(e);throw"both async and sync fetching of the wasm failed"}catch(t){Me(t)}}function hn(){if(!ae&&(V||d)){if(typeof fetch=="function"&&!mt(x))return fetch(x,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+x+"'";return e.arrayBuffer()}).catch(function(){return Dt(x)});if(le)return new Promise(function(e,t){le(x,function(n){e(new Uint8Array(n))},t)})}return Promise.resolve().then(function(){return Dt(x)})}function Un(){var e={a:er};function t(c,s){var R=c.exports;r.asm=R,ce=r.asm.K,vt(ce.buffer),Ve=r.asm.O,Vn(r.asm.L),Pn("wasm-instantiate")}pn("wasm-instantiate");function n(c){t(c.instance)}function _(c){return hn().then(function(s){var R=WebAssembly.instantiate(s,e);return R}).then(c,function(s){ee("failed to asynchronously prepare wasm: "+s),Me(s)})}function o(){return!ae&&typeof WebAssembly.instantiateStreaming=="function"&&!Lt(x)&&!mt(x)&&typeof fetch=="function"?fetch(x,{credentials:"same-origin"}).then(function(c){var s=WebAssembly.instantiateStreaming(c,e);return s.then(n,function(R){return ee("wasm streaming compile failed: "+R),ee("falling back to ArrayBuffer instantiation"),_(n)})}):_(n)}if(r.instantiateWasm)try{var a=r.instantiateWasm(e,t);return a}catch(c){return ee("Module.instantiateWasm callback failed with error: "+c),!1}return o().catch(l),{}}function $e(e){for(;e.length>0;){var t=e.shift();if(typeof t=="function"){t(r);continue}var n=t.func;typeof n=="number"?t.arg===void 0?Ve.get(n)():Ve.get(n)(t.arg):n(t.arg===void 0?null:t.arg)}}var We={};function je(e){for(;e.length;){var t=e.pop(),n=e.pop();n(t)}}function pe(e){return this.fromWireType(Y[e>>2])}var Ke={},Te={},ze={},yn=48,gn=57;function Ye(e){if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=yn&&t<=gn?"_"+e:e}function qe(e,t){return e=Ye(e),new Function("body","return function "+e+`() {
    "use strict";    return body.apply(this, arguments);
};
`)(t)}function ft(e,t){var n=qe(t,function(_){this.name=t,this.message=_;var o=new Error(_).stack;o!==void 0&&(this.stack=this.toString()+`
public/CimSDK/Workers/upsampleQuantizedTerrainMesh.js
@@ -3,4 +3,4 @@
 * Version 5.3.1
 */
import{a as be,b as Ne}from"./chunk-GNVRN42E.js";import{a as Ae}from"./chunk-CQELY6Z3.js";import{a as ue}from"./chunk-RPFXEG5U.js";import{a as ee}from"./chunk-HV57XH4K.js";import"./chunk-P5SE5XVC.js";import"./chunk-ZPRLAWII.js";import"./chunk-BUR4N7VJ.js";import"./chunk-33CJ2NM7.js";import{a as Ve}from"./chunk-ZDNS2GYV.js";import{d as de}from"./chunk-QHUUGFLC.js";import{i as Se}from"./chunk-BHJLM5NY.js";import"./chunk-3LWOQSP3.js";import{b as A,c as Ie,d as Z,e as Ce}from"./chunk-7DK7KB7Q.js";import{a as N}from"./chunk-JSZDCKFG.js";import"./chunk-YGIPMXAD.js";import"./chunk-54HAFFPJ.js";import"./chunk-5HWP5DW7.js";import{a as V,b as q}from"./chunk-INT7THOB.js";import{e as f}from"./chunk-PPCZYYBW.js";var ne={};ne.clipTriangleAtAxisAlignedThreshold=function(n,h,o,i,s,e){if(!f(n))throw new V("threshold is required.");if(!f(h))throw new V("keepAbove is required.");if(!f(o))throw new V("u0 is required.");if(!f(i))throw new V("u1 is required.");if(!f(s))throw new V("u2 is required.");f(e)?e.length=0:e=[];let g,w,c;h?(g=o<n,w=i<n,c=s<n):(g=o>n,w=i>n,c=s>n);let p=g+w+c,d,u,r,l,I,C;return p===1?g?(d=(n-o)/(i-o),u=(n-o)/(s-o),e.push(1),e.push(2),u!==1&&(e.push(-1),e.push(0),e.push(2),e.push(u)),d!==1&&(e.push(-1),e.push(0),e.push(1),e.push(d))):w?(r=(n-i)/(s-i),l=(n-i)/(o-i),e.push(2),e.push(0),l!==1&&(e.push(-1),e.push(1),e.push(0),e.push(l)),r!==1&&(e.push(-1),e.push(1),e.push(2),e.push(r))):c&&(I=(n-s)/(o-s),C=(n-s)/(i-s),e.push(0),e.push(1),C!==1&&(e.push(-1),e.push(2),e.push(1),e.push(C)),I!==1&&(e.push(-1),e.push(2),e.push(0),e.push(I))):p===2?!g&&o!==n?(l=(n-i)/(o-i),I=(n-s)/(o-s),e.push(0),e.push(-1),e.push(1),e.push(0),e.push(l),e.push(-1),e.push(2),e.push(0),e.push(I)):!w&&i!==n?(C=(n-s)/(i-s),d=(n-o)/(i-o),e.push(1),e.push(-1),e.push(2),e.push(1),e.push(C),e.push(-1),e.push(0),e.push(1),e.push(d)):!c&&s!==n&&(u=(n-o)/(s-o),r=(n-i)/(s-i),e.push(2),e.push(-1),e.push(0),e.push(2),e.push(u),e.push(-1),e.push(1),e.push(2),e.push(r)):p!==3&&(e.push(0),e.push(1),e.push(2)),e};ne.computeBarycentricCoordinates=function(n,h,o,i,s,e,g,w,c){if(!f(n))throw new V("x is required.");if(!f(h))throw new V("y is required.");if(!f(o))throw new V("x1 is required.");if(!f(i))throw new V("y1 is required.");if(!f(s))throw new V("x2 is required.");if(!f(e))throw new V("y2 is required.");if(!f(g))throw new V("x3 is required.");if(!f(w))throw new V("y3 is required.");let p=o-g,d=g-s,u=e-w,r=i-w,l=1/(u*p+d*r),I=h-w,C=n-g,R=(u*C+d*I)*l,O=(-r*C+p*I)*l,W=1-R-O;return f(c)?(c.x=R,c.y=O,c.z=W,c):new A(R,O,W)};ne.computeLineSegmentLineSegmentIntersection=function(n,h,o,i,s,e,g,w,c){q.typeOf.number("x00",n),q.typeOf.number("y00",h),q.typeOf.number("x01",o),q.typeOf.number("y01",i),q.typeOf.number("x10",s),q.typeOf.number("y10",e),q.typeOf.number("x11",g),q.typeOf.number("y11",w);let p=(g-s)*(h-e)-(w-e)*(n-s),d=(o-n)*(h-e)-(i-h)*(n-s),u=(w-e)*(o-n)-(g-s)*(i-h);if(u===0)return;let r=p/u,l=d/u;if(r>=0&&r<=1&&l>=0&&l<=1)return f(c)||(c=new Z),c.x=n+r*(o-n),c.y=h+r*(i-h),c};var ie=ne;var a=32767,z=a/2|0,Me=[],ze=[],Xe=[],te=new Ie,E=new A,Ke=[],We=[],Ye=[],Le=[],_e=[],Je=new A,Qe=new de,Ze=new ue,Ge=new Z,$e=new A;function je(n,h){let o=n.isEastChild,i=n.isNorthChild,s=o?z:0,e=o?a:z,g=i?z:0,w=i?a:z,c=Ke,p=We,d=Ye,u=_e;c.length=0,p.length=0,d.length=0,u.length=0;let r=Le;r.length=0;let l={},I=n.vertices,C=n.indices;C=C.subarray(0,n.indexCountWithoutSkirts);let R=Ne.clone(n.encoding),O=R.hasVertexNormals,W=0,Y=n.vertexCountWithoutSkirts,se=n.minimumHeight,ae=n.maximumHeight,D=new Array(Y),G=new Array(Y),L=new Array(Y),F=O?new Array(Y*2):void 0,$=20,H,t,k,x,y;for(t=0,k=0;t<Y;++t,k+=2){let v=R.decodeTextureCoordinates(I,t,Ge);if(H=R.decodeHeight(I,t),x=N.clamp(v.x*a|0,0,a),y=N.clamp(v.y*a|0,0,a),L[t]=N.clamp((H-se)/(ae-se)*a|0,0,a),x<$&&(x=0),y<$&&(y=0),a-x<$&&(x=a),a-y<$&&(y=a),D[t]=x,G[t]=y,O){let Q=R.getOctEncodedNormal(I,t,$e);F[k]=Q.x,F[k+1]=Q.y}(o&&x>=z||!o&&x<=z)&&(i&&y>=z||!i&&y<=z)&&(l[t]=W,c.push(x),p.push(y),d.push(L[t]),O&&(u.push(F[k]),u.push(F[k+1])),++W)}let T=[];T.push(new m),T.push(new m),T.push(new m);let B=[];B.push(new m),B.push(new m),B.push(new m);let b,j;for(t=0;t<C.length;t+=3){let v=C[t],Q=C[t+1],Be=C[t+2],De=D[v],Fe=D[Q],ke=D[Be];T[0].initializeIndexed(D,G,L,F,v),T[1].initializeIndexed(D,G,L,F,Q),T[2].initializeIndexed(D,G,L,F,Be);let P=ie.clipTriangleAtAxisAlignedThreshold(z,o,De,Fe,ke,Me);b=0,!(b>=P.length)&&(b=B[0].initializeFromClipResult(P,b,T),!(b>=P.length)&&(b=B[1].initializeFromClipResult(P,b,T),!(b>=P.length)&&(b=B[2].initializeFromClipResult(P,b,T),j=ie.clipTriangleAtAxisAlignedThreshold(z,i,B[0].getV(),B[1].getV(),B[2].getV(),ze),Oe(c,p,d,u,r,l,j,B,O),b<P.length&&(B[2].clone(B[1]),B[2].initializeFromClipResult(P,b,T),j=ie.clipTriangleAtAxisAlignedThreshold(z,i,B[0].getV(),B[1].getV(),B[2].getV(),ze),Oe(c,p,d,u,r,l,j,B,O)))))}let He=o?-a:0,qe=i?-a:0,me=[],ge=[],le=[],we=[],U=Number.MAX_VALUE,_=-U,M=Xe;M.length=0;let re=Ce.clone(n.ellipsoid),J=Se.clone(n.childRectangle),Ee=J.north,Re=J.south,ce=J.east,xe=J.west;for(ce<xe&&(ce+=N.TWO_PI),t=0;t<c.length;++t)x=Math.round(c[t]),x<=s?(me.push(t),x=0):x>=e?(le.push(t),x=a):x=x*2+He,c[t]=x,y=Math.round(p[t]),y<=g?(ge.push(t),y=0):y>=w?(we.push(t),y=a):y=y*2+qe,p[t]=y,H=N.lerp(se,ae,d[t]/a),H<U&&(U=H),H>_&&(_=H),d[t]=H,te.longitude=N.lerp(xe,ce,x/a),te.latitude=N.lerp(Re,Ee,y/a),te.height=H,re.cartographicToCartesian(te,E),M.push(E.x),M.push(E.y),M.push(E.z);let he=de.fromVertices(M,A.ZERO,3,Qe),Ue=ue.fromRectangle(J,U,_,re,Ze),ve=new be(re).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(he.center,M,3,he.center,U,Je),Pe=_-U,X=new Uint16Array(c.length+p.length+d.length);for(t=0;t<c.length;++t)X[t]=c[t];let fe=c.length;for(t=0;t<p.length;++t)X[fe+t]=p[t];for(fe+=p.length,t=0;t<d.length;++t)X[fe+t]=a*(d[t]-U)/Pe;let pe=Ve.createTypedArray(c.length,r),ye;if(O){let v=new Uint8Array(u);h.push(X.buffer,pe.buffer,v.buffer),ye=v.buffer}else h.push(X.buffer,pe.buffer);return{vertices:X.buffer,encodedNormals:ye,indices:pe.buffer,minimumHeight:U,maximumHeight:_,westIndices:me,southIndices:ge,eastIndices:le,northIndices:we,boundingSphere:he,orientedBoundingBox:Ue,horizonOcclusionPoint:ve}}function m(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}m.prototype.clone=function(n){return f(n)||(n=new m),n.uBuffer=this.uBuffer,n.vBuffer=this.vBuffer,n.heightBuffer=this.heightBuffer,n.normalBuffer=this.normalBuffer,n.index=this.index,n.first=this.first,n.second=this.second,n.ratio=this.ratio,n};m.prototype.initializeIndexed=function(n,h,o,i,s){this.uBuffer=n,this.vBuffer=h,this.heightBuffer=o,this.normalBuffer=i,this.index=s,this.first=void 0,this.second=void 0,this.ratio=void 0};m.prototype.initializeFromClipResult=function(n,h,o){let i=h+1;return n[h]!==-1?o[n[h]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=o[n[i]],++i,this.second=o[n[i]],++i,this.ratio=n[i],++i),i};m.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})};m.prototype.isIndexed=function(){return f(this.index)};m.prototype.getH=function(){return f(this.index)?this.heightBuffer[this.index]:N.lerp(this.first.getH(),this.second.getH(),this.ratio)};m.prototype.getU=function(){return f(this.index)?this.uBuffer[this.index]:N.lerp(this.first.getU(),this.second.getU(),this.ratio)};m.prototype.getV=function(){return f(this.index)?this.vBuffer[this.index]:N.lerp(this.first.getV(),this.second.getV(),this.ratio)};var K=new Z,oe=-1,en=[new A,new A],nn=[new A,new A];function Te(n,h){++oe;let o=en[oe],i=nn[oe];return o=ee.octDecode(n.first.getNormalX(),n.first.getNormalY(),o),i=ee.octDecode(n.second.getNormalX(),n.second.getNormalY(),i),E=A.lerp(o,i,n.ratio,E),A.normalize(E,E),ee.octEncode(E,h),--oe,h}m.prototype.getNormalX=function(){return f(this.index)?this.normalBuffer[this.index*2]:(K=Te(this,K),K.x)};m.prototype.getNormalY=function(){return f(this.index)?this.normalBuffer[this.index*2+1]:(K=Te(this,K),K.y)};var S=[];S.push(new m);S.push(new m);S.push(new m);S.push(new m);function Oe(n,h,o,i,s,e,g,w,c){if(g.length===0)return;let p=0,d=0;for(;d<g.length;)d=S[p++].initializeFromClipResult(g,d,w);for(let u=0;u<p;++u){let r=S[u];if(r.isIndexed())r.newIndex=e[r.index],r.uBuffer=n,r.vBuffer=h,r.heightBuffer=o,c&&(r.normalBuffer=i);else{let l=r.getKey();if(f(e[l]))r.newIndex=e[l];else{let I=n.length;n.push(r.getU()),h.push(r.getV()),o.push(r.getH()),c&&(i.push(r.getNormalX()),i.push(r.getNormalY())),r.newIndex=I,e[l]=I}}}p===3?(s.push(S[0].newIndex),s.push(S[1].newIndex),s.push(S[2].newIndex)):p===4&&(s.push(S[0].newIndex),s.push(S[1].newIndex),s.push(S[2].newIndex),s.push(S[0].newIndex),s.push(S[2].newIndex),s.push(S[3].newIndex))}var An=Ae(je);export{An as default};
import{a as be,b as Ne}from"./chunk-FNJ2A2P5.js";import{a as Ae}from"./chunk-6MN6BBPN.js";import{a as ue}from"./chunk-W5L3OOEF.js";import{a as ee}from"./chunk-EZRSLM27.js";import"./chunk-TBSK33NR.js";import"./chunk-LSAUAD4X.js";import"./chunk-AIYLFSI3.js";import"./chunk-FBQDLPON.js";import{a as Ve}from"./chunk-563CJZT3.js";import{d as de}from"./chunk-ZPW6H6BB.js";import{i as Se}from"./chunk-HMXXHGCW.js";import"./chunk-NFDMGE7Q.js";import{b as A,c as Ie,d as Z,e as Ce}from"./chunk-VDZXURWO.js";import{a as N}from"./chunk-UEFEFMYS.js";import"./chunk-YGIPMXAD.js";import"./chunk-PZ34T7DL.js";import"./chunk-5HWP5DW7.js";import{a as V,b as q}from"./chunk-3K67FZLU.js";import{e as f}from"./chunk-55TU6MJR.js";var ne={};ne.clipTriangleAtAxisAlignedThreshold=function(n,h,o,i,s,e){if(!f(n))throw new V("threshold is required.");if(!f(h))throw new V("keepAbove is required.");if(!f(o))throw new V("u0 is required.");if(!f(i))throw new V("u1 is required.");if(!f(s))throw new V("u2 is required.");f(e)?e.length=0:e=[];let g,w,c;h?(g=o<n,w=i<n,c=s<n):(g=o>n,w=i>n,c=s>n);let p=g+w+c,d,u,r,l,I,C;return p===1?g?(d=(n-o)/(i-o),u=(n-o)/(s-o),e.push(1),e.push(2),u!==1&&(e.push(-1),e.push(0),e.push(2),e.push(u)),d!==1&&(e.push(-1),e.push(0),e.push(1),e.push(d))):w?(r=(n-i)/(s-i),l=(n-i)/(o-i),e.push(2),e.push(0),l!==1&&(e.push(-1),e.push(1),e.push(0),e.push(l)),r!==1&&(e.push(-1),e.push(1),e.push(2),e.push(r))):c&&(I=(n-s)/(o-s),C=(n-s)/(i-s),e.push(0),e.push(1),C!==1&&(e.push(-1),e.push(2),e.push(1),e.push(C)),I!==1&&(e.push(-1),e.push(2),e.push(0),e.push(I))):p===2?!g&&o!==n?(l=(n-i)/(o-i),I=(n-s)/(o-s),e.push(0),e.push(-1),e.push(1),e.push(0),e.push(l),e.push(-1),e.push(2),e.push(0),e.push(I)):!w&&i!==n?(C=(n-s)/(i-s),d=(n-o)/(i-o),e.push(1),e.push(-1),e.push(2),e.push(1),e.push(C),e.push(-1),e.push(0),e.push(1),e.push(d)):!c&&s!==n&&(u=(n-o)/(s-o),r=(n-i)/(s-i),e.push(2),e.push(-1),e.push(0),e.push(2),e.push(u),e.push(-1),e.push(1),e.push(2),e.push(r)):p!==3&&(e.push(0),e.push(1),e.push(2)),e};ne.computeBarycentricCoordinates=function(n,h,o,i,s,e,g,w,c){if(!f(n))throw new V("x is required.");if(!f(h))throw new V("y is required.");if(!f(o))throw new V("x1 is required.");if(!f(i))throw new V("y1 is required.");if(!f(s))throw new V("x2 is required.");if(!f(e))throw new V("y2 is required.");if(!f(g))throw new V("x3 is required.");if(!f(w))throw new V("y3 is required.");let p=o-g,d=g-s,u=e-w,r=i-w,l=1/(u*p+d*r),I=h-w,C=n-g,R=(u*C+d*I)*l,O=(-r*C+p*I)*l,W=1-R-O;return f(c)?(c.x=R,c.y=O,c.z=W,c):new A(R,O,W)};ne.computeLineSegmentLineSegmentIntersection=function(n,h,o,i,s,e,g,w,c){q.typeOf.number("x00",n),q.typeOf.number("y00",h),q.typeOf.number("x01",o),q.typeOf.number("y01",i),q.typeOf.number("x10",s),q.typeOf.number("y10",e),q.typeOf.number("x11",g),q.typeOf.number("y11",w);let p=(g-s)*(h-e)-(w-e)*(n-s),d=(o-n)*(h-e)-(i-h)*(n-s),u=(w-e)*(o-n)-(g-s)*(i-h);if(u===0)return;let r=p/u,l=d/u;if(r>=0&&r<=1&&l>=0&&l<=1)return f(c)||(c=new Z),c.x=n+r*(o-n),c.y=h+r*(i-h),c};var ie=ne;var a=32767,z=a/2|0,Me=[],ze=[],Xe=[],te=new Ie,E=new A,Ke=[],We=[],Ye=[],Le=[],_e=[],Je=new A,Qe=new de,Ze=new ue,Ge=new Z,$e=new A;function je(n,h){let o=n.isEastChild,i=n.isNorthChild,s=o?z:0,e=o?a:z,g=i?z:0,w=i?a:z,c=Ke,p=We,d=Ye,u=_e;c.length=0,p.length=0,d.length=0,u.length=0;let r=Le;r.length=0;let l={},I=n.vertices,C=n.indices;C=C.subarray(0,n.indexCountWithoutSkirts);let R=Ne.clone(n.encoding),O=R.hasVertexNormals,W=0,Y=n.vertexCountWithoutSkirts,se=n.minimumHeight,ae=n.maximumHeight,D=new Array(Y),G=new Array(Y),L=new Array(Y),F=O?new Array(Y*2):void 0,$=20,H,t,k,x,y;for(t=0,k=0;t<Y;++t,k+=2){let v=R.decodeTextureCoordinates(I,t,Ge);if(H=R.decodeHeight(I,t),x=N.clamp(v.x*a|0,0,a),y=N.clamp(v.y*a|0,0,a),L[t]=N.clamp((H-se)/(ae-se)*a|0,0,a),x<$&&(x=0),y<$&&(y=0),a-x<$&&(x=a),a-y<$&&(y=a),D[t]=x,G[t]=y,O){let Q=R.getOctEncodedNormal(I,t,$e);F[k]=Q.x,F[k+1]=Q.y}(o&&x>=z||!o&&x<=z)&&(i&&y>=z||!i&&y<=z)&&(l[t]=W,c.push(x),p.push(y),d.push(L[t]),O&&(u.push(F[k]),u.push(F[k+1])),++W)}let T=[];T.push(new m),T.push(new m),T.push(new m);let B=[];B.push(new m),B.push(new m),B.push(new m);let b,j;for(t=0;t<C.length;t+=3){let v=C[t],Q=C[t+1],Be=C[t+2],De=D[v],Fe=D[Q],ke=D[Be];T[0].initializeIndexed(D,G,L,F,v),T[1].initializeIndexed(D,G,L,F,Q),T[2].initializeIndexed(D,G,L,F,Be);let P=ie.clipTriangleAtAxisAlignedThreshold(z,o,De,Fe,ke,Me);b=0,!(b>=P.length)&&(b=B[0].initializeFromClipResult(P,b,T),!(b>=P.length)&&(b=B[1].initializeFromClipResult(P,b,T),!(b>=P.length)&&(b=B[2].initializeFromClipResult(P,b,T),j=ie.clipTriangleAtAxisAlignedThreshold(z,i,B[0].getV(),B[1].getV(),B[2].getV(),ze),Oe(c,p,d,u,r,l,j,B,O),b<P.length&&(B[2].clone(B[1]),B[2].initializeFromClipResult(P,b,T),j=ie.clipTriangleAtAxisAlignedThreshold(z,i,B[0].getV(),B[1].getV(),B[2].getV(),ze),Oe(c,p,d,u,r,l,j,B,O)))))}let He=o?-a:0,qe=i?-a:0,me=[],ge=[],le=[],we=[],U=Number.MAX_VALUE,_=-U,M=Xe;M.length=0;let re=Ce.clone(n.ellipsoid),J=Se.clone(n.childRectangle),Ee=J.north,Re=J.south,ce=J.east,xe=J.west;for(ce<xe&&(ce+=N.TWO_PI),t=0;t<c.length;++t)x=Math.round(c[t]),x<=s?(me.push(t),x=0):x>=e?(le.push(t),x=a):x=x*2+He,c[t]=x,y=Math.round(p[t]),y<=g?(ge.push(t),y=0):y>=w?(we.push(t),y=a):y=y*2+qe,p[t]=y,H=N.lerp(se,ae,d[t]/a),H<U&&(U=H),H>_&&(_=H),d[t]=H,te.longitude=N.lerp(xe,ce,x/a),te.latitude=N.lerp(Re,Ee,y/a),te.height=H,re.cartographicToCartesian(te,E),M.push(E.x),M.push(E.y),M.push(E.z);let he=de.fromVertices(M,A.ZERO,3,Qe),Ue=ue.fromRectangle(J,U,_,re,Ze),ve=new be(re).computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid(he.center,M,3,he.center,U,Je),Pe=_-U,X=new Uint16Array(c.length+p.length+d.length);for(t=0;t<c.length;++t)X[t]=c[t];let fe=c.length;for(t=0;t<p.length;++t)X[fe+t]=p[t];for(fe+=p.length,t=0;t<d.length;++t)X[fe+t]=a*(d[t]-U)/Pe;let pe=Ve.createTypedArray(c.length,r),ye;if(O){let v=new Uint8Array(u);h.push(X.buffer,pe.buffer,v.buffer),ye=v.buffer}else h.push(X.buffer,pe.buffer);return{vertices:X.buffer,encodedNormals:ye,indices:pe.buffer,minimumHeight:U,maximumHeight:_,westIndices:me,southIndices:ge,eastIndices:le,northIndices:we,boundingSphere:he,orientedBoundingBox:Ue,horizonOcclusionPoint:ve}}function m(){this.vertexBuffer=void 0,this.index=void 0,this.first=void 0,this.second=void 0,this.ratio=void 0}m.prototype.clone=function(n){return f(n)||(n=new m),n.uBuffer=this.uBuffer,n.vBuffer=this.vBuffer,n.heightBuffer=this.heightBuffer,n.normalBuffer=this.normalBuffer,n.index=this.index,n.first=this.first,n.second=this.second,n.ratio=this.ratio,n};m.prototype.initializeIndexed=function(n,h,o,i,s){this.uBuffer=n,this.vBuffer=h,this.heightBuffer=o,this.normalBuffer=i,this.index=s,this.first=void 0,this.second=void 0,this.ratio=void 0};m.prototype.initializeFromClipResult=function(n,h,o){let i=h+1;return n[h]!==-1?o[n[h]].clone(this):(this.vertexBuffer=void 0,this.index=void 0,this.first=o[n[i]],++i,this.second=o[n[i]],++i,this.ratio=n[i],++i),i};m.prototype.getKey=function(){return this.isIndexed()?this.index:JSON.stringify({first:this.first.getKey(),second:this.second.getKey(),ratio:this.ratio})};m.prototype.isIndexed=function(){return f(this.index)};m.prototype.getH=function(){return f(this.index)?this.heightBuffer[this.index]:N.lerp(this.first.getH(),this.second.getH(),this.ratio)};m.prototype.getU=function(){return f(this.index)?this.uBuffer[this.index]:N.lerp(this.first.getU(),this.second.getU(),this.ratio)};m.prototype.getV=function(){return f(this.index)?this.vBuffer[this.index]:N.lerp(this.first.getV(),this.second.getV(),this.ratio)};var K=new Z,oe=-1,en=[new A,new A],nn=[new A,new A];function Te(n,h){++oe;let o=en[oe],i=nn[oe];return o=ee.octDecode(n.first.getNormalX(),n.first.getNormalY(),o),i=ee.octDecode(n.second.getNormalX(),n.second.getNormalY(),i),E=A.lerp(o,i,n.ratio,E),A.normalize(E,E),ee.octEncode(E,h),--oe,h}m.prototype.getNormalX=function(){return f(this.index)?this.normalBuffer[this.index*2]:(K=Te(this,K),K.x)};m.prototype.getNormalY=function(){return f(this.index)?this.normalBuffer[this.index*2+1]:(K=Te(this,K),K.y)};var S=[];S.push(new m);S.push(new m);S.push(new m);S.push(new m);function Oe(n,h,o,i,s,e,g,w,c){if(g.length===0)return;let p=0,d=0;for(;d<g.length;)d=S[p++].initializeFromClipResult(g,d,w);for(let u=0;u<p;++u){let r=S[u];if(r.isIndexed())r.newIndex=e[r.index],r.uBuffer=n,r.vBuffer=h,r.heightBuffer=o,c&&(r.normalBuffer=i);else{let l=r.getKey();if(f(e[l]))r.newIndex=e[l];else{let I=n.length;n.push(r.getU()),h.push(r.getV()),o.push(r.getH()),c&&(i.push(r.getNormalX()),i.push(r.getNormalY())),r.newIndex=I,e[l]=I}}}p===3?(s.push(S[0].newIndex),s.push(S[1].newIndex),s.push(S[2].newIndex)):p===4&&(s.push(S[0].newIndex),s.push(S[1].newIndex),s.push(S[2].newIndex),s.push(S[0].newIndex),s.push(S[2].newIndex),s.push(S[3].newIndex))}var An=Ae(je);export{An as default};
public/CimSDK/index.cjs
ÎļþÌ«´ó
public/CimSDK/index.js
ÎļþÌ«´ó
public/json/110000.geo copy.json
src/api/trApi.js
@@ -4,15 +4,15 @@
export async function getRegionData(params = {}) {
  try {
    const defaultParams = {
      id: undefined,
      name: undefined,
      type: undefined,
      pageNum: 1,
      pageSize: 100000
      id: undefined,
      name: undefined,
      type: undefined,
      pageNum: 1,
      pageSize: 100000,
    };
    const finalParams = { ...defaultParams, ...params };
    const response = await instance.get('/region/selectPage', {
      params: finalParams
    const response = await instance.get("/region/selectPage", {
      params: finalParams,
    });
    return response.data;
  } catch (error) {
@@ -53,8 +53,56 @@
    const res = await instance.delete(`/simu/deleteByIds?ids=${ids}`);
    return res.data;
  } catch (error) {
    console.error('Error deleting simulation data:', error);
    console.error("Error deleting simulation data:", error);
    throw error;
  }
}
// èŽ·å–
// **************************************************************************************************************
// è§£æžjson获取泥石流参数
export function parseWaterSimulationData(jsonData) {
  try {
      const startTime = jsonData.duration.start; // ç›´æŽ¥ä½¿ç”¨åŽŸå§‹æ—¶é—´
      const endTime = jsonData.duration.end; // ç›´æŽ¥ä½¿ç”¨åŽŸå§‹æ—¶é—´
      const extension = jsonData.extension;
      const terrainSizes = jsonData.terrain.size; // åˆ†è¾¨çއ
      const waterTimestamps = jsonData.waters.data.map((timestamp) => {
          return timestamp; // ä¸è¿›è¡Œæ—¶é—´æ ¼å¼åŒ–
      });
      return {
          startTime: startTime, // åŽŸå§‹æ—¶é—´
          endTime: endTime, // åŽŸå§‹æ—¶é—´
          extension: {
              maxHeight: extension.maxHeight,
              minHeight: extension.minHeight,
              maxX: extension.maxx,
              maxY: extension.maxy,
              minX: extension.minx,
              minY: extension.miny,
          },
          terrainSizes: terrainSizes,
          flowUrl: jsonData.flowUrl,
          waterUrl: jsonData.waterUrl,
          version: jsonData.version,
          waterTimestamps: waterTimestamps, // åŽŸå§‹æ—¶é—´æ•°ç»„
      };
  } catch (error) {
      console.error("解析水模拟数据时出错:", error);
      return null;
  }
}
// é€šè¿‡æŽ¥å£åŽ»è¯·æ±‚json,将请求的json解析获取泥石流参数
export async function fetchWaterSimulationData() {
  try {
    const response = await fetch("/simu/c2h1dc/layer.json"); // å‘起请求
    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }
    const jsonData = await response.json(); // è§£æž JSON æ•°æ®
    return parseWaterSimulationData(jsonData); // è°ƒç”¨è§£æžå‡½æ•°
  } catch (error) {
    console.error("请求或解析数据时出错:", error);
    return null;
  }
}
// **************************************************************************************************************
src/components/menu/TimeLine copy.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,468 @@
<template>
  <div class="timeline-container">
    <div class="controls">
      <div class="control-btn" @click="skipBackward">
        <img
          src="@/assets/img/timeline/left.png"
          class="fas fa-step-backward"
        />
      </div>
      <div class="control-btn play-btn" @click="togglePlay">
        <img v-show="isPlaying" src="@/assets/img/timeline/stop.png" />
        <img v-show="!isPlaying" src="@/assets/img/timeline/start.png" />
      </div>
      <div class="control-btn" @click="skipForward">
        <img
          src="@/assets/img/timeline/right.png"
          class="fas fa-step-forward"
        />
      </div>
      <div class="speed-control">
        <div @click="toggleSpeedMenu">{{ playbackRate }}X</div>
        <div class="speed-menu" v-show="showSpeedMenu">
          <div
            v-for="rate in playbackRates"
            :key="rate"
            @click.capture="setPlaybackRate(rate)"
            :class="{ active: playbackRate === rate }"
          >
            {{ rate }}X
          </div>
        </div>
      </div>
    </div>
    <div class="timeline">
      <div class="dates">
        <div
          v-for="(date, index) in visibleDates"
          :key="index"
          class="date-label"
        >
          {{ formatDate(date) }}
        </div>
      </div>
      <div class="timeline-track" ref="timelineTrack" @click="seekToPosition">
        <div
          class="timeline-progress"
          :style="{ width: progressPercentage + '%' }"
        ></div>
        <div
          class="timeline-cursor"
          :style="{ left: progressPercentage + '%' }"
        ></div>
        <div class="time-markers">
          <div
            v-for="(time, index) in timeMarkers"
            :key="index"
            class="time-marker"
          >
            {{ time }}
          </div>
        </div>
      </div>
    </div>
    <el-button @click="handleBack" style="margin-top: 26px;margin-left: 30px;margin-right: 10px;">结束模拟</el-button>
  </div>
</template>
<script setup>
import {
  ref,
  computed,
  onUnmounted,
  onMounted,
  watch,
  defineProps,
  onBeforeUnmount,
  inject,
} from "vue";
import dayjs from "dayjs";
import { createWaterPrimitive, destoryWaterPrimitive } from "@/utils/water";
import { getRainfall } from "@/api/index";
import { EventBus } from "@/eventBus"; // å¼•入事件总线
import { ElMessage } from 'element-plus'
const props = defineProps({
  waterSimulateParams: {
    type: Object,
    default: () => ({
      date: ["2025-02-14T16:00:00.000Z", "2025-02-15T16:00:00.000Z"],
    }),
  },
});
// å“åº”式状态
const isPlaying = ref(false);
const playbackFinished = ref(true);
const currentTime = ref(0);
// const duration = ref(86400); // ä¸€å¤©çš„ç§’æ•°
const duration = ref(470); // ä¸€å¤©çš„ç§’æ•°
const playbackRate = ref(1);
const playbackRates = ref([1, 2, 4, 8]);
const showSpeedMenu = ref(false);
const timeMarkers = ref([
  "00:00",
  "03:19",
  "06:39",
  "09:59",
  "13:19",
  "16:39",
  "19:59",
  "23:19",
]);
const timelineTrack = ref(null);
const startDate = computed(() => {
  return dayjs(props.waterSimulateParams.date[0]);
});
const endDate = computed(() => {
  return dayjs(props.waterSimulateParams.date[1]);
});
let playInterval = null;
// è®¡ç®—属性
const progressPercentage = computed(() => {
  return (currentTime.value / duration.value) * 100;
});
const visibleDates = computed(() => {
  // ç”Ÿæˆæ—¶é—´è½´ä¸Šæ˜¾ç¤ºçš„æ—¥æœŸ
  const dates = [];
  const currentDateValue = dayjs(startDate.value);
  const endDateValue = dayjs(endDate.value);
  // let tempDate = currentDateValue
  // while (tempDate.isSame(endDateValue) || tempDate.isBefore(endDateValue)) {
  //   dates.push(tempDate.toDate())
  //   tempDate = tempDate.add(1, 'day')
  // }
  return [currentDateValue, endDateValue];
});
const currentTimeFormatted = computed(() => {
  return formatTime(currentTime.value);
});
const togglePlay = () => {
  // å¦‚果当前是停止状态且已经播放完毕,点击时重置时间
  if (!isPlaying.value && currentTime.value >= duration.value) {
    currentTime.value = 0;
    emit("timeUpdate", progressPercentage.value);
    // earthCtrl.environment.disableEffect("rain");
  }
  isPlaying.value = !isPlaying.value;
  emit("isPlaying", isPlaying.value);
  if (isPlaying.value) {
    startPlayback();
    // å¦‚果是从头开始播放
    if (currentTime.value === 0) {
      emit("playbackFinished", false);
    }
  } else {
    stopPlayback();
  }
};
const startPlayback = () => {
  // earthCtrl.environment.showEffect("rain");
  clearInterval(playInterval);
  playInterval = setInterval(() => {
    currentTime.value += 600 * playbackRate.value;
    // emit("playbackFinished", true);
    if (currentTime.value >= duration.value) {
      emit("playbackFinished", false);
      currentTime.value = duration.value; // åœåœ¨æœ€åŽä¸€å¸§
      stopPlayback(); // åœæ­¢æ’­æ”¾
      isPlaying.value = false; // æ›´æ–°æ’­æ”¾çŠ¶æ€
      emit("isPlaying", isPlaying.value); // é€šçŸ¥æ’­æ”¾çŠ¶æ€å˜åŒ–
      emit("playbackFinished", true); // é€šçŸ¥æ’­æ”¾å®Œæˆ
      emit("timeUpdate", progressPercentage.value); // æ›´æ–°è¿›åº¦æ¡ä½ç½®
    }
    emit("timeUpdate", progressPercentage.value);
  }, 1000);
};
const stopPlayback = () => {
  // earthCtrl.environment.disableEffect("rain");
  clearInterval(playInterval);
};
const skipForward = () => {
  // å‘前跳转10分钟
  currentTime.value = Math.min(currentTime.value + 600, duration.value);
  emit("timeUpdate", progressPercentage.value);
};
const skipBackward = () => {
  // å‘后跳转10分钟
  currentTime.value = Math.max(currentTime.value - 600, 0);
  emit("timeUpdate", progressPercentage.value);
};
const toggleSpeedMenu = () => {
  showSpeedMenu.value = !showSpeedMenu.value;
};
const setPlaybackRate = (rate) => {
  playbackRate.value = rate;
  showSpeedMenu.value = false;
  if (isPlaying.value) {
    stopPlayback();
    startPlayback();
  }
};
const formatTime = (seconds) => {
  const hours = Math.floor(seconds / 3600);
  const minutes = Math.floor((seconds % 3600) / 60);
  const secs = Math.floor(seconds % 60);
  return `${hours.toString().padStart(2, "0")}:${minutes
    .toString()
    .padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
};
const formatDate = (date) => {
  return dayjs(date).format("YYYY-MM-DD");
};
const seekToPosition = (event) => {
  const rect = timelineTrack.value.getBoundingClientRect();
  const clickPosition = event.clientX - rect.left;
  const percentage = clickPosition / rect.width;
  currentTime.value = percentage * duration.value;
  emit("timeUpdate", progressPercentage.value);
};
const rainFallData = ref([]);
function getRainfallData() {
  getRainfall().then((res) => {
    // rainFallData.value = res.data.map(item => {
    //   return dayjs(item.time).format("HH:mm")
    // })
    // const rainfallData = res.data.map(item => {
    //   return item.rainfall
    // })
    rainFallData.value = res.data;
  });
}
let mockTimer = null;
let currentRainfall = ref(0.0001);
function randomMockWater() {
  let delay = (3 / playbackRate.value) * 1000;
  if (delay < 1000) {
    delay = 1000;
  }
  if (mockTimer) {
    clearImmediate(mockTimer);
    mockTimer = null;
  }
  mockTimer = setTimeout(() => {
    const rainfall = rainFallData.value.find(
      (item) =>
        dayjs(item.time).format("HH:mm:ss") == currentTimeFormatted.value
    );
    if (rainfall && rainfall.total) {
      // console.log(rainfall.total);
      createWaterPrimitive(rainfall.total / 50000);
    }
  }, delay);
}
watch(
  () => currentTime.value,
  () => {
    randomMockWater();
  }
);
// å®šä¹‰ç»„件事件
const emit = defineEmits(["timeUpdate", "isPlaying", "playbackFinished"]);
// åˆå§‹åŒ–时触发一次时间更新,确保父组件能获取初始时间
onMounted(() => {
  getRainfallData();
  emit("timeUpdate", progressPercentage.value);
});
onBeforeUnmount(() => {
  stopPlayback();
  let delay = (3 / playbackRate.value) * 1000;
  setTimeout(() => {
    destoryWaterPrimitive();
  }, delay);
});
const { startSimulate, endSimulate } = inject("simulateActions");
// è¿”回按钮点击事件
function handleBack() {
  ElMessage({
    message: '模拟进程正在关闭中...',
    type: 'success',
  })
  endSimulate();
  EventBus.emit("hide-schemeInfo");
}
</script>
<style scoped>
.timeline-container {
  display: flex;
  /* align-items: center; */
  justify-content: space-between;
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  width: 878px;
  height: 108px;
  /* background-color: #1a2634; */
  background: url("@/assets/img/menubar/bar.png");
  background-size: 100% 100%;
  color: white;
  /* border-radius: 8px; */
  font-family: Arial, sans-serif;
  padding: 0 25px;
}
.controls {
  display: flex;
  /* align-items: center; */
  margin: 25px 25px 10px 0;
}
.control-btn {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  margin-right: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  img {
    width: 100%;
    height: 100%;
  }
}
.control-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}
.play-btn {
  background-color: #4a90e2;
  width: 36px;
  height: 36px;
}
.speed-control {
  position: relative;
  cursor: pointer;
  /* padding: 5px 10px; */
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
}
.speed-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #2a3a4a;
  border-radius: 4px;
  z-index: 10;
  width: 60px;
}
.speed-menu div {
  padding: 5px 10px;
  text-align: center;
}
.speed-menu div:hover,
.speed-menu div.active {
  /* background-color: #4a90e2; */
  background-color: rgba(127, 255, 212, 0.5);
}
.timeline {
  margin-top: 20px;
  position: relative;
  flex: 1;
}
.dates {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}
.date-label {
  font-size: 14px;
  color: #fff;
}
.timeline-track {
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
}
.timeline-progress {
  height: 100%;
  background-color: #4a90e2;
  border-radius: 4px;
  position: absolute;
  top: 0;
  left: 0;
}
.timeline-cursor {
  width: 12px;
  height: 12px;
  background-color: white;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.time-markers {
  display: flex;
  justify-content: space-between;
  position: absolute;
  width: 100%;
  top: 15px;
  color: #fff;
}
.time-marker {
  font-size: 12px;
  color: #fff;
  transform: translateX(-50%);
}
</style>
src/components/menu/TimeLine.vue
@@ -2,30 +2,20 @@
  <div class="timeline-container">
    <div class="controls">
      <div class="control-btn" @click="skipBackward">
        <img
          src="@/assets/img/timeline/left.png"
          class="fas fa-step-backward"
        />
        <img src="@/assets/img/timeline/left.png" class="fas fa-step-backward" />
      </div>
      <div class="control-btn play-btn" @click="togglePlay">
        <img v-show="isPlaying" src="@/assets/img/timeline/stop.png" />
        <img v-show="!isPlaying" src="@/assets/img/timeline/start.png" />
      </div>
      <div class="control-btn" @click="skipForward">
        <img
          src="@/assets/img/timeline/right.png"
          class="fas fa-step-forward"
        />
        <img src="@/assets/img/timeline/right.png" class="fas fa-step-forward" />
      </div>
      <div class="speed-control">
        <div @click="toggleSpeedMenu">{{ playbackRate }}X</div>
        <div class="speed-menu" v-show="showSpeedMenu">
          <div
            v-for="rate in playbackRates"
            :key="rate"
            @click.capture="setPlaybackRate(rate)"
            :class="{ active: playbackRate === rate }"
          >
          <div v-for="rate in playbackRates" :key="rate" @click.capture="setPlaybackRate(rate)"
            :class="{ active: playbackRate === rate }">
            {{ rate }}X
          </div>
        </div>
@@ -34,29 +24,18 @@
    <div class="timeline">
      <div class="dates">
        <div
          v-for="(date, index) in visibleDates"
          :key="index"
          class="date-label"
        >
          {{ formatDate(date) }}
        <div class="current-date">
          å½“前播放时间:{{ currentPlayingTime }}
        </div>
        <div v-for="(date, index) in visibleDates" :key="index" class="date-label">
          <!-- {{ formatDate(date) }} -->
        </div>
      </div>
      <div class="timeline-track" ref="timelineTrack" @click="seekToPosition">
        <div
          class="timeline-progress"
          :style="{ width: progressPercentage + '%' }"
        ></div>
        <div
          class="timeline-cursor"
          :style="{ left: progressPercentage + '%' }"
        ></div>
        <div class="timeline-progress" :style="{ width: progressPercentage + '%' }"></div>
        <div class="timeline-cursor" :style="{ left: progressPercentage + '%' }"></div>
        <div class="time-markers">
          <div
            v-for="(time, index) in timeMarkers"
            :key="index"
            class="time-marker"
          >
          <div v-for="(time, index) in timeMarkers" :key="index" class="time-marker">
            {{ time }}
          </div>
        </div>
@@ -70,7 +49,6 @@
import {
  ref,
  computed,
  onUnmounted,
  onMounted,
  watch,
  defineProps,
@@ -79,11 +57,13 @@
} from "vue";
import dayjs from "dayjs";
import { createWaterPrimitive, destoryWaterPrimitive } from "@/utils/water";
import { getRainfall } from "@/api/index";
import { EventBus } from "@/eventBus"; // å¼•入事件总线
import { ElMessage } from 'element-plus'
import { fetchWaterSimulationData } from "@/api/trApi.js";
import { EventBus } from "@/eventBus";
import { ElMessage } from 'element-plus';
const emit = defineEmits(["timeUpdate", "isPlaying", "playbackFinished"]);
// å®šä¹‰props
const props = defineProps({
  waterSimulateParams: {
    type: Object,
@@ -92,229 +72,145 @@
    }),
  },
});
// å“åº”式状态
const currentPlayingTime = ref(""); // å½“前播放时间
const isPlaying = ref(false);
const playbackFinished = ref(true);
const currentTime = ref(0);
const duration = ref(86400); // ä¸€å¤©çš„ç§’æ•°
const playbackRate = ref(1);
const duration = ref(60); // ä¸€å¤©çš„ç§’æ•°
const playbackRate = ref(8);
const playbackRates = ref([1, 2, 4, 8]);
const showSpeedMenu = ref(false);
const timeMarkers = ref([
  "00:00",
  "03:19",
  "06:39",
  "09:59",
  "13:19",
  "16:39",
  "19:59",
  "23:19",
]);
const waterTimestamps = ref([]); // å­˜å‚¨æ—¶é—´è½´æ•°æ®
const timeMarkers = ref([]);
const timelineTrack = ref(null);
const startDate = computed(() => {
  return dayjs(props.waterSimulateParams.date[0]);
});
const endDate = computed(() => {
  return dayjs(props.waterSimulateParams.date[1]);
});
let playInterval = null;
// è®¡ç®—属性
const progressPercentage = computed(() => {
  return (currentTime.value / duration.value) * 100;
});
const startDate = computed(() => dayjs(props.waterSimulateParams.date[0]));
const endDate = computed(() => dayjs(props.waterSimulateParams.date[1]));
const progressPercentage = computed(() => (currentTime.value / duration.value) * 100);
const visibleDates = computed(() =>
  Array.from(
    new Set(waterTimestamps.value.map((ts) => dayjs(ts).format("YYYY-MM-DD")))
  ).map((date) => dayjs(date).toDate())
);
const currentTimeFormatted = computed(() => formatTime(currentTime.value));
const visibleDates = computed(() => {
  // ç”Ÿæˆæ—¶é—´è½´ä¸Šæ˜¾ç¤ºçš„æ—¥æœŸ
  const dates = [];
  const currentDateValue = dayjs(startDate.value);
  const endDateValue = dayjs(endDate.value);
  // let tempDate = currentDateValue
  // while (tempDate.isSame(endDateValue) || tempDate.isBefore(endDateValue)) {
  //   dates.push(tempDate.toDate())
  //   tempDate = tempDate.add(1, 'day')
  // }
  return [currentDateValue, endDateValue];
});
const currentTimeFormatted = computed(() => {
  return formatTime(currentTime.value);
});
// æ’­æ”¾æŽ§åˆ¶
const togglePlay = () => {
  // å¦‚果当前是停止状态且已经播放完毕,点击时重置时间
  if (!isPlaying.value && currentTime.value >= duration.value) {
    currentTime.value = 0;
    emit("timeUpdate", progressPercentage.value);
    // earthCtrl.environment.disableEffect("rain");
  }
  if (!isPlaying.value && currentTime.value >= duration.value) currentTime.value = 0;
  isPlaying.value = !isPlaying.value;
  emit("isPlaying", isPlaying.value);
  if (isPlaying.value) {
    startPlayback();
    // å¦‚果是从头开始播放
    if (currentTime.value === 0) {
      emit("playbackFinished", false);
    }
  } else {
    stopPlayback();
  }
    if (currentTime.value === 0) emit("playbackFinished", false);
  } else stopPlayback();
};
const intervalMap = {
  1: 1000, // 1倍速
  2: 500,  // 2倍速
  4: 250,  // 4倍速
  8: 125,  // 8倍速
};
const startPlayback = () => {
  // earthCtrl.environment.showEffect("rain");
  // æ ¹æ®å½“前倍速获取对应的 interval
  const interval = intervalMap[playbackRate.value] || 1000; // é»˜è®¤ä¸º1000
  // è°ƒç”¨ createWaterPrimitive å¹¶ä¼ é€’ interval
  createWaterPrimitive({ interval });
  clearInterval(playInterval);
  playInterval = setInterval(() => {
    currentTime.value += 600 * playbackRate.value;
    // emit("playbackFinished", true);
    // è®¡ç®—每次增加的时间量
    const timeIncrement = playbackRate.value; // å€é€Ÿç›´æŽ¥ä½œä¸ºå¢žé‡
    currentTime.value += timeIncrement;
    // å¦‚果超过总时长,则停止播放
    if (currentTime.value >= duration.value) {
      emit("playbackFinished", false);
      currentTime.value = duration.value; // åœåœ¨æœ€åŽä¸€å¸§
      stopPlayback(); // åœæ­¢æ’­æ”¾
      isPlaying.value = false; // æ›´æ–°æ’­æ”¾çŠ¶æ€
      emit("isPlaying", isPlaying.value); // é€šçŸ¥æ’­æ”¾çŠ¶æ€å˜åŒ–
      emit("playbackFinished", true); // é€šçŸ¥æ’­æ”¾å®Œæˆ
      emit("timeUpdate", progressPercentage.value); // æ›´æ–°è¿›åº¦æ¡ä½ç½®
      stopPlayback();
      isPlaying.value = false;
      emit("isPlaying", false);
      emit("playbackFinished", true);
    }
    // è§¦å‘时间更新事件
    emit("timeUpdate", progressPercentage.value);
  }, 1000);
  }, 1000); // æ¯ç§’更新一次
};
const stopPlayback = () => {
  // earthCtrl.environment.disableEffect("rain");
  clearInterval(playInterval);
};
const skipForward = () => {
  // å‘前跳转10分钟
  currentTime.value = Math.min(currentTime.value + 600, duration.value);
  emit("timeUpdate", progressPercentage.value);
};
const skipBackward = () => {
  // å‘后跳转10分钟
  currentTime.value = Math.max(currentTime.value - 600, 0);
  emit("timeUpdate", progressPercentage.value);
};
const toggleSpeedMenu = () => {
  showSpeedMenu.value = !showSpeedMenu.value;
};
const stopPlayback = () => clearInterval(playInterval);
const skipForward = () => (currentTime.value = Math.min(currentTime.value + 1, duration.value)); // å‘前跳转1秒
const skipBackward = () => (currentTime.value = Math.max(currentTime.value - 1, 0)); // å‘后跳转1秒
const toggleSpeedMenu = () => (showSpeedMenu.value = !showSpeedMenu.value);
const setPlaybackRate = (rate) => {
  playbackRate.value = rate;
  showSpeedMenu.value = false;
  if (isPlaying.value) {
    stopPlayback();
    startPlayback();
  }
  if (isPlaying.value) stopPlayback(), startPlayback(); // å¦‚果正在播放,则重新启动以应用新的速率
};
const formatTime = (seconds) => {
  const hours = Math.floor(seconds / 3600);
  const minutes = Math.floor((seconds % 3600) / 60);
  const secs = Math.floor(seconds % 60);
  return `${hours.toString().padStart(2, "0")}:${minutes
    .toString()
    .padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
};
const formatDate = (date) => {
  return dayjs(date).format("YYYY-MM-DD");
};
const seekToPosition = (event) => {
  const rect = timelineTrack.value.getBoundingClientRect();
  const clickPosition = event.clientX - rect.left;
  const percentage = clickPosition / rect.width;
  currentTime.value = percentage * duration.value;
  const percentage = (event.clientX - rect.left) / rect.width;
  currentTime.value = Math.round(percentage * duration.value);
  emit("timeUpdate", progressPercentage.value);
  if (waterTimestamps.value.length > 0) {
    const clickedTimestamp = dayjs(waterTimestamps.value[0]).add(currentTime.value, "second");
    console.log("Clicked timestamp:", clickedTimestamp.valueOf(), clickedTimestamp.format("YYYY-MM-DD HH:mm:ss"));
  }
};
const rainFallData = ref([]);
function getRainfallData() {
  getRainfall().then((res) => {
    // rainFallData.value = res.data.map(item => {
    //   return dayjs(item.time).format("HH:mm")
    // })
    // const rainfallData = res.data.map(item => {
    //   return item.rainfall
    // })
    rainFallData.value = res.data;
  });
}
let mockTimer = null;
let currentRainfall = ref(0.0001);
function randomMockWater() {
  let delay = (3 / playbackRate.value) * 1000;
  if (delay < 1000) {
    delay = 1000;
watch(() => currentTime.value, () => {
  if (waterTimestamps.value.length > 0) {
    currentPlayingTime.value = dayjs(waterTimestamps.value[0])
      .add(currentTime.value, "second")
      .format("YYYY-MM-DD mm:ss");
  }
  if (mockTimer) {
    clearImmediate(mockTimer);
    mockTimer = null;
  }
  mockTimer = setTimeout(() => {
    const rainfall = rainFallData.value.find(
      (item) =>
        dayjs(item.time).format("HH:mm:ss") == currentTimeFormatted.value
    );
    if (rainfall && rainfall.total) {
      // console.log(rainfall.total);
      createWaterPrimitive(rainfall.total / 50000);
    }
  }, delay);
}
watch(
  () => currentTime.value,
  () => {
    randomMockWater();
  }
);
// å®šä¹‰ç»„件事件
const emit = defineEmits(["timeUpdate", "isPlaying", "playbackFinished"]);
// åˆå§‹åŒ–时触发一次时间更新,确保父组件能获取初始时间
onMounted(() => {
  getRainfallData();
  emit("timeUpdate", progressPercentage.value);
});
// æ—¶é—´æ ‡è®°ç”Ÿæˆ
function generateTimeMarkers(timestamps) {
  if (!timestamps || timestamps.length === 0) return [];
  const sorted = [...timestamps].sort((a, b) => dayjs(a).diff(dayjs(b)));
  const interval = Math.floor(dayjs(sorted.at(-1)).diff(dayjs(sorted[0]), "second") / 7);
  return Array.from({ length: 8 }, (_, i) => dayjs(sorted[0]).add(i * interval, "second").format("mm:ss"));
}
watch(() => waterTimestamps.value, (newTimestamps) => {
  if (newTimestamps.length > 0) timeMarkers.value = generateTimeMarkers(newTimestamps);
}, { immediate: true });
onMounted(async () => {
  try {
    const { waterTimestamps: timestamps } = await fetchWaterSimulationData();
    if (timestamps) {
      waterTimestamps.value = timestamps;
      updateTimelineRange();
      timeMarkers.value = generateTimeMarkers(timestamps);
      currentPlayingTime.value = dayjs(timestamps[0]).format("YYYY-MM-DD HH:mm:ss");
    }
  } catch (error) {
    console.error("Error loading water simulation data:", error);
  }
});
function updateTimelineRange() {
  if (waterTimestamps.value.length > 0) {
    const [first, last] = [waterTimestamps.value[0], waterTimestamps.value.at(-1)];
    props.waterSimulateParams.date = [dayjs(first).toISOString(), dayjs(last).toISOString()];
    duration.value = dayjs(last).diff(dayjs(first), "second");
    console.log("Updated timeline range:", { ...props.waterSimulateParams, duration: duration.value });
  }
}
onBeforeUnmount(() => {
  stopPlayback();
  let delay = (3 / playbackRate.value) * 1000;
  setTimeout(() => {
    destoryWaterPrimitive();
  }, delay);
  destoryWaterPrimitive();
});
const { startSimulate, endSimulate } = inject("simulateActions");
// è¿”回按钮点击事件
const { endSimulate } = inject("simulateActions");
function handleBack() {
  ElMessage({
    message: '模拟进程正在关闭中...',
    type: 'success',
  })
  ElMessage({ message: '模拟进程正在关闭中...', type: 'success' }); // æ˜¾ç¤ºæ¶ˆæ¯é€šçŸ¥ç”¨æˆ·æ¨¡æ‹Ÿè¿›ç¨‹æ­£åœ¨å…³é—­
  endSimulate();
  destoryWaterPrimitive();
  EventBus.emit("hide-schemeInfo");
}
</script>
<style scoped>
.timeline-container {
  display: flex;
@@ -395,7 +291,7 @@
}
.speed-menu div {
  padding: 5px 10px;
  /* padding: 5px 5px; */
  text-align: center;
}
@@ -406,7 +302,7 @@
}
.timeline {
  margin-top: 20px;
  margin-top: 10px;
  position: relative;
  flex: 1;
}
@@ -460,8 +356,16 @@
}
.time-marker {
  margin-top: 5px;
  font-size: 12px;
  color: #fff;
  transform: translateX(-50%);
  transform: translateX(-20%);
}
.current-date {
  margin-bottom: 5px;
  font-size: 15px;
  color: #fff;
  transform: translateX(-3%);
}
</style>
src/components/menu/TimeLineδÓÅ»¯°æ±¾.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,524 @@
<template>
  <div class="timeline-container">
    <div class="controls">
      <div class="control-btn" @click="skipBackward">
        <img src="@/assets/img/timeline/left.png" class="fas fa-step-backward" />
      </div>
      <div class="control-btn play-btn" @click="togglePlay">
        <img v-show="isPlaying" src="@/assets/img/timeline/stop.png" />
        <img v-show="!isPlaying" src="@/assets/img/timeline/start.png" />
      </div>
      <div class="control-btn" @click="skipForward">
        <img src="@/assets/img/timeline/right.png" class="fas fa-step-forward" />
      </div>
      <div class="speed-control">
        <div @click="toggleSpeedMenu">{{ playbackRate }}X</div>
        <div class="speed-menu" v-show="showSpeedMenu">
          <div v-for="rate in playbackRates" :key="rate" @click.capture="setPlaybackRate(rate)"
            :class="{ active: playbackRate === rate }">
            {{ rate }}X
          </div>
        </div>
      </div>
    </div>
    <div class="timeline">
      <div class="dates">
        <div class="current-date">
          å½“前播放时间:{{ currentPlayingTime }}
        </div>
        <div v-for="(date, index) in visibleDates" :key="index" class="date-label">
          <!-- {{ formatDate(date) }} -->
        </div>
      </div>
      <div class="timeline-track" ref="timelineTrack" @click="seekToPosition">
        <div class="timeline-progress" :style="{ width: progressPercentage + '%' }"></div>
        <div class="timeline-cursor" :style="{ left: progressPercentage + '%' }"></div>
        <div class="time-markers">
          <div v-for="(time, index) in timeMarkers" :key="index" class="time-marker">
            {{ time }}
          </div>
        </div>
      </div>
    </div>
    <el-button @click="handleBack" style="margin-top: 26px;margin-left: 30px;margin-right: 10px;">结束模拟</el-button>
  </div>
</template>
<script setup>
import {
  ref,
  computed,
  onUnmounted,
  onMounted,
  watch,
  defineProps,
  onBeforeUnmount,
  inject,
} from "vue";
import dayjs from "dayjs";
import { createWaterPrimitive, destoryWaterPrimitive } from "@/utils/water";
import { getRainfall } from "@/api/index";
import { EventBus } from "@/eventBus"; // å¼•入事件总线
import { ElMessage } from 'element-plus'
import { fetchWaterSimulationData } from "@/api/trApi.js"
const emit = defineEmits(["timeUpdate", "isPlaying", "playbackFinished"]);
const props = defineProps({
  waterSimulateParams: {
    type: Object,
    default: () => ({
      date: ["2025-02-14T16:00:00.000Z", "2025-02-15T16:00:00.000Z"],
    }),
  },
});
// å“åº”式状态
const currentPlayingTime = ref(""); // å½“前播放时间
const isPlaying = ref(false);
const playbackFinished = ref(true);
const currentTime = ref(0);
const duration = ref(60); // ä¸€å¤©çš„ç§’æ•°
const playbackRate = ref(1);
const playbackRates = ref([1, 2, 4, 8]);
const showSpeedMenu = ref(false);
const waterTimestamps = ref([]); // å­˜å‚¨æ—¶é—´è½´æ•°æ®
const timeMarkers = ref([
]);
const timelineTrack = ref(null);
const startDate = computed(() => {
  return dayjs(props.waterSimulateParams.date[0]);
});
const endDate = computed(() => {
  return dayjs(props.waterSimulateParams.date[1]);
});
let playInterval = null;
// è®¡ç®—属性
const progressPercentage = computed(() => {
  return (currentTime.value / duration.value) * 100;
});
const visibleDates = computed(() => {
  if (waterTimestamps.value.length === 0) return [];
  // æå–唯一日期
  const uniqueDates = new Set(
    waterTimestamps.value.map((timestamp) => dayjs(timestamp).format("YYYY-MM-DD"))
  );
  // è½¬æ¢ä¸ºæ•°ç»„
  return Array.from(uniqueDates).map((date) => dayjs(date).toDate());
});
const currentTimeFormatted = computed(() => {
  return formatTime(currentTime.value);
});
const togglePlay = () => {
  // å¦‚果当前是停止状态且已经播放完毕,点击时重置时间
  if (!isPlaying.value && currentTime.value >= duration.value) {
    currentTime.value = 0;
    emit("timeUpdate", progressPercentage.value);
    // earthCtrl.environment.disableEffect("rain");
  }
  isPlaying.value = !isPlaying.value;
  emit("isPlaying", isPlaying.value);
  if (isPlaying.value) {
    startPlayback();
    // å¦‚果是从头开始播放
    if (currentTime.value === 0) {
      emit("playbackFinished", false);
    }
  } else {
    stopPlayback();
  }
};
const startPlayback = () => {
  clearInterval(playInterval);
  playInterval = setInterval(() => {
    currentTime.value += 0.5 * playbackRate.value; // æ¯æ¬¡å¢žåŠ 0.5秒
    if (currentTime.value >= duration.value) {
      currentTime.value = duration.value; // åœåœ¨æœ€åŽä¸€å¸§
      stopPlayback();
      isPlaying.value = false;
      emit("isPlaying", isPlaying.value);
      emit("playbackFinished", true);
    }
    emit("timeUpdate", progressPercentage.value);
  }, 1000); // æ¯ç§’更新一次
};
const stopPlayback = () => {
  // earthCtrl.environment.disableEffect("rain");
  clearInterval(playInterval);
};
const skipForward = () => {
  currentTime.value = Math.min(currentTime.value + 1, duration.value); // å‘前跳转1秒
  emit("timeUpdate", progressPercentage.value);
};
const skipBackward = () => {
  currentTime.value = Math.max(currentTime.value - 1, 0); // å‘后跳转1秒
  emit("timeUpdate", progressPercentage.value);
};
const toggleSpeedMenu = () => {
  showSpeedMenu.value = !showSpeedMenu.value;
};
const setPlaybackRate = (rate) => {
  playbackRate.value = rate;
  showSpeedMenu.value = false;
  if (isPlaying.value) {
    stopPlayback();
    startPlayback();
  }
};
const formatTime = (seconds) => {
  const hours = Math.floor(seconds / 3600);
  const minutes = Math.floor((seconds % 3600) / 60);
  const secs = Math.floor(seconds % 60);
  return `${hours.toString().padStart(2, "0")}:${minutes
    .toString()
    .padStart(2, "0")}:${secs.toString().padStart(2, "0")}`;
};
const formatDate = (date) => {
  return dayjs(date).format("YYYY-MM-DD");
};
const seekToPosition = (event) => {
  const rect = timelineTrack.value.getBoundingClientRect();
  const clickPosition = event.clientX - rect.left;
  const percentage = clickPosition / rect.width;
  // å¯¹é½åˆ°æœ€è¿‘的整秒
  const clickedSeconds = Math.round(percentage * duration.value);
  currentTime.value = clickedSeconds;
  // æ›´æ–°è¿›åº¦æ¡å’Œæ¸¸æ ‡
  emit("timeUpdate", progressPercentage.value);
  // è®¡ç®—点击位置对应的时间戳
  const firstTimestamp = waterTimestamps.value[0];
  if (firstTimestamp) {
    const clickedTimestamp = dayjs(firstTimestamp).add(clickedSeconds, "second");
    // æ‰“印 Unix æ—¶é—´æˆ³ï¼ˆæ¯«ç§’)和格式化时间
    const unixTimestamp = clickedTimestamp.valueOf();
    const formattedTime = clickedTimestamp.format("YYYY-MM-DD HH:mm:ss");
    console.log("Clicked timestamp (Unix format):", unixTimestamp);
    console.log("Clicked timestamp (Formatted):", formattedTime);
  }
};
const rainFallData = ref([]);
function getRainfallData() {
  getRainfall().then((res) => {
    // rainFallData.value = res.data.map(item => {
    //   return dayjs(item.time).format("HH:mm")
    // })
    // const rainfallData = res.data.map(item => {
    //   return item.rainfall
    // })
    rainFallData.value = res.data;
  });
}
let mockTimer = null;
let currentRainfall = ref(0.0001);
function randomMockWater() {
  let delay = (0.5 / playbackRate.value) * 1000; // æ ¹æ®æ’­æ”¾é€ŸçŽ‡è°ƒæ•´å»¶è¿Ÿ
  if (delay < 200) {
    delay = 200; // è®¾ç½®æœ€å°å»¶è¿Ÿä¸º200ms
  }
  if (mockTimer) {
    clearTimeout(mockTimer);
    mockTimer = null;
  }
  mockTimer = setTimeout(() => {
    const rainfall = rainFallData.value.find(
      (item) =>
        dayjs(item.time).format("HH:mm:ss") == currentTimeFormatted.value
    );
    if (rainfall && rainfall.total) {
      createWaterPrimitive(rainfall.total / 50000);
    }
  }, 100);
  setTimeout(() => {
    destoryWaterPrimitive();
  }, 120000);
}
watch(
  () => {
    randomMockWater();
  },
  () => currentTime.value,
  () => {
    if (waterTimestamps.value.length > 0) {
      const firstTimestamp = waterTimestamps.value[0];
      const currentTimestamp = dayjs(firstTimestamp).add(currentTime.value, "second");
      currentPlayingTime.value = currentTimestamp.format("YYYY-MM-DD HH:mm:ss");
    }
  }
);
// åŠ¨æ€è°ƒæ•´æ—¶é—´æ ‡è®°æ ¼å¼
function generateTimeMarkers(timestamps) {
  if (!timestamps || timestamps.length === 0) return [];
  // ç¡®ä¿æ—¶é—´æˆ³æŒ‰å‡åºæŽ’列
  const sortedTimestamps = [...timestamps].sort((a, b) => dayjs(a).diff(dayjs(b)));
  const startDate = dayjs(sortedTimestamps[0]);
  const endDate = dayjs(sortedTimestamps[sortedTimestamps.length - 1]);
  // è®¡ç®—总时长(秒)
  const totalDurationInSeconds = endDate.diff(startDate, "second");
  // ç”Ÿæˆ 5 ä¸ªå‡åŒ€åˆ†å¸ƒçš„æ—¶é—´ç‚¹
  const intervalInSeconds = Math.floor(totalDurationInSeconds / 4); // æ¯æ®µé—´éš”的秒数
  const timeMarkers = [];
  for (let i = 0; i < 5; i++) {
    const timestamp = startDate.add(i * intervalInSeconds, "second");
    timeMarkers.push(timestamp.format("YYYY-MM-DD HH:mm:ss")); // æ ¼å¼åŒ–为 YYYY-MM-DD HH:mm:ss
  }
  // å¼ºåˆ¶æ·»åŠ ç»“æŸæ—¶é—´
  if (!timeMarkers.includes(endDate.format("YYYY-MM-DD HH:mm:ss"))) {
    timeMarkers.push(endDate.format("YYYY-MM-DD HH:mm:ss"));
  }
  console.log("Generated time markers with date:", timeMarkers);
  return timeMarkers;
}
// ç›‘听时间戳变化并生成时间标记
watch(
  () => waterTimestamps.value,
  (newTimestamps) => {
    if (newTimestamps.length > 0) {
      timeMarkers.value = generateTimeMarkers(newTimestamps);
    }
  },
  { immediate: true }
);
// åŠ¨æ€æ›´æ–°æ—¶é—´è½´èŒƒå›´
// ç»„件挂载时加载数据
onMounted(async () => {
  try {
    const simulationData = await fetchWaterSimulationData();
    if (simulationData && simulationData.waterTimestamps) {
      waterTimestamps.value = simulationData.waterTimestamps; // åˆå§‹åŒ– waterTimestamps
      updateTimelineRange(); // æ›´æ–°æ—¶é—´è½´èŒƒå›´
      timeMarkers.value = generateTimeMarkers(waterTimestamps.value); // ç”Ÿæˆæ—¶é—´æ ‡è®°
      const firstTimestamp = waterTimestamps.value[0];
      if (firstTimestamp) {
        currentPlayingTime.value = dayjs(firstTimestamp).format("YYYY-MM-DD HH:mm:ss");
      }
    }
  } catch (error) {
    console.error("Error loading water simulation data:", error);
  }
});
// æ›´æ–°æ—¶é—´è½´èŒƒå›´
function updateTimelineRange() {
  if (waterTimestamps.value.length > 0) {
    const firstTimestamp = waterTimestamps.value[0]; // ç¬¬ä¸€ä¸ªæ—¶é—´æˆ³
    const lastTimestamp = waterTimestamps.value[waterTimestamps.value.length - 1]; // æœ€åŽä¸€ä¸ªæ—¶é—´æˆ³
    // æ›´æ–°å¼€å§‹æ—¶é—´å’Œç»“束时间
    props.waterSimulateParams.date = [
      dayjs(firstTimestamp).toISOString(), // è½¬æ¢ä¸º ISO æ ¼å¼
      dayjs(lastTimestamp).toISOString(),
    ];
    // è®¡ç®—总时长(秒)
    duration.value = dayjs(lastTimestamp).diff(dayjs(firstTimestamp), "second");
    console.log("Updated timeline range:", {
      startDate: props.waterSimulateParams.date[0],
      endDate: props.waterSimulateParams.date[1],
      duration: duration.value,
    });
  }
}
onBeforeUnmount(() => {
  stopPlayback();
  let delay = (3 / playbackRate.value) * 1000;
  setTimeout(() => {
    destoryWaterPrimitive();
  }, delay);
});
const { startSimulate, endSimulate } = inject("simulateActions");
// è¿”回按钮点击事件
function handleBack() {
  ElMessage({
    message: '模拟进程正在关闭中...',
    type: 'success',
  })
  endSimulate();
  EventBus.emit("hide-schemeInfo");
}
</script>
<style scoped>
.timeline-container {
  display: flex;
  /* align-items: center; */
  justify-content: space-between;
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  width: 878px;
  height: 108px;
  /* background-color: #1a2634; */
  background: url("@/assets/img/menubar/bar.png");
  background-size: 100% 100%;
  color: white;
  /* border-radius: 8px; */
  font-family: Arial, sans-serif;
  padding: 0 25px;
}
.controls {
  display: flex;
  /* align-items: center; */
  margin: 25px 25px 10px 0;
}
.control-btn {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  margin-right: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  img {
    width: 100%;
    height: 100%;
  }
}
.control-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}
.play-btn {
  background-color: #4a90e2;
  width: 36px;
  height: 36px;
}
.speed-control {
  position: relative;
  cursor: pointer;
  /* padding: 5px 10px; */
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
}
.speed-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #2a3a4a;
  border-radius: 4px;
  z-index: 10;
  width: 60px;
}
.speed-menu div {
  padding: 5px 10px;
  text-align: center;
}
.speed-menu div:hover,
.speed-menu div.active {
  /* background-color: #4a90e2; */
  background-color: rgba(127, 255, 212, 0.5);
}
.timeline {
  margin-top: 20px;
  position: relative;
  flex: 1;
}
.dates {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}
.date-label {
  font-size: 14px;
  color: #fff;
}
.timeline-track {
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
}
.timeline-progress {
  height: 100%;
  background-color: #4a90e2;
  border-radius: 4px;
  position: absolute;
  top: 0;
  left: 0;
}
.timeline-cursor {
  width: 12px;
  height: 12px;
  background-color: white;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.time-markers {
  display: flex;
  justify-content: space-between;
  position: absolute;
  width: 110%;
  top: 15px;
  color: #fff;
}
.time-marker {
  margin-left: 35px;
  font-size: 12px;
  color: #fff;
  transform: translateX(-50%);
}
</style>
src/components/monifangzhen/RiverLevel.vue
@@ -2,7 +2,8 @@
  <div class="listInfo">
    <span class="listInfo-title">降雨等级</span>
    <div class="level-list">
      <div v-for="item in levelList" :key="item.name" @click="handleClick(item)" class="level-item" :class="item.name == currentLevel ? 'active' : ''">
      <div v-for="item in levelList" :key="item.name" @click="handleClick(item)" class="level-item"
        :class="item.name == currentLevel ? 'active' : ''">
        {{ item.name }}
      </div>
    </div>
@@ -10,10 +11,10 @@
    <el-form :model="form" label-width="70px">
      <el-form-item label="方案名称">
        <el-input placeholder="请输入内容" v-model="form.name" ></el-input>
        <el-input placeholder="请输入内容" v-model="form.name"></el-input>
      </el-form-item>
      <el-form-item label="模拟区域">
        <el-input placeholder="请输入内容" v-model="form.qy" ></el-input>
        <el-input placeholder="请输入内容" v-model="form.qy"></el-input>
      </el-form-item>
      <!-- <el-form-item label="数据类型">
                <el-select
@@ -36,7 +37,8 @@
        </el-radio-group>
      </el-form-item>
      <el-form-item label="预警时间">
        <el-date-picker size="small" v-model="form.date" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期">
        <el-date-picker size="small" v-model="form.date" type="daterange" range-separator="-" start-placeholder="开始日期"
          end-placeholder="结束日期">
        </el-date-picker>
      </el-form-item>
    </el-form>
@@ -75,26 +77,37 @@
  },
])
function handleClick (item) {
function handleClick(item) {
  currentLevel.value = item.name
}
function endPlay () { }
function startPlay () {
function endPlay() { }
function startPlay() {
  createWaterPrimitive()
}
let water = null
function createWaterPrimitive () {
function createWaterPrimitive() {
  console.log('createWaterPrimitive')
  if (water) {
    water.destroy()
    water = null
  }
  water = earthCtrl.analysis.createWaterSimulateGPU({
    //isDraw: true, // æ˜¯å¦ç»˜åˆ¶æ°´é¢
    height: -5,
    maxHeight: 2000,
    coordinates: [116.59934879285792, 40.57756658974129, 0, 116.59934879285792, 40.5436798121795, 0, 116.58050836969261, 40.5436798121795, 0, 116.58050836969261, 40.57756658974129, 0]
  })
  // water = earthCtrl.analysis.createWaterSimulateGPU({
  //   //isDraw: true, // æ˜¯å¦ç»˜åˆ¶æ°´é¢
  //   height: -5,
  //   maxHeight: 2000,
  //   coordinates: [116.59934879285792, 40.57756658974129, 0, 116.59934879285792, 40.5436798121795, 0, 116.58050836969261, 40.5436798121795, 0, 116.58050836969261, 40.57756658974129, 0]
  // })
  water = earthCtrl.simulate.createWaterSimulateLayer({
    // baseUrl: "http://192.168.10.187:81/20250412",
    // baseUrl: "http://192.168.56.107:8088/simu/c2h1d", //仿真服务url
    baseUrl: "/simu/c2h1d", //仿真服务url
    interval: 100,   //两帧请求的时间间隔,单位ms
    // color: new SmartEarth.Cesium.Color.fromCssColorString('#f4a460'),
    //清水色
    color: new SmartEarth.Cesium.Color.fromCssColorString('#D4F2E7'),
    //浑水色
    // color: new SmartEarth.Cesium.Color.fromCssColorString('#DEB887'),
  });
  water.rainfall = 10
  // water.rainfall = 0.0001;    // è°ƒèŠ‚é›¨é‡
  // water.rainPointMax = 2.0;   // æ¸—水阈值
@@ -212,20 +225,24 @@
.el-select-dropdown__item:hover {
  color: #409eff !important;
}
.el-input__wrapper {
  background: rgba(8, 75, 66, 1) !important;
  border: 2px solid #437a74 !important;
  box-shadow: none !important;
}
.el-select__wrapper {
  background: rgba(8, 75, 66, 1) !important;
  border: 2px solid #437a74 !important;
  box-shadow: none !important;
}
.level-list {
  display: flex;
  margin-top: 10px;
  flex-wrap: wrap;
  .level-item {
    width: 150px;
    height: 30px;
@@ -237,6 +254,7 @@
    margin-bottom: 10px;
    cursor: pointer;
    border-radius: 5px;
    &.active {
      background: #11b6a6;
    }
src/components/tools/LayerTree.vue
@@ -206,7 +206,7 @@
  const entityList = treeMap.get(name);
  if (Array.isArray(entityList)) {
    entityList.forEach((entity) => {
      console.log(`Setting entity show to:`, checked);
      // console.log(`Setting entity show to:`, checked);
      entity.show = checked;
    });
  } else if (entityList && typeof entityList.show !== "undefined") {
src/utils/water.js
@@ -1,103 +1,123 @@
import { cartesianToXY } from "@/utils/map"
let water = null
import { cartesianToXY } from "@/utils/map";
let water = null;
export function destoryWaterPrimitive() {
    if (water) {
        water.destroy()
        water = null
    }
  if (water) {
    water.destroy();
    water = null;
  }
}
// export function createWaterPrimitive(rainfall) {
//   if (water) {
//     water.rainfall = rainfall;
//     return;
//   }
// //   let positionArray = [
// //     {
// //       x: -2172418.4199554003,
// //       y: 4339741.174232391,
// //       z: 4124707.9687457774,
// //     },
// //     {
// //       x: -2173054.1197314346,
// //       y: 4339420.091643301,
// //       z: 4124710.896091218,
// //     },
// //     {
// //       x: -2172832.10576698,
// //       y: 4338665.615224519,
// //       z: 4125615.341361447,
// //     },
// //     {
// //       x: -2171464.714295606,
// //       y: 4337884.628113293,
// //       z: 4127145.919793182,
// //     },
// //     {
// //       x: -2170738.824348358,
// //       y: 4338621.865525843,
// //       z: 4126755.442367371,
// //     },
// //     {
// //       x: -2171270.181257778,
// //       y: 4338967.11477535,
// //       z: 4126117.1692552743,
// //     },
// //     {
// //       x: -2171120.444962885,
// //       y: 4339310.237335228,
// //       z: 4125837.0031219805,
// //     },
// //     {
// //       x: -2171911.8873938583,
// //       y: 4339707.853907823,
// //       z: 4125007.7462886167,
// //     },
// //     {
// //       x: -2171934.494218292,
// //       y: 4339685.285760623,
// //       z: 4125019.506657141,
// //     },
// //   ];
// //   const coordinates = [];
// //   positionArray.forEach((item) => {
// //     const result = cartesianToXY(item);
// //     coordinates.push(result.longitude, result.latitude, result.height);
// //   });
//   // water = earthCtrl.analysis.createWaterSimulateGPU({
//   //     //isDraw: true, // æ˜¯å¦ç»˜åˆ¶æ°´é¢
//   //     height: -5,
//   //     maxHeight: 2000,
//   //     coordinates: coordinates,
//   //     // coordinates: [
//   //     //     116.57628914253382, 40.5654461866556, 0, 116.57628914253382, 40.552898897029046, 0,
//   //     //     116.60855621443835, 40.552898897029046, 0, 116.60855621443835, 40.5654461866556, 0,
//   //     // ],
//   //     // coordinates: [
//   //     //     116.568865, 40.590729, 0, 116.568865, 40.533505, 0,
//   //     //     116.608505, 40.533505, 0, 116.608505, 40.590729, 0,
//   //     // ],
//   // })
//   water = earthCtrl.simulate.createWaterSimulateLayer({
//     // baseUrl: "http://192.168.10.187:81/20250412",
//     // baseUrl: "http://192.168.56.107:8088/simu/c2h1d", //仿真服务url
//     baseUrl: "/simu/c2h1dc", //仿真服务url
//     interval: 125, //两帧请求的时间间隔,单位ms
//     // color: new SmartEarth.Cesium.Color.fromCssColorString('#f4a460'),
//     //清水色
//     color: new SmartEarth.Cesium.Color.fromCssColorString("#D4F2E7"),
//     //浑水色
//     // color: new SmartEarth.Cesium.Color.fromCssColorString('#DEB887'),
//   });
//   console.log("water", water);
export function createWaterPrimitive(rainfall) {
    if (water) {
        water.rainfall = rainfall
        return
    }
    let positionArray = [
        {
            x: -2172418.4199554003,
            y: 4339741.174232391,
            z: 4124707.9687457774,
        },
        {
            x: -2173054.1197314346,
            y: 4339420.091643301,
            z: 4124710.896091218,
        },
        {
            x: -2172832.10576698,
            y: 4338665.615224519,
            z: 4125615.341361447,
        },
        {
            x: -2171464.714295606,
            y: 4337884.628113293,
            z: 4127145.919793182,
        },
        {
            x: -2170738.824348358,
            y: 4338621.865525843,
            z: 4126755.442367371,
        },
        {
            x: -2171270.181257778,
            y: 4338967.11477535,
            z: 4126117.1692552743,
        },
        {
            x: -2171120.444962885,
            y: 4339310.237335228,
            z: 4125837.0031219805,
        },
        {
            x: -2171911.8873938583,
            y: 4339707.853907823,
            z: 4125007.7462886167,
        },
        {
            x: -2171934.494218292,
            y: 4339685.285760623,
            z: 4125019.506657141,
        },
    ]
    const coordinates = []
    positionArray.forEach(item => {
        const result = cartesianToXY(item)
        coordinates.push(result.longitude, result.latitude, result.height)
    })
    water = earthCtrl.analysis.createWaterSimulateGPU({
        //isDraw: true, // æ˜¯å¦ç»˜åˆ¶æ°´é¢
        height: -5,
        maxHeight: 2000,
        coordinates: coordinates,
        // coordinates: [
        //     116.57628914253382, 40.5654461866556, 0, 116.57628914253382, 40.552898897029046, 0,
        //     116.60855621443835, 40.552898897029046, 0, 116.60855621443835, 40.5654461866556, 0,
        // ],
        // coordinates: [
        //     116.568865, 40.590729, 0, 116.568865, 40.533505, 0,
        //     116.608505, 40.533505, 0, 116.608505, 40.590729, 0,
        // ],
    })
    console.log("water", water)
    // water.rainfall = 0.0001;    // è°ƒèŠ‚é›¨é‡
    // water.rainPointMax = 2.0;   // æ¸—水阈值
    // water.attenuation = 0.995;  // è¡°å‡
    // water.strenght = 0.25    // æ°´æµå¼ºåº¦
}
//   // water.rainfall = 0.0001;    // è°ƒèŠ‚é›¨é‡
//   // water.rainPointMax = 2.0;   // æ¸—水阈值
//   // water.attenuation = 0.995;  // è¡°å‡
//   // water.strenght = 0.25    // æ°´æµå¼ºåº¦
// }
export function createWaterPrimitive(options = {}) {
    const { interval = 1000 } = options; // é»˜è®¤ interval ä¸º 1000
    water = earthCtrl.simulate.createWaterSimulateLayer({
      baseUrl: "/simu/c2h1dc", // ä»¿çœŸæœåŠ¡url
      interval, // åŠ¨æ€è®¾ç½® interval
      color: new SmartEarth.Cesium.Color.fromCssColorString("#D4F2E7"),
    });
    console.log(`Water simulation started with interval: ${interval}ms`);
  }
export function initeWaterPrimitiveView() {
    let view = {
        destination: {
            x: -2173603.2294639186,
            y: 4338938.333124211,
            z: 4128027.401463165,
        },
        orientation: {
            pitch: -0.6208443477400212,
            roll: 0.000049799989940702005,
            heading: 3.6294612473618644,
        },
    }
    viewer.scene.camera.flyTo(view)
  let view = {
    destination: {
      x: -2173603.2294639186,
      y: 4338938.333124211,
      z: 4128027.401463165,
    },
    orientation: {
      pitch: -0.6208443477400212,
      roll: 0.000049799989940702005,
      heading: 3.6294612473618644,
    },
  };
  viewer.scene.camera.flyTo(view);
}
src/views/Home.vue
@@ -57,7 +57,7 @@
// import DangerAssess from "@/components/monifangzhen/DangerAssess.vue";
import { showDeviceDetail } from "@/store";
import { setupTokenRefresh } from "@/api/hpApi.js"
import { getSimData } from "@/api/trApi.js"
import { getSimData ,fetchWaterSimulationData} from "@/api/trApi.js"
import { convertToWKT } from '@/utils/wktUtils';
const route = useRoute();
@@ -99,7 +99,8 @@
// è®¡ç®—属性
const showDetail = computed(() => showDeviceDetail.value);
onMounted(() => {
onMounted(async () => {
  setupTokenRefresh()// èŽ·å–å®å›¾token
  getSimData() //测试tr后端
  try {
vue.config.js
@@ -35,6 +35,11 @@
          '^/hp': ''
        },
        secure: false
      },
      '/simu': {
        target: 'http://192.168.56.107:8088',
        changeOrigin: true,
        secure: false
      }
    }
  }