text: !function(e){var t=window.webpackHotUpdate;window.webpackHotUpdate=function(e,i){!function(e,t){if(!M[e]||!_[e])return;for(var i in _[e]=!1,t)Object.prototype.hasOwnProperty.call(t,i)&&(u[i]=t[i]);0==--g&&0===S&&P()}(e,i),t&&t(e,i)};var i,s=!0,r="9a07991d3717325a32f8",o={},a=[],n=[];function h(e){var t=O[e];if(!t)return I;var s=function(s){return t.hot.active?(O[s]?-1===O[s].parents.indexOf(e)&&O[s].parents.push(e):(a=[e],i=s),-1===t.children.indexOf(s)&&t.children.push(s)):(console.warn("[HMR] unexpected require("+s+") from disposed module "+e),a=[]),I(s)},r=function(e){return{configurable:!0,enumerable:!0,get:function(){return I[e]},set:function(t){I[e]=t}}};for(var o in I)Object.prototype.hasOwnProperty.call(I,o)&&"e"!==o&&"t"!==o&&Object.defineProperty(s,o,r(o));return s.e=function(e){return"ready"===p&&m("prepare"),S++,I.e(e).then(t,(function(e){throw t(),e}));function t(){S--,"prepare"===p&&(C[e]||x(e),0===S&&0===g&&P())}},s.t=function(e,t){return 1&t&&(e=s(e)),I.t(e,-2&t)},s}function l(t){var s={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:i!==t,active:!0,accept:function(e,t){if(void 0===e)s._selfAccepted=!0;else if("function"==typeof e)s._selfAccepted=e;else if("object"==typeof e)for(var i=0;i<e.length;i++)s._acceptedDependencies[e[i]]=t||function(){};else s._acceptedDependencies[e]=t||function(){}},decline:function(e){if(void 0===e)s._selfDeclined=!0;else if("object"==typeof e)for(var t=0;t<e.length;t++)s._declinedDependencies[e[t]]=!0;else s._declinedDependencies[e]=!0},dispose:function(e){s._disposeHandlers.push(e)},addDisposeHandler:function(e){s._disposeHandlers.push(e)},removeDisposeHandler:function(e){var t=s._disposeHandlers.indexOf(e);t>=0&&s._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,p){case"idle":(u={})[t]=e[t],m("ready");break;case"ready":T(t);break;case"prepare":case"check":case"dispose":case"apply":(y=y||[]).push(t)}},check:v,apply:E,status:function(e){if(!e)return p;c.push(e)},addStatusHandler:function(e){c.push(e)},removeStatusHandler:function(e){var t=c.indexOf(e);t>=0&&c.splice(t,1)},data:o[t]};return i=void 0,s}var c=[],p="idle";function m(e){p=e;for(var t=0;t<c.length;t++)c[t].call(null,e)}var d,u,f,y,g=0,S=0,C={},_={},M={};function w(e){return+e+""===e?+e:e}function v(e){if("idle"!==p)throw new Error("check() is only allowed in idle status");return s=e,m("check"),(t=1e4,t=t||1e4,new Promise((function(e,i){if("undefined"==typeof XMLHttpRequest)return i(new Error("No browser support"));try{var s=new XMLHttpRequest,o=I.p+""+r+".hot-update.json";s.open("GET",o,!0),s.timeout=t,s.send(null)}catch(e){return i(e)}s.onreadystatechange=function(){if(4===s.readyState)if(0===s.status)i(new Error("Manifest request to "+o+" timed out."));else if(404===s.status)e();else if(200!==s.status&&304!==s.status)i(new Error("Manifest request to "+o+" failed."));else{try{var t=JSON.parse(s.responseText)}catch(e){return void i(e)}e(t)}}}))).then((function(e){if(!e)return m(b()?"ready":"idle"),null;_={},C={},M=e.c,f=e.h,m("prepare");var t=new Promise((function(e,t){d={resolve:e,reject:t}}));u={};return x(0),"prepare"===p&&0===S&&0===g&&P(),t}));var t}function x(e){M[e]?(_[e]=!0,g++,function(e){var t=document.createElement("script");t.charset="utf-8",t.src=I.p+""+e+"."+r+".hot-update.js",document.head.appendChild(t)}(e)):C[e]=!0}function P(){m("ready");var e=d;if(d=null,e)if(s)Promise.resolve().then((function(){return E(s)})).then((function(t){e.resolve(t)}),(function(t){e.reject(t)}));else{var t=[];for(var i in u)Object.prototype.hasOwnProperty.call(u,i)&&t.push(w(i));e.resolve(t)}}function E(t){if("ready"!==p)throw new Error("apply() is only allowed in ready status");return function t(s){var n,h,l,c,p;function d(e){for(var t=[e],i={},s=t.map((function(e){return{chain:[e],id:e}}));s.length>0;){var r=s.pop(),o=r.id,a=r.chain;if((c=O[o])&&(!c.hot._selfAccepted||c.hot._selfInvalidated)){if(c.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:o};if(c.hot._main)return{type:"unaccepted",chain:a,moduleId:o};for(var n=0;n<c.parents.length;n++){var h=c.parents[n],l=O[h];if(l){if(l.hot._declinedDependencies[o])return{type:"declined",chain:a.concat([h]),moduleId:o,parentId:h};-1===t.indexOf(h)&&(l.hot._acceptedDependencies[o]?(i[h]||(i[h]=[]),g(i[h],[o])):(delete i[h],t.push(h),s.push({chain:a.concat([h]),id:h})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:i}}function g(e,t){for(var i=0;i<t.length;i++){var s=t[i];-1===e.indexOf(s)&&e.push(s)}}b();var S={},C=[],_={},v=function(){console.warn("[HMR] unexpected require("+P.moduleId+") to disposed module")};for(var x in u)if(Object.prototype.hasOwnProperty.call(u,x)){var P;p=w(x),P=u[x]?d(p):{type:"disposed",moduleId:x};var E=!1,T=!1,W=!1,z="";switch(P.chain&&(z="\nUpdate propagation: "+P.chain.join(" -> ")),P.type){case"self-declined":s.onDeclined&&s.onDeclined(P),s.ignoreDeclined||(E=new Error("Aborted because of self decline: "+P.moduleId+z));break;case"declined":s.onDeclined&&s.onDeclined(P),s.ignoreDeclined||(E=new Error("Aborted because of declined dependency: "+P.moduleId+" in "+P.parentId+z));break;case"unaccepted":s.onUnaccepted&&s.onUnaccepted(P),s.ignoreUnaccepted||(E=new Error("Aborted because "+p+" is not accepted"+z));break;case"accepted":s.onAccepted&&s.onAccepted(P),T=!0;break;case"disposed":s.onDisposed&&s.onDisposed(P),W=!0;break;default:throw new Error("Unexception type "+P.type)}if(E)return m("abort"),Promise.reject(E);if(T)for(p in _[p]=u[p],g(C,P.outdatedModules),P.outdatedDependencies)Object.prototype.hasOwnProperty.call(P.outdatedDependencies,p)&&(S[p]||(S[p]=[]),g(S[p],P.outdatedDependencies[p]));W&&(g(C,[P.moduleId]),_[p]=v)}var L,V=[];for(h=0;h<C.length;h++)p=C[h],O[p]&&O[p].hot._selfAccepted&&_[p]!==v&&!O[p].hot._selfInvalidated&&V.push({module:p,parents:O[p].parents.slice(),errorHandler:O[p].hot._selfAccepted});m("dispose"),Object.keys(M).forEach((function(e){!1===M[e]&&function(e){delete installedChunks[e]}(e)}));var X,R,k=C.slice();for(;k.length>0;)if(p=k.pop(),c=O[p]){var j={},H=c.hot._disposeHandlers;for(l=0;l<H.length;l++)(n=H[l])(j);for(o[p]=j,c.hot.active=!1,delete O[p],delete S[p],l=0;l<c.children.length;l++){var D=O[c.children[l]];D&&((L=D.parents.indexOf(p))>=0&&D.parents.splice(L,1))}}for(p in S)if(Object.prototype.hasOwnProperty.call(S,p)&&(c=O[p]))for(R=S[p],l=0;l<R.length;l++)X=R[l],(L=c.children.indexOf(X))>=0&&c.children.splice(L,1);m("apply"),void 0!==f&&(r=f,f=void 0);for(p in u=void 0,_)Object.prototype.hasOwnProperty.call(_,p)&&(e[p]=_[p]);var A=null;for(p in S)if(Object.prototype.hasOwnProperty.call(S,p)&&(c=O[p])){R=S[p];var B=[];for(h=0;h<R.length;h++)if(X=R[h],n=c.hot._acceptedDependencies[X]){if(-1!==B.indexOf(n))continue;B.push(n)}for(h=0;h<B.length;h++){n=B[h];try{n(R)}catch(e){s.onErrored&&s.onErrored({type:"accept-errored",moduleId:p,dependencyId:R[h],error:e}),s.ignoreErrored||A||(A=e)}}}for(h=0;h<V.length;h++){var N=V[h];p=N.module,a=N.parents,i=p;try{I(p)}catch(e){if("function"==typeof N.errorHandler)try{N.errorHandler(e)}catch(t){s.onErrored&&s.onErrored({type:"self-accept-error-handler-errored",moduleId:p,error:t,originalError:e}),s.ignoreErrored||A||(A=t),A||(A=e)}else s.onErrored&&s.onErrored({type:"self-accept-errored",moduleId:p,error:e}),s.ignoreErrored||A||(A=e)}}if(A)return m("fail"),Promise.reject(A);if(y)return t(s).then((function(e){return C.forEach((function(t){e.indexOf(t)<0&&e.push(t)})),e}));return m("idle"),new Promise((function(e){e(C)}))}(t=t||{})}function b(){if(y)return u||(u={}),y.forEach(T),y=void 0,!0}function T(t){Object.prototype.hasOwnProperty.call(u,t)||(u[t]=e[t])}var O={};function I(t){if(O[t])return O[t].exports;var i=O[t]={i:t,l:!1,exports:{},hot:l(t),parents:(n=a,a=[],n),children:[]};return e[t].call(i.exports,i,i.exports,h(t)),i.l=!0,i.exports}I.m=e,I.c=O,I.d=function(e,t,i){I.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},I.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},I.t=function(e,t){if(1&t&&(e=I(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(I.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)I.d(i,s,function(t){return e[t]}.bind(null,s));return i},I.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return I.d(t,"a",t),t},I.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},I.p="",I.h=function(){return r},h(0)(I.s=0)}([function(e,t,i){"use strict";i.r(t);class s extends XE.Obj.PlotBase{constructor(e,t){super(e,t),this._onlyMove=!1,this._fixedPositionsNum=void 0,XE.MVVM.extend(this,{_polygonShow:!0}),this._polygon=new XE.Obj.Polygon(e),this.disposers.push(()=>{this._polygon=this._polygon&&this._polygon.destroy()}),this._polygon.show=this._polygonShow&&this.show,XE.Earth.Interaction.Picking.registerPickingParent(this._polygon,this);const i=()=>{this._polygon.show=this._polygonShow&&this.show,this._polygon.width=this.width,this._polygon.color=this.color,this._polygon.ground=this.ground,this._polygon.outline.width=this.outlineWidth,this._polygon.outline.color=this.outlineColor,this._polygon.outline.show=this.outlineShow,this._polygon.depthTest=this.depthTest};i(),this.disposers.push(XE.MVVM.watch(()=>({show:this._polygonShow&&this.show,width:this.width,color:[...this.color],ground:this.ground,outlineWidth:this.outlineWidth,outlineColor:this.outlineColor,outlineShow:this.outlineShow,depthTest:this.depthTest}),()=>i()))}get onlyMove(){return this._onlyMove}get fixedPositionsNum(){return this._fixedPositionsNum}flyTo(){this._polygon.flyTo()}}s.defaultOptions={positions:[],show:!0,color:[0,1,0,.1],outlineWidth:2,outlineColor:[0,1,0,1],outlineShow:!0,depthTest:!1};var r=s;const o=XE.Tool;function a(e,t,i,s,r,a,n){let h=e*t,l=.7*h,c=Cesium.Cartesian3.distance(r[0],r[1]),p=!1;c<l&&(l=c,h=l/.7),c<1.2*l&&(p=!0);let m=o.Math.hpr(a[1],a[0],[0,0,0])[0],d=o.Math.geoMove(a[1],m,l,[0,0,0]),u=o.Math.geoMove(a[1],m,h,[0,0,0]),f=o.Math.hpr(d,a[1],[0,0,0])[0],y=o.Math.hpr(u,a[1],[0,0,0])[0];n||(n=[]),n.length=5;let g=e*i;return n[0]=o.Math.geoMove(d,f-Cesium.Math.PI_OVER_TWO,g,[0,0,0]),n[4]=o.Math.geoMove(d,f+Cesium.Math.PI_OVER_TWO,g,[0,0,0]),n[1]=o.Math.geoMove(u,y-Cesium.Math.PI_OVER_TWO,g*s,[0,0,0]),n[3]=o.Math.geoMove(u,y+Cesium.Math.PI_OVER_TWO,g*s,[0,0,0]),n[2]=[...a[1]],p}const n=XE.Tool;class h extends r{constructor(e,t){super(e,t),this._onlyMove=!0,this._polygonPositions=[],this.disposers.push(XE.MVVM.watch(()=>({minWidthScale:this.minWidthScale,dynamicWidthScale:this.dynamicWidthScale,arrowMaxHeightScale:this.arrowMaxHeightScale,arrowWingWidthScale:this.arrowWingWidthScale}),()=>{this.change(this.positions,this.minWidthScale,this.dynamicWidthScale,this.arrowMaxHeightScale,this.arrowWingWidthScale)})),this.disposers.push(XE.MVVM.watch(()=>[...this.positions.map(e=>[...e])],()=>{this.change(this.positions,this.minWidthScale,this.dynamicWidthScale,this.arrowMaxHeightScale,this.arrowWingWidthScale)}))}change(e,t,i,s,r){let o=[...e];const h=o.length;if(h<2||function(e,t){if(!e||!t)return!1;c=0;for(let i=0;i<e.length;i++)if(c=e[i]==t[i]?0:1,c>0)return!1;return!0}(o[h-1],o[h-2]))return;let l=o.map(e=>Cesium.Cartesian3.fromRadians(...e,null,new Cesium.Cartesian3));this._polygonPositions.length=0;let p,m,d,u,f,y,g,S=[0,0,0],C=new Array(h).fill(0).map((e,t)=>(p=o[t-1],m=o[t+1],d=o[t],u=p?n.Math.hpr(d,p,S)[0]:0,f=m?n.Math.hpr(d,m,S)[0]:0,y=u&&f?2:1,g=(u+f)/y,g=u>f?g:g-Cesium.Math.PI,g<0?g+Cesium.Math.TWO_PI:g)),_=0,M=[];l.forEach((e,t)=>{p=l[t-1]||e,m=e,_+=Cesium.Cartesian3.distance(p,m),M.push(_)}),M=M.map(e=>_-e);const w=(i/=2)*_,v=(t/=2)*_;let x=new Array(M.length).fill(0).map((e,t)=>v+w*M[t]/_),P=[],E=a(_,s,t,r,l.slice(-2),o.slice(-2),P),b=[],T=[];o.forEach((e,t)=>{0==t||t==h-1?(b.push(n.Math.geoMove(e,C[t]+Cesium.Math.PI_OVER_TWO,x[t])),T.push(n.Math.geoMove(e,C[t]-Cesium.Math.PI_OVER_TWO,x[t]))):(b.push(n.Math.geoMove(e,C[t]-Cesium.Math.PI,x[t])),T.push(n.Math.geoMove(e,C[t],x[t])))}),b.pop(),T.pop(),E&&(b.pop(),T.pop()),b.push(P[0]),T.push(P[P.length-1]);let O=n.Math.interpolatePositions(b,20*h,!1,[]),I=n.Math.interpolatePositions(T,20*h,!1,[]);O.forEach(e=>{this._polygonPositions.push(e[0],e[1])}),P.forEach(e=>{this._polygonPositions.push(e[0],e[1])});for(let e=I.length-1;e>=0;e--)this._polygonPositions.push(I[e][0],I[e][1]);this._polygon.positions=this._polygonPositions,this._polygon.height=o[0][2],this._polygonShow=!0}}h.registerType(h,"GeoArrow"),h.defaultOptions={showType:"forkedTail",positions:[],tailHeightScale:.15,minWidthScale:.06,dynamicWidthScale:.1,arrowMaxHeightScale:.15,arrowWingWidthScale:2};var l=h;let c;const p=XE.Tool;class m extends r{constructor(e,t){super(e,t),this._onlyMove=!0,this._polygonPositions=[],this._fixedPositionsNum=2,this.disposers.push(XE.MVVM.watch(()=>({showType:this.showType}),()=>this.changeShowType())),this.disposers.push(XE.MVVM.watch(()=>({minWidthScale:this.minWidthScale,dynamicWidthScale:this.dynamicWidthScale,arrowMaxHeightScale:this.arrowMaxHeightScale,arrowWingWidthScale:this.arrowWingWidthScale}),()=>{this.change(this.positions,this.minWidthScale,this.dynamicWidthScale,this.arrowMaxHeightScale,this.arrowWingWidthScale)})),this.disposers.push(XE.MVVM.watch(()=>[...this.positions.map(e=>[...e])],()=>{this.change(this.positions,this.minWidthScale,this.dynamicWidthScale,this.arrowMaxHeightScale,this.arrowWingWidthScale)}))}changeShowType(){let e=d[this.showType];Object.keys(e).forEach(t=>{this[t]=e[t]})}change(){if(this.positions.length<2||function(e,t){if(!e||!t)return!1;f=0;for(let i=0;i<e.length;i++)if(f=e[i]==t[i]?0:1,f>0)return!1;return!0}(this.positions[0],this.positions[1]))return;let e=this.positions.map(e=>Cesium.Cartesian3.fromRadians(...e,null,new Cesium.Cartesian3));this._polygonPositions.length=0;let t=p.Math.geoDistance(...this.positions),i=p.Math.hpr(...this.positions)[0],s=p.Math.geoMove(this.positions[0],i,t*(1-this.arrowMaxHeightScale)),r=(this.dynamicWidthScale+this.minWidthScale)/2,o=this.minWidthScale/2,n=[p.Math.geoMove(this.positions[0],i+Cesium.Math.PI_OVER_TWO,t*r),p.Math.geoMove(this.positions[0],i-Cesium.Math.PI_OVER_TWO,t*r)],h=p.Math.hpr(s,this.positions[1])[0],l=[p.Math.geoMove(s,h+Cesium.Math.PI_OVER_TWO,t*o),p.Math.geoMove(s,h-Cesium.Math.PI_OVER_TWO,t*o)],c=[p.Math.hpr(n[0],l[0])[0],p.Math.hpr(n[1],l[1])[0]],m=[p.Math.geoDistance(l[0],n[0]),p.Math.geoDistance(l[1],n[1])],d=[[],[]];for(let e=0;e<20;e++)d[0].push(p.Math.geoMove(n[0],c[0],e*m[0]/20)),d[1].push(p.Math.geoMove(n[1],c[1],e*m[1]/20));if(this.tail){let e=p.Math.geoMove(this.positions[0],i,this.tailHeightScale*t);this._polygonPositions.push(e[0],e[1])}d[0].forEach(e=>{this._polygonPositions.push(e[0],e[1])});let u=[];a(t,this.arrowMaxHeightScale,this.minWidthScale/2,this.arrowWingWidthScale,e,this.positions,u);for(let e=u.length-1;e>=0;e--)this._polygonPositions.push(u[e][0],u[e][1]);for(let e=d[1].length-1;e>=0;e--)this._polygonPositions.push(d[1][e][0],d[1][e][1]);this._polygon.positions=this._polygonPositions,this._polygon.height=this.positions[0][2],this._polygonShow=!0}}const d={forkedTail:{minWidthScale:.06,dynamicWidthScale:.1,arrowMaxHeightScale:.15,arrowWingWidthScale:2,tail:!0},cusp:{minWidthScale:.06,dynamicWidthScale:.1,arrowMaxHeightScale:.15,arrowWingWidthScale:2,tail:!1},parallel:{minWidthScale:.12,dynamicWidthScale:0,arrowMaxHeightScale:.08,arrowWingWidthScale:2,tail:!1}};m.defaultOptions={showType:"forkedTail",positions:[],tailHeightScale:.15,...d.forkedTail},m.registerType(m,"GeoSimpleArrow");var u=m;let f;let y=new Cesium.Cartesian3;XE.Tool;class g extends XE.Core.XbsjCzmObj{constructor(e,t){super(e,t),this.disposers.push(XE.Earth.Interaction.InteractionProperty.registerPositionEditing(this._earth,this,{positionEditingProperty:"positionEditing"})),this.disposers.push(XE.Earth.Interaction.InteractionProperty.registerPositionPicking(this._earth,this,{positionPickingProperty:"creating"})),this.disposers.push(XE.Earth.Interaction.InteractionProperty.registerRotationEditing(this._earth,this,{rotationEditingProperty:"rotationEditing"})),this._viewer=e.czm.viewer;let i=new Cesium.Cartesian3;Cesium.Cartesian3.fromRadians(...this.position,null,i),this._modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(i),this._updateCallback=()=>{},this._particleSystem=new Cesium.ParticleSystem({image:this.image,show:this.show&&this.enabled,startColor:new Cesium.Color(this.startColor[0],this.startColor[1],this.startColor[2],this.startColor[3]),endColor:new Cesium.Color(this.endColor[0],this.endColor[1],this.endColor[2],this.endColor[3]),startScale:this.startScale,endScale:this.endScale,minimumParticleLife:this.minimumParticleLife,maximumParticleLife:this.maximumParticleLife,minimumSpeed:this.minimumSpeed,maximumSpeed:this.maximumSpeed,imageSize:new Cesium.Cartesian2(this.particleSize,this.particleSize),emissionRate:this.emissionRate,lifetime:16,modelMatrix:this._modelMatrix,emitterModelMatrix:Cesium.Matrix4.IDENTITY,emitter:new Cesium.CircleEmitter(2),updateCallback:this._updateCallback}),this._viewer.scene.primitives.add(this._particleSystem),this.disposers.push(()=>{this._particleSystem&&(this._viewer.scene.primitives.remove(this._particleSystem),this._particleSystem=void 0)}),this.disposers.push(XE.MVVM.watch(()=>({startColor:[...this.startColor],endColor:[...this.endColor],image:this.image,emissionRate:this.emissionRate,maximumSpeed:this.maximumSpeed,minimumSpeed:this.minimumSpeed,minimumImageSize:this.minimumImageSize,maximumImageSize:this.maximumImageSize,minimumParticleLife:this.minimumParticleLife,maximumParticleLife:this.maximumParticleLife,show:this.show&&this.enabled}),()=>this.update())),this.disposers.push(XE.MVVM.watch(()=>({image:this.image}),()=>this.updateParticleSystem())),this.disposers.push(XE.MVVM.watch(()=>({particleSize:this.particleSize}),()=>this.updateParticleSize())),this.disposers.push(XE.MVVM.watch(()=>[...this.position,...this.rotation],()=>this.updateMatrix())),this.disposers.push(XE.MVVM.watch(()=>({gravity:this.gravity}),()=>{this._particleSystem.updateCallback=this.updateGravity(this.gravity)})),this.disposers.push(XE.MVVM.watch(()=>({emitterRadius:this.emitterRadius,emitterAngle:this.emitterAngle,emitterType:this.emitterType}),()=>this.updateEmitter()))}toBeFountain(){let e=S.fountain;this.changeShowType(e)}toBeSmoke(){let e=S.smoke;this.changeShowType(e)}changeShowType(e){Object.keys(e).forEach(t=>{this[t]=e[t]})}updateMatrix(){let e=new Cesium.Cartesian3,t=new Cesium.Matrix4;if(Cesium.Cartesian3.fromRadians(...this.position,null,e),!e.x&&!e.y&&!e.z)return;this._modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(e);let i=new Cesium.HeadingPitchRoll(...this.rotation),s=Cesium.Quaternion.fromHeadingPitchRoll(i,new Cesium.Quaternion);t=Cesium.Matrix4.fromTranslationQuaternionRotationScale(Cesium.Cartesian3.ZERO,s,new Cesium.Cartesian3(1,1,1),t),Cesium.Matrix4.multiply(this._modelMatrix,t,this._modelMatrix),this._particleSystem.modelMatrix=this._modelMatrix}updateParticleSize(){this._particleSystem.imageSize?(this._particleSystem.imageSize.x=this.particleSize,this._particleSystem.imageSize.y=this.particleSize,this._particleSystem.maximumImageSize.x=this.particleSize,this._particleSystem.maximumImageSize.y=this.particleSize,this._particleSystem.minimumImageSize.x=this.particleSize,this._particleSystem.minimumImageSize.y=this.particleSize):this._particleSystem.imageSize=new Cesium.Cartesian2(this.particleSize,this.particleSize)}updateParticleSystem(){this._particleSystem&&(this._viewer.scene.primitives.remove(this._particleSystem),this._particleSystem=void 0),this._particleSystem=new Cesium.ParticleSystem({image:this.image,show:this.show&&this.enabled,startColor:{red:this.startColor[0],green:this.startColor[1],blue:this.startColor[2],alpha:this.startColor[3]},endColor:{red:this.endColor[0],green:this.endColor[1],blue:this.endColor[2],alpha:this.endColor[3]},startScale:this.startScale,endScale:this.endScale,minimumParticleLife:this.minimumParticleLife,maximumParticleLife:this.maximumParticleLife,minimumSpeed:this.minimumSpeed,maximumSpeed:this.maximumSpeed,imageSize:new Cesium.Cartesian2(this.particleSize,this.particleSize),emissionRate:this.emissionRate,lifetime:16,modelMatrix:this._modelMatrix,emitterModelMatrix:Cesium.Matrix4.IDENTITY,emitter:this._emitter,updateCallback:this._updateCallback}),this._viewer.scene.primitives.add(this._particleSystem)}update(){this._particleSystem.startColor={red:this.startColor[0],green:this.startColor[1],blue:this.startColor[2],alpha:this.startColor[3]},this._particleSystem.endColor={red:this.endColor[0],green:this.endColor[1],blue:this.endColor[2],alpha:this.endColor[3]},this._particleSystem.startScale=this.startScale,this._particleSystem.endScale=this.endScale,this._particleSystem.emissionRate=this.emissionRate,this._particleSystem.minimumSpeed=this.minimumSpeed,this._particleSystem.maximumSpeed=this.maximumSpeed,this._particleSystem.minimumParticleLife=this.minimumParticleLife,this._particleSystem.maximumParticleLife=this.maximumParticleLife,this._particleSystem.show=this.show&&this.enabled}updateGravity(e){return this._updateCallback=(t,i)=>{Cesium.Cartesian3.normalize(t.position,y),Cesium.Cartesian3.multiplyByScalar(y,e*i,y),t.velocity=Cesium.Cartesian3.add(t.velocity,y,t.velocity)}}updateEmitter(){let e;if(e="BoxEmitter"!=this.emitterType?"ConeEmitter"==this.emitterType?this.emitterAngle:this.emitterRadius:new Cesium.Cartesian3(...new Array(3).fill(this.emitterRadius)),!this._particleSystem)return this._emitter=new Cesium[this.emitterType](e),this._emitter;this._particleSystem.emitter=new Cesium[this.emitterType](e),this._emitter=this._particleSystem.emitter}flyTo(){if(this._particleSystem){let e=Math.abs(this._particleSystem.minimumSpeed)>Math.abs(this._particleSystem.maximumSpeed)?Math.abs(this._particleSystem.minimumSpeed):Math.abs(this._particleSystem.maximumSpeed),t=Math.abs(this._particleSystem.minimumParticleLife)>Math.abs(this._particleSystem.maximumParticleLife)?Math.abs(this._particleSystem.minimumParticleLife):Math.abs(this._particleSystem.maximumParticleLife),i=new Cesium.Cartesian3;Cesium.Matrix4.getColumn(this._particleSystem.modelMatrix,3,i);let s=e*t,r=new Cesium.BoundingSphere(i,s);this._viewer.camera.flyToBoundingSphere(r,{duration:2})}}}const S={fountain:{gravity:10,minimumSpeed:10,maximumSpeed:15,gravity:-10,emitterRadius:.1,emissionRate:20,startColor:[1,1,1,1],endColor:[1,1,1,0],emitterType:"CircleEmitter",rotation:[0,Cesium.Math.PI_OVER_TWO,0]},smoke:{startColor:[.12549,.69804,.66667,.7],endColor:[1,1,1,0],rotation:[0,0,0],emissionRate:5,gravity:0,minimumParticleLife:2,maximumParticleLife:2,minimumSpeed:1,maximumSpeed:4,emitterRadius:2,emitterType:"CircleEmitter"}};g.defaultOptions={show:!0,enabled:!0,position:[1.6988083400554626,.6666896940162155,30],startScale:1,endScale:5,particleSize:25,image:"../../XbsjEarth-Plugins/plottingSymbol2/assets/SampleData/smoke.png",emitterAngle:1,...S.smoke},g.registerType(g,"ParticleSystem");var C=g;let _;var M=function(){if(!_){_=document.createElement("canvas"),_.width=20,_.height=20;var e=_.getContext("2d");e.beginPath(),e.arc(8,8,8,0,Cesium.Math.TWO_PI,!0),e.closePath(),e.fillStyle="rgb(255, 255, 255)",e.fill()}return _};new Cesium.Cartesian3;XE.Tool;class w extends XE.Core.XbsjCzmObj{constructor(e,t){super(e,t),this.disposers.push(XE.Earth.Interaction.InteractionProperty.registerPositionEditing(this._earth,this,{positionEditingProperty:"editing"})),this.disposers.push(XE.Earth.Interaction.InteractionProperty.registerPositionPicking(this._earth,this,{positionPickingProperty:"creating"})),this._viewer=e.czm.viewer,this._modelMatrix=this._modelMatrix||Cesium.Matrix4.IDENTITY,this._position=new Cesium.Cartesian3,this._particleSystem=new Cesium.ParticleSystem({image:M(),show:this.show&&this.enabled,startColor:{red:this.startColor[0],green:this.startColor[1],blue:this.startColor[2],alpha:this.startColor[3]},endColor:{red:this.endColor[0],green:this.endColor[1],blue:this.endColor[2],alpha:0},particleLife:this.particleLife,speed:this.radius/this.particleLife||0,imageSize:new Cesium.Cartesian2(7,7),bursts:[new Cesium.ParticleBurst({time:0,minimum:400,maximum:400})],emissionRate:0,lifetime:this.particleLife+this.burstInterval||2,modelMatrix:this._modelMatrix,emitter:new Cesium.SphereEmitter(.1)}),this._viewer.scene.primitives.add(this._particleSystem),this.disposers.push(()=>{this._particleSystem&&(this._viewer.scene.primitives.remove(this._particleSystem),this._particleSystem=void 0)}),this.disposers.push(XE.MVVM.watch(()=>({startColor:[...this.startColor],endColor:[...this.endColor],show:this.show&&this.enabled}),()=>this.updateColor())),this.disposers.push(XE.MVVM.watch(()=>({radius:this.radius,particleLife:this.particleLife,burstInterval:this.burstInterval}),()=>this.updateInitialVelocity())),this.disposers.push(XE.MVVM.watch(()=>({position:[...this.position]}),()=>this.updateModelMatrix()))}updateColor(){this._particleSystem.startColor={red:this.startColor[0],green:this.startColor[1],blue:this.startColor[2],alpha:this.startColor[3]},this._particleSystem.endColor={red:this.endColor[0],green:this.endColor[1],blue:this.endColor[2],alpha:this.endColor[3]},this._particleSystem.show=this.show&&this.enabled}updateModelMatrix(){Cesium.Cartesian3.fromRadians(...this.position,null,this._position),(this._position.x||this._position.y||this._position.z)&&(this._modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(this._position),this._particleSystem.modelMatrix=this._modelMatrix)}updateInitialVelocity(){this._initialVelocity=this.radius/this.particleLife,this._particleSystem.lifetime=this.particleLife+this.burstInterval,this._particleSystem.minimumParticleLife=this.particleLife,this._particleSystem.maximumParticleLife=this.particleLife,this._particleSystem.minimumSpeed=this._initialVelocity,this._particleSystem.maximumSpeed=this._initialVelocity}flyTo(){this.boundingSphere=new Cesium.BoundingSphere(this._position,this.radius),this._viewer.camera.flyToBoundingSphere(this.boundingSphere,{duration:2})}}w.defaultOptions={show:!0,radius:200,particleLife:.8,burstInterval:1,startColor:[.75,0,.8,1],endColor:[.75,0,.8,0],position:[1.7,.6666896940162155,100]},w.registerType(w,"ParticleSystemFireWork");var v=w;XE.Tool;class x extends XE.Core.XbsjCzmObj{constructor(e,t){super(e,t),this.disposers.push(XE.Earth.Interaction.InteractionProperty.registerPositionEditing(this._earth,this,{positionEditingProperty:"positionEditing"})),this.disposers.push(XE.Earth.Interaction.InteractionProperty.registerPositionPicking(this._earth,this,{positionPickingProperty:"creating"})),this.disposers.push(XE.Earth.Interaction.InteractionProperty.registerRotationEditing(this._earth,this,{rotationEditingProperty:"rotationEditing"})),this._viewer=e.czm.viewer,this._particleSystemList=[],this._modelMatrix=Cesium.Matrix4.clone(Cesium.Matrix4.IDENTITY,new Cesium.Matrix4),this._inverseModelMatrix=Cesium.Matrix4.clone(Cesium.Matrix4.IDENTITY,new Cesium.Matrix4),this._position=new Cesium.Cartesian3,this._colors=[],this.disposers.push(()=>{this._particleSystemList=this._particleSystemList.map(e=>{if(e)return this._viewer.scene.primitives.remove(e),e=void 0}),this._particleSystemList.length=0}),this.disposers.push(XE.MVVM.watch(()=>[...this.position,...this.rotation],()=>this.updateMatrix())),this.disposers.push(XE.MVVM.watch(()=>({show:this.show&&this.enabled,color:[...this.colors]}),()=>this.updateColors())),this.disposers.push(XE.MVVM.watch(()=>({emissionRate:this.emissionRate,particleSize:this.particleSize}),()=>this.updateCommon())),this.disposers.push(XE.MVVM.watch(()=>({radius:this.radius,rotate:this.rotate,height:this.height,particleLife:this.particleLife}),()=>this.update())),this.disposers.push(XE.MVVM.watch(()=>this.particleNumber,()=>{this.update(),this.updateParticleSystemList()})),this.updateParticleSystemList()}updateCommon(){this._particleSystemList.forEach(e=>{e.emissionRate=this.emissionRate,e.minimumImageSize.x=this.particleSize,e.minimumImageSize.y=this.particleSize,e.maximumImageSize.x=this.particleSize,e.maximumImageSize.y=this.particleSize})}updateColors(){this._colors.length=0;for(let e=0;e<this.colors.length;e+=4)this._colors.push(new Cesium.Color(this.colors[e],this.colors[e+1],this.colors[e+2],this.colors[e+3]));let e=this._colors.length,t=0;this._particleSystemList.forEach((i,s)=>{t=s%e,i.startColor=this._colors[t],i.endColor=this._colors[t].withAlpha(0),i.show=this.show&&this.enabled})}update(){this._radiuStep=this.radius/this.particleLife,this._rotateSpeed=this.rotate/this.particleLife,this._speed=this.height/this.particleLife,this.changeUpdateCallBack()}updateMatrix(){let e=new Cesium.Matrix4;if(Cesium.Cartesian3.fromRadians(...this.position,null,this._position),!this._position.x&&!this._position.y&&!this._position.z)return;this._modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(this._position);let t=new Cesium.HeadingPitchRoll(...this.rotation),i=Cesium.Quaternion.fromHeadingPitchRoll(t,new Cesium.Quaternion);e=Cesium.Matrix4.fromTranslationQuaternionRotationScale(Cesium.Cartesian3.ZERO,i,new Cesium.Cartesian3(1,1,1),e),Cesium.Matrix4.multiply(this._modelMatrix,e,this._modelMatrix),this._inverseModelMatrix=Cesium.Matrix4.inverse(this._modelMatrix,this._inverseModelMatrix),this._particleSystemList.forEach((e,t)=>{e.modelMatrix=this._modelMatrix}),this.changeUpdateCallBack()}changeUpdateCallBack(){this._particleSystemList.forEach((e,t)=>{e.updateCallback=this.updateCallback(this._radiuStep,this._rotateSpeed,Cesium.Math.TWO_PI*t/this.particleNumber,this._speed,this._inverseModelMatrix,this._modelMatrix)})}updateCallback(e,t,i,s,r,o){let a=new Cesium.Cartesian3;return(n,h)=>{h=Cesium.Math.clamp(h,0,.05),a=Cesium.Matrix4.multiplyByPoint(r,n.position,a),i+=h*t,i%=Cesium.Math.TWO_PI,a.x+=Math.cos(i)*e*h,a.y+=Math.sin(i)*e*h,a.z-=s*h,n.position=Cesium.Matrix4.multiplyByPoint(o,a,n.position)}}updateParticleSystemList(){let e;this._particleSystemList=this._particleSystemList.map(e=>{if(e)return this._viewer.scene.primitives.remove(e),e=void 0}),this._particleSystemList.length=0;for(let t=0;t<this.particleNumber;++t){e=t%this._colors.length;let i=this.updateCallback(this._radiuStep,this._rotateSpeed,Cesium.Math.TWO_PI*t/this.particleNumber,this._speed,this._inverseModelMatrix,this._modelMatrix);this._particleSystemList.push(new Cesium.ParticleSystem({image:M(),show:this.show&&this.enabled,startColor:this._colors[e],endColor:this._colors[e].withAlpha(0),particleLife:this.particleLife,speed:5e-6,imageSize:new Cesium.Cartesian2(this.particleSize,this.particleSize),emissionRate:this.emissionRate,modelMatrix:this._modelMatrix,lifetime:.1,emitter:new Cesium.CircleEmitter(.01),updateCallback:i}))}this._particleSystemList.forEach(e=>{this._viewer.scene.primitives.add(e)})}flyTo(){this.boundingSphere=new Cesium.BoundingSphere(this._position,Math.sqrt(2*Math.pow(this.radius,2),Math.pow(this.height,2))),this._viewer.camera.flyToBoundingSphere(this.boundingSphere,{duration:2})}toBeCometTail(){this.colors=[...P.comet.colors],this.rotate=P.comet.rotate}toBeRocketThruster(){this.colors=[...P.rocket.colors],this.rotate=P.rocket.rotate}}x.defaultOptions={show:!0,particleSize:15,emissionRate:30,particleNumber:100,position:[1.67,.6,50],rotation:[0,0,0],colors:[.6,.6,.6,1,.6,.6,.9,.9,.5,.5,.7,.5],radius:30,rotate:.01,height:50,particleLife:3.5};const P={rocket:{colors:[1,.5,.05,1,.9,.6,.01,1,.8,.05,.09,1,1,.05,.09,1],rotate:1},comet:{colors:[.6,.6,.6,1,.6,.6,.9,.9,.5,.5,.7,.5],rotate:.01}};x.registerType(x,"ParticleSystemTails");var E=x;XE.Tool;function b(e,t,i,s,r){let o,a,n,h,l,c,p=[],m=1/(r+1);for(let d=0;d<r;d++){o=d*m,a=o*o,n=a*o,h=1-o,l=h*h,c=l*h;let r={x:0,y:0,z:0};r.x=c*e.x+3*l*o*t.x+3*h*a*i.x+n*s.x,r.y=c*e.y+3*l*o*t.y+3*h*a*i.y+n*s.y,r.z=c*e.z+3*l*o*t.z+3*h*a*i.z+n*s.z,p.push(r)}return p}XE.Tool;class T extends r{constructor(e,t){super(e,t),this._pgPositions=[],this.disposers.push(XE.MVVM.watch(()=>[...this.positions.map(e=>[...e])],e=>{const t=e.length;if(t<=2)return;if(function(e,t){if(!e||!t)return!1;I=0;for(let i=0;i<e.length;i++)if(I=e[i]==t[i]?0:1,I>0)return!1;return!0}(e[t-1],e[t-2]))return;this._pgPositions.length=0;let i=[];e.forEach(e=>{i.push(e)}),function(e,t=!1){let i=e.length;if(i<3)return;let s=e.map(e=>Cesium.Cartesian3.fromRadians(...e,null,new Cesium.Cartesian3)),[r,o,a,n]=[null,null,null,new Cesium.Cartesian3],[h,l,c]=[[],[],[]],p=[];if(t){h=s.map((e,t)=>{r=s[t-1]||s[i-1],a=e,o=s[t+1]||s[0];let h=Cesium.Cartesian3.subtract(a,r,new Cesium.Cartesian3);return c.push(Cesium.Cartesian3.normalize(h,h)),n=Cesium.Cartesian3.subtract(o,r,n),l.push(Cesium.Cartesian3.distance(a,o)),Cesium.Cartesian3.normalize(n,new Cesium.Cartesian3)});let[e,t]=[new Cesium.Cartesian3,new Cesium.Cartesian3];for(let i=0;i<h.length;i++){a=s[i],o=s[i+1]||s[0];Math.abs(Cesium.Cartesian3.dot(h[i],c[i])),Math.abs(Cesium.Cartesian3.dot(h[i],c[i+1]||c[0]));Cesium.Cartesian3.multiplyByScalar(h[i],.3*l[i],e),Cesium.Cartesian3.multiplyByScalar(h[i+1]||h[0],-.3*l[i],t),Cesium.Cartesian3.add(e,a,e),Cesium.Cartesian3.add(t,o,t),p=p.concat(b(a,e,t,o,50))}}return p.map(e=>{let t=Cesium.Cartographic.fromCartesian(e,void 0,new Cesium.Cartographic);return[t.longitude,t.latitude,t.height]})}(e,!0).forEach(e=>{this._pgPositions.push(e[0],e[1])}),this._polygon.positions=this._pgPositions,this._polygon.height=e[0][2]}))}}T.registerType(T,"GeoSmoothPolygon");var O=T;let I;XE.Obj.Plots=XE.Obj.Plots||{},XE.Obj.Plots.GeoArrow=l,XE.Obj.Plots.GeoSimpleArrow=u,XE.Obj.Plots.ParticleSystem=C,XE.Obj.Plots.GeoSmoothPolygon=O,XE.Obj.Plots.ParticleSystemFireWork=v,XE.Obj.Plots.ParticleSystemTails=E}]);
  //# sourceMappingURL=plottingSymbol2.js.map