月球大数据地理空间分析展示平台-【前端】-月球2期前端
WX
2023-07-14 823a04358a059074f6816172248855f67df5ee87
Merge branch 'master' of http://192.168.20.39:8989/r/MoonWeb
已添加2个文件
已修改13个文件
3672 ■■■■■ 文件已修改
public/CIMSDK/CimSDK.min.css 2432 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/CimSDK.min.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/Widgets/MapWidget/NavigationPanel.css 490 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/index.cjs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/index.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/Map/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/Map/index.js 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/Map/menuTool.js 211 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/Map/rightServer.js 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/bottomBtn.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/topBtn.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Index.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/query/CoordLocation.vue 189 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/query/SpatialQuery.vue 211 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/search/search.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/CIMSDK/CimSDK.min.css
@@ -1 +1,2431 @@
.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{position:relative}.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-credits a,.cesium-widget-credits a:visited{color:#fff}.cesium-widget-errorPanel{position:absolute;inset:0;text-align:center;background:rgba(0,0,0,.7);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:rgba(48,51,54,.8);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:rgba(48,51,54,.8);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-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:rgba(38,38,38,.95);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:rgba(84,84,84,1);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:rgba(238,136,0,.44);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:#f00}.cesium-timeline-bar{position:relative;left:0;top:0;overflow:hidden;cursor:pointer;width:100%;height:1.7em;background:linear-gradient(to bottom,rgba(116,117,119,.8) 0%,rgba(58,68,82,.8) 11%,rgba(46,50,56,.8) 46%,rgba(53,53,53,.8) 81%,rgba(53,53,53,.8) 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{display:block;position:absolute;top:50px;right:10px;max-height:calc(100% - 120px);box-sizing:border-box;overflow-y:auto;overflow-x:hidden}.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}}
.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 {
    position: relative
}
.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-credits a,
.cesium-widget-credits a:visited {
    color: #fff
}
.cesium-widget-errorPanel {
    position: absolute;
    inset: 0;
    text-align: center;
    background: rgba(0, 0, 0, .7);
    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: rgba(48, 51, 54, .8);
    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: rgba(48, 51, 54, .8);
    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-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: rgba(38, 38, 38, .95);
    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: rgba(84, 84, 84, 1);
    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: rgba(238, 136, 0, .44);
    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: #f00
}
.cesium-timeline-bar {
    position: relative;
    left: 0;
    top: 0;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
    height: 1.7em;
    background: linear-gradient(to bottom, rgba(116, 117, 119, .8) 0%, rgba(58, 68, 82, .8) 11%, rgba(46, 50, 56, .8) 46%, rgba(53, 53, 53, .8) 81%, rgba(53, 53, 53, .8) 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 {
    display: block;
    position: absolute;
    top: 50px;
    right: 10px;
    max-height: calc(100% - 120px);
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden
}
.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: 70px !important;
    top: calc(100% - 182px) !important;
    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: 38px;
    bottom: 180px;
    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
    }
}
public/CIMSDK/CimSDK.min.js
@@ -16748,7 +16748,7 @@
                }
                material.alpha = u_alpha;
            }
            `})};c8.prototype.destroy=function(){this._tileset.customShader===this._customShader&&(this._customShader=void 0,this._tileset.customShader=void 0),this._scene.preUpdate.removeEventListener(this._preUpdate)};function iRi(){this.customShaders={},this.customShaders.lightLine=c8}var wlt=iRi;function GH(o,A){this.options=Ae(A,{}),this.earthCtrl=o,this.viewer=o.coreMap,this.CSME=mme,this.Cust=new this.CSME.CustomShaderStage(this.options.primitive,A),this.stageArr=[],this.eventListener=null,this.eventListener=this.viewer.scene.preUpdate.addEventListener(()=>{this.Cust.update()}),this.create()}GH.prototype.create=function(o){let A=this,f=null;o?f=o:f=A.options,f.lineMaterialStage&&(A.LineMaterialStage=new A.CSME.LineMaterialStage(Ae(f.lineMaterialStage,{weight:.5})),A.Cust.addStage(A.LineMaterialStage),A.stageArr.push(A.LineMaterialStage)),f.gradientMaterialStage&&(A.GradientMaterialStage=new A.CSME.GradientMaterialStage(Ae(f.gradientMaterialStage,{weight:.5})),A.Cust.addStage(A.GradientMaterialStage),A.stageArr.push(A.GradientMaterialStage)),f.normalizeMaterialStage&&(A.NormalizeMaterialStage=new A.CSME.NormalizeMaterialStage(Ae(f.normalizeMaterialStage,{weight:.5})),A.Cust.addStage(A.NormalizeMaterialStage),A.stageArr.push(A.NormalizeMaterialStage)),f.dynamicColorMaterialStage&&(A.DynamicColorMaterialStage=new A.CSME.DynamicColorMaterialStage(Ae(f.dynamicColorMaterialStage,{weight:.5})),A.Cust.addStage(A.DynamicColorMaterialStage),A.stageArr.push(A.DynamicColorMaterialStage)),f.reflectMaterialStage&&(A.ReflectMaterialStage=new A.CSME.ReflectMaterialStage(Ae(f.reflectMaterialStage,{weight:.5})),A.Cust.addStage(A.ReflectMaterialStage),A.stageArr.push(A.ReflectMaterialStage)),f.textureMaterialStage&&(A.TextureMaterialStage=new A.CSME.TextureMaterialStage(Ae(f.textureMaterialStage,{weight:.5,url:`${globalThis.GEOWORLD_BASE_URL}Assets/Textures/window.png`})),A.Cust.addStage(A.TextureMaterialStage),A.stageArr.push(A.TextureMaterialStage))};GH.prototype.addStage=function(o){let A=this;A.Cust.addStage(o),A.stageArr.push(o)};GH.prototype.removeStage=function(o){this.Cust.removeStage(o.name)};GH.prototype.update=function(){let o=this;o.viewer.scene.preUpdate.removeEventListener(o.eventListener),o.eventListener=o.viewer.scene.preUpdate.addEventListener(()=>{o.Cust.update()})};GH.prototype.removeFromMap=function(){let o=this;for(let A=0;A<o.stageArr.length;A++)o.removeStage(o.stageArr[A]);o.viewer.scene.preUpdate.removeEventListener(o.eventListener),o.eventListener=null};var blt=GH;function Qoe(o,A={}){this._earthCtrl=o,this._edgeStage=null,this._options=A,this._options.visibleEdgeColor=Ae(A.visibleEdgeColor,ht.fromCssColorString("#101010")),this._options.outlineWidth=Ae(A.outlineWidth,1),this._options.thresholdAngle=Ae(A.thresholdAngle,12*Math.PI/180),this.add()}Qoe.prototype.add=function(){this._edgeStage=aY();let o=this._edgeStage;o.visibleEdgeColor=this._options.visibleEdgeColor,o.outlineWidth=this._options.outlineWidth,o.thresholdAngle=this._options.thresholdAngle,o.selected=[{},{}],o.enabled=!0,this._earthCtrl.Viewer.postProcessStages.add(o)};Qoe.prototype.removeFromMap=function(){this._edgeStage&&(this._earthCtrl.Viewer.postProcessStages.remove(this._edgeStage),this.__edgeStage=null)};Object.defineProperties(Qoe.prototype,{show:{get:function(){return this._edgeStage.show},set:function(o){this._edgeStage.show=o}},outlineWidth:{get:function(){return this._edgeStage.outlineWidth},set:function(o){this._edgeStage.outlineWidth=o}},thresholdAngle:{get:function(){return this._edgeStage.thresholdAngle},set:function(o){!o||(this._edgeStage.thresholdAngle=o)}},visibleEdgeColor:{get:function(){return this._edgeStage.visibleEdgeColor},set:function(o){!o||(this._edgeStage.visibleEdgeColor=o)}},hiddenEdgeColor:{get:function(){return this._edgeStage.hiddenEdgeColor},set:function(o){!o||(this._edgeStage.hiddenEdgeColor=o)}},showGlow:{get:function(){return this._edgeStage.showGlow},set:function(o){this._edgeStage.showGlow=o}},edgeGlow:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeStrength:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeOnly:{get:function(){return this._edgeStage.edgeOnly},set:function(o){this._edgeStage.edgeOnly=o}}});var Qlt=Qoe;function Soe(o,A={}){this._earthCtrl=o,this._edgeStage=null,this._options=A,this._visibleEdgeColor=Ae(A.visibleEdgeColor,ht.fromCssColorString("#ff0000")),this._hiddenEdgeColor=Ae(A.hiddenEdgeColor,ht.fromCssColorString("#4d4d4d")),this.handler=null,this.key=Ae(A.key,"id"),this.model=Ae(A.model,null),this.add()}Soe.prototype.add=function(){let o=this,A="";this._edgeStage=aY(!0);let f=this._edgeStage;f.visibleEdgeColor=this._visibleEdgeColor,f.hiddenEdgeColor=this._hiddenEdgeColor,f.selected=[],f.enabled=!1,this._earthCtrl.Viewer.postProcessStages.add(f);function m(C,y){function x(E,I){let w=E.featuresLength;for(let Q=0;Q<w;++Q){let M=E.getFeature(Q);if(M.getProperty(o.key)===A){let T={pickId:M.pickId};y.selected=[T],y.enabled=!0}}}function v(E,I){let w=E.content,Q=w.innerContents;if(O(Q)){let M=Q.length;for(let B=0;B<M;++B)x(Q[B],I)}else x(w,I)}C.tileVisible.addEventListener(function(E){A!==""&&v(E,null)})}m(this.model,f),this.handler=new zr(this._earthCtrl.coreMap.scene.canvas),this.handler.setInputAction(function(C){let y=o._earthCtrl.coreMap.scene.pick(C.position);if(f.selected=[],A="",!y||!y.primitive)return;let v=y.primitive._pickIds,I={pickId:y.pickId};f.selected=[I],f.enabled=!0,A=y.getProperty(o.key)},Yi.LEFT_CLICK)};Soe.prototype.removeFromMap=function(){this.handler&&(this.handler.destroy(),this.handler=void 0),this._edgeStage&&this._earthCtrl.Viewer.postProcessStages.remove(this._edgeStage)};Object.defineProperties(Soe.prototype,{showGlow:{get:function(){return this._edgeStage.showGlow},set:function(o){this._edgeStage.showGlow=o}},edgeGlow:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeStrength:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeOnly:{get:function(){return this._edgeStage.edgeOnly},set:function(o){this._edgeStage.edgeOnly=o}}});var Slt=Soe;function Hs(o){this._earthCtrl=o,this._coreMap=o.coreMap}function Sx(){return((1+qe.nextRandomNumber())*65536|0).toString(16).substring(1)}Hs.createUUID=function(){return`${Sx()+Sx()}-${Sx()}-${Sx()}-${Sx()}-${Sx()}${Sx()}${Sx()}`};Hs.createUUIDWithoutDash=function(){return Sx()+Sx()+Sx()+Sx()+Sx()+Sx()+Sx()+Sx()};Hs.prototype.createUUID=function(){return Hs.createUUID()};Hs.prototype.createGroup=function(o){let A=new s8;return A.id=o.id||Hs.createUUID(),A.name=o.name||"\u672A\u547D\u540D\u7EC4",A};Hs.prototype.createImageryLayer=function(o,A){let f=new foe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.IMAGERYPROVIDERS),f),f};Hs.prototype.createTerrainLayer=function(o,A){let f=new poe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.TERRAINPROVIDERS),f),f};Hs.prototype.removeTerrainLayer=function(o){this._coreMap.terrainProvider=new VF({})};Hs.prototype.createFeatureLayer=function(o,A){let f=new xoe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.FEATURELAYERS),f),f};Hs.prototype.createModelLayer=function(o,A){let f=new Coe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.MODELLAYERS),f),f};Hs.prototype.createWfsModel=function(o,A){let f=new yK(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.MODELLAYERS),f),f};Hs.prototype.createModel=function(o,A){let f=new Yne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.removeModel=function(o){O(o)&&o.removeFromMap()};Hs.prototype.createCZMLObject=function(o,A){let f=this,m=Ae(o.addToMap,!0),C=new Nie(o.name);return C.load(o.url),m&&f._earthCtrl.dataSources.add(C),C.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,C):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),C),C};Hs.prototype.createElement=function(o){let A={};return A[o.type]=o.parameters,O(o.name)&&(A.name=o.name),O(o.position)&&(A.position=o.position),this._earthCtrl.entities.add(A)};Hs.prototype.removeElement=function(o){O(o)?this._earthCtrl.entities.remove(o):this._earthCtrl.entities.removeAll()};Hs.prototype.createVideoProjection=function(o,A){o.addToMap=Ae(o.addToMap,!0);let f=Ae(o.sourceType,"perspective"),m=null;return f==="perspective"?(m=new Dne(this._earthCtrl,o),m.initialize(o),m.name=o.name,A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),m)):f==="panorama"?(m=new alt(this._earthCtrl,o),m.initialize(o),m.name=o.name,m.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),m)):f==="fisheye"&&(m=new Tne(this._earthCtrl,o),m.initialize(o),m.name=o.name,m.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),m)),m};Hs.prototype.createTrack=function(o,A){let f=new slt(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.initialize(o),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createSceneNode=function(o,A,f){let m=new s8(this._earthCtrl);return m.id=o,m.name=A,m.label=f,m};Hs.prototype.createFire=function(o,A){let f=new Rne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createSmoke=function(o,A){let f=new Fne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createExplosion=function(o,A){let f=new kne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createFireworks=function(o,A){let f=new Une(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createRadarScan=function(o,A){let f=new Hne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createCircleScan=function(o,A){let f=new plt(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createUpDownScan=function(o){let A=new Clt(this._earthCtrl,o);return A.show=!0,A};Hs.prototype.createWaters=function(o,A){let f=new _oe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createHeatmap=function(o,A){let f=Alt.create(this._earthCtrl,o.bbox,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createLabel=function(o,A){let f=new Wne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createBillboard=function(o,A){let f=new zne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPolyline=function(o,A){let f=new qne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPolygon=function(o,A){let f=new Zne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPoint=function(o,A){let f=new eoe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createBox=function(o,A){let f=new ioe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createEllipsoid=function(o,A){let f=new aoe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createCylinder=function(o,A){let f=new noe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createRectangle=function(o,A){let f=new loe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createEllipse=function(o,A){let f=new coe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPolylineVolume=function(o,A){let f=new hoe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createEChartLayer=function(o,A){let f=new Eoe(this._earthCtrl);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(o),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPointLight=function(o){return new xlt(this._earthCtrl,o)};Hs.prototype.createHawkeye=function(o){let A=new Boe(this._earthCtrl,o);A.name=o.name,A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&A.addToMap(o)};Hs.prototype.createSpotLight=function(o){let A=new boe(this._earthCtrl.coreMap,o.entities,o.lights);return A.name=o.name,A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};Hs.prototype.createCustomShaderManager=function(o){let A=new wlt;return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};Hs.prototype.createCustomShaderStage=function(o){let A=new blt(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};Hs.prototype.createModelOutline=function(o={}){let A=new Qlt(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};Hs.prototype.modelClick=function(o={}){let A=new Slt(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};var i2=Hs;var Doe=class extends n0{constructor(A,f){super(A),this._objectMap={},this._rootNode=null,this._isBenchUpdate=!1,this._selectSet=new Sne(A);let m=new s8(A);m.id=i2.createUUID(),m.name=Ae(f.ProjectName,"root"),m.version=Ae(f.version,null),m.desc=Ae(f.desc,null),m.createTime=Ae(f.createTime,new Date().toISOString()),m.lastUpdate=Ae(f.lastUpdate,null),m.show=!0,this._rootNode=m,this._editNode=m,this._objectMap[m.id]=m,this._EventDocumentChanged=new eN("EventDocumentChanged")}finalize(){this._rootNode=null,this._objectMap={}}getChildById(A){return this._objectMap.hasOwnProperty(A)?this._objectMap[A]:null}addChild(A,f){A.addChild(f),this._objectMap[f.id]=f,this._isBenchUpdate||this.commitChanged()}removeChildById(A){let f=this._objectMap[A];O(f)&&this.removeChild(f)}removeChild(A){O(A)&&O(A.parentNode)&&(A.removeFromMap(),A.parentNode.removeChild(A)),delete this._objectMap[A.id],this._isBenchUpdate||this.commitChanged()}removeAll(){}beginUpdate(){this._isBenchUpdate=!0}endUpdate(){this._isBenchUpdate&&(this.commitChanged(),this._isBenchUpdate=!1)}commitChanged(){this._EventDocumentChanged.notifyEvent(this)}flyTo(A,f){O(A)&&O(A._primitive)&&(A=A._primitive),this._earthCtrl.coreMap.flyTo(A,f)}findLocationByID(A,f){if(!A)return;let m=this.getChildById(A);O(m)&&O(m._primitive)&&(m=m._primitive),this._earthCtrl.coreMap.flyTo(m,f)}moveLayer(A,f){let m=this.getChildById(A),C=null;for(let y=0;y<m.parentNode.childNodes.length;y++)m.parentNode.childNodes[y].id===m.id&&(C=y);f==="up"?(this._earthCtrl.coreMap.scene.imageryLayers.raise(m._primitive),this.changeLayer(m.parentNode.childNodes,C,C+1)):f==="down"&&(this._earthCtrl.coreMap.scene.imageryLayers.lower(m._primitive),this.changeLayer(m.parentNode.childNodes,C,C-1))}changeLayer(A,f,m){if(f=qe.clamp(f,0,A.length-1),m=qe.clamp(m,0,A.length-1),f===m)return;let C=A[f];A[f]=A[m],A[m]=C}outputJson(A){let f=this;new Promise(function(C,y){let x={IMAGERYPROVIDERS:"imageryProviders",TERRAINPROVIDERS:"terrainProviders",MODELLAYERS:"modelLayers",FEATURELAYERS:"featureLayers",USERSCENE:"userScene"},v=0,E=[];for(let I in x){let w=x[I],Q=f.rootNode.getChildByName(w);if(!Q)continue;let M=[];if(Q.childNodes.length===0)M=[];else for(let B=0;B<Q.childNodes.length;B++){let T=Q.childNodes[B].toJSON();M.push(T)}Promise.all(M).then(function(B){let T=[];if(B.length!==0){for(let L=0;L<B.length;L++)T.push(B[L]);let D=T[0].class;D!=="IMAGERY_LAYER"&&D!=="TERRAIN_LAYER"&&D!=="MODEL_LAYER"&&D!=="FEATURE_LAYER"&&(D="USER_SCENE");let F={item:D,objJson:T};E.push(F)}v++,v===5&&(C(E),v=0)})}}).then(function(C){let y={version:f.rootNode.version,projectName:f.rootNode.name,desc:f.rootNode.desc,createTime:f.rootNode.createTime,lastUpdate:new Date().toISOString(),imageryProviders:[],terrainProviders:[],modelLayers:[],featureLayers:[],userScene:[]};for(let w=0;w<C.length;w++)C[w].item==="IMAGERY_LAYER"&&(y.imageryProviders=C[w].objJson),C[w].item==="TERRAIN_LAYER"&&(y.terrainProviders=C[w].objJson),C[w].item==="MODEL_LAYER"&&(y.modelLayers=C[w].objJson),C[w].item==="FEATURE_LAYER"&&(y.featureLayers=C[w].objJson),C[w].item==="USER_SCENE"&&(y.userScene=C[w].objJson);let x={class:"ENVIRONMENT",underGround:Ae(f._earthCtrl.camera.undergroundMode,null),shadow:Ae(f._earthCtrl.shadows,null),depthTest:Ae(f._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain,null),rain:Ae(f._earthCtrl.environment.rain.show,null),snow:Ae(f._earthCtrl.environment.snow.show,null),fog:Ae(f._earthCtrl.environment.fog.show,null),bwMode:Ae(f._earthCtrl.environment.bwMode.show,null),nightMode:Ae(f._earthCtrl.environment.nightMode.show,null),colorAdjustment:{show:Ae(f._earthCtrl.environment.colorAdjustment.show,null),contrast:Ae(f._earthCtrl.environment.colorAdjustment.contrast,null),saturation:Ae(f._earthCtrl.environment.colorAdjustment.saturation,null),brightness:Ae(f._earthCtrl.environment.colorAdjustment.brightness,null)}},v={class:"SKYBOX",positiveX:Ae(f._earthCtrl.environment.SkyBoxSource.positiveX,null),negativeX:Ae(f._earthCtrl.environment.SkyBoxSource.negativeX,null),positiveY:Ae(f._earthCtrl.environment.SkyBoxSource.positiveY,null),negativeY:Ae(f._earthCtrl.environment.SkyBoxSource.negativeY,null),positiveZ:Ae(f._earthCtrl.environment.SkyBoxSource.positiveZ,null),negativeZ:Ae(f._earthCtrl.environment.SkyBoxSource.negativeZ,null)},E={class:"VIEWPOINT",lon:f._earthCtrl.camera.viewPoint.lon,lat:f._earthCtrl.camera.viewPoint.lat,alt:f._earthCtrl.camera.viewPoint.alt,heading:f._earthCtrl.camera.viewPoint.heading,pitch:f._earthCtrl.camera.viewPoint.pitch,roll:f._earthCtrl.camera.viewPoint.roll,duration:f._earthCtrl.camera.viewPoint.duration};y.userScene.push(x),y.userScene.push(v),y.userScene.push(E);let I=JSON.stringify(y);A&&A(I)})}};Object.defineProperties(Doe.prototype,{rootNode:{get:function(){return this._rootNode},set:function(o){this._rootNode=o}},editNode:{get:function(){return this._editNode},set:function(o){this._editNode=o}},selectSet:{get:function(){return this._selectSet}},EventDocumentChanged:{get:function(){return this._EventDocumentChanged}},EventObjectPropertyChanged:{get:function(){return this._EventObjectPropertyChanged}}});var Toe=Doe;function Dlt(o){this._earthCtrl=o,this._coreMap=o.coreMap,this.initialize()}var S6i=new Es,D6i=new te,T6i=new te;Dlt.prototype.initialize=function(){let o=document.createElement("div");o.className="map-info-bar",o.style="position: absolute;left: 0px;bottom:0px;width: 100%;background:rgba(0,0,0,0.4); color:#e9e9e9; text-shadow:2px 2px 2px #000";let A=this._coreMap;A.container.appendChild(o);let f="float: right; min-width: 100px;margin-right: 20px;",m=document.createElement("div");m.style=f,o.appendChild(m);let C=document.createElement("div");C.style=f,o.appendChild(C);let y=document.createElement("div");y.style=f,o.appendChild(y);let x=A.scene.canvas,v=A.scene.globe.ellipsoid;new zr(x).setInputAction(function(I){let w=A.camera.pickEllipsoid(I.endPosition,v);if(w){let Q=A.scene.globe.ellipsoid.cartesianToCartographic(w),M=qe.toDegrees(Q.latitude).toFixed(6),B=qe.toDegrees(Q.longitude).toFixed(6),T=A.camera.positionCartographic.height.toFixed(1);y.innerHTML=`\u7ECF\u5EA6\uFF1A${B}`,C.innerHTML=`\u7EAC\u5EA6\uFF1A${M}`,m.innerHTML=`\u89C6\u70B9\u9AD8\uFF1A${T}\u7C73`}},Yi.MOUSE_MOVE)};var Tlt=Dlt;function cu(){}cu.parseBaseData=function(o,A){let f=[];if(O(A)&&O(A.imageryProviders))for(let C=0;C<A.imageryProviders.length;C++){let y=A.imageryProviders[C];if(y.enable===!1||y.show===!1)continue;if(O(y.tilingScheme)){let v=y.tilingScheme;v.type==="GeographicTilingScheme"&&(y.tilingScheme=new mg(v))}let x=i2.createImageryLayer(y);f.push(x)}let m=[];if(O(A)&&O(A.terrainProviders))for(let C=0;C<A.terrainProviders.length;C++){let y=A.terrainProviders[C];if(y.enable===!1||y.show===!1)continue;let x=i2.createTerrainLayer(y);m.push(x)}return{imageryProvider:f,terrainProvider:m}};cu.parse=function(o,A){if(!O(A))return;let f=[Zs.IMAGERYPROVIDERS,Zs.TERRAINPROVIDERS,Zs.MODELLAYERS,Zs.FEATURELAYERS,Zs.USERSCENE];for(let m=0;m<f.length;m++){let C=o.factory.createSceneNode(i2.createUUID(),f[m]);C.show=!0,o.userScene.addChild(o.userScene.rootNode,C)}O(A[Zs.IMAGERYPROVIDERS])&&HH(o,A[Zs.IMAGERYPROVIDERS],o.userScene.rootNode.getChildByIndex(0),0),O(A[Zs.TERRAINPROVIDERS])&&HH(o,A[Zs.TERRAINPROVIDERS],o.userScene.rootNode.getChildByIndex(1),1),O(A[Zs.MODELLAYERS])&&HH(o,A[Zs.MODELLAYERS],o.userScene.rootNode.getChildByIndex(2)),O(A[Zs.FEATURELAYERS])&&HH(o,A[Zs.FEATURELAYERS],o.userScene.rootNode.getChildByIndex(3)),O(A[Zs.USERSCENE])&&HH(o,A[Zs.USERSCENE],o.userScene.rootNode.getChildByIndex(4))};function HH(o,A,f,m){for(let C=0;C<A.length;C++){let y=A[C],x=null;if(y.enable===!1)continue;O(y.class)?(y.class==="IMAGERY"&&(y.class=vo.IMAGERY_LAYER),y.class==="TERRAIN"&&(y.class=vo.TERRAIN_LAYER),x=y.class):(m===0?y.class=vo.IMAGERY_LAYER:m===1&&(y.class=vo.TERRAIN_LAYER),x=y.class);let v=cu.parserMap[x];v!==void 0&&v(o,y,f)}}function rRi(o,A,f){let m=o.factory.createSceneNode(A.id,A.name);m.show=Ae(A.show,!0),o.userScene.addChild(f,m),O(A.childNodes)&&HH(o,A.childNodes,m)}function nRi(o,A,f){let m=A;if(O(m.tilingScheme)){let C=m.tilingScheme;C.type==="GeographicTilingScheme"&&(m.tilingScheme=new mg(C))}o.factory.createImageryLayer(m,f)}function oRi(o,A,f){let m=A;o.factory.createTerrainLayer(m,f)}function aRi(o,A,f){let m=A;m.addToMap=!0;let C=m.sourceType;C==="3DTiles"||C==="b3dm"||C==="osgb"||C==="s3m"||C==="ude_block"||C==="ude_model"?o.factory.createModelLayer(m,f):C==="czml"?o.factory.createCZMLObject(m,f):C==="wfsModel"&&o.factory.createWfsModel(m,f)}function sRi(o,A,f){let m=o.factory.createFeatureLayer(A,f)}function lRi(o,A,f){o.coreMap.scene.skyBox=new J5({sources:{positiveX:A.positiveX,negativeX:A.negativeX,positiveY:A.positiveY,negativeY:A.negativeY,positiveZ:A.positiveZ,negativeZ:A.negativeZ}})}function uRi(o,A,f){o.camera.undergroundMode=Ae(A.underGround,!1),o.shadows=Ae(A.shadow,!1),A.rain===!0&&o.environment.showEffect("rain"),A.snow===!0&&o.environment.showEffect("snow"),A.fog===!0&&o.environment.showEffect("fog"),o.coreMap.scene.globe.depthTestAgainstTerrain=Ae(A.depthTest,!1),A.bwMode===!0&&o.environment.showEffect("bwMode"),A.nightMode===!0&&o.environment.showEffect("nightMode"),A.colorAdjustment.show===!0&&(o.environment.showEffect("colorAdjustment"),o.environment.colorAdjustment.contrast=A.colorAdjustment.contrast,o.environment.colorAdjustment.saturation=A.colorAdjustment.saturation,o.environment.colorAdjustment.brightness=A.colorAdjustment.brightness)}function cRi(o,A,f){o.camera.viewPoint=A,o.camera.flyTo(A.lon,A.lat,A.alt,A.heading,A.pitch,A.roll,A.duration)}function ARi(o,A,f){o.factory.createModel(A,f)}function hRi(o,A,f){o.factory.createWaters(A,f)}function dRi(o,A,f){o.factory.createExplosion(A,f)}function fRi(o,A,f){o.factory.createFireworks(A,f)}function gRi(o,A,f){o.factory.createSmoke(A,f)}function pRi(o,A,f){o.factory.createFire(A,f)}function mRi(o,A,f){A.color&&(A.color=new ht(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createRadarScan(A,f)}function CRi(o,A,f){A.color&&(A.color=new ht(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createCircleScan(A,f)}function yRi(o,A,f){A.color&&(A.color=new ht(A.color.red,A.color.green,A.color.blue,A.color.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createPoint(A,f)}function xRi(o,A,f){A.fillColor&&(A.fillColor=new ht(A.fillColor.red,A.fillColor.green,A.fillColor.blue,A.fillColor.alpha)),o.factory.createLabel(A,f)}function vRi(o,A,f){o.factory.createBillboard(A,f)}function ERi(o,A,f){A.positions&&(A.positions=cu.array2DtoMercator(A.positions)),A.lineColor&&(A.lineColor=new ht(A.lineColor.red,A.lineColor.green,A.lineColor.blue,A.lineColor.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),o.factory.createPolyline(A,f)}function IRi(o,A,f){A.material&&(A.material=new ht(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.positions&&(A.positions=cu.array2DtoMercator(A.positions)),o.factory.createPolygon(A,f)}function _Ri(o,A,f){A.coordinates&&(A.coordinates=Di.fromDegrees(A.coordinates[0],A.coordinates[1],A.coordinates[2],A.coordinates[3])),A.fillColor&&(A.fillColor=new ht(A.fillColor.red,A.fillColor.green,A.fillColor.blue,A.fillColor.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),o.factory.createRectangle(A,f)}function BRi(o,A,f){o.factory.createEllipse(A,f)}function wRi(o,A,f){A.material&&(A.material=new ht(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=te.fromDegrees(A.position[0],A.position[1],A.position[2])),A.dimensions&&(A.dimensions=new te(A.dimensions.x,A.dimensions.y,A.dimensions.z)),o.factory.createBox(A,f)}function bRi(o,A,f){A.material&&(A.material=new ht(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=te.fromDegrees(A.position[0],A.position[1],A.position[2])),A.radii&&(A.radii=new te(A.radii[0],A.radii[1],A.radii[2])),o.factory.createEllipsoid(A,f)}function QRi(o,A,f){A.material&&(A.material=new ht(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=te.fromDegrees(A.position[0],A.position[1],A.position[2])),o.factory.createCylinder(A,f)}function SRi(o,A,f){o.factory.createPolylineVolume(A,f)}function DRi(o,A,f){o.factory.createVideoProjection(A,f)}function TRi(o,A,f){o.factory.createVideoProjection(A,f)}function MRi(o,A,f){o.factory.createTrack(A,f)}function PRi(o,A,f){o.factory.createHeatmap(A,f)}function RRi(o,A,f){o.factory.createEChartLayer(A,f)}function LRi(o,A,f){let m=o.factory.createElement(A);o.userScene.addChild(f,m)}cu.array2DtoMercator=function(o){let A=[];return o.forEach(function(f){let m=te.fromDegrees(f[0],f[1],f[2]);A.push(m)}),A};cu.parserMap={};cu.parserMap[vo.NODE]=rRi;cu.parserMap[vo.IMAGERY_LAYER]=nRi;cu.parserMap[vo.TERRAIN_LAYER]=oRi;cu.parserMap[vo.MODEL_LAYER]=aRi;cu.parserMap[vo.FEATURE_LAYER]=sRi;cu.parserMap[vo.SKYBOX]=lRi;cu.parserMap[vo.ENVIRONMENT]=uRi;cu.parserMap[vo.VIEWPOINT]=cRi;cu.parserMap[vo.MODEL]=ARi;cu.parserMap[vo.WATERS]=hRi;cu.parserMap[vo.EXPLOSION]=dRi;cu.parserMap[vo.FIREWORK]=fRi;cu.parserMap[vo.SMOKE]=gRi;cu.parserMap[vo.FIRE]=pRi;cu.parserMap[vo.RADARSCAN]=mRi;cu.parserMap[vo.CIRCLESCAN]=CRi;cu.parserMap[vo.POINT]=yRi;cu.parserMap[vo.LABEL]=xRi;cu.parserMap[vo.BILLBOARD]=vRi;cu.parserMap[vo.POLYLINE]=ERi;cu.parserMap[vo.POLYGON]=IRi;cu.parserMap[vo.RECTANGLE]=_Ri;cu.parserMap[vo.ELLIPSE]=BRi;cu.parserMap[vo.BOX]=wRi;cu.parserMap[vo.ELLIPSOID]=bRi;cu.parserMap[vo.CYLINDER]=QRi;cu.parserMap[vo.POLYLINEVOLUME]=SRi;cu.parserMap[vo.PERSPECTIVE_VIDEO_PROJECTION]=DRi;cu.parserMap[vo.FISHEYE_VIDEO_PROJECTION]=TRi;cu.parserMap[vo.TRACK]=MRi;cu.parserMap[vo.HEATMAP]=PRi;cu.parserMap[vo.ECHARTLAYER]=RRi;cu.parserMap.ELEMENT=LRi;var Mlt=cu;var pIe=class extends Ja{constructor(A,f,m,C){super(A,m,C),this.editBillboard=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editBillboard=f,O(this.editBillboard)&&O(this.editBillboard.entity.billboard)?console.info(this.editBillboard.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Billboard entity is need!"}))}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editBillboard.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editBillboard.entity)||this.pickObject(A,this.editBillboard.entity))&&this.mCallback&&this.mCallback(this.editBillboard),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editBillboard.entity.position=m}return this.mCallback&&this.mCallback(this.editBillboard),!0}updateBillboard(A){if(O(A)&&O(this.editBillboard)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editBillboard.entity.position=A[C]:O(A[C])&&(this.editBillboard.entity.billboard[C]=A[C])}}}endEditEntity(){}},Plt=pIe;var mIe=class extends Ja{constructor(A,f,m,C){super(A,m,C),this.editPoint=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editPoint=f,O(this.editPoint)&&O(this.editPoint.entity.point)?console.info(this.editPoint.entity.point):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Point entity is need!"}))}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPoint.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPoint.entity)||this.pickObject(A,this.editPoint.entity))&&this.mCallback&&this.mCallback(this.editPoint),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editPoint.entity.position=m}return this.mCallback&&this.mCallback(this.editPoint),!0}updatePoint(A){if(O(A)&&O(this.editPoint)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editPoint.entity.position=A[C]:O(A[C])&&(this.editPoint.entity.point[C]=A[C])}}}endEditEntity(){}},Rlt=mIe;var CIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editBox=void 0,this.pickedEntity=void 0,this.editHeightPoint=void 0,this.editWHPoint=void 0,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=void 0,this.isEditing=!1,this.pointsId=[],this.height=0,this.dragPosition=void 0,this.editBox=f,O(this.editBox)&&O(this.editBox.entity.box)){let y=this.editBox.entity.position._value,x=$t.fromCartesian(y);this.height=x.height;let v=new te,E=new te;this.getNorthPointByDistance(v,E),this.editHeightPoint=this.mEarthCtrl.entities.add({name:"box_edit_height_point",position:v,point:{heightReference:this.editBox.entity.box.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.editHeightPoint.id),this.editWHPoint=this.mEarthCtrl.entities.add({name:"box_edit_long_width_point",position:E,point:{heightReference:this.editBox.entity.box.heightReference,color:ht.RED,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.editWHPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Box entity is need!"})}addHeight(A){let f=this.editBox.entity.position._value,m=$t.fromCartesian(f);return this.height=m.height+A,te.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C;console.info(this.editBox.entity.position),O(m)?C=this.editBox.entity.position.getValue(m):C=this.editBox.entity.position._value;let y=Kn.eastNorthUpToFixedFrame(C),x=new te,v=this.editBox.entity.box.dimensions._value;v||(v=this.editBox.entity.box.dimensions.getValue(m)),te.divideByScalar(v,2,x),te.clone(x,A),te.clone(x,f),A.y*=-1,Ze.multiplyByPoint(y,A,A),f.y*=-1,f.z*=-1,Ze.multiplyByPoint(y,f,f)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editBox.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=void 0):f.name==="box_edit_height_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=f,this.pickEditWHPoint=void 0):f.name==="box_edit_long_width_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editBox)||this.pickObject(A,this.editBox.entity))&&this.mCallback&&this.mCallback(this.editBox),this.currentPoint=void 0,this.isEditing=!1,this.dragPosition=void 0,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;let f=new Date,m=gi.fromDate(f);if(O(this.currentPoint)||O(this.pickEditHeightPoint)||O(this.pickEditWHPoint)){let C=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,y=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,C);if(!y)return;let x=$t.fromCartesian(y),v=te.fromRadians(x.longitude,x.latitude,x.height+this.height);if(O(this.currentPoint))this.currentPoint.position=v,this.editBox.entity.position=new Qn(function(){return v},!1);else if(O(this.dragPosition)){if(O(this.pickEditWHPoint)){let w=te.subtract(y,this.dragPosition,new te),Q=te.normalize(w,new te);te.dot(w,Q,w);let M=this.editBox.entity.box.dimensions._value;M||(M=this.editBox.entity.box.dimensions.getValue(m));let B=te.clone(M);B.x-=w.x,B.y+=w.y,te.abs(B,B),this.editBox.entity.box.dimensions=new Qn(function(){return B},!1)}else if(O(this.pickEditHeightPoint)){let w=te.subtract(y,this.dragPosition,new te),Q=this.editBox.entity.box.dimensions._value;Q||(Q=this.editBox.entity.box.dimensions.getValue(m));let M=te.clone(Q);M.z+=w.z,te.abs(M,M),this.editBox.entity.box.dimensions=M,this.editBox.entity.position=this.addHeight(w.z/2)}}this.dragPosition=y;let E=new te,I=new te;this.getNorthPointByDistance(E,I,m),this.editHeightPoint.position=E,this.editWHPoint.position=I}return this.mCallback&&this.mCallback(this.editBox),!0}updateBox(A){if(O(A)&&O(this.editBox)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editBox.entity.position=A[C]:O(A[C])&&(this.editBox.entity.box[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Llt=CIe;var yIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editCylinder=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.pointsId=[],this.height=0,this.topRadiusPoint=void 0,this.pickTopRadiusPoint=void 0,this.bottomRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0,this.heightPoint=void 0,this.pickHeightPoint=void 0,this.dragPosition=void 0,this.editCylinder=f,O(this.editCylinder)&&O(this.editCylinder.entity.cylinder)){let y=this.editCylinder.entity.position._value,x=$t.fromCartesian(y);this.height=x.height;let v=this.editCylinder.entity.cylinder.topRadius._value,E=this.editCylinder.entity.cylinder.bottomRadius._value,I=new te,w=new te,Q=new te;this.getNorthPointByDistance(I,w,Q),this.heightPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_height_point",position:Q,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.heightPoint.id),v>0&&(this.topRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_top_radius_point",position:I,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:ht.RED,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.topRadiusPoint.id)),E>0&&(this.bottomRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_bottom_radius_point",position:w,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:ht.RED,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.bottomRadiusPoint.id))}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Cylinder entity is need!"})}addHeight(A){let f=this.editCylinder.entity.position._value,m=$t.fromCartesian(f);return this.height=m.height+A,te.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C=this.editCylinder.entity.position._value,y=Kn.eastNorthUpToFixedFrame(C),x=this.editCylinder.entity.cylinder.length._value,v=this.editCylinder.entity.cylinder.topRadius._value,E=this.editCylinder.entity.cylinder.bottomRadius._value;v>0&&(A.z+=x/2,A.x+=v,Ze.multiplyByPoint(y,A,A)),E>0&&(f.x+=E,f.z-=x/2,Ze.multiplyByPoint(y,f,f)),m.z+=x/2,Ze.multiplyByPoint(y,m,m)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editCylinder.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_height_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=f,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_top_radius_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=f,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_bottom_radius_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editCylinder)||this.pickObject(A,this.editCylinder.entity))&&this.mCallback&&this.mCallback(this.editCylinder),this.currentPoint=void 0,this.dragPosition=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.heightPoint)||O(this.topRadiusPoint)||O(this.bottomRadiusPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=$t.fromCartesian(m),y=te.fromRadians(C.longitude,C.latitude,C.height+this.height);if(O(this.currentPoint))this.currentPoint.position=y,this.editCylinder.entity.position=y;else if(O(this.dragPosition)){if(O(this.pickHeightPoint)){let Q=te.subtract(m,this.dragPosition,new te),M=this.editCylinder.entity.cylinder.length._value;M+=Q.z,M=Math.abs(M),this.editCylinder.entity.position=this.addHeight(Q.z/2),this.editCylinder.entity.cylinder.length=M}else if(O(this.pickTopRadiusPoint)){let Q=te.subtract(m,this.dragPosition,new te),M=this.editCylinder.entity.cylinder.topRadius._value;M-=Q.x,M=Math.abs(M),this.editCylinder.entity.cylinder.topRadius=M}else if(O(this.pickBottomRadiusPoint)){let Q=te.subtract(m,this.dragPosition,new te),M=this.editCylinder.entity.cylinder.bottomRadius._value;M-=Q.x,M=Math.abs(M),this.editCylinder.entity.cylinder.bottomRadius=M}}this.dragPosition=m;let x=this.editCylinder.entity.cylinder.topRadius._value,v=this.editCylinder.entity.cylinder.bottomRadius._value,E=new te,I=new te,w=new te;this.getNorthPointByDistance(E,I,w),x>0&&(this.topRadiusPoint.position=E),v>0&&(this.bottomRadiusPoint.position=I),this.heightPoint.position=w}return this.mCallback&&this.mCallback(this.editCylinder),!0}updateCylinder(A){if(O(A)&&O(this.editCylinder)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editCylinder.entity.position=A[C]:O(A[C])&&(this.editCylinder.entity.cylinder[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Flt=yIe;var xIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editEllipse=void 0,this.pickedEntity=void 0,this.semiMajorAxisPoint=void 0,this.semiMinorAxisPoint=void 0,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=void 0,this.pointsId=[],this.isEditing=!1,this.circle=!1,this.editEllipse=f,O(this.editEllipse)&&O(this.editEllipse.entity.ellipse)){let y=qe.PI_OVER_TWO,x=this.updatePoint(y);this.semiMajorAxisPoint=this.mEarthCtrl.entities.add({name:"semi_major_axis_point",position:x,point:{heightReference:this.editEllipse.entity.ellipse.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.semiMajorAxisPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipse entity is need!"})}updatePoint(A){let f=new te,m=new te,C=new te,y=this.editEllipse.entity.ellipse;this.semiMinorAxis=y.semiMinorAxis._value,this.semiMajorAxis=y.semiMajorAxis._value,this.circle=this.semiMajorAxis===this.semiMinorAxis;let x=Ae(y.rotation,0);this.center=this.editEllipse.entity.position._value;let v=this.semiMinorAxis*this.semiMinorAxis,E=this.semiMajorAxis*this.semiMajorAxis,I=this.semiMajorAxis*this.semiMinorAxis,w=te.magnitude(this.center),Q=te.normalize(this.center,f),M=te.cross(te.UNIT_Z,this.center,m);M=te.normalize(M,M);let B=te.cross(Q,M,C),T=new te;return N1.pointOnEllipsoid(A,x,B,M,v,I,E,w,Q,T)}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editEllipse.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=void 0):f.name==="semi_minor_axis_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=f):f.name==="semi_major_axis_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=f,this.pickSemiMinorAxisPoint=void 0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editEllipse)||this.pickObject(A,this.editEllipse.entity))&&this.mCallback&&this.mCallback(this.editEllipse),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.pickSemiMajorAxisPoint)||O(this.pickSemiMinorAxisPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;if(O(this.currentPoint))this.currentPoint.position=m,this.editEllipse.entity.position=m;else if(O(this.pickSemiMajorAxisPoint)){let C=te.distance(this.center,m);this.editEllipse.entity.ellipse.semiMajorAxis=C;let y=C*this.semiMinorAxis/this.semiMajorAxis;y>C&&(y=C),this.editEllipse.entity.ellipse.semiMinorAxis=y}else if(O(this.pickSemiMinorAxisPoint)){let C=te.distance(this.center,m);this.editEllipse.entity.ellipse.semiMinorAxis=C}this.semiMajorAxisPoint.position=this.updatePoint(qe.PI_OVER_TWO)}return this.mCallback&&this.mCallback(this.editEllipse),!0}updateEllipse(A){if(O(A)&&O(this.editEllipse)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editEllipse.entity.position=A[C]:O(A[C])&&(this.editEllipse.entity.ellipse[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Nlt=xIe;var vIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editEllipsoid=void 0,this.pickedEntity=void 0,this.height=0,this.isEditing=!1,this.pointsId=[],this.radiiXPoint=void 0,this.pickRadiiXPoint=void 0,this.radiiYPoint=void 0,this.pickRadiiYPoint=void 0,this.radiiZPoint=void 0,this.pickRadiiZPoint=void 0,this.dragPosition=void 0,this.editEllipsoid=f,O(this.editEllipsoid)&&O(this.editEllipsoid.entity.ellipsoid)){console.info(this.editEllipsoid.ellipsoid);let y=this.editEllipsoid.entity.position._value,x=$t.fromCartesian(y);this.height=x.height;let v=new te,E=new te,I=new te;this.getNorthPointByDistance(v,E,I),this.radiiXPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_x_point",position:v,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiXPoint.id),this.radiiYPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_y_point",position:E,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiYPoint.id),this.radiiZPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_z_point",position:I,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiZPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipsoid entity is need!"})}addHeight(A){let f=this.editEllipsoid.entity.position._value,m=$t.fromCartesian(f);return this.height=m.height+A,te.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C=this.editEllipsoid.entity.position._value,y=Kn.eastNorthUpToFixedFrame(C),x=this.editEllipsoid.entity.ellipsoid.radii._value;A.x=x.x,Ze.multiplyByPoint(y,A,A),f.y=-x.y,Ze.multiplyByPoint(y,f,f),m.z=x.z,Ze.multiplyByPoint(y,m,m)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editEllipsoid.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_x_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=f,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_y_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=f,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_z_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editEllipsoid)||this.pickObject(A,this.editEllipsoid.entity))&&this.mCallback&&this.mCallback(this.editEllipsoid),this.currentPoint=void 0,this.dragPosition=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.pickRadiiXPoint)||O(this.pickRadiiYPoint)||O(this.pickRadiiZPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=$t.fromCartesian(m),y=te.fromRadians(C.longitude,C.latitude,C.height+this.height);if(O(this.currentPoint))this.currentPoint.position=y,this.editEllipsoid.entity.position=y;else{if(O(this.dragPosition)){let I=te.subtract(m,this.dragPosition,new te),w=te.normalize(I,new te);te.dot(I,w,I);let Q=this.editEllipsoid.entity.ellipsoid.radii._value,M=te.clone(Q);O(this.pickRadiiXPoint)?M.x-=I.x:O(this.pickRadiiYPoint)?M.y+=I.y:O(this.pickRadiiZPoint)&&(M.z+=I.z,this.editEllipsoid.entity.position=this.addHeight(I.z)),te.abs(M,M),this.editEllipsoid.entity.ellipsoid.radii=M}this.dragPosition=m}let x=new te,v=new te,E=new te;this.getNorthPointByDistance(x,v,E),this.radiiXPoint.position=x,this.radiiYPoint.position=v,this.radiiZPoint.position=E}return this.mCallback&&this.mCallback(this.editEllipsoid),!0}updateEllipsoid(A){if(O(A)&&O(this.editEllipsoid)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editEllipsoid.entity.position=A[C]:O(A[C])&&(this.editEllipsoid.entity.ellipsoid[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},klt=vIe;var EIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolygon=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolygon=f,O(this.editPolygon)&&O(this.editPolygon.entity.polygon))for(let y=0;y<this.editPolygon.entity.polygon.hierarchy._value.positions.length;y++){let x=this.editPolygon.entity.polygon.hierarchy._value.positions[y],v=this.mEarthCtrl.entities.add({name:"polygon_point",position:x,point:{color:ht.WHITE,pixelSize:8,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polygon entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolygon.entity.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="polygon_point"&&(this.currentPoint=f,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolygon)||this.pickObject(A,this.editPolygon.entity))&&this.mCallback&&this.mCallback(this.editPolygon),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolygon.entity.polygon.hierarchy=C}return this.mCallback&&this.mCallback(this.editPolygon),!0}updatePolygon(A){if(O(A)&&O(this.editPolygon)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];O(A[C])&&(this.editPolygon.entity.polygon[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Olt=EIe;var IIe=class extends Ja{constructor(A,f,m,C){super(A,m,C),this.editModel=void 0,this.pickedEntity=void 0,this.editColor=ht.RED.withAlpha(.8),this.isEditing=!1,this.editModel=f,this.oldColor=this.editModel.entity.color,this.editModel.entity.color=this.editColor,O(this.editModel)&&O(this.editModel.entity)?console.info(this.editModel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"gltf Model is need!"}))}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f===this.editModel.parameter.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editModel)||this.pickObject(A,this.editModel.entity))&&this.mCallback&&this.mCallback(this.editModel),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=$t.fromCartesian(m),y=$t.clone(C);y.longitude=qe.toDegrees(y.longitude),y.latitude=qe.toDegrees(y.latitude),this.editModel.lon=y.longitude,this.editModel.lat=y.latitude}return this.mCallback&&this.mCallback(this.editModel),!0}updateModel(A){if(O(A)&&O(this.editModel)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];if(O(A[C]))switch(C){case"lon":case"lat":case"alt":case"heading":case"pitch":case"roll":this.editModel[C]=A[C];break;default:this.editModel.entity[C]=A[C];break}}}}endEditEntity(){this.editModel.entity.color=this.oldColor}},Ult=IIe;var _Ie=class extends Ja{constructor(A,f,m,C){super(A,m,C),this.editLabel=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editLabel=f,O(this.editLabel)&&O(this.editLabel.entity.label)?console.info(this.editLabel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Label entity is need!"}))}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editLabel.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editLabel.entity)||this.pickObject(A,this.editLabel.entity))&&this.mCallback&&this.mCallback(this.editLabel),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editLabel.entity.position=m}return this.mCallback&&this.mCallback(this.editLabel),!0}updateLabel(A){if(O(A)&&O(this.editLabel)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editLabel.entity.position=A[C]:O(A[C])&&(this.editLabel.entity.label[C]=A[C])}}}endEditEntity(){}},Glt=_Ie;var BIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolyline=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolyline=f,O(this.editPolyline)&&O(this.editPolyline.polyline))for(let y=0;y<this.editPolyline.polyline.positions._value.length;y++){let x=this.editPolyline.polyline.positions._value[y],v=this.mEarthCtrl.entities.add({name:"polyline_point",position:x,point:{color:ht.WHITE,pixelSize:8,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polyline entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolyline.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="polyline_point"&&(this.currentPoint=f,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolyline)||this.pickObject(A,this.editPolyline.entity))&&this.mCallback&&this.mCallback(this.editPolyline),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolyline.polyline.positions=C}return this.mCallback&&this.mCallback(this.editPolyline),!0}updatePolyline(A){if(O(A)&&O(this.editPolyline)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];O(A[C])&&(this.editPolyline.polyline[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Hlt=BIe;var wIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolylineVolume=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolylineVolume=f,O(this.editPolylineVolume)&&O(this.editPolylineVolume.entity.polylineVolume))for(let y=0;y<this.editPolylineVolume.entity.polylineVolume.positions._value.length;y++){let x=this.editPolylineVolume.entity.polylineVolume.positions._value[y],v=this.mEarthCtrl.entities.add({name:"edit_polylineVolume_point",position:x,point:{color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"PolylineVolume entity is need!"})}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolylineVolume.entity.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="edit_polylineVolume_point"&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolylineVolume)||this.pickObject(A,this.editPolylineVolume.entity))&&this.mCallback&&this.mCallback(this.editPolylineVolume),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolylineVolume.entity.polylineVolume.positions=C}return this.mCallback&&this.mCallback(this.editPolylineVolume),!0}updatePolylineVolume(A){if(O(A)&&O(this.editPolylineVolume)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editPolylineVolume.entity.position=A[C]:O(A[C])&&(this.editPolylineVolume.entity.polylineVolume[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Vlt=wIe;var bIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editRectangle=void 0,this.pickedEntity=void 0,this.leftTopPoint=void 0,this.rightBottomPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editRectangle=f,O(this.editRectangle)&&O(this.editRectangle.entity.rectangle)){let y=this.editRectangle.entity.rectangle.coordinates._value,x=this.editRectangle.entity.rectangle.height._value,v=Di.northwest(y),E=te.fromRadians(v.longitude,v.latitude,x),I=this.mEarthCtrl.entities.add({name:"rect_left_top_point",position:E,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:ht.WHITE,pixelSize:8,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(I.id),v=Di.southeast(y);let w=te.fromRadians(v.longitude,v.latitude,x),Q=this.mEarthCtrl.entities.add({name:"rect_right_bottom_point",position:w,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:ht.WHITE,pixelSize:8,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(Q.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Rectangle entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editRectangle.entity.id?(this.isEditing=!0,this.leftTopPoint=void 0,this.rightBottomPoint=void 0):f.name==="rect_left_top_point"?(this.leftTopPoint=f,this.rightBottomPoint=void 0,this.isEditing=!0):f.name==="rect_right_bottom_point"&&(this.rightBottomPoint=f,this.leftTopPoint=void 0,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editRectangle)||this.pickObject(A,this.editRectangle.entity))&&this.mCallback&&this.mCallback(this.editRectangle),this.leftTopPoint=void 0,this.rightBottomPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.leftTopPoint)||O(this.rightBottomPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=$t.fromCartesian(m),y=this.editRectangle.entity.rectangle.coordinates._value;O(this.leftTopPoint)?(this.leftTopPoint.position=m,y.west=C.longitude,y.north=C.latitude):O(this.rightBottomPoint)&&(this.rightBottomPoint.position=m,y.south=C.latitude,y.east=C.longitude),this.editRectangle.entity.rectangle.coordinates=y}return this.mCallback&&this.mCallback(this.editRectangle),!0}updateRectangle(A){if(O(A)&&O(this.editRectangle)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editRectangle.entity.position=A[C]:O(A[C])&&(this.editRectangle.entity.rectangle[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},zlt=bIe;function wd(o){this._earthCtrl=o,this._coreMap=o.coreMap}wd.prototype.editPoint=function(o,A){this._earthCtrl.tools.clearTool();let f=new Rlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("point_edit_tool",f),f};wd.prototype.updatePoint=function(o,A){o.updatePoint(A)};wd.prototype.editPolyline=function(o,A){this._earthCtrl.tools.clearTool();let f=new Hlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polyline_edit_tool",f),f};wd.prototype.updatePolyline=function(o,A){o.updatePolyline(A)};wd.prototype.editPolygon=function(o,A){this._earthCtrl.tools.clearTool();let f=new Olt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polygon_edit_tool",f),f};wd.prototype.updatePolygon=function(o,A){o.updatePolygon(A)};wd.prototype.editBox=function(o,A){this._earthCtrl.tools.clearTool();let f=new Llt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("box_edit_tool",f),f};wd.prototype.updateBox=function(o,A){o.updateBox(A)};wd.prototype.editEllipsoid=function(o,A){this._earthCtrl.tools.clearTool();let f=new klt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("ellipsoid_edit_tool",f),f};wd.prototype.updateEllipsoid=function(o,A){o.updateEllipsoid(A)};wd.prototype.editCylinder=function(o,A){this._earthCtrl.tools.clearTool();let f=new Flt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("cylinder_edit_tool",f),f};wd.prototype.updateCylinder=function(o,A){o.updateCylinder(A)};wd.prototype.editModel=function(o,A){this._earthCtrl.tools.clearTool();let f=new Ult(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("model_edit_tool",f),f};wd.prototype.updateModel=function(o,A){o.updateModel(A)};wd.prototype.editBillboard=function(o,A){this._earthCtrl.tools.clearTool();let f=new Plt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("billboard_edit_tool",f),f};wd.prototype.updateBillboard=function(o,A){o.updateBillboard(A)};wd.prototype.editLabel=function(o,A){this._earthCtrl.tools.clearTool();let f=new Glt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("label_edit_tool",f),f};wd.prototype.updateLabel=function(o,A){o.updateLabel(A)};wd.prototype.editRectangle=function(o,A){this._earthCtrl.tools.clearTool();let f=new zlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("rectangle_edit_tool",f),f};wd.prototype.updateRectangle=function(o,A){o.updateRectangle(A)};wd.prototype.editEllipse=function(o,A){this._earthCtrl.tools.clearTool();let f=new Nlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("ellipse_edit_tool",f),f};wd.prototype.updateEllipse=function(o,A){o.updateEllipse(A)};wd.prototype.editPolylineVolume=function(o,A){this._earthCtrl.tools.clearTool();let f=new Vlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polylinevolume_edit_tool",f),f};wd.prototype.updatePolylineVolume=function(o,A){o.updatePolylineVolume(A)};wd.prototype.endEditEntity=function(o){this._earthCtrl.tools.clearTool(),o.endEditEntity(),this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!0,this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!0};var Moe=wd;function fy(o){this.mEarthCtrl=o,this.scene=this.mEarthCtrl.coreMap.scene,this.entities=this.mEarthCtrl.entities,this.camera=this.mEarthCtrl.coreMap.camera,this._points=[],this.item=void 0}fy.prototype.horizontalDistance=function(o,A){let f=this,m=!1,C=[],y="",x=[],v,E=this.scene.globe.ellipsoid,I={spot:[],distance:[],label:[],polyline:[]},w={point:ht.RED,polyline:ht.fromRgba(4286644096)};O(A)&&(O(A.point)&&(w.point=A.point),O(A.polyline)&&(w.polyline=A.polyline));let Q=new k_;this.scene.primitives.add(Q);let M=new YA,B=new zr(f.scene.canvas),T=document.createElement("div");Zc(".map-widget",T),Zc(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let F=document.getElementById("toolTip");F.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let L;m=!0;let R=function(V){let U=0,W=`${0}\u7C73`,ie,ee,oe,ne,se,ce;for(let J=0;J<V.length-1;J+=1)ie=E.cartesianToCartographic(V[J]),ee=M.project(ie),oe=ee.x,ne=ee.y,ie=E.cartesianToCartographic(V[J+1]),ee=M.project(ie),se=ee.x,ce=ee.y,U=U+Math.sqrt((oe-se)*(oe-se)+(ne-ce)*(ne-ce));return U>0&&(W=`${U.toFixed(2)}\u7C73`),U/1e3>=1&&(W=`${(U/1e3).toFixed(2)}\u5343\u7C73`),W},k=function(){function V(U){if(!O(U))throw new Hi("positions is required!");if(U.length<2)throw new Hi("positions \u7684\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E2");let W=hs.fromType(hs.ColorType);W.uniforms.color=new ht(1,1,0,.5),this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:w.polyline,width:3,clampToGround:!0}},this.path=U,this._init()}return V.prototype._init=function(){let U=this,W=function(){return U.path};this.options.polyline.positions=new Qn(W,!1),this.lineEntity=f.entities.add(this.options),f.item=this.lineEntity,I.polyline.push(this.lineEntity)},V}();B.setInputAction(function(V){let U,W;F.style.left=`${V.endPosition.x+10}px`,F.style.top=`${V.endPosition.y+20}px`,F.style.display="block",F.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let ie=!1,ee=f.camera.getPickRay(V.endPosition);ee&&(U=f.scene.globe.pick(ee,f.scene));let oe=f.scene.pick(V.endPosition);if(oe){console.log("feature",oe);let ne=f.scene.pickPosition(V.endPosition);ne&&(U=ne),ie=!0}if(!!U&&(W=Pi.WGS84.cartesianToCartographic(U),W)){let ne;ie?ne=f.scene.sampleHeight(W):ne=f.scene.globe.getHeight(W);let se=te.fromDegrees(W.longitude/Math.PI*180,W.latitude/Math.PI*180,ne);if(m){if(C.length<1)return;O(v)?(v.path.pop(),v.path.push(se)):(C.push(se),v=new k(C));let ce=R(v.path);f.entities.remove(L),L=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:v.path[v.path.length-1],label:{text:`\u603B\u957F\uFF1A${ce}`,show:!0,font:"26px \u6977\u4F53",fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}})}}},Yi.MOUSE_MOVE);let G=function(V){x.push(V);let U=[];if(x.length>1){let W=x[x.length-2],ie=x[x.length-1],ee=Math.abs(W.longitude-ie.longitude)*1e7,oe=Math.abs(W.latitude-ie.latitude)*1e7;ee>oe&&(oe=ee);let ne=parseInt(oe/10);ne>1e3&&(ne=1e3),ne<2&&(ne=2);for(let se=0;se<ne;++se)U.push(new $t(qe.lerp(W.longitude,ie.longitude,se/(ne-1)),qe.lerp(W.latitude,ie.latitude,se/(ne-1))));U.push(ie.clone())}else U=x;if(U.length>0)for(let W=0;W<U.length;W++){V=U[W];let ie=f.scene.globe.getHeight(V),ee=te.fromDegrees(V.longitude/Math.PI*180,V.latitude/Math.PI*180,ie);C.push(ee)}};return B.setInputAction(function(V){let U,W,ie=!1,ee=f.camera.getPickRay(V.position);if(ee&&(U=f.scene.globe.pick(ee,f.scene)),f.scene.pick(V.position)){let ne=f.scene.pickPosition(V.position);ne&&(U=ne),ie=!0}if(U&&(W=Pi.WGS84.cartesianToCartographic(U)),W){let ne;ie?ne=f.scene.sampleHeight(W):ne=f.scene.globe.getHeight(W);let se=te.fromDegrees(W.longitude/Math.PI*180,W.latitude/Math.PI*180,ne);if(m){v&&v.path.pop(),G(W);let ce="0\u7C73";v&&(ce=R(v.path)),y=ce,I.spot.push(se),I.distance.push(ce);let J=f.entities.add({position:se,point:{pixelSize:5,color:w.point,outlineColor:ht.WHITE,outlineWidth:1,clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:ce,show:!0,font:"26px \u6977\u4F53",fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-20),clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}});I.label.push(J),f._points.push(J)}}},Yi.LEFT_CLICK),B.setInputAction(function(){f.entities.remove(L),f._points[f._points.length-1].label.text=y,B.destroy(),C.pop(),O(o)&&typeof o=="function"&&o(I),F.style.display="none"},Yi.RIGHT_CLICK),this};fy.prototype.spaceDistance=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m=new zr(f.scene.canvas),C=[],y=null,x="0\u7C73",v=null,E,I="",w,Q=document.createElement("div");Zc(".map-widget",Q),Zc(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let B=document.getElementById("toolTip");B.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let T={name:"",spot:[],distance:[],label:[],ployline:[]},D={point:ht.RED,polyline:ht.fromRgba(4286644096)};O(A)&&(O(A.point)&&(D.point=A.point),O(A.polyline)&&(D.polyline=A.polyline));let F=function(){function L(R){this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:D.polyline,width:3,clampToGround:!1}},this.positions=R,this._init()}return L.prototype._init=function(){let R=this,k=function(){return R.positions};this.options.polyline.positions=new Qn(k,!1);let G=f.entities.add(this.options);f.item=G,T.ployline.push(G);let V=f.getuid();T.name=`\u65B0\u5EFA\u7A7A\u95F4\u8DDD\u79BB${V}`},L}();return m.setInputAction(function(L){if(f.scene.bim){let R=f.scene.bim.PickWorldPositionSync(L.endPosition.x,L.endPosition.y);R[0]===0?v=f.scene.pickPosition(L.endPosition):v=new te(R[0],R[1],R[2]),console.log("????????",v)}else v=f.scene.pickPosition(L.endPosition);!v||(B.style.left=`${L.endPosition.x+10}px`,B.style.top=`${L.endPosition.y+20}px`,B.style.display="block",C.length>=2&&(O(y)?(C.pop(),C.push(v)):y=new F(C),B.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u53F3\u952E\u7ED3\u675F\uFF01</span>',x=f.getSpaceDistance(C)),f.entities.remove(w),w=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:C[C.length-1],label:{text:`\u603B\u957F\uFF1A${x}`,show:!0,font:"26px \u6977\u4F53",fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}}))},Yi.MOUSE_MOVE),m.setInputAction(function(L){if(f.scene.bim){let k=f.scene.bim.PickWorldPositionSync(L.position.x,L.position.y);k[0]===0?v=f.scene.pickPosition(L.position):v=new te(k[0],k[1],k[2]),console.log("????????",v)}else v=f.scene.pickPosition(L.position);if(!v)return;C.length===0&&C.push(v.clone()),C.push(v);let R=x;I=`\u603B\u957F\uFF1A${x}`,E=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:C[C.length-1],point:{pixelSize:5,color:D.point,outlineColor:ht.WHITE,outlineWidth:2,clampToGround:!1,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:R,show:!0,font:"26px \u6977\u4F53",fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-20),heightReference:In.NONE,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(E),T.spot.push(v),T.distance.push(x),T.label.push(E)},Yi.LEFT_CLICK),m.setInputAction(function(L){B.style.display="none",f.entities.remove(w),f._points.length>0&&(f._points[f._points.length-1].label.text=I),m.destroy(),C.pop(),O(o)&&typeof o=="function"&&o(T)},Yi.RIGHT_CLICK),this};fy.prototype.getSpaceDistance=function(o){let A=0,f="";for(let m=0;m<o.length-1;m++){let C=$t.fromCartesian(o[m]),y=$t.fromCartesian(o[m+1]),x=new xp;x.setEndPoints(C,y);let v=x.surfaceDistance;v=Math.sqrt(Math.pow(v,2)+Math.pow(y.height-C.height,2)),A=A+v}return A>=1e3?f=`${(A/1e3).toFixed(2)}\u5343\u7C73`:f=`${A.toFixed(2)}\u7C73`,f};fy.prototype.getPlaneArea=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m=0,C=new zr(f.scene._imageryLayerCollection),y=document.getElementById("toolTip");y||(Zc(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>'),y=document.getElementById("toolTip")),y.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB\uFF0C\u53F3\u952E\u7ED3\u675F\uFF01</span>';let x=[],v={},E=[],I=[],w=null,Q=null,M,B={point:ht.RED,polyline:ht.fromRgba(4286644096),polygon:ht.fromRgba(4286644096).withAlpha(.5)};O(A)&&(O(A.point)&&(B.point=A.point),O(A.polyline)&&(B.polyline=A.polyline),O(A.polygon)&&(B.polygon=A.polygon));let T={mj:0,label:[],polygon:[]};y.style.display="block";let D=function(){function F(L){this.options={name:"\u591A\u8FB9\u5F62",polygon:{hierarchy:[],perPositionHeight:!0,material:B.polygon,clampToGround:!1}},this.hierarchy=L,this._init()}return F.prototype._init=function(){let L=this,R=function(){return L.hierarchy};this.options.polygon.hierarchy=new Qn(R,!1),this.polygon=f.entities.add(this.options),f.item=this.polygon,f._entity=this.polygon,T.polygon=this.polygon},F}();return C.setInputAction(function(F){if(y.style.left=`${F.endPosition.x+10}px`,y.style.top=`${F.endPosition.y+20}px`,f.scene.bim){let V=f.scene.bim.PickWorldPositionSync(F.endPosition.x,F.endPosition.y);V[0]===0?Q=f.scene.pickPosition(F.endPosition):Q=new te(V[0],V[1],V[2])}else Q=f.scene.pickPosition(F.endPosition);if(!Q)return;let L=$t.fromCartesian(Q),R=qe.toDegrees(L.longitude),k=qe.toDegrees(L.latitude),G=L.height;if(x.length>=2){O(w)?(x.pop(),x.push(Q),v=new Hn(x),I.pop(),I.push({lon:R,lat:k,hei:G})):(v=new Hn(x),w=new D(v));let V=f.getArea(I,x);f.entities.remove(M),M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:x[x.length-1],label:{text:V,font:"26px \u6977\u4F53",show:!0,fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-40),heightReference:In.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),T.label=M}},Yi.MOUSE_MOVE),C.setInputAction(function(F){if(f.scene.bim){let V=f.scene.bim.PickWorldPositionSync(F.position.x,F.position.y);V[0]===0?Q=f.scene.pickPosition(F.position):Q=new te(V[0],V[1],V[2])}else Q=f.scene.pickPosition(F.position);if(!Q)return;let L=$t.fromCartesian(Q);console.log("\u5DE6\u952E\u70B9",L);let R=qe.toDegrees(L.longitude),k=qe.toDegrees(L.latitude),G=L.height;x.length===0&&(x.push(Q.clone()),v=new Hn(x),I.push({lon:R,lat:k,hei:G}),x.push(Q.clone()),v=new Hn(x),I.push({lon:R,lat:k,hei:G})),x.push(Q),v=new Hn(x),E.push({lon:R,lat:k,hei:G}),I.push({lon:R,lat:k,hei:G})},Yi.LEFT_CLICK),C.setInputAction(function(F){y.style.display="none",f.entities.remove(M),C.destroy();let L=f.getArea(I,x);m=L;let R=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:x[x.length-1],label:{text:L,font:"26px \u6977\u4F53",show:!0,fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-40),heightReference:In.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}});f._points.push(R),f._lable=R,T.mj=m,T.label=R,O(o)&&typeof o=="function"&&o(T)},Yi.RIGHT_CLICK),this};fy.prototype.getSurfaceArea3d=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m={mj:0,label:[],polygon:[]},C=!0,y=[],x={},v,E=f.scene,I=E.globe.ellipsoid,w=new k_;E.primitives.add(w);let Q,M,B=0,T={point:ht.RED,polyline:ht.fromRgba(4286644096),polygon:ht.fromRgba(4286644096).withAlpha(.5)};O(A)&&(O(A.point)&&(T.point=A.point),O(A.polyline)&&(T.polyline=A.polyline),O(A.polygon)&&(T.polygon=A.polygon));let D=document.createElement("div");Zc(".map-widget",D),Zc(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let L=document.getElementById("toolTip");L.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let R=new zr(E.canvas),k=function(){function V(U){if(!O(U))throw new Hi("positions is required!");if(U.length<3)throw new Hi("positions \u7684\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E3");this.options={polygon:{show:!0,hierarchy:void 0,material:T.polygon,clampToGround:!1}},this.path=U,this._init()}return V.prototype._init=function(){let U=this,W=function(){return U.path};this.options.polygon.hierarchy=new Qn(W,!1),this.polygonEntity=f.entities.add(this.options),f.item=this.polygonEntity,m.polygon=this.polygonEntity,f._entity=this.polygonEntity},V}();R.setInputAction(function(V){let U=0;f.entities.remove(M);let W,ie,ee=f.scene.camera.getPickRay(V.endPosition);ee&&(W=f.scene.globe.pick(ee,f.scene));let oe=f.scene.pick(V.endPosition),ne=!1;if(oe){let ce=f.scene.pickPosition(V.endPosition);ce&&(W=ce),ne=!0}if(!W)return;let se=function(ce){let J=new Array(ce.length),he=function(Ie){return Ie.longitude=Ie.longitude/Math.PI*180,Ie.latitude=Ie.latitude/Math.PI*180,Ie},Ce=function(Ie){let be=0;for(let Be=0;Be<Ie.length;Be++){let me=Ie[Be],z;Be<Ie.length-1?z=Ie[Be+1]:z=Ie[0],be+=me.x*z.y-z.x*me.y}return be/2};for(let Ie=0;Ie<ce.length;Ie++)J[Ie]=he(I.cartesianToCartographic(ce[Ie]));let Ee=0;for(let Ie=0;Ie<J.length;Ie++)Ee+=J[Ie].longitude;Ee=Ee/J.length;for(let Ie=0;Ie<J.length;Ie++)J[Ie]=f.Gauss_to_XY(J[Ie].longitude,J[Ie].latitude,Ee);return Math.abs(Ce(J))};if(ie=Pi.WGS84.cartesianToCartographic(W),ie&&C){if(L.style.left=`${V.endPosition.x+10}px`,L.style.top=`${V.endPosition.y+20}px`,L.style.display="block",y.length<2){B===1&&(M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:W,label:{text:`${U}\u5E73\u65B9\u5343\u7C73`,font:"26px \u6977\u4F53",show:!0,fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-40),heightReference:In.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(M),m.label=M);return}if(O(v)?(v.path.positions.pop(),v.path.positions.push(W)):(y.push(W),x=new Hn(y),v=new k(x)),y.length>=2){L.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u53F3\u952E\u7ED3\u675F\uFF01</span>';let ce=String(se(v.path.positions));ce=ce.substr(0,ce.indexOf(".",0)),ce.length<6?U=`${ce}\u5E73\u65B9\u7C73`:(ce=String(ce/1e6),ce=ce.substr(0,ce.indexOf(".",0)+3),U=`${ce}\u5E73\u65B9\u5343\u7C73`),m.mj=U,M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:W,label:{text:U,font:"26px \u6977\u4F53",show:!0,fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-40),heightReference:In.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(M),m.label=M}}},Yi.MOUSE_MOVE),R.setInputAction(function(V){let U;B=1;let W=f.scene.camera.getPickRay(V.position);W&&(U=f.scene.globe.pick(W,f.scene));let ie=f.scene.pick(V.position),ee=!1;if(ie){let oe=f.scene.pickPosition(V.position);oe&&(U=oe),ee=!0}U&&C&&(y.push(U),x=new Hn(y))},Yi.LEFT_CLICK),R.setInputAction(function(){R.removeInputAction(Yi.LEFT_CLICK),R.removeInputAction(Yi.LEFT_DOUBLE_CLICK),f.trackedEntity=void 0,C=!1,Q=w.add({show:!0,id:"measureTool",position:y[y.length-1],pixelOffset:new wt(0,20),eyeOffset:new te(0,0,0),horizontalOrigin:cA.CENTER,verticalOrigin:Bn.CENTER,scale:1,color:new ht(1,1,1,1)}),L.style.display="none",R.destroy(),O(o)&&typeof o=="function"&&o(m)},Yi.RIGHT_CLICK);let G=function(V){let U=0,W=0,ie=0;for(let oe=0;oe<V.length;oe++)U+=V[oe].x,W+=V[oe].y,ie+=V[oe].z;return new te(U/V.length,W/V.length,ie/V.length)};return this};fy.prototype.to_N=function(o){let f=63567523142e-4,m=Math.sqrt(6378137*6378137-f*f)/6378137;return 6378137/Math.sqrt(1-m*m*Math.sin(o)*Math.sin(o))};fy.prototype.to_Sm=function(o){let f=63567523142e-4,m=Math.sqrt(6378137*6378137-f*f)/6378137,C,y,x,v,E;return C=1+m*m*3/4+Math.pow(m,4)*45/64+Math.pow(m,6)*175/256+Math.pow(m,8)*11025/16384,y=Math.pow(m,2)*3/4+Math.pow(m,4)*15/16+Math.pow(m,6)*525/512+Math.pow(m,8)*2205/2048,x=Math.pow(m,4)*15/64+Math.pow(m,6)*105/256+Math.pow(m,8)*2205/4096,v=Math.pow(m,6)*35/512+Math.pow(m,8)*315/2048,E=Math.pow(m,8)*315/16384,6378137*(1-m*m)*(C*o-y/2*Math.sin(2*o)+x/4*Math.sin(4*o)-v/6*Math.sin(6*o)+E/8*Math.sin(8*o))};fy.prototype.to_Radian=function(o){return o*Math.PI/180};fy.prototype.Gauss_to_XY=function(o,A,f){let C=63567523142e-4,y=Math.sqrt(6378137*6378137-C*C)/C,x=0,v=0,E=0,I=0,w=this.to_Radian(f);A=this.to_Radian(A),o=this.to_Radian(o);let Q=o-w,M=Math.cos(A);I=this.to_N(A),E=I*Math.cos(A),x=Math.tan(A),v=y*M;let B=Math.pow(x,2),T=Math.pow(x,4),D=Math.pow(v,2),F=Math.pow(v,4),L=Math.pow(M,3),R=Math.pow(M,5),k=this.to_Sm(A)+Math.pow(Q,2)/2*E*M*x+Math.pow(Q,4)/24*x*E*L*(5-B+9*D+4*F)+Math.pow(Q,6)/720*x*E*R*(61-58*x*x+T+270*D-330*x*x*D),G=Q*I*M+Math.pow(Q,3)/6*I*L*(1-x*x+v*v)+Math.pow(Q,5)/120*I*R*(5-18*x*x+T+14*D-58*D*B);return new wt(G,k)};fy.prototype.getArea=function(o,A){let f=0;for(let m=0;m<o.length-2;m++){let C=(m+1)%o.length,y=(m+2)%o.length,x=this.Angle(o[m],o[C],o[y]),v=this.getdistance(A[m],A[C]),E=this.getdistance(A[C],A[y]);f+=v*E*Math.abs(Math.sin(x))}return f<1e6?f=`${f.toFixed(4)}\u5E73\u65B9\u7C73`:f=`${(f/1e6).toFixed(4)}\u5E73\u65B9\u5343\u7C73`,f};fy.prototype.getdistance=function(o,A){let f=$t.fromCartesian(o),m=$t.fromCartesian(A),C=new xp;C.setEndPoints(f,m);let y=C.surfaceDistance;return y=Math.sqrt(Math.pow(y,2)+Math.pow(m.height-f.height,2)),y};fy.prototype.Bearing=function(o,A){let f=Math.PI/180,m=180/Math.PI,C=o.lat*f,y=o.lon*f,x=A.lat*f,v=A.lon*f,E=-Math.atan2(Math.sin(y-v)*Math.cos(x),Math.cos(C)*Math.sin(x)-Math.sin(C)*Math.cos(x)*Math.cos(y-v));return E<0&&(E+=Math.PI*2),E=E*m,E};fy.prototype.Angle=function(o,A,f){let m=this.Bearing(A,o),C=this.Bearing(A,f),y=m-C;return y<0&&(y+=360),y};fy.prototype.getuid=function(){return this.uuid(8,16)};fy.prototype.uuid=function(o,A){let f="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),m=[],C;if(A=A||f.length,o)for(C=0;C<o;C++)m[C]=f[0|qe.nextRandomNumber()*A];else{let y;for(m[8]=m[13]=m[18]=m[23]="-",m[14]="4",C=0;C<36;C++)m[C]||(y=0|qe.nextRandomNumber()*16,m[C]=f[C===19?y&3|8:y])}return m.join("")};fy.prototype.deleteObject=function(){if(this.entities.remove(this.item),this._points.length>0){for(let o=0;o<this._points.length;o++)this.entities.remove(this._points[o]);this._points=[]}try{this.scene.primitives.remove(this.item)}catch(o){console.log(o)}this.item=void 0};var lJ=fy;function tw(o,A){this._earthCtrl=o,this._coreMap=this._earthCtrl.coreMap,this._show=Ae(A.show,!0),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,10),this._heading=Ae(A.heading,0),this._pitch=Ae(A.pitch,0),this._distance=Ae(A.distance,300),this._position=te.fromDegrees(A.lon,A.lat,A.height),this._horizontalViewAngle=Ae(A.horizontalViewAngle,90),this._verticalViewAngle=Ae(A.verticalViewAngle,60),this._horizontalViewAngle=this.adjustViewRange(this._horizontalViewAngle),this._verticalViewAngle=this.adjustViewRange(this._verticalViewAngle),this._visibleAreaColor=Ae(A.visibleAreaColor,ht.GREEN.withAlpha(.4)),this._invisibleAreaColor=Ae(A.invisibleAreaColor,ht.RED.withAlpha(.4)),this._size=Ae(A.size,10240),this._softShadows=Ae(A.softShadows,!0),this._colorStyle=Ae(A.colorStyle,ht.YELLOW),this._parameter=A,this._lineArray=[],this._visualCone=!0,this.pyramid=void 0,this.updateViewShed()}Object.defineProperties(tw.prototype,{show:{get:function(){return this._show},set:function(o){o!==this._show&&(this._show=o,this.updateViewShed())}},distance:{get:function(){return this._distance}},heading:{get:function(){return this._heading}},pitch:{get:function(){return this._pitch}},horizontalViewAngle:{get:function(){return this._horizontalViewAngle}},verticalViewAngle:{get:function(){return this._verticalViewAngle}},colorStyle:{get:function(){return this._colorStyle},set:function(o){this._colorStyle=o}},invisibleAreaColor:{get:function(){return this._invisibleAreaColor},set:function(o){this._invisibleAreaColor=o}},visibleAreaColor:{get:function(){return this._visibleAreaColor},set:function(o){this._visibleAreaColor=o}},visualCone:{get:function(){return this._visualCone},set:function(o){this._visualCone=o,this.visualConeShow(o)}}});tw.prototype.adjustViewRange=function(o){return o<=0?o=1:o>=180&&(o=179),o};tw.prototype.removeFromMap=function(){let o=this;O(o.viewShedMap)&&(o.viewShedMap.enabled=!1),O(o.pyramid)&&(o._earthCtrl.entities.removeById(o.pyramid.id),o.pyramid=null);for(let A=0;A<o._lineArray.length;A++){let f=o._lineArray[A];o._earthCtrl.entities.remove(f)}o._lineArray=[]};tw.prototype.visualConeShow=function(o){let A=this;O(A.pyramid)&&(A.pyramid.show=o);for(let f=0;f<A._lineArray.length;f++){let m=A._lineArray[f];m.show=o}};tw.prototype.addVisualPyramid=function(){let o=this,A=new AK({radii:new Qn(function(){return new te(o._distance,o._distance,o._distance)},!1),minimumClock:new Qn(function(){return qe.toRadians(90-o._heading-o._horizontalViewAngle/2)},!1),maximumClock:new Qn(function(){return qe.toRadians(90-o._heading+o._horizontalViewAngle/2)},!1),minimumCone:new Qn(function(){return qe.toRadians(90-o._verticalViewAngle/2)},!1),maximumCone:new Qn(function(){return qe.toRadians(90+o._verticalViewAngle/2)},!1),fill:!1,outline:!0,subdivisions:128,slicePartitions:32,stackPartitions:16,outlineColor:new Qn(function(){return o._colorStyle},!1)}),f=new JA({position:new Qn(function(){return o._position},!1),ellipsoid:A});this.pyramid=o._earthCtrl.entities.add(f)};tw.prototype.createLightCamera=function(){O(this.viewShedMap)?this._lightCamera=this.viewShedMap._lightCamera:this._lightCamera=new Ol(this._coreMap.scene),this._lightCamera.position=this._position};tw.prototype.updateParameters=function(o){let A=this,f=A._lightCamera;if(!!O(o)&&(O(o.lon)||O(o.lat)||O(o.height)||O(o.heading)||O(o.pitch)||O(o.roll)||O(o.far)||O(o.distance)||O(o.verticalViewAngle)||O(o.horizontalViewAngle))){let m=this._parameter;for(let v in o)o.hasOwnProperty(v)&&O(m[v])&&(m[v]=o[v]);m.distance>=A.viewShedMap.maximumDistance&&(m.distance=A.viewShedMap.maximumDistance),A._heading=m.heading,A._pitch=m.pitch,A._distance=m.distance,A.viewShedMap._pointLightRadius=m.distance,m.verticalViewAngle=A.adjustViewRange(m.verticalViewAngle),A._verticalViewAngle=m.verticalViewAngle,m.horizontalViewAngle=A.adjustViewRange(m.horizontalViewAngle),A._horizontalViewAngle=m.horizontalViewAngle,A._position=te.fromDegrees(m.lon,m.lat,m.height);let C=qe.toRadians(m.heading);f.setView({destination:A._position,orientation:{heading:C,pitch:0,roll:0}}),f.frustum.far=m.far||1e5;let y=qe.toRadians(A._horizontalViewAngle),x=qe.toRadians(A._verticalViewAngle);f.frustum.aspectRatio=Math.tan(y/2)/Math.tan(x/2),y>x?f.frustum.fov=y:f.frustum.fov=x}};tw.prototype.createShadowMap=function(){if(O(this.viewShedMap)){this.viewShedMap.enabled=!0;return}this.viewShedMap=new JK({context:this._coreMap.scene.context,lightCamera:this._lightCamera,enabled:!0,isPointLight:!0,pointLightRadius:this._distance,cascadesEnabled:!1,size:this._size,softShadows:!0,normalOffset:!1,fromLightSource:!1,visibleAreaColor:this._visibleAreaColor,invisibleAreaColor:this._invisibleAreaColor}),this._earthCtrl.viewShedMapList.push(this.viewShedMap)};var Dx=new te;tw.prototype.drawViewCentrum=function(){let o=this;function A(){let I=o.pyramid._ellipsoid._minimumClock.getValue(),w=o.pyramid._ellipsoid._minimumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Dx.x=Q.x*T*L,Dx.y=Q.y*T*F,Dx.z=Q.z*D;let R=new SD.changeCartesian3ByScalar(o._position,Dx);return[o._position,R]}let f=this._earthCtrl.entities.add({polyline:{positions:new Qn(A,!1),material:this._colorStyle}});this._lineArray.push(f);function m(){let I=o.pyramid._ellipsoid._maximumClock.getValue(),w=o.pyramid._ellipsoid._minimumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Dx.x=Q.x*T*L,Dx.y=Q.y*T*F,Dx.z=Q.z*D;let R=new SD.changeCartesian3ByScalar(o._position,Dx);return[o._position,R]}let C=this._earthCtrl.entities.add({polyline:{positions:new Qn(m,!1),material:this._colorStyle}});this._lineArray.push(C);function y(){let I=o.pyramid._ellipsoid._minimumClock.getValue(),w=o.pyramid._ellipsoid._maximumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Dx.x=Q.x*T*L,Dx.y=Q.y*T*F,Dx.z=Q.z*D;let R=new SD.changeCartesian3ByScalar(o._position,Dx);return[o._position,R]}let x=this._earthCtrl.entities.add({polyline:{positions:new Qn(y,!1),material:this._colorStyle}});this._lineArray.push(x);function v(){let I=o.pyramid._ellipsoid._maximumClock.getValue(),w=o.pyramid._ellipsoid._maximumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Dx.x=Q.x*T*L,Dx.y=Q.y*T*F,Dx.z=Q.z*D;let R=SD.changeCartesian3ByScalar(o._position,Dx);return[o._position,R]}let E=this._earthCtrl.entities.add({polyline:{positions:new Qn(v,!1),material:this._colorStyle}});this._lineArray.push(E)};tw.prototype.updateViewShed=function(){this.show?(this.createLightCamera(),this.setCameraParams(),this.createShadowMap(),this.addVisualPyramid(),this.drawViewCentrum()):this.removeFromMap()};tw.prototype.setCameraParams=function(){this._lightCamera.frustum.near=.1,this._lightCamera.frustum.far=this._distance;let o=qe.toRadians(this._horizontalViewAngle),A=qe.toRadians(this._verticalViewAngle);this._lightCamera.frustum.aspectRatio=Math.tan(o/2)/Math.tan(A/2),o>A?this._lightCamera.frustum.fov=o:this._lightCamera.frustum.fov=A,this._lightCamera.setView({destination:this._position,orientation:{heading:qe.toRadians(this._heading),pitch:qe.toRadians(this._pitch),roll:0}})};var Poe=tw;var QIe=Pi.WGS84;function Uf(o){this._cesiumViewer=o,this.coreMap=o.coreMap,this._scene=this.coreMap.scene,this.loading||this.addLoading(),this._tooltip=FRi(this.coreMap.container)}function SIe(o,A){if(o===null||typeof o!="object"||o.constructor!==Object&&o.constructor!==Array)return o;if(o.constructor===Date||o.constructor===RegExp||o.constructor===Function||o.constructor===String||o.constructor===Number||o.constructor===Boolean)return new o.constructor(o);A=A||new o.constructor;for(let f in o)A[f]=typeof A[f]>"u"?SIe(o[f],null):A[f];return A}function Klt(o,A){let f=SIe(o),m;for(m in A)f[m]===void 0&&(f[m]=SIe(A[m]));return f}function FRi(o){let A=function(f){let m=document.createElement("DIV");m.className="twipsy right";let C=document.createElement("DIV");C.className="twipsy-arrow",m.appendChild(C);let y=document.createElement("DIV");y.className="twipsy-inner",m.appendChild(y),this._div=m,this._title=y,f.appendChild(m)};return A.prototype.setVisible=function(f){this._div.style.display=f?"block":"none"},A.prototype.showAt=function(f,m){f&&m&&(this.setVisible(!0),this._title.innerHTML=m,this._div.style.left=`${f.x+30}px`,this._div.style.top=`${f.y-this._div.clientHeight/2-15}px`)},new A(o)}Uf.prototype.addToolbar=function(o,A){return A=Klt(A,{container:o}),new Uf.Toolbar(this,A)};var Ylt={shiftX:0,shiftY:0};Uf.prototype.createBillboardGroup=function(o,A,f){let m=new Uf.BillboardGroup(this,A);return m.addBillboards(o,f),m};Uf.BillboardGroup=function(o,A){this._drawHelper=o,this._scene=o._scene,this._options=Klt(A,Ylt);let f=new k_;this._scene.primitives.add(f),this._billboards=f,this._orderedBillboards=[]};Uf.BillboardGroup.prototype.createBillboard=function(o,A){let f=this._billboards.add({show:!0,position:o,pixelOffset:new wt(this._options.shiftX,this._options.shiftY),eyeOffset:new te(0,0,-1e3),horizontalOrigin:cA.CENTER,verticalOrigin:Bn.CENTER,scale:.3,image:Ae(this._options.iconUrl,`${globalThis.GEOWORLD_BASE_URL}Assets/Images/point.png`),color:new ht(1,1,1,1)});if(A){let y=function(v){C.enableRotate=v},x=function(){let v=0;for(let E=m._orderedBillboards.length;v<E&&m._orderedBillboards[v]!==f;++v);return v},m=this,C=this._scene.screenSpaceCameraController;if(A.dragHandlers){let v=this,E=new zr(v._scene.canvas);setListener(f,"leftDown",function(I){function w(M){f.position=M;for(let B=0,T=v._orderedBillboards.length;B<T&&v._orderedBillboards[B]!==f;++B);A.dragHandlers.onDrag&&A.dragHandlers.onDrag(x(),M)}function Q(M){E.destroy(),y(!0),A.dragHandlers.onDragEnd&&A.dragHandlers.onDragEnd(x(),M)}E.setInputAction(function(M){let B=v._scene.camera.pickEllipsoid(M.endPosition,QIe);B?w(B):Q(B)},Yi.MOUSE_MOVE),E.setInputAction(function(M){Q(v._scene.camera.pickEllipsoid(M.position,QIe))},Yi.LEFT_UP),y(!1),A.dragHandlers.onDragStart&&A.dragHandlers.onDragStart(x(),v._scene.camera.pickEllipsoid(I,QIe))})}A.onDoubleClick&&setListener(f,"leftDoubleClick",function(v){A.onDoubleClick(x())}),A.onClick&&setListener(f,"leftClick",function(v){A.onClick(x())}),A.tooltip&&(setListener(f,"mouseMove",function(v){m._drawHelper._tooltip.showAt(v,A.tooltip())}),setListener(f,"mouseOut",function(v){m._drawHelper._tooltip.setVisible(!1)}))}return f};Uf.BillboardGroup.prototype.insertBillboard=function(o,A,f){this._orderedBillboards.splice(o,0,this.createBillboard(A,f))};Uf.BillboardGroup.prototype.addBillboard=function(o,A){this._orderedBillboards.push(this.createBillboard(o,A))};Uf.BillboardGroup.prototype.addBillboards=function(o,A){let f=0;for(;f<o.length;f++)this.addBillboard(o[f],A)};Uf.BillboardGroup.prototype.updateBillboardsPositions=function(o){let A=0;for(;A<o.length;A++)this.getBillboard(A).position=o[A]};Uf.BillboardGroup.prototype.countBillboards=function(){return this._orderedBillboards.length};Uf.BillboardGroup.prototype.getBillboard=function(o){return this._orderedBillboards[o]};Uf.BillboardGroup.prototype.removeBillboard=function(o){this._billboards.remove(this.getBillboard(o)),this._orderedBillboards.splice(o,1)};Uf.BillboardGroup.prototype.remove=function(){this._billboards=this._billboards&&this._billboards.removeAll()&&this._billboards.destroy()};Uf.BillboardGroup.prototype.setOnTop=function(){this._scene.primitives.raiseToTop(this._billboards)};Uf.prototype.cleanUp=function(){this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._markers!==void 0&&(this._markers.remove(),this._markers=void 0),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._tooltip.setVisible(!1)};Uf.prototype.startDrawing=function(o){let A=this,f=this._scene;f.globe.depthTestAgainstTerrain=!0;let m=this._tooltip,C=3,y=[],x=[],v;this._positions=x;let E=new zr(f.canvas);this._mouseHandler=E;let I=new Uf.BillboardGroup(this,Ylt);this._markers=I,this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),E.setInputAction(function(Q){if(Q.position!==null){let M=f.camera.getPickRay(Q.position),B=f.globe.pick(M,f),T=$t.fromCartesian(B),D=qe.toDegrees(T.longitude),F=qe.toDegrees(T.latitude);if(B){if(y.length===0&&(y.push(D,F),x.push(B),v=B,I.addBillboard(v)),x.length>=4){let L=ml.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,v);if(L!==void 0){let R=L.x-Q.position.x,k=L.y-Q.position.y;if(R*R+k*k<16){y.splice(y.length-2,2),x.pop(),this.isLoading(!0),this.stopDrawing(o);return}}}y.push(D,F),x.push(B),I.addBillboard(B),x.length===C&&(A._prevEntity=A._cesiumViewer.factory.createElement({type:"polygon",parameters:{hierarchy:te.fromDegreesArray(y),material:ht.RED.withAlpha(.6),fill:!0}}),A._prevEntity.polygon.hierarchy=w())}}}.bind(this),Yi.LEFT_CLICK),E.setInputAction(function(Q){let M=Q.endPosition;if(M!==null)if(x.length===0)m.showAt(M,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let B=f.camera.getPickRay(M),T=f.globe.pick(B,f),D=$t.fromCartesian(T),F=qe.toDegrees(D.longitude),L=qe.toDegrees(D.latitude);if(T&&(y.splice(y.length-2,2),x.pop(),y.push(F,L),x.push(T),I.getBillboard(x.length-1).position=T,m.showAt(M,"\u53CC\u51FB\u7ED3\u675F\u7ED8\u5236"),x.length>=3&&x.length>=4)){let R=ml.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,v);if(R!==void 0){let k=R.x-M.x,G=R.y-M.y;k*k+G*G<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}.bind(this),Yi.MOUSE_MOVE),E.setInputAction(function(Q){x.length<C+2||(this.isLoading(!0),setTimeout(()=>{this.stopDrawing(o)},100))}.bind(this),Yi.LEFT_DOUBLE_CLICK);function w(){return te.fromDegreesArray(y)}};Uf.prototype.stopDrawing=function(o){this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._markers!==void 0&&(this._markers.remove(),this._markers=void 0),this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._tooltip.setVisible(!1),document.body.style.cursor="wait";let A=this.computeCutVolume(),f=A.maxHeight;document.body.style.cursor="default",typeof o=="function"&&o(A.volume);let m={polygon:{hierarchy:{positions:this._positions},extrudedHeight:f,closeTop:!1,closeBottom:!1,material:ht.RED.withAlpha(.5),outline:!0,outlineColor:ht.WHITE,outlineWidth:2}};this._prevEntity=this._cesiumViewer.entities.add(m),this.isLoading(!1)};Uf.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`,o.appendChild(A),this.loading=o,this.coreMap.container.appendChild(o)};Uf.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};Uf.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};function NRi(o){let A=[],f=[];for(let Q=0;Q<o.length;Q++){let M=$t.fromCartesian(o[Q]);A.push(M.longitude),f.push(M.latitude)}let m=0,C=0,y=0,x=0,v=0,E=0,I=0,w=0;for(let Q=0;Q<o.length;Q++)m=A[Q],C=f[Q],Q===o.length-1?(y=A[0],x=f[0]):(y=A[Q+1],x=f[Q+1]),E=m*x-y*C,v+=E,I+=(m+y)*E,w+=(C+x)*E;return v*=.5,I/=6*v,w/=6*v,new $t(I,w)}function kRi(o,A,f){let m=te.distance(o,A),C=te.distance(A,f),y=te.distance(f,o),x=(m+C+y)/2;return Math.sqrt(x*(x-m)*(x-C)*(x-y))}Uf.prototype.computeCutVolume=function(){let o=15e3;for(let k=0;k<this._positions.length;k++){let G=$t.fromCartesian(this._positions[k]),V=this._scene.globe.getHeight(G);o>V&&(o=V)}let A=Math.PI/Math.pow(2,11);A=A/64;let f=new Id.fromPositions({positions:this._positions,vertexFormat:Ya.FLAT_VERTEX_FORMAT,granularity:A}),m=new Id.createGeometry(f),C=0,y=0,x,v,E,I,w,Q,M,B,T,D,F,L;for(let k=0;k<m.indices.length;k+=3)x=m.indices[k],v=m.indices[k+1],E=m.indices[k+2],D=new te(m.attributes.position.values[x*3],m.attributes.position.values[x*3+1],m.attributes.position.values[x*3+2]),F=$t.fromCartesian(D),I=this._scene.globe.getHeight(F),M=te.fromRadians(F.longitude,F.latitude,0),y<I&&(y=I),D=new te(m.attributes.position.values[v*3],m.attributes.position.values[v*3+1],m.attributes.position.values[v*3+2]),F=$t.fromCartesian(D),w=this._scene.globe.getHeight(F),B=te.fromRadians(F.longitude,F.latitude,0),y<w&&(y=w),D=new te(m.attributes.position.values[E*3],m.attributes.position.values[E*3+1],m.attributes.position.values[E*3+2]),F=$t.fromCartesian(D),Q=this._scene.globe.getHeight(F),T=te.fromRadians(F.longitude,F.latitude,0),y<Q&&(y=Q),L=kRi(M,B,T),C=C+L*(I-o+w-o+Q-o)/3;let R=NRi(this._positions);return this._volumeLabel=this._cesiumViewer.entities.add({position:te.fromRadians(R.longitude,R.latitude,y+1e3),label:{text:`${C.toFixed(4)}\u7ACB\u65B9\u7C73`}}),{maxHeight:y,volume:C}};var Roe=Uf;function Jlt(o,A){if(this.mEarthCtrl=o,this._parameter=A,this.coreMap=o.coreMap,this._color=Ae(A.color,new ht(1,0,0,.7)),this._positions=A.positions,this._positions.length<3)throw new Hi("invalid positions length!");this._duration=Ae(A.duration,4e3),this._minHeight=Ae(A.minHeight,0),this._maxHeight=Ae(A.maxHeight,100),this._image=A.image,this._pps=null}function ORi(o,A){let f=$t.fromCartesian(o[0]),m=f.longitude,C=f.latitude,y=m,x=C,v=A;for(let E=1;E<o.length;E++){let I=$t.fromCartesian(o[E]);m>I.longitude?m=I.longitude:y<I.longitude&&(y=I.longitude),C>I.latitude?C=I.latitude:x<I.latitude&&(x=I.latitude)}return new te.fromRadians((m+y)/2,(C+x)/2,v)}function URi(o){if(O(o._pps))return;let A=ORi(o._positions,o._minHeight),f=$t.fromCartesian(A),m=new oi(A.x,A.y,A.z,1),C=new $t(f.longitude,f.latitude,o.maxHeight+100),y=$t.toCartesian(C),x=new oi(y.x,y.y,y.z,1),v=new oi,E=new oi,I=new te,w=o.mEarthCtrl.coreMap.scene.camera,Q=o._positions.length;o._pps=new wa({fragmentShader:HRi(Q),uniforms:{u_floodCenterEC:function(){return Ze.multiplyByVector(w._viewMatrix,m,v)},u_floodPlaneNormalEC:function(){let B=Ze.multiplyByVector(w._viewMatrix,m,v),T=Ze.multiplyByVector(w._viewMatrix,x,E);return I.x=T.x-B.x,I.y=T.y-B.y,I.z=T.z-B.z,te.normalize(I,I),I},u_floodRange:function(){return o._positions},u_minHeight:function(){return o._minHeight},u_maxHeight:function(){return o._maxHeight},u_image:function(){return o.image},u_floodColor:function(){return o._color},u_positionsLength:function(){return o._positions.length}}}),o.mEarthCtrl.coreMap.scene.postProcessStages.add(o._pps)}function GRi(o){O(o._pps)&&(o.mEarthCtrl.coreMap.scene.postProcessStages.remove(o._pps),o._pps=null)}function HRi(o){return`uniform sampler2D colorTexture;
            `})};c8.prototype.destroy=function(){this._tileset.customShader===this._customShader&&(this._customShader=void 0,this._tileset.customShader=void 0),this._scene.preUpdate.removeEventListener(this._preUpdate)};function iRi(){this.customShaders={},this.customShaders.lightLine=c8}var wlt=iRi;function GH(o,A){this.options=Ae(A,{}),this.earthCtrl=o,this.viewer=o.coreMap,this.CSME=mme,this.Cust=new this.CSME.CustomShaderStage(this.options.primitive,A),this.stageArr=[],this.eventListener=null,this.eventListener=this.viewer.scene.preUpdate.addEventListener(()=>{this.Cust.update()}),this.create()}GH.prototype.create=function(o){let A=this,f=null;o?f=o:f=A.options,f.lineMaterialStage&&(A.LineMaterialStage=new A.CSME.LineMaterialStage(Ae(f.lineMaterialStage,{weight:.5})),A.Cust.addStage(A.LineMaterialStage),A.stageArr.push(A.LineMaterialStage)),f.gradientMaterialStage&&(A.GradientMaterialStage=new A.CSME.GradientMaterialStage(Ae(f.gradientMaterialStage,{weight:.5})),A.Cust.addStage(A.GradientMaterialStage),A.stageArr.push(A.GradientMaterialStage)),f.normalizeMaterialStage&&(A.NormalizeMaterialStage=new A.CSME.NormalizeMaterialStage(Ae(f.normalizeMaterialStage,{weight:.5})),A.Cust.addStage(A.NormalizeMaterialStage),A.stageArr.push(A.NormalizeMaterialStage)),f.dynamicColorMaterialStage&&(A.DynamicColorMaterialStage=new A.CSME.DynamicColorMaterialStage(Ae(f.dynamicColorMaterialStage,{weight:.5})),A.Cust.addStage(A.DynamicColorMaterialStage),A.stageArr.push(A.DynamicColorMaterialStage)),f.reflectMaterialStage&&(A.ReflectMaterialStage=new A.CSME.ReflectMaterialStage(Ae(f.reflectMaterialStage,{weight:.5})),A.Cust.addStage(A.ReflectMaterialStage),A.stageArr.push(A.ReflectMaterialStage)),f.textureMaterialStage&&(A.TextureMaterialStage=new A.CSME.TextureMaterialStage(Ae(f.textureMaterialStage,{weight:.5,url:`${globalThis.GEOWORLD_BASE_URL}Assets/Textures/window.png`})),A.Cust.addStage(A.TextureMaterialStage),A.stageArr.push(A.TextureMaterialStage))};GH.prototype.addStage=function(o){let A=this;A.Cust.addStage(o),A.stageArr.push(o)};GH.prototype.removeStage=function(o){this.Cust.removeStage(o.name)};GH.prototype.update=function(){let o=this;o.viewer.scene.preUpdate.removeEventListener(o.eventListener),o.eventListener=o.viewer.scene.preUpdate.addEventListener(()=>{o.Cust.update()})};GH.prototype.removeFromMap=function(){let o=this;for(let A=0;A<o.stageArr.length;A++)o.removeStage(o.stageArr[A]);o.viewer.scene.preUpdate.removeEventListener(o.eventListener),o.eventListener=null};var blt=GH;function Qoe(o,A={}){this._earthCtrl=o,this._edgeStage=null,this._options=A,this._options.visibleEdgeColor=Ae(A.visibleEdgeColor,ht.fromCssColorString("#101010")),this._options.outlineWidth=Ae(A.outlineWidth,1),this._options.thresholdAngle=Ae(A.thresholdAngle,12*Math.PI/180),this.add()}Qoe.prototype.add=function(){this._edgeStage=aY();let o=this._edgeStage;o.visibleEdgeColor=this._options.visibleEdgeColor,o.outlineWidth=this._options.outlineWidth,o.thresholdAngle=this._options.thresholdAngle,o.selected=[{},{}],o.enabled=!0,this._earthCtrl.Viewer.postProcessStages.add(o)};Qoe.prototype.removeFromMap=function(){this._edgeStage&&(this._earthCtrl.Viewer.postProcessStages.remove(this._edgeStage),this.__edgeStage=null)};Object.defineProperties(Qoe.prototype,{show:{get:function(){return this._edgeStage.show},set:function(o){this._edgeStage.show=o}},outlineWidth:{get:function(){return this._edgeStage.outlineWidth},set:function(o){this._edgeStage.outlineWidth=o}},thresholdAngle:{get:function(){return this._edgeStage.thresholdAngle},set:function(o){!o||(this._edgeStage.thresholdAngle=o)}},visibleEdgeColor:{get:function(){return this._edgeStage.visibleEdgeColor},set:function(o){!o||(this._edgeStage.visibleEdgeColor=o)}},hiddenEdgeColor:{get:function(){return this._edgeStage.hiddenEdgeColor},set:function(o){!o||(this._edgeStage.hiddenEdgeColor=o)}},showGlow:{get:function(){return this._edgeStage.showGlow},set:function(o){this._edgeStage.showGlow=o}},edgeGlow:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeStrength:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeOnly:{get:function(){return this._edgeStage.edgeOnly},set:function(o){this._edgeStage.edgeOnly=o}}});var Qlt=Qoe;function Soe(o,A={}){this._earthCtrl=o,this._edgeStage=null,this._options=A,this._visibleEdgeColor=Ae(A.visibleEdgeColor,ht.fromCssColorString("#ff0000")),this._hiddenEdgeColor=Ae(A.hiddenEdgeColor,ht.fromCssColorString("#4d4d4d")),this.handler=null,this.key=Ae(A.key,"id"),this.model=Ae(A.model,null),this.add()}Soe.prototype.add=function(){let o=this,A="";this._edgeStage=aY(!0);let f=this._edgeStage;f.visibleEdgeColor=this._visibleEdgeColor,f.hiddenEdgeColor=this._hiddenEdgeColor,f.selected=[],f.enabled=!1,this._earthCtrl.Viewer.postProcessStages.add(f);function m(C,y){function x(E,I){let w=E.featuresLength;for(let Q=0;Q<w;++Q){let M=E.getFeature(Q);if(M.getProperty(o.key)===A){let T={pickId:M.pickId};y.selected=[T],y.enabled=!0}}}function v(E,I){let w=E.content,Q=w.innerContents;if(O(Q)){let M=Q.length;for(let B=0;B<M;++B)x(Q[B],I)}else x(w,I)}C.tileVisible.addEventListener(function(E){A!==""&&v(E,null)})}m(this.model,f),this.handler=new zr(this._earthCtrl.coreMap.scene.canvas),this.handler.setInputAction(function(C){let y=o._earthCtrl.coreMap.scene.pick(C.position);if(f.selected=[],A="",!y||!y.primitive)return;let v=y.primitive._pickIds,I={pickId:y.pickId};f.selected=[I],f.enabled=!0,A=y.getProperty(o.key)},Yi.LEFT_CLICK)};Soe.prototype.removeFromMap=function(){this.handler&&(this.handler.destroy(),this.handler=void 0),this._edgeStage&&this._earthCtrl.Viewer.postProcessStages.remove(this._edgeStage)};Object.defineProperties(Soe.prototype,{showGlow:{get:function(){return this._edgeStage.showGlow},set:function(o){this._edgeStage.showGlow=o}},edgeGlow:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeStrength:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeOnly:{get:function(){return this._edgeStage.edgeOnly},set:function(o){this._edgeStage.edgeOnly=o}}});var Slt=Soe;function Hs(o){this._earthCtrl=o,this._coreMap=o.coreMap}function Sx(){return((1+qe.nextRandomNumber())*65536|0).toString(16).substring(1)}Hs.createUUID=function(){return`${Sx()+Sx()}-${Sx()}-${Sx()}-${Sx()}-${Sx()}${Sx()}${Sx()}`};Hs.createUUIDWithoutDash=function(){return Sx()+Sx()+Sx()+Sx()+Sx()+Sx()+Sx()+Sx()};Hs.prototype.createUUID=function(){return Hs.createUUID()};Hs.prototype.createGroup=function(o){let A=new s8;return A.id=o.id||Hs.createUUID(),A.name=o.name||"\u672A\u547D\u540D\u7EC4",A};Hs.prototype.createImageryLayer=function(o,A){let f=new foe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.IMAGERYPROVIDERS),f),f};Hs.prototype.createTerrainLayer=function(o,A){let f=new poe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.TERRAINPROVIDERS),f),f};Hs.prototype.removeTerrainLayer=function(o){this._coreMap.terrainProvider=new VF({})};Hs.prototype.createFeatureLayer=function(o,A){let f=new xoe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.FEATURELAYERS),f),f};Hs.prototype.createModelLayer=function(o,A){let f=new Coe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.MODELLAYERS),f),f};Hs.prototype.createWfsModel=function(o,A){let f=new yK(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.MODELLAYERS),f),f};Hs.prototype.createModel=function(o,A){let f=new Yne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.removeModel=function(o){O(o)&&o.removeFromMap()};Hs.prototype.createCZMLObject=function(o,A){let f=this,m=Ae(o.addToMap,!0),C=new Nie(o.name);return C.load(o.url),m&&f._earthCtrl.dataSources.add(C),C.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,C):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),C),C};Hs.prototype.createElement=function(o){let A={};return A[o.type]=o.parameters,O(o.name)&&(A.name=o.name),O(o.position)&&(A.position=o.position),this._earthCtrl.entities.add(A)};Hs.prototype.removeElement=function(o){O(o)?this._earthCtrl.entities.remove(o):this._earthCtrl.entities.removeAll()};Hs.prototype.createVideoProjection=function(o,A){o.addToMap=Ae(o.addToMap,!0);let f=Ae(o.sourceType,"perspective"),m=null;return f==="perspective"?(m=new Dne(this._earthCtrl,o),m.initialize(o),m.name=o.name,A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),m)):f==="panorama"?(m=new alt(this._earthCtrl,o),m.initialize(o),m.name=o.name,m.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),m)):f==="fisheye"&&(m=new Tne(this._earthCtrl,o),m.initialize(o),m.name=o.name,m.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),m)),m};Hs.prototype.createTrack=function(o,A){let f=new slt(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.initialize(o),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createSceneNode=function(o,A,f){let m=new s8(this._earthCtrl);return m.id=o,m.name=A,m.label=f,m};Hs.prototype.createFire=function(o,A){let f=new Rne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createSmoke=function(o,A){let f=new Fne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createExplosion=function(o,A){let f=new kne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createFireworks=function(o,A){let f=new Une(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createRadarScan=function(o,A){let f=new Hne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createCircleScan=function(o,A){let f=new plt(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createUpDownScan=function(o){let A=new Clt(this._earthCtrl,o);return A.show=!0,A};Hs.prototype.createWaters=function(o,A){let f=new _oe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createHeatmap=function(o,A){let f=Alt.create(this._earthCtrl,o.bbox,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createLabel=function(o,A){let f=new Wne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createBillboard=function(o,A){let f=new zne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPolyline=function(o,A){let f=new qne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPolygon=function(o,A){let f=new Zne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPoint=function(o,A){let f=new eoe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createBox=function(o,A){let f=new ioe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createEllipsoid=function(o,A){let f=new aoe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createCylinder=function(o,A){let f=new noe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createRectangle=function(o,A){let f=new loe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createEllipse=function(o,A){let f=new coe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPolylineVolume=function(o,A){let f=new hoe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createEChartLayer=function(o,A){let f=new Eoe(this._earthCtrl);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(o),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPointLight=function(o){return new xlt(this._earthCtrl,o)};Hs.prototype.createHawkeye=function(o){let A=new Boe(this._earthCtrl,o);A.name=o.name,A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&A.addToMap(o)};Hs.prototype.createSpotLight=function(o){let A=new boe(this._earthCtrl.coreMap,o.entities,o.lights);return A.name=o.name,A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};Hs.prototype.createCustomShaderManager=function(o){let A=new wlt;return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};Hs.prototype.createCustomShaderStage=function(o){let A=new blt(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};Hs.prototype.createModelOutline=function(o={}){let A=new Qlt(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};Hs.prototype.modelClick=function(o={}){let A=new Slt(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};var i2=Hs;var Doe=class extends n0{constructor(A,f){super(A),this._objectMap={},this._rootNode=null,this._isBenchUpdate=!1,this._selectSet=new Sne(A);let m=new s8(A);m.id=i2.createUUID(),m.name=Ae(f.ProjectName,"root"),m.version=Ae(f.version,null),m.desc=Ae(f.desc,null),m.createTime=Ae(f.createTime,new Date().toISOString()),m.lastUpdate=Ae(f.lastUpdate,null),m.show=!0,this._rootNode=m,this._editNode=m,this._objectMap[m.id]=m,this._EventDocumentChanged=new eN("EventDocumentChanged")}finalize(){this._rootNode=null,this._objectMap={}}getChildById(A){return this._objectMap.hasOwnProperty(A)?this._objectMap[A]:null}addChild(A,f){A.addChild(f),this._objectMap[f.id]=f,this._isBenchUpdate||this.commitChanged()}removeChildById(A){let f=this._objectMap[A];O(f)&&this.removeChild(f)}removeChild(A){O(A)&&O(A.parentNode)&&(A.removeFromMap(),A.parentNode.removeChild(A)),delete this._objectMap[A.id],this._isBenchUpdate||this.commitChanged()}removeAll(){}beginUpdate(){this._isBenchUpdate=!0}endUpdate(){this._isBenchUpdate&&(this.commitChanged(),this._isBenchUpdate=!1)}commitChanged(){this._EventDocumentChanged.notifyEvent(this)}flyTo(A,f){O(A)&&O(A._primitive)&&(A=A._primitive),this._earthCtrl.coreMap.flyTo(A,f)}findLocationByID(A,f){if(!A)return;let m=this.getChildById(A);O(m)&&O(m._primitive)&&(m=m._primitive),this._earthCtrl.coreMap.flyTo(m,f)}moveLayer(A,f){let m=this.getChildById(A),C=null;for(let y=0;y<m.parentNode.childNodes.length;y++)m.parentNode.childNodes[y].id===m.id&&(C=y);f==="up"?(this._earthCtrl.coreMap.scene.imageryLayers.raise(m._primitive),this.changeLayer(m.parentNode.childNodes,C,C+1)):f==="down"&&(this._earthCtrl.coreMap.scene.imageryLayers.lower(m._primitive),this.changeLayer(m.parentNode.childNodes,C,C-1))}changeLayer(A,f,m){if(f=qe.clamp(f,0,A.length-1),m=qe.clamp(m,0,A.length-1),f===m)return;let C=A[f];A[f]=A[m],A[m]=C}outputJson(A){let f=this;new Promise(function(C,y){let x={IMAGERYPROVIDERS:"imageryProviders",TERRAINPROVIDERS:"terrainProviders",MODELLAYERS:"modelLayers",FEATURELAYERS:"featureLayers",USERSCENE:"userScene"},v=0,E=[];for(let I in x){let w=x[I],Q=f.rootNode.getChildByName(w);if(!Q)continue;let M=[];if(Q.childNodes.length===0)M=[];else for(let B=0;B<Q.childNodes.length;B++){let T=Q.childNodes[B].toJSON();M.push(T)}Promise.all(M).then(function(B){let T=[];if(B.length!==0){for(let L=0;L<B.length;L++)T.push(B[L]);let D=T[0].class;D!=="IMAGERY_LAYER"&&D!=="TERRAIN_LAYER"&&D!=="MODEL_LAYER"&&D!=="FEATURE_LAYER"&&(D="USER_SCENE");let F={item:D,objJson:T};E.push(F)}v++,v===5&&(C(E),v=0)})}}).then(function(C){let y={version:f.rootNode.version,projectName:f.rootNode.name,desc:f.rootNode.desc,createTime:f.rootNode.createTime,lastUpdate:new Date().toISOString(),imageryProviders:[],terrainProviders:[],modelLayers:[],featureLayers:[],userScene:[]};for(let w=0;w<C.length;w++)C[w].item==="IMAGERY_LAYER"&&(y.imageryProviders=C[w].objJson),C[w].item==="TERRAIN_LAYER"&&(y.terrainProviders=C[w].objJson),C[w].item==="MODEL_LAYER"&&(y.modelLayers=C[w].objJson),C[w].item==="FEATURE_LAYER"&&(y.featureLayers=C[w].objJson),C[w].item==="USER_SCENE"&&(y.userScene=C[w].objJson);let x={class:"ENVIRONMENT",underGround:Ae(f._earthCtrl.camera.undergroundMode,null),shadow:Ae(f._earthCtrl.shadows,null),depthTest:Ae(f._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain,null),rain:Ae(f._earthCtrl.environment.rain.show,null),snow:Ae(f._earthCtrl.environment.snow.show,null),fog:Ae(f._earthCtrl.environment.fog.show,null),bwMode:Ae(f._earthCtrl.environment.bwMode.show,null),nightMode:Ae(f._earthCtrl.environment.nightMode.show,null),colorAdjustment:{show:Ae(f._earthCtrl.environment.colorAdjustment.show,null),contrast:Ae(f._earthCtrl.environment.colorAdjustment.contrast,null),saturation:Ae(f._earthCtrl.environment.colorAdjustment.saturation,null),brightness:Ae(f._earthCtrl.environment.colorAdjustment.brightness,null)}},v={class:"SKYBOX",positiveX:Ae(f._earthCtrl.environment.SkyBoxSource.positiveX,null),negativeX:Ae(f._earthCtrl.environment.SkyBoxSource.negativeX,null),positiveY:Ae(f._earthCtrl.environment.SkyBoxSource.positiveY,null),negativeY:Ae(f._earthCtrl.environment.SkyBoxSource.negativeY,null),positiveZ:Ae(f._earthCtrl.environment.SkyBoxSource.positiveZ,null),negativeZ:Ae(f._earthCtrl.environment.SkyBoxSource.negativeZ,null)},E={class:"VIEWPOINT",lon:f._earthCtrl.camera.viewPoint.lon,lat:f._earthCtrl.camera.viewPoint.lat,alt:f._earthCtrl.camera.viewPoint.alt,heading:f._earthCtrl.camera.viewPoint.heading,pitch:f._earthCtrl.camera.viewPoint.pitch,roll:f._earthCtrl.camera.viewPoint.roll,duration:f._earthCtrl.camera.viewPoint.duration};y.userScene.push(x),y.userScene.push(v),y.userScene.push(E);let I=JSON.stringify(y);A&&A(I)})}};Object.defineProperties(Doe.prototype,{rootNode:{get:function(){return this._rootNode},set:function(o){this._rootNode=o}},editNode:{get:function(){return this._editNode},set:function(o){this._editNode=o}},selectSet:{get:function(){return this._selectSet}},EventDocumentChanged:{get:function(){return this._EventDocumentChanged}},EventObjectPropertyChanged:{get:function(){return this._EventObjectPropertyChanged}}});var Toe=Doe;function Dlt(o){this._earthCtrl=o,this._coreMap=o.coreMap,this.initialize()}var S6i=new Es,D6i=new te,T6i=new te;Dlt.prototype.initialize=function(){let o=document.createElement("div");o.className="map-info-bar",o.style="position: display:none; absolute;left: 0px;bottom:0px;width: 100%;background:rgba(0,0,0,0.4); color:#e9e9e9; text-shadow:2px 2px 2px #000";let A=this._coreMap;A.container.appendChild(o);let f="float: right; min-width: 100px;margin-right: 20px;",m=document.createElement("div");m.style=f,o.appendChild(m);let C=document.createElement("div");C.style=f,o.appendChild(C);let y=document.createElement("div");y.style=f,o.appendChild(y);let x=A.scene.canvas,v=A.scene.globe.ellipsoid;new zr(x).setInputAction(function(I){let w=A.camera.pickEllipsoid(I.endPosition,v);if(w){let Q=A.scene.globe.ellipsoid.cartesianToCartographic(w),M=qe.toDegrees(Q.latitude).toFixed(6),B=qe.toDegrees(Q.longitude).toFixed(6),T=A.camera.positionCartographic.height.toFixed(1);y.innerHTML=`\u7ECF\u5EA6\uFF1A${B}`,C.innerHTML=`\u7EAC\u5EA6\uFF1A${M}`,m.innerHTML=`\u89C6\u70B9\u9AD8\uFF1A${T}\u7C73`}},Yi.MOUSE_MOVE)};var Tlt=Dlt;function cu(){}cu.parseBaseData=function(o,A){let f=[];if(O(A)&&O(A.imageryProviders))for(let C=0;C<A.imageryProviders.length;C++){let y=A.imageryProviders[C];if(y.enable===!1||y.show===!1)continue;if(O(y.tilingScheme)){let v=y.tilingScheme;v.type==="GeographicTilingScheme"&&(y.tilingScheme=new mg(v))}let x=i2.createImageryLayer(y);f.push(x)}let m=[];if(O(A)&&O(A.terrainProviders))for(let C=0;C<A.terrainProviders.length;C++){let y=A.terrainProviders[C];if(y.enable===!1||y.show===!1)continue;let x=i2.createTerrainLayer(y);m.push(x)}return{imageryProvider:f,terrainProvider:m}};cu.parse=function(o,A){if(!O(A))return;let f=[Zs.IMAGERYPROVIDERS,Zs.TERRAINPROVIDERS,Zs.MODELLAYERS,Zs.FEATURELAYERS,Zs.USERSCENE];for(let m=0;m<f.length;m++){let C=o.factory.createSceneNode(i2.createUUID(),f[m]);C.show=!0,o.userScene.addChild(o.userScene.rootNode,C)}O(A[Zs.IMAGERYPROVIDERS])&&HH(o,A[Zs.IMAGERYPROVIDERS],o.userScene.rootNode.getChildByIndex(0),0),O(A[Zs.TERRAINPROVIDERS])&&HH(o,A[Zs.TERRAINPROVIDERS],o.userScene.rootNode.getChildByIndex(1),1),O(A[Zs.MODELLAYERS])&&HH(o,A[Zs.MODELLAYERS],o.userScene.rootNode.getChildByIndex(2)),O(A[Zs.FEATURELAYERS])&&HH(o,A[Zs.FEATURELAYERS],o.userScene.rootNode.getChildByIndex(3)),O(A[Zs.USERSCENE])&&HH(o,A[Zs.USERSCENE],o.userScene.rootNode.getChildByIndex(4))};function HH(o,A,f,m){for(let C=0;C<A.length;C++){let y=A[C],x=null;if(y.enable===!1)continue;O(y.class)?(y.class==="IMAGERY"&&(y.class=vo.IMAGERY_LAYER),y.class==="TERRAIN"&&(y.class=vo.TERRAIN_LAYER),x=y.class):(m===0?y.class=vo.IMAGERY_LAYER:m===1&&(y.class=vo.TERRAIN_LAYER),x=y.class);let v=cu.parserMap[x];v!==void 0&&v(o,y,f)}}function rRi(o,A,f){let m=o.factory.createSceneNode(A.id,A.name);m.show=Ae(A.show,!0),o.userScene.addChild(f,m),O(A.childNodes)&&HH(o,A.childNodes,m)}function nRi(o,A,f){let m=A;if(O(m.tilingScheme)){let C=m.tilingScheme;C.type==="GeographicTilingScheme"&&(m.tilingScheme=new mg(C))}o.factory.createImageryLayer(m,f)}function oRi(o,A,f){let m=A;o.factory.createTerrainLayer(m,f)}function aRi(o,A,f){let m=A;m.addToMap=!0;let C=m.sourceType;C==="3DTiles"||C==="b3dm"||C==="osgb"||C==="s3m"||C==="ude_block"||C==="ude_model"?o.factory.createModelLayer(m,f):C==="czml"?o.factory.createCZMLObject(m,f):C==="wfsModel"&&o.factory.createWfsModel(m,f)}function sRi(o,A,f){let m=o.factory.createFeatureLayer(A,f)}function lRi(o,A,f){o.coreMap.scene.skyBox=new J5({sources:{positiveX:A.positiveX,negativeX:A.negativeX,positiveY:A.positiveY,negativeY:A.negativeY,positiveZ:A.positiveZ,negativeZ:A.negativeZ}})}function uRi(o,A,f){o.camera.undergroundMode=Ae(A.underGround,!1),o.shadows=Ae(A.shadow,!1),A.rain===!0&&o.environment.showEffect("rain"),A.snow===!0&&o.environment.showEffect("snow"),A.fog===!0&&o.environment.showEffect("fog"),o.coreMap.scene.globe.depthTestAgainstTerrain=Ae(A.depthTest,!1),A.bwMode===!0&&o.environment.showEffect("bwMode"),A.nightMode===!0&&o.environment.showEffect("nightMode"),A.colorAdjustment.show===!0&&(o.environment.showEffect("colorAdjustment"),o.environment.colorAdjustment.contrast=A.colorAdjustment.contrast,o.environment.colorAdjustment.saturation=A.colorAdjustment.saturation,o.environment.colorAdjustment.brightness=A.colorAdjustment.brightness)}function cRi(o,A,f){o.camera.viewPoint=A,o.camera.flyTo(A.lon,A.lat,A.alt,A.heading,A.pitch,A.roll,A.duration)}function ARi(o,A,f){o.factory.createModel(A,f)}function hRi(o,A,f){o.factory.createWaters(A,f)}function dRi(o,A,f){o.factory.createExplosion(A,f)}function fRi(o,A,f){o.factory.createFireworks(A,f)}function gRi(o,A,f){o.factory.createSmoke(A,f)}function pRi(o,A,f){o.factory.createFire(A,f)}function mRi(o,A,f){A.color&&(A.color=new ht(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createRadarScan(A,f)}function CRi(o,A,f){A.color&&(A.color=new ht(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createCircleScan(A,f)}function yRi(o,A,f){A.color&&(A.color=new ht(A.color.red,A.color.green,A.color.blue,A.color.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createPoint(A,f)}function xRi(o,A,f){A.fillColor&&(A.fillColor=new ht(A.fillColor.red,A.fillColor.green,A.fillColor.blue,A.fillColor.alpha)),o.factory.createLabel(A,f)}function vRi(o,A,f){o.factory.createBillboard(A,f)}function ERi(o,A,f){A.positions&&(A.positions=cu.array2DtoMercator(A.positions)),A.lineColor&&(A.lineColor=new ht(A.lineColor.red,A.lineColor.green,A.lineColor.blue,A.lineColor.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),o.factory.createPolyline(A,f)}function IRi(o,A,f){A.material&&(A.material=new ht(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.positions&&(A.positions=cu.array2DtoMercator(A.positions)),o.factory.createPolygon(A,f)}function _Ri(o,A,f){A.coordinates&&(A.coordinates=Di.fromDegrees(A.coordinates[0],A.coordinates[1],A.coordinates[2],A.coordinates[3])),A.fillColor&&(A.fillColor=new ht(A.fillColor.red,A.fillColor.green,A.fillColor.blue,A.fillColor.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),o.factory.createRectangle(A,f)}function BRi(o,A,f){o.factory.createEllipse(A,f)}function wRi(o,A,f){A.material&&(A.material=new ht(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=te.fromDegrees(A.position[0],A.position[1],A.position[2])),A.dimensions&&(A.dimensions=new te(A.dimensions.x,A.dimensions.y,A.dimensions.z)),o.factory.createBox(A,f)}function bRi(o,A,f){A.material&&(A.material=new ht(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=te.fromDegrees(A.position[0],A.position[1],A.position[2])),A.radii&&(A.radii=new te(A.radii[0],A.radii[1],A.radii[2])),o.factory.createEllipsoid(A,f)}function QRi(o,A,f){A.material&&(A.material=new ht(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=te.fromDegrees(A.position[0],A.position[1],A.position[2])),o.factory.createCylinder(A,f)}function SRi(o,A,f){o.factory.createPolylineVolume(A,f)}function DRi(o,A,f){o.factory.createVideoProjection(A,f)}function TRi(o,A,f){o.factory.createVideoProjection(A,f)}function MRi(o,A,f){o.factory.createTrack(A,f)}function PRi(o,A,f){o.factory.createHeatmap(A,f)}function RRi(o,A,f){o.factory.createEChartLayer(A,f)}function LRi(o,A,f){let m=o.factory.createElement(A);o.userScene.addChild(f,m)}cu.array2DtoMercator=function(o){let A=[];return o.forEach(function(f){let m=te.fromDegrees(f[0],f[1],f[2]);A.push(m)}),A};cu.parserMap={};cu.parserMap[vo.NODE]=rRi;cu.parserMap[vo.IMAGERY_LAYER]=nRi;cu.parserMap[vo.TERRAIN_LAYER]=oRi;cu.parserMap[vo.MODEL_LAYER]=aRi;cu.parserMap[vo.FEATURE_LAYER]=sRi;cu.parserMap[vo.SKYBOX]=lRi;cu.parserMap[vo.ENVIRONMENT]=uRi;cu.parserMap[vo.VIEWPOINT]=cRi;cu.parserMap[vo.MODEL]=ARi;cu.parserMap[vo.WATERS]=hRi;cu.parserMap[vo.EXPLOSION]=dRi;cu.parserMap[vo.FIREWORK]=fRi;cu.parserMap[vo.SMOKE]=gRi;cu.parserMap[vo.FIRE]=pRi;cu.parserMap[vo.RADARSCAN]=mRi;cu.parserMap[vo.CIRCLESCAN]=CRi;cu.parserMap[vo.POINT]=yRi;cu.parserMap[vo.LABEL]=xRi;cu.parserMap[vo.BILLBOARD]=vRi;cu.parserMap[vo.POLYLINE]=ERi;cu.parserMap[vo.POLYGON]=IRi;cu.parserMap[vo.RECTANGLE]=_Ri;cu.parserMap[vo.ELLIPSE]=BRi;cu.parserMap[vo.BOX]=wRi;cu.parserMap[vo.ELLIPSOID]=bRi;cu.parserMap[vo.CYLINDER]=QRi;cu.parserMap[vo.POLYLINEVOLUME]=SRi;cu.parserMap[vo.PERSPECTIVE_VIDEO_PROJECTION]=DRi;cu.parserMap[vo.FISHEYE_VIDEO_PROJECTION]=TRi;cu.parserMap[vo.TRACK]=MRi;cu.parserMap[vo.HEATMAP]=PRi;cu.parserMap[vo.ECHARTLAYER]=RRi;cu.parserMap.ELEMENT=LRi;var Mlt=cu;var pIe=class extends Ja{constructor(A,f,m,C){super(A,m,C),this.editBillboard=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editBillboard=f,O(this.editBillboard)&&O(this.editBillboard.entity.billboard)?console.info(this.editBillboard.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Billboard entity is need!"}))}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editBillboard.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editBillboard.entity)||this.pickObject(A,this.editBillboard.entity))&&this.mCallback&&this.mCallback(this.editBillboard),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editBillboard.entity.position=m}return this.mCallback&&this.mCallback(this.editBillboard),!0}updateBillboard(A){if(O(A)&&O(this.editBillboard)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editBillboard.entity.position=A[C]:O(A[C])&&(this.editBillboard.entity.billboard[C]=A[C])}}}endEditEntity(){}},Plt=pIe;var mIe=class extends Ja{constructor(A,f,m,C){super(A,m,C),this.editPoint=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editPoint=f,O(this.editPoint)&&O(this.editPoint.entity.point)?console.info(this.editPoint.entity.point):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Point entity is need!"}))}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPoint.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPoint.entity)||this.pickObject(A,this.editPoint.entity))&&this.mCallback&&this.mCallback(this.editPoint),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editPoint.entity.position=m}return this.mCallback&&this.mCallback(this.editPoint),!0}updatePoint(A){if(O(A)&&O(this.editPoint)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editPoint.entity.position=A[C]:O(A[C])&&(this.editPoint.entity.point[C]=A[C])}}}endEditEntity(){}},Rlt=mIe;var CIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editBox=void 0,this.pickedEntity=void 0,this.editHeightPoint=void 0,this.editWHPoint=void 0,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=void 0,this.isEditing=!1,this.pointsId=[],this.height=0,this.dragPosition=void 0,this.editBox=f,O(this.editBox)&&O(this.editBox.entity.box)){let y=this.editBox.entity.position._value,x=$t.fromCartesian(y);this.height=x.height;let v=new te,E=new te;this.getNorthPointByDistance(v,E),this.editHeightPoint=this.mEarthCtrl.entities.add({name:"box_edit_height_point",position:v,point:{heightReference:this.editBox.entity.box.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.editHeightPoint.id),this.editWHPoint=this.mEarthCtrl.entities.add({name:"box_edit_long_width_point",position:E,point:{heightReference:this.editBox.entity.box.heightReference,color:ht.RED,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.editWHPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Box entity is need!"})}addHeight(A){let f=this.editBox.entity.position._value,m=$t.fromCartesian(f);return this.height=m.height+A,te.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C;console.info(this.editBox.entity.position),O(m)?C=this.editBox.entity.position.getValue(m):C=this.editBox.entity.position._value;let y=Kn.eastNorthUpToFixedFrame(C),x=new te,v=this.editBox.entity.box.dimensions._value;v||(v=this.editBox.entity.box.dimensions.getValue(m)),te.divideByScalar(v,2,x),te.clone(x,A),te.clone(x,f),A.y*=-1,Ze.multiplyByPoint(y,A,A),f.y*=-1,f.z*=-1,Ze.multiplyByPoint(y,f,f)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editBox.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=void 0):f.name==="box_edit_height_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=f,this.pickEditWHPoint=void 0):f.name==="box_edit_long_width_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editBox)||this.pickObject(A,this.editBox.entity))&&this.mCallback&&this.mCallback(this.editBox),this.currentPoint=void 0,this.isEditing=!1,this.dragPosition=void 0,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;let f=new Date,m=gi.fromDate(f);if(O(this.currentPoint)||O(this.pickEditHeightPoint)||O(this.pickEditWHPoint)){let C=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,y=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,C);if(!y)return;let x=$t.fromCartesian(y),v=te.fromRadians(x.longitude,x.latitude,x.height+this.height);if(O(this.currentPoint))this.currentPoint.position=v,this.editBox.entity.position=new Qn(function(){return v},!1);else if(O(this.dragPosition)){if(O(this.pickEditWHPoint)){let w=te.subtract(y,this.dragPosition,new te),Q=te.normalize(w,new te);te.dot(w,Q,w);let M=this.editBox.entity.box.dimensions._value;M||(M=this.editBox.entity.box.dimensions.getValue(m));let B=te.clone(M);B.x-=w.x,B.y+=w.y,te.abs(B,B),this.editBox.entity.box.dimensions=new Qn(function(){return B},!1)}else if(O(this.pickEditHeightPoint)){let w=te.subtract(y,this.dragPosition,new te),Q=this.editBox.entity.box.dimensions._value;Q||(Q=this.editBox.entity.box.dimensions.getValue(m));let M=te.clone(Q);M.z+=w.z,te.abs(M,M),this.editBox.entity.box.dimensions=M,this.editBox.entity.position=this.addHeight(w.z/2)}}this.dragPosition=y;let E=new te,I=new te;this.getNorthPointByDistance(E,I,m),this.editHeightPoint.position=E,this.editWHPoint.position=I}return this.mCallback&&this.mCallback(this.editBox),!0}updateBox(A){if(O(A)&&O(this.editBox)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editBox.entity.position=A[C]:O(A[C])&&(this.editBox.entity.box[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Llt=CIe;var yIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editCylinder=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.pointsId=[],this.height=0,this.topRadiusPoint=void 0,this.pickTopRadiusPoint=void 0,this.bottomRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0,this.heightPoint=void 0,this.pickHeightPoint=void 0,this.dragPosition=void 0,this.editCylinder=f,O(this.editCylinder)&&O(this.editCylinder.entity.cylinder)){let y=this.editCylinder.entity.position._value,x=$t.fromCartesian(y);this.height=x.height;let v=this.editCylinder.entity.cylinder.topRadius._value,E=this.editCylinder.entity.cylinder.bottomRadius._value,I=new te,w=new te,Q=new te;this.getNorthPointByDistance(I,w,Q),this.heightPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_height_point",position:Q,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.heightPoint.id),v>0&&(this.topRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_top_radius_point",position:I,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:ht.RED,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.topRadiusPoint.id)),E>0&&(this.bottomRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_bottom_radius_point",position:w,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:ht.RED,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.bottomRadiusPoint.id))}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Cylinder entity is need!"})}addHeight(A){let f=this.editCylinder.entity.position._value,m=$t.fromCartesian(f);return this.height=m.height+A,te.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C=this.editCylinder.entity.position._value,y=Kn.eastNorthUpToFixedFrame(C),x=this.editCylinder.entity.cylinder.length._value,v=this.editCylinder.entity.cylinder.topRadius._value,E=this.editCylinder.entity.cylinder.bottomRadius._value;v>0&&(A.z+=x/2,A.x+=v,Ze.multiplyByPoint(y,A,A)),E>0&&(f.x+=E,f.z-=x/2,Ze.multiplyByPoint(y,f,f)),m.z+=x/2,Ze.multiplyByPoint(y,m,m)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editCylinder.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_height_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=f,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_top_radius_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=f,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_bottom_radius_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editCylinder)||this.pickObject(A,this.editCylinder.entity))&&this.mCallback&&this.mCallback(this.editCylinder),this.currentPoint=void 0,this.dragPosition=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.heightPoint)||O(this.topRadiusPoint)||O(this.bottomRadiusPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=$t.fromCartesian(m),y=te.fromRadians(C.longitude,C.latitude,C.height+this.height);if(O(this.currentPoint))this.currentPoint.position=y,this.editCylinder.entity.position=y;else if(O(this.dragPosition)){if(O(this.pickHeightPoint)){let Q=te.subtract(m,this.dragPosition,new te),M=this.editCylinder.entity.cylinder.length._value;M+=Q.z,M=Math.abs(M),this.editCylinder.entity.position=this.addHeight(Q.z/2),this.editCylinder.entity.cylinder.length=M}else if(O(this.pickTopRadiusPoint)){let Q=te.subtract(m,this.dragPosition,new te),M=this.editCylinder.entity.cylinder.topRadius._value;M-=Q.x,M=Math.abs(M),this.editCylinder.entity.cylinder.topRadius=M}else if(O(this.pickBottomRadiusPoint)){let Q=te.subtract(m,this.dragPosition,new te),M=this.editCylinder.entity.cylinder.bottomRadius._value;M-=Q.x,M=Math.abs(M),this.editCylinder.entity.cylinder.bottomRadius=M}}this.dragPosition=m;let x=this.editCylinder.entity.cylinder.topRadius._value,v=this.editCylinder.entity.cylinder.bottomRadius._value,E=new te,I=new te,w=new te;this.getNorthPointByDistance(E,I,w),x>0&&(this.topRadiusPoint.position=E),v>0&&(this.bottomRadiusPoint.position=I),this.heightPoint.position=w}return this.mCallback&&this.mCallback(this.editCylinder),!0}updateCylinder(A){if(O(A)&&O(this.editCylinder)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editCylinder.entity.position=A[C]:O(A[C])&&(this.editCylinder.entity.cylinder[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Flt=yIe;var xIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editEllipse=void 0,this.pickedEntity=void 0,this.semiMajorAxisPoint=void 0,this.semiMinorAxisPoint=void 0,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=void 0,this.pointsId=[],this.isEditing=!1,this.circle=!1,this.editEllipse=f,O(this.editEllipse)&&O(this.editEllipse.entity.ellipse)){let y=qe.PI_OVER_TWO,x=this.updatePoint(y);this.semiMajorAxisPoint=this.mEarthCtrl.entities.add({name:"semi_major_axis_point",position:x,point:{heightReference:this.editEllipse.entity.ellipse.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.semiMajorAxisPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipse entity is need!"})}updatePoint(A){let f=new te,m=new te,C=new te,y=this.editEllipse.entity.ellipse;this.semiMinorAxis=y.semiMinorAxis._value,this.semiMajorAxis=y.semiMajorAxis._value,this.circle=this.semiMajorAxis===this.semiMinorAxis;let x=Ae(y.rotation,0);this.center=this.editEllipse.entity.position._value;let v=this.semiMinorAxis*this.semiMinorAxis,E=this.semiMajorAxis*this.semiMajorAxis,I=this.semiMajorAxis*this.semiMinorAxis,w=te.magnitude(this.center),Q=te.normalize(this.center,f),M=te.cross(te.UNIT_Z,this.center,m);M=te.normalize(M,M);let B=te.cross(Q,M,C),T=new te;return N1.pointOnEllipsoid(A,x,B,M,v,I,E,w,Q,T)}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editEllipse.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=void 0):f.name==="semi_minor_axis_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=f):f.name==="semi_major_axis_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=f,this.pickSemiMinorAxisPoint=void 0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editEllipse)||this.pickObject(A,this.editEllipse.entity))&&this.mCallback&&this.mCallback(this.editEllipse),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.pickSemiMajorAxisPoint)||O(this.pickSemiMinorAxisPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;if(O(this.currentPoint))this.currentPoint.position=m,this.editEllipse.entity.position=m;else if(O(this.pickSemiMajorAxisPoint)){let C=te.distance(this.center,m);this.editEllipse.entity.ellipse.semiMajorAxis=C;let y=C*this.semiMinorAxis/this.semiMajorAxis;y>C&&(y=C),this.editEllipse.entity.ellipse.semiMinorAxis=y}else if(O(this.pickSemiMinorAxisPoint)){let C=te.distance(this.center,m);this.editEllipse.entity.ellipse.semiMinorAxis=C}this.semiMajorAxisPoint.position=this.updatePoint(qe.PI_OVER_TWO)}return this.mCallback&&this.mCallback(this.editEllipse),!0}updateEllipse(A){if(O(A)&&O(this.editEllipse)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editEllipse.entity.position=A[C]:O(A[C])&&(this.editEllipse.entity.ellipse[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Nlt=xIe;var vIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editEllipsoid=void 0,this.pickedEntity=void 0,this.height=0,this.isEditing=!1,this.pointsId=[],this.radiiXPoint=void 0,this.pickRadiiXPoint=void 0,this.radiiYPoint=void 0,this.pickRadiiYPoint=void 0,this.radiiZPoint=void 0,this.pickRadiiZPoint=void 0,this.dragPosition=void 0,this.editEllipsoid=f,O(this.editEllipsoid)&&O(this.editEllipsoid.entity.ellipsoid)){console.info(this.editEllipsoid.ellipsoid);let y=this.editEllipsoid.entity.position._value,x=$t.fromCartesian(y);this.height=x.height;let v=new te,E=new te,I=new te;this.getNorthPointByDistance(v,E,I),this.radiiXPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_x_point",position:v,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiXPoint.id),this.radiiYPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_y_point",position:E,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiYPoint.id),this.radiiZPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_z_point",position:I,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiZPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipsoid entity is need!"})}addHeight(A){let f=this.editEllipsoid.entity.position._value,m=$t.fromCartesian(f);return this.height=m.height+A,te.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C=this.editEllipsoid.entity.position._value,y=Kn.eastNorthUpToFixedFrame(C),x=this.editEllipsoid.entity.ellipsoid.radii._value;A.x=x.x,Ze.multiplyByPoint(y,A,A),f.y=-x.y,Ze.multiplyByPoint(y,f,f),m.z=x.z,Ze.multiplyByPoint(y,m,m)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editEllipsoid.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_x_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=f,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_y_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=f,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_z_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editEllipsoid)||this.pickObject(A,this.editEllipsoid.entity))&&this.mCallback&&this.mCallback(this.editEllipsoid),this.currentPoint=void 0,this.dragPosition=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.pickRadiiXPoint)||O(this.pickRadiiYPoint)||O(this.pickRadiiZPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=$t.fromCartesian(m),y=te.fromRadians(C.longitude,C.latitude,C.height+this.height);if(O(this.currentPoint))this.currentPoint.position=y,this.editEllipsoid.entity.position=y;else{if(O(this.dragPosition)){let I=te.subtract(m,this.dragPosition,new te),w=te.normalize(I,new te);te.dot(I,w,I);let Q=this.editEllipsoid.entity.ellipsoid.radii._value,M=te.clone(Q);O(this.pickRadiiXPoint)?M.x-=I.x:O(this.pickRadiiYPoint)?M.y+=I.y:O(this.pickRadiiZPoint)&&(M.z+=I.z,this.editEllipsoid.entity.position=this.addHeight(I.z)),te.abs(M,M),this.editEllipsoid.entity.ellipsoid.radii=M}this.dragPosition=m}let x=new te,v=new te,E=new te;this.getNorthPointByDistance(x,v,E),this.radiiXPoint.position=x,this.radiiYPoint.position=v,this.radiiZPoint.position=E}return this.mCallback&&this.mCallback(this.editEllipsoid),!0}updateEllipsoid(A){if(O(A)&&O(this.editEllipsoid)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editEllipsoid.entity.position=A[C]:O(A[C])&&(this.editEllipsoid.entity.ellipsoid[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},klt=vIe;var EIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolygon=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolygon=f,O(this.editPolygon)&&O(this.editPolygon.entity.polygon))for(let y=0;y<this.editPolygon.entity.polygon.hierarchy._value.positions.length;y++){let x=this.editPolygon.entity.polygon.hierarchy._value.positions[y],v=this.mEarthCtrl.entities.add({name:"polygon_point",position:x,point:{color:ht.WHITE,pixelSize:8,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polygon entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolygon.entity.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="polygon_point"&&(this.currentPoint=f,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolygon)||this.pickObject(A,this.editPolygon.entity))&&this.mCallback&&this.mCallback(this.editPolygon),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolygon.entity.polygon.hierarchy=C}return this.mCallback&&this.mCallback(this.editPolygon),!0}updatePolygon(A){if(O(A)&&O(this.editPolygon)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];O(A[C])&&(this.editPolygon.entity.polygon[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Olt=EIe;var IIe=class extends Ja{constructor(A,f,m,C){super(A,m,C),this.editModel=void 0,this.pickedEntity=void 0,this.editColor=ht.RED.withAlpha(.8),this.isEditing=!1,this.editModel=f,this.oldColor=this.editModel.entity.color,this.editModel.entity.color=this.editColor,O(this.editModel)&&O(this.editModel.entity)?console.info(this.editModel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"gltf Model is need!"}))}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f===this.editModel.parameter.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editModel)||this.pickObject(A,this.editModel.entity))&&this.mCallback&&this.mCallback(this.editModel),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=$t.fromCartesian(m),y=$t.clone(C);y.longitude=qe.toDegrees(y.longitude),y.latitude=qe.toDegrees(y.latitude),this.editModel.lon=y.longitude,this.editModel.lat=y.latitude}return this.mCallback&&this.mCallback(this.editModel),!0}updateModel(A){if(O(A)&&O(this.editModel)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];if(O(A[C]))switch(C){case"lon":case"lat":case"alt":case"heading":case"pitch":case"roll":this.editModel[C]=A[C];break;default:this.editModel.entity[C]=A[C];break}}}}endEditEntity(){this.editModel.entity.color=this.oldColor}},Ult=IIe;var _Ie=class extends Ja{constructor(A,f,m,C){super(A,m,C),this.editLabel=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editLabel=f,O(this.editLabel)&&O(this.editLabel.entity.label)?console.info(this.editLabel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Label entity is need!"}))}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editLabel.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editLabel.entity)||this.pickObject(A,this.editLabel.entity))&&this.mCallback&&this.mCallback(this.editLabel),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editLabel.entity.position=m}return this.mCallback&&this.mCallback(this.editLabel),!0}updateLabel(A){if(O(A)&&O(this.editLabel)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editLabel.entity.position=A[C]:O(A[C])&&(this.editLabel.entity.label[C]=A[C])}}}endEditEntity(){}},Glt=_Ie;var BIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolyline=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolyline=f,O(this.editPolyline)&&O(this.editPolyline.polyline))for(let y=0;y<this.editPolyline.polyline.positions._value.length;y++){let x=this.editPolyline.polyline.positions._value[y],v=this.mEarthCtrl.entities.add({name:"polyline_point",position:x,point:{color:ht.WHITE,pixelSize:8,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polyline entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolyline.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="polyline_point"&&(this.currentPoint=f,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolyline)||this.pickObject(A,this.editPolyline.entity))&&this.mCallback&&this.mCallback(this.editPolyline),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolyline.polyline.positions=C}return this.mCallback&&this.mCallback(this.editPolyline),!0}updatePolyline(A){if(O(A)&&O(this.editPolyline)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];O(A[C])&&(this.editPolyline.polyline[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Hlt=BIe;var wIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolylineVolume=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolylineVolume=f,O(this.editPolylineVolume)&&O(this.editPolylineVolume.entity.polylineVolume))for(let y=0;y<this.editPolylineVolume.entity.polylineVolume.positions._value.length;y++){let x=this.editPolylineVolume.entity.polylineVolume.positions._value[y],v=this.mEarthCtrl.entities.add({name:"edit_polylineVolume_point",position:x,point:{color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"PolylineVolume entity is need!"})}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolylineVolume.entity.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="edit_polylineVolume_point"&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolylineVolume)||this.pickObject(A,this.editPolylineVolume.entity))&&this.mCallback&&this.mCallback(this.editPolylineVolume),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolylineVolume.entity.polylineVolume.positions=C}return this.mCallback&&this.mCallback(this.editPolylineVolume),!0}updatePolylineVolume(A){if(O(A)&&O(this.editPolylineVolume)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editPolylineVolume.entity.position=A[C]:O(A[C])&&(this.editPolylineVolume.entity.polylineVolume[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Vlt=wIe;var bIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editRectangle=void 0,this.pickedEntity=void 0,this.leftTopPoint=void 0,this.rightBottomPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editRectangle=f,O(this.editRectangle)&&O(this.editRectangle.entity.rectangle)){let y=this.editRectangle.entity.rectangle.coordinates._value,x=this.editRectangle.entity.rectangle.height._value,v=Di.northwest(y),E=te.fromRadians(v.longitude,v.latitude,x),I=this.mEarthCtrl.entities.add({name:"rect_left_top_point",position:E,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:ht.WHITE,pixelSize:8,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(I.id),v=Di.southeast(y);let w=te.fromRadians(v.longitude,v.latitude,x),Q=this.mEarthCtrl.entities.add({name:"rect_right_bottom_point",position:w,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:ht.WHITE,pixelSize:8,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(Q.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Rectangle entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editRectangle.entity.id?(this.isEditing=!0,this.leftTopPoint=void 0,this.rightBottomPoint=void 0):f.name==="rect_left_top_point"?(this.leftTopPoint=f,this.rightBottomPoint=void 0,this.isEditing=!0):f.name==="rect_right_bottom_point"&&(this.rightBottomPoint=f,this.leftTopPoint=void 0,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editRectangle)||this.pickObject(A,this.editRectangle.entity))&&this.mCallback&&this.mCallback(this.editRectangle),this.leftTopPoint=void 0,this.rightBottomPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.leftTopPoint)||O(this.rightBottomPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=$t.fromCartesian(m),y=this.editRectangle.entity.rectangle.coordinates._value;O(this.leftTopPoint)?(this.leftTopPoint.position=m,y.west=C.longitude,y.north=C.latitude):O(this.rightBottomPoint)&&(this.rightBottomPoint.position=m,y.south=C.latitude,y.east=C.longitude),this.editRectangle.entity.rectangle.coordinates=y}return this.mCallback&&this.mCallback(this.editRectangle),!0}updateRectangle(A){if(O(A)&&O(this.editRectangle)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editRectangle.entity.position=A[C]:O(A[C])&&(this.editRectangle.entity.rectangle[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},zlt=bIe;function wd(o){this._earthCtrl=o,this._coreMap=o.coreMap}wd.prototype.editPoint=function(o,A){this._earthCtrl.tools.clearTool();let f=new Rlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("point_edit_tool",f),f};wd.prototype.updatePoint=function(o,A){o.updatePoint(A)};wd.prototype.editPolyline=function(o,A){this._earthCtrl.tools.clearTool();let f=new Hlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polyline_edit_tool",f),f};wd.prototype.updatePolyline=function(o,A){o.updatePolyline(A)};wd.prototype.editPolygon=function(o,A){this._earthCtrl.tools.clearTool();let f=new Olt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polygon_edit_tool",f),f};wd.prototype.updatePolygon=function(o,A){o.updatePolygon(A)};wd.prototype.editBox=function(o,A){this._earthCtrl.tools.clearTool();let f=new Llt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("box_edit_tool",f),f};wd.prototype.updateBox=function(o,A){o.updateBox(A)};wd.prototype.editEllipsoid=function(o,A){this._earthCtrl.tools.clearTool();let f=new klt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("ellipsoid_edit_tool",f),f};wd.prototype.updateEllipsoid=function(o,A){o.updateEllipsoid(A)};wd.prototype.editCylinder=function(o,A){this._earthCtrl.tools.clearTool();let f=new Flt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("cylinder_edit_tool",f),f};wd.prototype.updateCylinder=function(o,A){o.updateCylinder(A)};wd.prototype.editModel=function(o,A){this._earthCtrl.tools.clearTool();let f=new Ult(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("model_edit_tool",f),f};wd.prototype.updateModel=function(o,A){o.updateModel(A)};wd.prototype.editBillboard=function(o,A){this._earthCtrl.tools.clearTool();let f=new Plt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("billboard_edit_tool",f),f};wd.prototype.updateBillboard=function(o,A){o.updateBillboard(A)};wd.prototype.editLabel=function(o,A){this._earthCtrl.tools.clearTool();let f=new Glt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("label_edit_tool",f),f};wd.prototype.updateLabel=function(o,A){o.updateLabel(A)};wd.prototype.editRectangle=function(o,A){this._earthCtrl.tools.clearTool();let f=new zlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("rectangle_edit_tool",f),f};wd.prototype.updateRectangle=function(o,A){o.updateRectangle(A)};wd.prototype.editEllipse=function(o,A){this._earthCtrl.tools.clearTool();let f=new Nlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("ellipse_edit_tool",f),f};wd.prototype.updateEllipse=function(o,A){o.updateEllipse(A)};wd.prototype.editPolylineVolume=function(o,A){this._earthCtrl.tools.clearTool();let f=new Vlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polylinevolume_edit_tool",f),f};wd.prototype.updatePolylineVolume=function(o,A){o.updatePolylineVolume(A)};wd.prototype.endEditEntity=function(o){this._earthCtrl.tools.clearTool(),o.endEditEntity(),this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!0,this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!0};var Moe=wd;function fy(o){this.mEarthCtrl=o,this.scene=this.mEarthCtrl.coreMap.scene,this.entities=this.mEarthCtrl.entities,this.camera=this.mEarthCtrl.coreMap.camera,this._points=[],this.item=void 0}fy.prototype.horizontalDistance=function(o,A){let f=this,m=!1,C=[],y="",x=[],v,E=this.scene.globe.ellipsoid,I={spot:[],distance:[],label:[],polyline:[]},w={point:ht.RED,polyline:ht.fromRgba(4286644096)};O(A)&&(O(A.point)&&(w.point=A.point),O(A.polyline)&&(w.polyline=A.polyline));let Q=new k_;this.scene.primitives.add(Q);let M=new YA,B=new zr(f.scene.canvas),T=document.createElement("div");Zc(".map-widget",T),Zc(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let F=document.getElementById("toolTip");F.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let L;m=!0;let R=function(V){let U=0,W=`${0}\u7C73`,ie,ee,oe,ne,se,ce;for(let J=0;J<V.length-1;J+=1)ie=E.cartesianToCartographic(V[J]),ee=M.project(ie),oe=ee.x,ne=ee.y,ie=E.cartesianToCartographic(V[J+1]),ee=M.project(ie),se=ee.x,ce=ee.y,U=U+Math.sqrt((oe-se)*(oe-se)+(ne-ce)*(ne-ce));return U>0&&(W=`${U.toFixed(2)}\u7C73`),U/1e3>=1&&(W=`${(U/1e3).toFixed(2)}\u5343\u7C73`),W},k=function(){function V(U){if(!O(U))throw new Hi("positions is required!");if(U.length<2)throw new Hi("positions \u7684\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E2");let W=hs.fromType(hs.ColorType);W.uniforms.color=new ht(1,1,0,.5),this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:w.polyline,width:3,clampToGround:!0}},this.path=U,this._init()}return V.prototype._init=function(){let U=this,W=function(){return U.path};this.options.polyline.positions=new Qn(W,!1),this.lineEntity=f.entities.add(this.options),f.item=this.lineEntity,I.polyline.push(this.lineEntity)},V}();B.setInputAction(function(V){let U,W;F.style.left=`${V.endPosition.x+10}px`,F.style.top=`${V.endPosition.y+20}px`,F.style.display="block",F.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let ie=!1,ee=f.camera.getPickRay(V.endPosition);ee&&(U=f.scene.globe.pick(ee,f.scene));let oe=f.scene.pick(V.endPosition);if(oe){console.log("feature",oe);let ne=f.scene.pickPosition(V.endPosition);ne&&(U=ne),ie=!0}if(!!U&&(W=Pi.WGS84.cartesianToCartographic(U),W)){let ne;ie?ne=f.scene.sampleHeight(W):ne=f.scene.globe.getHeight(W);let se=te.fromDegrees(W.longitude/Math.PI*180,W.latitude/Math.PI*180,ne);if(m){if(C.length<1)return;O(v)?(v.path.pop(),v.path.push(se)):(C.push(se),v=new k(C));let ce=R(v.path);f.entities.remove(L),L=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:v.path[v.path.length-1],label:{text:`\u603B\u957F\uFF1A${ce}`,show:!0,font:"26px \u6977\u4F53",fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}})}}},Yi.MOUSE_MOVE);let G=function(V){x.push(V);let U=[];if(x.length>1){let W=x[x.length-2],ie=x[x.length-1],ee=Math.abs(W.longitude-ie.longitude)*1e7,oe=Math.abs(W.latitude-ie.latitude)*1e7;ee>oe&&(oe=ee);let ne=parseInt(oe/10);ne>1e3&&(ne=1e3),ne<2&&(ne=2);for(let se=0;se<ne;++se)U.push(new $t(qe.lerp(W.longitude,ie.longitude,se/(ne-1)),qe.lerp(W.latitude,ie.latitude,se/(ne-1))));U.push(ie.clone())}else U=x;if(U.length>0)for(let W=0;W<U.length;W++){V=U[W];let ie=f.scene.globe.getHeight(V),ee=te.fromDegrees(V.longitude/Math.PI*180,V.latitude/Math.PI*180,ie);C.push(ee)}};return B.setInputAction(function(V){let U,W,ie=!1,ee=f.camera.getPickRay(V.position);if(ee&&(U=f.scene.globe.pick(ee,f.scene)),f.scene.pick(V.position)){let ne=f.scene.pickPosition(V.position);ne&&(U=ne),ie=!0}if(U&&(W=Pi.WGS84.cartesianToCartographic(U)),W){let ne;ie?ne=f.scene.sampleHeight(W):ne=f.scene.globe.getHeight(W);let se=te.fromDegrees(W.longitude/Math.PI*180,W.latitude/Math.PI*180,ne);if(m){v&&v.path.pop(),G(W);let ce="0\u7C73";v&&(ce=R(v.path)),y=ce,I.spot.push(se),I.distance.push(ce);let J=f.entities.add({position:se,point:{pixelSize:5,color:w.point,outlineColor:ht.WHITE,outlineWidth:1,clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:ce,show:!0,font:"26px \u6977\u4F53",fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-20),clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}});I.label.push(J),f._points.push(J)}}},Yi.LEFT_CLICK),B.setInputAction(function(){f.entities.remove(L),f._points[f._points.length-1].label.text=y,B.destroy(),C.pop(),O(o)&&typeof o=="function"&&o(I),F.style.display="none"},Yi.RIGHT_CLICK),this};fy.prototype.spaceDistance=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m=new zr(f.scene.canvas),C=[],y=null,x="0\u7C73",v=null,E,I="",w,Q=document.createElement("div");Zc(".map-widget",Q),Zc(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let B=document.getElementById("toolTip");B.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let T={name:"",spot:[],distance:[],label:[],ployline:[]},D={point:ht.RED,polyline:ht.fromRgba(4286644096)};O(A)&&(O(A.point)&&(D.point=A.point),O(A.polyline)&&(D.polyline=A.polyline));let F=function(){function L(R){this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:D.polyline,width:3,clampToGround:!1}},this.positions=R,this._init()}return L.prototype._init=function(){let R=this,k=function(){return R.positions};this.options.polyline.positions=new Qn(k,!1);let G=f.entities.add(this.options);f.item=G,T.ployline.push(G);let V=f.getuid();T.name=`\u65B0\u5EFA\u7A7A\u95F4\u8DDD\u79BB${V}`},L}();return m.setInputAction(function(L){if(f.scene.bim){let R=f.scene.bim.PickWorldPositionSync(L.endPosition.x,L.endPosition.y);R[0]===0?v=f.scene.pickPosition(L.endPosition):v=new te(R[0],R[1],R[2]),console.log("????????",v)}else v=f.scene.pickPosition(L.endPosition);!v||(B.style.left=`${L.endPosition.x+10}px`,B.style.top=`${L.endPosition.y+20}px`,B.style.display="block",C.length>=2&&(O(y)?(C.pop(),C.push(v)):y=new F(C),B.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u53F3\u952E\u7ED3\u675F\uFF01</span>',x=f.getSpaceDistance(C)),f.entities.remove(w),w=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:C[C.length-1],label:{text:`\u603B\u957F\uFF1A${x}`,show:!0,font:"26px \u6977\u4F53",fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}}))},Yi.MOUSE_MOVE),m.setInputAction(function(L){if(f.scene.bim){let k=f.scene.bim.PickWorldPositionSync(L.position.x,L.position.y);k[0]===0?v=f.scene.pickPosition(L.position):v=new te(k[0],k[1],k[2]),console.log("????????",v)}else v=f.scene.pickPosition(L.position);if(!v)return;C.length===0&&C.push(v.clone()),C.push(v);let R=x;I=`\u603B\u957F\uFF1A${x}`,E=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:C[C.length-1],point:{pixelSize:5,color:D.point,outlineColor:ht.WHITE,outlineWidth:2,clampToGround:!1,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:R,show:!0,font:"26px \u6977\u4F53",fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-20),heightReference:In.NONE,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(E),T.spot.push(v),T.distance.push(x),T.label.push(E)},Yi.LEFT_CLICK),m.setInputAction(function(L){B.style.display="none",f.entities.remove(w),f._points.length>0&&(f._points[f._points.length-1].label.text=I),m.destroy(),C.pop(),O(o)&&typeof o=="function"&&o(T)},Yi.RIGHT_CLICK),this};fy.prototype.getSpaceDistance=function(o){let A=0,f="";for(let m=0;m<o.length-1;m++){let C=$t.fromCartesian(o[m]),y=$t.fromCartesian(o[m+1]),x=new xp;x.setEndPoints(C,y);let v=x.surfaceDistance;v=Math.sqrt(Math.pow(v,2)+Math.pow(y.height-C.height,2)),A=A+v}return A>=1e3?f=`${(A/1e3).toFixed(2)}\u5343\u7C73`:f=`${A.toFixed(2)}\u7C73`,f};fy.prototype.getPlaneArea=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m=0,C=new zr(f.scene._imageryLayerCollection),y=document.getElementById("toolTip");y||(Zc(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>'),y=document.getElementById("toolTip")),y.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB\uFF0C\u53F3\u952E\u7ED3\u675F\uFF01</span>';let x=[],v={},E=[],I=[],w=null,Q=null,M,B={point:ht.RED,polyline:ht.fromRgba(4286644096),polygon:ht.fromRgba(4286644096).withAlpha(.5)};O(A)&&(O(A.point)&&(B.point=A.point),O(A.polyline)&&(B.polyline=A.polyline),O(A.polygon)&&(B.polygon=A.polygon));let T={mj:0,label:[],polygon:[]};y.style.display="block";let D=function(){function F(L){this.options={name:"\u591A\u8FB9\u5F62",polygon:{hierarchy:[],perPositionHeight:!0,material:B.polygon,clampToGround:!1}},this.hierarchy=L,this._init()}return F.prototype._init=function(){let L=this,R=function(){return L.hierarchy};this.options.polygon.hierarchy=new Qn(R,!1),this.polygon=f.entities.add(this.options),f.item=this.polygon,f._entity=this.polygon,T.polygon=this.polygon},F}();return C.setInputAction(function(F){if(y.style.left=`${F.endPosition.x+10}px`,y.style.top=`${F.endPosition.y+20}px`,f.scene.bim){let V=f.scene.bim.PickWorldPositionSync(F.endPosition.x,F.endPosition.y);V[0]===0?Q=f.scene.pickPosition(F.endPosition):Q=new te(V[0],V[1],V[2])}else Q=f.scene.pickPosition(F.endPosition);if(!Q)return;let L=$t.fromCartesian(Q),R=qe.toDegrees(L.longitude),k=qe.toDegrees(L.latitude),G=L.height;if(x.length>=2){O(w)?(x.pop(),x.push(Q),v=new Hn(x),I.pop(),I.push({lon:R,lat:k,hei:G})):(v=new Hn(x),w=new D(v));let V=f.getArea(I,x);f.entities.remove(M),M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:x[x.length-1],label:{text:V,font:"26px \u6977\u4F53",show:!0,fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-40),heightReference:In.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),T.label=M}},Yi.MOUSE_MOVE),C.setInputAction(function(F){if(f.scene.bim){let V=f.scene.bim.PickWorldPositionSync(F.position.x,F.position.y);V[0]===0?Q=f.scene.pickPosition(F.position):Q=new te(V[0],V[1],V[2])}else Q=f.scene.pickPosition(F.position);if(!Q)return;let L=$t.fromCartesian(Q);console.log("\u5DE6\u952E\u70B9",L);let R=qe.toDegrees(L.longitude),k=qe.toDegrees(L.latitude),G=L.height;x.length===0&&(x.push(Q.clone()),v=new Hn(x),I.push({lon:R,lat:k,hei:G}),x.push(Q.clone()),v=new Hn(x),I.push({lon:R,lat:k,hei:G})),x.push(Q),v=new Hn(x),E.push({lon:R,lat:k,hei:G}),I.push({lon:R,lat:k,hei:G})},Yi.LEFT_CLICK),C.setInputAction(function(F){y.style.display="none",f.entities.remove(M),C.destroy();let L=f.getArea(I,x);m=L;let R=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:x[x.length-1],label:{text:L,font:"26px \u6977\u4F53",show:!0,fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-40),heightReference:In.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}});f._points.push(R),f._lable=R,T.mj=m,T.label=R,O(o)&&typeof o=="function"&&o(T)},Yi.RIGHT_CLICK),this};fy.prototype.getSurfaceArea3d=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m={mj:0,label:[],polygon:[]},C=!0,y=[],x={},v,E=f.scene,I=E.globe.ellipsoid,w=new k_;E.primitives.add(w);let Q,M,B=0,T={point:ht.RED,polyline:ht.fromRgba(4286644096),polygon:ht.fromRgba(4286644096).withAlpha(.5)};O(A)&&(O(A.point)&&(T.point=A.point),O(A.polyline)&&(T.polyline=A.polyline),O(A.polygon)&&(T.polygon=A.polygon));let D=document.createElement("div");Zc(".map-widget",D),Zc(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let L=document.getElementById("toolTip");L.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let R=new zr(E.canvas),k=function(){function V(U){if(!O(U))throw new Hi("positions is required!");if(U.length<3)throw new Hi("positions \u7684\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E3");this.options={polygon:{show:!0,hierarchy:void 0,material:T.polygon,clampToGround:!1}},this.path=U,this._init()}return V.prototype._init=function(){let U=this,W=function(){return U.path};this.options.polygon.hierarchy=new Qn(W,!1),this.polygonEntity=f.entities.add(this.options),f.item=this.polygonEntity,m.polygon=this.polygonEntity,f._entity=this.polygonEntity},V}();R.setInputAction(function(V){let U=0;f.entities.remove(M);let W,ie,ee=f.scene.camera.getPickRay(V.endPosition);ee&&(W=f.scene.globe.pick(ee,f.scene));let oe=f.scene.pick(V.endPosition),ne=!1;if(oe){let ce=f.scene.pickPosition(V.endPosition);ce&&(W=ce),ne=!0}if(!W)return;let se=function(ce){let J=new Array(ce.length),he=function(Ie){return Ie.longitude=Ie.longitude/Math.PI*180,Ie.latitude=Ie.latitude/Math.PI*180,Ie},Ce=function(Ie){let be=0;for(let Be=0;Be<Ie.length;Be++){let me=Ie[Be],z;Be<Ie.length-1?z=Ie[Be+1]:z=Ie[0],be+=me.x*z.y-z.x*me.y}return be/2};for(let Ie=0;Ie<ce.length;Ie++)J[Ie]=he(I.cartesianToCartographic(ce[Ie]));let Ee=0;for(let Ie=0;Ie<J.length;Ie++)Ee+=J[Ie].longitude;Ee=Ee/J.length;for(let Ie=0;Ie<J.length;Ie++)J[Ie]=f.Gauss_to_XY(J[Ie].longitude,J[Ie].latitude,Ee);return Math.abs(Ce(J))};if(ie=Pi.WGS84.cartesianToCartographic(W),ie&&C){if(L.style.left=`${V.endPosition.x+10}px`,L.style.top=`${V.endPosition.y+20}px`,L.style.display="block",y.length<2){B===1&&(M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:W,label:{text:`${U}\u5E73\u65B9\u5343\u7C73`,font:"26px \u6977\u4F53",show:!0,fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-40),heightReference:In.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(M),m.label=M);return}if(O(v)?(v.path.positions.pop(),v.path.positions.push(W)):(y.push(W),x=new Hn(y),v=new k(x)),y.length>=2){L.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u53F3\u952E\u7ED3\u675F\uFF01</span>';let ce=String(se(v.path.positions));ce=ce.substr(0,ce.indexOf(".",0)),ce.length<6?U=`${ce}\u5E73\u65B9\u7C73`:(ce=String(ce/1e6),ce=ce.substr(0,ce.indexOf(".",0)+3),U=`${ce}\u5E73\u65B9\u5343\u7C73`),m.mj=U,M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:W,label:{text:U,font:"26px \u6977\u4F53",show:!0,fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-40),heightReference:In.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(M),m.label=M}}},Yi.MOUSE_MOVE),R.setInputAction(function(V){let U;B=1;let W=f.scene.camera.getPickRay(V.position);W&&(U=f.scene.globe.pick(W,f.scene));let ie=f.scene.pick(V.position),ee=!1;if(ie){let oe=f.scene.pickPosition(V.position);oe&&(U=oe),ee=!0}U&&C&&(y.push(U),x=new Hn(y))},Yi.LEFT_CLICK),R.setInputAction(function(){R.removeInputAction(Yi.LEFT_CLICK),R.removeInputAction(Yi.LEFT_DOUBLE_CLICK),f.trackedEntity=void 0,C=!1,Q=w.add({show:!0,id:"measureTool",position:y[y.length-1],pixelOffset:new wt(0,20),eyeOffset:new te(0,0,0),horizontalOrigin:cA.CENTER,verticalOrigin:Bn.CENTER,scale:1,color:new ht(1,1,1,1)}),L.style.display="none",R.destroy(),O(o)&&typeof o=="function"&&o(m)},Yi.RIGHT_CLICK);let G=function(V){let U=0,W=0,ie=0;for(let oe=0;oe<V.length;oe++)U+=V[oe].x,W+=V[oe].y,ie+=V[oe].z;return new te(U/V.length,W/V.length,ie/V.length)};return this};fy.prototype.to_N=function(o){let f=63567523142e-4,m=Math.sqrt(6378137*6378137-f*f)/6378137;return 6378137/Math.sqrt(1-m*m*Math.sin(o)*Math.sin(o))};fy.prototype.to_Sm=function(o){let f=63567523142e-4,m=Math.sqrt(6378137*6378137-f*f)/6378137,C,y,x,v,E;return C=1+m*m*3/4+Math.pow(m,4)*45/64+Math.pow(m,6)*175/256+Math.pow(m,8)*11025/16384,y=Math.pow(m,2)*3/4+Math.pow(m,4)*15/16+Math.pow(m,6)*525/512+Math.pow(m,8)*2205/2048,x=Math.pow(m,4)*15/64+Math.pow(m,6)*105/256+Math.pow(m,8)*2205/4096,v=Math.pow(m,6)*35/512+Math.pow(m,8)*315/2048,E=Math.pow(m,8)*315/16384,6378137*(1-m*m)*(C*o-y/2*Math.sin(2*o)+x/4*Math.sin(4*o)-v/6*Math.sin(6*o)+E/8*Math.sin(8*o))};fy.prototype.to_Radian=function(o){return o*Math.PI/180};fy.prototype.Gauss_to_XY=function(o,A,f){let C=63567523142e-4,y=Math.sqrt(6378137*6378137-C*C)/C,x=0,v=0,E=0,I=0,w=this.to_Radian(f);A=this.to_Radian(A),o=this.to_Radian(o);let Q=o-w,M=Math.cos(A);I=this.to_N(A),E=I*Math.cos(A),x=Math.tan(A),v=y*M;let B=Math.pow(x,2),T=Math.pow(x,4),D=Math.pow(v,2),F=Math.pow(v,4),L=Math.pow(M,3),R=Math.pow(M,5),k=this.to_Sm(A)+Math.pow(Q,2)/2*E*M*x+Math.pow(Q,4)/24*x*E*L*(5-B+9*D+4*F)+Math.pow(Q,6)/720*x*E*R*(61-58*x*x+T+270*D-330*x*x*D),G=Q*I*M+Math.pow(Q,3)/6*I*L*(1-x*x+v*v)+Math.pow(Q,5)/120*I*R*(5-18*x*x+T+14*D-58*D*B);return new wt(G,k)};fy.prototype.getArea=function(o,A){let f=0;for(let m=0;m<o.length-2;m++){let C=(m+1)%o.length,y=(m+2)%o.length,x=this.Angle(o[m],o[C],o[y]),v=this.getdistance(A[m],A[C]),E=this.getdistance(A[C],A[y]);f+=v*E*Math.abs(Math.sin(x))}return f<1e6?f=`${f.toFixed(4)}\u5E73\u65B9\u7C73`:f=`${(f/1e6).toFixed(4)}\u5E73\u65B9\u5343\u7C73`,f};fy.prototype.getdistance=function(o,A){let f=$t.fromCartesian(o),m=$t.fromCartesian(A),C=new xp;C.setEndPoints(f,m);let y=C.surfaceDistance;return y=Math.sqrt(Math.pow(y,2)+Math.pow(m.height-f.height,2)),y};fy.prototype.Bearing=function(o,A){let f=Math.PI/180,m=180/Math.PI,C=o.lat*f,y=o.lon*f,x=A.lat*f,v=A.lon*f,E=-Math.atan2(Math.sin(y-v)*Math.cos(x),Math.cos(C)*Math.sin(x)-Math.sin(C)*Math.cos(x)*Math.cos(y-v));return E<0&&(E+=Math.PI*2),E=E*m,E};fy.prototype.Angle=function(o,A,f){let m=this.Bearing(A,o),C=this.Bearing(A,f),y=m-C;return y<0&&(y+=360),y};fy.prototype.getuid=function(){return this.uuid(8,16)};fy.prototype.uuid=function(o,A){let f="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),m=[],C;if(A=A||f.length,o)for(C=0;C<o;C++)m[C]=f[0|qe.nextRandomNumber()*A];else{let y;for(m[8]=m[13]=m[18]=m[23]="-",m[14]="4",C=0;C<36;C++)m[C]||(y=0|qe.nextRandomNumber()*16,m[C]=f[C===19?y&3|8:y])}return m.join("")};fy.prototype.deleteObject=function(){if(this.entities.remove(this.item),this._points.length>0){for(let o=0;o<this._points.length;o++)this.entities.remove(this._points[o]);this._points=[]}try{this.scene.primitives.remove(this.item)}catch(o){console.log(o)}this.item=void 0};var lJ=fy;function tw(o,A){this._earthCtrl=o,this._coreMap=this._earthCtrl.coreMap,this._show=Ae(A.show,!0),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,10),this._heading=Ae(A.heading,0),this._pitch=Ae(A.pitch,0),this._distance=Ae(A.distance,300),this._position=te.fromDegrees(A.lon,A.lat,A.height),this._horizontalViewAngle=Ae(A.horizontalViewAngle,90),this._verticalViewAngle=Ae(A.verticalViewAngle,60),this._horizontalViewAngle=this.adjustViewRange(this._horizontalViewAngle),this._verticalViewAngle=this.adjustViewRange(this._verticalViewAngle),this._visibleAreaColor=Ae(A.visibleAreaColor,ht.GREEN.withAlpha(.4)),this._invisibleAreaColor=Ae(A.invisibleAreaColor,ht.RED.withAlpha(.4)),this._size=Ae(A.size,10240),this._softShadows=Ae(A.softShadows,!0),this._colorStyle=Ae(A.colorStyle,ht.YELLOW),this._parameter=A,this._lineArray=[],this._visualCone=!0,this.pyramid=void 0,this.updateViewShed()}Object.defineProperties(tw.prototype,{show:{get:function(){return this._show},set:function(o){o!==this._show&&(this._show=o,this.updateViewShed())}},distance:{get:function(){return this._distance}},heading:{get:function(){return this._heading}},pitch:{get:function(){return this._pitch}},horizontalViewAngle:{get:function(){return this._horizontalViewAngle}},verticalViewAngle:{get:function(){return this._verticalViewAngle}},colorStyle:{get:function(){return this._colorStyle},set:function(o){this._colorStyle=o}},invisibleAreaColor:{get:function(){return this._invisibleAreaColor},set:function(o){this._invisibleAreaColor=o}},visibleAreaColor:{get:function(){return this._visibleAreaColor},set:function(o){this._visibleAreaColor=o}},visualCone:{get:function(){return this._visualCone},set:function(o){this._visualCone=o,this.visualConeShow(o)}}});tw.prototype.adjustViewRange=function(o){return o<=0?o=1:o>=180&&(o=179),o};tw.prototype.removeFromMap=function(){let o=this;O(o.viewShedMap)&&(o.viewShedMap.enabled=!1),O(o.pyramid)&&(o._earthCtrl.entities.removeById(o.pyramid.id),o.pyramid=null);for(let A=0;A<o._lineArray.length;A++){let f=o._lineArray[A];o._earthCtrl.entities.remove(f)}o._lineArray=[]};tw.prototype.visualConeShow=function(o){let A=this;O(A.pyramid)&&(A.pyramid.show=o);for(let f=0;f<A._lineArray.length;f++){let m=A._lineArray[f];m.show=o}};tw.prototype.addVisualPyramid=function(){let o=this,A=new AK({radii:new Qn(function(){return new te(o._distance,o._distance,o._distance)},!1),minimumClock:new Qn(function(){return qe.toRadians(90-o._heading-o._horizontalViewAngle/2)},!1),maximumClock:new Qn(function(){return qe.toRadians(90-o._heading+o._horizontalViewAngle/2)},!1),minimumCone:new Qn(function(){return qe.toRadians(90-o._verticalViewAngle/2)},!1),maximumCone:new Qn(function(){return qe.toRadians(90+o._verticalViewAngle/2)},!1),fill:!1,outline:!0,subdivisions:128,slicePartitions:32,stackPartitions:16,outlineColor:new Qn(function(){return o._colorStyle},!1)}),f=new JA({position:new Qn(function(){return o._position},!1),ellipsoid:A});this.pyramid=o._earthCtrl.entities.add(f)};tw.prototype.createLightCamera=function(){O(this.viewShedMap)?this._lightCamera=this.viewShedMap._lightCamera:this._lightCamera=new Ol(this._coreMap.scene),this._lightCamera.position=this._position};tw.prototype.updateParameters=function(o){let A=this,f=A._lightCamera;if(!!O(o)&&(O(o.lon)||O(o.lat)||O(o.height)||O(o.heading)||O(o.pitch)||O(o.roll)||O(o.far)||O(o.distance)||O(o.verticalViewAngle)||O(o.horizontalViewAngle))){let m=this._parameter;for(let v in o)o.hasOwnProperty(v)&&O(m[v])&&(m[v]=o[v]);m.distance>=A.viewShedMap.maximumDistance&&(m.distance=A.viewShedMap.maximumDistance),A._heading=m.heading,A._pitch=m.pitch,A._distance=m.distance,A.viewShedMap._pointLightRadius=m.distance,m.verticalViewAngle=A.adjustViewRange(m.verticalViewAngle),A._verticalViewAngle=m.verticalViewAngle,m.horizontalViewAngle=A.adjustViewRange(m.horizontalViewAngle),A._horizontalViewAngle=m.horizontalViewAngle,A._position=te.fromDegrees(m.lon,m.lat,m.height);let C=qe.toRadians(m.heading);f.setView({destination:A._position,orientation:{heading:C,pitch:0,roll:0}}),f.frustum.far=m.far||1e5;let y=qe.toRadians(A._horizontalViewAngle),x=qe.toRadians(A._verticalViewAngle);f.frustum.aspectRatio=Math.tan(y/2)/Math.tan(x/2),y>x?f.frustum.fov=y:f.frustum.fov=x}};tw.prototype.createShadowMap=function(){if(O(this.viewShedMap)){this.viewShedMap.enabled=!0;return}this.viewShedMap=new JK({context:this._coreMap.scene.context,lightCamera:this._lightCamera,enabled:!0,isPointLight:!0,pointLightRadius:this._distance,cascadesEnabled:!1,size:this._size,softShadows:!0,normalOffset:!1,fromLightSource:!1,visibleAreaColor:this._visibleAreaColor,invisibleAreaColor:this._invisibleAreaColor}),this._earthCtrl.viewShedMapList.push(this.viewShedMap)};var Dx=new te;tw.prototype.drawViewCentrum=function(){let o=this;function A(){let I=o.pyramid._ellipsoid._minimumClock.getValue(),w=o.pyramid._ellipsoid._minimumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Dx.x=Q.x*T*L,Dx.y=Q.y*T*F,Dx.z=Q.z*D;let R=new SD.changeCartesian3ByScalar(o._position,Dx);return[o._position,R]}let f=this._earthCtrl.entities.add({polyline:{positions:new Qn(A,!1),material:this._colorStyle}});this._lineArray.push(f);function m(){let I=o.pyramid._ellipsoid._maximumClock.getValue(),w=o.pyramid._ellipsoid._minimumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Dx.x=Q.x*T*L,Dx.y=Q.y*T*F,Dx.z=Q.z*D;let R=new SD.changeCartesian3ByScalar(o._position,Dx);return[o._position,R]}let C=this._earthCtrl.entities.add({polyline:{positions:new Qn(m,!1),material:this._colorStyle}});this._lineArray.push(C);function y(){let I=o.pyramid._ellipsoid._minimumClock.getValue(),w=o.pyramid._ellipsoid._maximumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Dx.x=Q.x*T*L,Dx.y=Q.y*T*F,Dx.z=Q.z*D;let R=new SD.changeCartesian3ByScalar(o._position,Dx);return[o._position,R]}let x=this._earthCtrl.entities.add({polyline:{positions:new Qn(y,!1),material:this._colorStyle}});this._lineArray.push(x);function v(){let I=o.pyramid._ellipsoid._maximumClock.getValue(),w=o.pyramid._ellipsoid._maximumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Dx.x=Q.x*T*L,Dx.y=Q.y*T*F,Dx.z=Q.z*D;let R=SD.changeCartesian3ByScalar(o._position,Dx);return[o._position,R]}let E=this._earthCtrl.entities.add({polyline:{positions:new Qn(v,!1),material:this._colorStyle}});this._lineArray.push(E)};tw.prototype.updateViewShed=function(){this.show?(this.createLightCamera(),this.setCameraParams(),this.createShadowMap(),this.addVisualPyramid(),this.drawViewCentrum()):this.removeFromMap()};tw.prototype.setCameraParams=function(){this._lightCamera.frustum.near=.1,this._lightCamera.frustum.far=this._distance;let o=qe.toRadians(this._horizontalViewAngle),A=qe.toRadians(this._verticalViewAngle);this._lightCamera.frustum.aspectRatio=Math.tan(o/2)/Math.tan(A/2),o>A?this._lightCamera.frustum.fov=o:this._lightCamera.frustum.fov=A,this._lightCamera.setView({destination:this._position,orientation:{heading:qe.toRadians(this._heading),pitch:qe.toRadians(this._pitch),roll:0}})};var Poe=tw;var QIe=Pi.WGS84;function Uf(o){this._cesiumViewer=o,this.coreMap=o.coreMap,this._scene=this.coreMap.scene,this.loading||this.addLoading(),this._tooltip=FRi(this.coreMap.container)}function SIe(o,A){if(o===null||typeof o!="object"||o.constructor!==Object&&o.constructor!==Array)return o;if(o.constructor===Date||o.constructor===RegExp||o.constructor===Function||o.constructor===String||o.constructor===Number||o.constructor===Boolean)return new o.constructor(o);A=A||new o.constructor;for(let f in o)A[f]=typeof A[f]>"u"?SIe(o[f],null):A[f];return A}function Klt(o,A){let f=SIe(o),m;for(m in A)f[m]===void 0&&(f[m]=SIe(A[m]));return f}function FRi(o){let A=function(f){let m=document.createElement("DIV");m.className="twipsy right";let C=document.createElement("DIV");C.className="twipsy-arrow",m.appendChild(C);let y=document.createElement("DIV");y.className="twipsy-inner",m.appendChild(y),this._div=m,this._title=y,f.appendChild(m)};return A.prototype.setVisible=function(f){this._div.style.display=f?"block":"none"},A.prototype.showAt=function(f,m){f&&m&&(this.setVisible(!0),this._title.innerHTML=m,this._div.style.left=`${f.x+30}px`,this._div.style.top=`${f.y-this._div.clientHeight/2-15}px`)},new A(o)}Uf.prototype.addToolbar=function(o,A){return A=Klt(A,{container:o}),new Uf.Toolbar(this,A)};var Ylt={shiftX:0,shiftY:0};Uf.prototype.createBillboardGroup=function(o,A,f){let m=new Uf.BillboardGroup(this,A);return m.addBillboards(o,f),m};Uf.BillboardGroup=function(o,A){this._drawHelper=o,this._scene=o._scene,this._options=Klt(A,Ylt);let f=new k_;this._scene.primitives.add(f),this._billboards=f,this._orderedBillboards=[]};Uf.BillboardGroup.prototype.createBillboard=function(o,A){let f=this._billboards.add({show:!0,position:o,pixelOffset:new wt(this._options.shiftX,this._options.shiftY),eyeOffset:new te(0,0,-1e3),horizontalOrigin:cA.CENTER,verticalOrigin:Bn.CENTER,scale:.3,image:Ae(this._options.iconUrl,`${globalThis.GEOWORLD_BASE_URL}Assets/Images/point.png`),color:new ht(1,1,1,1)});if(A){let y=function(v){C.enableRotate=v},x=function(){let v=0;for(let E=m._orderedBillboards.length;v<E&&m._orderedBillboards[v]!==f;++v);return v},m=this,C=this._scene.screenSpaceCameraController;if(A.dragHandlers){let v=this,E=new zr(v._scene.canvas);setListener(f,"leftDown",function(I){function w(M){f.position=M;for(let B=0,T=v._orderedBillboards.length;B<T&&v._orderedBillboards[B]!==f;++B);A.dragHandlers.onDrag&&A.dragHandlers.onDrag(x(),M)}function Q(M){E.destroy(),y(!0),A.dragHandlers.onDragEnd&&A.dragHandlers.onDragEnd(x(),M)}E.setInputAction(function(M){let B=v._scene.camera.pickEllipsoid(M.endPosition,QIe);B?w(B):Q(B)},Yi.MOUSE_MOVE),E.setInputAction(function(M){Q(v._scene.camera.pickEllipsoid(M.position,QIe))},Yi.LEFT_UP),y(!1),A.dragHandlers.onDragStart&&A.dragHandlers.onDragStart(x(),v._scene.camera.pickEllipsoid(I,QIe))})}A.onDoubleClick&&setListener(f,"leftDoubleClick",function(v){A.onDoubleClick(x())}),A.onClick&&setListener(f,"leftClick",function(v){A.onClick(x())}),A.tooltip&&(setListener(f,"mouseMove",function(v){m._drawHelper._tooltip.showAt(v,A.tooltip())}),setListener(f,"mouseOut",function(v){m._drawHelper._tooltip.setVisible(!1)}))}return f};Uf.BillboardGroup.prototype.insertBillboard=function(o,A,f){this._orderedBillboards.splice(o,0,this.createBillboard(A,f))};Uf.BillboardGroup.prototype.addBillboard=function(o,A){this._orderedBillboards.push(this.createBillboard(o,A))};Uf.BillboardGroup.prototype.addBillboards=function(o,A){let f=0;for(;f<o.length;f++)this.addBillboard(o[f],A)};Uf.BillboardGroup.prototype.updateBillboardsPositions=function(o){let A=0;for(;A<o.length;A++)this.getBillboard(A).position=o[A]};Uf.BillboardGroup.prototype.countBillboards=function(){return this._orderedBillboards.length};Uf.BillboardGroup.prototype.getBillboard=function(o){return this._orderedBillboards[o]};Uf.BillboardGroup.prototype.removeBillboard=function(o){this._billboards.remove(this.getBillboard(o)),this._orderedBillboards.splice(o,1)};Uf.BillboardGroup.prototype.remove=function(){this._billboards=this._billboards&&this._billboards.removeAll()&&this._billboards.destroy()};Uf.BillboardGroup.prototype.setOnTop=function(){this._scene.primitives.raiseToTop(this._billboards)};Uf.prototype.cleanUp=function(){this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._markers!==void 0&&(this._markers.remove(),this._markers=void 0),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._tooltip.setVisible(!1)};Uf.prototype.startDrawing=function(o){let A=this,f=this._scene;f.globe.depthTestAgainstTerrain=!0;let m=this._tooltip,C=3,y=[],x=[],v;this._positions=x;let E=new zr(f.canvas);this._mouseHandler=E;let I=new Uf.BillboardGroup(this,Ylt);this._markers=I,this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),E.setInputAction(function(Q){if(Q.position!==null){let M=f.camera.getPickRay(Q.position),B=f.globe.pick(M,f),T=$t.fromCartesian(B),D=qe.toDegrees(T.longitude),F=qe.toDegrees(T.latitude);if(B){if(y.length===0&&(y.push(D,F),x.push(B),v=B,I.addBillboard(v)),x.length>=4){let L=ml.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,v);if(L!==void 0){let R=L.x-Q.position.x,k=L.y-Q.position.y;if(R*R+k*k<16){y.splice(y.length-2,2),x.pop(),this.isLoading(!0),this.stopDrawing(o);return}}}y.push(D,F),x.push(B),I.addBillboard(B),x.length===C&&(A._prevEntity=A._cesiumViewer.factory.createElement({type:"polygon",parameters:{hierarchy:te.fromDegreesArray(y),material:ht.RED.withAlpha(.6),fill:!0}}),A._prevEntity.polygon.hierarchy=w())}}}.bind(this),Yi.LEFT_CLICK),E.setInputAction(function(Q){let M=Q.endPosition;if(M!==null)if(x.length===0)m.showAt(M,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let B=f.camera.getPickRay(M),T=f.globe.pick(B,f),D=$t.fromCartesian(T),F=qe.toDegrees(D.longitude),L=qe.toDegrees(D.latitude);if(T&&(y.splice(y.length-2,2),x.pop(),y.push(F,L),x.push(T),I.getBillboard(x.length-1).position=T,m.showAt(M,"\u53CC\u51FB\u7ED3\u675F\u7ED8\u5236"),x.length>=3&&x.length>=4)){let R=ml.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,v);if(R!==void 0){let k=R.x-M.x,G=R.y-M.y;k*k+G*G<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}.bind(this),Yi.MOUSE_MOVE),E.setInputAction(function(Q){x.length<C+2||(this.isLoading(!0),setTimeout(()=>{this.stopDrawing(o)},100))}.bind(this),Yi.LEFT_DOUBLE_CLICK);function w(){return te.fromDegreesArray(y)}};Uf.prototype.stopDrawing=function(o){this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._markers!==void 0&&(this._markers.remove(),this._markers=void 0),this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._tooltip.setVisible(!1),document.body.style.cursor="wait";let A=this.computeCutVolume(),f=A.maxHeight;document.body.style.cursor="default",typeof o=="function"&&o(A.volume);let m={polygon:{hierarchy:{positions:this._positions},extrudedHeight:f,closeTop:!1,closeBottom:!1,material:ht.RED.withAlpha(.5),outline:!0,outlineColor:ht.WHITE,outlineWidth:2}};this._prevEntity=this._cesiumViewer.entities.add(m),this.isLoading(!1)};Uf.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`,o.appendChild(A),this.loading=o,this.coreMap.container.appendChild(o)};Uf.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};Uf.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};function NRi(o){let A=[],f=[];for(let Q=0;Q<o.length;Q++){let M=$t.fromCartesian(o[Q]);A.push(M.longitude),f.push(M.latitude)}let m=0,C=0,y=0,x=0,v=0,E=0,I=0,w=0;for(let Q=0;Q<o.length;Q++)m=A[Q],C=f[Q],Q===o.length-1?(y=A[0],x=f[0]):(y=A[Q+1],x=f[Q+1]),E=m*x-y*C,v+=E,I+=(m+y)*E,w+=(C+x)*E;return v*=.5,I/=6*v,w/=6*v,new $t(I,w)}function kRi(o,A,f){let m=te.distance(o,A),C=te.distance(A,f),y=te.distance(f,o),x=(m+C+y)/2;return Math.sqrt(x*(x-m)*(x-C)*(x-y))}Uf.prototype.computeCutVolume=function(){let o=15e3;for(let k=0;k<this._positions.length;k++){let G=$t.fromCartesian(this._positions[k]),V=this._scene.globe.getHeight(G);o>V&&(o=V)}let A=Math.PI/Math.pow(2,11);A=A/64;let f=new Id.fromPositions({positions:this._positions,vertexFormat:Ya.FLAT_VERTEX_FORMAT,granularity:A}),m=new Id.createGeometry(f),C=0,y=0,x,v,E,I,w,Q,M,B,T,D,F,L;for(let k=0;k<m.indices.length;k+=3)x=m.indices[k],v=m.indices[k+1],E=m.indices[k+2],D=new te(m.attributes.position.values[x*3],m.attributes.position.values[x*3+1],m.attributes.position.values[x*3+2]),F=$t.fromCartesian(D),I=this._scene.globe.getHeight(F),M=te.fromRadians(F.longitude,F.latitude,0),y<I&&(y=I),D=new te(m.attributes.position.values[v*3],m.attributes.position.values[v*3+1],m.attributes.position.values[v*3+2]),F=$t.fromCartesian(D),w=this._scene.globe.getHeight(F),B=te.fromRadians(F.longitude,F.latitude,0),y<w&&(y=w),D=new te(m.attributes.position.values[E*3],m.attributes.position.values[E*3+1],m.attributes.position.values[E*3+2]),F=$t.fromCartesian(D),Q=this._scene.globe.getHeight(F),T=te.fromRadians(F.longitude,F.latitude,0),y<Q&&(y=Q),L=kRi(M,B,T),C=C+L*(I-o+w-o+Q-o)/3;let R=NRi(this._positions);return this._volumeLabel=this._cesiumViewer.entities.add({position:te.fromRadians(R.longitude,R.latitude,y+1e3),label:{text:`${C.toFixed(4)}\u7ACB\u65B9\u7C73`}}),{maxHeight:y,volume:C}};var Roe=Uf;function Jlt(o,A){if(this.mEarthCtrl=o,this._parameter=A,this.coreMap=o.coreMap,this._color=Ae(A.color,new ht(1,0,0,.7)),this._positions=A.positions,this._positions.length<3)throw new Hi("invalid positions length!");this._duration=Ae(A.duration,4e3),this._minHeight=Ae(A.minHeight,0),this._maxHeight=Ae(A.maxHeight,100),this._image=A.image,this._pps=null}function ORi(o,A){let f=$t.fromCartesian(o[0]),m=f.longitude,C=f.latitude,y=m,x=C,v=A;for(let E=1;E<o.length;E++){let I=$t.fromCartesian(o[E]);m>I.longitude?m=I.longitude:y<I.longitude&&(y=I.longitude),C>I.latitude?C=I.latitude:x<I.latitude&&(x=I.latitude)}return new te.fromRadians((m+y)/2,(C+x)/2,v)}function URi(o){if(O(o._pps))return;let A=ORi(o._positions,o._minHeight),f=$t.fromCartesian(A),m=new oi(A.x,A.y,A.z,1),C=new $t(f.longitude,f.latitude,o.maxHeight+100),y=$t.toCartesian(C),x=new oi(y.x,y.y,y.z,1),v=new oi,E=new oi,I=new te,w=o.mEarthCtrl.coreMap.scene.camera,Q=o._positions.length;o._pps=new wa({fragmentShader:HRi(Q),uniforms:{u_floodCenterEC:function(){return Ze.multiplyByVector(w._viewMatrix,m,v)},u_floodPlaneNormalEC:function(){let B=Ze.multiplyByVector(w._viewMatrix,m,v),T=Ze.multiplyByVector(w._viewMatrix,x,E);return I.x=T.x-B.x,I.y=T.y-B.y,I.z=T.z-B.z,te.normalize(I,I),I},u_floodRange:function(){return o._positions},u_minHeight:function(){return o._minHeight},u_maxHeight:function(){return o._maxHeight},u_image:function(){return o.image},u_floodColor:function(){return o._color},u_positionsLength:function(){return o._positions.length}}}),o.mEarthCtrl.coreMap.scene.postProcessStages.add(o._pps)}function GRi(o){O(o._pps)&&(o.mEarthCtrl.coreMap.scene.postProcessStages.remove(o._pps),o._pps=null)}function HRi(o){return`uniform sampler2D colorTexture;
uniform sampler2D depthTexture;
varying vec2 v_textureCoordinates;
uniform vec4 u_floodCenterEC;
public/CIMSDK/Widgets/MapWidget/NavigationPanel.css
@@ -1 +1,489 @@
.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}.modal-background{pointer-events:auto;position:fixed;inset:0;background-color:#00000080;z-index:1000}.modal{position:absolute;margin:auto;background-color:#2f353c;inset:0;max-height:100%;max-width:100%;font-family:Roboto,sans-serif;color:#fff}.modal-header{background-color:#0003;border-bottom:1px solid rgba(100,100,100,.6);font-size:15px;line-height:40px;margin:0}.modal-header h1{font-size:15px;color:#fff;margin-left:15px}.modal-content{margin-left:15px;margin-right:15px;margin-bottom:15px;padding-top:15px;overflow:auto}.modal-close-button{position:absolute;right:15px;cursor:pointer;font-size:18px;color:#fff}#ui{z-index:2100}@media print{.full-window{position:initial}}.markdown img{max-width:100%}.markdown svg{max-height:100%}.markdown input,.markdown select,.markdown textarea,.markdown fieldset{font-family:inherit;font-size:1rem;box-sizing:border-box;margin-top:0;margin-bottom:0}.markdown label{vertical-align:middle}.markdown h1,.markdown h2,.markdown h3,.markdown h4,.markdown h5,.markdown h6{font-family:inherit;font-weight:700;line-height:1.25;margin-top:1em;margin-bottom:.5em}.markdown h1{font-size:2rem}.markdown h2{font-size:1.5rem}.markdown h3{font-size:1.25rem}.markdown h4{font-size:1rem}.markdown h5{font-size:.875rem}.markdown h6{font-size:.75rem}.markdown p{margin-top:0;margin-bottom:1rem}.markdown strong{font-weight:700}.markdown em{font-style:italic}.markdown small{font-size:80%}.markdown mark{color:#000;background:#ff0}.markdown u{text-decoration:underline}.markdown s{text-decoration:line-through}.markdown dl,.markdown ol,.markdown ul{margin-top:0;margin-bottom:1rem}.markdown ol{list-style:decimal inside}.markdown ul{list-style:disc inside}.markdown pre,.markdown code,.markdown samp{font-family:monospace;font-size:inherit}.markdown pre{margin-top:0;margin-bottom:1rem;overflow-x:scroll}.markdown a{color:#68adfe;text-decoration:none}.markdown a:hover{text-decoration:underline}.markdown pre,.markdown code{background-color:transparent;border-radius:3px}.markdown hr{border:0;border-bottom-style:solid;border-bottom-width:1px;border-bottom-color:#00000020}.markdown .left-align{text-align:left}.markdown .center{text-align:center}.markdown .right-align{text-align:right}.markdown .justify{text-align:justify}.markdown .truncate{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markdown ol.upper-roman{list-style-type:upper-roman}.markdown ol.lower-alpha{list-style-type:lower-alpha}.markdown ul.circle{list-style-type:circle}.markdown ul.square{list-style-type:square}.markdown .list-reset{list-style:none;padding-left:0}.floating{pointer-events:auto;position:absolute;border-radius:15px;background-color:#2f353ccc}.floating-horizontal{pointer-events:auto;position:absolute;border-radius:15px;background-color:#2f353ccc;padding-left:5px;padding-right:5px}.floating-vertical{pointer-events:auto;position:absolute;border-radius:15px;background-color:#2f353ccc;padding-top:5px;padding-bottom:5px}@media print{.floating{display:none}}.distance-legend{pointer-events:auto;position:absolute;border-radius:15px;background-color:#2f353ccc;padding-left:5px;padding-right:5px;right:25px;bottom:30px;height:30px;width:125px;border:1px solid rgba(255,255,255,.1);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{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}@media screen and (max-width: 700px),screen and (max-height: 420px){.navigation-controls,.compass{display:none}}@media print{.navigation-controls,.compass{display:none}}
.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
}
.modal-background {
    pointer-events: auto;
    position: fixed;
    inset: 0;
    background-color: #00000080;
    z-index: 1000
}
.modal {
    position: absolute;
    margin: auto;
    background-color: #2f353c;
    inset: 0;
    max-height: 100%;
    max-width: 100%;
    font-family: Roboto, sans-serif;
    color: #fff
}
.modal-header {
    background-color: #0003;
    border-bottom: 1px solid rgba(100, 100, 100, .6);
    font-size: 15px;
    line-height: 40px;
    margin: 0
}
.modal-header h1 {
    font-size: 15px;
    color: #fff;
    margin-left: 15px
}
.modal-content {
    margin-left: 15px;
    margin-right: 15px;
    margin-bottom: 15px;
    padding-top: 15px;
    overflow: auto
}
.modal-close-button {
    position: absolute;
    right: 15px;
    cursor: pointer;
    font-size: 18px;
    color: #fff
}
#ui {
    z-index: 2100
}
@media print {
    .full-window {
        position: initial
    }
}
.markdown img {
    max-width: 100%
}
.markdown svg {
    max-height: 100%
}
.markdown input,
.markdown select,
.markdown textarea,
.markdown fieldset {
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    margin-top: 0;
    margin-bottom: 0
}
.markdown label {
    vertical-align: middle
}
.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
    font-family: inherit;
    font-weight: 700;
    line-height: 1.25;
    margin-top: 1em;
    margin-bottom: .5em
}
.markdown h1 {
    font-size: 2rem
}
.markdown h2 {
    font-size: 1.5rem
}
.markdown h3 {
    font-size: 1.25rem
}
.markdown h4 {
    font-size: 1rem
}
.markdown h5 {
    font-size: .875rem
}
.markdown h6 {
    font-size: .75rem
}
.markdown p {
    margin-top: 0;
    margin-bottom: 1rem
}
.markdown strong {
    font-weight: 700
}
.markdown em {
    font-style: italic
}
.markdown small {
    font-size: 80%
}
.markdown mark {
    color: #000;
    background: #ff0
}
.markdown u {
    text-decoration: underline
}
.markdown s {
    text-decoration: line-through
}
.markdown dl,
.markdown ol,
.markdown ul {
    margin-top: 0;
    margin-bottom: 1rem
}
.markdown ol {
    list-style: decimal inside
}
.markdown ul {
    list-style: disc inside
}
.markdown pre,
.markdown code,
.markdown samp {
    font-family: monospace;
    font-size: inherit
}
.markdown pre {
    margin-top: 0;
    margin-bottom: 1rem;
    overflow-x: scroll
}
.markdown a {
    color: #68adfe;
    text-decoration: none
}
.markdown a:hover {
    text-decoration: underline
}
.markdown pre,
.markdown code {
    background-color: transparent;
    border-radius: 3px
}
.markdown hr {
    border: 0;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    border-bottom-color: #00000020
}
.markdown .left-align {
    text-align: left
}
.markdown .center {
    text-align: center
}
.markdown .right-align {
    text-align: right
}
.markdown .justify {
    text-align: justify
}
.markdown .truncate {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}
.markdown ol.upper-roman {
    list-style-type: upper-roman
}
.markdown ol.lower-alpha {
    list-style-type: lower-alpha
}
.markdown ul.circle {
    list-style-type: circle
}
.markdown ul.square {
    list-style-type: square
}
.markdown .list-reset {
    list-style: none;
    padding-left: 0
}
.floating {
    pointer-events: auto;
    position: absolute;
    border-radius: 15px;
    background-color: #2f353ccc
}
.floating-horizontal {
    pointer-events: auto;
    position: absolute;
    border-radius: 15px;
    background-color: #2f353ccc;
    padding-left: 5px;
    padding-right: 5px
}
.floating-vertical {
    pointer-events: auto;
    position: absolute;
    border-radius: 15px;
    background-color: #2f353ccc;
    padding-top: 5px;
    padding-bottom: 5px
}
@media print {
    .floating {
        display: none
    }
}
.distance-legend {
    pointer-events: auto;
    position: absolute;
    border-radius: 15px;
    background-color: #2f353ccc;
    padding-left: 5px;
    padding-right: 5px;
    right: 25px;
    bottom: 30px;
    height: 30px;
    width: 125px;
    border: 1px solid rgba(255, 255, 255, .1);
    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 {
    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
}
@media screen and (max-width: 700px),
screen and (max-height: 420px) {
    .navigation-controls,
    .compass {
        display: none
    }
}
@media print {
    .navigation-controls,
    .compass {
        display: none
    }
}
public/CIMSDK/index.cjs
@@ -16748,7 +16748,7 @@
                }
                material.alpha = u_alpha;
            }
            `})};u8.prototype.destroy=function(){this._tileset.customShader===this._customShader&&(this._customShader=void 0,this._tileset.customShader=void 0),this._scene.preUpdate.removeEventListener(this._preUpdate)};function tRi(){this.customShaders={},this.customShaders.lightLine=u8}var Blt=tRi;function UH(o,A){this.options=Ae(A,{}),this.earthCtrl=o,this.viewer=o.coreMap,this.CSME=pme,this.Cust=new this.CSME.CustomShaderStage(this.options.primitive,A),this.stageArr=[],this.eventListener=null,this.eventListener=this.viewer.scene.preUpdate.addEventListener(()=>{this.Cust.update()}),this.create()}UH.prototype.create=function(o){let A=this,f=null;o?f=o:f=A.options,f.lineMaterialStage&&(A.LineMaterialStage=new A.CSME.LineMaterialStage(Ae(f.lineMaterialStage,{weight:.5})),A.Cust.addStage(A.LineMaterialStage),A.stageArr.push(A.LineMaterialStage)),f.gradientMaterialStage&&(A.GradientMaterialStage=new A.CSME.GradientMaterialStage(Ae(f.gradientMaterialStage,{weight:.5})),A.Cust.addStage(A.GradientMaterialStage),A.stageArr.push(A.GradientMaterialStage)),f.normalizeMaterialStage&&(A.NormalizeMaterialStage=new A.CSME.NormalizeMaterialStage(Ae(f.normalizeMaterialStage,{weight:.5})),A.Cust.addStage(A.NormalizeMaterialStage),A.stageArr.push(A.NormalizeMaterialStage)),f.dynamicColorMaterialStage&&(A.DynamicColorMaterialStage=new A.CSME.DynamicColorMaterialStage(Ae(f.dynamicColorMaterialStage,{weight:.5})),A.Cust.addStage(A.DynamicColorMaterialStage),A.stageArr.push(A.DynamicColorMaterialStage)),f.reflectMaterialStage&&(A.ReflectMaterialStage=new A.CSME.ReflectMaterialStage(Ae(f.reflectMaterialStage,{weight:.5})),A.Cust.addStage(A.ReflectMaterialStage),A.stageArr.push(A.ReflectMaterialStage)),f.textureMaterialStage&&(A.TextureMaterialStage=new A.CSME.TextureMaterialStage(Ae(f.textureMaterialStage,{weight:.5,url:`${globalThis.GEOWORLD_BASE_URL}Assets/Textures/window.png`})),A.Cust.addStage(A.TextureMaterialStage),A.stageArr.push(A.TextureMaterialStage))};UH.prototype.addStage=function(o){let A=this;A.Cust.addStage(o),A.stageArr.push(o)};UH.prototype.removeStage=function(o){this.Cust.removeStage(o.name)};UH.prototype.update=function(){let o=this;o.viewer.scene.preUpdate.removeEventListener(o.eventListener),o.eventListener=o.viewer.scene.preUpdate.addEventListener(()=>{o.Cust.update()})};UH.prototype.removeFromMap=function(){let o=this;for(let A=0;A<o.stageArr.length;A++)o.removeStage(o.stageArr[A]);o.viewer.scene.preUpdate.removeEventListener(o.eventListener),o.eventListener=null};var wlt=UH;function boe(o,A={}){this._earthCtrl=o,this._edgeStage=null,this._options=A,this._options.visibleEdgeColor=Ae(A.visibleEdgeColor,ht.fromCssColorString("#101010")),this._options.outlineWidth=Ae(A.outlineWidth,1),this._options.thresholdAngle=Ae(A.thresholdAngle,12*Math.PI/180),this.add()}boe.prototype.add=function(){this._edgeStage=oY();let o=this._edgeStage;o.visibleEdgeColor=this._options.visibleEdgeColor,o.outlineWidth=this._options.outlineWidth,o.thresholdAngle=this._options.thresholdAngle,o.selected=[{},{}],o.enabled=!0,this._earthCtrl.Viewer.postProcessStages.add(o)};boe.prototype.removeFromMap=function(){this._edgeStage&&(this._earthCtrl.Viewer.postProcessStages.remove(this._edgeStage),this.__edgeStage=null)};Object.defineProperties(boe.prototype,{show:{get:function(){return this._edgeStage.show},set:function(o){this._edgeStage.show=o}},outlineWidth:{get:function(){return this._edgeStage.outlineWidth},set:function(o){this._edgeStage.outlineWidth=o}},thresholdAngle:{get:function(){return this._edgeStage.thresholdAngle},set:function(o){!o||(this._edgeStage.thresholdAngle=o)}},visibleEdgeColor:{get:function(){return this._edgeStage.visibleEdgeColor},set:function(o){!o||(this._edgeStage.visibleEdgeColor=o)}},hiddenEdgeColor:{get:function(){return this._edgeStage.hiddenEdgeColor},set:function(o){!o||(this._edgeStage.hiddenEdgeColor=o)}},showGlow:{get:function(){return this._edgeStage.showGlow},set:function(o){this._edgeStage.showGlow=o}},edgeGlow:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeStrength:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeOnly:{get:function(){return this._edgeStage.edgeOnly},set:function(o){this._edgeStage.edgeOnly=o}}});var blt=boe;function Qoe(o,A={}){this._earthCtrl=o,this._edgeStage=null,this._options=A,this._visibleEdgeColor=Ae(A.visibleEdgeColor,ht.fromCssColorString("#ff0000")),this._hiddenEdgeColor=Ae(A.hiddenEdgeColor,ht.fromCssColorString("#4d4d4d")),this.handler=null,this.key=Ae(A.key,"id"),this.model=Ae(A.model,null),this.add()}Qoe.prototype.add=function(){let o=this,A="";this._edgeStage=oY(!0);let f=this._edgeStage;f.visibleEdgeColor=this._visibleEdgeColor,f.hiddenEdgeColor=this._hiddenEdgeColor,f.selected=[],f.enabled=!1,this._earthCtrl.Viewer.postProcessStages.add(f);function m(C,y){function x(E,I){let w=E.featuresLength;for(let Q=0;Q<w;++Q){let M=E.getFeature(Q);if(M.getProperty(o.key)===A){let T={pickId:M.pickId};y.selected=[T],y.enabled=!0}}}function v(E,I){let w=E.content,Q=w.innerContents;if(O(Q)){let M=Q.length;for(let B=0;B<M;++B)x(Q[B],I)}else x(w,I)}C.tileVisible.addEventListener(function(E){A!==""&&v(E,null)})}m(this.model,f),this.handler=new zr(this._earthCtrl.coreMap.scene.canvas),this.handler.setInputAction(function(C){let y=o._earthCtrl.coreMap.scene.pick(C.position);if(f.selected=[],A="",!y||!y.primitive)return;let v=y.primitive._pickIds,I={pickId:y.pickId};f.selected=[I],f.enabled=!0,A=y.getProperty(o.key)},Yi.LEFT_CLICK)};Qoe.prototype.removeFromMap=function(){this.handler&&(this.handler.destroy(),this.handler=void 0),this._edgeStage&&this._earthCtrl.Viewer.postProcessStages.remove(this._edgeStage)};Object.defineProperties(Qoe.prototype,{showGlow:{get:function(){return this._edgeStage.showGlow},set:function(o){this._edgeStage.showGlow=o}},edgeGlow:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeStrength:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeOnly:{get:function(){return this._edgeStage.edgeOnly},set:function(o){this._edgeStage.edgeOnly=o}}});var Qlt=Qoe;function Hs(o){this._earthCtrl=o,this._coreMap=o.coreMap}function Qx(){return((1+qe.nextRandomNumber())*65536|0).toString(16).substring(1)}Hs.createUUID=function(){return`${Qx()+Qx()}-${Qx()}-${Qx()}-${Qx()}-${Qx()}${Qx()}${Qx()}`};Hs.createUUIDWithoutDash=function(){return Qx()+Qx()+Qx()+Qx()+Qx()+Qx()+Qx()+Qx()};Hs.prototype.createUUID=function(){return Hs.createUUID()};Hs.prototype.createGroup=function(o){let A=new a8;return A.id=o.id||Hs.createUUID(),A.name=o.name||"\u672A\u547D\u540D\u7EC4",A};Hs.prototype.createImageryLayer=function(o,A){let f=new doe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.IMAGERYPROVIDERS),f),f};Hs.prototype.createTerrainLayer=function(o,A){let f=new goe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.TERRAINPROVIDERS),f),f};Hs.prototype.removeTerrainLayer=function(o){this._coreMap.terrainProvider=new HF({})};Hs.prototype.createFeatureLayer=function(o,A){let f=new yoe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.FEATURELAYERS),f),f};Hs.prototype.createModelLayer=function(o,A){let f=new moe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.MODELLAYERS),f),f};Hs.prototype.createWfsModel=function(o,A){let f=new CK(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.MODELLAYERS),f),f};Hs.prototype.createModel=function(o,A){let f=new Kne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.removeModel=function(o){O(o)&&o.removeFromMap()};Hs.prototype.createCZMLObject=function(o,A){let f=this,m=Ae(o.addToMap,!0),C=new Fie(o.name);return C.load(o.url),m&&f._earthCtrl.dataSources.add(C),C.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,C):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),C),C};Hs.prototype.createElement=function(o){let A={};return A[o.type]=o.parameters,O(o.name)&&(A.name=o.name),O(o.position)&&(A.position=o.position),this._earthCtrl.entities.add(A)};Hs.prototype.removeElement=function(o){O(o)?this._earthCtrl.entities.remove(o):this._earthCtrl.entities.removeAll()};Hs.prototype.createVideoProjection=function(o,A){o.addToMap=Ae(o.addToMap,!0);let f=Ae(o.sourceType,"perspective"),m=null;return f==="perspective"?(m=new Sne(this._earthCtrl,o),m.initialize(o),m.name=o.name,A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),m)):f==="panorama"?(m=new olt(this._earthCtrl,o),m.initialize(o),m.name=o.name,m.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),m)):f==="fisheye"&&(m=new Dne(this._earthCtrl,o),m.initialize(o),m.name=o.name,m.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),m)),m};Hs.prototype.createTrack=function(o,A){let f=new alt(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.initialize(o),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createSceneNode=function(o,A,f){let m=new a8(this._earthCtrl);return m.id=o,m.name=A,m.label=f,m};Hs.prototype.createFire=function(o,A){let f=new Pne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createSmoke=function(o,A){let f=new Lne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createExplosion=function(o,A){let f=new Nne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createFireworks=function(o,A){let f=new One(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createRadarScan=function(o,A){let f=new Gne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createCircleScan=function(o,A){let f=new glt(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createUpDownScan=function(o){let A=new mlt(this._earthCtrl,o);return A.show=!0,A};Hs.prototype.createWaters=function(o,A){let f=new Ioe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createHeatmap=function(o,A){let f=clt.create(this._earthCtrl,o.bbox,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createLabel=function(o,A){let f=new Jne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createBillboard=function(o,A){let f=new Vne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPolyline=function(o,A){let f=new jne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPolygon=function(o,A){let f=new Xne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPoint=function(o,A){let f=new $ne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createBox=function(o,A){let f=new toe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createEllipsoid=function(o,A){let f=new ooe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createCylinder=function(o,A){let f=new roe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createRectangle=function(o,A){let f=new soe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createEllipse=function(o,A){let f=new uoe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPolylineVolume=function(o,A){let f=new Aoe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createEChartLayer=function(o,A){let f=new voe(this._earthCtrl);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(o),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPointLight=function(o){return new ylt(this._earthCtrl,o)};Hs.prototype.createHawkeye=function(o){let A=new _oe(this._earthCtrl,o);A.name=o.name,A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&A.addToMap(o)};Hs.prototype.createSpotLight=function(o){let A=new woe(this._earthCtrl.coreMap,o.entities,o.lights);return A.name=o.name,A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};Hs.prototype.createCustomShaderManager=function(o){let A=new Blt;return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};Hs.prototype.createCustomShaderStage=function(o){let A=new wlt(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};Hs.prototype.createModelOutline=function(o={}){let A=new blt(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};Hs.prototype.modelClick=function(o={}){let A=new Qlt(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};var t2=Hs;var Soe=class extends n0{constructor(A,f){super(A),this._objectMap={},this._rootNode=null,this._isBenchUpdate=!1,this._selectSet=new Qne(A);let m=new a8(A);m.id=t2.createUUID(),m.name=Ae(f.ProjectName,"root"),m.version=Ae(f.version,null),m.desc=Ae(f.desc,null),m.createTime=Ae(f.createTime,new Date().toISOString()),m.lastUpdate=Ae(f.lastUpdate,null),m.show=!0,this._rootNode=m,this._editNode=m,this._objectMap[m.id]=m,this._EventDocumentChanged=new $F("EventDocumentChanged")}finalize(){this._rootNode=null,this._objectMap={}}getChildById(A){return this._objectMap.hasOwnProperty(A)?this._objectMap[A]:null}addChild(A,f){A.addChild(f),this._objectMap[f.id]=f,this._isBenchUpdate||this.commitChanged()}removeChildById(A){let f=this._objectMap[A];O(f)&&this.removeChild(f)}removeChild(A){O(A)&&O(A.parentNode)&&(A.removeFromMap(),A.parentNode.removeChild(A)),delete this._objectMap[A.id],this._isBenchUpdate||this.commitChanged()}removeAll(){}beginUpdate(){this._isBenchUpdate=!0}endUpdate(){this._isBenchUpdate&&(this.commitChanged(),this._isBenchUpdate=!1)}commitChanged(){this._EventDocumentChanged.notifyEvent(this)}flyTo(A,f){O(A)&&O(A._primitive)&&(A=A._primitive),this._earthCtrl.coreMap.flyTo(A,f)}findLocationByID(A,f){if(!A)return;let m=this.getChildById(A);O(m)&&O(m._primitive)&&(m=m._primitive),this._earthCtrl.coreMap.flyTo(m,f)}moveLayer(A,f){let m=this.getChildById(A),C=null;for(let y=0;y<m.parentNode.childNodes.length;y++)m.parentNode.childNodes[y].id===m.id&&(C=y);f==="up"?(this._earthCtrl.coreMap.scene.imageryLayers.raise(m._primitive),this.changeLayer(m.parentNode.childNodes,C,C+1)):f==="down"&&(this._earthCtrl.coreMap.scene.imageryLayers.lower(m._primitive),this.changeLayer(m.parentNode.childNodes,C,C-1))}changeLayer(A,f,m){if(f=qe.clamp(f,0,A.length-1),m=qe.clamp(m,0,A.length-1),f===m)return;let C=A[f];A[f]=A[m],A[m]=C}outputJson(A){let f=this;new Promise(function(C,y){let x={IMAGERYPROVIDERS:"imageryProviders",TERRAINPROVIDERS:"terrainProviders",MODELLAYERS:"modelLayers",FEATURELAYERS:"featureLayers",USERSCENE:"userScene"},v=0,E=[];for(let I in x){let w=x[I],Q=f.rootNode.getChildByName(w);if(!Q)continue;let M=[];if(Q.childNodes.length===0)M=[];else for(let B=0;B<Q.childNodes.length;B++){let T=Q.childNodes[B].toJSON();M.push(T)}Promise.all(M).then(function(B){let T=[];if(B.length!==0){for(let L=0;L<B.length;L++)T.push(B[L]);let D=T[0].class;D!=="IMAGERY_LAYER"&&D!=="TERRAIN_LAYER"&&D!=="MODEL_LAYER"&&D!=="FEATURE_LAYER"&&(D="USER_SCENE");let F={item:D,objJson:T};E.push(F)}v++,v===5&&(C(E),v=0)})}}).then(function(C){let y={version:f.rootNode.version,projectName:f.rootNode.name,desc:f.rootNode.desc,createTime:f.rootNode.createTime,lastUpdate:new Date().toISOString(),imageryProviders:[],terrainProviders:[],modelLayers:[],featureLayers:[],userScene:[]};for(let w=0;w<C.length;w++)C[w].item==="IMAGERY_LAYER"&&(y.imageryProviders=C[w].objJson),C[w].item==="TERRAIN_LAYER"&&(y.terrainProviders=C[w].objJson),C[w].item==="MODEL_LAYER"&&(y.modelLayers=C[w].objJson),C[w].item==="FEATURE_LAYER"&&(y.featureLayers=C[w].objJson),C[w].item==="USER_SCENE"&&(y.userScene=C[w].objJson);let x={class:"ENVIRONMENT",underGround:Ae(f._earthCtrl.camera.undergroundMode,null),shadow:Ae(f._earthCtrl.shadows,null),depthTest:Ae(f._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain,null),rain:Ae(f._earthCtrl.environment.rain.show,null),snow:Ae(f._earthCtrl.environment.snow.show,null),fog:Ae(f._earthCtrl.environment.fog.show,null),bwMode:Ae(f._earthCtrl.environment.bwMode.show,null),nightMode:Ae(f._earthCtrl.environment.nightMode.show,null),colorAdjustment:{show:Ae(f._earthCtrl.environment.colorAdjustment.show,null),contrast:Ae(f._earthCtrl.environment.colorAdjustment.contrast,null),saturation:Ae(f._earthCtrl.environment.colorAdjustment.saturation,null),brightness:Ae(f._earthCtrl.environment.colorAdjustment.brightness,null)}},v={class:"SKYBOX",positiveX:Ae(f._earthCtrl.environment.SkyBoxSource.positiveX,null),negativeX:Ae(f._earthCtrl.environment.SkyBoxSource.negativeX,null),positiveY:Ae(f._earthCtrl.environment.SkyBoxSource.positiveY,null),negativeY:Ae(f._earthCtrl.environment.SkyBoxSource.negativeY,null),positiveZ:Ae(f._earthCtrl.environment.SkyBoxSource.positiveZ,null),negativeZ:Ae(f._earthCtrl.environment.SkyBoxSource.negativeZ,null)},E={class:"VIEWPOINT",lon:f._earthCtrl.camera.viewPoint.lon,lat:f._earthCtrl.camera.viewPoint.lat,alt:f._earthCtrl.camera.viewPoint.alt,heading:f._earthCtrl.camera.viewPoint.heading,pitch:f._earthCtrl.camera.viewPoint.pitch,roll:f._earthCtrl.camera.viewPoint.roll,duration:f._earthCtrl.camera.viewPoint.duration};y.userScene.push(x),y.userScene.push(v),y.userScene.push(E);let I=JSON.stringify(y);A&&A(I)})}};Object.defineProperties(Soe.prototype,{rootNode:{get:function(){return this._rootNode},set:function(o){this._rootNode=o}},editNode:{get:function(){return this._editNode},set:function(o){this._editNode=o}},selectSet:{get:function(){return this._selectSet}},EventDocumentChanged:{get:function(){return this._EventDocumentChanged}},EventObjectPropertyChanged:{get:function(){return this._EventObjectPropertyChanged}}});var Doe=Soe;function Slt(o){this._earthCtrl=o,this._coreMap=o.coreMap,this.initialize()}var w6i=new Es,b6i=new te,Q6i=new te;Slt.prototype.initialize=function(){let o=document.createElement("div");o.className="map-info-bar",o.style="position: absolute;left: 0px;bottom:0px;width: 100%;background:rgba(0,0,0,0.4); color:#e9e9e9; text-shadow:2px 2px 2px #000";let A=this._coreMap;A.container.appendChild(o);let f="float: right; min-width: 100px;margin-right: 20px;",m=document.createElement("div");m.style=f,o.appendChild(m);let C=document.createElement("div");C.style=f,o.appendChild(C);let y=document.createElement("div");y.style=f,o.appendChild(y);let x=A.scene.canvas,v=A.scene.globe.ellipsoid;new zr(x).setInputAction(function(I){let w=A.camera.pickEllipsoid(I.endPosition,v);if(w){let Q=A.scene.globe.ellipsoid.cartesianToCartographic(w),M=qe.toDegrees(Q.latitude).toFixed(6),B=qe.toDegrees(Q.longitude).toFixed(6),T=A.camera.positionCartographic.height.toFixed(1);y.innerHTML=`\u7ECF\u5EA6\uFF1A${B}`,C.innerHTML=`\u7EAC\u5EA6\uFF1A${M}`,m.innerHTML=`\u89C6\u70B9\u9AD8\uFF1A${T}\u7C73`}},Yi.MOUSE_MOVE)};var Dlt=Slt;function cu(){}cu.parseBaseData=function(o,A){let f=[];if(O(A)&&O(A.imageryProviders))for(let C=0;C<A.imageryProviders.length;C++){let y=A.imageryProviders[C];if(y.enable===!1||y.show===!1)continue;if(O(y.tilingScheme)){let v=y.tilingScheme;v.type==="GeographicTilingScheme"&&(y.tilingScheme=new mg(v))}let x=t2.createImageryLayer(y);f.push(x)}let m=[];if(O(A)&&O(A.terrainProviders))for(let C=0;C<A.terrainProviders.length;C++){let y=A.terrainProviders[C];if(y.enable===!1||y.show===!1)continue;let x=t2.createTerrainLayer(y);m.push(x)}return{imageryProvider:f,terrainProvider:m}};cu.parse=function(o,A){if(!O(A))return;let f=[Zs.IMAGERYPROVIDERS,Zs.TERRAINPROVIDERS,Zs.MODELLAYERS,Zs.FEATURELAYERS,Zs.USERSCENE];for(let m=0;m<f.length;m++){let C=o.factory.createSceneNode(t2.createUUID(),f[m]);C.show=!0,o.userScene.addChild(o.userScene.rootNode,C)}O(A[Zs.IMAGERYPROVIDERS])&&GH(o,A[Zs.IMAGERYPROVIDERS],o.userScene.rootNode.getChildByIndex(0),0),O(A[Zs.TERRAINPROVIDERS])&&GH(o,A[Zs.TERRAINPROVIDERS],o.userScene.rootNode.getChildByIndex(1),1),O(A[Zs.MODELLAYERS])&&GH(o,A[Zs.MODELLAYERS],o.userScene.rootNode.getChildByIndex(2)),O(A[Zs.FEATURELAYERS])&&GH(o,A[Zs.FEATURELAYERS],o.userScene.rootNode.getChildByIndex(3)),O(A[Zs.USERSCENE])&&GH(o,A[Zs.USERSCENE],o.userScene.rootNode.getChildByIndex(4))};function GH(o,A,f,m){for(let C=0;C<A.length;C++){let y=A[C],x=null;if(y.enable===!1)continue;O(y.class)?(y.class==="IMAGERY"&&(y.class=vo.IMAGERY_LAYER),y.class==="TERRAIN"&&(y.class=vo.TERRAIN_LAYER),x=y.class):(m===0?y.class=vo.IMAGERY_LAYER:m===1&&(y.class=vo.TERRAIN_LAYER),x=y.class);let v=cu.parserMap[x];v!==void 0&&v(o,y,f)}}function iRi(o,A,f){let m=o.factory.createSceneNode(A.id,A.name);m.show=Ae(A.show,!0),o.userScene.addChild(f,m),O(A.childNodes)&&GH(o,A.childNodes,m)}function rRi(o,A,f){let m=A;if(O(m.tilingScheme)){let C=m.tilingScheme;C.type==="GeographicTilingScheme"&&(m.tilingScheme=new mg(C))}o.factory.createImageryLayer(m,f)}function nRi(o,A,f){let m=A;o.factory.createTerrainLayer(m,f)}function oRi(o,A,f){let m=A;m.addToMap=!0;let C=m.sourceType;C==="3DTiles"||C==="b3dm"||C==="osgb"||C==="s3m"||C==="ude_block"||C==="ude_model"?o.factory.createModelLayer(m,f):C==="czml"?o.factory.createCZMLObject(m,f):C==="wfsModel"&&o.factory.createWfsModel(m,f)}function aRi(o,A,f){let m=o.factory.createFeatureLayer(A,f)}function sRi(o,A,f){o.coreMap.scene.skyBox=new Y5({sources:{positiveX:A.positiveX,negativeX:A.negativeX,positiveY:A.positiveY,negativeY:A.negativeY,positiveZ:A.positiveZ,negativeZ:A.negativeZ}})}function lRi(o,A,f){o.camera.undergroundMode=Ae(A.underGround,!1),o.shadows=Ae(A.shadow,!1),A.rain===!0&&o.environment.showEffect("rain"),A.snow===!0&&o.environment.showEffect("snow"),A.fog===!0&&o.environment.showEffect("fog"),o.coreMap.scene.globe.depthTestAgainstTerrain=Ae(A.depthTest,!1),A.bwMode===!0&&o.environment.showEffect("bwMode"),A.nightMode===!0&&o.environment.showEffect("nightMode"),A.colorAdjustment.show===!0&&(o.environment.showEffect("colorAdjustment"),o.environment.colorAdjustment.contrast=A.colorAdjustment.contrast,o.environment.colorAdjustment.saturation=A.colorAdjustment.saturation,o.environment.colorAdjustment.brightness=A.colorAdjustment.brightness)}function uRi(o,A,f){o.camera.viewPoint=A,o.camera.flyTo(A.lon,A.lat,A.alt,A.heading,A.pitch,A.roll,A.duration)}function cRi(o,A,f){o.factory.createModel(A,f)}function ARi(o,A,f){o.factory.createWaters(A,f)}function hRi(o,A,f){o.factory.createExplosion(A,f)}function dRi(o,A,f){o.factory.createFireworks(A,f)}function fRi(o,A,f){o.factory.createSmoke(A,f)}function gRi(o,A,f){o.factory.createFire(A,f)}function pRi(o,A,f){A.color&&(A.color=new ht(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createRadarScan(A,f)}function mRi(o,A,f){A.color&&(A.color=new ht(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createCircleScan(A,f)}function CRi(o,A,f){A.color&&(A.color=new ht(A.color.red,A.color.green,A.color.blue,A.color.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createPoint(A,f)}function yRi(o,A,f){A.fillColor&&(A.fillColor=new ht(A.fillColor.red,A.fillColor.green,A.fillColor.blue,A.fillColor.alpha)),o.factory.createLabel(A,f)}function xRi(o,A,f){o.factory.createBillboard(A,f)}function vRi(o,A,f){A.positions&&(A.positions=cu.array2DtoMercator(A.positions)),A.lineColor&&(A.lineColor=new ht(A.lineColor.red,A.lineColor.green,A.lineColor.blue,A.lineColor.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),o.factory.createPolyline(A,f)}function ERi(o,A,f){A.material&&(A.material=new ht(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.positions&&(A.positions=cu.array2DtoMercator(A.positions)),o.factory.createPolygon(A,f)}function IRi(o,A,f){A.coordinates&&(A.coordinates=Di.fromDegrees(A.coordinates[0],A.coordinates[1],A.coordinates[2],A.coordinates[3])),A.fillColor&&(A.fillColor=new ht(A.fillColor.red,A.fillColor.green,A.fillColor.blue,A.fillColor.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),o.factory.createRectangle(A,f)}function _Ri(o,A,f){o.factory.createEllipse(A,f)}function BRi(o,A,f){A.material&&(A.material=new ht(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=te.fromDegrees(A.position[0],A.position[1],A.position[2])),A.dimensions&&(A.dimensions=new te(A.dimensions.x,A.dimensions.y,A.dimensions.z)),o.factory.createBox(A,f)}function wRi(o,A,f){A.material&&(A.material=new ht(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=te.fromDegrees(A.position[0],A.position[1],A.position[2])),A.radii&&(A.radii=new te(A.radii[0],A.radii[1],A.radii[2])),o.factory.createEllipsoid(A,f)}function bRi(o,A,f){A.material&&(A.material=new ht(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=te.fromDegrees(A.position[0],A.position[1],A.position[2])),o.factory.createCylinder(A,f)}function QRi(o,A,f){o.factory.createPolylineVolume(A,f)}function SRi(o,A,f){o.factory.createVideoProjection(A,f)}function DRi(o,A,f){o.factory.createVideoProjection(A,f)}function TRi(o,A,f){o.factory.createTrack(A,f)}function MRi(o,A,f){o.factory.createHeatmap(A,f)}function PRi(o,A,f){o.factory.createEChartLayer(A,f)}function RRi(o,A,f){let m=o.factory.createElement(A);o.userScene.addChild(f,m)}cu.array2DtoMercator=function(o){let A=[];return o.forEach(function(f){let m=te.fromDegrees(f[0],f[1],f[2]);A.push(m)}),A};cu.parserMap={};cu.parserMap[vo.NODE]=iRi;cu.parserMap[vo.IMAGERY_LAYER]=rRi;cu.parserMap[vo.TERRAIN_LAYER]=nRi;cu.parserMap[vo.MODEL_LAYER]=oRi;cu.parserMap[vo.FEATURE_LAYER]=aRi;cu.parserMap[vo.SKYBOX]=sRi;cu.parserMap[vo.ENVIRONMENT]=lRi;cu.parserMap[vo.VIEWPOINT]=uRi;cu.parserMap[vo.MODEL]=cRi;cu.parserMap[vo.WATERS]=ARi;cu.parserMap[vo.EXPLOSION]=hRi;cu.parserMap[vo.FIREWORK]=dRi;cu.parserMap[vo.SMOKE]=fRi;cu.parserMap[vo.FIRE]=gRi;cu.parserMap[vo.RADARSCAN]=pRi;cu.parserMap[vo.CIRCLESCAN]=mRi;cu.parserMap[vo.POINT]=CRi;cu.parserMap[vo.LABEL]=yRi;cu.parserMap[vo.BILLBOARD]=xRi;cu.parserMap[vo.POLYLINE]=vRi;cu.parserMap[vo.POLYGON]=ERi;cu.parserMap[vo.RECTANGLE]=IRi;cu.parserMap[vo.ELLIPSE]=_Ri;cu.parserMap[vo.BOX]=BRi;cu.parserMap[vo.ELLIPSOID]=wRi;cu.parserMap[vo.CYLINDER]=bRi;cu.parserMap[vo.POLYLINEVOLUME]=QRi;cu.parserMap[vo.PERSPECTIVE_VIDEO_PROJECTION]=SRi;cu.parserMap[vo.FISHEYE_VIDEO_PROJECTION]=DRi;cu.parserMap[vo.TRACK]=TRi;cu.parserMap[vo.HEATMAP]=MRi;cu.parserMap[vo.ECHARTLAYER]=PRi;cu.parserMap.ELEMENT=RRi;var Tlt=cu;var gIe=class extends Ja{constructor(A,f,m,C){super(A,m,C),this.editBillboard=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editBillboard=f,O(this.editBillboard)&&O(this.editBillboard.entity.billboard)?console.info(this.editBillboard.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Billboard entity is need!"}))}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editBillboard.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editBillboard.entity)||this.pickObject(A,this.editBillboard.entity))&&this.mCallback&&this.mCallback(this.editBillboard),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editBillboard.entity.position=m}return this.mCallback&&this.mCallback(this.editBillboard),!0}updateBillboard(A){if(O(A)&&O(this.editBillboard)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editBillboard.entity.position=A[C]:O(A[C])&&(this.editBillboard.entity.billboard[C]=A[C])}}}endEditEntity(){}},Mlt=gIe;var pIe=class extends Ja{constructor(A,f,m,C){super(A,m,C),this.editPoint=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editPoint=f,O(this.editPoint)&&O(this.editPoint.entity.point)?console.info(this.editPoint.entity.point):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Point entity is need!"}))}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPoint.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPoint.entity)||this.pickObject(A,this.editPoint.entity))&&this.mCallback&&this.mCallback(this.editPoint),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editPoint.entity.position=m}return this.mCallback&&this.mCallback(this.editPoint),!0}updatePoint(A){if(O(A)&&O(this.editPoint)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editPoint.entity.position=A[C]:O(A[C])&&(this.editPoint.entity.point[C]=A[C])}}}endEditEntity(){}},Plt=pIe;var mIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editBox=void 0,this.pickedEntity=void 0,this.editHeightPoint=void 0,this.editWHPoint=void 0,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=void 0,this.isEditing=!1,this.pointsId=[],this.height=0,this.dragPosition=void 0,this.editBox=f,O(this.editBox)&&O(this.editBox.entity.box)){let y=this.editBox.entity.position._value,x=$t.fromCartesian(y);this.height=x.height;let v=new te,E=new te;this.getNorthPointByDistance(v,E),this.editHeightPoint=this.mEarthCtrl.entities.add({name:"box_edit_height_point",position:v,point:{heightReference:this.editBox.entity.box.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.editHeightPoint.id),this.editWHPoint=this.mEarthCtrl.entities.add({name:"box_edit_long_width_point",position:E,point:{heightReference:this.editBox.entity.box.heightReference,color:ht.RED,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.editWHPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Box entity is need!"})}addHeight(A){let f=this.editBox.entity.position._value,m=$t.fromCartesian(f);return this.height=m.height+A,te.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C;console.info(this.editBox.entity.position),O(m)?C=this.editBox.entity.position.getValue(m):C=this.editBox.entity.position._value;let y=Kn.eastNorthUpToFixedFrame(C),x=new te,v=this.editBox.entity.box.dimensions._value;v||(v=this.editBox.entity.box.dimensions.getValue(m)),te.divideByScalar(v,2,x),te.clone(x,A),te.clone(x,f),A.y*=-1,Ze.multiplyByPoint(y,A,A),f.y*=-1,f.z*=-1,Ze.multiplyByPoint(y,f,f)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editBox.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=void 0):f.name==="box_edit_height_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=f,this.pickEditWHPoint=void 0):f.name==="box_edit_long_width_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editBox)||this.pickObject(A,this.editBox.entity))&&this.mCallback&&this.mCallback(this.editBox),this.currentPoint=void 0,this.isEditing=!1,this.dragPosition=void 0,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;let f=new Date,m=gi.fromDate(f);if(O(this.currentPoint)||O(this.pickEditHeightPoint)||O(this.pickEditWHPoint)){let C=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,y=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,C);if(!y)return;let x=$t.fromCartesian(y),v=te.fromRadians(x.longitude,x.latitude,x.height+this.height);if(O(this.currentPoint))this.currentPoint.position=v,this.editBox.entity.position=new Qn(function(){return v},!1);else if(O(this.dragPosition)){if(O(this.pickEditWHPoint)){let w=te.subtract(y,this.dragPosition,new te),Q=te.normalize(w,new te);te.dot(w,Q,w);let M=this.editBox.entity.box.dimensions._value;M||(M=this.editBox.entity.box.dimensions.getValue(m));let B=te.clone(M);B.x-=w.x,B.y+=w.y,te.abs(B,B),this.editBox.entity.box.dimensions=new Qn(function(){return B},!1)}else if(O(this.pickEditHeightPoint)){let w=te.subtract(y,this.dragPosition,new te),Q=this.editBox.entity.box.dimensions._value;Q||(Q=this.editBox.entity.box.dimensions.getValue(m));let M=te.clone(Q);M.z+=w.z,te.abs(M,M),this.editBox.entity.box.dimensions=M,this.editBox.entity.position=this.addHeight(w.z/2)}}this.dragPosition=y;let E=new te,I=new te;this.getNorthPointByDistance(E,I,m),this.editHeightPoint.position=E,this.editWHPoint.position=I}return this.mCallback&&this.mCallback(this.editBox),!0}updateBox(A){if(O(A)&&O(this.editBox)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editBox.entity.position=A[C]:O(A[C])&&(this.editBox.entity.box[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Rlt=mIe;var CIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editCylinder=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.pointsId=[],this.height=0,this.topRadiusPoint=void 0,this.pickTopRadiusPoint=void 0,this.bottomRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0,this.heightPoint=void 0,this.pickHeightPoint=void 0,this.dragPosition=void 0,this.editCylinder=f,O(this.editCylinder)&&O(this.editCylinder.entity.cylinder)){let y=this.editCylinder.entity.position._value,x=$t.fromCartesian(y);this.height=x.height;let v=this.editCylinder.entity.cylinder.topRadius._value,E=this.editCylinder.entity.cylinder.bottomRadius._value,I=new te,w=new te,Q=new te;this.getNorthPointByDistance(I,w,Q),this.heightPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_height_point",position:Q,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.heightPoint.id),v>0&&(this.topRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_top_radius_point",position:I,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:ht.RED,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.topRadiusPoint.id)),E>0&&(this.bottomRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_bottom_radius_point",position:w,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:ht.RED,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.bottomRadiusPoint.id))}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Cylinder entity is need!"})}addHeight(A){let f=this.editCylinder.entity.position._value,m=$t.fromCartesian(f);return this.height=m.height+A,te.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C=this.editCylinder.entity.position._value,y=Kn.eastNorthUpToFixedFrame(C),x=this.editCylinder.entity.cylinder.length._value,v=this.editCylinder.entity.cylinder.topRadius._value,E=this.editCylinder.entity.cylinder.bottomRadius._value;v>0&&(A.z+=x/2,A.x+=v,Ze.multiplyByPoint(y,A,A)),E>0&&(f.x+=E,f.z-=x/2,Ze.multiplyByPoint(y,f,f)),m.z+=x/2,Ze.multiplyByPoint(y,m,m)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editCylinder.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_height_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=f,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_top_radius_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=f,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_bottom_radius_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editCylinder)||this.pickObject(A,this.editCylinder.entity))&&this.mCallback&&this.mCallback(this.editCylinder),this.currentPoint=void 0,this.dragPosition=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.heightPoint)||O(this.topRadiusPoint)||O(this.bottomRadiusPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=$t.fromCartesian(m),y=te.fromRadians(C.longitude,C.latitude,C.height+this.height);if(O(this.currentPoint))this.currentPoint.position=y,this.editCylinder.entity.position=y;else if(O(this.dragPosition)){if(O(this.pickHeightPoint)){let Q=te.subtract(m,this.dragPosition,new te),M=this.editCylinder.entity.cylinder.length._value;M+=Q.z,M=Math.abs(M),this.editCylinder.entity.position=this.addHeight(Q.z/2),this.editCylinder.entity.cylinder.length=M}else if(O(this.pickTopRadiusPoint)){let Q=te.subtract(m,this.dragPosition,new te),M=this.editCylinder.entity.cylinder.topRadius._value;M-=Q.x,M=Math.abs(M),this.editCylinder.entity.cylinder.topRadius=M}else if(O(this.pickBottomRadiusPoint)){let Q=te.subtract(m,this.dragPosition,new te),M=this.editCylinder.entity.cylinder.bottomRadius._value;M-=Q.x,M=Math.abs(M),this.editCylinder.entity.cylinder.bottomRadius=M}}this.dragPosition=m;let x=this.editCylinder.entity.cylinder.topRadius._value,v=this.editCylinder.entity.cylinder.bottomRadius._value,E=new te,I=new te,w=new te;this.getNorthPointByDistance(E,I,w),x>0&&(this.topRadiusPoint.position=E),v>0&&(this.bottomRadiusPoint.position=I),this.heightPoint.position=w}return this.mCallback&&this.mCallback(this.editCylinder),!0}updateCylinder(A){if(O(A)&&O(this.editCylinder)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editCylinder.entity.position=A[C]:O(A[C])&&(this.editCylinder.entity.cylinder[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Llt=CIe;var yIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editEllipse=void 0,this.pickedEntity=void 0,this.semiMajorAxisPoint=void 0,this.semiMinorAxisPoint=void 0,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=void 0,this.pointsId=[],this.isEditing=!1,this.circle=!1,this.editEllipse=f,O(this.editEllipse)&&O(this.editEllipse.entity.ellipse)){let y=qe.PI_OVER_TWO,x=this.updatePoint(y);this.semiMajorAxisPoint=this.mEarthCtrl.entities.add({name:"semi_major_axis_point",position:x,point:{heightReference:this.editEllipse.entity.ellipse.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.semiMajorAxisPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipse entity is need!"})}updatePoint(A){let f=new te,m=new te,C=new te,y=this.editEllipse.entity.ellipse;this.semiMinorAxis=y.semiMinorAxis._value,this.semiMajorAxis=y.semiMajorAxis._value,this.circle=this.semiMajorAxis===this.semiMinorAxis;let x=Ae(y.rotation,0);this.center=this.editEllipse.entity.position._value;let v=this.semiMinorAxis*this.semiMinorAxis,E=this.semiMajorAxis*this.semiMajorAxis,I=this.semiMajorAxis*this.semiMinorAxis,w=te.magnitude(this.center),Q=te.normalize(this.center,f),M=te.cross(te.UNIT_Z,this.center,m);M=te.normalize(M,M);let B=te.cross(Q,M,C),T=new te;return F1.pointOnEllipsoid(A,x,B,M,v,I,E,w,Q,T)}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editEllipse.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=void 0):f.name==="semi_minor_axis_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=f):f.name==="semi_major_axis_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=f,this.pickSemiMinorAxisPoint=void 0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editEllipse)||this.pickObject(A,this.editEllipse.entity))&&this.mCallback&&this.mCallback(this.editEllipse),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.pickSemiMajorAxisPoint)||O(this.pickSemiMinorAxisPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;if(O(this.currentPoint))this.currentPoint.position=m,this.editEllipse.entity.position=m;else if(O(this.pickSemiMajorAxisPoint)){let C=te.distance(this.center,m);this.editEllipse.entity.ellipse.semiMajorAxis=C;let y=C*this.semiMinorAxis/this.semiMajorAxis;y>C&&(y=C),this.editEllipse.entity.ellipse.semiMinorAxis=y}else if(O(this.pickSemiMinorAxisPoint)){let C=te.distance(this.center,m);this.editEllipse.entity.ellipse.semiMinorAxis=C}this.semiMajorAxisPoint.position=this.updatePoint(qe.PI_OVER_TWO)}return this.mCallback&&this.mCallback(this.editEllipse),!0}updateEllipse(A){if(O(A)&&O(this.editEllipse)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editEllipse.entity.position=A[C]:O(A[C])&&(this.editEllipse.entity.ellipse[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Flt=yIe;var xIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editEllipsoid=void 0,this.pickedEntity=void 0,this.height=0,this.isEditing=!1,this.pointsId=[],this.radiiXPoint=void 0,this.pickRadiiXPoint=void 0,this.radiiYPoint=void 0,this.pickRadiiYPoint=void 0,this.radiiZPoint=void 0,this.pickRadiiZPoint=void 0,this.dragPosition=void 0,this.editEllipsoid=f,O(this.editEllipsoid)&&O(this.editEllipsoid.entity.ellipsoid)){console.info(this.editEllipsoid.ellipsoid);let y=this.editEllipsoid.entity.position._value,x=$t.fromCartesian(y);this.height=x.height;let v=new te,E=new te,I=new te;this.getNorthPointByDistance(v,E,I),this.radiiXPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_x_point",position:v,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiXPoint.id),this.radiiYPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_y_point",position:E,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiYPoint.id),this.radiiZPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_z_point",position:I,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiZPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipsoid entity is need!"})}addHeight(A){let f=this.editEllipsoid.entity.position._value,m=$t.fromCartesian(f);return this.height=m.height+A,te.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C=this.editEllipsoid.entity.position._value,y=Kn.eastNorthUpToFixedFrame(C),x=this.editEllipsoid.entity.ellipsoid.radii._value;A.x=x.x,Ze.multiplyByPoint(y,A,A),f.y=-x.y,Ze.multiplyByPoint(y,f,f),m.z=x.z,Ze.multiplyByPoint(y,m,m)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editEllipsoid.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_x_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=f,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_y_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=f,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_z_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editEllipsoid)||this.pickObject(A,this.editEllipsoid.entity))&&this.mCallback&&this.mCallback(this.editEllipsoid),this.currentPoint=void 0,this.dragPosition=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.pickRadiiXPoint)||O(this.pickRadiiYPoint)||O(this.pickRadiiZPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=$t.fromCartesian(m),y=te.fromRadians(C.longitude,C.latitude,C.height+this.height);if(O(this.currentPoint))this.currentPoint.position=y,this.editEllipsoid.entity.position=y;else{if(O(this.dragPosition)){let I=te.subtract(m,this.dragPosition,new te),w=te.normalize(I,new te);te.dot(I,w,I);let Q=this.editEllipsoid.entity.ellipsoid.radii._value,M=te.clone(Q);O(this.pickRadiiXPoint)?M.x-=I.x:O(this.pickRadiiYPoint)?M.y+=I.y:O(this.pickRadiiZPoint)&&(M.z+=I.z,this.editEllipsoid.entity.position=this.addHeight(I.z)),te.abs(M,M),this.editEllipsoid.entity.ellipsoid.radii=M}this.dragPosition=m}let x=new te,v=new te,E=new te;this.getNorthPointByDistance(x,v,E),this.radiiXPoint.position=x,this.radiiYPoint.position=v,this.radiiZPoint.position=E}return this.mCallback&&this.mCallback(this.editEllipsoid),!0}updateEllipsoid(A){if(O(A)&&O(this.editEllipsoid)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editEllipsoid.entity.position=A[C]:O(A[C])&&(this.editEllipsoid.entity.ellipsoid[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Nlt=xIe;var vIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolygon=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolygon=f,O(this.editPolygon)&&O(this.editPolygon.entity.polygon))for(let y=0;y<this.editPolygon.entity.polygon.hierarchy._value.positions.length;y++){let x=this.editPolygon.entity.polygon.hierarchy._value.positions[y],v=this.mEarthCtrl.entities.add({name:"polygon_point",position:x,point:{color:ht.WHITE,pixelSize:8,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polygon entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolygon.entity.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="polygon_point"&&(this.currentPoint=f,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolygon)||this.pickObject(A,this.editPolygon.entity))&&this.mCallback&&this.mCallback(this.editPolygon),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolygon.entity.polygon.hierarchy=C}return this.mCallback&&this.mCallback(this.editPolygon),!0}updatePolygon(A){if(O(A)&&O(this.editPolygon)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];O(A[C])&&(this.editPolygon.entity.polygon[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},klt=vIe;var EIe=class extends Ja{constructor(A,f,m,C){super(A,m,C),this.editModel=void 0,this.pickedEntity=void 0,this.editColor=ht.RED.withAlpha(.8),this.isEditing=!1,this.editModel=f,this.oldColor=this.editModel.entity.color,this.editModel.entity.color=this.editColor,O(this.editModel)&&O(this.editModel.entity)?console.info(this.editModel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"gltf Model is need!"}))}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f===this.editModel.parameter.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editModel)||this.pickObject(A,this.editModel.entity))&&this.mCallback&&this.mCallback(this.editModel),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=$t.fromCartesian(m),y=$t.clone(C);y.longitude=qe.toDegrees(y.longitude),y.latitude=qe.toDegrees(y.latitude),this.editModel.lon=y.longitude,this.editModel.lat=y.latitude}return this.mCallback&&this.mCallback(this.editModel),!0}updateModel(A){if(O(A)&&O(this.editModel)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];if(O(A[C]))switch(C){case"lon":case"lat":case"alt":case"heading":case"pitch":case"roll":this.editModel[C]=A[C];break;default:this.editModel.entity[C]=A[C];break}}}}endEditEntity(){this.editModel.entity.color=this.oldColor}},Olt=EIe;var IIe=class extends Ja{constructor(A,f,m,C){super(A,m,C),this.editLabel=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editLabel=f,O(this.editLabel)&&O(this.editLabel.entity.label)?console.info(this.editLabel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Label entity is need!"}))}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editLabel.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editLabel.entity)||this.pickObject(A,this.editLabel.entity))&&this.mCallback&&this.mCallback(this.editLabel),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editLabel.entity.position=m}return this.mCallback&&this.mCallback(this.editLabel),!0}updateLabel(A){if(O(A)&&O(this.editLabel)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editLabel.entity.position=A[C]:O(A[C])&&(this.editLabel.entity.label[C]=A[C])}}}endEditEntity(){}},Ult=IIe;var _Ie=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolyline=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolyline=f,O(this.editPolyline)&&O(this.editPolyline.polyline))for(let y=0;y<this.editPolyline.polyline.positions._value.length;y++){let x=this.editPolyline.polyline.positions._value[y],v=this.mEarthCtrl.entities.add({name:"polyline_point",position:x,point:{color:ht.WHITE,pixelSize:8,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polyline entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolyline.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="polyline_point"&&(this.currentPoint=f,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolyline)||this.pickObject(A,this.editPolyline.entity))&&this.mCallback&&this.mCallback(this.editPolyline),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolyline.polyline.positions=C}return this.mCallback&&this.mCallback(this.editPolyline),!0}updatePolyline(A){if(O(A)&&O(this.editPolyline)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];O(A[C])&&(this.editPolyline.polyline[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Glt=_Ie;var BIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolylineVolume=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolylineVolume=f,O(this.editPolylineVolume)&&O(this.editPolylineVolume.entity.polylineVolume))for(let y=0;y<this.editPolylineVolume.entity.polylineVolume.positions._value.length;y++){let x=this.editPolylineVolume.entity.polylineVolume.positions._value[y],v=this.mEarthCtrl.entities.add({name:"edit_polylineVolume_point",position:x,point:{color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"PolylineVolume entity is need!"})}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolylineVolume.entity.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="edit_polylineVolume_point"&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolylineVolume)||this.pickObject(A,this.editPolylineVolume.entity))&&this.mCallback&&this.mCallback(this.editPolylineVolume),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolylineVolume.entity.polylineVolume.positions=C}return this.mCallback&&this.mCallback(this.editPolylineVolume),!0}updatePolylineVolume(A){if(O(A)&&O(this.editPolylineVolume)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editPolylineVolume.entity.position=A[C]:O(A[C])&&(this.editPolylineVolume.entity.polylineVolume[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Hlt=BIe;var wIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editRectangle=void 0,this.pickedEntity=void 0,this.leftTopPoint=void 0,this.rightBottomPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editRectangle=f,O(this.editRectangle)&&O(this.editRectangle.entity.rectangle)){let y=this.editRectangle.entity.rectangle.coordinates._value,x=this.editRectangle.entity.rectangle.height._value,v=Di.northwest(y),E=te.fromRadians(v.longitude,v.latitude,x),I=this.mEarthCtrl.entities.add({name:"rect_left_top_point",position:E,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:ht.WHITE,pixelSize:8,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(I.id),v=Di.southeast(y);let w=te.fromRadians(v.longitude,v.latitude,x),Q=this.mEarthCtrl.entities.add({name:"rect_right_bottom_point",position:w,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:ht.WHITE,pixelSize:8,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(Q.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Rectangle entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editRectangle.entity.id?(this.isEditing=!0,this.leftTopPoint=void 0,this.rightBottomPoint=void 0):f.name==="rect_left_top_point"?(this.leftTopPoint=f,this.rightBottomPoint=void 0,this.isEditing=!0):f.name==="rect_right_bottom_point"&&(this.rightBottomPoint=f,this.leftTopPoint=void 0,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editRectangle)||this.pickObject(A,this.editRectangle.entity))&&this.mCallback&&this.mCallback(this.editRectangle),this.leftTopPoint=void 0,this.rightBottomPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.leftTopPoint)||O(this.rightBottomPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=$t.fromCartesian(m),y=this.editRectangle.entity.rectangle.coordinates._value;O(this.leftTopPoint)?(this.leftTopPoint.position=m,y.west=C.longitude,y.north=C.latitude):O(this.rightBottomPoint)&&(this.rightBottomPoint.position=m,y.south=C.latitude,y.east=C.longitude),this.editRectangle.entity.rectangle.coordinates=y}return this.mCallback&&this.mCallback(this.editRectangle),!0}updateRectangle(A){if(O(A)&&O(this.editRectangle)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editRectangle.entity.position=A[C]:O(A[C])&&(this.editRectangle.entity.rectangle[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Vlt=wIe;function wd(o){this._earthCtrl=o,this._coreMap=o.coreMap}wd.prototype.editPoint=function(o,A){this._earthCtrl.tools.clearTool();let f=new Plt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("point_edit_tool",f),f};wd.prototype.updatePoint=function(o,A){o.updatePoint(A)};wd.prototype.editPolyline=function(o,A){this._earthCtrl.tools.clearTool();let f=new Glt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polyline_edit_tool",f),f};wd.prototype.updatePolyline=function(o,A){o.updatePolyline(A)};wd.prototype.editPolygon=function(o,A){this._earthCtrl.tools.clearTool();let f=new klt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polygon_edit_tool",f),f};wd.prototype.updatePolygon=function(o,A){o.updatePolygon(A)};wd.prototype.editBox=function(o,A){this._earthCtrl.tools.clearTool();let f=new Rlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("box_edit_tool",f),f};wd.prototype.updateBox=function(o,A){o.updateBox(A)};wd.prototype.editEllipsoid=function(o,A){this._earthCtrl.tools.clearTool();let f=new Nlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("ellipsoid_edit_tool",f),f};wd.prototype.updateEllipsoid=function(o,A){o.updateEllipsoid(A)};wd.prototype.editCylinder=function(o,A){this._earthCtrl.tools.clearTool();let f=new Llt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("cylinder_edit_tool",f),f};wd.prototype.updateCylinder=function(o,A){o.updateCylinder(A)};wd.prototype.editModel=function(o,A){this._earthCtrl.tools.clearTool();let f=new Olt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("model_edit_tool",f),f};wd.prototype.updateModel=function(o,A){o.updateModel(A)};wd.prototype.editBillboard=function(o,A){this._earthCtrl.tools.clearTool();let f=new Mlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("billboard_edit_tool",f),f};wd.prototype.updateBillboard=function(o,A){o.updateBillboard(A)};wd.prototype.editLabel=function(o,A){this._earthCtrl.tools.clearTool();let f=new Ult(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("label_edit_tool",f),f};wd.prototype.updateLabel=function(o,A){o.updateLabel(A)};wd.prototype.editRectangle=function(o,A){this._earthCtrl.tools.clearTool();let f=new Vlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("rectangle_edit_tool",f),f};wd.prototype.updateRectangle=function(o,A){o.updateRectangle(A)};wd.prototype.editEllipse=function(o,A){this._earthCtrl.tools.clearTool();let f=new Flt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("ellipse_edit_tool",f),f};wd.prototype.updateEllipse=function(o,A){o.updateEllipse(A)};wd.prototype.editPolylineVolume=function(o,A){this._earthCtrl.tools.clearTool();let f=new Hlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polylinevolume_edit_tool",f),f};wd.prototype.updatePolylineVolume=function(o,A){o.updatePolylineVolume(A)};wd.prototype.endEditEntity=function(o){this._earthCtrl.tools.clearTool(),o.endEditEntity(),this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!0,this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!0};var Toe=wd;function fy(o){this.mEarthCtrl=o,this.scene=this.mEarthCtrl.coreMap.scene,this.entities=this.mEarthCtrl.entities,this.camera=this.mEarthCtrl.coreMap.camera,this._points=[],this.item=void 0}fy.prototype.horizontalDistance=function(o,A){let f=this,m=!1,C=[],y="",x=[],v,E=this.scene.globe.ellipsoid,I={spot:[],distance:[],label:[],polyline:[]},w={point:ht.RED,polyline:ht.fromRgba(4286644096)};O(A)&&(O(A.point)&&(w.point=A.point),O(A.polyline)&&(w.polyline=A.polyline));let Q=new N_;this.scene.primitives.add(Q);let M=new YA,B=new zr(f.scene.canvas),T=document.createElement("div");Zc(".map-widget",T),Zc(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let F=document.getElementById("toolTip");F.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let L;m=!0;let R=function(V){let U=0,W=`${0}\u7C73`,ie,ee,oe,ne,se,ce;for(let J=0;J<V.length-1;J+=1)ie=E.cartesianToCartographic(V[J]),ee=M.project(ie),oe=ee.x,ne=ee.y,ie=E.cartesianToCartographic(V[J+1]),ee=M.project(ie),se=ee.x,ce=ee.y,U=U+Math.sqrt((oe-se)*(oe-se)+(ne-ce)*(ne-ce));return U>0&&(W=`${U.toFixed(2)}\u7C73`),U/1e3>=1&&(W=`${(U/1e3).toFixed(2)}\u5343\u7C73`),W},k=function(){function V(U){if(!O(U))throw new Hi("positions is required!");if(U.length<2)throw new Hi("positions \u7684\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E2");let W=hs.fromType(hs.ColorType);W.uniforms.color=new ht(1,1,0,.5),this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:w.polyline,width:3,clampToGround:!0}},this.path=U,this._init()}return V.prototype._init=function(){let U=this,W=function(){return U.path};this.options.polyline.positions=new Qn(W,!1),this.lineEntity=f.entities.add(this.options),f.item=this.lineEntity,I.polyline.push(this.lineEntity)},V}();B.setInputAction(function(V){let U,W;F.style.left=`${V.endPosition.x+10}px`,F.style.top=`${V.endPosition.y+20}px`,F.style.display="block",F.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let ie=!1,ee=f.camera.getPickRay(V.endPosition);ee&&(U=f.scene.globe.pick(ee,f.scene));let oe=f.scene.pick(V.endPosition);if(oe){console.log("feature",oe);let ne=f.scene.pickPosition(V.endPosition);ne&&(U=ne),ie=!0}if(!!U&&(W=Pi.WGS84.cartesianToCartographic(U),W)){let ne;ie?ne=f.scene.sampleHeight(W):ne=f.scene.globe.getHeight(W);let se=te.fromDegrees(W.longitude/Math.PI*180,W.latitude/Math.PI*180,ne);if(m){if(C.length<1)return;O(v)?(v.path.pop(),v.path.push(se)):(C.push(se),v=new k(C));let ce=R(v.path);f.entities.remove(L),L=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:v.path[v.path.length-1],label:{text:`\u603B\u957F\uFF1A${ce}`,show:!0,font:"26px \u6977\u4F53",fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}})}}},Yi.MOUSE_MOVE);let G=function(V){x.push(V);let U=[];if(x.length>1){let W=x[x.length-2],ie=x[x.length-1],ee=Math.abs(W.longitude-ie.longitude)*1e7,oe=Math.abs(W.latitude-ie.latitude)*1e7;ee>oe&&(oe=ee);let ne=parseInt(oe/10);ne>1e3&&(ne=1e3),ne<2&&(ne=2);for(let se=0;se<ne;++se)U.push(new $t(qe.lerp(W.longitude,ie.longitude,se/(ne-1)),qe.lerp(W.latitude,ie.latitude,se/(ne-1))));U.push(ie.clone())}else U=x;if(U.length>0)for(let W=0;W<U.length;W++){V=U[W];let ie=f.scene.globe.getHeight(V),ee=te.fromDegrees(V.longitude/Math.PI*180,V.latitude/Math.PI*180,ie);C.push(ee)}};return B.setInputAction(function(V){let U,W,ie=!1,ee=f.camera.getPickRay(V.position);if(ee&&(U=f.scene.globe.pick(ee,f.scene)),f.scene.pick(V.position)){let ne=f.scene.pickPosition(V.position);ne&&(U=ne),ie=!0}if(U&&(W=Pi.WGS84.cartesianToCartographic(U)),W){let ne;ie?ne=f.scene.sampleHeight(W):ne=f.scene.globe.getHeight(W);let se=te.fromDegrees(W.longitude/Math.PI*180,W.latitude/Math.PI*180,ne);if(m){v&&v.path.pop(),G(W);let ce="0\u7C73";v&&(ce=R(v.path)),y=ce,I.spot.push(se),I.distance.push(ce);let J=f.entities.add({position:se,point:{pixelSize:5,color:w.point,outlineColor:ht.WHITE,outlineWidth:1,clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:ce,show:!0,font:"26px \u6977\u4F53",fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-20),clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}});I.label.push(J),f._points.push(J)}}},Yi.LEFT_CLICK),B.setInputAction(function(){f.entities.remove(L),f._points[f._points.length-1].label.text=y,B.destroy(),C.pop(),O(o)&&typeof o=="function"&&o(I),F.style.display="none"},Yi.RIGHT_CLICK),this};fy.prototype.spaceDistance=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m=new zr(f.scene.canvas),C=[],y=null,x="0\u7C73",v=null,E,I="",w,Q=document.createElement("div");Zc(".map-widget",Q),Zc(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let B=document.getElementById("toolTip");B.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let T={name:"",spot:[],distance:[],label:[],ployline:[]},D={point:ht.RED,polyline:ht.fromRgba(4286644096)};O(A)&&(O(A.point)&&(D.point=A.point),O(A.polyline)&&(D.polyline=A.polyline));let F=function(){function L(R){this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:D.polyline,width:3,clampToGround:!1}},this.positions=R,this._init()}return L.prototype._init=function(){let R=this,k=function(){return R.positions};this.options.polyline.positions=new Qn(k,!1);let G=f.entities.add(this.options);f.item=G,T.ployline.push(G);let V=f.getuid();T.name=`\u65B0\u5EFA\u7A7A\u95F4\u8DDD\u79BB${V}`},L}();return m.setInputAction(function(L){if(f.scene.bim){let R=f.scene.bim.PickWorldPositionSync(L.endPosition.x,L.endPosition.y);R[0]===0?v=f.scene.pickPosition(L.endPosition):v=new te(R[0],R[1],R[2]),console.log("????????",v)}else v=f.scene.pickPosition(L.endPosition);!v||(B.style.left=`${L.endPosition.x+10}px`,B.style.top=`${L.endPosition.y+20}px`,B.style.display="block",C.length>=2&&(O(y)?(C.pop(),C.push(v)):y=new F(C),B.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u53F3\u952E\u7ED3\u675F\uFF01</span>',x=f.getSpaceDistance(C)),f.entities.remove(w),w=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:C[C.length-1],label:{text:`\u603B\u957F\uFF1A${x}`,show:!0,font:"26px \u6977\u4F53",fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}}))},Yi.MOUSE_MOVE),m.setInputAction(function(L){if(f.scene.bim){let k=f.scene.bim.PickWorldPositionSync(L.position.x,L.position.y);k[0]===0?v=f.scene.pickPosition(L.position):v=new te(k[0],k[1],k[2]),console.log("????????",v)}else v=f.scene.pickPosition(L.position);if(!v)return;C.length===0&&C.push(v.clone()),C.push(v);let R=x;I=`\u603B\u957F\uFF1A${x}`,E=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:C[C.length-1],point:{pixelSize:5,color:D.point,outlineColor:ht.WHITE,outlineWidth:2,clampToGround:!1,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:R,show:!0,font:"26px \u6977\u4F53",fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-20),heightReference:In.NONE,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(E),T.spot.push(v),T.distance.push(x),T.label.push(E)},Yi.LEFT_CLICK),m.setInputAction(function(L){B.style.display="none",f.entities.remove(w),f._points.length>0&&(f._points[f._points.length-1].label.text=I),m.destroy(),C.pop(),O(o)&&typeof o=="function"&&o(T)},Yi.RIGHT_CLICK),this};fy.prototype.getSpaceDistance=function(o){let A=0,f="";for(let m=0;m<o.length-1;m++){let C=$t.fromCartesian(o[m]),y=$t.fromCartesian(o[m+1]),x=new xp;x.setEndPoints(C,y);let v=x.surfaceDistance;v=Math.sqrt(Math.pow(v,2)+Math.pow(y.height-C.height,2)),A=A+v}return A>=1e3?f=`${(A/1e3).toFixed(2)}\u5343\u7C73`:f=`${A.toFixed(2)}\u7C73`,f};fy.prototype.getPlaneArea=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m=0,C=new zr(f.scene._imageryLayerCollection),y=document.getElementById("toolTip");y||(Zc(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>'),y=document.getElementById("toolTip")),y.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB\uFF0C\u53F3\u952E\u7ED3\u675F\uFF01</span>';let x=[],v={},E=[],I=[],w=null,Q=null,M,B={point:ht.RED,polyline:ht.fromRgba(4286644096),polygon:ht.fromRgba(4286644096).withAlpha(.5)};O(A)&&(O(A.point)&&(B.point=A.point),O(A.polyline)&&(B.polyline=A.polyline),O(A.polygon)&&(B.polygon=A.polygon));let T={mj:0,label:[],polygon:[]};y.style.display="block";let D=function(){function F(L){this.options={name:"\u591A\u8FB9\u5F62",polygon:{hierarchy:[],perPositionHeight:!0,material:B.polygon,clampToGround:!1}},this.hierarchy=L,this._init()}return F.prototype._init=function(){let L=this,R=function(){return L.hierarchy};this.options.polygon.hierarchy=new Qn(R,!1),this.polygon=f.entities.add(this.options),f.item=this.polygon,f._entity=this.polygon,T.polygon=this.polygon},F}();return C.setInputAction(function(F){if(y.style.left=`${F.endPosition.x+10}px`,y.style.top=`${F.endPosition.y+20}px`,f.scene.bim){let V=f.scene.bim.PickWorldPositionSync(F.endPosition.x,F.endPosition.y);V[0]===0?Q=f.scene.pickPosition(F.endPosition):Q=new te(V[0],V[1],V[2])}else Q=f.scene.pickPosition(F.endPosition);if(!Q)return;let L=$t.fromCartesian(Q),R=qe.toDegrees(L.longitude),k=qe.toDegrees(L.latitude),G=L.height;if(x.length>=2){O(w)?(x.pop(),x.push(Q),v=new Hn(x),I.pop(),I.push({lon:R,lat:k,hei:G})):(v=new Hn(x),w=new D(v));let V=f.getArea(I,x);f.entities.remove(M),M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:x[x.length-1],label:{text:V,font:"26px \u6977\u4F53",show:!0,fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-40),heightReference:In.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),T.label=M}},Yi.MOUSE_MOVE),C.setInputAction(function(F){if(f.scene.bim){let V=f.scene.bim.PickWorldPositionSync(F.position.x,F.position.y);V[0]===0?Q=f.scene.pickPosition(F.position):Q=new te(V[0],V[1],V[2])}else Q=f.scene.pickPosition(F.position);if(!Q)return;let L=$t.fromCartesian(Q);console.log("\u5DE6\u952E\u70B9",L);let R=qe.toDegrees(L.longitude),k=qe.toDegrees(L.latitude),G=L.height;x.length===0&&(x.push(Q.clone()),v=new Hn(x),I.push({lon:R,lat:k,hei:G}),x.push(Q.clone()),v=new Hn(x),I.push({lon:R,lat:k,hei:G})),x.push(Q),v=new Hn(x),E.push({lon:R,lat:k,hei:G}),I.push({lon:R,lat:k,hei:G})},Yi.LEFT_CLICK),C.setInputAction(function(F){y.style.display="none",f.entities.remove(M),C.destroy();let L=f.getArea(I,x);m=L;let R=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:x[x.length-1],label:{text:L,font:"26px \u6977\u4F53",show:!0,fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-40),heightReference:In.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}});f._points.push(R),f._lable=R,T.mj=m,T.label=R,O(o)&&typeof o=="function"&&o(T)},Yi.RIGHT_CLICK),this};fy.prototype.getSurfaceArea3d=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m={mj:0,label:[],polygon:[]},C=!0,y=[],x={},v,E=f.scene,I=E.globe.ellipsoid,w=new N_;E.primitives.add(w);let Q,M,B=0,T={point:ht.RED,polyline:ht.fromRgba(4286644096),polygon:ht.fromRgba(4286644096).withAlpha(.5)};O(A)&&(O(A.point)&&(T.point=A.point),O(A.polyline)&&(T.polyline=A.polyline),O(A.polygon)&&(T.polygon=A.polygon));let D=document.createElement("div");Zc(".map-widget",D),Zc(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let L=document.getElementById("toolTip");L.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let R=new zr(E.canvas),k=function(){function V(U){if(!O(U))throw new Hi("positions is required!");if(U.length<3)throw new Hi("positions \u7684\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E3");this.options={polygon:{show:!0,hierarchy:void 0,material:T.polygon,clampToGround:!1}},this.path=U,this._init()}return V.prototype._init=function(){let U=this,W=function(){return U.path};this.options.polygon.hierarchy=new Qn(W,!1),this.polygonEntity=f.entities.add(this.options),f.item=this.polygonEntity,m.polygon=this.polygonEntity,f._entity=this.polygonEntity},V}();R.setInputAction(function(V){let U=0;f.entities.remove(M);let W,ie,ee=f.scene.camera.getPickRay(V.endPosition);ee&&(W=f.scene.globe.pick(ee,f.scene));let oe=f.scene.pick(V.endPosition),ne=!1;if(oe){let ce=f.scene.pickPosition(V.endPosition);ce&&(W=ce),ne=!0}if(!W)return;let se=function(ce){let J=new Array(ce.length),he=function(Ie){return Ie.longitude=Ie.longitude/Math.PI*180,Ie.latitude=Ie.latitude/Math.PI*180,Ie},Ce=function(Ie){let be=0;for(let Be=0;Be<Ie.length;Be++){let me=Ie[Be],z;Be<Ie.length-1?z=Ie[Be+1]:z=Ie[0],be+=me.x*z.y-z.x*me.y}return be/2};for(let Ie=0;Ie<ce.length;Ie++)J[Ie]=he(I.cartesianToCartographic(ce[Ie]));let Ee=0;for(let Ie=0;Ie<J.length;Ie++)Ee+=J[Ie].longitude;Ee=Ee/J.length;for(let Ie=0;Ie<J.length;Ie++)J[Ie]=f.Gauss_to_XY(J[Ie].longitude,J[Ie].latitude,Ee);return Math.abs(Ce(J))};if(ie=Pi.WGS84.cartesianToCartographic(W),ie&&C){if(L.style.left=`${V.endPosition.x+10}px`,L.style.top=`${V.endPosition.y+20}px`,L.style.display="block",y.length<2){B===1&&(M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:W,label:{text:`${U}\u5E73\u65B9\u5343\u7C73`,font:"26px \u6977\u4F53",show:!0,fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-40),heightReference:In.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(M),m.label=M);return}if(O(v)?(v.path.positions.pop(),v.path.positions.push(W)):(y.push(W),x=new Hn(y),v=new k(x)),y.length>=2){L.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u53F3\u952E\u7ED3\u675F\uFF01</span>';let ce=String(se(v.path.positions));ce=ce.substr(0,ce.indexOf(".",0)),ce.length<6?U=`${ce}\u5E73\u65B9\u7C73`:(ce=String(ce/1e6),ce=ce.substr(0,ce.indexOf(".",0)+3),U=`${ce}\u5E73\u65B9\u5343\u7C73`),m.mj=U,M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:W,label:{text:U,font:"26px \u6977\u4F53",show:!0,fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-40),heightReference:In.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(M),m.label=M}}},Yi.MOUSE_MOVE),R.setInputAction(function(V){let U;B=1;let W=f.scene.camera.getPickRay(V.position);W&&(U=f.scene.globe.pick(W,f.scene));let ie=f.scene.pick(V.position),ee=!1;if(ie){let oe=f.scene.pickPosition(V.position);oe&&(U=oe),ee=!0}U&&C&&(y.push(U),x=new Hn(y))},Yi.LEFT_CLICK),R.setInputAction(function(){R.removeInputAction(Yi.LEFT_CLICK),R.removeInputAction(Yi.LEFT_DOUBLE_CLICK),f.trackedEntity=void 0,C=!1,Q=w.add({show:!0,id:"measureTool",position:y[y.length-1],pixelOffset:new wt(0,20),eyeOffset:new te(0,0,0),horizontalOrigin:cA.CENTER,verticalOrigin:Bn.CENTER,scale:1,color:new ht(1,1,1,1)}),L.style.display="none",R.destroy(),O(o)&&typeof o=="function"&&o(m)},Yi.RIGHT_CLICK);let G=function(V){let U=0,W=0,ie=0;for(let oe=0;oe<V.length;oe++)U+=V[oe].x,W+=V[oe].y,ie+=V[oe].z;return new te(U/V.length,W/V.length,ie/V.length)};return this};fy.prototype.to_N=function(o){let f=63567523142e-4,m=Math.sqrt(6378137*6378137-f*f)/6378137;return 6378137/Math.sqrt(1-m*m*Math.sin(o)*Math.sin(o))};fy.prototype.to_Sm=function(o){let f=63567523142e-4,m=Math.sqrt(6378137*6378137-f*f)/6378137,C,y,x,v,E;return C=1+m*m*3/4+Math.pow(m,4)*45/64+Math.pow(m,6)*175/256+Math.pow(m,8)*11025/16384,y=Math.pow(m,2)*3/4+Math.pow(m,4)*15/16+Math.pow(m,6)*525/512+Math.pow(m,8)*2205/2048,x=Math.pow(m,4)*15/64+Math.pow(m,6)*105/256+Math.pow(m,8)*2205/4096,v=Math.pow(m,6)*35/512+Math.pow(m,8)*315/2048,E=Math.pow(m,8)*315/16384,6378137*(1-m*m)*(C*o-y/2*Math.sin(2*o)+x/4*Math.sin(4*o)-v/6*Math.sin(6*o)+E/8*Math.sin(8*o))};fy.prototype.to_Radian=function(o){return o*Math.PI/180};fy.prototype.Gauss_to_XY=function(o,A,f){let C=63567523142e-4,y=Math.sqrt(6378137*6378137-C*C)/C,x=0,v=0,E=0,I=0,w=this.to_Radian(f);A=this.to_Radian(A),o=this.to_Radian(o);let Q=o-w,M=Math.cos(A);I=this.to_N(A),E=I*Math.cos(A),x=Math.tan(A),v=y*M;let B=Math.pow(x,2),T=Math.pow(x,4),D=Math.pow(v,2),F=Math.pow(v,4),L=Math.pow(M,3),R=Math.pow(M,5),k=this.to_Sm(A)+Math.pow(Q,2)/2*E*M*x+Math.pow(Q,4)/24*x*E*L*(5-B+9*D+4*F)+Math.pow(Q,6)/720*x*E*R*(61-58*x*x+T+270*D-330*x*x*D),G=Q*I*M+Math.pow(Q,3)/6*I*L*(1-x*x+v*v)+Math.pow(Q,5)/120*I*R*(5-18*x*x+T+14*D-58*D*B);return new wt(G,k)};fy.prototype.getArea=function(o,A){let f=0;for(let m=0;m<o.length-2;m++){let C=(m+1)%o.length,y=(m+2)%o.length,x=this.Angle(o[m],o[C],o[y]),v=this.getdistance(A[m],A[C]),E=this.getdistance(A[C],A[y]);f+=v*E*Math.abs(Math.sin(x))}return f<1e6?f=`${f.toFixed(4)}\u5E73\u65B9\u7C73`:f=`${(f/1e6).toFixed(4)}\u5E73\u65B9\u5343\u7C73`,f};fy.prototype.getdistance=function(o,A){let f=$t.fromCartesian(o),m=$t.fromCartesian(A),C=new xp;C.setEndPoints(f,m);let y=C.surfaceDistance;return y=Math.sqrt(Math.pow(y,2)+Math.pow(m.height-f.height,2)),y};fy.prototype.Bearing=function(o,A){let f=Math.PI/180,m=180/Math.PI,C=o.lat*f,y=o.lon*f,x=A.lat*f,v=A.lon*f,E=-Math.atan2(Math.sin(y-v)*Math.cos(x),Math.cos(C)*Math.sin(x)-Math.sin(C)*Math.cos(x)*Math.cos(y-v));return E<0&&(E+=Math.PI*2),E=E*m,E};fy.prototype.Angle=function(o,A,f){let m=this.Bearing(A,o),C=this.Bearing(A,f),y=m-C;return y<0&&(y+=360),y};fy.prototype.getuid=function(){return this.uuid(8,16)};fy.prototype.uuid=function(o,A){let f="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),m=[],C;if(A=A||f.length,o)for(C=0;C<o;C++)m[C]=f[0|qe.nextRandomNumber()*A];else{let y;for(m[8]=m[13]=m[18]=m[23]="-",m[14]="4",C=0;C<36;C++)m[C]||(y=0|qe.nextRandomNumber()*16,m[C]=f[C===19?y&3|8:y])}return m.join("")};fy.prototype.deleteObject=function(){if(this.entities.remove(this.item),this._points.length>0){for(let o=0;o<this._points.length;o++)this.entities.remove(this._points[o]);this._points=[]}try{this.scene.primitives.remove(this.item)}catch(o){console.log(o)}this.item=void 0};var sJ=fy;function ew(o,A){this._earthCtrl=o,this._coreMap=this._earthCtrl.coreMap,this._show=Ae(A.show,!0),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,10),this._heading=Ae(A.heading,0),this._pitch=Ae(A.pitch,0),this._distance=Ae(A.distance,300),this._position=te.fromDegrees(A.lon,A.lat,A.height),this._horizontalViewAngle=Ae(A.horizontalViewAngle,90),this._verticalViewAngle=Ae(A.verticalViewAngle,60),this._horizontalViewAngle=this.adjustViewRange(this._horizontalViewAngle),this._verticalViewAngle=this.adjustViewRange(this._verticalViewAngle),this._visibleAreaColor=Ae(A.visibleAreaColor,ht.GREEN.withAlpha(.4)),this._invisibleAreaColor=Ae(A.invisibleAreaColor,ht.RED.withAlpha(.4)),this._size=Ae(A.size,10240),this._softShadows=Ae(A.softShadows,!0),this._colorStyle=Ae(A.colorStyle,ht.YELLOW),this._parameter=A,this._lineArray=[],this._visualCone=!0,this.pyramid=void 0,this.updateViewShed()}Object.defineProperties(ew.prototype,{show:{get:function(){return this._show},set:function(o){o!==this._show&&(this._show=o,this.updateViewShed())}},distance:{get:function(){return this._distance}},heading:{get:function(){return this._heading}},pitch:{get:function(){return this._pitch}},horizontalViewAngle:{get:function(){return this._horizontalViewAngle}},verticalViewAngle:{get:function(){return this._verticalViewAngle}},colorStyle:{get:function(){return this._colorStyle},set:function(o){this._colorStyle=o}},invisibleAreaColor:{get:function(){return this._invisibleAreaColor},set:function(o){this._invisibleAreaColor=o}},visibleAreaColor:{get:function(){return this._visibleAreaColor},set:function(o){this._visibleAreaColor=o}},visualCone:{get:function(){return this._visualCone},set:function(o){this._visualCone=o,this.visualConeShow(o)}}});ew.prototype.adjustViewRange=function(o){return o<=0?o=1:o>=180&&(o=179),o};ew.prototype.removeFromMap=function(){let o=this;O(o.viewShedMap)&&(o.viewShedMap.enabled=!1),O(o.pyramid)&&(o._earthCtrl.entities.removeById(o.pyramid.id),o.pyramid=null);for(let A=0;A<o._lineArray.length;A++){let f=o._lineArray[A];o._earthCtrl.entities.remove(f)}o._lineArray=[]};ew.prototype.visualConeShow=function(o){let A=this;O(A.pyramid)&&(A.pyramid.show=o);for(let f=0;f<A._lineArray.length;f++){let m=A._lineArray[f];m.show=o}};ew.prototype.addVisualPyramid=function(){let o=this,A=new cK({radii:new Qn(function(){return new te(o._distance,o._distance,o._distance)},!1),minimumClock:new Qn(function(){return qe.toRadians(90-o._heading-o._horizontalViewAngle/2)},!1),maximumClock:new Qn(function(){return qe.toRadians(90-o._heading+o._horizontalViewAngle/2)},!1),minimumCone:new Qn(function(){return qe.toRadians(90-o._verticalViewAngle/2)},!1),maximumCone:new Qn(function(){return qe.toRadians(90+o._verticalViewAngle/2)},!1),fill:!1,outline:!0,subdivisions:128,slicePartitions:32,stackPartitions:16,outlineColor:new Qn(function(){return o._colorStyle},!1)}),f=new JA({position:new Qn(function(){return o._position},!1),ellipsoid:A});this.pyramid=o._earthCtrl.entities.add(f)};ew.prototype.createLightCamera=function(){O(this.viewShedMap)?this._lightCamera=this.viewShedMap._lightCamera:this._lightCamera=new Ol(this._coreMap.scene),this._lightCamera.position=this._position};ew.prototype.updateParameters=function(o){let A=this,f=A._lightCamera;if(!!O(o)&&(O(o.lon)||O(o.lat)||O(o.height)||O(o.heading)||O(o.pitch)||O(o.roll)||O(o.far)||O(o.distance)||O(o.verticalViewAngle)||O(o.horizontalViewAngle))){let m=this._parameter;for(let v in o)o.hasOwnProperty(v)&&O(m[v])&&(m[v]=o[v]);m.distance>=A.viewShedMap.maximumDistance&&(m.distance=A.viewShedMap.maximumDistance),A._heading=m.heading,A._pitch=m.pitch,A._distance=m.distance,A.viewShedMap._pointLightRadius=m.distance,m.verticalViewAngle=A.adjustViewRange(m.verticalViewAngle),A._verticalViewAngle=m.verticalViewAngle,m.horizontalViewAngle=A.adjustViewRange(m.horizontalViewAngle),A._horizontalViewAngle=m.horizontalViewAngle,A._position=te.fromDegrees(m.lon,m.lat,m.height);let C=qe.toRadians(m.heading);f.setView({destination:A._position,orientation:{heading:C,pitch:0,roll:0}}),f.frustum.far=m.far||1e5;let y=qe.toRadians(A._horizontalViewAngle),x=qe.toRadians(A._verticalViewAngle);f.frustum.aspectRatio=Math.tan(y/2)/Math.tan(x/2),y>x?f.frustum.fov=y:f.frustum.fov=x}};ew.prototype.createShadowMap=function(){if(O(this.viewShedMap)){this.viewShedMap.enabled=!0;return}this.viewShedMap=new YK({context:this._coreMap.scene.context,lightCamera:this._lightCamera,enabled:!0,isPointLight:!0,pointLightRadius:this._distance,cascadesEnabled:!1,size:this._size,softShadows:!0,normalOffset:!1,fromLightSource:!1,visibleAreaColor:this._visibleAreaColor,invisibleAreaColor:this._invisibleAreaColor}),this._earthCtrl.viewShedMapList.push(this.viewShedMap)};var Sx=new te;ew.prototype.drawViewCentrum=function(){let o=this;function A(){let I=o.pyramid._ellipsoid._minimumClock.getValue(),w=o.pyramid._ellipsoid._minimumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Sx.x=Q.x*T*L,Sx.y=Q.y*T*F,Sx.z=Q.z*D;let R=new QD.changeCartesian3ByScalar(o._position,Sx);return[o._position,R]}let f=this._earthCtrl.entities.add({polyline:{positions:new Qn(A,!1),material:this._colorStyle}});this._lineArray.push(f);function m(){let I=o.pyramid._ellipsoid._maximumClock.getValue(),w=o.pyramid._ellipsoid._minimumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Sx.x=Q.x*T*L,Sx.y=Q.y*T*F,Sx.z=Q.z*D;let R=new QD.changeCartesian3ByScalar(o._position,Sx);return[o._position,R]}let C=this._earthCtrl.entities.add({polyline:{positions:new Qn(m,!1),material:this._colorStyle}});this._lineArray.push(C);function y(){let I=o.pyramid._ellipsoid._minimumClock.getValue(),w=o.pyramid._ellipsoid._maximumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Sx.x=Q.x*T*L,Sx.y=Q.y*T*F,Sx.z=Q.z*D;let R=new QD.changeCartesian3ByScalar(o._position,Sx);return[o._position,R]}let x=this._earthCtrl.entities.add({polyline:{positions:new Qn(y,!1),material:this._colorStyle}});this._lineArray.push(x);function v(){let I=o.pyramid._ellipsoid._maximumClock.getValue(),w=o.pyramid._ellipsoid._maximumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Sx.x=Q.x*T*L,Sx.y=Q.y*T*F,Sx.z=Q.z*D;let R=QD.changeCartesian3ByScalar(o._position,Sx);return[o._position,R]}let E=this._earthCtrl.entities.add({polyline:{positions:new Qn(v,!1),material:this._colorStyle}});this._lineArray.push(E)};ew.prototype.updateViewShed=function(){this.show?(this.createLightCamera(),this.setCameraParams(),this.createShadowMap(),this.addVisualPyramid(),this.drawViewCentrum()):this.removeFromMap()};ew.prototype.setCameraParams=function(){this._lightCamera.frustum.near=.1,this._lightCamera.frustum.far=this._distance;let o=qe.toRadians(this._horizontalViewAngle),A=qe.toRadians(this._verticalViewAngle);this._lightCamera.frustum.aspectRatio=Math.tan(o/2)/Math.tan(A/2),o>A?this._lightCamera.frustum.fov=o:this._lightCamera.frustum.fov=A,this._lightCamera.setView({destination:this._position,orientation:{heading:qe.toRadians(this._heading),pitch:qe.toRadians(this._pitch),roll:0}})};var Moe=ew;var bIe=Pi.WGS84;function Uf(o){this._cesiumViewer=o,this.coreMap=o.coreMap,this._scene=this.coreMap.scene,this.loading||this.addLoading(),this._tooltip=LRi(this.coreMap.container)}function QIe(o,A){if(o===null||typeof o!="object"||o.constructor!==Object&&o.constructor!==Array)return o;if(o.constructor===Date||o.constructor===RegExp||o.constructor===Function||o.constructor===String||o.constructor===Number||o.constructor===Boolean)return new o.constructor(o);A=A||new o.constructor;for(let f in o)A[f]=typeof A[f]>"u"?QIe(o[f],null):A[f];return A}function zlt(o,A){let f=QIe(o),m;for(m in A)f[m]===void 0&&(f[m]=QIe(A[m]));return f}function LRi(o){let A=function(f){let m=document.createElement("DIV");m.className="twipsy right";let C=document.createElement("DIV");C.className="twipsy-arrow",m.appendChild(C);let y=document.createElement("DIV");y.className="twipsy-inner",m.appendChild(y),this._div=m,this._title=y,f.appendChild(m)};return A.prototype.setVisible=function(f){this._div.style.display=f?"block":"none"},A.prototype.showAt=function(f,m){f&&m&&(this.setVisible(!0),this._title.innerHTML=m,this._div.style.left=`${f.x+30}px`,this._div.style.top=`${f.y-this._div.clientHeight/2-15}px`)},new A(o)}Uf.prototype.addToolbar=function(o,A){return A=zlt(A,{container:o}),new Uf.Toolbar(this,A)};var Klt={shiftX:0,shiftY:0};Uf.prototype.createBillboardGroup=function(o,A,f){let m=new Uf.BillboardGroup(this,A);return m.addBillboards(o,f),m};Uf.BillboardGroup=function(o,A){this._drawHelper=o,this._scene=o._scene,this._options=zlt(A,Klt);let f=new N_;this._scene.primitives.add(f),this._billboards=f,this._orderedBillboards=[]};Uf.BillboardGroup.prototype.createBillboard=function(o,A){let f=this._billboards.add({show:!0,position:o,pixelOffset:new wt(this._options.shiftX,this._options.shiftY),eyeOffset:new te(0,0,-1e3),horizontalOrigin:cA.CENTER,verticalOrigin:Bn.CENTER,scale:.3,image:Ae(this._options.iconUrl,`${globalThis.GEOWORLD_BASE_URL}Assets/Images/point.png`),color:new ht(1,1,1,1)});if(A){let y=function(v){C.enableRotate=v},x=function(){let v=0;for(let E=m._orderedBillboards.length;v<E&&m._orderedBillboards[v]!==f;++v);return v},m=this,C=this._scene.screenSpaceCameraController;if(A.dragHandlers){let v=this,E=new zr(v._scene.canvas);setListener(f,"leftDown",function(I){function w(M){f.position=M;for(let B=0,T=v._orderedBillboards.length;B<T&&v._orderedBillboards[B]!==f;++B);A.dragHandlers.onDrag&&A.dragHandlers.onDrag(x(),M)}function Q(M){E.destroy(),y(!0),A.dragHandlers.onDragEnd&&A.dragHandlers.onDragEnd(x(),M)}E.setInputAction(function(M){let B=v._scene.camera.pickEllipsoid(M.endPosition,bIe);B?w(B):Q(B)},Yi.MOUSE_MOVE),E.setInputAction(function(M){Q(v._scene.camera.pickEllipsoid(M.position,bIe))},Yi.LEFT_UP),y(!1),A.dragHandlers.onDragStart&&A.dragHandlers.onDragStart(x(),v._scene.camera.pickEllipsoid(I,bIe))})}A.onDoubleClick&&setListener(f,"leftDoubleClick",function(v){A.onDoubleClick(x())}),A.onClick&&setListener(f,"leftClick",function(v){A.onClick(x())}),A.tooltip&&(setListener(f,"mouseMove",function(v){m._drawHelper._tooltip.showAt(v,A.tooltip())}),setListener(f,"mouseOut",function(v){m._drawHelper._tooltip.setVisible(!1)}))}return f};Uf.BillboardGroup.prototype.insertBillboard=function(o,A,f){this._orderedBillboards.splice(o,0,this.createBillboard(A,f))};Uf.BillboardGroup.prototype.addBillboard=function(o,A){this._orderedBillboards.push(this.createBillboard(o,A))};Uf.BillboardGroup.prototype.addBillboards=function(o,A){let f=0;for(;f<o.length;f++)this.addBillboard(o[f],A)};Uf.BillboardGroup.prototype.updateBillboardsPositions=function(o){let A=0;for(;A<o.length;A++)this.getBillboard(A).position=o[A]};Uf.BillboardGroup.prototype.countBillboards=function(){return this._orderedBillboards.length};Uf.BillboardGroup.prototype.getBillboard=function(o){return this._orderedBillboards[o]};Uf.BillboardGroup.prototype.removeBillboard=function(o){this._billboards.remove(this.getBillboard(o)),this._orderedBillboards.splice(o,1)};Uf.BillboardGroup.prototype.remove=function(){this._billboards=this._billboards&&this._billboards.removeAll()&&this._billboards.destroy()};Uf.BillboardGroup.prototype.setOnTop=function(){this._scene.primitives.raiseToTop(this._billboards)};Uf.prototype.cleanUp=function(){this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._markers!==void 0&&(this._markers.remove(),this._markers=void 0),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._tooltip.setVisible(!1)};Uf.prototype.startDrawing=function(o){let A=this,f=this._scene;f.globe.depthTestAgainstTerrain=!0;let m=this._tooltip,C=3,y=[],x=[],v;this._positions=x;let E=new zr(f.canvas);this._mouseHandler=E;let I=new Uf.BillboardGroup(this,Klt);this._markers=I,this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),E.setInputAction(function(Q){if(Q.position!==null){let M=f.camera.getPickRay(Q.position),B=f.globe.pick(M,f),T=$t.fromCartesian(B),D=qe.toDegrees(T.longitude),F=qe.toDegrees(T.latitude);if(B){if(y.length===0&&(y.push(D,F),x.push(B),v=B,I.addBillboard(v)),x.length>=4){let L=ml.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,v);if(L!==void 0){let R=L.x-Q.position.x,k=L.y-Q.position.y;if(R*R+k*k<16){y.splice(y.length-2,2),x.pop(),this.isLoading(!0),this.stopDrawing(o);return}}}y.push(D,F),x.push(B),I.addBillboard(B),x.length===C&&(A._prevEntity=A._cesiumViewer.factory.createElement({type:"polygon",parameters:{hierarchy:te.fromDegreesArray(y),material:ht.RED.withAlpha(.6),fill:!0}}),A._prevEntity.polygon.hierarchy=w())}}}.bind(this),Yi.LEFT_CLICK),E.setInputAction(function(Q){let M=Q.endPosition;if(M!==null)if(x.length===0)m.showAt(M,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let B=f.camera.getPickRay(M),T=f.globe.pick(B,f),D=$t.fromCartesian(T),F=qe.toDegrees(D.longitude),L=qe.toDegrees(D.latitude);if(T&&(y.splice(y.length-2,2),x.pop(),y.push(F,L),x.push(T),I.getBillboard(x.length-1).position=T,m.showAt(M,"\u53CC\u51FB\u7ED3\u675F\u7ED8\u5236"),x.length>=3&&x.length>=4)){let R=ml.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,v);if(R!==void 0){let k=R.x-M.x,G=R.y-M.y;k*k+G*G<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}.bind(this),Yi.MOUSE_MOVE),E.setInputAction(function(Q){x.length<C+2||(this.isLoading(!0),setTimeout(()=>{this.stopDrawing(o)},100))}.bind(this),Yi.LEFT_DOUBLE_CLICK);function w(){return te.fromDegreesArray(y)}};Uf.prototype.stopDrawing=function(o){this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._markers!==void 0&&(this._markers.remove(),this._markers=void 0),this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._tooltip.setVisible(!1),document.body.style.cursor="wait";let A=this.computeCutVolume(),f=A.maxHeight;document.body.style.cursor="default",typeof o=="function"&&o(A.volume);let m={polygon:{hierarchy:{positions:this._positions},extrudedHeight:f,closeTop:!1,closeBottom:!1,material:ht.RED.withAlpha(.5),outline:!0,outlineColor:ht.WHITE,outlineWidth:2}};this._prevEntity=this._cesiumViewer.entities.add(m),this.isLoading(!1)};Uf.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`,o.appendChild(A),this.loading=o,this.coreMap.container.appendChild(o)};Uf.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};Uf.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};function FRi(o){let A=[],f=[];for(let Q=0;Q<o.length;Q++){let M=$t.fromCartesian(o[Q]);A.push(M.longitude),f.push(M.latitude)}let m=0,C=0,y=0,x=0,v=0,E=0,I=0,w=0;for(let Q=0;Q<o.length;Q++)m=A[Q],C=f[Q],Q===o.length-1?(y=A[0],x=f[0]):(y=A[Q+1],x=f[Q+1]),E=m*x-y*C,v+=E,I+=(m+y)*E,w+=(C+x)*E;return v*=.5,I/=6*v,w/=6*v,new $t(I,w)}function NRi(o,A,f){let m=te.distance(o,A),C=te.distance(A,f),y=te.distance(f,o),x=(m+C+y)/2;return Math.sqrt(x*(x-m)*(x-C)*(x-y))}Uf.prototype.computeCutVolume=function(){let o=15e3;for(let k=0;k<this._positions.length;k++){let G=$t.fromCartesian(this._positions[k]),V=this._scene.globe.getHeight(G);o>V&&(o=V)}let A=Math.PI/Math.pow(2,11);A=A/64;let f=new Id.fromPositions({positions:this._positions,vertexFormat:Ya.FLAT_VERTEX_FORMAT,granularity:A}),m=new Id.createGeometry(f),C=0,y=0,x,v,E,I,w,Q,M,B,T,D,F,L;for(let k=0;k<m.indices.length;k+=3)x=m.indices[k],v=m.indices[k+1],E=m.indices[k+2],D=new te(m.attributes.position.values[x*3],m.attributes.position.values[x*3+1],m.attributes.position.values[x*3+2]),F=$t.fromCartesian(D),I=this._scene.globe.getHeight(F),M=te.fromRadians(F.longitude,F.latitude,0),y<I&&(y=I),D=new te(m.attributes.position.values[v*3],m.attributes.position.values[v*3+1],m.attributes.position.values[v*3+2]),F=$t.fromCartesian(D),w=this._scene.globe.getHeight(F),B=te.fromRadians(F.longitude,F.latitude,0),y<w&&(y=w),D=new te(m.attributes.position.values[E*3],m.attributes.position.values[E*3+1],m.attributes.position.values[E*3+2]),F=$t.fromCartesian(D),Q=this._scene.globe.getHeight(F),T=te.fromRadians(F.longitude,F.latitude,0),y<Q&&(y=Q),L=NRi(M,B,T),C=C+L*(I-o+w-o+Q-o)/3;let R=FRi(this._positions);return this._volumeLabel=this._cesiumViewer.entities.add({position:te.fromRadians(R.longitude,R.latitude,y+1e3),label:{text:`${C.toFixed(4)}\u7ACB\u65B9\u7C73`}}),{maxHeight:y,volume:C}};var Poe=Uf;function Ylt(o,A){if(this.mEarthCtrl=o,this._parameter=A,this.coreMap=o.coreMap,this._color=Ae(A.color,new ht(1,0,0,.7)),this._positions=A.positions,this._positions.length<3)throw new Hi("invalid positions length!");this._duration=Ae(A.duration,4e3),this._minHeight=Ae(A.minHeight,0),this._maxHeight=Ae(A.maxHeight,100),this._image=A.image,this._pps=null}function kRi(o,A){let f=$t.fromCartesian(o[0]),m=f.longitude,C=f.latitude,y=m,x=C,v=A;for(let E=1;E<o.length;E++){let I=$t.fromCartesian(o[E]);m>I.longitude?m=I.longitude:y<I.longitude&&(y=I.longitude),C>I.latitude?C=I.latitude:x<I.latitude&&(x=I.latitude)}return new te.fromRadians((m+y)/2,(C+x)/2,v)}function ORi(o){if(O(o._pps))return;let A=kRi(o._positions,o._minHeight),f=$t.fromCartesian(A),m=new oi(A.x,A.y,A.z,1),C=new $t(f.longitude,f.latitude,o.maxHeight+100),y=$t.toCartesian(C),x=new oi(y.x,y.y,y.z,1),v=new oi,E=new oi,I=new te,w=o.mEarthCtrl.coreMap.scene.camera,Q=o._positions.length;o._pps=new wa({fragmentShader:GRi(Q),uniforms:{u_floodCenterEC:function(){return Ze.multiplyByVector(w._viewMatrix,m,v)},u_floodPlaneNormalEC:function(){let B=Ze.multiplyByVector(w._viewMatrix,m,v),T=Ze.multiplyByVector(w._viewMatrix,x,E);return I.x=T.x-B.x,I.y=T.y-B.y,I.z=T.z-B.z,te.normalize(I,I),I},u_floodRange:function(){return o._positions},u_minHeight:function(){return o._minHeight},u_maxHeight:function(){return o._maxHeight},u_image:function(){return o.image},u_floodColor:function(){return o._color},u_positionsLength:function(){return o._positions.length}}}),o.mEarthCtrl.coreMap.scene.postProcessStages.add(o._pps)}function URi(o){O(o._pps)&&(o.mEarthCtrl.coreMap.scene.postProcessStages.remove(o._pps),o._pps=null)}function GRi(o){return`uniform sampler2D colorTexture;
            `})};u8.prototype.destroy=function(){this._tileset.customShader===this._customShader&&(this._customShader=void 0,this._tileset.customShader=void 0),this._scene.preUpdate.removeEventListener(this._preUpdate)};function tRi(){this.customShaders={},this.customShaders.lightLine=u8}var Blt=tRi;function UH(o,A){this.options=Ae(A,{}),this.earthCtrl=o,this.viewer=o.coreMap,this.CSME=pme,this.Cust=new this.CSME.CustomShaderStage(this.options.primitive,A),this.stageArr=[],this.eventListener=null,this.eventListener=this.viewer.scene.preUpdate.addEventListener(()=>{this.Cust.update()}),this.create()}UH.prototype.create=function(o){let A=this,f=null;o?f=o:f=A.options,f.lineMaterialStage&&(A.LineMaterialStage=new A.CSME.LineMaterialStage(Ae(f.lineMaterialStage,{weight:.5})),A.Cust.addStage(A.LineMaterialStage),A.stageArr.push(A.LineMaterialStage)),f.gradientMaterialStage&&(A.GradientMaterialStage=new A.CSME.GradientMaterialStage(Ae(f.gradientMaterialStage,{weight:.5})),A.Cust.addStage(A.GradientMaterialStage),A.stageArr.push(A.GradientMaterialStage)),f.normalizeMaterialStage&&(A.NormalizeMaterialStage=new A.CSME.NormalizeMaterialStage(Ae(f.normalizeMaterialStage,{weight:.5})),A.Cust.addStage(A.NormalizeMaterialStage),A.stageArr.push(A.NormalizeMaterialStage)),f.dynamicColorMaterialStage&&(A.DynamicColorMaterialStage=new A.CSME.DynamicColorMaterialStage(Ae(f.dynamicColorMaterialStage,{weight:.5})),A.Cust.addStage(A.DynamicColorMaterialStage),A.stageArr.push(A.DynamicColorMaterialStage)),f.reflectMaterialStage&&(A.ReflectMaterialStage=new A.CSME.ReflectMaterialStage(Ae(f.reflectMaterialStage,{weight:.5})),A.Cust.addStage(A.ReflectMaterialStage),A.stageArr.push(A.ReflectMaterialStage)),f.textureMaterialStage&&(A.TextureMaterialStage=new A.CSME.TextureMaterialStage(Ae(f.textureMaterialStage,{weight:.5,url:`${globalThis.GEOWORLD_BASE_URL}Assets/Textures/window.png`})),A.Cust.addStage(A.TextureMaterialStage),A.stageArr.push(A.TextureMaterialStage))};UH.prototype.addStage=function(o){let A=this;A.Cust.addStage(o),A.stageArr.push(o)};UH.prototype.removeStage=function(o){this.Cust.removeStage(o.name)};UH.prototype.update=function(){let o=this;o.viewer.scene.preUpdate.removeEventListener(o.eventListener),o.eventListener=o.viewer.scene.preUpdate.addEventListener(()=>{o.Cust.update()})};UH.prototype.removeFromMap=function(){let o=this;for(let A=0;A<o.stageArr.length;A++)o.removeStage(o.stageArr[A]);o.viewer.scene.preUpdate.removeEventListener(o.eventListener),o.eventListener=null};var wlt=UH;function boe(o,A={}){this._earthCtrl=o,this._edgeStage=null,this._options=A,this._options.visibleEdgeColor=Ae(A.visibleEdgeColor,ht.fromCssColorString("#101010")),this._options.outlineWidth=Ae(A.outlineWidth,1),this._options.thresholdAngle=Ae(A.thresholdAngle,12*Math.PI/180),this.add()}boe.prototype.add=function(){this._edgeStage=oY();let o=this._edgeStage;o.visibleEdgeColor=this._options.visibleEdgeColor,o.outlineWidth=this._options.outlineWidth,o.thresholdAngle=this._options.thresholdAngle,o.selected=[{},{}],o.enabled=!0,this._earthCtrl.Viewer.postProcessStages.add(o)};boe.prototype.removeFromMap=function(){this._edgeStage&&(this._earthCtrl.Viewer.postProcessStages.remove(this._edgeStage),this.__edgeStage=null)};Object.defineProperties(boe.prototype,{show:{get:function(){return this._edgeStage.show},set:function(o){this._edgeStage.show=o}},outlineWidth:{get:function(){return this._edgeStage.outlineWidth},set:function(o){this._edgeStage.outlineWidth=o}},thresholdAngle:{get:function(){return this._edgeStage.thresholdAngle},set:function(o){!o||(this._edgeStage.thresholdAngle=o)}},visibleEdgeColor:{get:function(){return this._edgeStage.visibleEdgeColor},set:function(o){!o||(this._edgeStage.visibleEdgeColor=o)}},hiddenEdgeColor:{get:function(){return this._edgeStage.hiddenEdgeColor},set:function(o){!o||(this._edgeStage.hiddenEdgeColor=o)}},showGlow:{get:function(){return this._edgeStage.showGlow},set:function(o){this._edgeStage.showGlow=o}},edgeGlow:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeStrength:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeOnly:{get:function(){return this._edgeStage.edgeOnly},set:function(o){this._edgeStage.edgeOnly=o}}});var blt=boe;function Qoe(o,A={}){this._earthCtrl=o,this._edgeStage=null,this._options=A,this._visibleEdgeColor=Ae(A.visibleEdgeColor,ht.fromCssColorString("#ff0000")),this._hiddenEdgeColor=Ae(A.hiddenEdgeColor,ht.fromCssColorString("#4d4d4d")),this.handler=null,this.key=Ae(A.key,"id"),this.model=Ae(A.model,null),this.add()}Qoe.prototype.add=function(){let o=this,A="";this._edgeStage=oY(!0);let f=this._edgeStage;f.visibleEdgeColor=this._visibleEdgeColor,f.hiddenEdgeColor=this._hiddenEdgeColor,f.selected=[],f.enabled=!1,this._earthCtrl.Viewer.postProcessStages.add(f);function m(C,y){function x(E,I){let w=E.featuresLength;for(let Q=0;Q<w;++Q){let M=E.getFeature(Q);if(M.getProperty(o.key)===A){let T={pickId:M.pickId};y.selected=[T],y.enabled=!0}}}function v(E,I){let w=E.content,Q=w.innerContents;if(O(Q)){let M=Q.length;for(let B=0;B<M;++B)x(Q[B],I)}else x(w,I)}C.tileVisible.addEventListener(function(E){A!==""&&v(E,null)})}m(this.model,f),this.handler=new zr(this._earthCtrl.coreMap.scene.canvas),this.handler.setInputAction(function(C){let y=o._earthCtrl.coreMap.scene.pick(C.position);if(f.selected=[],A="",!y||!y.primitive)return;let v=y.primitive._pickIds,I={pickId:y.pickId};f.selected=[I],f.enabled=!0,A=y.getProperty(o.key)},Yi.LEFT_CLICK)};Qoe.prototype.removeFromMap=function(){this.handler&&(this.handler.destroy(),this.handler=void 0),this._edgeStage&&this._earthCtrl.Viewer.postProcessStages.remove(this._edgeStage)};Object.defineProperties(Qoe.prototype,{showGlow:{get:function(){return this._edgeStage.showGlow},set:function(o){this._edgeStage.showGlow=o}},edgeGlow:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeStrength:{get:function(){return this._edgeStage.edgeGlow},set:function(o){this._edgeStage.edgeGlow=o}},edgeOnly:{get:function(){return this._edgeStage.edgeOnly},set:function(o){this._edgeStage.edgeOnly=o}}});var Qlt=Qoe;function Hs(o){this._earthCtrl=o,this._coreMap=o.coreMap}function Qx(){return((1+qe.nextRandomNumber())*65536|0).toString(16).substring(1)}Hs.createUUID=function(){return`${Qx()+Qx()}-${Qx()}-${Qx()}-${Qx()}-${Qx()}${Qx()}${Qx()}`};Hs.createUUIDWithoutDash=function(){return Qx()+Qx()+Qx()+Qx()+Qx()+Qx()+Qx()+Qx()};Hs.prototype.createUUID=function(){return Hs.createUUID()};Hs.prototype.createGroup=function(o){let A=new a8;return A.id=o.id||Hs.createUUID(),A.name=o.name||"\u672A\u547D\u540D\u7EC4",A};Hs.prototype.createImageryLayer=function(o,A){let f=new doe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.IMAGERYPROVIDERS),f),f};Hs.prototype.createTerrainLayer=function(o,A){let f=new goe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.TERRAINPROVIDERS),f),f};Hs.prototype.removeTerrainLayer=function(o){this._coreMap.terrainProvider=new HF({})};Hs.prototype.createFeatureLayer=function(o,A){let f=new yoe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.FEATURELAYERS),f),f};Hs.prototype.createModelLayer=function(o,A){let f=new moe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.MODELLAYERS),f),f};Hs.prototype.createWfsModel=function(o,A){let f=new CK(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.MODELLAYERS),f),f};Hs.prototype.createModel=function(o,A){let f=new Kne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.removeModel=function(o){O(o)&&o.removeFromMap()};Hs.prototype.createCZMLObject=function(o,A){let f=this,m=Ae(o.addToMap,!0),C=new Fie(o.name);return C.load(o.url),m&&f._earthCtrl.dataSources.add(C),C.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,C):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),C),C};Hs.prototype.createElement=function(o){let A={};return A[o.type]=o.parameters,O(o.name)&&(A.name=o.name),O(o.position)&&(A.position=o.position),this._earthCtrl.entities.add(A)};Hs.prototype.removeElement=function(o){O(o)?this._earthCtrl.entities.remove(o):this._earthCtrl.entities.removeAll()};Hs.prototype.createVideoProjection=function(o,A){o.addToMap=Ae(o.addToMap,!0);let f=Ae(o.sourceType,"perspective"),m=null;return f==="perspective"?(m=new Sne(this._earthCtrl,o),m.initialize(o),m.name=o.name,A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),m)):f==="panorama"?(m=new olt(this._earthCtrl,o),m.initialize(o),m.name=o.name,m.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),m)):f==="fisheye"&&(m=new Dne(this._earthCtrl,o),m.initialize(o),m.name=o.name,m.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,m):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),m)),m};Hs.prototype.createTrack=function(o,A){let f=new alt(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.initialize(o),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createSceneNode=function(o,A,f){let m=new a8(this._earthCtrl);return m.id=o,m.name=A,m.label=f,m};Hs.prototype.createFire=function(o,A){let f=new Pne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createSmoke=function(o,A){let f=new Lne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createExplosion=function(o,A){let f=new Nne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createFireworks=function(o,A){let f=new One(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createRadarScan=function(o,A){let f=new Gne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createCircleScan=function(o,A){let f=new glt(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createUpDownScan=function(o){let A=new mlt(this._earthCtrl,o);return A.show=!0,A};Hs.prototype.createWaters=function(o,A){let f=new Ioe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),f.show=!0,A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createHeatmap=function(o,A){let f=clt.create(this._earthCtrl,o.bbox,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createLabel=function(o,A){let f=new Jne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createBillboard=function(o,A){let f=new Vne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPolyline=function(o,A){let f=new jne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPolygon=function(o,A){let f=new Xne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPoint=function(o,A){let f=new $ne(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createBox=function(o,A){let f=new toe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createEllipsoid=function(o,A){let f=new ooe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createCylinder=function(o,A){let f=new roe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createRectangle=function(o,A){let f=new soe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createEllipse=function(o,A){let f=new uoe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPolylineVolume=function(o,A){let f=new Aoe(this._earthCtrl,o);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createEChartLayer=function(o,A){let f=new voe(this._earthCtrl);return f.name=o.name,f.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&f.addToMap(o),A?this._earthCtrl.userScene.addChild(A,f):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(Zs.USERSCENE),f),f};Hs.prototype.createPointLight=function(o){return new ylt(this._earthCtrl,o)};Hs.prototype.createHawkeye=function(o){let A=new _oe(this._earthCtrl,o);A.name=o.name,A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),Ae(o.addToMap,!0)&&A.addToMap(o)};Hs.prototype.createSpotLight=function(o){let A=new woe(this._earthCtrl.coreMap,o.entities,o.lights);return A.name=o.name,A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};Hs.prototype.createCustomShaderManager=function(o){let A=new Blt;return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};Hs.prototype.createCustomShaderStage=function(o){let A=new wlt(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};Hs.prototype.createModelOutline=function(o={}){let A=new blt(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};Hs.prototype.modelClick=function(o={}){let A=new Qlt(this._earthCtrl,o);return A.name=Ae(o.name,null),A.id=Ae(o.id,this._earthCtrl.factory.createUUID()),A};var t2=Hs;var Soe=class extends n0{constructor(A,f){super(A),this._objectMap={},this._rootNode=null,this._isBenchUpdate=!1,this._selectSet=new Qne(A);let m=new a8(A);m.id=t2.createUUID(),m.name=Ae(f.ProjectName,"root"),m.version=Ae(f.version,null),m.desc=Ae(f.desc,null),m.createTime=Ae(f.createTime,new Date().toISOString()),m.lastUpdate=Ae(f.lastUpdate,null),m.show=!0,this._rootNode=m,this._editNode=m,this._objectMap[m.id]=m,this._EventDocumentChanged=new $F("EventDocumentChanged")}finalize(){this._rootNode=null,this._objectMap={}}getChildById(A){return this._objectMap.hasOwnProperty(A)?this._objectMap[A]:null}addChild(A,f){A.addChild(f),this._objectMap[f.id]=f,this._isBenchUpdate||this.commitChanged()}removeChildById(A){let f=this._objectMap[A];O(f)&&this.removeChild(f)}removeChild(A){O(A)&&O(A.parentNode)&&(A.removeFromMap(),A.parentNode.removeChild(A)),delete this._objectMap[A.id],this._isBenchUpdate||this.commitChanged()}removeAll(){}beginUpdate(){this._isBenchUpdate=!0}endUpdate(){this._isBenchUpdate&&(this.commitChanged(),this._isBenchUpdate=!1)}commitChanged(){this._EventDocumentChanged.notifyEvent(this)}flyTo(A,f){O(A)&&O(A._primitive)&&(A=A._primitive),this._earthCtrl.coreMap.flyTo(A,f)}findLocationByID(A,f){if(!A)return;let m=this.getChildById(A);O(m)&&O(m._primitive)&&(m=m._primitive),this._earthCtrl.coreMap.flyTo(m,f)}moveLayer(A,f){let m=this.getChildById(A),C=null;for(let y=0;y<m.parentNode.childNodes.length;y++)m.parentNode.childNodes[y].id===m.id&&(C=y);f==="up"?(this._earthCtrl.coreMap.scene.imageryLayers.raise(m._primitive),this.changeLayer(m.parentNode.childNodes,C,C+1)):f==="down"&&(this._earthCtrl.coreMap.scene.imageryLayers.lower(m._primitive),this.changeLayer(m.parentNode.childNodes,C,C-1))}changeLayer(A,f,m){if(f=qe.clamp(f,0,A.length-1),m=qe.clamp(m,0,A.length-1),f===m)return;let C=A[f];A[f]=A[m],A[m]=C}outputJson(A){let f=this;new Promise(function(C,y){let x={IMAGERYPROVIDERS:"imageryProviders",TERRAINPROVIDERS:"terrainProviders",MODELLAYERS:"modelLayers",FEATURELAYERS:"featureLayers",USERSCENE:"userScene"},v=0,E=[];for(let I in x){let w=x[I],Q=f.rootNode.getChildByName(w);if(!Q)continue;let M=[];if(Q.childNodes.length===0)M=[];else for(let B=0;B<Q.childNodes.length;B++){let T=Q.childNodes[B].toJSON();M.push(T)}Promise.all(M).then(function(B){let T=[];if(B.length!==0){for(let L=0;L<B.length;L++)T.push(B[L]);let D=T[0].class;D!=="IMAGERY_LAYER"&&D!=="TERRAIN_LAYER"&&D!=="MODEL_LAYER"&&D!=="FEATURE_LAYER"&&(D="USER_SCENE");let F={item:D,objJson:T};E.push(F)}v++,v===5&&(C(E),v=0)})}}).then(function(C){let y={version:f.rootNode.version,projectName:f.rootNode.name,desc:f.rootNode.desc,createTime:f.rootNode.createTime,lastUpdate:new Date().toISOString(),imageryProviders:[],terrainProviders:[],modelLayers:[],featureLayers:[],userScene:[]};for(let w=0;w<C.length;w++)C[w].item==="IMAGERY_LAYER"&&(y.imageryProviders=C[w].objJson),C[w].item==="TERRAIN_LAYER"&&(y.terrainProviders=C[w].objJson),C[w].item==="MODEL_LAYER"&&(y.modelLayers=C[w].objJson),C[w].item==="FEATURE_LAYER"&&(y.featureLayers=C[w].objJson),C[w].item==="USER_SCENE"&&(y.userScene=C[w].objJson);let x={class:"ENVIRONMENT",underGround:Ae(f._earthCtrl.camera.undergroundMode,null),shadow:Ae(f._earthCtrl.shadows,null),depthTest:Ae(f._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain,null),rain:Ae(f._earthCtrl.environment.rain.show,null),snow:Ae(f._earthCtrl.environment.snow.show,null),fog:Ae(f._earthCtrl.environment.fog.show,null),bwMode:Ae(f._earthCtrl.environment.bwMode.show,null),nightMode:Ae(f._earthCtrl.environment.nightMode.show,null),colorAdjustment:{show:Ae(f._earthCtrl.environment.colorAdjustment.show,null),contrast:Ae(f._earthCtrl.environment.colorAdjustment.contrast,null),saturation:Ae(f._earthCtrl.environment.colorAdjustment.saturation,null),brightness:Ae(f._earthCtrl.environment.colorAdjustment.brightness,null)}},v={class:"SKYBOX",positiveX:Ae(f._earthCtrl.environment.SkyBoxSource.positiveX,null),negativeX:Ae(f._earthCtrl.environment.SkyBoxSource.negativeX,null),positiveY:Ae(f._earthCtrl.environment.SkyBoxSource.positiveY,null),negativeY:Ae(f._earthCtrl.environment.SkyBoxSource.negativeY,null),positiveZ:Ae(f._earthCtrl.environment.SkyBoxSource.positiveZ,null),negativeZ:Ae(f._earthCtrl.environment.SkyBoxSource.negativeZ,null)},E={class:"VIEWPOINT",lon:f._earthCtrl.camera.viewPoint.lon,lat:f._earthCtrl.camera.viewPoint.lat,alt:f._earthCtrl.camera.viewPoint.alt,heading:f._earthCtrl.camera.viewPoint.heading,pitch:f._earthCtrl.camera.viewPoint.pitch,roll:f._earthCtrl.camera.viewPoint.roll,duration:f._earthCtrl.camera.viewPoint.duration};y.userScene.push(x),y.userScene.push(v),y.userScene.push(E);let I=JSON.stringify(y);A&&A(I)})}};Object.defineProperties(Soe.prototype,{rootNode:{get:function(){return this._rootNode},set:function(o){this._rootNode=o}},editNode:{get:function(){return this._editNode},set:function(o){this._editNode=o}},selectSet:{get:function(){return this._selectSet}},EventDocumentChanged:{get:function(){return this._EventDocumentChanged}},EventObjectPropertyChanged:{get:function(){return this._EventObjectPropertyChanged}}});var Doe=Soe;function Slt(o){this._earthCtrl=o,this._coreMap=o.coreMap,this.initialize()}var w6i=new Es,b6i=new te,Q6i=new te;Slt.prototype.initialize=function(){let o=document.createElement("div");o.className="map-info-bar",o.style="position: display:none; absolute;left: 0px;bottom:0px;width: 100%;background:rgba(0,0,0,0.4); color:#e9e9e9; text-shadow:2px 2px 2px #000";let A=this._coreMap;A.container.appendChild(o);let f="float: right; min-width: 100px;margin-right: 20px;",m=document.createElement("div");m.style=f,o.appendChild(m);let C=document.createElement("div");C.style=f,o.appendChild(C);let y=document.createElement("div");y.style=f,o.appendChild(y);let x=A.scene.canvas,v=A.scene.globe.ellipsoid;new zr(x).setInputAction(function(I){let w=A.camera.pickEllipsoid(I.endPosition,v);if(w){let Q=A.scene.globe.ellipsoid.cartesianToCartographic(w),M=qe.toDegrees(Q.latitude).toFixed(6),B=qe.toDegrees(Q.longitude).toFixed(6),T=A.camera.positionCartographic.height.toFixed(1);y.innerHTML=`\u7ECF\u5EA6\uFF1A${B}`,C.innerHTML=`\u7EAC\u5EA6\uFF1A${M}`,m.innerHTML=`\u89C6\u70B9\u9AD8\uFF1A${T}\u7C73`}},Yi.MOUSE_MOVE)};var Dlt=Slt;function cu(){}cu.parseBaseData=function(o,A){let f=[];if(O(A)&&O(A.imageryProviders))for(let C=0;C<A.imageryProviders.length;C++){let y=A.imageryProviders[C];if(y.enable===!1||y.show===!1)continue;if(O(y.tilingScheme)){let v=y.tilingScheme;v.type==="GeographicTilingScheme"&&(y.tilingScheme=new mg(v))}let x=t2.createImageryLayer(y);f.push(x)}let m=[];if(O(A)&&O(A.terrainProviders))for(let C=0;C<A.terrainProviders.length;C++){let y=A.terrainProviders[C];if(y.enable===!1||y.show===!1)continue;let x=t2.createTerrainLayer(y);m.push(x)}return{imageryProvider:f,terrainProvider:m}};cu.parse=function(o,A){if(!O(A))return;let f=[Zs.IMAGERYPROVIDERS,Zs.TERRAINPROVIDERS,Zs.MODELLAYERS,Zs.FEATURELAYERS,Zs.USERSCENE];for(let m=0;m<f.length;m++){let C=o.factory.createSceneNode(t2.createUUID(),f[m]);C.show=!0,o.userScene.addChild(o.userScene.rootNode,C)}O(A[Zs.IMAGERYPROVIDERS])&&GH(o,A[Zs.IMAGERYPROVIDERS],o.userScene.rootNode.getChildByIndex(0),0),O(A[Zs.TERRAINPROVIDERS])&&GH(o,A[Zs.TERRAINPROVIDERS],o.userScene.rootNode.getChildByIndex(1),1),O(A[Zs.MODELLAYERS])&&GH(o,A[Zs.MODELLAYERS],o.userScene.rootNode.getChildByIndex(2)),O(A[Zs.FEATURELAYERS])&&GH(o,A[Zs.FEATURELAYERS],o.userScene.rootNode.getChildByIndex(3)),O(A[Zs.USERSCENE])&&GH(o,A[Zs.USERSCENE],o.userScene.rootNode.getChildByIndex(4))};function GH(o,A,f,m){for(let C=0;C<A.length;C++){let y=A[C],x=null;if(y.enable===!1)continue;O(y.class)?(y.class==="IMAGERY"&&(y.class=vo.IMAGERY_LAYER),y.class==="TERRAIN"&&(y.class=vo.TERRAIN_LAYER),x=y.class):(m===0?y.class=vo.IMAGERY_LAYER:m===1&&(y.class=vo.TERRAIN_LAYER),x=y.class);let v=cu.parserMap[x];v!==void 0&&v(o,y,f)}}function iRi(o,A,f){let m=o.factory.createSceneNode(A.id,A.name);m.show=Ae(A.show,!0),o.userScene.addChild(f,m),O(A.childNodes)&&GH(o,A.childNodes,m)}function rRi(o,A,f){let m=A;if(O(m.tilingScheme)){let C=m.tilingScheme;C.type==="GeographicTilingScheme"&&(m.tilingScheme=new mg(C))}o.factory.createImageryLayer(m,f)}function nRi(o,A,f){let m=A;o.factory.createTerrainLayer(m,f)}function oRi(o,A,f){let m=A;m.addToMap=!0;let C=m.sourceType;C==="3DTiles"||C==="b3dm"||C==="osgb"||C==="s3m"||C==="ude_block"||C==="ude_model"?o.factory.createModelLayer(m,f):C==="czml"?o.factory.createCZMLObject(m,f):C==="wfsModel"&&o.factory.createWfsModel(m,f)}function aRi(o,A,f){let m=o.factory.createFeatureLayer(A,f)}function sRi(o,A,f){o.coreMap.scene.skyBox=new Y5({sources:{positiveX:A.positiveX,negativeX:A.negativeX,positiveY:A.positiveY,negativeY:A.negativeY,positiveZ:A.positiveZ,negativeZ:A.negativeZ}})}function lRi(o,A,f){o.camera.undergroundMode=Ae(A.underGround,!1),o.shadows=Ae(A.shadow,!1),A.rain===!0&&o.environment.showEffect("rain"),A.snow===!0&&o.environment.showEffect("snow"),A.fog===!0&&o.environment.showEffect("fog"),o.coreMap.scene.globe.depthTestAgainstTerrain=Ae(A.depthTest,!1),A.bwMode===!0&&o.environment.showEffect("bwMode"),A.nightMode===!0&&o.environment.showEffect("nightMode"),A.colorAdjustment.show===!0&&(o.environment.showEffect("colorAdjustment"),o.environment.colorAdjustment.contrast=A.colorAdjustment.contrast,o.environment.colorAdjustment.saturation=A.colorAdjustment.saturation,o.environment.colorAdjustment.brightness=A.colorAdjustment.brightness)}function uRi(o,A,f){o.camera.viewPoint=A,o.camera.flyTo(A.lon,A.lat,A.alt,A.heading,A.pitch,A.roll,A.duration)}function cRi(o,A,f){o.factory.createModel(A,f)}function ARi(o,A,f){o.factory.createWaters(A,f)}function hRi(o,A,f){o.factory.createExplosion(A,f)}function dRi(o,A,f){o.factory.createFireworks(A,f)}function fRi(o,A,f){o.factory.createSmoke(A,f)}function gRi(o,A,f){o.factory.createFire(A,f)}function pRi(o,A,f){A.color&&(A.color=new ht(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createRadarScan(A,f)}function mRi(o,A,f){A.color&&(A.color=new ht(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createCircleScan(A,f)}function CRi(o,A,f){A.color&&(A.color=new ht(A.color.red,A.color.green,A.color.blue,A.color.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.color.red,A.color.green,A.color.blue,A.color.alpha)),o.factory.createPoint(A,f)}function yRi(o,A,f){A.fillColor&&(A.fillColor=new ht(A.fillColor.red,A.fillColor.green,A.fillColor.blue,A.fillColor.alpha)),o.factory.createLabel(A,f)}function xRi(o,A,f){o.factory.createBillboard(A,f)}function vRi(o,A,f){A.positions&&(A.positions=cu.array2DtoMercator(A.positions)),A.lineColor&&(A.lineColor=new ht(A.lineColor.red,A.lineColor.green,A.lineColor.blue,A.lineColor.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),o.factory.createPolyline(A,f)}function ERi(o,A,f){A.material&&(A.material=new ht(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.positions&&(A.positions=cu.array2DtoMercator(A.positions)),o.factory.createPolygon(A,f)}function IRi(o,A,f){A.coordinates&&(A.coordinates=Di.fromDegrees(A.coordinates[0],A.coordinates[1],A.coordinates[2],A.coordinates[3])),A.fillColor&&(A.fillColor=new ht(A.fillColor.red,A.fillColor.green,A.fillColor.blue,A.fillColor.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),o.factory.createRectangle(A,f)}function _Ri(o,A,f){o.factory.createEllipse(A,f)}function BRi(o,A,f){A.material&&(A.material=new ht(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=te.fromDegrees(A.position[0],A.position[1],A.position[2])),A.dimensions&&(A.dimensions=new te(A.dimensions.x,A.dimensions.y,A.dimensions.z)),o.factory.createBox(A,f)}function wRi(o,A,f){A.material&&(A.material=new ht(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=te.fromDegrees(A.position[0],A.position[1],A.position[2])),A.radii&&(A.radii=new te(A.radii[0],A.radii[1],A.radii[2])),o.factory.createEllipsoid(A,f)}function bRi(o,A,f){A.material&&(A.material=new ht(A.material.red,A.material.green,A.material.blue,A.material.alpha)),A.outlineColor&&(A.outlineColor=new ht(A.outlineColor.red,A.outlineColor.green,A.outlineColor.blue,A.outlineColor.alpha)),A.position&&(A.position=te.fromDegrees(A.position[0],A.position[1],A.position[2])),o.factory.createCylinder(A,f)}function QRi(o,A,f){o.factory.createPolylineVolume(A,f)}function SRi(o,A,f){o.factory.createVideoProjection(A,f)}function DRi(o,A,f){o.factory.createVideoProjection(A,f)}function TRi(o,A,f){o.factory.createTrack(A,f)}function MRi(o,A,f){o.factory.createHeatmap(A,f)}function PRi(o,A,f){o.factory.createEChartLayer(A,f)}function RRi(o,A,f){let m=o.factory.createElement(A);o.userScene.addChild(f,m)}cu.array2DtoMercator=function(o){let A=[];return o.forEach(function(f){let m=te.fromDegrees(f[0],f[1],f[2]);A.push(m)}),A};cu.parserMap={};cu.parserMap[vo.NODE]=iRi;cu.parserMap[vo.IMAGERY_LAYER]=rRi;cu.parserMap[vo.TERRAIN_LAYER]=nRi;cu.parserMap[vo.MODEL_LAYER]=oRi;cu.parserMap[vo.FEATURE_LAYER]=aRi;cu.parserMap[vo.SKYBOX]=sRi;cu.parserMap[vo.ENVIRONMENT]=lRi;cu.parserMap[vo.VIEWPOINT]=uRi;cu.parserMap[vo.MODEL]=cRi;cu.parserMap[vo.WATERS]=ARi;cu.parserMap[vo.EXPLOSION]=hRi;cu.parserMap[vo.FIREWORK]=dRi;cu.parserMap[vo.SMOKE]=fRi;cu.parserMap[vo.FIRE]=gRi;cu.parserMap[vo.RADARSCAN]=pRi;cu.parserMap[vo.CIRCLESCAN]=mRi;cu.parserMap[vo.POINT]=CRi;cu.parserMap[vo.LABEL]=yRi;cu.parserMap[vo.BILLBOARD]=xRi;cu.parserMap[vo.POLYLINE]=vRi;cu.parserMap[vo.POLYGON]=ERi;cu.parserMap[vo.RECTANGLE]=IRi;cu.parserMap[vo.ELLIPSE]=_Ri;cu.parserMap[vo.BOX]=BRi;cu.parserMap[vo.ELLIPSOID]=wRi;cu.parserMap[vo.CYLINDER]=bRi;cu.parserMap[vo.POLYLINEVOLUME]=QRi;cu.parserMap[vo.PERSPECTIVE_VIDEO_PROJECTION]=SRi;cu.parserMap[vo.FISHEYE_VIDEO_PROJECTION]=DRi;cu.parserMap[vo.TRACK]=TRi;cu.parserMap[vo.HEATMAP]=MRi;cu.parserMap[vo.ECHARTLAYER]=PRi;cu.parserMap.ELEMENT=RRi;var Tlt=cu;var gIe=class extends Ja{constructor(A,f,m,C){super(A,m,C),this.editBillboard=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editBillboard=f,O(this.editBillboard)&&O(this.editBillboard.entity.billboard)?console.info(this.editBillboard.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Billboard entity is need!"}))}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editBillboard.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editBillboard.entity)||this.pickObject(A,this.editBillboard.entity))&&this.mCallback&&this.mCallback(this.editBillboard),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editBillboard.entity.position=m}return this.mCallback&&this.mCallback(this.editBillboard),!0}updateBillboard(A){if(O(A)&&O(this.editBillboard)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editBillboard.entity.position=A[C]:O(A[C])&&(this.editBillboard.entity.billboard[C]=A[C])}}}endEditEntity(){}},Mlt=gIe;var pIe=class extends Ja{constructor(A,f,m,C){super(A,m,C),this.editPoint=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editPoint=f,O(this.editPoint)&&O(this.editPoint.entity.point)?console.info(this.editPoint.entity.point):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Point entity is need!"}))}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPoint.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPoint.entity)||this.pickObject(A,this.editPoint.entity))&&this.mCallback&&this.mCallback(this.editPoint),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editPoint.entity.position=m}return this.mCallback&&this.mCallback(this.editPoint),!0}updatePoint(A){if(O(A)&&O(this.editPoint)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editPoint.entity.position=A[C]:O(A[C])&&(this.editPoint.entity.point[C]=A[C])}}}endEditEntity(){}},Plt=pIe;var mIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editBox=void 0,this.pickedEntity=void 0,this.editHeightPoint=void 0,this.editWHPoint=void 0,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=void 0,this.isEditing=!1,this.pointsId=[],this.height=0,this.dragPosition=void 0,this.editBox=f,O(this.editBox)&&O(this.editBox.entity.box)){let y=this.editBox.entity.position._value,x=$t.fromCartesian(y);this.height=x.height;let v=new te,E=new te;this.getNorthPointByDistance(v,E),this.editHeightPoint=this.mEarthCtrl.entities.add({name:"box_edit_height_point",position:v,point:{heightReference:this.editBox.entity.box.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.editHeightPoint.id),this.editWHPoint=this.mEarthCtrl.entities.add({name:"box_edit_long_width_point",position:E,point:{heightReference:this.editBox.entity.box.heightReference,color:ht.RED,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.editWHPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Box entity is need!"})}addHeight(A){let f=this.editBox.entity.position._value,m=$t.fromCartesian(f);return this.height=m.height+A,te.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C;console.info(this.editBox.entity.position),O(m)?C=this.editBox.entity.position.getValue(m):C=this.editBox.entity.position._value;let y=Kn.eastNorthUpToFixedFrame(C),x=new te,v=this.editBox.entity.box.dimensions._value;v||(v=this.editBox.entity.box.dimensions.getValue(m)),te.divideByScalar(v,2,x),te.clone(x,A),te.clone(x,f),A.y*=-1,Ze.multiplyByPoint(y,A,A),f.y*=-1,f.z*=-1,Ze.multiplyByPoint(y,f,f)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editBox.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=void 0):f.name==="box_edit_height_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=f,this.pickEditWHPoint=void 0):f.name==="box_edit_long_width_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=void 0,this.pickEditWHPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editBox)||this.pickObject(A,this.editBox.entity))&&this.mCallback&&this.mCallback(this.editBox),this.currentPoint=void 0,this.isEditing=!1,this.dragPosition=void 0,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;let f=new Date,m=gi.fromDate(f);if(O(this.currentPoint)||O(this.pickEditHeightPoint)||O(this.pickEditWHPoint)){let C=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,y=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,C);if(!y)return;let x=$t.fromCartesian(y),v=te.fromRadians(x.longitude,x.latitude,x.height+this.height);if(O(this.currentPoint))this.currentPoint.position=v,this.editBox.entity.position=new Qn(function(){return v},!1);else if(O(this.dragPosition)){if(O(this.pickEditWHPoint)){let w=te.subtract(y,this.dragPosition,new te),Q=te.normalize(w,new te);te.dot(w,Q,w);let M=this.editBox.entity.box.dimensions._value;M||(M=this.editBox.entity.box.dimensions.getValue(m));let B=te.clone(M);B.x-=w.x,B.y+=w.y,te.abs(B,B),this.editBox.entity.box.dimensions=new Qn(function(){return B},!1)}else if(O(this.pickEditHeightPoint)){let w=te.subtract(y,this.dragPosition,new te),Q=this.editBox.entity.box.dimensions._value;Q||(Q=this.editBox.entity.box.dimensions.getValue(m));let M=te.clone(Q);M.z+=w.z,te.abs(M,M),this.editBox.entity.box.dimensions=M,this.editBox.entity.position=this.addHeight(w.z/2)}}this.dragPosition=y;let E=new te,I=new te;this.getNorthPointByDistance(E,I,m),this.editHeightPoint.position=E,this.editWHPoint.position=I}return this.mCallback&&this.mCallback(this.editBox),!0}updateBox(A){if(O(A)&&O(this.editBox)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editBox.entity.position=A[C]:O(A[C])&&(this.editBox.entity.box[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Rlt=mIe;var CIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editCylinder=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.pointsId=[],this.height=0,this.topRadiusPoint=void 0,this.pickTopRadiusPoint=void 0,this.bottomRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0,this.heightPoint=void 0,this.pickHeightPoint=void 0,this.dragPosition=void 0,this.editCylinder=f,O(this.editCylinder)&&O(this.editCylinder.entity.cylinder)){let y=this.editCylinder.entity.position._value,x=$t.fromCartesian(y);this.height=x.height;let v=this.editCylinder.entity.cylinder.topRadius._value,E=this.editCylinder.entity.cylinder.bottomRadius._value,I=new te,w=new te,Q=new te;this.getNorthPointByDistance(I,w,Q),this.heightPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_height_point",position:Q,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.heightPoint.id),v>0&&(this.topRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_top_radius_point",position:I,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:ht.RED,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.topRadiusPoint.id)),E>0&&(this.bottomRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_bottom_radius_point",position:w,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:ht.RED,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.bottomRadiusPoint.id))}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Cylinder entity is need!"})}addHeight(A){let f=this.editCylinder.entity.position._value,m=$t.fromCartesian(f);return this.height=m.height+A,te.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C=this.editCylinder.entity.position._value,y=Kn.eastNorthUpToFixedFrame(C),x=this.editCylinder.entity.cylinder.length._value,v=this.editCylinder.entity.cylinder.topRadius._value,E=this.editCylinder.entity.cylinder.bottomRadius._value;v>0&&(A.z+=x/2,A.x+=v,Ze.multiplyByPoint(y,A,A)),E>0&&(f.x+=E,f.z-=x/2,Ze.multiplyByPoint(y,f,f)),m.z+=x/2,Ze.multiplyByPoint(y,m,m)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editCylinder.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_height_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=f,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_top_radius_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=f,this.pickBottomRadiusPoint=void 0):f.name==="cylinder_edit_bottom_radius_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=void 0,this.pickTopRadiusPoint=void 0,this.pickBottomRadiusPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editCylinder)||this.pickObject(A,this.editCylinder.entity))&&this.mCallback&&this.mCallback(this.editCylinder),this.currentPoint=void 0,this.dragPosition=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.heightPoint)||O(this.topRadiusPoint)||O(this.bottomRadiusPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=$t.fromCartesian(m),y=te.fromRadians(C.longitude,C.latitude,C.height+this.height);if(O(this.currentPoint))this.currentPoint.position=y,this.editCylinder.entity.position=y;else if(O(this.dragPosition)){if(O(this.pickHeightPoint)){let Q=te.subtract(m,this.dragPosition,new te),M=this.editCylinder.entity.cylinder.length._value;M+=Q.z,M=Math.abs(M),this.editCylinder.entity.position=this.addHeight(Q.z/2),this.editCylinder.entity.cylinder.length=M}else if(O(this.pickTopRadiusPoint)){let Q=te.subtract(m,this.dragPosition,new te),M=this.editCylinder.entity.cylinder.topRadius._value;M-=Q.x,M=Math.abs(M),this.editCylinder.entity.cylinder.topRadius=M}else if(O(this.pickBottomRadiusPoint)){let Q=te.subtract(m,this.dragPosition,new te),M=this.editCylinder.entity.cylinder.bottomRadius._value;M-=Q.x,M=Math.abs(M),this.editCylinder.entity.cylinder.bottomRadius=M}}this.dragPosition=m;let x=this.editCylinder.entity.cylinder.topRadius._value,v=this.editCylinder.entity.cylinder.bottomRadius._value,E=new te,I=new te,w=new te;this.getNorthPointByDistance(E,I,w),x>0&&(this.topRadiusPoint.position=E),v>0&&(this.bottomRadiusPoint.position=I),this.heightPoint.position=w}return this.mCallback&&this.mCallback(this.editCylinder),!0}updateCylinder(A){if(O(A)&&O(this.editCylinder)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editCylinder.entity.position=A[C]:O(A[C])&&(this.editCylinder.entity.cylinder[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Llt=CIe;var yIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editEllipse=void 0,this.pickedEntity=void 0,this.semiMajorAxisPoint=void 0,this.semiMinorAxisPoint=void 0,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=void 0,this.pointsId=[],this.isEditing=!1,this.circle=!1,this.editEllipse=f,O(this.editEllipse)&&O(this.editEllipse.entity.ellipse)){let y=qe.PI_OVER_TWO,x=this.updatePoint(y);this.semiMajorAxisPoint=this.mEarthCtrl.entities.add({name:"semi_major_axis_point",position:x,point:{heightReference:this.editEllipse.entity.ellipse.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.semiMajorAxisPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipse entity is need!"})}updatePoint(A){let f=new te,m=new te,C=new te,y=this.editEllipse.entity.ellipse;this.semiMinorAxis=y.semiMinorAxis._value,this.semiMajorAxis=y.semiMajorAxis._value,this.circle=this.semiMajorAxis===this.semiMinorAxis;let x=Ae(y.rotation,0);this.center=this.editEllipse.entity.position._value;let v=this.semiMinorAxis*this.semiMinorAxis,E=this.semiMajorAxis*this.semiMajorAxis,I=this.semiMajorAxis*this.semiMinorAxis,w=te.magnitude(this.center),Q=te.normalize(this.center,f),M=te.cross(te.UNIT_Z,this.center,m);M=te.normalize(M,M);let B=te.cross(Q,M,C),T=new te;return F1.pointOnEllipsoid(A,x,B,M,v,I,E,w,Q,T)}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editEllipse.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=void 0):f.name==="semi_minor_axis_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=void 0,this.pickSemiMinorAxisPoint=f):f.name==="semi_major_axis_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=f,this.pickSemiMinorAxisPoint=void 0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editEllipse)||this.pickObject(A,this.editEllipse.entity))&&this.mCallback&&this.mCallback(this.editEllipse),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.pickSemiMajorAxisPoint)||O(this.pickSemiMinorAxisPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;if(O(this.currentPoint))this.currentPoint.position=m,this.editEllipse.entity.position=m;else if(O(this.pickSemiMajorAxisPoint)){let C=te.distance(this.center,m);this.editEllipse.entity.ellipse.semiMajorAxis=C;let y=C*this.semiMinorAxis/this.semiMajorAxis;y>C&&(y=C),this.editEllipse.entity.ellipse.semiMinorAxis=y}else if(O(this.pickSemiMinorAxisPoint)){let C=te.distance(this.center,m);this.editEllipse.entity.ellipse.semiMinorAxis=C}this.semiMajorAxisPoint.position=this.updatePoint(qe.PI_OVER_TWO)}return this.mCallback&&this.mCallback(this.editEllipse),!0}updateEllipse(A){if(O(A)&&O(this.editEllipse)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editEllipse.entity.position=A[C]:O(A[C])&&(this.editEllipse.entity.ellipse[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Flt=yIe;var xIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editEllipsoid=void 0,this.pickedEntity=void 0,this.height=0,this.isEditing=!1,this.pointsId=[],this.radiiXPoint=void 0,this.pickRadiiXPoint=void 0,this.radiiYPoint=void 0,this.pickRadiiYPoint=void 0,this.radiiZPoint=void 0,this.pickRadiiZPoint=void 0,this.dragPosition=void 0,this.editEllipsoid=f,O(this.editEllipsoid)&&O(this.editEllipsoid.entity.ellipsoid)){console.info(this.editEllipsoid.ellipsoid);let y=this.editEllipsoid.entity.position._value,x=$t.fromCartesian(y);this.height=x.height;let v=new te,E=new te,I=new te;this.getNorthPointByDistance(v,E,I),this.radiiXPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_x_point",position:v,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiXPoint.id),this.radiiYPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_y_point",position:E,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiYPoint.id),this.radiiZPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_z_point",position:I,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiZPoint.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipsoid entity is need!"})}addHeight(A){let f=this.editEllipsoid.entity.position._value,m=$t.fromCartesian(f);return this.height=m.height+A,te.fromRadians(m.longitude,m.latitude,this.height)}getNorthPointByDistance(A,f,m){let C=this.editEllipsoid.entity.position._value,y=Kn.eastNorthUpToFixedFrame(C),x=this.editEllipsoid.entity.ellipsoid.radii._value;A.x=x.x,Ze.multiplyByPoint(y,A,A),f.y=-x.y,Ze.multiplyByPoint(y,f,f),m.z=x.z,Ze.multiplyByPoint(y,m,m)}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editEllipsoid.entity.id?(this.isEditing=!0,this.currentPoint=f,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_x_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=f,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_y_point"?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=f,this.pickRadiiZPoint=void 0):f.name==="ellipse_edit_z_point"&&(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=void 0,this.pickRadiiYPoint=void 0,this.pickRadiiZPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editEllipsoid)||this.pickObject(A,this.editEllipsoid.entity))&&this.mCallback&&this.mCallback(this.editEllipsoid),this.currentPoint=void 0,this.dragPosition=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)||O(this.pickRadiiXPoint)||O(this.pickRadiiYPoint)||O(this.pickRadiiZPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=$t.fromCartesian(m),y=te.fromRadians(C.longitude,C.latitude,C.height+this.height);if(O(this.currentPoint))this.currentPoint.position=y,this.editEllipsoid.entity.position=y;else{if(O(this.dragPosition)){let I=te.subtract(m,this.dragPosition,new te),w=te.normalize(I,new te);te.dot(I,w,I);let Q=this.editEllipsoid.entity.ellipsoid.radii._value,M=te.clone(Q);O(this.pickRadiiXPoint)?M.x-=I.x:O(this.pickRadiiYPoint)?M.y+=I.y:O(this.pickRadiiZPoint)&&(M.z+=I.z,this.editEllipsoid.entity.position=this.addHeight(I.z)),te.abs(M,M),this.editEllipsoid.entity.ellipsoid.radii=M}this.dragPosition=m}let x=new te,v=new te,E=new te;this.getNorthPointByDistance(x,v,E),this.radiiXPoint.position=x,this.radiiYPoint.position=v,this.radiiZPoint.position=E}return this.mCallback&&this.mCallback(this.editEllipsoid),!0}updateEllipsoid(A){if(O(A)&&O(this.editEllipsoid)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editEllipsoid.entity.position=A[C]:O(A[C])&&(this.editEllipsoid.entity.ellipsoid[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Nlt=xIe;var vIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolygon=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolygon=f,O(this.editPolygon)&&O(this.editPolygon.entity.polygon))for(let y=0;y<this.editPolygon.entity.polygon.hierarchy._value.positions.length;y++){let x=this.editPolygon.entity.polygon.hierarchy._value.positions[y],v=this.mEarthCtrl.entities.add({name:"polygon_point",position:x,point:{color:ht.WHITE,pixelSize:8,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polygon entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolygon.entity.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="polygon_point"&&(this.currentPoint=f,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolygon)||this.pickObject(A,this.editPolygon.entity))&&this.mCallback&&this.mCallback(this.editPolygon),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolygon.entity.polygon.hierarchy=C}return this.mCallback&&this.mCallback(this.editPolygon),!0}updatePolygon(A){if(O(A)&&O(this.editPolygon)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];O(A[C])&&(this.editPolygon.entity.polygon[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},klt=vIe;var EIe=class extends Ja{constructor(A,f,m,C){super(A,m,C),this.editModel=void 0,this.pickedEntity=void 0,this.editColor=ht.RED.withAlpha(.8),this.isEditing=!1,this.editModel=f,this.oldColor=this.editModel.entity.color,this.editModel.entity.color=this.editColor,O(this.editModel)&&O(this.editModel.entity)?console.info(this.editModel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"gltf Model is need!"}))}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f===this.editModel.parameter.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editModel)||this.pickObject(A,this.editModel.entity))&&this.mCallback&&this.mCallback(this.editModel),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=$t.fromCartesian(m),y=$t.clone(C);y.longitude=qe.toDegrees(y.longitude),y.latitude=qe.toDegrees(y.latitude),this.editModel.lon=y.longitude,this.editModel.lat=y.latitude}return this.mCallback&&this.mCallback(this.editModel),!0}updateModel(A){if(O(A)&&O(this.editModel)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];if(O(A[C]))switch(C){case"lon":case"lat":case"alt":case"heading":case"pitch":case"roll":this.editModel[C]=A[C];break;default:this.editModel.entity[C]=A[C];break}}}}endEditEntity(){this.editModel.entity.color=this.oldColor}},Olt=EIe;var IIe=class extends Ja{constructor(A,f,m,C){super(A,m,C),this.editLabel=void 0,this.pickedEntity=void 0,this.isEditing=!1,this.editLabel=f,O(this.editLabel)&&O(this.editLabel.entity.label)?console.info(this.editLabel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Label entity is need!"}))}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editLabel.entity.id&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editLabel.entity)||this.pickObject(A,this.editLabel.entity))&&this.mCallback&&this.mCallback(this.editLabel),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m,this.editLabel.entity.position=m}return this.mCallback&&this.mCallback(this.editLabel),!0}updateLabel(A){if(O(A)&&O(this.editLabel)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editLabel.entity.position=A[C]:O(A[C])&&(this.editLabel.entity.label[C]=A[C])}}}endEditEntity(){}},Ult=IIe;var _Ie=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolyline=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolyline=f,O(this.editPolyline)&&O(this.editPolyline.polyline))for(let y=0;y<this.editPolyline.polyline.positions._value.length;y++){let x=this.editPolyline.polyline.positions._value[y],v=this.mEarthCtrl.entities.add({name:"polyline_point",position:x,point:{color:ht.WHITE,pixelSize:8,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polyline entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolyline.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="polyline_point"&&(this.currentPoint=f,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolyline)||this.pickObject(A,this.editPolyline.entity))&&this.mCallback&&this.mCallback(this.editPolyline),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolyline.polyline.positions=C}return this.mCallback&&this.mCallback(this.editPolyline),!0}updatePolyline(A){if(O(A)&&O(this.editPolyline)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];O(A[C])&&(this.editPolyline.polyline[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Glt=_Ie;var BIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editPolylineVolume=void 0,this.pickedEntity=void 0,this.currentPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editPolylineVolume=f,O(this.editPolylineVolume)&&O(this.editPolylineVolume.entity.polylineVolume))for(let y=0;y<this.editPolylineVolume.entity.polylineVolume.positions._value.length;y++){let x=this.editPolylineVolume.entity.polylineVolume.positions._value[y],v=this.mEarthCtrl.entities.add({name:"edit_polylineVolume_point",position:x,point:{color:ht.WHITE,pixelSize:12,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(v.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"PolylineVolume entity is need!"})}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editPolylineVolume.entity.id?(this.isEditing=!0,this.currentPoint=void 0):f.name==="edit_polylineVolume_point"&&(this.isEditing=!0,this.currentPoint=f),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editPolylineVolume)||this.pickObject(A,this.editPolylineVolume.entity))&&this.mCallback&&this.mCallback(this.editPolylineVolume),this.currentPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.currentPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;this.currentPoint.position=m;let C=[];for(let y=0;y<this.pointsId.length;y++){let x=this.pointsId[y];C.push(this.mEarthCtrl.entities.getById(x).position._value)}this.editPolylineVolume.entity.polylineVolume.positions=C}return this.mCallback&&this.mCallback(this.editPolylineVolume),!0}updatePolylineVolume(A){if(O(A)&&O(this.editPolylineVolume)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editPolylineVolume.entity.position=A[C]:O(A[C])&&(this.editPolylineVolume.entity.polylineVolume[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Hlt=BIe;var wIe=class extends Ja{constructor(A,f,m,C){if(super(A,m,C),this.editRectangle=void 0,this.pickedEntity=void 0,this.leftTopPoint=void 0,this.rightBottomPoint=void 0,this.pointsId=[],this.isEditing=!1,this.editRectangle=f,O(this.editRectangle)&&O(this.editRectangle.entity.rectangle)){let y=this.editRectangle.entity.rectangle.coordinates._value,x=this.editRectangle.entity.rectangle.height._value,v=Di.northwest(y),E=te.fromRadians(v.longitude,v.latitude,x),I=this.mEarthCtrl.entities.add({name:"rect_left_top_point",position:E,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:ht.WHITE,pixelSize:8,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(I.id),v=Di.southeast(y);let w=te.fromRadians(v.longitude,v.latitude,x),Q=this.mEarthCtrl.entities.add({name:"rect_right_bottom_point",position:w,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:ht.WHITE,pixelSize:8,outlineColor:ht.BLACK,outlineWidth:1}});this.pointsId.push(Q.id)}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Rectangle entity is need!"})}destory(){}onLButtonDown(A){if(super.onLButtonDown(A),this.pickedEntity={},this.pickObject(A,this.pickedEntity)){let f=this.pickedEntity.pickedObject.id;f.id===this.editRectangle.entity.id?(this.isEditing=!0,this.leftTopPoint=void 0,this.rightBottomPoint=void 0):f.name==="rect_left_top_point"?(this.leftTopPoint=f,this.rightBottomPoint=void 0,this.isEditing=!0):f.name==="rect_right_bottom_point"&&(this.rightBottomPoint=f,this.leftTopPoint=void 0,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1}}onLButtonUp(A){return super.onLButtonUp(A)===!1||!this.isEditing?!1:((O(this.editRectangle)||this.pickObject(A,this.editRectangle.entity))&&this.mCallback&&this.mCallback(this.editRectangle),this.leftTopPoint=void 0,this.rightBottomPoint=void 0,this.isEditing=!1,!0)}onLButtonDrag(A){if(!this.isEditing)return!1;if(O(this.leftTopPoint)||O(this.rightBottomPoint)){let f=this.mEarthCtrl.coreMap.scene.globe.ellipsoid,m=this.mEarthCtrl.coreMap.camera.pickEllipsoid(A,f);if(!m)return;let C=$t.fromCartesian(m),y=this.editRectangle.entity.rectangle.coordinates._value;O(this.leftTopPoint)?(this.leftTopPoint.position=m,y.west=C.longitude,y.north=C.latitude):O(this.rightBottomPoint)&&(this.rightBottomPoint.position=m,y.south=C.latitude,y.east=C.longitude),this.editRectangle.entity.rectangle.coordinates=y}return this.mCallback&&this.mCallback(this.editRectangle),!0}updateRectangle(A){if(O(A)&&O(this.editRectangle)){let f=Object.keys(A);for(let m=0;m<f.length;m++){let C=f[m];C==="position"?this.editRectangle.entity.position=A[C]:O(A[C])&&(this.editRectangle.entity.rectangle[C]=A[C])}}}endEditEntity(){for(let A=0;A<this.pointsId.length;A++){let f=this.pointsId[A];this.mEarthCtrl.entities.removeById(f)}this.pointsId=[]}},Vlt=wIe;function wd(o){this._earthCtrl=o,this._coreMap=o.coreMap}wd.prototype.editPoint=function(o,A){this._earthCtrl.tools.clearTool();let f=new Plt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("point_edit_tool",f),f};wd.prototype.updatePoint=function(o,A){o.updatePoint(A)};wd.prototype.editPolyline=function(o,A){this._earthCtrl.tools.clearTool();let f=new Glt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polyline_edit_tool",f),f};wd.prototype.updatePolyline=function(o,A){o.updatePolyline(A)};wd.prototype.editPolygon=function(o,A){this._earthCtrl.tools.clearTool();let f=new klt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polygon_edit_tool",f),f};wd.prototype.updatePolygon=function(o,A){o.updatePolygon(A)};wd.prototype.editBox=function(o,A){this._earthCtrl.tools.clearTool();let f=new Rlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("box_edit_tool",f),f};wd.prototype.updateBox=function(o,A){o.updateBox(A)};wd.prototype.editEllipsoid=function(o,A){this._earthCtrl.tools.clearTool();let f=new Nlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("ellipsoid_edit_tool",f),f};wd.prototype.updateEllipsoid=function(o,A){o.updateEllipsoid(A)};wd.prototype.editCylinder=function(o,A){this._earthCtrl.tools.clearTool();let f=new Llt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("cylinder_edit_tool",f),f};wd.prototype.updateCylinder=function(o,A){o.updateCylinder(A)};wd.prototype.editModel=function(o,A){this._earthCtrl.tools.clearTool();let f=new Olt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("model_edit_tool",f),f};wd.prototype.updateModel=function(o,A){o.updateModel(A)};wd.prototype.editBillboard=function(o,A){this._earthCtrl.tools.clearTool();let f=new Mlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("billboard_edit_tool",f),f};wd.prototype.updateBillboard=function(o,A){o.updateBillboard(A)};wd.prototype.editLabel=function(o,A){this._earthCtrl.tools.clearTool();let f=new Ult(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("label_edit_tool",f),f};wd.prototype.updateLabel=function(o,A){o.updateLabel(A)};wd.prototype.editRectangle=function(o,A){this._earthCtrl.tools.clearTool();let f=new Vlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("rectangle_edit_tool",f),f};wd.prototype.updateRectangle=function(o,A){o.updateRectangle(A)};wd.prototype.editEllipse=function(o,A){this._earthCtrl.tools.clearTool();let f=new Flt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("ellipse_edit_tool",f),f};wd.prototype.updateEllipse=function(o,A){o.updateEllipse(A)};wd.prototype.editPolylineVolume=function(o,A){this._earthCtrl.tools.clearTool();let f=new Hlt(this._earthCtrl,o,function(m){A&&A(m)});return this._earthCtrl.tools.registerTool("polylinevolume_edit_tool",f),f};wd.prototype.updatePolylineVolume=function(o,A){o.updatePolylineVolume(A)};wd.prototype.endEditEntity=function(o){this._earthCtrl.tools.clearTool(),o.endEditEntity(),this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!0,this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!0};var Toe=wd;function fy(o){this.mEarthCtrl=o,this.scene=this.mEarthCtrl.coreMap.scene,this.entities=this.mEarthCtrl.entities,this.camera=this.mEarthCtrl.coreMap.camera,this._points=[],this.item=void 0}fy.prototype.horizontalDistance=function(o,A){let f=this,m=!1,C=[],y="",x=[],v,E=this.scene.globe.ellipsoid,I={spot:[],distance:[],label:[],polyline:[]},w={point:ht.RED,polyline:ht.fromRgba(4286644096)};O(A)&&(O(A.point)&&(w.point=A.point),O(A.polyline)&&(w.polyline=A.polyline));let Q=new N_;this.scene.primitives.add(Q);let M=new YA,B=new zr(f.scene.canvas),T=document.createElement("div");Zc(".map-widget",T),Zc(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let F=document.getElementById("toolTip");F.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let L;m=!0;let R=function(V){let U=0,W=`${0}\u7C73`,ie,ee,oe,ne,se,ce;for(let J=0;J<V.length-1;J+=1)ie=E.cartesianToCartographic(V[J]),ee=M.project(ie),oe=ee.x,ne=ee.y,ie=E.cartesianToCartographic(V[J+1]),ee=M.project(ie),se=ee.x,ce=ee.y,U=U+Math.sqrt((oe-se)*(oe-se)+(ne-ce)*(ne-ce));return U>0&&(W=`${U.toFixed(2)}\u7C73`),U/1e3>=1&&(W=`${(U/1e3).toFixed(2)}\u5343\u7C73`),W},k=function(){function V(U){if(!O(U))throw new Hi("positions is required!");if(U.length<2)throw new Hi("positions \u7684\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E2");let W=hs.fromType(hs.ColorType);W.uniforms.color=new ht(1,1,0,.5),this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:w.polyline,width:3,clampToGround:!0}},this.path=U,this._init()}return V.prototype._init=function(){let U=this,W=function(){return U.path};this.options.polyline.positions=new Qn(W,!1),this.lineEntity=f.entities.add(this.options),f.item=this.lineEntity,I.polyline.push(this.lineEntity)},V}();B.setInputAction(function(V){let U,W;F.style.left=`${V.endPosition.x+10}px`,F.style.top=`${V.endPosition.y+20}px`,F.style.display="block",F.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let ie=!1,ee=f.camera.getPickRay(V.endPosition);ee&&(U=f.scene.globe.pick(ee,f.scene));let oe=f.scene.pick(V.endPosition);if(oe){console.log("feature",oe);let ne=f.scene.pickPosition(V.endPosition);ne&&(U=ne),ie=!0}if(!!U&&(W=Pi.WGS84.cartesianToCartographic(U),W)){let ne;ie?ne=f.scene.sampleHeight(W):ne=f.scene.globe.getHeight(W);let se=te.fromDegrees(W.longitude/Math.PI*180,W.latitude/Math.PI*180,ne);if(m){if(C.length<1)return;O(v)?(v.path.pop(),v.path.push(se)):(C.push(se),v=new k(C));let ce=R(v.path);f.entities.remove(L),L=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:v.path[v.path.length-1],label:{text:`\u603B\u957F\uFF1A${ce}`,show:!0,font:"26px \u6977\u4F53",fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}})}}},Yi.MOUSE_MOVE);let G=function(V){x.push(V);let U=[];if(x.length>1){let W=x[x.length-2],ie=x[x.length-1],ee=Math.abs(W.longitude-ie.longitude)*1e7,oe=Math.abs(W.latitude-ie.latitude)*1e7;ee>oe&&(oe=ee);let ne=parseInt(oe/10);ne>1e3&&(ne=1e3),ne<2&&(ne=2);for(let se=0;se<ne;++se)U.push(new $t(qe.lerp(W.longitude,ie.longitude,se/(ne-1)),qe.lerp(W.latitude,ie.latitude,se/(ne-1))));U.push(ie.clone())}else U=x;if(U.length>0)for(let W=0;W<U.length;W++){V=U[W];let ie=f.scene.globe.getHeight(V),ee=te.fromDegrees(V.longitude/Math.PI*180,V.latitude/Math.PI*180,ie);C.push(ee)}};return B.setInputAction(function(V){let U,W,ie=!1,ee=f.camera.getPickRay(V.position);if(ee&&(U=f.scene.globe.pick(ee,f.scene)),f.scene.pick(V.position)){let ne=f.scene.pickPosition(V.position);ne&&(U=ne),ie=!0}if(U&&(W=Pi.WGS84.cartesianToCartographic(U)),W){let ne;ie?ne=f.scene.sampleHeight(W):ne=f.scene.globe.getHeight(W);let se=te.fromDegrees(W.longitude/Math.PI*180,W.latitude/Math.PI*180,ne);if(m){v&&v.path.pop(),G(W);let ce="0\u7C73";v&&(ce=R(v.path)),y=ce,I.spot.push(se),I.distance.push(ce);let J=f.entities.add({position:se,point:{pixelSize:5,color:w.point,outlineColor:ht.WHITE,outlineWidth:1,clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:ce,show:!0,font:"26px \u6977\u4F53",fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-20),clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}});I.label.push(J),f._points.push(J)}}},Yi.LEFT_CLICK),B.setInputAction(function(){f.entities.remove(L),f._points[f._points.length-1].label.text=y,B.destroy(),C.pop(),O(o)&&typeof o=="function"&&o(I),F.style.display="none"},Yi.RIGHT_CLICK),this};fy.prototype.spaceDistance=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m=new zr(f.scene.canvas),C=[],y=null,x="0\u7C73",v=null,E,I="",w,Q=document.createElement("div");Zc(".map-widget",Q),Zc(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let B=document.getElementById("toolTip");B.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let T={name:"",spot:[],distance:[],label:[],ployline:[]},D={point:ht.RED,polyline:ht.fromRgba(4286644096)};O(A)&&(O(A.point)&&(D.point=A.point),O(A.polyline)&&(D.polyline=A.polyline));let F=function(){function L(R){this.options={name:"\u76F4\u7EBF",polyline:{show:!0,positions:[],material:D.polyline,width:3,clampToGround:!1}},this.positions=R,this._init()}return L.prototype._init=function(){let R=this,k=function(){return R.positions};this.options.polyline.positions=new Qn(k,!1);let G=f.entities.add(this.options);f.item=G,T.ployline.push(G);let V=f.getuid();T.name=`\u65B0\u5EFA\u7A7A\u95F4\u8DDD\u79BB${V}`},L}();return m.setInputAction(function(L){if(f.scene.bim){let R=f.scene.bim.PickWorldPositionSync(L.endPosition.x,L.endPosition.y);R[0]===0?v=f.scene.pickPosition(L.endPosition):v=new te(R[0],R[1],R[2]),console.log("????????",v)}else v=f.scene.pickPosition(L.endPosition);!v||(B.style.left=`${L.endPosition.x+10}px`,B.style.top=`${L.endPosition.y+20}px`,B.style.display="block",C.length>=2&&(O(y)?(C.pop(),C.push(v)):y=new F(C),B.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u53F3\u952E\u7ED3\u675F\uFF01</span>',x=f.getSpaceDistance(C)),f.entities.remove(w),w=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:C[C.length-1],label:{text:`\u603B\u957F\uFF1A${x}`,show:!0,font:"26px \u6977\u4F53",fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}}))},Yi.MOUSE_MOVE),m.setInputAction(function(L){if(f.scene.bim){let k=f.scene.bim.PickWorldPositionSync(L.position.x,L.position.y);k[0]===0?v=f.scene.pickPosition(L.position):v=new te(k[0],k[1],k[2]),console.log("????????",v)}else v=f.scene.pickPosition(L.position);if(!v)return;C.length===0&&C.push(v.clone()),C.push(v);let R=x;I=`\u603B\u957F\uFF1A${x}`,E=f.entities.add({name:"\u7A7A\u95F4\u76F4\u7EBF\u8DDD\u79BB",position:C[C.length-1],point:{pixelSize:5,color:D.point,outlineColor:ht.WHITE,outlineWidth:2,clampToGround:!1,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:R,show:!0,font:"26px \u6977\u4F53",fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-20),heightReference:In.NONE,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(E),T.spot.push(v),T.distance.push(x),T.label.push(E)},Yi.LEFT_CLICK),m.setInputAction(function(L){B.style.display="none",f.entities.remove(w),f._points.length>0&&(f._points[f._points.length-1].label.text=I),m.destroy(),C.pop(),O(o)&&typeof o=="function"&&o(T)},Yi.RIGHT_CLICK),this};fy.prototype.getSpaceDistance=function(o){let A=0,f="";for(let m=0;m<o.length-1;m++){let C=$t.fromCartesian(o[m]),y=$t.fromCartesian(o[m+1]),x=new xp;x.setEndPoints(C,y);let v=x.surfaceDistance;v=Math.sqrt(Math.pow(v,2)+Math.pow(y.height-C.height,2)),A=A+v}return A>=1e3?f=`${(A/1e3).toFixed(2)}\u5343\u7C73`:f=`${A.toFixed(2)}\u7C73`,f};fy.prototype.getPlaneArea=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m=0,C=new zr(f.scene._imageryLayerCollection),y=document.getElementById("toolTip");y||(Zc(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>'),y=document.getElementById("toolTip")),y.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB\uFF0C\u53F3\u952E\u7ED3\u675F\uFF01</span>';let x=[],v={},E=[],I=[],w=null,Q=null,M,B={point:ht.RED,polyline:ht.fromRgba(4286644096),polygon:ht.fromRgba(4286644096).withAlpha(.5)};O(A)&&(O(A.point)&&(B.point=A.point),O(A.polyline)&&(B.polyline=A.polyline),O(A.polygon)&&(B.polygon=A.polygon));let T={mj:0,label:[],polygon:[]};y.style.display="block";let D=function(){function F(L){this.options={name:"\u591A\u8FB9\u5F62",polygon:{hierarchy:[],perPositionHeight:!0,material:B.polygon,clampToGround:!1}},this.hierarchy=L,this._init()}return F.prototype._init=function(){let L=this,R=function(){return L.hierarchy};this.options.polygon.hierarchy=new Qn(R,!1),this.polygon=f.entities.add(this.options),f.item=this.polygon,f._entity=this.polygon,T.polygon=this.polygon},F}();return C.setInputAction(function(F){if(y.style.left=`${F.endPosition.x+10}px`,y.style.top=`${F.endPosition.y+20}px`,f.scene.bim){let V=f.scene.bim.PickWorldPositionSync(F.endPosition.x,F.endPosition.y);V[0]===0?Q=f.scene.pickPosition(F.endPosition):Q=new te(V[0],V[1],V[2])}else Q=f.scene.pickPosition(F.endPosition);if(!Q)return;let L=$t.fromCartesian(Q),R=qe.toDegrees(L.longitude),k=qe.toDegrees(L.latitude),G=L.height;if(x.length>=2){O(w)?(x.pop(),x.push(Q),v=new Hn(x),I.pop(),I.push({lon:R,lat:k,hei:G})):(v=new Hn(x),w=new D(v));let V=f.getArea(I,x);f.entities.remove(M),M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:x[x.length-1],label:{text:V,font:"26px \u6977\u4F53",show:!0,fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-40),heightReference:In.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),T.label=M}},Yi.MOUSE_MOVE),C.setInputAction(function(F){if(f.scene.bim){let V=f.scene.bim.PickWorldPositionSync(F.position.x,F.position.y);V[0]===0?Q=f.scene.pickPosition(F.position):Q=new te(V[0],V[1],V[2])}else Q=f.scene.pickPosition(F.position);if(!Q)return;let L=$t.fromCartesian(Q);console.log("\u5DE6\u952E\u70B9",L);let R=qe.toDegrees(L.longitude),k=qe.toDegrees(L.latitude),G=L.height;x.length===0&&(x.push(Q.clone()),v=new Hn(x),I.push({lon:R,lat:k,hei:G}),x.push(Q.clone()),v=new Hn(x),I.push({lon:R,lat:k,hei:G})),x.push(Q),v=new Hn(x),E.push({lon:R,lat:k,hei:G}),I.push({lon:R,lat:k,hei:G})},Yi.LEFT_CLICK),C.setInputAction(function(F){y.style.display="none",f.entities.remove(M),C.destroy();let L=f.getArea(I,x);m=L;let R=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:x[x.length-1],label:{text:L,font:"26px \u6977\u4F53",show:!0,fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-40),heightReference:In.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}});f._points.push(R),f._lable=R,T.mj=m,T.label=R,O(o)&&typeof o=="function"&&o(T)},Yi.RIGHT_CLICK),this};fy.prototype.getSurfaceArea3d=function(o,A){let f=this;f.scene.globe.depthTestAgainstTerrain=!0;let m={mj:0,label:[],polygon:[]},C=!0,y=[],x={},v,E=f.scene,I=E.globe.ellipsoid,w=new N_;E.primitives.add(w);let Q,M,B=0,T={point:ht.RED,polyline:ht.fromRgba(4286644096),polygon:ht.fromRgba(4286644096).withAlpha(.5)};O(A)&&(O(A.point)&&(T.point=A.point),O(A.polyline)&&(T.polyline=A.polyline),O(A.polygon)&&(T.polygon=A.polygon));let D=document.createElement("div");Zc(".map-widget",D),Zc(".map-widget",'<div id="toolTip" style="display: none;position: absolute;visibility: visible;max-width: 200px;min-width: 100px;padding: 1px 1px 1px 25px;font-size: 11px;z-index: 1000;opacity: 0.8;background-color: rgba(0,0,0,0.7);border-radius: 3px;"></div>');let L=document.getElementById("toolTip");L.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u5DE6\u952E\u5F00\u59CB,\u53F3\u952E\u7ED3\u675F\uFF01</span>';let R=new zr(E.canvas),k=function(){function V(U){if(!O(U))throw new Hi("positions is required!");if(U.length<3)throw new Hi("positions \u7684\u957F\u5EA6\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E3");this.options={polygon:{show:!0,hierarchy:void 0,material:T.polygon,clampToGround:!1}},this.path=U,this._init()}return V.prototype._init=function(){let U=this,W=function(){return U.path};this.options.polygon.hierarchy=new Qn(W,!1),this.polygonEntity=f.entities.add(this.options),f.item=this.polygonEntity,m.polygon=this.polygonEntity,f._entity=this.polygonEntity},V}();R.setInputAction(function(V){let U=0;f.entities.remove(M);let W,ie,ee=f.scene.camera.getPickRay(V.endPosition);ee&&(W=f.scene.globe.pick(ee,f.scene));let oe=f.scene.pick(V.endPosition),ne=!1;if(oe){let ce=f.scene.pickPosition(V.endPosition);ce&&(W=ce),ne=!0}if(!W)return;let se=function(ce){let J=new Array(ce.length),he=function(Ie){return Ie.longitude=Ie.longitude/Math.PI*180,Ie.latitude=Ie.latitude/Math.PI*180,Ie},Ce=function(Ie){let be=0;for(let Be=0;Be<Ie.length;Be++){let me=Ie[Be],z;Be<Ie.length-1?z=Ie[Be+1]:z=Ie[0],be+=me.x*z.y-z.x*me.y}return be/2};for(let Ie=0;Ie<ce.length;Ie++)J[Ie]=he(I.cartesianToCartographic(ce[Ie]));let Ee=0;for(let Ie=0;Ie<J.length;Ie++)Ee+=J[Ie].longitude;Ee=Ee/J.length;for(let Ie=0;Ie<J.length;Ie++)J[Ie]=f.Gauss_to_XY(J[Ie].longitude,J[Ie].latitude,Ee);return Math.abs(Ce(J))};if(ie=Pi.WGS84.cartesianToCartographic(W),ie&&C){if(L.style.left=`${V.endPosition.x+10}px`,L.style.top=`${V.endPosition.y+20}px`,L.style.display="block",y.length<2){B===1&&(M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:W,label:{text:`${U}\u5E73\u65B9\u5343\u7C73`,font:"26px \u6977\u4F53",show:!0,fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-40),heightReference:In.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(M),m.label=M);return}if(O(v)?(v.path.positions.pop(),v.path.positions.push(W)):(y.push(W),x=new Hn(y),v=new k(x)),y.length>=2){L.innerHTML='<span style="font-family:\u9ED1\u4F53;color:white;font-weight: bolder;font-size: 14px">\u53F3\u952E\u7ED3\u675F\uFF01</span>';let ce=String(se(v.path.positions));ce=ce.substr(0,ce.indexOf(".",0)),ce.length<6?U=`${ce}\u5E73\u65B9\u7C73`:(ce=String(ce/1e6),ce=ce.substr(0,ce.indexOf(".",0)+3),U=`${ce}\u5E73\u65B9\u5343\u7C73`),m.mj=U,M=f.entities.add({name:"\u591A\u8FB9\u5F62\u9762\u79EF",position:W,label:{text:U,font:"26px \u6977\u4F53",show:!0,fillColor:ht.WHITE,style:bA.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Bn.BOTTOM,pixelOffset:new wt(20,-40),heightReference:In.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),f._points.push(M),m.label=M}}},Yi.MOUSE_MOVE),R.setInputAction(function(V){let U;B=1;let W=f.scene.camera.getPickRay(V.position);W&&(U=f.scene.globe.pick(W,f.scene));let ie=f.scene.pick(V.position),ee=!1;if(ie){let oe=f.scene.pickPosition(V.position);oe&&(U=oe),ee=!0}U&&C&&(y.push(U),x=new Hn(y))},Yi.LEFT_CLICK),R.setInputAction(function(){R.removeInputAction(Yi.LEFT_CLICK),R.removeInputAction(Yi.LEFT_DOUBLE_CLICK),f.trackedEntity=void 0,C=!1,Q=w.add({show:!0,id:"measureTool",position:y[y.length-1],pixelOffset:new wt(0,20),eyeOffset:new te(0,0,0),horizontalOrigin:cA.CENTER,verticalOrigin:Bn.CENTER,scale:1,color:new ht(1,1,1,1)}),L.style.display="none",R.destroy(),O(o)&&typeof o=="function"&&o(m)},Yi.RIGHT_CLICK);let G=function(V){let U=0,W=0,ie=0;for(let oe=0;oe<V.length;oe++)U+=V[oe].x,W+=V[oe].y,ie+=V[oe].z;return new te(U/V.length,W/V.length,ie/V.length)};return this};fy.prototype.to_N=function(o){let f=63567523142e-4,m=Math.sqrt(6378137*6378137-f*f)/6378137;return 6378137/Math.sqrt(1-m*m*Math.sin(o)*Math.sin(o))};fy.prototype.to_Sm=function(o){let f=63567523142e-4,m=Math.sqrt(6378137*6378137-f*f)/6378137,C,y,x,v,E;return C=1+m*m*3/4+Math.pow(m,4)*45/64+Math.pow(m,6)*175/256+Math.pow(m,8)*11025/16384,y=Math.pow(m,2)*3/4+Math.pow(m,4)*15/16+Math.pow(m,6)*525/512+Math.pow(m,8)*2205/2048,x=Math.pow(m,4)*15/64+Math.pow(m,6)*105/256+Math.pow(m,8)*2205/4096,v=Math.pow(m,6)*35/512+Math.pow(m,8)*315/2048,E=Math.pow(m,8)*315/16384,6378137*(1-m*m)*(C*o-y/2*Math.sin(2*o)+x/4*Math.sin(4*o)-v/6*Math.sin(6*o)+E/8*Math.sin(8*o))};fy.prototype.to_Radian=function(o){return o*Math.PI/180};fy.prototype.Gauss_to_XY=function(o,A,f){let C=63567523142e-4,y=Math.sqrt(6378137*6378137-C*C)/C,x=0,v=0,E=0,I=0,w=this.to_Radian(f);A=this.to_Radian(A),o=this.to_Radian(o);let Q=o-w,M=Math.cos(A);I=this.to_N(A),E=I*Math.cos(A),x=Math.tan(A),v=y*M;let B=Math.pow(x,2),T=Math.pow(x,4),D=Math.pow(v,2),F=Math.pow(v,4),L=Math.pow(M,3),R=Math.pow(M,5),k=this.to_Sm(A)+Math.pow(Q,2)/2*E*M*x+Math.pow(Q,4)/24*x*E*L*(5-B+9*D+4*F)+Math.pow(Q,6)/720*x*E*R*(61-58*x*x+T+270*D-330*x*x*D),G=Q*I*M+Math.pow(Q,3)/6*I*L*(1-x*x+v*v)+Math.pow(Q,5)/120*I*R*(5-18*x*x+T+14*D-58*D*B);return new wt(G,k)};fy.prototype.getArea=function(o,A){let f=0;for(let m=0;m<o.length-2;m++){let C=(m+1)%o.length,y=(m+2)%o.length,x=this.Angle(o[m],o[C],o[y]),v=this.getdistance(A[m],A[C]),E=this.getdistance(A[C],A[y]);f+=v*E*Math.abs(Math.sin(x))}return f<1e6?f=`${f.toFixed(4)}\u5E73\u65B9\u7C73`:f=`${(f/1e6).toFixed(4)}\u5E73\u65B9\u5343\u7C73`,f};fy.prototype.getdistance=function(o,A){let f=$t.fromCartesian(o),m=$t.fromCartesian(A),C=new xp;C.setEndPoints(f,m);let y=C.surfaceDistance;return y=Math.sqrt(Math.pow(y,2)+Math.pow(m.height-f.height,2)),y};fy.prototype.Bearing=function(o,A){let f=Math.PI/180,m=180/Math.PI,C=o.lat*f,y=o.lon*f,x=A.lat*f,v=A.lon*f,E=-Math.atan2(Math.sin(y-v)*Math.cos(x),Math.cos(C)*Math.sin(x)-Math.sin(C)*Math.cos(x)*Math.cos(y-v));return E<0&&(E+=Math.PI*2),E=E*m,E};fy.prototype.Angle=function(o,A,f){let m=this.Bearing(A,o),C=this.Bearing(A,f),y=m-C;return y<0&&(y+=360),y};fy.prototype.getuid=function(){return this.uuid(8,16)};fy.prototype.uuid=function(o,A){let f="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),m=[],C;if(A=A||f.length,o)for(C=0;C<o;C++)m[C]=f[0|qe.nextRandomNumber()*A];else{let y;for(m[8]=m[13]=m[18]=m[23]="-",m[14]="4",C=0;C<36;C++)m[C]||(y=0|qe.nextRandomNumber()*16,m[C]=f[C===19?y&3|8:y])}return m.join("")};fy.prototype.deleteObject=function(){if(this.entities.remove(this.item),this._points.length>0){for(let o=0;o<this._points.length;o++)this.entities.remove(this._points[o]);this._points=[]}try{this.scene.primitives.remove(this.item)}catch(o){console.log(o)}this.item=void 0};var sJ=fy;function ew(o,A){this._earthCtrl=o,this._coreMap=this._earthCtrl.coreMap,this._show=Ae(A.show,!0),this._lon=Ae(A.lon,121),this._lat=Ae(A.lat,31),this._height=Ae(A.height,10),this._heading=Ae(A.heading,0),this._pitch=Ae(A.pitch,0),this._distance=Ae(A.distance,300),this._position=te.fromDegrees(A.lon,A.lat,A.height),this._horizontalViewAngle=Ae(A.horizontalViewAngle,90),this._verticalViewAngle=Ae(A.verticalViewAngle,60),this._horizontalViewAngle=this.adjustViewRange(this._horizontalViewAngle),this._verticalViewAngle=this.adjustViewRange(this._verticalViewAngle),this._visibleAreaColor=Ae(A.visibleAreaColor,ht.GREEN.withAlpha(.4)),this._invisibleAreaColor=Ae(A.invisibleAreaColor,ht.RED.withAlpha(.4)),this._size=Ae(A.size,10240),this._softShadows=Ae(A.softShadows,!0),this._colorStyle=Ae(A.colorStyle,ht.YELLOW),this._parameter=A,this._lineArray=[],this._visualCone=!0,this.pyramid=void 0,this.updateViewShed()}Object.defineProperties(ew.prototype,{show:{get:function(){return this._show},set:function(o){o!==this._show&&(this._show=o,this.updateViewShed())}},distance:{get:function(){return this._distance}},heading:{get:function(){return this._heading}},pitch:{get:function(){return this._pitch}},horizontalViewAngle:{get:function(){return this._horizontalViewAngle}},verticalViewAngle:{get:function(){return this._verticalViewAngle}},colorStyle:{get:function(){return this._colorStyle},set:function(o){this._colorStyle=o}},invisibleAreaColor:{get:function(){return this._invisibleAreaColor},set:function(o){this._invisibleAreaColor=o}},visibleAreaColor:{get:function(){return this._visibleAreaColor},set:function(o){this._visibleAreaColor=o}},visualCone:{get:function(){return this._visualCone},set:function(o){this._visualCone=o,this.visualConeShow(o)}}});ew.prototype.adjustViewRange=function(o){return o<=0?o=1:o>=180&&(o=179),o};ew.prototype.removeFromMap=function(){let o=this;O(o.viewShedMap)&&(o.viewShedMap.enabled=!1),O(o.pyramid)&&(o._earthCtrl.entities.removeById(o.pyramid.id),o.pyramid=null);for(let A=0;A<o._lineArray.length;A++){let f=o._lineArray[A];o._earthCtrl.entities.remove(f)}o._lineArray=[]};ew.prototype.visualConeShow=function(o){let A=this;O(A.pyramid)&&(A.pyramid.show=o);for(let f=0;f<A._lineArray.length;f++){let m=A._lineArray[f];m.show=o}};ew.prototype.addVisualPyramid=function(){let o=this,A=new cK({radii:new Qn(function(){return new te(o._distance,o._distance,o._distance)},!1),minimumClock:new Qn(function(){return qe.toRadians(90-o._heading-o._horizontalViewAngle/2)},!1),maximumClock:new Qn(function(){return qe.toRadians(90-o._heading+o._horizontalViewAngle/2)},!1),minimumCone:new Qn(function(){return qe.toRadians(90-o._verticalViewAngle/2)},!1),maximumCone:new Qn(function(){return qe.toRadians(90+o._verticalViewAngle/2)},!1),fill:!1,outline:!0,subdivisions:128,slicePartitions:32,stackPartitions:16,outlineColor:new Qn(function(){return o._colorStyle},!1)}),f=new JA({position:new Qn(function(){return o._position},!1),ellipsoid:A});this.pyramid=o._earthCtrl.entities.add(f)};ew.prototype.createLightCamera=function(){O(this.viewShedMap)?this._lightCamera=this.viewShedMap._lightCamera:this._lightCamera=new Ol(this._coreMap.scene),this._lightCamera.position=this._position};ew.prototype.updateParameters=function(o){let A=this,f=A._lightCamera;if(!!O(o)&&(O(o.lon)||O(o.lat)||O(o.height)||O(o.heading)||O(o.pitch)||O(o.roll)||O(o.far)||O(o.distance)||O(o.verticalViewAngle)||O(o.horizontalViewAngle))){let m=this._parameter;for(let v in o)o.hasOwnProperty(v)&&O(m[v])&&(m[v]=o[v]);m.distance>=A.viewShedMap.maximumDistance&&(m.distance=A.viewShedMap.maximumDistance),A._heading=m.heading,A._pitch=m.pitch,A._distance=m.distance,A.viewShedMap._pointLightRadius=m.distance,m.verticalViewAngle=A.adjustViewRange(m.verticalViewAngle),A._verticalViewAngle=m.verticalViewAngle,m.horizontalViewAngle=A.adjustViewRange(m.horizontalViewAngle),A._horizontalViewAngle=m.horizontalViewAngle,A._position=te.fromDegrees(m.lon,m.lat,m.height);let C=qe.toRadians(m.heading);f.setView({destination:A._position,orientation:{heading:C,pitch:0,roll:0}}),f.frustum.far=m.far||1e5;let y=qe.toRadians(A._horizontalViewAngle),x=qe.toRadians(A._verticalViewAngle);f.frustum.aspectRatio=Math.tan(y/2)/Math.tan(x/2),y>x?f.frustum.fov=y:f.frustum.fov=x}};ew.prototype.createShadowMap=function(){if(O(this.viewShedMap)){this.viewShedMap.enabled=!0;return}this.viewShedMap=new YK({context:this._coreMap.scene.context,lightCamera:this._lightCamera,enabled:!0,isPointLight:!0,pointLightRadius:this._distance,cascadesEnabled:!1,size:this._size,softShadows:!0,normalOffset:!1,fromLightSource:!1,visibleAreaColor:this._visibleAreaColor,invisibleAreaColor:this._invisibleAreaColor}),this._earthCtrl.viewShedMapList.push(this.viewShedMap)};var Sx=new te;ew.prototype.drawViewCentrum=function(){let o=this;function A(){let I=o.pyramid._ellipsoid._minimumClock.getValue(),w=o.pyramid._ellipsoid._minimumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Sx.x=Q.x*T*L,Sx.y=Q.y*T*F,Sx.z=Q.z*D;let R=new QD.changeCartesian3ByScalar(o._position,Sx);return[o._position,R]}let f=this._earthCtrl.entities.add({polyline:{positions:new Qn(A,!1),material:this._colorStyle}});this._lineArray.push(f);function m(){let I=o.pyramid._ellipsoid._maximumClock.getValue(),w=o.pyramid._ellipsoid._minimumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Sx.x=Q.x*T*L,Sx.y=Q.y*T*F,Sx.z=Q.z*D;let R=new QD.changeCartesian3ByScalar(o._position,Sx);return[o._position,R]}let C=this._earthCtrl.entities.add({polyline:{positions:new Qn(m,!1),material:this._colorStyle}});this._lineArray.push(C);function y(){let I=o.pyramid._ellipsoid._minimumClock.getValue(),w=o.pyramid._ellipsoid._maximumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Sx.x=Q.x*T*L,Sx.y=Q.y*T*F,Sx.z=Q.z*D;let R=new QD.changeCartesian3ByScalar(o._position,Sx);return[o._position,R]}let x=this._earthCtrl.entities.add({polyline:{positions:new Qn(y,!1),material:this._colorStyle}});this._lineArray.push(x);function v(){let I=o.pyramid._ellipsoid._maximumClock.getValue(),w=o.pyramid._ellipsoid._maximumCone.getValue(),Q=o.pyramid._ellipsoid.radii.getValue(),M=Math.sin,B=Math.cos,T=M(w),D=B(w),F=M(I),L=B(I);Sx.x=Q.x*T*L,Sx.y=Q.y*T*F,Sx.z=Q.z*D;let R=QD.changeCartesian3ByScalar(o._position,Sx);return[o._position,R]}let E=this._earthCtrl.entities.add({polyline:{positions:new Qn(v,!1),material:this._colorStyle}});this._lineArray.push(E)};ew.prototype.updateViewShed=function(){this.show?(this.createLightCamera(),this.setCameraParams(),this.createShadowMap(),this.addVisualPyramid(),this.drawViewCentrum()):this.removeFromMap()};ew.prototype.setCameraParams=function(){this._lightCamera.frustum.near=.1,this._lightCamera.frustum.far=this._distance;let o=qe.toRadians(this._horizontalViewAngle),A=qe.toRadians(this._verticalViewAngle);this._lightCamera.frustum.aspectRatio=Math.tan(o/2)/Math.tan(A/2),o>A?this._lightCamera.frustum.fov=o:this._lightCamera.frustum.fov=A,this._lightCamera.setView({destination:this._position,orientation:{heading:qe.toRadians(this._heading),pitch:qe.toRadians(this._pitch),roll:0}})};var Moe=ew;var bIe=Pi.WGS84;function Uf(o){this._cesiumViewer=o,this.coreMap=o.coreMap,this._scene=this.coreMap.scene,this.loading||this.addLoading(),this._tooltip=LRi(this.coreMap.container)}function QIe(o,A){if(o===null||typeof o!="object"||o.constructor!==Object&&o.constructor!==Array)return o;if(o.constructor===Date||o.constructor===RegExp||o.constructor===Function||o.constructor===String||o.constructor===Number||o.constructor===Boolean)return new o.constructor(o);A=A||new o.constructor;for(let f in o)A[f]=typeof A[f]>"u"?QIe(o[f],null):A[f];return A}function zlt(o,A){let f=QIe(o),m;for(m in A)f[m]===void 0&&(f[m]=QIe(A[m]));return f}function LRi(o){let A=function(f){let m=document.createElement("DIV");m.className="twipsy right";let C=document.createElement("DIV");C.className="twipsy-arrow",m.appendChild(C);let y=document.createElement("DIV");y.className="twipsy-inner",m.appendChild(y),this._div=m,this._title=y,f.appendChild(m)};return A.prototype.setVisible=function(f){this._div.style.display=f?"block":"none"},A.prototype.showAt=function(f,m){f&&m&&(this.setVisible(!0),this._title.innerHTML=m,this._div.style.left=`${f.x+30}px`,this._div.style.top=`${f.y-this._div.clientHeight/2-15}px`)},new A(o)}Uf.prototype.addToolbar=function(o,A){return A=zlt(A,{container:o}),new Uf.Toolbar(this,A)};var Klt={shiftX:0,shiftY:0};Uf.prototype.createBillboardGroup=function(o,A,f){let m=new Uf.BillboardGroup(this,A);return m.addBillboards(o,f),m};Uf.BillboardGroup=function(o,A){this._drawHelper=o,this._scene=o._scene,this._options=zlt(A,Klt);let f=new N_;this._scene.primitives.add(f),this._billboards=f,this._orderedBillboards=[]};Uf.BillboardGroup.prototype.createBillboard=function(o,A){let f=this._billboards.add({show:!0,position:o,pixelOffset:new wt(this._options.shiftX,this._options.shiftY),eyeOffset:new te(0,0,-1e3),horizontalOrigin:cA.CENTER,verticalOrigin:Bn.CENTER,scale:.3,image:Ae(this._options.iconUrl,`${globalThis.GEOWORLD_BASE_URL}Assets/Images/point.png`),color:new ht(1,1,1,1)});if(A){let y=function(v){C.enableRotate=v},x=function(){let v=0;for(let E=m._orderedBillboards.length;v<E&&m._orderedBillboards[v]!==f;++v);return v},m=this,C=this._scene.screenSpaceCameraController;if(A.dragHandlers){let v=this,E=new zr(v._scene.canvas);setListener(f,"leftDown",function(I){function w(M){f.position=M;for(let B=0,T=v._orderedBillboards.length;B<T&&v._orderedBillboards[B]!==f;++B);A.dragHandlers.onDrag&&A.dragHandlers.onDrag(x(),M)}function Q(M){E.destroy(),y(!0),A.dragHandlers.onDragEnd&&A.dragHandlers.onDragEnd(x(),M)}E.setInputAction(function(M){let B=v._scene.camera.pickEllipsoid(M.endPosition,bIe);B?w(B):Q(B)},Yi.MOUSE_MOVE),E.setInputAction(function(M){Q(v._scene.camera.pickEllipsoid(M.position,bIe))},Yi.LEFT_UP),y(!1),A.dragHandlers.onDragStart&&A.dragHandlers.onDragStart(x(),v._scene.camera.pickEllipsoid(I,bIe))})}A.onDoubleClick&&setListener(f,"leftDoubleClick",function(v){A.onDoubleClick(x())}),A.onClick&&setListener(f,"leftClick",function(v){A.onClick(x())}),A.tooltip&&(setListener(f,"mouseMove",function(v){m._drawHelper._tooltip.showAt(v,A.tooltip())}),setListener(f,"mouseOut",function(v){m._drawHelper._tooltip.setVisible(!1)}))}return f};Uf.BillboardGroup.prototype.insertBillboard=function(o,A,f){this._orderedBillboards.splice(o,0,this.createBillboard(A,f))};Uf.BillboardGroup.prototype.addBillboard=function(o,A){this._orderedBillboards.push(this.createBillboard(o,A))};Uf.BillboardGroup.prototype.addBillboards=function(o,A){let f=0;for(;f<o.length;f++)this.addBillboard(o[f],A)};Uf.BillboardGroup.prototype.updateBillboardsPositions=function(o){let A=0;for(;A<o.length;A++)this.getBillboard(A).position=o[A]};Uf.BillboardGroup.prototype.countBillboards=function(){return this._orderedBillboards.length};Uf.BillboardGroup.prototype.getBillboard=function(o){return this._orderedBillboards[o]};Uf.BillboardGroup.prototype.removeBillboard=function(o){this._billboards.remove(this.getBillboard(o)),this._orderedBillboards.splice(o,1)};Uf.BillboardGroup.prototype.remove=function(){this._billboards=this._billboards&&this._billboards.removeAll()&&this._billboards.destroy()};Uf.BillboardGroup.prototype.setOnTop=function(){this._scene.primitives.raiseToTop(this._billboards)};Uf.prototype.cleanUp=function(){this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=void 0),this._markers!==void 0&&(this._markers.remove(),this._markers=void 0),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._tooltip.setVisible(!1)};Uf.prototype.startDrawing=function(o){let A=this,f=this._scene;f.globe.depthTestAgainstTerrain=!0;let m=this._tooltip,C=3,y=[],x=[],v;this._positions=x;let E=new zr(f.canvas);this._mouseHandler=E;let I=new Uf.BillboardGroup(this,Klt);this._markers=I,this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),E.setInputAction(function(Q){if(Q.position!==null){let M=f.camera.getPickRay(Q.position),B=f.globe.pick(M,f),T=$t.fromCartesian(B),D=qe.toDegrees(T.longitude),F=qe.toDegrees(T.latitude);if(B){if(y.length===0&&(y.push(D,F),x.push(B),v=B,I.addBillboard(v)),x.length>=4){let L=ml.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,v);if(L!==void 0){let R=L.x-Q.position.x,k=L.y-Q.position.y;if(R*R+k*k<16){y.splice(y.length-2,2),x.pop(),this.isLoading(!0),this.stopDrawing(o);return}}}y.push(D,F),x.push(B),I.addBillboard(B),x.length===C&&(A._prevEntity=A._cesiumViewer.factory.createElement({type:"polygon",parameters:{hierarchy:te.fromDegreesArray(y),material:ht.RED.withAlpha(.6),fill:!0}}),A._prevEntity.polygon.hierarchy=w())}}}.bind(this),Yi.LEFT_CLICK),E.setInputAction(function(Q){let M=Q.endPosition;if(M!==null)if(x.length===0)m.showAt(M,"\u70B9\u51FB\u5F00\u59CB\u7ED8\u5236\u7B2C\u4E00\u4E2A\u70B9");else{let B=f.camera.getPickRay(M),T=f.globe.pick(B,f),D=$t.fromCartesian(T),F=qe.toDegrees(D.longitude),L=qe.toDegrees(D.latitude);if(T&&(y.splice(y.length-2,2),x.pop(),y.push(F,L),x.push(T),I.getBillboard(x.length-1).position=T,m.showAt(M,"\u53CC\u51FB\u7ED3\u675F\u7ED8\u5236"),x.length>=3&&x.length>=4)){let R=ml.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,v);if(R!==void 0){let k=R.x-M.x,G=R.y-M.y;k*k+G*G<16?document.body.style.cursor="pointer":document.body.style.cursor="default"}}}}.bind(this),Yi.MOUSE_MOVE),E.setInputAction(function(Q){x.length<C+2||(this.isLoading(!0),setTimeout(()=>{this.stopDrawing(o)},100))}.bind(this),Yi.LEFT_DOUBLE_CLICK);function w(){return te.fromDegreesArray(y)}};Uf.prototype.stopDrawing=function(o){this._mouseHandler!==void 0&&(this._mouseHandler.destroy(),this._mouseHandler=void 0),this._markers!==void 0&&(this._markers.remove(),this._markers=void 0),this._prevEntity!==void 0&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null),this._volumeLabel!==void 0&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0),this._tooltip.setVisible(!1),document.body.style.cursor="wait";let A=this.computeCutVolume(),f=A.maxHeight;document.body.style.cursor="default",typeof o=="function"&&o(A.volume);let m={polygon:{hierarchy:{positions:this._positions},extrudedHeight:f,closeTop:!1,closeBottom:!1,material:ht.RED.withAlpha(.5),outline:!0,outlineColor:ht.WHITE,outlineWidth:2}};this._prevEntity=this._cesiumViewer.entities.add(m),this.isLoading(!1)};Uf.prototype.addLoading=function(){let o=document.createElement("div");o.id="cesiumLoading",o.style.cssText="width: 100%;height: 100%;display:none;pointer-events: none;position: absolute;top: 0;left: 0;-moz-box-sizing: border-box;box-sizing: border-box;background-color: unset;z-index: 99999;";let A=document.createElement("img");A.style.cssText="position: relative;width: 110px;height: 110px;margin: auto;top: 50%;left: 50%;margin-top: -55px;margin-left: -55px;",A.src=`${globalThis.GEOWORLD_BASE_URL}Workers/image/loading.gif`,o.appendChild(A),this.loading=o,this.coreMap.container.appendChild(o)};Uf.prototype.isLoading=function(o){o?this.loading.style.display="block":this.loading.style.display="none"};Uf.prototype.removeLoading=function(){this.loading&&this.loading.remove(),this.loading=void 0};function FRi(o){let A=[],f=[];for(let Q=0;Q<o.length;Q++){let M=$t.fromCartesian(o[Q]);A.push(M.longitude),f.push(M.latitude)}let m=0,C=0,y=0,x=0,v=0,E=0,I=0,w=0;for(let Q=0;Q<o.length;Q++)m=A[Q],C=f[Q],Q===o.length-1?(y=A[0],x=f[0]):(y=A[Q+1],x=f[Q+1]),E=m*x-y*C,v+=E,I+=(m+y)*E,w+=(C+x)*E;return v*=.5,I/=6*v,w/=6*v,new $t(I,w)}function NRi(o,A,f){let m=te.distance(o,A),C=te.distance(A,f),y=te.distance(f,o),x=(m+C+y)/2;return Math.sqrt(x*(x-m)*(x-C)*(x-y))}Uf.prototype.computeCutVolume=function(){let o=15e3;for(let k=0;k<this._positions.length;k++){let G=$t.fromCartesian(this._positions[k]),V=this._scene.globe.getHeight(G);o>V&&(o=V)}let A=Math.PI/Math.pow(2,11);A=A/64;let f=new Id.fromPositions({positions:this._positions,vertexFormat:Ya.FLAT_VERTEX_FORMAT,granularity:A}),m=new Id.createGeometry(f),C=0,y=0,x,v,E,I,w,Q,M,B,T,D,F,L;for(let k=0;k<m.indices.length;k+=3)x=m.indices[k],v=m.indices[k+1],E=m.indices[k+2],D=new te(m.attributes.position.values[x*3],m.attributes.position.values[x*3+1],m.attributes.position.values[x*3+2]),F=$t.fromCartesian(D),I=this._scene.globe.getHeight(F),M=te.fromRadians(F.longitude,F.latitude,0),y<I&&(y=I),D=new te(m.attributes.position.values[v*3],m.attributes.position.values[v*3+1],m.attributes.position.values[v*3+2]),F=$t.fromCartesian(D),w=this._scene.globe.getHeight(F),B=te.fromRadians(F.longitude,F.latitude,0),y<w&&(y=w),D=new te(m.attributes.position.values[E*3],m.attributes.position.values[E*3+1],m.attributes.position.values[E*3+2]),F=$t.fromCartesian(D),Q=this._scene.globe.getHeight(F),T=te.fromRadians(F.longitude,F.latitude,0),y<Q&&(y=Q),L=NRi(M,B,T),C=C+L*(I-o+w-o+Q-o)/3;let R=FRi(this._positions);return this._volumeLabel=this._cesiumViewer.entities.add({position:te.fromRadians(R.longitude,R.latitude,y+1e3),label:{text:`${C.toFixed(4)}\u7ACB\u65B9\u7C73`}}),{maxHeight:y,volume:C}};var Poe=Uf;function Ylt(o,A){if(this.mEarthCtrl=o,this._parameter=A,this.coreMap=o.coreMap,this._color=Ae(A.color,new ht(1,0,0,.7)),this._positions=A.positions,this._positions.length<3)throw new Hi("invalid positions length!");this._duration=Ae(A.duration,4e3),this._minHeight=Ae(A.minHeight,0),this._maxHeight=Ae(A.maxHeight,100),this._image=A.image,this._pps=null}function kRi(o,A){let f=$t.fromCartesian(o[0]),m=f.longitude,C=f.latitude,y=m,x=C,v=A;for(let E=1;E<o.length;E++){let I=$t.fromCartesian(o[E]);m>I.longitude?m=I.longitude:y<I.longitude&&(y=I.longitude),C>I.latitude?C=I.latitude:x<I.latitude&&(x=I.latitude)}return new te.fromRadians((m+y)/2,(C+x)/2,v)}function ORi(o){if(O(o._pps))return;let A=kRi(o._positions,o._minHeight),f=$t.fromCartesian(A),m=new oi(A.x,A.y,A.z,1),C=new $t(f.longitude,f.latitude,o.maxHeight+100),y=$t.toCartesian(C),x=new oi(y.x,y.y,y.z,1),v=new oi,E=new oi,I=new te,w=o.mEarthCtrl.coreMap.scene.camera,Q=o._positions.length;o._pps=new wa({fragmentShader:GRi(Q),uniforms:{u_floodCenterEC:function(){return Ze.multiplyByVector(w._viewMatrix,m,v)},u_floodPlaneNormalEC:function(){let B=Ze.multiplyByVector(w._viewMatrix,m,v),T=Ze.multiplyByVector(w._viewMatrix,x,E);return I.x=T.x-B.x,I.y=T.y-B.y,I.z=T.z-B.z,te.normalize(I,I),I},u_floodRange:function(){return o._positions},u_minHeight:function(){return o._minHeight},u_maxHeight:function(){return o._maxHeight},u_image:function(){return o.image},u_floodColor:function(){return o._color},u_positionsLength:function(){return o._positions.length}}}),o.mEarthCtrl.coreMap.scene.postProcessStages.add(o._pps)}function URi(o){O(o._pps)&&(o.mEarthCtrl.coreMap.scene.postProcessStages.remove(o._pps),o._pps=null)}function GRi(o){return`uniform sampler2D colorTexture;
uniform sampler2D depthTexture;
varying vec2 v_textureCoordinates;
uniform vec4 u_floodCenterEC;
public/index.html
@@ -13,11 +13,13 @@
  <!-- <link rel="stylesheet" href="./SmartEarthSDK/Workers/css/smartearth.css" />
  <link rel="stylesheet" href="./SmartEarthSDK/Workers/layui/css/layui.css" />
  <script src="./SmartEarthSDK/Workers/jquery-2.0.3.js"></script> -->
  <script src="./CIMSDK/Workers/jquery-2.0.3.js"></script>
  <link rel="stylesheet" href="./SmartEarthSDK/Workers/layui/css/layui.css">
  <link rel="stylesheet" href="./CIMSDK/CimSDK.min.css">
  <script src="./CIMSDK/Workers/jquery-2.0.3.js"></script>
  <script src="./CIMSDK/CimSDK.min.js"></script>
  <script src="proj4/proj4.js"></script>
  <link rel="stylesheet" href="./CIMSDK/Workers/layui/css/layui.css">
  <script src="./config/config.js"></script>
  <script src="./proj4/rollups.js"></script>
</head>
src/assets/js/Map/config.js
@@ -1,5 +1,5 @@
//是否为生产环境
const isWeb = false;
const isWeb = true;
//是否为生产环境
const webUrl = isWeb ? "/web" : "";
//配置文件地址
src/assets/js/Map/index.js
@@ -25,7 +25,7 @@
    // this.Viewer.scene.skyAtmosphere.show = false;
    // this.Viewer.scene.globe.depthTestAgainstTerrain = false;
    this.Viewer.scene.globe.depthTestAgainstTerrain = false;
    window.earthCtrl = this.earthCtrl;
@@ -37,19 +37,20 @@
    sgworld.Creator.SimpleGraphic.edit(true, { editProp: true });
    //=======================
    // window.Viewer.imageryLayers.removeAll();
    window.Viewer.imageryLayers.removeAll();
    //=======================
    // Viewer.scene.globe.showGroundAtmosphere = false;
    // server.AddTmsLayer(config.moonTms);
    // // server.AddWmtesLayer(config.moonWmts);
    // var terrain = new Cesium.CesiumTerrainProvider({
    //   url: config.moonTerrain,
    //   tilingScheme: new Cesium.GeographicTilingScheme({
    //     ellipsoid: Cesium.Ellipsoid.MOON,
    //   }),
    // });
    // window.Viewer.terrainProvider = terrain;
    server.AddWmtesLayer(config.moonWmts);
    var terrain = new Cesium.CesiumTerrainProvider({
      url: config.moonTerrain,
      tilingScheme: new Cesium.GeographicTilingScheme({
        ellipsoid: Cesium.Ellipsoid.MOON,
      }),
    });
    window.Viewer.terrainProvider = terrain;
    // server.AddTmsLayer("http://172.16.2.10:50001/sj_raster/v6/service/10003901/1");
@@ -74,6 +75,8 @@
    // //添加鼠标左击事件
    // this.addMouseLeftClickEvents();
    // this.addMouseMouseMoveEvents();
  },
  //鼠标左键点击事件添加
  addMouseLeftClickEvents() {
src/assets/js/Map/menuTool.js
@@ -1,6 +1,7 @@
import * as turf from "@turf/turf";
import WKT from 'terraformer-wkt-parser'
import rightServer from "./rightServer";
import config from "./config";
import CryptoJS from 'crypto-js';
const menuTool = {
@@ -9,6 +10,7 @@
  oldLeftMenuId: null,
  squareOjb: [],
  localPoint: null,
  colorAll: {
    point: SmartEarth.Cesium.Color.fromCssColorString("#ff0000"),
    polyline: SmartEarth.Cesium.Color.fromCssColorString("#ffff0050"),
@@ -51,8 +53,10 @@
        this.createSimpleGraphic("polygon");
        break;
      case "d2"://等高线分析
        this.setcontour();
        break
      case "d3"://坡度分析
        this.setSlopeMap();
        break
      case "d4": //土方量计算
        this.Volumetric();
@@ -70,6 +74,92 @@
        this.Coordposition();
        break;
    }
  },
  setLocalPosition(res) {
    if (this.localPoint) {
      this.setLocalPositionClose();
    }
    var position = { X: parseFloat(res.lon), Y: parseFloat(res.lat), Altitude: parseFloat(res.alt) };
    this.localPoint = window.sgworld.Creator.CreateImageLabel(
      position,
      config.StaticFileBaseUrl + "/Workers/image/mark.png",
      {},
      0,
      "标签点"
    );
    var id = this.localPoint.item.id;
    window.sgworld.Navigate.flyToObj(this.localPoint.item);
  },
  setLocalPositionClose() {
    this.localPoint.deleteObject();
    this.localPoint = null;
  },
  //坡度分析
  setSlopeMap() {
    const globe = Viewer.scene.globe;
    if (window.material) {
      window.material = null;
      globe.material = null;
      Viewer.scene.globe.enableLighting = false;
      return
    }
    Viewer.scene.globe.enableLighting = true;
    let shadingUniforms = {};
    window.material = Cesium.Material.fromType("ElevationRamp");
    shadingUniforms = material.uniforms;
    shadingUniforms.minimumHeight = -10000;
    shadingUniforms.maximumHeight = 10000;
    shadingUniforms.image = this.getColorRamp();
    globe.material = material;
  },
  getColorRamp() {
    const ramp = document.createElement("canvas");
    ramp.width = 100;
    ramp.height = 1;
    const ctx = ramp.getContext("2d");
    let values = [0, 0.083, 0.166, 0.25, 0.333, 0.416, 0.5, 0.583, 0.666, 0.75, 0.833, 0.916, 0.999, 1];
    const grd = ctx.createLinearGradient(0, 0, 100, 0);
    grd.addColorStop(values[0], "rgb(56,168,0)"); //black
    grd.addColorStop(values[1], "rgb(77,179,0)"); //blue
    grd.addColorStop(values[2], "rgb(102,191,0)"); //pink
    grd.addColorStop(values[3], "rgb(126,204,0)"); //red
    grd.addColorStop(values[4], "rgb(155,217,0)"); //orange
    grd.addColorStop(values[5], "rgb(187,230,0)"); //yellow
    grd.addColorStop(values[6], "rgb(222,242,0)"); //white
    grd.addColorStop(values[7], "rgb(255,255,0)"); //white
    grd.addColorStop(values[8], "rgb(255,221,0)"); //white
    grd.addColorStop(values[9], "rgb(255,183,0)"); //white
    grd.addColorStop(values[10], "rgb(255,145,0)"); //white
    grd.addColorStop(values[11], "rgb(255,111,0)"); //white
    grd.addColorStop(values[12], "rgb(255,72,0)"); //white
    grd.addColorStop(values[13], "rgb(255,38,0)"); //white
    ctx.fillStyle = grd;
    ctx.fillRect(0, 0, 100, 1);
    return ramp;
  },
  //等高线
  setcontour() {
    var globe = window.Viewer.scene.globe;
    if (window.material) {
      window.material = null;
      globe.material = null
      return
    }
    var contourColor = new SmartEarth.Cesium.Color(117 / 255, 71 / 255, 18 / 255, 255 / 255);
    var contourUniforms = {};
    window.material = Cesium.Material.fromType('ElevationContour');
    contourUniforms = material.uniforms;
    contourUniforms.width = 1.0;
    contourUniforms.spacing = 100.0;
    contourUniforms.color = contourColor;
    globe.material = window.material;
  },
  //空间查询
  spatialQuery() {
@@ -263,13 +353,37 @@
  },
  //坐标定位
  Coordposition() { },
  Coordposition() {
    window.functionForJs({
      type: 'coordLocation',
      value: true
    })
  },
  //影像对比
  CurtainContrast() {
    this.toolMenu = earthCtrl.analysis.createCurtainContrast({
      leftIndex: 0,
      rightIndex: 1,
    if (window.DoubleScreen) {
      window.DoubleScreen && window.DoubleScreen.destroy();
      window.DoubleScreen = null;
      const compass = document.getElementsByClassName("bottom_btn")[0];
      compass.style.right = "70px";
      return
    }
    window.DoubleScreen = new SmartEarth.DoubleScreen(window.sgworld, {}, SmartEarth);
    DoubleScreen.right._Viewer.imageryLayers.removeAll()
    var terrain = new Cesium.CesiumTerrainProvider({
      url: config.moonTerrain,
      tilingScheme: new Cesium.GeographicTilingScheme({
        ellipsoid: Cesium.Ellipsoid.MOON,
      }),
    });
    DoubleScreen.right._Viewer.terrainProvider = terrain;
    rightServer.AddWmtesLayer(config.moonWmts)
    const compass = document.getElementsByClassName("bottom_btn")[0];
    compass.style.right = "calc(50% + 70px)";
  },
  //土方量计算
  Volumetric() {
@@ -330,42 +444,65 @@
  },
  //清除按钮
  clearALL(id) {
    debugger
    id.value.forEach((e) => {
      this.clearTopTools(e);
    });
    this.clearTopTools()
    // id.value.forEach((e) => {
    // });
  },
  //清除方法
  clearTopTools(id) {
    if (id) {
      switch (id) {
        case "a2":
          break;
        case "a3":
          break;
        case "b2"://距离测量
        case "b3"://面积测量
        case "b4"://高程测量
        case "b5"://高度测量
          sgworld.Analysis.clearMeasure()
          break;
        case "c2": //点
        case "c3": //文字
        case "c4": //线
        case "c5": //矩形
        case "c6": //多边形
          sgworld.Creator.SimpleGraphic.clear();
          break;
        case "d5":
          this.toolMenu.removeFromMap();
          break;
        case 'f1':
          sgworld.Creator.SimpleGraphic.clear();
          break;
      }
      // this.toolFlag = null;
      this.toolMenu = null;
    // if (id) {
    // switch (id) {
    //   case "a2":
    //     break;
    //   case "a3":
    //     break;
    //   case "b2"://距离测量
    //   case "b3"://面积测量
    //   case "b4"://高程测量
    //   case "b5"://高度测量
    //     break;
    //   case "c2": //点
    //   case "c3": //文字
    //   case "c4": //线
    //   case "c5": //矩形
    //   case "c6": //多边形
    //     break;
    //   case "d5":
    //     break;
    //   case 'f1':
    //     break;
    // }
    if (this.localPoint) {
      this.localPoint.deleteObject();
      this.localPoint = null;
    }
    const globe = Viewer.scene.globe;
    if (window.material) {
      window.material = null;
      globe.material = null;
      Viewer.scene.globe.enableLighting = false;
      return
    }
    if (window.DoubleScreen) {
      window.DoubleScreen && window.DoubleScreen.destroy();
      window.DoubleScreen = null;
      const compass = document.getElementsByClassName("bottom_btn")[0];
      compass.style.right = "70px";
    }
    sgworld.Analysis.clearMeasure()
    sgworld.Creator.SimpleGraphic.clear();
    this.toolMenu.removeFromMap();
    sgworld.Creator.SimpleGraphic.clear();
    // this.toolFlag = null;
    this.toolMenu = null;
    // }
  },
  clearLeftTools(res) { },
};
src/assets/js/Map/rightServer.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
const rightServer = {
    AddWmtesLayer(url) {
        var urlTemplateImageryProvider = DoubleScreen.right.factory.createImageryLayer({
            sourceType: "wmts",
            url: url,
            layer: "",
            format: "image/png",
            tileMatrixSetID: "GoogleCRS84Quad01",
            tileMatrixLabels: [
                "0",
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10",
                "11",
                "12",
                "13",
                "14",
                "15",
                "16",
                "17",
                "18",
            ],
            style: "",
            tilingScheme: new Cesium.GeographicTilingScheme({
                ellipsoid: Cesium.Ellipsoid.MOON,
            }),
        });
    },
}
export default rightServer;
src/components/bottomBtn.vue
@@ -38,7 +38,7 @@
<style lang="less" scoped>
.bottom_btn {
  position: absolute;
  z-index: 39;
  /*  prettier-ignore */
  bottom: 68PX;
  /*  prettier-ignore */
src/components/topBtn.vue
@@ -126,6 +126,7 @@
  right: 0px;
  display: flex;
  cursor: pointer;
  z-index: 39;
  .menu_Box {
    margin-right: 104px;
    display: flex;
src/views/Index.vue
@@ -1,9 +1,6 @@
<template>
  <div class="body_box">
    <div
      id="cesiumContainer"
      style="width: 100%; height: 100%; position: absolute"
    ></div>
    <div id="cesiumContainer"></div>
    <export-map
      v-if="layerExportshow"
      @SETexportMap="SETexportMap"
@@ -15,6 +12,12 @@
      v-if="layerSpatialshow"
      @SETspatialClose="SETspatialClose"
    ></spatial-box>
    <coord-location
      v-if="layerLocationshow"
      @SETcoordClose="setCoordLocation"
    >
    </coord-location>
  </div>
</template>
@@ -38,7 +41,8 @@
import mouseMove from "@/components/mouseMove.vue";
//空间查询
import spatialBox from "@/views/query/SpatialQuery.vue";
//坐标定位
import CoordLocation from "@/views/query/CoordLocation.vue";
import router from "@/router";
import { useStore } from "vuex"; // å¼•å…¥useStore æ–¹æ³•
@@ -47,6 +51,7 @@
const store = useStore(); // è¯¥æ–¹æ³•用于返回store å®žä¾‹
const layerExportshow = ref(false);
const layerSpatialshow = ref(false);
const layerLocationshow = ref(false);
const init = () => {
  viewer = InitMap.Viewer;
  map = InitMap.sgworld;
@@ -64,24 +69,18 @@
    case "spatialQuery":
      setSpatialQuery(res);
      break;
    case "closeNavigatBar":
      setCloseNavigatBar();
      break;
    case "coordLocation":
      setCoordLocation(res);
      break;
  }
};
const setSpatialQuery = async (res) => {
  store.state.spatialQueryData.wkt = res.value;
  layerSpatialshow.value = true;
const setCoordLocation = (res) => {
  layerLocationshow.value = res;
};
const SETspatialClose = (res) => {
  layerSpatialshow.value = res;
};
onMounted(() => {
  var token = getToken();
  if (!token) {
    router.push("/Login");
  }
  InitMap.init3DMap();
  init();
const setCloseNavigatBar = () => {
  const infobar = document.getElementsByClassName("map-info-bar")[0];
  infobar.style.display = "none";
  const navigation = document.getElementsByClassName("navigation-controls")[0];
@@ -90,7 +89,24 @@
  const compass = document.getElementsByClassName("compass")[0];
  compass.style.top = "calc(100% - 280px)";
  compass.style.right = "38px";
};
const setSpatialQuery = async (res) => {
  store.state.spatialQueryData.wkt = res.value;
  layerSpatialshow.value = true;
};
const SETspatialClose = (res) => {
  layerSpatialshow.value = res;
};
onMounted(() => {
  var token = getToken();
  if (!token) {
    router.push("/Login");
  }
  InitMap.init3DMap();
  init();
  // setCloseNavigatBar();
  window.functionForJs = functionForJs;
});
</script>
src/views/query/CoordLocation.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,189 @@
<template>
  <div
    v-drag="true"
    class="coordBox"
  >
    <div class="coordTitle">
      <label>坐标定位</label>
      <el-icon
        @click="setCoordClose"
        :size="20"
      >
        <Close />
      </el-icon>
    </div>
    <div class="coordContent">
      <el-form
        ref="ruleFormRef"
        :model="ruleForm"
        :rules="rules"
      >
        <el-form-item
          label="经度:"
          prop="lon"
        >
          <el-input
            v-model="ruleForm.lon"
            placeholder="请输入经度..."
          />
        </el-form-item>
        <el-form-item
          label="纬度:"
          prop="lat"
        >
          <el-input
            v-model="ruleForm.lat"
            placeholder="请输入纬度..."
          />
        </el-form-item>
        <el-form-item
          label="高度:"
          prop="alt"
        >
          <el-input
            v-model="ruleForm.alt"
            placeholder="请输入高度..."
          />
        </el-form-item>
        <el-form-item>
          <div style=" width: 100%; display: flex;
    justify-content: flex-end !important;">
            <el-button
              size="smal"
              @click="resetForm(ruleFormRef)"
            >清除</el-button>
            <el-button
              size="smal"
              type="primary"
              @click="submitForm(ruleFormRef)"
            >定位</el-button>
          </div>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>
<script lang="ts" setup>
import {
  ref,
  onMounted,
  onBeforeUnmount,
  reactive,
  defineProps,
  defineEmits,
  nextTick,
} from "vue";
import { ElMessage, FormInstance, FormRules } from "element-plus";
import menuTool from "@/assets/js/Map/menuTool.js";
const ruleFormRef = ref<FormInstance>();
const emits = defineEmits(["SETcoordClose"]);
const setCoordClose = () => {
  emits("SETcoordClose", false);
};
const validateLon = (rule: any, value: any, callback: any) => {
  if (!value) {
    return callback(new Error("请输入经度"));
  } else {
    var reg = /^[0-9]+.?[0-9]*$/;
    if (!reg.test(value)) {
      callback(new Error("请输入整数或小数.."));
    } else {
      callback();
    }
  }
};
const validateLat = (rule: any, value: any, callback: any) => {
  if (!value) {
    return callback(new Error("请输入纬度"));
  } else {
    var reg = /^[0-9]+.?[0-9]*$/;
    if (!reg.test(value)) {
      callback(new Error("请输入整数或小数.."));
    } else {
      callback();
    }
  }
};
const validateAlt = (rule: any, value: any, callback: any) => {
  if (!value) {
    return callback(new Error("请输入高度"));
  } else {
    var reg = /^[0-9]+.?[0-9]*$/;
    if (!reg.test(value)) {
      callback(new Error("请输入整数或小数.."));
    } else {
      callback();
    }
  }
};
const ruleForm = reactive({
  lon: "",
  lat: "",
  alt: "",
});
const rules = reactive<FormRules<typeof ruleForm>>({
  lon: [{ validator: validateLon, trigger: "blur" }],
  lat: [{ validator: validateLat, trigger: "blur" }],
  alt: [{ validator: validateAlt, trigger: "blur" }],
});
const submitForm = (formEl: FormInstance | undefined) => {
  if (!formEl) return;
  formEl.validate((valid) => {
    if (valid) {
      menuTool.setLocalPosition(ruleForm);
    } else {
      ElMessage("请检查参数是否输入正确");
      return false;
    }
  });
};
const resetForm = (formEl: FormInstance | undefined) => {
  if (!formEl) return;
  formEl.resetFields();
  menuTool.setLocalPositionClose();
};
</script>
<style lang="less" scoped>
.coordBox {
  width: 400px;
  height: 280px;
  position: absolute;
  z-index: 30;
  bottom: 5%;
  right: 5%;
  background: rgba(7, 8, 14, 0.8);
  border: 1px solid #d6e4ff;
  z-index: 10;
  box-shadow: inset 0px 10px 40px 10px rgba(38, 47, 71, 1);
  border-radius: 5px;
  .coordTitle {
    padding: 10px;
    width: calc(100% - 20px);
    height: 66px;
    color: #d6e4ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 30px;
    label {
      font-size: 16px;
    }
  }
  .coordContent {
    height: calc(100% - 70px);
    width: calc(100% - 40px);
    padding: 10px 20px;
    /deep/.el-form-item__label {
      color: #d6e4ff;
    }
  }
}
</style>
src/views/query/SpatialQuery.vue
@@ -13,64 +13,75 @@
        <Close />
      </el-icon>
    </div>
    <div class="spatialContent">
      <div>
        <el-row :gutter="20">
          <el-col :span="16">
            <el-input
              v-model="listData.filter"
              type="text"
              placeholder="请选择..."
              disabled
            />
          </el-col>
          <el-col :span="8">
            <el-button
              :icon="Plus"
              type="success"
              @click="dialogVisible = true"
            >高级查询</el-button>
            <el-button
              :icon="Refresh"
              type="info"
              @click="setdialogRefresh"
            >重置</el-button>
          </el-col>
        </el-row>
    <div class="spatialContentBox">
      <div class="spatialMenu">
        <ul>
          <li
            v-for="item in menuList"
            @click="setMenuListClick(item)"
            :class="{'isActive':isActive==item.id}"
          >{{ item.name }}</li>
        </ul>
      </div>
      <div class="spatialTable">
        <el-table
          :data="tableData"
          style="width: 100%; height: 73%;"
        >
          <el-table-column
            v-for="(item, index) in attributeData"
            :key="index"
            :label="item.alias"
            :prop="item.field"
            show-overflow-tooltip
            align="center"
            :fit="true"
            width="120"
          ></el-table-column>
        </el-table>
        <div class="spatialBottom">
          <el-pagination
            v-model:current-page="listData.pageIndex"
            v-model:page-size="listData.pageSize"
            :page-sizes="[10, 20, 100, 200]"
            small="small"
            :disabled="false"
            layout="total, sizes, prev, pager, next, jumper"
            :total="listData.count"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
          />
      <div class="spatialContent">
        <div>
          <el-row :gutter="20">
            <el-col :span="16">
              <el-input
                v-model="listData.filter"
                type="text"
                placeholder="请选择..."
                disabled
              />
            </el-col>
            <el-col :span="8">
              <el-button
                :icon="Plus"
                type="success"
                @click="dialogVisible = true"
              >高级查询</el-button>
              <el-button
                :icon="Refresh"
                type="info"
                @click="setdialogRefresh"
              >重置</el-button>
            </el-col>
          </el-row>
        </div>
      </div>
        <div class="spatialTable">
          <el-table
            :data="tableData"
            style="width: 100%; height: 73%;"
          >
            <el-table-column
              v-for="(item, index) in attributeData"
              :key="index"
              :label="item.alias"
              :prop="item.field"
              show-overflow-tooltip
              align="center"
              :fit="true"
              width="120"
            ></el-table-column>
          </el-table>
          <div class="spatialBottom">
            <el-pagination
              v-model:current-page="listData.pageIndex"
              v-model:page-size="listData.pageSize"
              :page-sizes="[10, 20, 100, 200]"
              small="small"
              :disabled="false"
              layout="total, sizes, prev, pager, next, jumper"
              :total="listData.count"
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
            />
          </div>
        </div>
      </div>
    </div>
    <!-- é«˜çº§æŸ¥è¯¢ -->
@@ -168,12 +179,14 @@
const fieldOption = ref([]);
const attributeData = ref([]);
const tableData = ref([]);
const menuList = ref([]);
const formSql = ref({
  field: "",
  type: "",
  value: "",
  cut: "",
});
const isActive = ref(null);
const handleSizeChange = (res) => {
  listData.value.pageSize = res;
  setQueySpatialData();
@@ -182,7 +195,14 @@
  listData.value.pageIndex = res;
  setQueySpatialData();
};
const setMenuListClick = (res) => {
  listData.value.name = res.name;
  isActive.value = res.id;
  listData.value.filter = "";
  listData.value.pageIndex = 1;
  listData.value.pageSize = 10;
  setQueySpatialFields();
};
const setInsertDialog = () => {
  if (!formSql.value.value) {
    return ElMessage.error("请输入要查询的参数");
@@ -290,8 +310,23 @@
//页面初始化
const startQueryData = () => {
  var std = store.state.chekNowLayers;
  if (std.length <= 0) {
    ElMessage.error("请选择要查询的图层");
    setSpatialClose();
    return;
  }
  var str = std.filter((res) => {
    if (res.type == 2) {
      return res;
    }
  });
  menuList.value = str;
  listData.value.wkt = store.state.spatialQueryData.wkt;
  listData.value.name = "lunarplacenane";
  listData.value.name = menuList.value[0].name;
  isActive.value = menuList.value[0].id;
  listData.value.hasGeom = 1;
  //
  setQueySpatialFields();
@@ -303,7 +338,7 @@
<style lang="less" scoped>
.spatialBox {
  width: 800px;
  width: 900px;
  height: 400px;
  display: flex;
  flex-direction: column;
@@ -328,15 +363,46 @@
      font-size: 16px;
    }
  }
  .spatialContentBox {
    height: calc(100% - 40px);
    width: 100%;
    display: flex;
  }
  .spatialMenu {
    width: calc(20% - 20px);
    height: calc(100% - 26px);
    padding: 10px;
    border-right: 1px solid #d6e4ff;
    overflow: auto;
    font-family: Source Han Sans SC;
    ul {
      li {
        color: #d6e4ff;
        font-size: 12px;
        height: 20px;
        border-bottom: 1px solid #409eff;
        box-shadow: inset 0px 5px 20px 5px rgba(38, 47, 71, 1);
        padding: 10px 10px;
        display: flex;
        align-items: center;
      }
      li :hover {
        color: #409eff;
      }
    }
    .isActive {
      color: #409eff;
    }
  }
  .spatialContent {
    height: calc(100% - 10px);
    width: calc(100% - 20px);
    width: calc(80% - 20px);
    padding: 10px;
    .spatialTable {
      margin-top: 10px;
      width: 100%;
      height: calc(100% - 35px);
      height: 100%;
      position: relative;
      .el-table /deep/ .el-table__header-wrapper tr th {
@@ -425,6 +491,31 @@
  /deep/.el-dialog__title {
    color: #d6e4ff !important;
  }
  /* ä¿®æ”¹æ»šåŠ¨æ¡çš„å®½åº¦ä¸º10px,颜色为白色 */
  ::-webkit-scrollbar {
    width: 5px;
    height: 10px;
    background: rgba(38, 47, 71, 0);
    border-radius: 10px;
  }
  /* ä¿®æ”¹æ»šåŠ¨æ¡çš„è½¨é“å’Œæ»‘å—é¢œè‰² */
  ::-webkit-scrollbar-track {
    background: rgba(38, 47, 71, 0);
  }
  ::-webkit-scrollbar-thumb {
    background: #d6e4ff;
  }
  /* hover时滚动条轨道和滑块变色 */
  ::-webkit-scrollbar-thumb:hover {
    background: #d6e4ff;
  }
  ::-webkit-scrollbar-track:hover {
    background: rgba(38, 47, 71, 0);
  }
}
</style> 
<style lang="less"  >
src/views/search/search.vue
@@ -114,7 +114,7 @@
  ArrowRight,
  DArrowRight,
} from "@element-plus/icons-vue";
import config from "@/assets/js/Map/config";
import { dataQuery_selectByPage } from "@/api/api.js";
import { ElMessage } from "element-plus";
let searchValue = ref("");
@@ -145,7 +145,7 @@
  var position = { X: res.lon, Y: res.lat, Altitude: 10 };
  imageLabel = window.sgworld.Creator.CreateImageLabel(
    position,
    "http://183.162.245.49:82/05sdkdemo/src/static/image/mark.png",
    config.StaticFileBaseUrl + "/Workers/image/mark.png",
    {},
    0,
    "标签点"