UNPKG

@kq_npm/client3d_webgl_vue

Version:

KQGIS Client3D for Vue.js

1 lines 2.28 MB
!function(A,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue"),require("@kq_npm/client_common_vue/_utils/mitt"),require("@kq_npm/client_common_vue/_utils/const-image"),require("@kq_npm/client_common_vue/init.js"),require("@kq_npm/client_common_vue/_utils/webmapservice"),require("@kq_npm/client_common_vue/_utils/util"),require("@kq_npm/client_common_vue/_types/global-event"),require("@kq_npm/client_common_vue/_utils/dictionaries"),require("@kq_npm/client_common_vue/_utils/gis-utils"),require("@kq_npm/client_common_vue"),require("@kq_npm/client_common_vue/_lang/index.js"),require("@kq_npm/client_common_vue/_mixin/render"),require("@kq_npm/client3d_webgl_vue")):"function"==typeof define&&define.amd?define("@kq_npm/client3d_webgl_vue",["vue","@kq_npm/client_common_vue/_utils/mitt","@kq_npm/client_common_vue/_utils/const-image","@kq_npm/client_common_vue/init.js","@kq_npm/client_common_vue/_utils/webmapservice","@kq_npm/client_common_vue/_utils/util","@kq_npm/client_common_vue/_types/global-event","@kq_npm/client_common_vue/_utils/dictionaries","@kq_npm/client_common_vue/_utils/gis-utils","@kq_npm/client_common_vue","@kq_npm/client_common_vue/_lang/index.js","@kq_npm/client_common_vue/_mixin/render","@kq_npm/client3d_webgl_vue"],e):"object"==typeof exports?exports["@kq_npm/client3d_webgl_vue"]=e(require("vue"),require("@kq_npm/client_common_vue/_utils/mitt"),require("@kq_npm/client_common_vue/_utils/const-image"),require("@kq_npm/client_common_vue/init.js"),require("@kq_npm/client_common_vue/_utils/webmapservice"),require("@kq_npm/client_common_vue/_utils/util"),require("@kq_npm/client_common_vue/_types/global-event"),require("@kq_npm/client_common_vue/_utils/dictionaries"),require("@kq_npm/client_common_vue/_utils/gis-utils"),require("@kq_npm/client_common_vue"),require("@kq_npm/client_common_vue/_lang/index.js"),require("@kq_npm/client_common_vue/_mixin/render"),require("@kq_npm/client3d_webgl_vue")):A["@kq_npm/client3d_webgl_vue"]=e(A.Vue,A["@kq_npm/client_common_vue/_utils/mitt"],A["@kq_npm/client_common_vue/_utils/const-image"],A["@kq_npm/client_common_vue/init.js"],A["@kq_npm/client_common_vue/_utils/webmapservice"],A["@kq_npm/client_common_vue/_utils/util"],A["@kq_npm/client_common_vue/_types/global-event"],A["@kq_npm/client_common_vue/_utils/dictionaries"],A["@kq_npm/client_common_vue/_utils/gis-utils"],A["@kq_npm/client_common_vue"],A["@kq_npm/client_common_vue/_lang/index.js"],A["@kq_npm/client_common_vue/_mixin/render"],A["@kq_npm/client3d_webgl_vue"])}(this,(function(A,e,t,a,l,i,o,g,r,n,s,C,I){return function(){var d,u,c={868:function(A,e,t){"use strict";var a=t(645),l=t.n(a)()((function(A){return A[1]}));l.push([A.id,".coord-sightline{background:rgba(42,42,42,.8);border-radius:4px;padding:5px;color:#edffff;font-size:15px}.coord-sightline .triangle{display:block;height:16px;width:16px;background-color:inherit;border:inherit;position:absolute;bottom:-8px;left:calc(50% - 8px);clip-path:polygon(0% 0%, 100% 100%, 0% 100%);transform:rotate(-45deg)}",""]),e.Z=l},638:function(A,e,t){"use strict";var a=t(645),l=t.n(a)()((function(A){return A[1]}));l.push([A.id,".compare-layer-tree-wrap{background-color:var(--kq-bg-color);border-radius:var(--kq-border-radius-base);width:272px;height:350px;padding:16px}.compare-layer-tree-wrap .compare-layer-tree{padding-top:16px;height:calc(100% - 83px);overflow-y:auto}.compare-layer-tree-wrap .compare-layer-tree .tree-node_icon{top:3px}.tree-node_icon{margin-right:6px;position:relative;font-size:16px;height:100%;color:var(--kq-color-primary)}.tree-node_label{display:inline-block;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;font-size:var(--kq-font-size-base);color:var(--kq-text-color-regular)}.kq-tree-node__content{width:100%}",""]),e.Z=l},764:function(A,e,t){"use strict";var a=t(645),l=t.n(a)()((function(A){return A[1]}));l.push([A.id,".gp[data-v-b1608504]{display:flex;flex-direction:column;align-items:flex-start}.gp .palette[data-v-b1608504]{width:257px;height:16px}.gp .csh[data-v-b1608504]{width:257px;height:17.5px;position:relative;cursor:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAATUlEQVQ4T2NkwAH+////HybFyMjIiE0ZVkGQQpBmkB6QGaOaEUHHiByq6CEKCzBcMQLWjCMmcOkBi4NjgSKb8SWS0XjGDB28GYNQrgIAPsNjBG37r7sAAAAASUVORK5CYII=),crosshair !important}",""]),e.Z=l},445:function(A,e,t){"use strict";var a=t(645),l=t.n(a)()((function(A){return A[1]}));l.push([A.id,".cs[data-v-c771bfde]{position:absolute;width:10px;cursor:pointer}.cs[data-v-c771bfde] .kq-color-picker{display:block}.cs[data-v-c771bfde] .kq-color-picker .kq-color-picker__trigger{display:flex;height:8px;width:10px;border:none;border-radius:0}.cs[data-v-c771bfde] .kq-color-picker .kq-color-picker__trigger .kq-color-picker__color{border:none;height:8px;width:10px}.cs[data-v-c771bfde] .kq-color-picker .kq-color-picker__trigger .kq-color-picker__color .kq-color-picker__color-inner{height:8px;width:10px}.cs[data-v-c771bfde] .kq-color-picker .kq-color-picker__trigger .kq-color-picker__color .kq-color-picker__color-inner .kq-color-picker__icon{display:none}.cs[data-v-c771bfde] .kq-color-picker .kq-color-picker__mask{display:none}.cs[data-v-c771bfde] .kq-color-picker:hover:not(.is-disabled) .kq-color-picker__trigger{border:none}.cs[data-v-c771bfde] .kq-color-picker.is-disabled .kq-color-picker__trigger{cursor:pointer}.cs .delete[data-v-c771bfde]{display:none;font-size:12px;line-height:normal;text-align:center;margin-left:-16px}.cs:hover .delete[data-v-c771bfde]{display:block}.cs .arrow[data-v-c771bfde]{width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-bottom:4px solid #d9d9d9}.cs .content[data-v-c771bfde]{height:8px;width:10px;border:1px solid #d9d9d9;box-sizing:border-box}",""]),e.Z=l},835:function(A,e,t){"use strict";var a=t(645),l=t.n(a)()((function(A){return A[1]}));l.push([A.id,".kq-dynamicplotting-component[data-v-c8ae73fc]{background-color:var(--kq-bg-color);box-shadow:var(--kq-box-shadow);padding:var(--kq-box-padding);height:516px;width:380px}.kq-dynamicplotting-component .kq-tabs__content[data-v-c8ae73fc],.kq-dynamicplotting-component .el-tabs__content[data-v-c8ae73fc]{height:377px}.kq-dynamicplotting-component .kq-tabs__content .plottingsymboltree[data-v-c8ae73fc],.kq-dynamicplotting-component .el-tabs__content .plottingsymboltree[data-v-c8ae73fc]{height:377px;width:100%}.kq-dynamicplotting-component .kq-tabs__content .plottingsymboltree .tabPaneTop[data-v-c8ae73fc],.kq-dynamicplotting-component .el-tabs__content .plottingsymboltree .tabPaneTop[data-v-c8ae73fc]{height:calc(100% - 211px)}.kq-dynamicplotting-component .kq-tabs__content .plottingsymboltree .downBoxId[data-v-c8ae73fc],.kq-dynamicplotting-component .el-tabs__content .plottingsymboltree .downBoxId[data-v-c8ae73fc]{height:calc(100% - 125px)}.kq-dynamicplotting-component .kq-tabs__content .plotprojecttree[data-v-c8ae73fc],.kq-dynamicplotting-component .el-tabs__content .plotprojecttree[data-v-c8ae73fc]{height:377px;width:100%}.kq-dynamicplotting-component .kq-tabs__content .plotprojectgrouplist[data-v-c8ae73fc],.kq-dynamicplotting-component .el-tabs__content .plotprojectgrouplist[data-v-c8ae73fc]{height:377px;width:100%}.kq-dynamicplotting-component .serverHeader .row[data-v-c8ae73fc]{display:flex;font-family:Microsoft YaHei;font-size:14px;font-style:normal;font-weight:400;color:var(--kq-text-color-regular)}.kq-dynamicplotting-component .serverHeader .row .tit[data-v-c8ae73fc]{line-height:32px}.kq-dynamicplotting-component .serverHeader .row .cont[data-v-c8ae73fc]{flex:auto;display:flex}.kq-dynamicplotting-component .serverHeader .row .cont .kq-select[data-v-c8ae73fc]{width:100%}.kq-dynamicplotting-component .serverContent[data-v-c8ae73fc]{margin-top:8px;height:32px}.kq-dynamicplotting-component .serverContent .row[data-v-c8ae73fc]{display:flex;height:32px}.kq-dynamicplotting-component .serverContent .row .tit[data-v-c8ae73fc]{width:50px;display:flex;align-content:center;flex-wrap:wrap}.kq-dynamicplotting-component .serverContent .row .cont[data-v-c8ae73fc]{width:calc(100% - 50px);display:flex}.kq-dynamicplotting-component .serverContent .row .kq-plot-edit-tool[data-v-c8ae73fc]{left:auto !important;top:auto !important}.kq-dynamicplotting-component .symbol_manage[data-v-c8ae73fc]{position:absolute;z-index:999;width:32px;height:32px;margin:0;top:50px;right:16px;border:none;box-shadow:var(--kq-light-shadow)}.kq-dynamicplotting-component .kq-plot-element-attribute-edit[data-v-c8ae73fc]{max-height:460px}.kq-dynamicplotting-component .kq-divider--horizontal[data-v-c8ae73fc]{margin:8px 0}",""]),e.Z=l},827:function(A,e,t){"use strict";var a=t(645),l=t.n(a)()((function(A){return A[1]}));l.push([A.id,".tool-bar-wrapper-3d-component .tool-bar-wrapper-item-component[data-v-3e63a462]{position:absolute;top:21px;right:76px;z-index:1000}.tool-bar-wrapper-3d-component .kq-tool-bar .kq-tool-bar-wrap>ul[data-v-3e63a462]:first-child{border-radius:4px 0 0 4px}.tool-bar-wrapper-3d-component .kq-tool-bar .kq-tool-bar-wrap>ul[data-v-3e63a462]:last-child{border-radius:0 4px 4px 0}.tool-bar-wrapper-3d-component .ctrl-btn[data-v-3e63a462]{position:absolute;top:0;right:0px;height:38px;width:19px;padding:0;border:none;box-shadow:var(--kq-light-shadow);transition:all .15s ease-in-out}.tool-bar-wrapper-3d-component .ctrl-btn.ctrl-btn-hide .kq-icon[data-v-3e63a462]{transform:rotate(180deg)}",""]),e.Z=l},68:function(A,e,t){"use strict";var a=t(645),l=t.n(a)()((function(A){return A[1]}));l.push([A.id,'.tool-box-wrapper-3d .kq-icon_grid{color:var(--kq-color-primary)}.tool-box-wrapper-3d .tool-box-wrapper-item{position:absolute;top:16px;right:16px;z-index:997}.tool-box-wrapper-3d .kq-tool-box .kq-tool-box-items-warp{border-radius:0 0 4px 4px}.tool-box-wrapper-3d .tool-box-header{background-color:var(--kq-color-primary);height:40px;padding:0 16px;border-radius:4px 4px 0 0;position:relative}.tool-box-wrapper-3d .tool-box-header::after{content:"";display:block;width:0;height:0;border-bottom:8px solid var(--kq-color-primary);border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);position:absolute;top:-8px;right:18px}.tool-box-wrapper-3d .tool-box-header h3{margin:0;padding:0;color:#fff;font-size:var(--kq-font-size-base);font-weight:600px;line-height:40px}.tool-box-wrapper-3d .ctrl-btn{position:absolute;top:0;right:0;height:48px;width:48px;padding:0;border-radius:50%;border:none;box-shadow:var(--kq-box-shadow);transition:all .15s ease-in-out}.tool-box-wrapper-3d .ctrl-btn.ctrl-btn-hide .kq-icon{transform:rotate(180deg)}',""]),e.Z=l},902:function(A,e,t){"use strict";var a=t(645),l=t.n(a)()((function(A){return A[1]}));l.push([A.id,".cesium-performanceDisplay-defaultContainer{top:unset !important;bottom:16px;right:64px !important}",""]),e.Z=l},541:function(A,e,t){"use strict";var a=t(645),l=t.n(a)()((function(A){return A[1]}));l.push([A.id,".cesium-viewer-bottom{right:0px !important;display:flex;justify-content:center}.cesium-viewer-bottom .cesium-viewer-statusContainer{bottom:16px !important;font-size:14px;right:unset}",""]),e.Z=l},956:function(A,e,t){"use strict";var a=t(645),l=t.n(a)()((function(A){return A[1]}));l.push([A.id,"\n.print3-close-button[data-v-061f2d10] {\r\n padding: 0px !important;\r\n position: absolute;\r\n color: var(--kq-color-primary);\r\n top: 16px;\r\n right: 66px;\r\n cursor: pointer;\r\n width: 42px;\r\n height: 42px;\r\n font-size: 22px;\r\n z-index: 999999;\r\n border-radius: 50%;\r\n box-shadow: var(--kq-light-shadow);\n}\r\n",""]),e.Z=l},645:function(A){"use strict";A.exports=function(A){var e=[];return e.toString=function(){return this.map((function(e){var t=A(e);return e[2]?"@media ".concat(e[2]," {").concat(t,"}"):t})).join("")},e.i=function(A,t,a){"string"==typeof A&&(A=[[null,A,""]]);var l={};if(a)for(var i=0;i<this.length;i++){var o=this[i][0];null!=o&&(l[o]=!0)}for(var g=0;g<A.length;g++){var r=[].concat(A[g]);a&&l[r[0]]||(t&&(r[2]?r[2]="".concat(t," and ").concat(r[2]):r[2]=t),e.push(r))}},e}},379:function(A,e,t){"use strict";var a,l=function(){return void 0===a&&(a=Boolean(window&&document&&document.all&&!window.atob)),a},i=function(){var A={};return function(e){if(void 0===A[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(A){t=null}A[e]=t}return A[e]}}(),o=[];function g(A){for(var e=-1,t=0;t<o.length;t++)if(o[t].identifier===A){e=t;break}return e}function r(A,e){for(var t={},a=[],l=0;l<A.length;l++){var i=A[l],r=e.base?i[0]+e.base:i[0],n=t[r]||0,s="".concat(r," ").concat(n);t[r]=n+1;var C=g(s),I={css:i[1],media:i[2],sourceMap:i[3]};-1!==C?(o[C].references++,o[C].updater(I)):o.push({identifier:s,updater:p(I,e),references:1}),a.push(s)}return a}function n(A){var e=document.createElement("style"),a=A.attributes||{};if(void 0===a.nonce){var l=t.nc;l&&(a.nonce=l)}if(Object.keys(a).forEach((function(A){e.setAttribute(A,a[A])})),"function"==typeof A.insert)A.insert(e);else{var o=i(A.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(e)}return e}var s,C=(s=[],function(A,e){return s[A]=e,s.filter(Boolean).join("\n")});function I(A,e,t,a){var l=t?"":a.media?"@media ".concat(a.media," {").concat(a.css,"}"):a.css;if(A.styleSheet)A.styleSheet.cssText=C(e,l);else{var i=document.createTextNode(l),o=A.childNodes;o[e]&&A.removeChild(o[e]),o.length?A.insertBefore(i,o[e]):A.appendChild(i)}}function d(A,e,t){var a=t.css,l=t.media,i=t.sourceMap;if(l?A.setAttribute("media",l):A.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),A.styleSheet)A.styleSheet.cssText=a;else{for(;A.firstChild;)A.removeChild(A.firstChild);A.appendChild(document.createTextNode(a))}}var u=null,c=0;function p(A,e){var t,a,l;if(e.singleton){var i=c++;t=u||(u=n(e)),a=I.bind(null,t,i,!1),l=I.bind(null,t,i,!0)}else t=n(e),a=d.bind(null,t,e),l=function(){!function(A){if(null===A.parentNode)return!1;A.parentNode.removeChild(A)}(t)};return a(A),function(e){if(e){if(e.css===A.css&&e.media===A.media&&e.sourceMap===A.sourceMap)return;a(A=e)}else l()}}A.exports=function(A,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=l());var t=r(A=A||[],e);return function(A){if(A=A||[],"[object Array]"===Object.prototype.toString.call(A)){for(var a=0;a<t.length;a++){var l=g(t[a]);o[l].references--}for(var i=r(A,e),n=0;n<t.length;n++){var s=g(t[n]);0===o[s].references&&(o[s].updater(),o.splice(s,1))}t=i}}}},744:function(A,e){"use strict";e.Z=(A,e)=>{const t=A.__vccOpts||A;for(const[A,a]of e)t[A]=a;return t}},347:function(A){A.exports=function(){"use strict";class A{constructor(A){this.standards={strict:"strict",loose:"loose",html5:"html5"},this.previewBody=null,this.close=null,this.previewBodyUtilPrintBtn=null,this.selectArray=[],this.counter=0,this.settings={standard:this.standards.html5},Object.assign(this.settings,A),this.init()}init(){this.counter++,this.settings.id=`printArea_${this.counter}`;let A="";this.settings.url&&!this.settings.asyncUrl&&(A=this.settings.url);let e=this;if(this.settings.asyncUrl)return void e.settings.asyncUrl((function(A){let t=e.getPrintWindow(A);e.settings.preview?e.previewIfrmaeLoad():e.print(t)}),e.settings.vue);let t=this.getPrintWindow(A);this.settings.url||this.write(t.doc),this.settings.preview?this.previewIfrmaeLoad():this.print(t)}addEvent(A,e,t){A.addEventListener?A.addEventListener(e,t,!1):A.attachEvent?A.attachEvent("on"+e,t):A["on"+e]=t}previewIfrmaeLoad(){let A=document.getElementById("vue-pirnt-nb-previewBox");if(A){let e=this,t=A.querySelector("iframe");this.settings.previewBeforeOpenCallback(),this.addEvent(t,"load",(function(){e.previewBoxShow(),e.removeCanvasImg(),e.settings.previewOpenCallback()})),this.addEvent(A.querySelector(".previewBodyUtilPrintBtn"),"click",(function(){e.settings.beforeOpenCallback(),e.settings.openCallback(),t.contentWindow.print(),e.settings.closeCallback()}))}}removeCanvasImg(){let A=this;try{if(A.elsdom){let e=A.elsdom.querySelectorAll(".canvasImg");for(let A=0;A<e.length;A++)e[A].remove()}}catch(A){}}print(A){var e=this;let t=document.getElementById(this.settings.id)||A.f,a=document.getElementById(this.settings.id).contentWindow||A.f.contentWindow;e.settings.beforeOpenCallback(),e.addEvent(t,"load",(function(){a.focus(),e.settings.openCallback(),a.print(),t.remove(),e.settings.closeCallback(),e.removeCanvasImg()}))}write(A){A.open(),A.write(`${this.docType()}<html>${this.getHead()}${this.getBody()}</html>`),A.close()}docType(){return this.settings.standard===this.standards.html5?"<!DOCTYPE html>":`<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01${this.settings.standard===this.standards.loose?" Transitional":""}//EN" "http://www.w3.org/TR/html4/${this.settings.standard===this.standards.loose?"loose":"strict"}.dtd">`}getHead(){let A="",e="",t="";this.settings.extraHead&&this.settings.extraHead.replace(/([^,]+)/g,(e=>{A+=e})),[].forEach.call(document.querySelectorAll("link"),(function(A){A.href.indexOf(".css")>=0&&(e+=`<link type="text/css" rel="stylesheet" href="${A.href}" >`)}));let a=document.styleSheets;if(a&&a.length>0)for(let A=0;A<a.length;A++)try{if(a[A].cssRules||a[A].rules){let e=a[A].cssRules||a[A].rules;for(let A=0;A<e.length;A++)t+=e[A].cssText}}catch(A){}return this.settings.extraCss&&this.settings.extraCss.replace(/([^,\s]+)/g,(A=>{e+=`<link type="text/css" rel="stylesheet" href="${A}">`})),`<head><title>${this.settings.popTitle}</title>${A}${e}<style type="text/css">${t}</style></head>`}getBody(){let A=this.settings.ids;return A=A.replace(new RegExp("#","g"),""),this.elsdom=this.beforeHanler(document.getElementById(A)),"<body>"+this.getFormData(this.elsdom).outerHTML+"</body>"}beforeHanler(A){let e=A.querySelectorAll("canvas");for(let A=0;A<e.length;A++)if(!e[A].style.display){let t=e[A].parentNode,a=e[A].toDataURL("image/png"),l=new Image,i=e[A].attributes;for(let A=0;A<i.length;A++)switch(i[A].name){case"class":l.className=i[A].value;break;case"width":case"height":l[i[A].name]=i[A].value;break;case"style":const e=i[A].value.split(";");for(let A=0;A<e.length;A++){if(""===e[A].trim())continue;let t=e[A].split(":"),a=t[0].trim(),i=t[1].trim();l.style[a]=i}}l.className+=" canvasImg",l.style.display="none",l.src=a,t.appendChild(l)}return A}getFormData(A){let e=A.cloneNode(!0),t=e.querySelectorAll("input,select,textarea"),a=e.querySelectorAll(".canvasImg,canvas"),l=-1;for(let A=0;A<a.length;A++){let e=a[A].parentNode,t=a[A];"canvas"===t.tagName.toLowerCase()?e.removeChild(t):t.style.display="block"}for(let e=0;e<t.length;e++){let a=t[e],i=a.getAttribute("type"),o=t[e];if(i||(i="SELECT"===a.tagName?"select":"TEXTAREA"===a.tagName?"textarea":""),"INPUT"===a.tagName)"radio"===i||"checkbox"===i?a.checked&&o.setAttribute("checked",a.checked):(o.value=a.value,o.setAttribute("value",a.value));else if("select"===i){l++;for(let e=0;e<A.querySelectorAll("select").length;e++){let t=A.querySelectorAll("select")[e];if(!t.getAttribute("newbs")&&t.setAttribute("newbs",e),t.getAttribute("newbs")==l){let e=A.querySelectorAll("select")[l].selectedIndex;a.options[e].setAttribute("selected",!0)}}}else o.innerHTML=a.value,o.setAttribute("html",a.value)}return e}getPrintWindow(A){var e=this.Iframe(A);return{f:e,win:e.contentWindow||e,doc:e.doc}}previewBoxShow(){let A=document.getElementById("vue-pirnt-nb-previewBox");A&&(document.querySelector("html").setAttribute("style","overflow: hidden"),A.style.display="block")}previewBoxHide(){let A=document.getElementById("vue-pirnt-nb-previewBox");A&&(document.querySelector("html").setAttribute("style","overflow: visible;"),A.querySelector("iframe")&&A.querySelector("iframe").remove(),A.style.display="none")}previewBox(){let A=document.getElementById("vue-pirnt-nb-previewBox"),e="previewBody";if(A)return A.querySelector("iframe")&&A.querySelector("iframe").remove(),{close:A.querySelector(".previewClose"),previewBody:A.querySelector(".previewBody")};let t=document.createElement("div");t.setAttribute("id","vue-pirnt-nb-previewBox"),t.setAttribute("style","position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background: white;display:none"),t.style.zIndex=this.settings.zIndex;let a=document.createElement("div");a.setAttribute("class","previewHeader"),a.setAttribute("style","padding: 5px 20px;"),a.innerHTML=this.settings.previewTitle,t.appendChild(a),this.close=document.createElement("div");let l=this.close;l.setAttribute("class","previewClose"),l.setAttribute("style","position: absolute;top: 5px;right: 20px;width: 25px;height: 20px;cursor: pointer;");let i=document.createElement("div"),o=document.createElement("div");i.setAttribute("class","closeBefore"),i.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(45deg); top: 0px;left: 50%;"),o.setAttribute("class","closeAfter"),o.setAttribute("style","position: absolute;width: 3px;height: 100%;background: #040404;transform: rotate(-45deg); top: 0px;left: 50%;"),l.appendChild(i),l.appendChild(o),a.appendChild(l),this.previewBody=document.createElement("div");let g=this.previewBody;g.setAttribute("class",e),g.setAttribute("style","display: flex;flex-direction: column; height: 100%;"),t.appendChild(g);let r=document.createElement("div");r.setAttribute("class","previewBodyUtil"),r.setAttribute("style","height: 32px;background: #474747;position: relative;"),g.appendChild(r),this.previewBodyUtilPrintBtn=document.createElement("div");let n=this.previewBodyUtilPrintBtn;return n.setAttribute("class","previewBodyUtilPrintBtn"),n.innerHTML=this.settings.previewPrintBtnLabel,n.setAttribute("style","position: absolute;padding: 2px 10px;margin-top: 3px;left: 24px;font-size: 14px;color: white;cursor: pointer;background-color: rgba(0,0,0,.12);background-image: linear-gradient(hsla(0,0%,100%,.05),hsla(0,0%,100%,0));background-clip: padding-box;border: 1px solid rgba(0,0,0,.35);border-color: rgba(0,0,0,.32) rgba(0,0,0,.38) rgba(0,0,0,.42);box-shadow: inset 0 1px 0 hsla(0,0%,100%,.05), inset 0 0 1px hsla(0,0%,100%,.15), 0 1px 0 hsla(0,0%,100%,.05);"),r.appendChild(n),document.body.appendChild(t),{close:this.close,previewBody:this.previewBody}}iframeBox(A,e){let t=document.createElement("iframe");return t.style.border="0px",t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.style.right="0px",t.style.top="0px",t.setAttribute("id",A),t.setAttribute("src",e),t}Iframe(A){let e=this.settings.id;A=A||(new Date).getTime();let t=this,a=this.iframeBox(e,A);try{if(this.settings.preview){a.setAttribute("style","border: 0px;flex: 1;");let A=this.previewBox(),e=A.previewBody,l=A.close;e.appendChild(a),this.addEvent(l,"click",(function(){t.previewBoxHide()}))}else document.body.appendChild(a);a.doc=null,a.doc=a.contentDocument?a.contentDocument:a.contentWindow?a.contentWindow.document:a.document}catch(A){throw new Error(A+". iframes may not be supported in this browser.")}if(null==a.doc)throw new Error("Cannot find document.");return a}}var e={directiveName:"print",mounted(e,t,a){let l=t.instance,i="";var o,g,r;g="click",r=()=>{if("string"==typeof t.value)i=t.value;else{if("object"!=typeof t.value||!t.value.id)return void window.print();{i=t.value.id;let A=i.replace(new RegExp("#","g"),"");document.getElementById(A)||(i="")}}n()},(o=e).addEventListener?o.addEventListener(g,r,!1):o.attachEvent?o.attachEvent("on"+g,r):o["on"+g]=r;const n=()=>{new A({ids:i,vue:l,url:t.value.url,standard:"",extraHead:t.value.extraHead,extraCss:t.value.extraCss,zIndex:t.value.zIndex||20002,previewTitle:t.value.previewTitle||"打印预览",previewPrintBtnLabel:t.value.previewPrintBtnLabel||"打印",popTitle:t.value.popTitle,preview:t.value.preview||!1,asyncUrl:t.value.asyncUrl,previewBeforeOpenCallback(){t.value.previewBeforeOpenCallback&&t.value.previewBeforeOpenCallback(l)},previewOpenCallback(){t.value.previewOpenCallback&&t.value.previewOpenCallback(l)},openCallback(){t.value.openCallback&&t.value.openCallback(l)},closeCallback(){t.value.closeCallback&&t.value.closeCallback(l)},beforeOpenCallback(){t.value.beforeOpenCallback&&t.value.beforeOpenCallback(l)}})}},install:function(A){A.directive("print",e)}};return e}()},618:function(A){"use strict";A.exports=require("shpjs")},459:function(A){"use strict";A.exports=I},64:function(A){"use strict";A.exports=n},775:function(A){"use strict";A.exports=s},678:function(A){"use strict";A.exports=C},536:function(A){"use strict";A.exports=o},277:function(A){"use strict";A.exports=t},569:function(A){"use strict";A.exports=g},135:function(A){"use strict";A.exports=r},905:function(A){"use strict";A.exports=e},458:function(A){"use strict";A.exports=i},217:function(A){"use strict";A.exports=l},997:function(A){"use strict";A.exports=a},895:function(e){"use strict";e.exports=A}},p={};function m(A){var e=p[A];if(void 0!==e)return e.exports;var t=p[A]={id:A,exports:{}};return c[A].call(t.exports,t,t.exports,m),t.exports}m.n=function(A){var e=A&&A.__esModule?function(){return A.default}:function(){return A};return m.d(e,{a:e}),e},u=Object.getPrototypeOf?function(A){return Object.getPrototypeOf(A)}:function(A){return A.__proto__},m.t=function(A,e){if(1&e&&(A=this(A)),8&e)return A;if("object"==typeof A&&A){if(4&e&&A.__esModule)return A;if(16&e&&"function"==typeof A.then)return A}var t=Object.create(null);m.r(t);var a={};d=d||[null,u({}),u([]),u(u)];for(var l=2&e&&A;"object"==typeof l&&!~d.indexOf(l);l=u(l))Object.getOwnPropertyNames(l).forEach((function(e){a[e]=function(){return A[e]}}));return a.default=function(){return A},m.d(t,a),t},m.d=function(A,e){for(var t in e)m.o(e,t)&&!m.o(A,t)&&Object.defineProperty(A,t,{enumerable:!0,get:e[t]})},m.o=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},m.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},m.nc=void 0;var y={};return function(){"use strict";m.r(y),m.d(y,{Kq3dAddData:function(){return Qo},Kq3dAddDataViewModel:function(){return No},Kq3dAspectAnalysis:function(){return pi},Kq3dAspectAnalysisViewModel:function(){return Ii},Kq3dBaseterrainGallery:function(){return ee},Kq3dBaseterrainGalleryViewModel:function(){return WA},Kq3dBoxClip:function(){return oo},Kq3dBoxClipViewModel:function(){return $i},Kq3dClientPrint:function(){return FA},Kq3dCompareMap:function(){return Cg},Kq3dCompareMapViewModel:function(){return Ho},Kq3dCompass:function(){return W},Kq3dCompassViewModel:function(){return L},Kq3dExcavateFillAnalysis:function(){return Gl},Kq3dExcavateFillAnalysisViewModel:function(){return Ol},Kq3dFixedZoomin:function(){return D},Kq3dFixedZoominViewModel:function(){return j},Kq3dFixedZoomout:function(){return E},Kq3dFixedZoomoutViewModel:function(){return b},Kq3dFlight:function(){return et},Kq3dFlightViewModel:function(){return Je},Kq3dFloodAnalysis:function(){return _l},Kq3dFloodAnalysisViewModel:function(){return Pl},Kq3dGPUSpatialQuery:function(){return rt},Kq3dGPUSpatialQueryViewModel:function(){return lt},Kq3dGeologicalBodyAnalysis:function(){return wr},Kq3dGeologicalBodyAnalysisViewModel:function(){return cr},Kq3dHawkeye:function(){return hg},Kq3dHawkeyeViewModel:function(){return mg},Kq3dHeatmap:function(){return ya},Kq3dHeatmapViewModel:function(){return _t},Kq3dIsolineAnalysis:function(){return _i},Kq3dIsolineAnalysisViewModel:function(){return Ui},Kq3dLight:function(){return ur},Kq3dLightViewModel:function(){return sr},Kq3dLimitHeightAnalysis:function(){return vt},Kq3dLimitHeightAnalysisViewModel:function(){return ft},Kq3dMeasure:function(){return We},Kq3dMeasureViewModel:function(){return te},Kq3dModelExcavate:function(){return Ta},Kq3dModelExcavateViewModel:function(){return Na},Kq3dModelFilter:function(){return Tt},Kq3dModelFilterViewModel:function(){return ut},Kq3dModelFlat:function(){return xa},Kq3dModelFlatViewModel:function(){return Sa},Kq3dModelProfileAnalysis:function(){return Vl},Kq3dModelProfileAnalysisViewModel:function(){return cl},Kq3dModelSelect:function(){return dt},Kq3dModelSelectViewModel:function(){return nt},Kq3dParticleEffect:function(){return Fo},Kq3dParticleEffectViewModel:function(){return Ko},Kq3dPlaneClip:function(){return po},Kq3dPlaneClipViewModel:function(){return go},Kq3dResetView:function(){return R},Kq3dResetViewViewModel:function(){return O},Kq3dRoller:function(){return Sg},Kq3dRollerViewModel:function(){return Vg},Kq3dScanEffect:function(){return Ht},Kq3dScanEffectViewModel:function(){return Pt},Kq3dSceneAdvancedToImage:function(){return Gt},Kq3dSceneAdvancedToImageViewModel:function(){return Ft},Kq3dSceneSet:function(){return nr},Kq3dSceneSetViewModel:function(){return ar},Kq3dSceneToHDImage:function(){return Lt},Kq3dSceneToHDImageViewModel:function(){return Ot},Kq3dScreenShot:function(){return pg},Kq3dScreenshotViewModel:function(){return Ig},Kq3dShadowAnalysis:function(){return sl},Kq3dShadowAnalysisViewModel:function(){return el},Kq3dSightlineAnalysis:function(){return Xa},Kq3dSightlineAnalysisViewModel:function(){return Ja},Kq3dSkylineAnalysis:function(){return bl},Kq3dSkylineAnalysisViewModel:function(){return Ml},Kq3dSlopeAnalysis:function(){return Ci},Kq3dSlopeAnalysisViewModel:function(){return $l},Kq3dSlopeAspectAnalysis:function(){return bi},Kq3dSlopeAspectAnalysisViewModel:function(){return mi},Kq3dStatusBar:function(){return Qg},Kq3dStatusBarViewModel:function(){return Ug},Kq3dTerrainOperation:function(){return Dl},Kq3dTerrainOperationViewModel:function(){return Ul},Kq3dTerrainProfileAnalysis:function(){return Dt},Kq3dTerrainProfileAnalysisViewModel:function(){return Et},Kq3dTyphoonTrac:function(){return La},Kq3dTyphoonTracViewModel:function(){return Da},Kq3dUnderground:function(){return bg},Kq3dUndergroundViewModel:function(){return kg},Kq3dVideoFusion:function(){return Yg},Kq3dVideoFusionViewModel:function(){return Jg},Kq3dVideoProject:function(){return Wg},Kq3dVideoProjectViewModel:function(){return Dg},Kq3dViewshedAnalysis:function(){return Al},Kq3dViewshedAnalysisViewModel:function(){return Ya},Kq3dWeatherEffect:function(){return Yo},Kq3dWeatherEffectViewModel:function(){return Go},Kq3dWindySlicing:function(){return Qa},Kq3dWindySlicingViewModel:function(){return va},Kq3dWireframeSketch:function(){return Bt},Kq3dWireframeSketchViewModel:function(){return St},KqSceneApp:function(){return un},KqSceneView:function(){return B},KqSceneViewViewModel:function(){return V},default:function(){return pn},webglComponents:function(){return cn}});var A=m(895),e=m(905),t=m.n(e),a=m(277);class l{_viewer=null;_drawHandler=null;_drawLayer=null;_layerGroup=[];_handler=null;_pointGroup=[];_mouseHandlers={};_labels={};_defaultStyle={color:"#ff0000",fillColor:"#1E90FF",weight:2,fillOpacity:.3,dashArray:"0"};drawFinishedEvent=null;editSelectedEvent=null;_drawStyle={text:{text:"文字标注",fontSize:25,fontFamily:"Microsoft YaHei",color:"#ff0000"},marker:{image:a.MARKER_URL,width:32,height:32,clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},polyline:{width:2,color:"#ff0000",opacity:1,arcType:1,clampToGround:!0},polygon:{fill:!0,fillColor:"#1E90FF",fillOpacity:.3,width:2,color:"#ff0000",opacity:1,clampToGround:!0}};_geojsonStyle={label:{style:Cesium.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,fillColor:"#ff0000",opacity:1,pixelOffset:[0,-16],express:"name",font:"25px 微软雅黑"},billboard:{image:a.MARKER_URL,width:32,height:32,verticalOrigin:1},polyline:{color:"#ff0000",opacity:1,width:2,dash:!1,clampToGround:!0},polygon:{color:"#0000ff",opacity:.3,outline:!0,outlineColor:"#ff0000",outlineWidth:2,outlineDash:!1,fill:!0,fillStyle:null,clampToGround:!0}};constructor(A,e){this._viewer=A,this._language=e,this._drawHandler=Cesium.Kq3dPlotHandler,this._drawLayer=this._drawHandler.createShapeLayer({name:"Drawing"}),this._viewer.scene.primitives.add(this._drawLayer),this._drawHandler.initialize(this._viewer.scene,this._drawLayer),this.enableEdit(!1),this.drawFinishedEvent=this._drawHandler.drawHandler.drawFinished,this.editSelectedEvent=this._drawHandler.editHandler.editSelected;let t=this._drawHandler.editHandler.editFinished;this.editSelectedEvent.addEventListener((A=>{A&&this.addMouseEvent("move","label")})),t.addEventListener((A=>{A&&(this.removeMouseEvent("move","label"),this._labelUpdateData&&this._labelUpdateData())})),this._viewer.roadingHandler&&(this._viewer.roadingHandler.cameraRotatePointer.enableMouseAutoStart=!1),this._drawStyle.freehandline=this._drawStyle.polyline,this._drawStyle.concentricCircle=this._drawStyle.polyline,this._drawStyle.circle=this._drawStyle.polygon,this._drawStyle.ellipse=this._drawStyle.polygon,this._drawStyle.freehandpolygon=this._drawStyle.polygon,this._drawStyle.rectangle=this._drawStyle.polygon}getFillStyle(A){let e="stroke-linecap: square;stroke-linejoin: miter;overflow: inherit;stroke: "+(A.lineColor||"rgba(0, 0, 255, 1)")+";stroke-width: "+(A.lineWidth||"2px")+";",t=10,a=10,l="left";void 0!==A.lineSpacing&&(t=a=A.lineSpacing),void 0!==A.lineType&&(l=A.lineType);let i="";"left"===l?i='<line x1="'+t/2+'" y1="0" x2="'+t/2+'" y2="'+a+'" style="'+e+'"></line>':"right"===l?i='<line x1="0" y1="'+a/2+'" x2="'+t+'" y2="'+a/2+'" style="'+e+'"></line>':(i='<line x1="'+t/2+'" y1="0" x2="'+t/2+'" y2="'+a+'" style="'+e+'"></line>',i+='<line x1="0" y1="'+a/2+'" x2="'+t+'" y2="'+a/2+'" style="'+e+'"></line>');let o='<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="'+t+'" height="'+a+'" style="overflow: inherit;">'+i+"</svg>",g="data:image/svg+xml;base64,"+window.btoa(o);var r=new Image(t,a);return r.src=g,new Cesium.ImageMaterialProperty({image:r,repeat:new Cesium.Cartesian2(15,15),transparent:!0})}getImageWithColor(A,e,t=32,a=32){if(e){var l=window.atob(A.split(",")[1]);l=(l=l.replace(/#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/g,e)).replace('width="16"','width="'+t+'"').replace('height="16"','height="'+a+'"'),A="data:image/svg+xml;base64,"+window.btoa(l)}return A}startDraw(A,e,t,l,i=!1){this._drawHandler.editHandler.shapeObject&&(this._drawHandler.startEdit(null),this.destroyStylePopup());let o=e?{...e}:{};"point"===A&&(A="marker"),"coloricon"===A&&(A="marker",o.iconSize=[32,32],o.iconUrl=a.LABEL_SVG_ICONS[0],o.image=this.getImageWithColor(a.LABEL_SVG_ICONS[0],o.color)),this._viewer.scene.globe.depthTestAgainstTerrain="text"!==A;var g={...this._drawStyle[A]};"CatmullRomSpline"===A&&(g={...this._drawStyle.polyline});for(const A in g)Object.hasOwnProperty.call(o,A)&&(g[A]=o[A]);"polyline"===A&&(o.opacity=1),"text"===A&&(o.fontSize=this._drawStyle.text.fontSize,o.fontFamily=this._drawStyle.text.fontFamily,o.content=o.text,o.is3D=!0),"marker"!==A&&"text"!==A&&g.hasOwnProperty("weight")&&(g.width=g.weight),g.hasOwnProperty("color")&&(g.color=Cesium.Color.fromCssColorString(g.color).withAlpha(g.opacity)),g.hasOwnProperty("fillColor")&&(g.fillColor=Cesium.Color.fromCssColorString(g.fillColor).withAlpha(g.fillOpacity)),this._drawHandler.startDraw(A,A,g);var r=this;this.removeEventListener&&this.removeEventListener(),this.removeEventListener=null,this.removeEventListener=this.drawFinishedEvent.addEventListener((a=>{if(r._drawFinishedTime=Date.now(),l&&(a.groupName=l),"text"===a.type&&setTimeout((()=>{a._label&&(a._label.disableDepthTestDistance=Number.POSITIVE_INFINITY)}),200),a.options=o,t){var g=r.shapeToGeoFeature(a);t(g.geometry,{layer:a.guid,shape:a})}r.removeEventListener&&r.removeEventListener(),r.removeEventListener=null,i&&r.startDraw(A,e,t,l,i)}))}stopDraw(){this.removeEventListener&&(this.removeEventListener(),this.removeEventListener=null),this._drawHandler.stopDraw()}enableMultiDraw(A){this._drawHandler.drawHandler.enableMultiDraw=A}enableEdit(A){A?this._drawHandler.editHandler.activate():this._drawHandler.editHandler.deactivate()}clearDrawGroup(A){let e=this._drawLayer._primitives;if(e&&e.length>0)for(let t=e.length-1;t>=0;t--)e[t].groupName===A&&this._drawLayer.removeById(e[t].guid)}clear(){this._drawLayer&&this._drawLayer.removeAll()}destroy(){this._viewer=null,this._drawHandler=null,this.clear()}transformPosition(A){if(A){A instanceof Array&&3===A.length&&(A=Cesium.Cartesian3.fromDegrees(A[0],A[1],A[2]));let e=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(A);return[Cesium.Math.toDegrees(e.longitude),Cesium.Math.toDegrees(e.latitude)]}}shapeToGeoFeature(A){var e=null,t=this;if(A){if(A.controlPoints&&0===A.controlPoints.length)return A;if(A.type===t._drawHandler.ShapeTypes.MARKER.type||A.type===t._drawHandler.ShapeTypes.TEXT.type){let a=t.transformPosition(A._position);e=window.turf.point(a)}else if(A.type===t._drawHandler.ShapeTypes.CIRCLE.type){let a=t.transformPosition(A.center);(e=window.turf.circle(a,A.radius,{steps:64,units:"meters"})).geometry.radius=A.radius,e.geometry.center=a}else if(A.type===t._drawHandler.ShapeTypes.POLYLINE.type){let a=[[]];A.controlPoints.forEach((function(A){a[0].push(t.transformPosition(A))})),e=window.turf.lineStrings(a).features[0]}else if(A.type===t._drawHandler.ShapeTypes.RECTANGLE.type){if(A.rectangle){let t=A.rectangle.west/Math.PI*180,a=A.rectangle.east/Math.PI*180,l=A.rectangle.south/Math.PI*180,i=A.rectangle.north/Math.PI*180,o=[[[t,l],[t,i],[a,i],[a,l],[t,l]]];e=window.turf.polygon(o)}}else if(A.type===t._drawHandler.ShapeTypes.POLYGON.type){let a,l=[[]];A.controlPoints.forEach((function(e,i){l[0].push(t.transformPosition(e)),0===i&&(a=t.transformPosition(e)),i===A.controlPoints.length-1&&l[0].push(a)})),e=window.turf.polygon(l)}else if(A.type===t._drawHandler.ShapeTypes.CATMULLROMSPLINE.type){let a=[[]];(A._positionsArray?A._positionsArray[0]:A.controlPoints).forEach((function(A){a[0].push(t.transformPosition(A))})),e=window.turf.lineStrings(a).features[0]}}return e||A}drawFromGeojson(A,e="result",t,a,l,i=!1){a||(a={});let o=JSON.parse(JSON.stringify(this._geojsonStyle));for(var g in a)if(o.hasOwnProperty(g))for(var r in a[g])o[g][r]=a[g][r];else o[g]=a[g];for(var g in o)o[g].hasOwnProperty("color")&&(o[g].material||(o[g].material=Cesium.Color.fromCssColorString(o[g].color).withAlpha(o[g].opacity))),o[g].hasOwnProperty("fillColor")&&(o[g].fillColor=Cesium.Color.fromCssColorString(o[g].fillColor).withAlpha(o[g].opacity)),o[g].hasOwnProperty("outlineColor")&&(o[g].outlineColor=Cesium.Color.fromCssColorString(o[g].outlineColor)),o[g].hasOwnProperty("pixelOffset")&&(o[g].pixelOffset=new Cesium.Cartesian2(o[g].pixelOffset[0],o[g].pixelOffset[1])),"polyline"===g&&o.polyline.dash&&(o.polyline.material=new Cesium.PolylineDashMaterialProperty({color:o.polyline.material})),"polygon"===g&&o.polygon.fillStyle&&(o.polygon.material=this.getFillStyle(o.polygon.fillStyle),o.polygon.stRotation=Cesium.Math.toRadians(45));o.point&&(o.point.color=o.point.material,delete o.billboard),this._viewer.scene.globe.depthTestAgainstTerrain=!1;let n=this._viewer.dataSources.getByName(e);0===n.length?(n=new Cesium.Kq3dGeoJsonDataSource(e),this._viewer.dataSources.add(n)):n=n[0];let s=this;n.load(A,o).then((a=>{if(o.polygon.outline&&a.entities.values.forEach((A=>{A.polygon&&!A.polyline&&(A.polygon.outline=!1,A.polyline={positions:A.polygon.hierarchy._value.positions,width:o.polygon.outlineWidth,clampToGround:!0,material:o.polygon.outlineDash?new Cesium.PolylineDashMaterialProperty({color:o.polygon.outlineColor}):o.polygon.outlineColor})})),s._layerGroup.includes(e)||s._layerGroup.push(e),l){let A=new Cesium.HeadingPitchRange(0,Cesium.Math.toRadians(-90),0);s._viewer.flyTo(a,{duration:1.5,offset:A})}if(i){let A=0,e=setInterval((()=>{a._destroyed?clearInterval(e):A<4?(a.show=A%2!=0,A++):clearInterval(e)}),200)}t&&t(s._viewer,A)}))}removeGeojsonByIdCustom(A){"draw"===A&&this.clear();let e=this._viewer.dataSources.getByName(A);if(e.length<=0)return;for(let A=0;A<e.length;A++)this._viewer.dataSources.remove(e[A],!0);let t=this._layerGroup.indexOf(A);t>-1&&this._layerGroup.splice(t,1)}getGeometry(A){let e=this._viewer.dataSources.getByName(A);return e.length<=0?"":e}removeAll(){let A=this;this._layerGroup.forEach((e=>{let t=A._viewer.dataSources.getByName(e);for(let e=0;e<t.length;e++)A._viewer.dataSources.remove(t[e],!0)})),this._layerGroup=[]}clearAll(){this.clear(),this.removeAll()}drawToGeoFeature(A){var e=null,t=this;if(A)if(A.type===t._drawHandler.ShapeTypes.MARKER.type)(e=window.turf.point(A.latlng)).properties={image:A.image,width:A.width,height:A.height};else if(A.type===t._drawHandler.ShapeTypes.CIRCLE.type){let a=t.transformPosition(A.controlPoints[0]),l=Cesium.Cartesian3.fromDegrees(A.controlPoints[0][0],A.controlPoints[0][1],A.controlPoints[0][2]),i=Cesium.Cartesian3.fromDegrees(A.controlPoints[1][0],A.controlPoints[1][1],A.controlPoints[1][2]),o=Cesium.Cartesian3.distance(l,i);e=window.turf.circle(a,o,{steps:64,units:"meters"})}else if(A.type===t._drawHandler.ShapeTypes.POLYLINE.type){let a=[[]];A.controlPoints.forEach((function(A){a[0].push(t.transformPosition(A))})),e=window.turf.lineStrings(a).features[0]}else if(A.type===t._drawHandler.ShapeTypes.RECTANGLE.type){let a=t.transformPosition(A.controlPoints[0]),l=t.transformPosition(A.controlPoints[1]),i=a[0],o=l[0],g=a[1],r=l[1],n=[[[i,g],[i,r],[o,r],[o,g],[i,g]]];e=window.turf.polygon(n)}else if(A.type===t._drawHandler.ShapeTypes.POLYGON.type){let a,l=[[]];A.controlPoints.forEach((function(e,i){l[0].push(t.transformPosition(e)),0===i&&(a=t.transformPosition(e)),i===A.controlPoints.length-1&&l[0].push(a)})),e=window.turf.polygon(l)}return e}getAllGeometry(){let A=[],e=this._drawLayer.toJSON();return e&&e.draws&&e.draws.length>0&&e.draws.forEach((e=>{let t=this.drawToGeoFeature(e);t&&A.push(t)}),this),{type:"FeatureCollection",features:A}}setDrawStyleById(A,e){let t=this._drawLayer.getById(A);if(!t)return;let a=t._geoType;if("text"===t.type?(t.fontSize!=e.fontSize&&this._stylePopup&&this._stylePopup.show&&(this._stylePopup.anchor=[0,-8-e.fontSize]),t.fontSize=e.fontSize,t.fontFamily=e.fontFamily,t.text=e.content,t.fillColor=Cesium.Color.fromCssColorString(e.color)):"point"===a?(t.height!=e.iconSize[1]&&this._stylePopup&&this._stylePopup.show&&(this._stylePopup.anchor=[0,-8-e.iconSize[1]*t._scaleHeight]),t.image=this.getImageWithColor(e.iconUrl,e.color,e.iconSize[0],e.iconSize[1]),t.width=e.iconSize[0],t.height=e.iconSize[1]):"polyline"!==a&&"polygon"!==a||(null!=e.weight&&(t.width=e.weight),null!=e.color&&(t.color=Cesium.Color.fromCssColorString(e.color)),null!=e.dashArray&&(t.dashArray=e.dashArray),null!=e.opacity&&(t.color=t.color.withAlpha(e.opacity))),"polygon"===a&&(t.fill=void 0===e.fill||e.fill,t.fill)){let A=void 0===e.fillOpacity?this._drawStyle.polygon.fillOpacity:e.fillOpacity;e.fillColor&&(t.fillColor=Cesium.Color.fromCssColorString(e.fillColor).withAlpha(A))}t.options=e}getShapeTypeById(A){let e="",t=this._drawLayer.getById(A);return t&&(e=t.type,"marker"==e&&(e="Marker"),"polyline"==e&&(e="Line"),"polygon"==e&&(e="Polygon"),"rectangle"==e&&(e="Rectangle"),"circle"==e&&(e="Circle"),"text"==e&&(e="Text")),e}getShapeStyle(A){let e=this._drawLayer.getById(A);if(e)return e.options}getShapeInfo(A){let e=this._drawLayer.getById(A);if(!e)return;let t=this.getShapeTypeById(A),a=null,l=e.options;return"Marker"==t?a={coordinate:e.position,style:{iconSize:l.iconSize,iconUrl:l.iconUrl,color:l.color}}:"Line"==t?a={coordinate:e.controlPoints,style:{opacity:l.opacity,color:l.color,weight:l.weight,dashArray:l.dashArray}}:"Polygon"==t||"Rectangle"==t||"Circle"==t?a={coordinate:e.controlPoints,style:{fillColor:l.fillColor,fillOpacity:l.fillOpacity,color:l.color,weight:l.weight}}:"Text"==t&&(a={coordinate:e.position,style:{fontSize:l.fontSize,fontFamily:l.fontFamily,color:l.color,content:l.content,is3D:!0}}),a}getJsonByLayerList(A){let e=[];for(let t=0;t<A.length;t++){const a=A[t],l=a.name||"",i=this.getShapeInfo(a.guid);e.push({name:l,info:i,shape:a.shape,guid:a.guid})}return JSON.stringify(e)}createShapeByInfo(A,e){let t=null;return"Marker"==e?t=this._drawHandler.createShape(this._drawHandler.ShapeTypes.MARKER.type,"",{position:A.coordinate,disableDepthTestDistance:Number.POSITIVE_INFINITY,width:A.style.iconSize[0],height:A.style.iconSize[1],image:this.getImageWithColor(A.style.iconUrl,A.style.color,A.style.iconSize[0],A.style.iconSize[1])}):"Line"==e?t=this._drawHandler.createShape(this._drawHandler.ShapeTypes.POLYLINE.type,"",{controlPoints:A.coordinate,color:Cesium.Color.fromCssColorString(A.style.color).withAlpha(A.style.opacity),width:A.style.weight,dashArray:A.style.dashArray,clampToGround:!0}):"Polygon"==e?t=this._drawHandler.createShape(this._drawHandler.ShapeTypes.POLYGON.type,"",{controlPoints:A.coordinate,color:Cesium.Color.fromCssColorString(A.style.color),width:A.style.weight,fillColor:Cesium.Color.fromCssColorString(A.style.fillColor).withAlpha(A.style.fillOpacity),fill:!0,clampToGround:!0}):"Rectangle"==e?t=this._drawHandler.createShape(this._drawHandler.ShapeTypes.RECTANGLE.type,"",{controlPoints:A.coordinate,color:Cesium.Color.fromCssColorString(A.style.color),width:A.style.weight,fillColor:Cesium.Color.fromCssColorString(A.style.fillColor).withAlpha(A.style.fillOpacity),fill:!0,clampToGround:!0}):"Circle"==e?t=this._drawHandler.createShape(this._drawHandler.ShapeTypes.CIRCLE.type,"",{controlPoints:A.coordinate,color:Cesium.Color.fromCssColorString(A.style.color),width:A.style.weight,fillColor:Cesium.Color.fromCssColorString(A.style.fillColor).withAlpha(A.style.fillOpacity),fill:!0,clampToGround:!0}):"Text"==e&&(t=this._drawHandler.createShape(this._drawHandler.ShapeTypes.TEXT.type,"",{latlng:A.coordinate,text:A.style.content,fontSize:A.style.fontSize,fontFamily:A.style.fontFamily,color:Cesium.Color.fromCssColorString(A.style.color)}),setTimeout((()=>{t._label&&(t._label.disableDepthTestDistance=Number.POSITIVE_INFINITY)}),200)),t}createLayerListByJson(A,e){let t=[];for(let e=0;e<A.length;e++){const a=A[e],l=a.shape;let i=this.createShapeByInfo(a.info,l);i&&(i.options=a.info.style,this._drawLayer.add(i),t.push({name:a.name,shape:l,guid:i.id}))}return this.enableEdit(!0),this.addMouseEvent("click","label"),this._labelUpdateData=e,t}createShapeFromFeature(A,e,t,l){let i=A.geometry.type,o=null,g=null,r=[];switch(i){case"Point":case"MultiPoint":g=A.geometry.coordinates,"MultiPoint"===i&&(g=g[0]);let e=Cesium.Cartesian3.fromDegrees(g[0],g[1]);o=this._drawHandler.createShape(this._drawHandler.ShapeTypes.MARKER.type,"",{position:e,disableDepthTestDistance:Number.POSITIVE_INFINITY,width:32,height:32,image:a.MARKER_URL});break;case"LineString":case"MultiLineString":g=A.geometry.coordinates,"MultiLineString"===i&&(g=g[0]),r=[],g.forEach((A=>{r.push(Cesium.Cartesian3.fromDegrees(A[0],A[1]))})),o=this._drawHandler.createShape(this._drawHandler.ShapeTypes.POLYLINE.type,"线",{controlPoints:r,color:Cesium.Color.fromCssColorString(t.color),width:t.weight,clampToGround:!0});break;case"Polygon":case"MultiPolygon":g=A.geometry.coordinates[0],"MultiPolygon"===i&&(g=g[0]),r=[],g.forEach((A=>{r.push(Cesium.Cartesian3.fromDegrees(A[0],A[1]))})),o=this._drawHandler.createShape(this._drawHandler.ShapeTypes.POLYGON.type,"面",{controlPoints:r,color:Cesium.Color.fromCssColorString(t.color),width:t.weight,fillColor:Cesium.Color.fromCssColorString(t.fillColor).withAlpha(t.fillOpacity),fill:!0,clampToGround:!0,material:this.getFillStyle(t.fillStyle)})}o&&(this._drawLayer.add(o),e&&e(o.guid),l&&setTimeout((()=>{let A=new Cesium.HeadingPitchRange(0,Cesium.Math.toRadians(-90),0);this._viewer.camera.flyToBoundingSphere(o.boundingSphere,{duration:1.5,offset:A})}),200))}startEditById(A){let e=this._drawLayer.getById(A);e&&this._drawHandler.startEdit(e)}getFeatureById(A){let e=null,t=this._drawLayer.getById(A);return t&&(e=this.shapeToGeoFeature(t)),e}flyToShape(A){let e=this._drawLayer.getById(A);if(e){let A=new Cesium.HeadingPitchRange(0,Cesium.Math.toRadians(-90),0);if("marker"===e.type||"text"===e.type){let t=new Cesium.BoundingSphere(e.position,5e4);this._viewer.camera.flyToBoundingSphere(t,{duration:1.5,offset:A})}else this._viewer.camera.flyToBoundingSphere(e.boundingSphere,{duration:1.5,offset:A})}}removeGeometryById(A){this._drawLayer.removeById(A),document.getElementById(A)&&this.destroyStylePopup()}getShapePosition(A){let e=null;if(A){if(A.controlPoints&&0===A.controlPoints.length)return e;A.type===this._drawHandler.ShapeTypes.MARKER.type||A.type===this._drawHandler.ShapeTypes.TEXT.type?e=new window.Cesium.Cartesian3(A._position.x,A._position.y,A._position.z):A.type===this._drawHandler.ShapeTypes.CIRCLE.type?e=A.center:(A.type===this._drawHandler.ShapeTypes.POLYLINE.type||A.type===this._drawHandler.ShapeTypes.POLYGON.type||A.type===this._drawHandler.ShapeTypes.RECTANGLE.type)&&(e=A.controlPoints[0])}return e}openShapeStylePopup(A,e,t,a){let l=this._drawLayer.getById(A);if(!l)return;a||this._drawHandler.startEdit(l);let i=a||this.getShapePosition(l);if(i){let o=this._language.editLabel,g=-8;a||("marker"==l.type&&(g-=l.height*l._scaleHeight),"text"==l.type&&(g-=l.fontSize)),this.destroyStylePopup(),this._stylePopup=new Cesium.Kq3dHtmlTag(this._viewer,{html:`<div class='kq-label-popup' style='background-color:var(--kq-bg-color); border-radius: 8px;'>\n <div class='popup-title'>\n <span class='popup-title-text'>${o}</span>\n </div>\n <div id=${A}></div>\n <span class='triangle'></span>\n <a class='close' href="javascript:void(0)" onclick="document.getElementsByClassName('kq-label-popup')[0].style.display='none';"><span>×</span></a>\n </div>`,position:i,anchor:[0,g],alignmentMode:7,noEvent:!1,show:!1}),setTimeout((()=>{t(e,document.getElementById(A)),this._stylePopup.show=!0}),100)}}destroyStylePopup(){this._stylePopup&&this._stylePopup.destroy(),this._stylePopup=null}recordVNode(A,e,t){this._render=e,this._updateStyle=t,this._labels[A.guid]=A}addMouseEvent(A,e){this._mouseHandlers[e]||(this._mouseHandlers[e]=new Cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas));let t=this;"click"==A?t._mouseHandlers[e].setInputAction((function(A){if(t.