1
Surpriseplus
2022-09-16 a7e5110ef3f5fe3c9205f7d1a526b9fbbb55d826
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
/*
 RequireJS 2.1.20 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/jrburke/requirejs for details
*/
var requirejs,require,define;
(function(v){function k(f){return"[object Function]"===aa.call(f)}function q(f){return"[object Array]"===aa.call(f)}function f(f,p){if(f){var t;for(t=0;t<f.length&&(!f[t]||!p(f[t],t,f));t+=1);}}function p(f,p){if(f){var t;for(t=f.length-1;-1<t&&(!f[t]||!p(f[t],t,f));t-=1);}}function t(f,p){return fa.call(f,p)}function w(f,p){return t(f,p)&&f[p]}function x(f,p){for(var k in f)if(t(f,k)&&p(f[k],k))break}function A(f,p,w,v){p&&x(p,function(p,x){if(w||!t(f,x))!v||"object"!==typeof p||!p||q(p)||k(p)||
p instanceof RegExp?f[x]=p:(f[x]||(f[x]={}),A(f[x],p,w,v))});return f}function D(f,p){return function(){return p.apply(f,arguments)}}function z(f){throw f;}function C(p){if(!p)return p;var t=v;f(p.split("."),function(f){t=t[f]});return t}function B(f,p,t,k){p=Error(p+"\nhttp://requirejs.org/docs/errors.html#"+f);p.requireType=f;p.requireModules=k;t&&(p.originalError=t);return p}function E(J){function E(f,p,t){var k,q,x,A,v,D,z,B;p=p&&p.split("/");var F=R.map,C=F&&F["*"];if(f){f=f.split("/");q=f.length-
1;R.nodeIdCompat&&Z.test(f[q])&&(f[q]=f[q].replace(Z,""));"."===f[0].charAt(0)&&p&&(q=p.slice(0,p.length-1),f=q.concat(f));q=f;for(x=0;x<q.length;x++)A=q[x],"."===A?(q.splice(x,1),x-=1):".."===A&&0!==x&&(1!==x||".."!==q[2])&&".."!==q[x-1]&&0<x&&(q.splice(x-1,2),x-=2);f=f.join("/")}if(t&&F&&(p||C)){q=f.split("/");x=q.length;a:for(;0<x;x-=1){v=q.slice(0,x).join("/");if(p)for(A=p.length;0<A;A-=1)if(t=w(F,p.slice(0,A).join("/")))if(t=w(t,v)){k=t;D=x;break a}!z&&C&&w(C,v)&&(z=w(C,v),B=x)}!k&&z&&(k=z,D=
B);k&&(q.splice(0,D,k),f=q.join("/"))}return(k=w(R.pkgs,f))?k:f}function ca(p){M&&f(document.getElementsByTagName("script"),function(f){if(f.getAttribute("data-requiremodule")===p&&f.getAttribute("data-requirecontext")===O.contextName)return f.parentNode.removeChild(f),!0})}function H(f){var p=w(R.paths,f);if(p&&q(p)&&1<p.length)return p.shift(),O.require.undef(f),O.makeRequire(null,{skipMap:!0})([f]),!0}function G(f){var p,t=f?f.indexOf("!"):-1;-1<t&&(p=f.substring(0,t),f=f.substring(t+1,f.length));
return[p,f]}function I(f,p,t,k){var q,x,A=null,v=p?p.name:null,D=f,z=!0,B="";f||(z=!1,f="_@r"+(sa+=1));f=G(f);A=f[0];f=f[1];A&&(A=E(A,v,k),x=w(W,A));f&&(A?B=x&&x.normalize?x.normalize(f,function(f){return E(f,v,k)}):-1===f.indexOf("!")?E(f,v,k):f:(B=E(f,v,k),f=G(B),A=f[0],B=f[1],t=!0,q=O.nameToUrl(B)));t=!A||x||t?"":"_unnormalized"+(ta+=1);return{prefix:A,name:B,parentMap:p,unnormalized:!!t,url:q,originalName:D,isDefine:z,id:(A?A+"!"+B:B)+t}}function L(f){var p=f.id,t=w(V,p);t||(t=V[p]=new O.Module(f));
return t}function Q(f,p,k){var q=f.id,x=w(V,q);if(!t(W,q)||x&&!x.defineEmitComplete)if(x=L(f),x.error&&"error"===p)k(x.error);else x.on(p,k);else"defined"===p&&k(W[q])}function T(p,t){var k=p.requireModules,q=!1;if(t)t(p);else if(f(k,function(f){if(f=w(V,f))f.error=p,f.events.error&&(q=!0,f.emit("error",p))}),!q)F.onError(p)}function N(){ia.length&&(f(ia,function(f){var p=f[0];"string"===typeof p&&(O.defQueueMap[p]=!0);ba.push(f)}),ia=[])}function U(f){delete V[f];delete la[f]}function Y(p,t,k){var q=
p.map.id;p.error?p.emit("error",p.error):(t[q]=!0,f(p.depMaps,function(f,q){var x=f.id,A=w(V,x);!A||p.depMatched[q]||k[x]||(w(t,x)?(p.defineDep(q,W[x]),p.check()):Y(A,t,k))}),k[q]=!0)}function da(){var p,t,k=(p=1E3*R.waitSeconds)&&O.startTime+p<(new Date).getTime(),q=[],w=[],A=!1,v=!0;if(!ma){ma=!0;x(la,function(f){var p=f.map,x=p.id;if(f.enabled&&(p.isDefine||w.push(f),!f.error))if(!f.inited&&k)H(x)?A=t=!0:(q.push(x),ca(x));else if(!f.inited&&f.fetched&&p.isDefine&&(A=!0,!p.prefix))return v=!1});
if(k&&q.length)return p=B("timeout","Load timeout for modules: "+q,null,q),p.contextName=O.contextName,T(p);v&&f(w,function(f){Y(f,{},{})});k&&!t||!A||!M&&!ja||na||(na=setTimeout(function(){na=0;da()},50));ma=!1}}function ea(f){t(W,f[0])||L(I(f[0],null,!0)).init(f[1],f[2])}function aa(f){f=f.currentTarget||f.srcElement;var p=O.onScriptLoad;f.detachEvent&&!S?f.detachEvent("onreadystatechange",p):f.removeEventListener("load",p,!1);p=O.onScriptError;f.detachEvent&&!S||f.removeEventListener("error",p,
!1);return{node:f,id:f&&f.getAttribute("data-requiremodule")}}function fa(){var f;for(N();ba.length;){f=ba.shift();if(null===f[0])return T(B("mismatch","Mismatched anonymous define() module: "+f[f.length-1]));ea(f)}O.defQueueMap={}}var ma,oa,O,ga,na,R={waitSeconds:0,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},V={},la={},pa={},ba=[],W={},ka={},qa={},sa=1,ta=1;ga={require:function(f){return f.require?f.require:f.require=O.makeRequire(f.map)},exports:function(f){f.usingExports=!0;if(f.map.isDefine)return f.exports?
W[f.map.id]=f.exports:f.exports=W[f.map.id]={}},module:function(f){return f.module?f.module:f.module={id:f.map.id,uri:f.map.url,config:function(){return w(R.config,f.map.id)||{}},exports:f.exports||(f.exports={})}}};oa=function(f){this.events=w(pa,f.id)||{};this.map=f;this.shim=w(R.shim,f.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};oa.prototype={init:function(f,p,t,k){k=k||{};if(!this.inited){this.factory=p;if(t)this.on("error",t);else this.events.error&&
(t=D(this,function(f){this.emit("error",f)}));this.depMaps=f&&f.slice(0);this.errback=t;this.inited=!0;this.ignore=k.ignore;k.enabled||this.enabled?this.enable():this.check()}},defineDep:function(f,p){this.depMatched[f]||(this.depMatched[f]=!0,this.depCount-=1,this.depExports[f]=p)},fetch:function(){if(!this.fetched){this.fetched=!0;O.startTime=(new Date).getTime();var f=this.map;if(this.shim)O.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],D(this,function(){return f.prefix?this.callPlugin():
this.load()}));else return f.prefix?this.callPlugin():this.load()}},load:function(){var f=this.map.url;ka[f]||(ka[f]=!0,O.load(this.map.id,f))},check:function(){if(this.enabled&&!this.enabling){var f,p,q=this.map.id;p=this.depExports;var w=this.exports,x=this.factory;if(!this.inited)t(O.defQueueMap,q)||this.fetch();else if(this.error)this.emit("error",this.error);else if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(k(x)){if(this.events.error&&this.map.isDefine||F.onError!==
z)try{w=O.execCb(q,x,p,w)}catch(A){f=A}else w=O.execCb(q,x,p,w);this.map.isDefine&&void 0===w&&((p=this.module)?w=p.exports:this.usingExports&&(w=this.exports));if(f)return f.requireMap=this.map,f.requireModules=this.map.isDefine?[this.map.id]:null,f.requireType=this.map.isDefine?"define":"require",T(this.error=f)}else w=x;this.exports=w;if(this.map.isDefine&&!this.ignore&&(W[q]=w,F.onResourceLoad))F.onResourceLoad(O,this.map,this.depMaps);U(q);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&
(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}},callPlugin:function(){var f=this.map,p=f.id,k=I(f.prefix);this.depMaps.push(k);Q(k,"defined",D(this,function(k){var q,A;A=w(qa,this.map.id);var v=this.map.name,z=this.map.parentMap?this.map.parentMap.name:null,C=O.makeRequire(f.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(k.normalize&&(v=k.normalize(v,function(f){return E(f,z,!0)})||""),k=I(f.prefix+"!"+v,this.map.parentMap),Q(k,"defined",D(this,
function(f){this.init([],function(){return f},null,{enabled:!0,ignore:!0})})),A=w(V,k.id)){this.depMaps.push(k);if(this.events.error)A.on("error",D(this,function(f){this.emit("error",f)}));A.enable()}}else A?(this.map.url=O.nameToUrl(A),this.load()):(q=D(this,function(f){this.init([],function(){return f},null,{enabled:!0})}),q.error=D(this,function(f){this.inited=!0;this.error=f;f.requireModules=[p];x(V,function(f){0===f.map.id.indexOf(p+"_unnormalized")&&U(f.map.id)});T(f)}),q.fromText=D(this,function(k,
w){var x=f.name,A=I(x),v=ha;w&&(k=w);v&&(ha=!1);L(A);t(R.config,p)&&(R.config[x]=R.config[p]);try{F.exec(k)}catch(D){return T(B("fromtexteval","fromText eval for "+p+" failed: "+D,D,[p]))}v&&(ha=!0);this.depMaps.push(A);O.completeLoad(x);C([x],q)}),k.load(f.name,C,q,R))}));O.enable(k,this);this.pluginMaps[k.id]=k},enable:function(){la[this.map.id]=this;this.enabling=this.enabled=!0;f(this.depMaps,D(this,function(f,p){var k,q;if("string"===typeof f){f=I(f,this.map.isDefine?this.map:this.map.parentMap,
!1,!this.skipMap);this.depMaps[p]=f;if(k=w(ga,f.id)){this.depExports[p]=k(this);return}this.depCount+=1;Q(f,"defined",D(this,function(f){this.undefed||(this.defineDep(p,f),this.check())}));this.errback?Q(f,"error",D(this,this.errback)):this.events.error&&Q(f,"error",D(this,function(f){this.emit("error",f)}))}k=f.id;q=V[k];t(ga,k)||!q||q.enabled||O.enable(f,this)}));x(this.pluginMaps,D(this,function(f){var p=w(V,f.id);p&&!p.enabled&&O.enable(f,this)}));this.enabling=!1;this.check()},on:function(f,
p){var t=this.events[f];t||(t=this.events[f]=[]);t.push(p)},emit:function(p,t){f(this.events[p],function(f){f(t)});"error"===p&&delete this.events[p]}};O={config:R,contextName:J,registry:V,defined:W,urlFetched:ka,defQueue:ba,defQueueMap:{},Module:oa,makeModuleMap:I,nextTick:F.nextTick,onError:T,configure:function(p){p.baseUrl&&"/"!==p.baseUrl.charAt(p.baseUrl.length-1)&&(p.baseUrl+="/");var t=R.shim,k={paths:!0,bundles:!0,config:!0,map:!0};x(p,function(f,p){k[p]?(R[p]||(R[p]={}),A(R[p],f,!0,!0)):
R[p]=f});p.bundles&&x(p.bundles,function(p,t){f(p,function(f){f!==t&&(qa[f]=t)})});p.shim&&(x(p.shim,function(f,p){q(f)&&(f={deps:f});!f.exports&&!f.init||f.exportsFn||(f.exportsFn=O.makeShimExports(f));t[p]=f}),R.shim=t);p.packages&&f(p.packages,function(f){var p;f="string"===typeof f?{name:f}:f;p=f.name;f.location&&(R.paths[p]=f.location);R.pkgs[p]=f.name+"/"+(f.main||"main").replace(ra,"").replace(Z,"")});x(V,function(f,p){f.inited||f.map.unnormalized||(f.map=I(p,null,!0))});(p.deps||p.callback)&&
O.require(p.deps||[],p.callback)},makeShimExports:function(f){return function(){var p;f.init&&(p=f.init.apply(v,arguments));return p||f.exports&&C(f.exports)}},makeRequire:function(f,q){function x(p,w,A){var v,D;q.enableBuildCallback&&w&&k(w)&&(w.__requireJsBuild=!0);if("string"===typeof p){if(k(w))return T(B("requireargs","Invalid require call"),A);if(f&&t(ga,p))return ga[p](V[f.id]);if(F.get)return F.get(O,p,f,x);v=I(p,f,!1,!0);v=v.id;return t(W,v)?W[v]:T(B("notloaded",'Module name "'+v+'" has not been loaded yet for context: '+
J+(f?"":". Use require([])")))}fa();O.nextTick(function(){fa();D=L(I(null,f));D.skipMap=q.skipMap;D.init(p,w,A,{enabled:!0});da()});return x}q=q||{};A(x,{isBrowser:M,toUrl:function(p){var t,k=p.lastIndexOf("."),q=p.split("/")[0];-1!==k&&("."!==q&&".."!==q||1<k)&&(t=p.substring(k,p.length),p=p.substring(0,k));return O.nameToUrl(E(p,f&&f.id,!0),t,!0)},defined:function(p){return t(W,I(p,f,!1,!0).id)},specified:function(p){p=I(p,f,!1,!0).id;return t(W,p)||t(V,p)}});f||(x.undef=function(t){N();var k=I(t,
f,!0),q=w(V,t);q.undefed=!0;ca(t);delete W[t];delete ka[k.url];delete pa[t];p(ba,function(f,p){f[0]===t&&ba.splice(p,1)});delete O.defQueueMap[t];q&&(q.events.defined&&(pa[t]=q.events),U(t))});return x},enable:function(f){w(V,f.id)&&L(f).enable()},completeLoad:function(f){var p,k,q=w(R.shim,f)||{},x=q.exports;for(N();ba.length;){k=ba.shift();if(null===k[0]){k[0]=f;if(p)break;p=!0}else k[0]===f&&(p=!0);ea(k)}O.defQueueMap={};k=w(V,f);if(!p&&!t(W,f)&&k&&!k.inited)if(!R.enforceDefine||x&&C(x))ea([f,
q.deps||[],q.exportsFn]);else return H(f)?void 0:T(B("nodefine","No define call for "+f,null,[f]));da()},nameToUrl:function(f,p,t){var k,x,A;(k=w(R.pkgs,f))&&(f=k);if(k=w(qa,f))return O.nameToUrl(k,p,t);if(F.jsExtRegExp.test(f))k=f+(p||"");else{k=R.paths;f=f.split("/");for(x=f.length;0<x;x-=1)if(A=f.slice(0,x).join("/"),A=w(k,A)){q(A)&&(A=A[0]);f.splice(0,x,A);break}k=f.join("/");k+=p||(/^data\:|\?/.test(k)||t?"":".js");k=("/"===k.charAt(0)||k.match(/^[\w\+\.\-]+:/)?"":R.baseUrl)+k}return R.urlArgs?
k+((-1===k.indexOf("?")?"?":"&")+R.urlArgs):k},load:function(f,p){F.load(O,f,p)},execCb:function(f,p,t,k){return p.apply(k,t)},onScriptLoad:function(f){if("load"===f.type||K.test((f.currentTarget||f.srcElement).readyState))X=null,f=aa(f),O.completeLoad(f.id)},onScriptError:function(f){var p=aa(f);if(!H(p.id))return T(B("scripterror","Script error for: "+p.id,f,[p.id]))}};O.require=O.makeRequire();return O}function G(){if(X&&"interactive"===X.readyState)return X;p(document.getElementsByTagName("script"),
function(f){if("interactive"===f.readyState)return X=f});return X}var F,H,J,L,N,Q,X,U,I,Y,da=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,ea=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,Z=/\.js$/,ra=/^\.\//;H=Object.prototype;var aa=H.toString,fa=H.hasOwnProperty,M=!("undefined"===typeof window||"undefined"===typeof navigator||!window.document),ja=!M&&"undefined"!==typeof importScripts,K=M&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,S="undefined"!==typeof opera&&"[object Opera]"===
opera.toString(),ca={},T={},ia=[],ha=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(k(requirejs))return;T=requirejs;requirejs=void 0}"undefined"===typeof require||k(require)||(T=require,require=void 0);F=requirejs=function(f,p,t,k){var x,A="_";q(f)||"string"===typeof f||(x=f,q(p)?(f=p,p=t,t=k):f=[]);x&&x.context&&(A=x.context);(k=w(ca,A))||(k=ca[A]=F.s.newContext(A));x&&k.configure(x);return k.require(f,p,t)};F.config=function(f){return F(f)};F.nextTick="undefined"!==typeof setTimeout?
function(f){setTimeout(f,4)}:function(f){f()};require||(require=F);F.version="2.1.20";F.jsExtRegExp=/^\/|:|\?|\.js$/;F.isBrowser=M;H=F.s={contexts:ca,newContext:E};F({});f(["toUrl","undef","defined","specified"],function(f){F[f]=function(){var p=ca._;return p.require[f].apply(p,arguments)}});M&&(J=H.head=document.getElementsByTagName("head")[0],L=document.getElementsByTagName("base")[0])&&(J=H.head=L.parentNode);F.onError=z;F.createNode=function(f,p,t){p=f.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml",
"html:script"):document.createElement("script");p.type=f.scriptType||"text/javascript";p.charset="utf-8";p.async=!0;return p};F.load=function(f,p,t){var k=f&&f.config||{},q;if(M){q=F.createNode(k,p,t);if(k.onNodeCreated)k.onNodeCreated(q,k,p,t);q.setAttribute("data-requirecontext",f.contextName);q.setAttribute("data-requiremodule",p);!q.attachEvent||q.attachEvent.toString&&0>q.attachEvent.toString().indexOf("[native code")||S?(q.addEventListener("load",f.onScriptLoad,!1),q.addEventListener("error",
f.onScriptError,!1)):(ha=!0,q.attachEvent("onreadystatechange",f.onScriptLoad));q.src=t;U=q;L?J.insertBefore(q,L):J.appendChild(q);U=null;return q}if(ja)try{importScripts(t),f.completeLoad(p)}catch(w){f.onError(B("importscripts","importScripts failed for "+p+" at "+t,w,[p]))}};M&&!T.skipDataMain&&p(document.getElementsByTagName("script"),function(f){J||(J=f.parentNode);if(N=f.getAttribute("data-main"))return I=N,T.baseUrl||(Q=I.split("/"),I=Q.pop(),Y=Q.length?Q.join("/")+"/":"./",T.baseUrl=Y),I=I.replace(Z,
""),F.jsExtRegExp.test(I)&&(I=N),T.deps=T.deps?T.deps.concat(I):[I],!0});define=function(f,p,t){var w,x;"string"!==typeof f&&(t=p,p=f,f=null);q(p)||(t=p,p=null);!p&&k(t)&&(p=[],t.length&&(t.toString().replace(da,"").replace(ea,function(f,t){p.push(t)}),p=(1===t.length?["require"]:["require","exports","module"]).concat(p)));ha&&(w=U||G())&&(f||(f=w.getAttribute("data-requiremodule")),x=ca[w.getAttribute("data-requirecontext")]);x?(x.defQueue.push([f,p,t]),x.defQueueMap[f]=!0):ia.push([f,p,t])};define.amd=
{jQuery:!0};F.exec=function(f){return eval(f)};F(T)}})(this);define("../ThirdParty/requirejs-2.1.20/require",function(){});
define("scene/GwUnderground.js",[],function(){function v(k,q){this._earthCtrl=k;this.coreMap=k.coreMap;var f=Geoworld.defaultValue(q,{});this._depth=Geoworld.defaultValue(f.depth,5E3);this._alpha=Geoworld.defaultValue(f.alpha,0.5);this.enable=Geoworld.defaultValue(f.enable,!1)}v.prototype._updateImageryLayersAlpha=function(k){this.coreMap.scene.globe.baseColor.withAlpha(k);for(var q=this._earthCtrl.imageryLayers._layers,f=0,p=q.length;f<p;f++)q[f].alpha=k};v.prototype._historyOpts=function(){var k=
{};k.alpha=Geoworld.clone(this._earthCtrl.imageryLayers._layers[0]&&this._earthCtrl.imageryLayers._layers[0].alpha);k.highDynamicRange=Geoworld.clone(this.coreMap.scene.highDynamicRange);k.skyShow=Geoworld.clone(this.coreMap.scene.skyAtmosphere.show);k.skyBoxShow=Geoworld.clone(this.coreMap.scene.skyBox.show);k.depthTest=Geoworld.clone(this.coreMap.scene.globe.depthTestAgainstTerrain);k.globeBaseColor=Geoworld.clone(this.coreMap.scene.globe.baseColor);this.coreMap.scene.globe._surface&&this.coreMap.scene.globe._surface._tileProvider&&
this.coreMap.scene.globe._surface._tileProvider._renderState&&(k.blending=Geoworld.clone(this.coreMap.scene.globe._surface._tileProvider._renderState.blending));this._oldViewOpts=k};v.prototype.activate=function(){if(!this._enable){this._enable=!0;this._historyOpts();this._updateImageryLayersAlpha(this._alpha);var k=this.coreMap;k.scene.screenSpaceCameraController.enableCollisionDetection=!1;Geoworld.ExpandByTerra.underEarth.cullFace=!1;Geoworld.ExpandByTerra.underEarth.enable=!0;Geoworld.ExpandByTerra.underEarth.enableDepth=
this._depth;Geoworld.ExpandByTerra.underEarth.enableSkirt=!0;k.scene.globe.depthTestAgainstTerrain=!0;k.scene.highDynamicRange=!1;k.scene.skyAtmosphere.show=!1;k.scene.skyBox.show=!1;k.scene.globe.baseColor=new Geoworld.Color(0,0,0,this._alpha);k.scene.globe._surface._tileProvider&&(k.scene.globe._surface._tileProvider._renderState&&k.scene.globe._surface._tileProvider._renderState.blending)}};v.prototype.disable=function(){if(this._enable){this._enable=!1;this._updateImageryLayersAlpha(this._oldViewOpts.alpha);
var k=this.coreMap;Geoworld.ExpandByTerra.underEarth.cullFace=void 0;Geoworld.ExpandByTerra.underEarth.enable=!1;Geoworld.ExpandByTerra.underEarth.enableDepth=0;Geoworld.ExpandByTerra.underEarth.enableSkirt=!1;k.scene.globe.depthTestAgainstTerrain=this._oldViewOpts.depthTest;k.scene.skyBox.show=this._oldViewOpts.skyBoxShow;k.scene.highDynamicRange=this._oldViewOpts.highDynamicRange;k.scene.skyAtmosphere.show=this._oldViewOpts.skyShow;k.scene.globe.baseColor=this._oldViewOpts.globeBaseColor}};Object.defineProperties(v.prototype,
{alpha:{set:function(k){this._alpha=k;this._updateImageryLayersAlpha(k)},get:function(){return this._alpha}}});v.prototype.destroy=function(){delete this._alpha;delete this._depth;delete this._enable;delete this._oldViewOpts};return v});
define("Tools/GwTool.js",[],function(){new Geoworld.Ray;new Geoworld.Cartesian3;new Geoworld.Cartesian3;var v=Class.extend({__init__:function(){this.mCoreMap=this.mEarthCtrl=null;this.name="Tool";this.mEnable=!0;this.mRightButtonDrag=this.mMidButtonDrag=this.mLeftButtonDrag=this.mAltDown=this.mCtrlDown=this.mShiftDown=this.mRightButtonDown=this.mMidButtonDown=this.mLeftButtonDown=!1;this.mLastMouseDownTime=0;this.mCallback=null},initialize:function(k,q,f){this.mEarthCtrl=k;this.mCoreMap=k.coreMap;
this.mCallback=q;this.mEnable=void 0!==f?f:!0;this.mRenderObjectSet={}},destory:function(){},clearResult:function(){},onActive:function(){this.mEnable=!0},onDeactive:function(){this.mEnable=!1;Geoworld.defined(this.mPoly)&&this.mPoly.destory()},onInputMessage:function(k){if(!1!==this.mEnable){var q=new Geoworld.Cartesian2(k.offsetX,k.offsetY);"pointerdown"===k.type?(0===k.button?this.onLButtonDown&&this.onLButtonDown(q):1===k.button?this.onMButtonDown&&this.onMButtonDown(q):2===k.button&&this.onRButtonDown&&
this.onRButtonDown(q),this.mLastMouseDownTime=k.timeStamp):"pointerup"===k.type?0===k.button?this.onLButtonUp&&this.onLButtonUp(q):1===k.button?this.onMButtonUp&&this.onMButtonUp(q):2===k.button&&this.onRButtonUp&&this.onRButtonUp(q):"pointermove"===k.type&&this.onMouseMove&&this.onMouseMove(q)}},onLButtonDown:function(k){this.mMouseDownPoint=this.mMousePrevPoint=k;this.mLeftButtonDown=!0},onLButtonUp:function(k){this.mLeftButtonDown=!1;return this.mLeftButtonDrag?this.mLeftButtonDrag=!1:!0},onLButtonDoubeClick:function(k){this.mMouseDownPoint=
this.mMousePrevPoint=k},onLButtonDrag:function(k){return!0},onMButtonDown:function(k){this.mMouseDownPoint=this.mMousePrevPoint=k;this.mMidButtonDown=!0},onMButtonUp:function(k){this.mMidButtonDown=!1;return this.mMidButtonDrag?this.mMidButtonDrag=!1:!0},onMButtonDoubeClick:function(k){this.mMouseDownPoint=this.mMousePrevPoint=k},onMButtonDrag:function(k){return!0},onRButtonDown:function(k){this.mMouseDownPoint=this.mMousePrevPoint=k;this.mRightButtonDown=!0},onRButtonUp:function(k){this.mRightButtonDown=
!1;return this.mRightButtonDrag?this.mRightButtonDrag=!1:!0},onRButtonDoubeClick:function(k){this.mMouseDownPoint=this.mMousePrevPoint=k},onRButtonDrag:function(k){return!0},onMouseMove:function(k){!1===this.mLeftButtonDown&&!1===this.mMidButtonDown&&!1===this.mRightButtonDown?this.mMousePrevPoint=k:10>Geoworld.Cartesian2.distance(k,this.mMousePrevPoint)||(this.mLeftButtonDown&&this.onLButtonDrag(k)&&(this.mMousePrevPoint=k,this.mLeftButtonDrag=!0),this.mMidButtonDown&&this.onMButtonDrag(k)&&(this.mMousePrevPoint=
k,this.mMidButtonDrag=!0),this.mRightButtonDown&&this.onRButtonDrag(k)&&(this.mMousePrevPoint=k,this.mRightButtonDrag=!0),this.mMousePrevPoint=k)},onMouseWheel:function(k,q){},onKeyDown:function(k){},onKeyUp:function(k){},calculateLength:function(k,q){for(var f=0,p=k.length,t=0;t<p-1;t++)f+=Geoworld.Cartesian3.distance(k[t+1],k[t]);q&&(f+=Geoworld.Cartesian3.distance(k[0],k[p-1]));return f},calculateSphericalArea:function(k,q){var f=0;if(q)for(var p=0;p<k.length-1;p++)var t=k[p],w=k[p+1],f=f+(t.x*
w.y-w.x*t.y);else for(p=0;p<k.length;p++)t=k[p],w=p<k.length-1?k[p+1]:k[0],f+=t.x*w.y-w.x*t.y;return f/2},pickVector:function(k,q){var f=this.mCoreMap.scene;if(Geoworld.defined(f.globe)){var p;return f.pickPositionSupported&&(p=f.pickPosition(k),void 0===p)?void 0:Geoworld.Cartesian3.clone(p,q)}},pickObject:function(k,q){var f=this.mCoreMap.scene;this.mCoreMap.camera.getPickRay(k);f=f.pick(k);return Geoworld.defined(f)?(q.pickedObject=f,!0):!1},doubeClickObject:function(k,q){var f=this.mCoreMap.scene;
this.mCoreMap.camera.getPickRay(k);f=f.pick(k);return Geoworld.defined(f)?(q.doubeClickedObject=f,!0):!1}});return Geoworld.GwTool=v});
define("Tools/Select/MouseHeadingTool.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="MoushHeadingTool";this.prevPosition=void 0;this.width=document.body.clientWidth;this.height=document.body.clientHeight;this.heightDegree=this.widthDegree=90;this.leftClick=!1},onLButtonDown:function(k){this.leftClick=!0},onLButtonUp:function(k){this.leftClick=!1;return!0},onMouseMove:function(k){if(this.leftClick){if(void 0!==this.prevPosition){var q=(k.x-this.prevPosition.x)/
this.width*this.widthDegree,f=(this.prevPosition.y-k.y)/this.height*this.heightDegree;this.mCallback&&this.mCallback({headingAmount:q,pitchAmount:f})}this.prevPosition=k}else this.prevPosition=void 0}})});
define("GwCamera.js",["./scene/GwUnderground.js","./Tools/Select/MouseHeadingTool.js"],function(v,k){function q(f){this._earthCtrl=f;this._coreMap=f.coreMap;this._camera=this._coreMap.camera;this._undergroundMode=!1;this.underground=new v(f)}q.prototype.setViewBound=function(f,t,k,q){};q.prototype.forward=function(f){this._camera.moveBackward(f)};q.prototype.backward=function(f){this._camera.moveForward(f)};q.prototype.moveLeft=function(f){this._camera.moveLeft(f)};q.prototype.moveRight=function(f){this._camera.moveRight(f)};
q.prototype.moveUp=function(f){this._camera.moveUp(f)};q.prototype.moveDown=function(f){this._camera.moveDown(f)};q.prototype.turnLeft=function(f){this._camera.twistLeft(f)};q.prototype.turnRight=function(f){this._camera.twistRight(f)};q.prototype.lookLeft=function(f){this._camera.lookLeft(f)};q.prototype.lookRight=function(f){this._camera.lookRight(f)};q.prototype.lookUp=function(f){this._camera.lookUp(f)};q.prototype.lookDown=function(f){this._camera.lookDown(f)};q.prototype.zoomIn=function(f){!1===
Geoworld.defaultValue(this.undergroundMode,!1)&&(this._camera.positionCartographic.height<f||!f&&1E5>this._camera.positionCartographic.height)||this._camera.zoomIn(f)};q.prototype.zoomOut=function(f){this._camera.zoomOut(f)};q.prototype.zoom=function(f){};q.prototype.moveHeading=function(f){f=Geoworld.defaultValue(f,1);f=Geoworld.Math.toDegrees(this._coreMap.camera.heading)+f;var t=this._coreMap.camera.pitch;this._coreMap.camera.setView({orientation:{heading:Geoworld.Math.toRadians(f),pitch:t,endTransform:Geoworld.Matrix4.IDENTITY}})};
q.prototype.pickFromRay=function(f,t,k){f=this._camera.getPickRay(f);t=this._coreMap.scene.pickFromRay(f,t,k);return Geoworld.defined(t)?t.position:void 0};q.prototype.flyTo=function(f,t,k,q,A,v,z,C){this._camera.flyTo({destination:Geoworld.Cartesian3.fromDegrees(f,t,k),orientation:{heading:Geoworld.Math.toRadians(q),pitch:Geoworld.Math.toRadians(A),roll:Geoworld.Math.toRadians(v)},duration:z,complete:C})};q.prototype.flyToTarget=function(f,t,k,q,A,v,z,C,B){this._camera.flyTo({destination:Geoworld.Cartesian3.fromDegrees(f,
t,k),orientation:{heading:Geoworld.Math.toRadians(q),pitch:Geoworld.Math.toRadians(A),roll:Geoworld.Math.toRadians(v)},duration:C})};var f=new Geoworld.BoundingSphere;q.prototype.getPoseByData=function(p,t,k,q,A){var v=!1;if(0==p.length)return v;for(var z=new Geoworld.BoundingSphere,C=0;C<p.length;C++){var B=p[C];if("GwModel"==B.rtti||"GwModelLayer"==B.rtti)B=B._primitive,Geoworld.defined(B.modelMatrix)&&Geoworld.defined(B.boundingSphere)&&(v=Geoworld.BoundingSphere.transform(B.boundingSphere,B.modelMatrix,
f),0==C?Geoworld.BoundingSphere.clone(v,z):z=Geoworld.BoundingSphere.union(z,v,z),v=!0)}if(!0!=v)return v;p=Geoworld.Cartographic.fromCartesian(z.center);A.longitude=Geoworld.Math.toDegrees(p.longitude);A.latitude=Geoworld.Math.toDegrees(p.latitude);A.height=p.height+z.radius;A.heading=t;A.tilt=k;A.roll=q;return v};q.prototype.setView=function(f){this._camera.setView(f)};q.prototype.headingControl=function(f){this._earthCtrl.tools.clearTool();if(f){f=new k;var t=this._camera;f.initialize(this._earthCtrl,
function(f){var p=Geoworld.Math.toDegrees(t.heading)+f.headingAmount;f=Geoworld.Math.toDegrees(t.pitch)+f.pitchAmount;t.setView({destination:t.position,orientation:{heading:Geoworld.Math.toRadians(p),pitch:Geoworld.Math.toRadians(f),roll:0}})});this._earthCtrl.tools.registerTool("mouse_heading_tool",f)}};q.prototype.viewPoint={lon:104.5,lat:30.0624522000912,alt:6649118,heading:360,pitch:-90,roll:0,duration:0};Object.defineProperties(q.prototype,{enableModelColliDetection:{get:function(){return this._coreMap.scene.screenSpaceCameraController.enableModelCollisionDetection},
set:function(f){this._coreMap.scene.screenSpaceCameraController.enableModelCollisionDetection=f}},enableModelGroundCollisionDetection:{get:function(){return this._coreMap.scene.screenSpaceCameraController.enableModelGroundCollisionDetection},set:function(f){this._coreMap.scene.screenSpaceCameraController.enableModelGroundCollisionDetection=f}},enableGroundRoaming:{get:function(){return this._coreMap.scene.screenSpaceCameraController.enableGroundRoaming},set:function(f){this._coreMap.scene.screenSpaceCameraController.enableInputs=
!f;this._coreMap.scene.screenSpaceCameraController.enableRotate=!f;this._coreMap.scene.screenSpaceCameraController.enableZoom=!f;this._coreMap.scene.screenSpaceCameraController.enableTilt=!f;this._coreMap.scene.screenSpaceCameraController.enableLook=!f;this._coreMap.scene.screenSpaceCameraController.enableGroundRoaming=f;this._coreMap.camera.frustum.near=f?0.1:1;this._coreMap.camera.frustum.fov=Geoworld.Math.toRadians(90)}},collisionRayWidth:{get:function(){return this._coreMap.scene.screenSpaceCameraController.defaultCollisionRayWidth},
set:function(f){this._coreMap.scene.screenSpaceCameraController.defaultCollisionRayWidth=f}},groundRoamingHeight:{get:function(){return this._coreMap.scene.screenSpaceCameraController.defaultGroundRoamingHeight},set:function(f){1.5>f&&(f=1.5);this._coreMap.scene.screenSpaceCameraController.defaultGroundRoamingHeight=f}},undergroundMode:{get:function(){return this._undergroundMode},set:function(f){(this._undergroundMode=f)?this.underground.activate():this.underground.disable()}},imageryLayeralpha:{get:function(){return this.underground.alpha},
set:function(f){this.underground.alpha=f}},position:{get:function(){var f=Geoworld.Cartographic.fromCartesian(this._camera.position);f.longitude=Geoworld.Math.toDegrees(f.longitude);f.latitude=Geoworld.Math.toDegrees(f.latitude);return f}},heading:{get:function(){return Geoworld.Math.toDegrees(this._camera.heading)}},pitch:{get:function(){return Geoworld.Math.toDegrees(this._camera.pitch)}},roll:{get:function(){return Geoworld.Math.toDegrees(this._camera.roll)}}});return q});
define("../Interface/Tools/GwTool.js",[],function(){new Geoworld.Ray;new Geoworld.Cartesian3;new Geoworld.Cartesian3;var v=Class.extend({__init__:function(){this.mCoreMap=this.mEarthCtrl=null;this.name="Tool";this.mEnable=!0;this.mRightButtonDrag=this.mMidButtonDrag=this.mLeftButtonDrag=this.mAltDown=this.mCtrlDown=this.mShiftDown=this.mRightButtonDown=this.mMidButtonDown=this.mLeftButtonDown=!1;this.mLastMouseDownTime=0;this.mCallback=null},initialize:function(k,q,f){this.mEarthCtrl=k;this.mCoreMap=
k.coreMap;this.mCallback=q;this.mEnable=void 0!==f?f:!0;this.mRenderObjectSet={}},destory:function(){},clearResult:function(){},onActive:function(){this.mEnable=!0},onDeactive:function(){this.mEnable=!1;Geoworld.defined(this.mPoly)&&this.mPoly.destory()},onInputMessage:function(k){if(!1!==this.mEnable){var q=new Geoworld.Cartesian2(k.offsetX,k.offsetY);"pointerdown"===k.type?(0===k.button?this.onLButtonDown&&this.onLButtonDown(q):1===k.button?this.onMButtonDown&&this.onMButtonDown(q):2===k.button&&
this.onRButtonDown&&this.onRButtonDown(q),this.mLastMouseDownTime=k.timeStamp):"pointerup"===k.type?0===k.button?this.onLButtonUp&&this.onLButtonUp(q):1===k.button?this.onMButtonUp&&this.onMButtonUp(q):2===k.button&&this.onRButtonUp&&this.onRButtonUp(q):"pointermove"===k.type&&this.onMouseMove&&this.onMouseMove(q)}},onLButtonDown:function(k){this.mMouseDownPoint=this.mMousePrevPoint=k;this.mLeftButtonDown=!0},onLButtonUp:function(k){this.mLeftButtonDown=!1;return this.mLeftButtonDrag?this.mLeftButtonDrag=
!1:!0},onLButtonDoubeClick:function(k){this.mMouseDownPoint=this.mMousePrevPoint=k},onLButtonDrag:function(k){return!0},onMButtonDown:function(k){this.mMouseDownPoint=this.mMousePrevPoint=k;this.mMidButtonDown=!0},onMButtonUp:function(k){this.mMidButtonDown=!1;return this.mMidButtonDrag?this.mMidButtonDrag=!1:!0},onMButtonDoubeClick:function(k){this.mMouseDownPoint=this.mMousePrevPoint=k},onMButtonDrag:function(k){return!0},onRButtonDown:function(k){this.mMouseDownPoint=this.mMousePrevPoint=k;this.mRightButtonDown=
!0},onRButtonUp:function(k){this.mRightButtonDown=!1;return this.mRightButtonDrag?this.mRightButtonDrag=!1:!0},onRButtonDoubeClick:function(k){this.mMouseDownPoint=this.mMousePrevPoint=k},onRButtonDrag:function(k){return!0},onMouseMove:function(k){!1===this.mLeftButtonDown&&!1===this.mMidButtonDown&&!1===this.mRightButtonDown?this.mMousePrevPoint=k:10>Geoworld.Cartesian2.distance(k,this.mMousePrevPoint)||(this.mLeftButtonDown&&this.onLButtonDrag(k)&&(this.mMousePrevPoint=k,this.mLeftButtonDrag=!0),
this.mMidButtonDown&&this.onMButtonDrag(k)&&(this.mMousePrevPoint=k,this.mMidButtonDrag=!0),this.mRightButtonDown&&this.onRButtonDrag(k)&&(this.mMousePrevPoint=k,this.mRightButtonDrag=!0),this.mMousePrevPoint=k)},onMouseWheel:function(k,q){},onKeyDown:function(k){},onKeyUp:function(k){},calculateLength:function(k,q){for(var f=0,p=k.length,t=0;t<p-1;t++)f+=Geoworld.Cartesian3.distance(k[t+1],k[t]);q&&(f+=Geoworld.Cartesian3.distance(k[0],k[p-1]));return f},calculateSphericalArea:function(k,q){var f=
0;if(q)for(var p=0;p<k.length-1;p++)var t=k[p],w=k[p+1],f=f+(t.x*w.y-w.x*t.y);else for(p=0;p<k.length;p++)t=k[p],w=p<k.length-1?k[p+1]:k[0],f+=t.x*w.y-w.x*t.y;return f/2},pickVector:function(k,q){var f=this.mCoreMap.scene;if(Geoworld.defined(f.globe)){var p;return f.pickPositionSupported&&(p=f.pickPosition(k),void 0===p)?void 0:Geoworld.Cartesian3.clone(p,q)}},pickObject:function(k,q){var f=this.mCoreMap.scene;this.mCoreMap.camera.getPickRay(k);f=f.pick(k);return Geoworld.defined(f)?(q.pickedObject=
f,!0):!1},doubeClickObject:function(k,q){var f=this.mCoreMap.scene;this.mCoreMap.camera.getPickRay(k);f=f.pick(k);return Geoworld.defined(f)?(q.doubeClickedObject=f,!0):!1}});return Geoworld.GwTool=v});
define("../Interface/Tools/Measure/GwMeasureLineLengthTool.js",["../GwTool.js"],function(v){var k=new Geoworld.Cartesian3(0,0,0);return v.extend({__init__:function(){this._super();this.name="MeasureLineLengthTool"},onActive:function(){this._super();this.mLength=this.mClickCount=0;this.mControlPointArray=Array(2);this.mCoordsArray=[];this.mLabel=this.mPoints=this.mPolyline=null;var k=document.createElement("div");$(".map-widget").append(k);$(".map-widget").append('<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>');
this.tooltip=document.getElementById("toolTip");this.tooltip.innerHTML='<span style="font-family:\u9ed1\u4f53;color:white;font-weight: bolder;font-size: 14px">\u5de6\u952e\u5f00\u59cb,\u518d\u6b21\u70b9\u51fb\u5de6\u952e\u7ed3\u675f\uff01</span>'},onDeactive:function(){this._super();this.clearResult();this.mLength=this.mClickCount=0;this.mCoordsArray=this.mControlPointArray=null},clearResult:function(){Geoworld.defined(this.mPolyline)&&(this.mPolyline.destory(),this.mPolyline=null);Geoworld.defined(this.mPoints)&&
(this.mPoints.destory(),this.mPoints=null);Geoworld.defined(this.mLabel)&&(this.mLabel.destory(),this.mLabel=null);Geoworld.defined(this.tooltip)&&(this.tooltip.style.display="none")},onLButtonUp:function(k){if(!1===this._super(k))return!1;this.tooltip.style.display="none";if(1<this.mClickCount)return!0;var f=new Geoworld.Cartesian3(0,0,0);this.pickVector(k,f)&&(this.mControlPointArray[this.mClickCount]=f,1===this.mClickCount&&(this.mLength=Geoworld.Cartesian3.distance(this.mControlPointArray[0],
this.mControlPointArray[1]),this.mCallback&&this.mCallback({result:this.mLength}),this.mEnable=!1),this.mClickCount++);return!0},onMouseMove:function(q){this._super(q);1>this.mClickCount&&(this.tooltip.style.left=q.x+10+"px",this.tooltip.style.top=q.y+20+"px",this.tooltip.style.display="block");1===this.mClickCount&&(this.tooltip.innerHTML='<span style="font-family:\u9ed1\u4f53;color:white;font-weight: bolder;font-size: 14px">\u5de6\u952e\u7ed3\u675f\uff01</span>',this.tooltip.style.left=q.x+10+"px",
this.tooltip.style.top=q.y+20+"px",this.tooltip.style.display="block",this.pickVector(q,k)&&(this.mControlPointArray[1]=k,this.mLength=Geoworld.Cartesian3.distance(this.mControlPointArray[0],this.mControlPointArray[1]),q="\u957f\u5ea6:",q=1E3<=this.mLength?q+(parseInt(this.mLength/10)/100+"\u5343\u7c73"):q+(parseInt(100*this.mLength)/100+"\u7c73"),Geoworld.defined(this.mPolyline)?(this.mLabel.position=this.mControlPointArray[1],this.mLabel.text=q):(this.mPolyline=Geoworld.RenderObjectFactory.createPolylinePrimitive(this.mEarthCtrl,
{positions:this.mControlPointArray,color:Geoworld.Color.fromRgba(4286644096),width:3}),this.mLabel=Geoworld.RenderObjectFactory.createLabelPrimitive(this.mEarthCtrl,{position:this.mControlPointArray[1],text:q}))))}})});
define("../Interface/Tools/Measure/GwMeasurePathLengthTool.js",["../GwTool.js"],function(v){var k=new Geoworld.Cartesian3(0,0,0);return v.extend({__init__:function(){this._super();this.name="MeasurePathLengthTool"},onActive:function(){this._super();this.mTotalLength=0;this.mControlPointArray=[];this.mPathPointArray=[];this.mLabel=this.mPoints=this.mPolyline=null},onDeactive:function(){this._super();this.clearResult();this.mTotalLength=0;this.mPathPointArray=this.mControlPointArray=null},clearResult:function(){Geoworld.defined(this.mPolyline)&&
(this.mPolyline.destory(),this.mPolyline=null);Geoworld.defined(this.mPoints)&&(this.mPoints.destory(),this.mPoints=null);Geoworld.defined(this.mLabel)&&(this.mLabel.destory(),this.mLabel=null)},onLButtonUp:function(q){if(!1===this._super(q))return!1;this.pickVector(q,k)&&(0<this.mControlPointArray.length&&this.mControlPointArray.pop(),this.mControlPointArray.push(Geoworld.Cartesian3.clone(k)),this.mControlPointArray.push(Geoworld.Cartesian3.clone(k)),this.mTotalLength=this.calculateLength(this.mControlPointArray,
!1),Geoworld.defined(this.mPoints)&&this.mPoints.add(Geoworld.Cartesian3.clone(k)));return!0},onRButtonDown:function(k){this._super(k);2<=this.mControlPointArray.length&&(this.mEnable=!1,this.mCallback&&this.mCallback({result:this.mTotalLength}))},onMouseMove:function(q){this._super(q);var f=this.mControlPointArray.length;1>=f||!this.pickVector(q,k)||(Geoworld.Cartesian3.clone(k,this.mControlPointArray[f-1]),this.mTotalLength=this.calculateLength(this.mControlPointArray,!1),q="\u957f\u5ea6:",q=1E3<=
this.mTotalLength?q+(parseInt(this.mTotalLength/10)/100+"\u5343\u7c73"):q+(parseInt(100*this.mTotalLength)/100+"\u7c73"),Geoworld.defined(this.mPolyline)?(this.mLabel.position=this.mControlPointArray[f-1],this.mLabel.text=q):(this.mPolyline=Geoworld.RenderObjectFactory.createPolylinePrimitive(this.mEarthCtrl,{positions:this.mControlPointArray,color:Geoworld.Color.fromRgba(4286644096),width:3}),this.mLabel=Geoworld.RenderObjectFactory.createLabelPrimitive(this.mEarthCtrl,{position:this.mControlPointArray[f-
1],text:q})))}})});
define("../Interface/Tools/Measure/GwMeasureHeightTool.js",["../GwTool.js"],function(v){var k=new Geoworld.Cartesian3(0,0,0);return v.extend({__init__:function(){this._super();this.name="MeasureHeightTool"},onActive:function(){this._super();this.mTotalLength=this.mClickCount=0;this.mControlPointArray=[];for(var k=0;3>k;k++)this.mControlPointArray.push(new Geoworld.Cartesian3(0,0,0));this.mHorizontalVerts=Array(2);this.mVerticalVerts=Array(2);this.mHeight=0;this.mFirstVertex=new Geoworld.Cartesian3(0,0,
0);this.mSecondVertex=new Geoworld.Cartesian3(0,0,0);this.mFirstCart=new Geoworld.Cartographic;this.mMidCart=new Geoworld.Cartographic;this.mSecondCart=new Geoworld.Cartographic;this.mLabel=this.mPoints=this.mPolylineVertical=this.mPolylineHorizontal=null;k=document.createElement("div");$(".map-widget").append(k);$(".map-widget").append('<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>');
this.tooltip=document.getElementById("toolTip");this.tooltip.innerHTML='<span style="font-family:\u9ed1\u4f53;color:white;font-weight: bolder;font-size: 14px">\u5de6\u952e\u5f00\u59cb,\u518d\u6b21\u70b9\u51fb\u5de6\u952e\u7ed3\u675f\uff01</span>'},onDeactive:function(){this._super();this.clearResult();this.mTotalLength=this.mClickCount=0;this.mVerticalVerts=this.mHorizontalVerts=this.mControlPointArray=null;this.mHeight=0;this.mSecondCart=this.mMidCart=this.mFirstCart=this.mSecondVertex=this.mFirstVertex=
null},clearResult:function(){Geoworld.defined(this.mPolylineHorizontal)&&(this.mPolylineHorizontal.destory(),this.mPolylineHorizontal=null);Geoworld.defined(this.mPolylineVertical)&&(this.mPolylineVertical.destory(),this.mPolylineVertical=null);Geoworld.defined(this.mPoints)&&(this.mPoints.destory(),this.mPoints=null);Geoworld.defined(this.mLabel)&&(this.mLabel.destory(),this.mLabel=null);Geoworld.defined(this.tooltip)&&(this.tooltip.style.display="none")},onLButtonUp:function(q){if(!1===this._super(q))return!1;
this.tooltip.style.display="none";if(1<this.mClickCount)return!0;this.pickVector(q,k)&&(0==this.mClickCount?Geoworld.Cartesian3.clone(k,this.mFirstVertex):(Geoworld.Cartesian3.clone(k,this.mSecondVertex),Geoworld.Cartographic.fromCartesian(this.mFirstVertex,null,this.mFirstCart),Geoworld.Cartographic.fromCartesian(this.mSecondVertex,null,this.mSecondCart),this.mHeight=Math.abs(this.mSecondCart.height-this.mFirstCart.height),this.mCallback&&this.mCallback({result:this.mHeight}),this.mEnable=!1),this.mClickCount++);
return!0},onMouseMove:function(q){this._super(q);1>this.mClickCount&&(this.tooltip.style.left=q.x+10+"px",this.tooltip.style.top=q.y+20+"px",this.tooltip.style.display="block");1===this.mClickCount&&(this.tooltip.innerHTML='<span style="font-family:\u9ed1\u4f53;color:white;font-weight: bolder;font-size: 14px">\u5de6\u952e\u7ed3\u675f\uff01</span>',this.tooltip.style.left=q.x+10+"px",this.tooltip.style.top=q.y+20+"px",this.tooltip.style.display="block",this.pickVector(q,k)&&(Geoworld.Cartesian3.clone(k,
this.mSecondVertex),Geoworld.Cartographic.fromCartesian(this.mFirstVertex,null,this.mFirstCart),Geoworld.Cartographic.fromCartesian(this.mSecondVertex,null,this.mSecondCart),this.mHeight=Math.abs(this.mSecondCart.height-this.mFirstCart.height),this.mSecondCart.height<this.mFirstCart.height&&(Geoworld.Cartographic.clone(this.mSecondCart,this.mMidCart),Geoworld.Cartographic.clone(this.mFirstCart,this.mSecondCart),Geoworld.Cartographic.clone(this.mMidCart,this.mFirstCart)),this.mMidCart.longitude=this.mFirstCart.longitude,
this.mMidCart.latitude=this.mFirstCart.latitude,this.mMidCart.height=this.mSecondCart.height,Geoworld.Cartographic.toCartesian(this.mFirstCart,null,this.mControlPointArray[0]),Geoworld.Cartographic.toCartesian(this.mMidCart,null,this.mControlPointArray[1]),Geoworld.Cartographic.toCartesian(this.mSecondCart,null,this.mControlPointArray[2]),q="\u9ad8\u5ea6:",q=1E3<=this.mHeight?q+(parseInt(this.mHeight)/1E3+"\u5343\u7c73"):q+(parseInt(1E3*this.mHeight)/1E3+"\u7c73"),this.mHorizontalVerts[0]=this.mControlPointArray[1],
this.mHorizontalVerts[1]=this.mControlPointArray[2],this.mVerticalVerts[0]=this.mControlPointArray[0],this.mVerticalVerts[1]=this.mControlPointArray[1],Geoworld.defined(this.mPolylineHorizontal)?(this.mLabel.position=this.mControlPointArray[1],this.mLabel.text=q):(this.mPolylineHorizontal=Geoworld.RenderObjectFactory.createPolylinePrimitive(this.mEarthCtrl,{positions:this.mHorizontalVerts,color:Geoworld.Color.fromRgba(4286644096),width:3}),this.mPolylineVertical=Geoworld.RenderObjectFactory.createPolylinePrimitive(this.mEarthCtrl,
{positions:this.mVerticalVerts,color:Geoworld.Color.YELLOW,width:3}),this.mLabel=Geoworld.RenderObjectFactory.createLabelPrimitive(this.mEarthCtrl,{position:this.mControlPointArray[1],text:q}))))}})});
define("../Interface/Tools/Measure/GwMeasureSlopeTool.js",["../GwTool.js"],function(v){var k=new Geoworld.Cartesian3(0,0,0),q=new Geoworld.Cartographic,f=new Geoworld.Cartographic;return v.extend({__init__:function(){this._super();this.name="MeasureSlopeTool"},onActive:function(){this._super();this.mSlope=this.mClickCount=0;this.mControlPointArray=Array(2);this.mCoordsArray=[];this.mLabel=this.mPoints=this.mPolyline=null;var f=document.createElement("div");$(".map-widget").append(f);$(".map-widget").append('<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>');
this.tooltip=document.getElementById("toolTip");this.tooltip.innerHTML='<span style="font-family:\u9ed1\u4f53;color:white;font-weight: bolder;font-size: 14px">\u5de6\u952e\u5f00\u59cb,\u518d\u6b21\u70b9\u51fb\u5de6\u952e\u7ed3\u675f\uff01</span>'},onDeactive:function(){this._super();this.clearResult();this.mLength=this.mClickCount=0;this.mCoordsArray=this.mControlPointArray=null},clearResult:function(){Geoworld.defined(this.mPolyline)&&(this.mPolyline.destory(),this.mPolyline=null);Geoworld.defined(this.mPoints)&&
(this.mPoints.destory(),this.mPoints=null);Geoworld.defined(this.mLabel)&&(this.mLabel.destory(),this.mLabel=null);Geoworld.defined(this.tooltip)&&(this.tooltip.style.display="none")},getSlope:function(p,t){Geoworld.Cartographic.fromCartesian(p,null,q);Geoworld.Cartographic.fromCartesian(t,null,f);var k=f.height-q.height,x=Geoworld.Cartesian3.distance(p,t);return 0===x?0:Math.asin(k/x)/Math.PI*180},onLButtonUp:function(f){if(!1===this._super(f))return!1;this.tooltip.style.display="none";if(1<this.mClickCount)return!0;
var t=new Geoworld.Cartesian3(0,0,0);this.pickVector(f,t)&&(this.mControlPointArray[this.mClickCount]=t,1===this.mClickCount&&(this.mSlope=this.getSlope(this.mControlPointArray[0],this.mControlPointArray[1]),this.mCallback&&this.mCallback({result:this.mSlope}),this.mEnable=!1),this.mClickCount++);return!0},onMouseMove:function(f){this._super(f);1>this.mClickCount&&(this.tooltip.style.left=f.x+10+"px",this.tooltip.style.top=f.y+20+"px",this.tooltip.style.display="block");1===this.mClickCount&&(this.tooltip.innerHTML=
'<span style="font-family:\u9ed1\u4f53;color:white;font-weight: bolder;font-size: 14px">\u5de6\u952e\u7ed3\u675f\uff01</span>',this.tooltip.style.left=f.x+10+"px",this.tooltip.style.top=f.y+20+"px",this.tooltip.style.display="block",this.pickVector(f,k)&&(this.mControlPointArray[1]=k,this.mSlope=this.getSlope(this.mControlPointArray[0],this.mControlPointArray[1]),f="\u659c\u7387:"+(parseInt(100*this.mSlope)/100+"\u5ea6"),Geoworld.defined(this.mPolyline)?(this.mLabel.position=this.mControlPointArray[1],
this.mLabel.text=f):(this.mPolyline=Geoworld.RenderObjectFactory.createPolylinePrimitive(this.mEarthCtrl,{positions:this.mControlPointArray,color:Geoworld.Color.fromRgba(4286644096),width:3}),this.mLabel=Geoworld.RenderObjectFactory.createLabelPrimitive(this.mEarthCtrl,{position:this.mControlPointArray[1],text:f}))))}})});
define("../Interface/Tools/Measure/GwHorizontalDistanceTool.js",["../GwTool.js"],function(v){function k(f,k){for(var q=0;q<f.length;q++){var A=f[q];Geoworld.Cartographic.fromCartesian(A,null,p);p.height=k;Geoworld.Cartographic.toCartesian(p,null,A)}}function q(f){for(var k=-99999999,q=0;q<f.length;q++)Geoworld.Cartographic.fromCartesian(f[q],null,p),k=Math.max(p.height,k);return k}var f=new Geoworld.Cartesian3(0,0,0),p=new Geoworld.Cartesian3(0,0,0);return v.extend({__init__:function(){this._super();
this.name="HorizontalDistanceTool"},onActive:function(){this._super();this.mTotalLength=this.mClickCount=0;this.mMaxHeight=-99999999;this.mHorizontalControlPointArray=[];this.mControlPointArray=[];this.mFinalVerticalPoints=[];this.mFinalVerticalPoints.push(new Geoworld.Cartesian3(0,0,0));this.mFinalVerticalPoints.push(new Geoworld.Cartesian3(0,0,0));this.mVerticalPolylines=[];this.mLabel=this.mPoints=this.mHorizontalPoints=this.mPolyline=this.mFinalVerticalPoly=null;var f=document.createElement("div");
$(".map-widget").append(f);$(".map-widget").append('<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>');this.tooltip=document.getElementById("toolTip");this.tooltip.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>'},
onDeactive:function(){this._super();this.clearResult();this.mTotalLength=this.mClickCount=0;this.mMaxHeight=-99999999;this.mFinalVerticalPoints=this.mControlPointArray=this.mHorizontalControlPointArray=null},clearResult:function(){for(var f in this.mVerticalPolylines)this.mVerticalPolylines[f].destory();this.mVerticalPolylines=[];Geoworld.defined(this.mFinalVerticalPoly)&&(this.mFinalVerticalPoly.destory(),this.mFinalVerticalPoly=null);Geoworld.defined(this.mPolyline)&&(this.mPolyline.destory(),this.mPolyline=
null);Geoworld.defined(this.mHorizontalPoints)&&(this.mHorizontalPoints.destory(),this.mHorizontalPoints=null);Geoworld.defined(this.mPoints)&&(this.mPoints.destory(),this.mPoints=null);Geoworld.defined(this.mLabel)&&(this.mLabel.destory(),this.mLabel=null);Geoworld.defined(this.tooltip)&&(this.tooltip.style.display="none")},onLButtonUp:function(p){if(!1===this._super(p))return!1;if(this.pickVector(p,f)){0<this.mControlPointArray.length&&this.mControlPointArray.pop();this.mControlPointArray.push(Geoworld.Cartesian3.clone(f));
this.mControlPointArray.push(Geoworld.Cartesian3.clone(f));Geoworld.defined(this.mPoints)&&this.mPoints.add(Geoworld.Cartesian3.clone(f));0<this.mHorizontalControlPointArray.length&&this.mHorizontalControlPointArray.pop();this.mHorizontalControlPointArray.push(Geoworld.Cartesian3.clone(f));this.mHorizontalControlPointArray.push(Geoworld.Cartesian3.clone(f));this.mMaxHeight=q(this.mControlPointArray);k(this.mHorizontalControlPointArray,this.mMaxHeight);Geoworld.defined(this.mHorizontalPoints)&&this.mHorizontalPoints.add(Geoworld.Cartesian3.clone(this.mHorizontalControlPointArray[this.mHorizontalControlPointArray.length-
1]));p=this.mControlPointArray.length;var w=Geoworld.RenderObjectFactory.createPolylinePrimitive(this.mEarthCtrl,{positions:[this.mControlPointArray[p-2],this.mHorizontalControlPointArray[p-2]],color:Geoworld.Color.YELLOW,width:2});this.mVerticalPolylines.push(w);Geoworld.Cartesian3.clone(this.mControlPointArray[p-1],this.mFinalVerticalPoints[0]);Geoworld.Cartesian3.clone(this.mHorizontalControlPointArray[p-1],this.mFinalVerticalPoints[1])}return!0},onRButtonDown:function(f){this._super(f);this.tooltip.style.display=
"none";2<=this.mControlPointArray.length&&(this.mCallback&&this.mCallback({result:this.mTotalLength}),this.mEnable=!1)},onMouseMove:function(p){this._super(p);1>this.mClickCount&&(this.tooltip.style.left=p.x+10+"px",this.tooltip.style.top=p.y+20+"px",this.tooltip.style.display="block");var w=this.mControlPointArray.length;1>=w||(this.tooltip.innerHTML='<span style="font-family:\u9ed1\u4f53;color:white;font-weight: bolder;font-size: 14px">\u53f3\u952e\u7ed3\u675f\uff01</span>',this.tooltip.style.left=
p.x+10+"px",this.tooltip.style.top=p.y+20+"px",this.tooltip.style.display="block",this.pickVector(p,f)&&(Geoworld.Cartesian3.clone(f,this.mControlPointArray[w-1]),Geoworld.Cartesian3.clone(f,this.mHorizontalControlPointArray[w-1]),this.mMaxHeight=q(this.mControlPointArray),k(this.mHorizontalControlPointArray,this.mMaxHeight),this.mTotalLength=this.calculateLength(this.mHorizontalControlPointArray,!1),p="\u957f\u5ea6:",p=1E3<=this.mTotalLength?p+(parseInt(this.mTotalLength)/1E3+"\u5343\u7c73"):p+(parseInt(1E3*
this.mTotalLength)/1E3+"\u7c73"),Geoworld.Cartesian3.clone(this.mControlPointArray[w-1],this.mFinalVerticalPoints[0]),Geoworld.Cartesian3.clone(this.mHorizontalControlPointArray[w-1],this.mFinalVerticalPoints[1]),Geoworld.defined(this.mPolyline)?(this.mLabel.position=this.mHorizontalControlPointArray[w-1],this.mLabel.text=p):(this.mPolyline=Geoworld.RenderObjectFactory.createPolylinePrimitive(this.mEarthCtrl,{positions:this.mHorizontalControlPointArray,color:Geoworld.Color.fromRgba(4286644096),width:3}),
this.mFinalVerticalPoly=Geoworld.RenderObjectFactory.createPolylinePrimitive(this.mEarthCtrl,{positions:this.mFinalVerticalPoints,color:Geoworld.Color.YELLOW,width:2}),this.mLabel=Geoworld.RenderObjectFactory.createLabelPrimitive(this.mEarthCtrl,{position:this.mHorizontalControlPointArray[w-1],text:p}))))}})});
define("../Interface/Tools/Measure/GwMeasureAreaTool.js",["../GwTool.js"],function(v){var k=new Geoworld.Cartesian3(0,0,0);return v.extend({__init__:function(){this._super();this.name="MeasureAreaTool"},onActive:function(){this._super();this.mTotalLength=0;this.mControlPointArray=[];this.mPolygonPointArray=[];this.mLabel=this.mPoints=this.mPolyline=this.mPolygon=null},onDeactive:function(){this._super();this.clearResult();this.mTotalLength=0;this.mControlPointArray=[];this.mPolygonPointArray=[]},
clearResult:function(){Geoworld.defined(this.mPolygon)&&(this.mPolygon.destory(),this.mPolygon=null);Geoworld.defined(this.mPolyline)&&(this.mPolyline.destory(),this.mPolyline=null);Geoworld.defined(this.mPoints)&&(this.mPoints.destory(),this.mPoints=null);Geoworld.defined(this.mLabel)&&(this.mLabel.destory(),this.mLabel=null)},onLButtonUp:function(q){if(!1===this._super(q))return!1;if(this.pickVector(q,k)){0<this.mControlPointArray.length&&(this.mControlPointArray.pop(),this.mControlPointArray.pop());
this.mControlPointArray.push(Geoworld.Cartesian3.clone(k));this.mControlPointArray.push(Geoworld.Cartesian3.clone(k));this.mControlPointArray.push(Geoworld.Cartesian3.clone(this.mControlPointArray[0]));this.mPolygonPointArray.push(Geoworld.Cartesian3.clone(k));Geoworld.defined(this.mPoints)&&this.mPoints.add(Geoworld.Cartesian3.clone(k));if(3>this.mPolygonPointArray.length)return;Geoworld.defined(this.mPolygon)||(this.mPolygon=Geoworld.RenderObjectFactory.createPolygonPrimitive(this.mEarthCtrl,{positions:this.mPolygonPointArray,
color:Geoworld.Color.fromRgba(2290155392),outlineColor:Geoworld.Color.WHITE,width:3}))}return!0},onRButtonDown:function(k){this._super(k);2<=this.mControlPointArray.length&&(this.mCallback&&this.mCallback({result:this.mTotalArea}),this.mEnable=!1)},onMouseMove:function(q){this._super(q);var f=this.mControlPointArray.length;2>=f||!this.pickVector(q,k)||(Geoworld.Cartesian3.clone(k,this.mControlPointArray[f-2]),this.mTotalArea=this.calculateSphericalArea(this.mControlPointArray,!0),q="\u6295\u5f71\u9762\u79ef:",
q=1E5<=this.mTotalArea?q+(parseInt(this.mTotalArea/1E3)/1E3+"\u5e73\u65b9\u5343\u7c73"):q+(parseInt(1E3*this.mTotalArea)/1E3+"\u5e73\u65b9\u7c73"),Geoworld.defined(this.mPolyline)?(this.mLabel.position=this.mControlPointArray[f-1],this.mLabel.text=q):(this.mPolyline=Geoworld.RenderObjectFactory.createPolylinePrimitive(this.mEarthCtrl,{positions:this.mControlPointArray,color:Geoworld.Color.fromRgba(3422617472),width:3}),this.mLabel=Geoworld.RenderObjectFactory.createLabelPrimitive(this.mEarthCtrl,
{position:this.mControlPointArray[f-1],text:q})))}})});
define("../Interface/Tools/Measure/GwMeasureSurfaceAreaTool.js",["./GwMeasureAreaTool.js"],function(v){var k=new Geoworld.Cartesian3(0,0,0);return v.extend({__init__:function(){this._super();this.name="GwMeasureSurfaceAreaTool"},onMouseMove:function(q){this._super(q);var f=this.mControlPointArray.length;2>=f||!this.pickVector(q,k)||(Geoworld.Cartesian3.clone(k,this.mControlPointArray[f-2]),this.mTotalArea=this.calculateSphericalArea(this.mControlPointArray,!0),q="\u6295\u5f71\u9762\u79ef:",q=1E5<=
this.mTotalArea?q+(parseInt(this.mTotalArea/1E3)/1E3+"\u5e73\u65b9\u5343\u7c73"):q+(parseInt(1E3*this.mTotalArea)/1E3+"\u5e73\u65b9\u7c73"),Geoworld.defined(this.mPolyline)?(this.mLabel.position=this.mControlPointArray[f-1],this.mLabel.text=q):(this.mPolyline=Geoworld.RenderObjectFactory.createPolylinePrimitive(this.mEarthCtrl,{positions:this.mControlPointArray,color:Geoworld.Color.fromRgba(3422617472),width:3}),this.mLabel=Geoworld.RenderObjectFactory.createLabelPrimitive(this.mEarthCtrl,{position:this.mControlPointArray[f-
1],text:q})))}})});
define("../Interface/Tools/Measure/GwLineOfSightTool.js",["../GwTool.js"],function(v){function k(p,t,k){Geoworld.Cartographic.fromCartesian(p,null,f);f.height+=1.5;Geoworld.Cartographic.toCartesian(f,null,k)}var q=new Geoworld.Cartesian3(0,0,0),f=new Geoworld.Cartographic(0,0,0);return v.extend({__init__:function(){this._super();this.name="LineOfSightTool";this.mTotalLength=this.mClickCount=0;this.mHorizontalControlPointArray=[];this.mControlPointArray=[];this.mFinalVerticalPoints=[];this.mFinalVerticalPoints.push(new Geoworld.Cartesian3(0,
0,0));this.mFinalVerticalPoints.push(new Geoworld.Cartesian3(0,0,0));this.mMaxHeight=-99999999;this.mTotalLength=0;this.mLabel=this.mHorizontalPoints=this.mPoints=this.mPoly=null;this.mVerticalPolylines=[];this.mFinalVerticalPoly=null},initialize:function(f,t,k){this._super(f,t,k);Geoworld.Cartesian3.fromDegrees(116.37087663650608,40.03206336508529,10.96048030793379);Geoworld.Cartesian3.fromDegrees(116.36922981540391,40.03137874864764,12.075464771407225)},onActive:function(){},onDeactive:function(){},
destory:function(){Geoworld.defined(this.mPoints)&&this.mPoints.destory();Geoworld.defined(this.mHorizontalPoints)&&this.mHorizontalPoints.destory()},onLButtonUp:function(f){if(!1===this._super(f))return!1;if(2<=this.mClickCount)return!0;if(this.pickVector(f,q)){0<this.mControlPointArray.length&&this.mControlPointArray.pop();this.mControlPointArray.push(Geoworld.Cartesian3.clone(q));this.mControlPointArray.push(Geoworld.Cartesian3.clone(q));Geoworld.defined(this.mPoints)&&this.mPoints.add(Geoworld.Cartesian3.clone(q));
0<this.mHorizontalControlPointArray.length&&this.mHorizontalControlPointArray.pop();k(q,1.5,q);this.mHorizontalControlPointArray.push(Geoworld.Cartesian3.clone(q));this.mHorizontalControlPointArray.push(Geoworld.Cartesian3.clone(q));Geoworld.defined(this.mHorizontalPoints)&&this.mHorizontalPoints.add(Geoworld.Cartesian3.clone(this.mHorizontalControlPointArray[this.mHorizontalControlPointArray.length-1]));var t=this.mControlPointArray.length;Geoworld.Cartesian3.clone(this.mControlPointArray[t-1],this.mFinalVerticalPoints[0]);
Geoworld.Cartesian3.clone(this.mHorizontalControlPointArray[t-1],this.mFinalVerticalPoints[1]);var w=this;1===this.mClickCount&&this.mEarthCtrl.measure.lineOfSightByParams({startPoint:this.mHorizontalControlPointArray[0],endPoint:this.mHorizontalControlPointArray[2]},function(f){!0===f.ret&&(Geoworld.Cartesian3.clone(w.mHorizontalControlPointArray[2]),w.mHorizontalControlPointArray[t-2]=f.position,w.mHorizontalControlPointArray[t-1]=f.position);w.mCallback&&w.mCallback(f);w.mEnable=!1});this.mClickCount++}return!0},
onRender:function(){},onMouseMove:function(f){this._super(f);var t=this.mControlPointArray.length;1>=t||!this.pickVector(f,q)||(Geoworld.Cartesian3.clone(q,this.mControlPointArray[t-1]),k(q,1.5,q),Geoworld.Cartesian3.clone(q,this.mHorizontalControlPointArray[t-1]),Geoworld.Cartesian3.clone(this.mControlPointArray[t-1],this.mFinalVerticalPoints[0]),Geoworld.Cartesian3.clone(this.mHorizontalControlPointArray[t-1],this.mFinalVerticalPoints[1]))}})});
define("../Interface/Tools/Select/GwPickObjectTool.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="PickObjectTool"},destory:function(){},onLButtonUp:function(k){if(!1===this._super(k))return!1;var q={};this.pickObject(k,q)&&this.mCallback&&this.mCallback(q);return!0}})});
define("../Interface/Tools/Select/GwPickPositionTool.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="PickPositionTool"},destory:function(){},onLButtonUp:function(k){if(!1===this._super(k))return!1;var q=new Geoworld.Cartesian3(0,0,0);this.pickVector(k,q)&&(k=Geoworld.Cartographic.fromCartesian(q),k.longitude=Geoworld.Math.toDegrees(k.longitude),k.latitude=Geoworld.Math.toDegrees(k.latitude),this.mCallback&&this.mCallback({result:k}));return!0},onRButtonUp:function(k){if(!1===
this._super(k))return!1;this.mCallback&&this.mCallback({retCode:"finished"});return!0}})});define("../Interface/Tools/Select/GwHoverObjectTool.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="HoverObjectTool"},destory:function(){},onMouseMove:function(k){if(!1===this._super(k))return!1;var q={};this.pickObject(k,q)&&this.mCallback&&this.mCallback(q);return!0}})});
define("../Interface/Tools/Select/GwDoubeClickObjectTool.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="DoubeClickObjectTool"},destory:function(){},onRButtonDown:function(k){if(!1===this._super(k))return!1;var q={};this.doubeClickObject(k,q)&&this.mCallback&&this.mCallback(q);return!0}})});
define("../Interface/Tools/Select/GwRClickObjectTool.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="RClickObjectTool"},destory:function(){},onRButtonUp:function(k){if(!1===this._super(k))return!1;var q={};this.pickObject(k,q)&&this.mCallback&&this.mCallback(q);return!0}})});
define("GwMeasure.js","../Interface/Tools/Measure/GwMeasureLineLengthTool.js ../Interface/Tools/Measure/GwMeasurePathLengthTool.js ../Interface/Tools/Measure/GwMeasureHeightTool.js ../Interface/Tools/Measure/GwMeasureSlopeTool.js ../Interface/Tools/Measure/GwHorizontalDistanceTool.js ../Interface/Tools/Measure/GwMeasureAreaTool.js ../Interface/Tools/Measure/GwMeasureSurfaceAreaTool.js ../Interface/Tools/Measure/GwLineOfSightTool.js ../Interface/Tools/Select/GwPickObjectTool.js ../Interface/Tools/Select/GwPickPositionTool.js ../Interface/Tools/Select/GwHoverObjectTool.js ../Interface/Tools/Select/GwDoubeClickObjectTool.js ../Interface/Tools/Select/GwRClickObjectTool.js".split(" "),function(v,
k,q,f,p,t,w,x,A,D,z,C,B){function E(f){this._earthCtrl=f;this._coreMap=f.coreMap;this.tools=[]}E.prototype.lineLength=function(f){!1===this._earthCtrl.analysis.saveResult&&this._earthCtrl.tools.clearTool();var p=new v;p.initialize(this._earthCtrl,function(p){f&&f(p)});this._earthCtrl.tools.registerTool("line_length_tool",p);this.tools.push(p);return p};E.prototype.pathLength=function(f){!1===this._earthCtrl.analysis.saveResult&&this._earthCtrl.tools.clearTool();var p=new k;p.initialize(this._earthCtrl,
function(p){f&&f(p)});this._earthCtrl.tools.registerTool("path_length_tool",p);this.tools.push(p);return p};E.prototype.measureHeight=function(f){!1===this._earthCtrl.analysis.saveResult&&this._earthCtrl.tools.clearTool();var p=new q;p.initialize(this._earthCtrl,function(p){f&&f(p)});this._earthCtrl.tools.registerTool("height_tool",p);this.tools.push(p);return p};E.prototype.measureSlope=function(p){!1===this._earthCtrl.analysis.saveResult&&this._earthCtrl.tools.clearTool();var t=new f;t.initialize(this._earthCtrl,
function(f){p&&p(f)});this._earthCtrl.tools.registerTool("slope_tool",t);this.tools.push(t);return t};E.prototype.spatialDistance=function(f){!1===this._earthCtrl.analysis.saveResult&&this._earthCtrl.tools.clearTool();var p=new k;p.initialize(this._earthCtrl,function(p){f&&f(p)});this._earthCtrl.tools.registerTool("spatial_distance_tool",p);this.tools.push(p);return p};E.prototype.horizontalDistance=function(f){!1===this._earthCtrl.analysis.saveResult&&this._earthCtrl.tools.clearTool();var t=new p;
t.initialize(this._earthCtrl,function(p){f&&f(p)});this._earthCtrl.tools.registerTool("horizontal_distance_tool",t);this.tools.push(t);return t};E.prototype.measureArea=function(f){!1===this._earthCtrl.analysis.saveResult&&this._earthCtrl.tools.clearTool();var p=new t;p.initialize(this._earthCtrl,function(p){f&&f(p)});this._earthCtrl.tools.registerTool("area_tool",p);this.tools.push(p);return p};E.prototype.measureSurfaceArea=function(f){!1===this._earthCtrl.analysis.saveResult&&this._earthCtrl.tools.clearTool();
var p=new w;p.initialize(this._earthCtrl,function(p){f&&f(p)});this._earthCtrl.tools.registerTool("surface_area_tool",p);this.tools.push(p);return p};var G=new Geoworld.Cartographic;E.prototype.measureTerrainHeight=function(f){G.longitude=Geoworld.Math.toRadians(f.longitude);G.latitude=Geoworld.Math.toRadians(f.latitude);G.height=f.height;return this.mCoreMap.scene.globe.getHeight(G)};E.prototype.lineOfSight=function(f,p){this._earthCtrl.tools.clearTool();var t=new x;t.initialize(this._earthCtrl,
function(f){p&&p(f)});this._earthCtrl.tools.registerTool("line_of_sight_tool",t)};E.prototype.threatDome=function(f,p){};E.prototype.viewShed=function(f,p){};E.prototype.buffer=function(f,p){};E.prototype.pickPosition=function(f,p){this._earthCtrl.tools.clearTool();var t=new D;t.initialize(this._earthCtrl,function(f){p&&p(f)});this._earthCtrl.tools.registerTool("pick_position_tool",t)};E.prototype.pickObject=function(f,p){this._earthCtrl.tools.clearTool();var t=new A;t.initialize(this._earthCtrl,
function(f){p&&p(f)});this._earthCtrl.tools.registerTool("pick_object_tool",t);return t};E.prototype.endPickObject=function(f){this._earthCtrl.tools.clearTool();f.endPickObject();this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!0;this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!0};E.prototype.hoverObject=function(f,p){this._earthCtrl.tools.clearTool();var t=new z;t.initialize(this._earthCtrl,function(f){p&&p(f)});this._earthCtrl.tools.registerTool("hover_object_tool",
t);return t};E.prototype.doubeClickObject=function(f,p){this._earthCtrl.tools.clearTool();var t=new C;t.initialize(this._earthCtrl,function(f){p&&p(f)});this._earthCtrl.tools.registerTool("doubeClick_object_tool",t);return t};E.prototype.RClickObject=function(f,p){this._earthCtrl.tools.clearTool();var t=new B;t.initialize(this._earthCtrl,function(f){p&&p(f)});this._earthCtrl.tools.registerTool("RClick_object_tool",t);return t};E.prototype.clearResult=function(f){Geoworld.defined(f)?f.clearResult():
this._earthCtrl.tools.clearResult()};E.prototype.lineOfSightByParams=function(f,p){var t=Geoworld.Cartesian3.normalize(Geoworld.Cartesian3.subtract(f.endPoint,f.startPoint,new Geoworld.Cartesian3),new Geoworld.Cartesian3),k=Geoworld.Cartesian3.distance(f.endPoint,f.startPoint),t=new Geoworld.Ray(f.startPoint,t),k=earthCtrl.coreMap.scene.pickFromSegment(t,k,[]),t=!0,q=void 0;Geoworld.defined(k)&&Geoworld.defined(k.position)?q=k.position:t=!1;p&&p({ret:t,position:q});return t};return E});
define("../Interface/Tools/ShapeTool/GwPolylineCreateTool.js",["../GwTool.js"],function(v){var k=new Geoworld.Cartesian3(0,0,0);return v.extend({__init__:function(){this._super();this.name="GwPolylineCreateTool"},onActive:function(){this._super();this.mTotalLength=0;this.mControlPointArray=[];this.mPathPointArray=[];this.mPoints=this.mPolyline=null},onDeactive:function(){this._super();Geoworld.defined(this.mPolyline)&&(this.mPolyline.destory(),this.mPolyline=null);Geoworld.defined(this.mPoints)&&
(this.mPoints.destory(),this.mPoints=null);this.mTotalLength=0;this.mPathPointArray=this.mControlPointArray=null},onLButtonUp:function(q){if(!1===this._super(q))return!1;this.pickVector(q,k)&&(0<this.mControlPointArray.length&&this.mControlPointArray.pop(),this.mControlPointArray.push(Geoworld.Cartesian3.clone(k)),this.mControlPointArray.push(Geoworld.Cartesian3.clone(k)),this.mTotalLength=this.calculateLength(this.mControlPointArray,!1),Geoworld.defined(this.mPoints)&&this.mPoints.add(Geoworld.Cartesian3.clone(k)));
return!0},onRButtonDown:function(k){this._super(k);2<=this.mControlPointArray.length&&(this.mCallback&&this.mCallback({result:this.mControlPointArray}),Geoworld.defined(this.mPolyline)&&(this.mPolyline.destory(),this.mPolyline=null),this.mPolyline=Geoworld.RenderObjectFactory.createPolylinePrimitive(this.mEarthCtrl,{positions:this.mControlPointArray,color:Geoworld.Color.fromRgba(4286644096),width:3}),this.mEnable=!1)},onMouseMove:function(q){this._super(q);var f=this.mControlPointArray.length;1>=
f||!this.pickVector(q,k)||(Geoworld.Cartesian3.clone(k,this.mControlPointArray[f-1]),Geoworld.defined(this.mPolyline)||(this.mPolyline=Geoworld.RenderObjectFactory.createPolylinePrimitive(this.mEarthCtrl,{positions:this.mControlPointArray,color:Geoworld.Color.fromRgba(4286644096),width:3})))}})});
define("../Interface/Tools/ShapeTool/GwPolygonCreateTool.js",["../GwTool.js"],function(v){var k=new Geoworld.Cartesian3(0,0,0);return v.extend({__init__:function(){this._super();this.name="PolylineCreateTool"},onActive:function(){this._super();this.mTotalLength=0;this.mControlPointArray=[];this.mPolygonPointArray=[];this.mPoints=this.mPolyline=this.mPolygon=null},onDeactive:function(){this._super();Geoworld.defined(this.mPolygon)&&(this.mPolygon.destory(),this.mPolygon=null);Geoworld.defined(this.mPolyline)&&
(this.mPolyline.destory(),this.mPolyline=null);Geoworld.defined(this.mPoints)&&(this.mPoints.destory(),this.mPoints=null);Geoworld.defined(this.mLabel)&&(this.mLabel.destory(),this.mLabel=null);this.mTotalLength=0;this.mControlPointArray=[];this.mPolygonPointArray=[]},onLButtonUp:function(q){if(!1===this._super(q))return!1;if(this.pickVector(q,k)){0<this.mControlPointArray.length&&(this.mControlPointArray.pop(),this.mControlPointArray.pop());this.mControlPointArray.push(Geoworld.Cartesian3.clone(k));
this.mControlPointArray.push(Geoworld.Cartesian3.clone(k));this.mControlPointArray.push(Geoworld.Cartesian3.clone(this.mControlPointArray[0]));this.mPolygonPointArray.push(Geoworld.Cartesian3.clone(k));Geoworld.defined(this.mPoints)&&this.mPoints.add(Geoworld.Cartesian3.clone(k));if(3>this.mPolygonPointArray.length)return;Geoworld.defined(this.mPolygon)||(this.mPolygon=Geoworld.RenderObjectFactory.createPolygonPrimitive(this.mEarthCtrl,{positions:this.mPolygonPointArray,color:Geoworld.Color.fromRgba(2290155392),
outlineColor:Geoworld.Color.WHITE,width:3}))}return!0},onRButtonDown:function(k){this._super(k);2<=this.mControlPointArray.length&&(this.mCallback&&this.mCallback({result:this.mControlPointArray}),this.mEnable=!1)},onMouseMove:function(q){this._super(q);var f=this.mControlPointArray.length;2>=f||!this.pickVector(q,k)||(Geoworld.Cartesian3.clone(k,this.mControlPointArray[f-2]),Geoworld.defined(this.mPolyline)||(this.mPolyline=Geoworld.RenderObjectFactory.createPolylinePrimitive(this.mEarthCtrl,{positions:this.mControlPointArray,
color:Geoworld.Color.fromRgba(3422617472),width:3})))}})});
define("../Interface/Tools/ShapeTool/GwDrawShapeTool.js",["../GwTool.js"],function(v){function k(k,f){this.mEarthCtrl=k;this.handler=new Geoworld.ScreenSpaceEventHandler(k.coreMap.canvas);f=Geoworld.defaultValue(f,Geoworld.defaultValue.EMPTY_OBJECT);this.mCallback=f.callback;this.name="DrawShapeTool";this.entityShape=null;this.points=[];this.drawingMode=Geoworld.defaultValue(f.shape,"polygon");this.activeShapePoints=[];this.floatingPoint=this.activeShape=void 0;var p=this;p.handler.setInputAction(function(f){var k=
p.mEarthCtrl.coreMap;Geoworld.Entity.supportsPolylinesOnTerrain(k.scene)?(f=k.scene.pickPosition(f.position),Geoworld.defined(f)&&(0===p.activeShapePoints.length&&(p.floatingPoint=p.createPoint(f),p.activeShapePoints.push(f)),p.activeShapePoints.push(f),p.createPoint(f))):console.log("This browser does not support polylines on terrain.")},Geoworld.ScreenSpaceEventType.LEFT_CLICK);p.handler.setInputAction(function(f){p.handler.destroy();p.terminateShape()},Geoworld.ScreenSpaceEventType.RIGHT_CLICK);
p.handler.setInputAction(function(f){Geoworld.defined(p.floatingPoint)&&(f=p.mEarthCtrl.coreMap.scene.pickPosition(f.endPosition),Geoworld.defined(f)&&(p.floatingPoint.position.setValue(f),p.activeShapePoints.pop(),p.activeShapePoints.push(f),Geoworld.defined(p.entityShape)||("polygon"===p.drawingMode?3<=p.activeShapePoints.length&&(f=new Geoworld.CallbackProperty(function(){return new Geoworld.PolygonHierarchy(p.activeShapePoints)},!1),p.entityShape=p.drawShape(f)):(f=new Geoworld.CallbackProperty(function(){return p.activeShapePoints},
!1),p.entityShape=p.drawShape(f)))))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)}Object.defineProperties(k.prototype,{});k.prototype.createPoint=function(k){k=this.mEarthCtrl.entities.add({position:k,point:{pixelSize:10,color:Geoworld.Color.YELLOW,heightReference:Geoworld.HeightReference.CLAMP_TO_GROUND}});this.points.push(k);return k};k.prototype.terminateShape=function(){Geoworld.defined(this.mCallback)&&(console.info(this.entityShape),Geoworld.defined(this.entityShape.polygon)?this.mCallback({result:this.entityShape.polygon.hierarchy.getValue().positions}):
Geoworld.defined(this.entityShape.polyline)?this.mCallback({result:this.entityShape.polyline.positions.getValue()}):this.mCallback({result:this.entityShape.point.positions.getValue()}))};k.prototype.drawShape=function(k){var f,p=this.mEarthCtrl;"polyline"===this.drawingMode?f=p.entities.add({polyline:{positions:k,clampToGround:!0,arcType:Geoworld.ArcType.RHUMB,material:Geoworld.Color.GREEN,width:5}}):"polygon"===this.drawingMode?f=p.entities.add({polygon:{hierarchy:k,material:new Geoworld.ColorMaterialProperty(Geoworld.Color.LIGHTSKYBLUE.withAlpha(0.7))}}):
"point"===this.drawingMode&&(f=p.entities.add({position:k,point:{pixelSize:10,color:Geoworld.Color.YELLOW,heightReference:Geoworld.HeightReference.CLAMP_TO_GROUND}}));return f};k.prototype.removeFromMap=function(){var k=this.mEarthCtrl;k.entities.remove(this.floatingPoint);k.entities.remove(this.activeShape);for(var f=0;f<this.points.length;f++)k.entities.remove(this.points[f]);this.entityShape=null;this.activeShape=this.floatingPoint=void 0;this.activeShapePoints=[];this.points=[]};return k});
define("GwShapeTool.js",["../Interface/Tools/ShapeTool/GwPolylineCreateTool.js","../Interface/Tools/ShapeTool/GwPolygonCreateTool.js","../Interface/Tools/ShapeTool/GwDrawShapeTool.js"],function(v,k,q){function f(f){this._earthCtrl=f;this._coreMap=f.coreMap}f.prototype.createPolyline=function(f){this._earthCtrl.tools.clearTool();var t=new v;t.initialize(this._earthCtrl,function(t){f&&f(t)});this._earthCtrl.tools.registerTool("createPolylineTool",t)};f.prototype.createPolygon=function(f){this._earthCtrl.tools.clearTool();
var t=new k;t.initialize(this._earthCtrl,function(t){f&&f(t)});this._earthCtrl.tools.registerTool("createPolygonTool",t);return t};f.prototype.createDrawShapeTool=function(f,t){return new q(this._earthCtrl,{callback:f,shape:t})};return f});
define("GwEditTool.js",["../Interface/Tools/ShapeTool/GwPolylineCreateTool.js","../Interface/Tools/ShapeTool/GwPolygonCreateTool.js"],function(v,k){function q(f){this._earthCtrl=f;this._coreMap=f.coreMap}q.prototype.select=function(f){this._earthCtrl.tools.clearTool();var p=new v;p.initialize(this._earthCtrl,function(p){f&&f(p)});this._earthCtrl.tools.registerTool("createPolylineTool",p)};q.prototype.selectInWorld=function(f){this._earthCtrl.tools.clearTool();var p=new k;p.initialize(this._earthCtrl,
function(p){f&&f(p)});this._earthCtrl.tools.registerTool("createPolygonTool",p)};return q});
define("../Interface/Effects/GwFog.js",[],function(){function v(k){this.mEarthCtrl=k;this.coreMap=k.coreMap;this._parameter={};this._pps=null}Object.defineProperties(v.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==this._pps?!0:!1},set:function(k){!0==k?Geoworld.defined(this._pps)||(this._pps=new Geoworld.PostProcessStage({name:"czm_fog",fragmentShader:" uniform sampler2D colorTexture;\n  uniform sampler2D depthTexture;\n  varying vec2 v_textureCoordinates;\n  void main(void)\n  {\n      vec4 origcolor=texture2D(colorTexture, v_textureCoordinates);\n      vec4 fogcolor=vec4(0.8,0.8,0.8,0.1);\n\n      float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n      vec4 depthcolor=texture2D(depthTexture, v_textureCoordinates);\n\n      float f=(depthcolor.r-0.22)/0.2;\n      if(f<0.0) f=0.0;\n      else if(f>1.0) f=1.0;\n      gl_FragColor = mix(origcolor,fogcolor,f);\n   }"}),this.mEarthCtrl.coreMap.scene.postProcessStages.add(this._pps)):
Geoworld.defined(this._pps)&&(this.mEarthCtrl.coreMap.scene.postProcessStages.remove(this._pps),this._pps=null)}}});return v});
define("../Interface/Effects/GwRain.js",[],function(){function v(k){this.mEarthCtrl=k;this.coreMap=k.coreMap;this._parameter={};this._pps=null;this._restoreParam={hueShift:k.coreMap.scene.skyAtmosphere.hueShift,saturationShift:k.coreMap.scene.skyAtmosphere.saturationShift,brightnessShift:k.coreMap.scene.skyAtmosphere.brightnessShift,density:k.coreMap.scene.fog.density,minimumBrightness:k.coreMap.scene.fog.minimumBrightness}}Object.defineProperties(v.prototype,{parameter:{get:function(){return this._parameter}},
show:{get:function(){return null!==this._pps?!0:!1},set:function(k){!0==k?Geoworld.defined(this._pps)||(this._restoreParam={hueShift:this.mEarthCtrl.coreMap.scene.skyAtmosphere.hueShift,saturationShift:this.mEarthCtrl.coreMap.scene.skyAtmosphere.saturationShift,brightnessShift:this.mEarthCtrl.coreMap.scene.skyAtmosphere.brightnessShift,density:this.mEarthCtrl.coreMap.scene.fog.density,minimumBrightness:this.mEarthCtrl.coreMap.scene.fog.minimumBrightness},this.mEarthCtrl.coreMap.scene.skyAtmosphere.hueShift=
-0.8,this.mEarthCtrl.coreMap.scene.skyAtmosphere.saturationShift=-0.7,this.mEarthCtrl.coreMap.scene.skyAtmosphere.brightnessShift=-0.33,this.mEarthCtrl.coreMap.scene.fog.density=0.001,this.mEarthCtrl.coreMap.scene.fog.minimumBrightness=0.8,this._pps=new Geoworld.PostProcessStage({name:"czm_rain",fragmentShader:"uniform sampler2D colorTexture; \n                    varying vec2 v_textureCoordinates; \n                    float hash(float x)\n                    {\n                        return fract(sin(x*133.3)*13.13);\n                    }\n                    \n                    void main(void)\n                    {\n                        float time = czm_frameNumber / 60.0;\n                        vec2 resolution = czm_viewport.zw;\n                        vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n                        vec3 c=vec3(.6,.7,.8);\n                        float a=-.4;\n                        float si=sin(a),co=cos(a);\n                        uv*=mat2(co,-si,si,co);\n                        uv*=length(uv+vec2(0,4.9))*.3+1.;\n                        float v=1.-sin(hash(floor(uv.x*100.))*2.);\n                        float b=clamp(abs(sin(20.*time*v+uv.y*(5./(2.+v))))-.95,0.,1.)*20.;\n                        c*=v*b; //\u5c4f\u5e55\u4e0a\u96e8\u7684\u989c\u8272\n                        gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(c,1), 0.5); //\u5c06\u96e8\u548c\u4e09\u7ef4\u573a\u666f\u878d\u5408\n                    }\n                    "}),
this.mEarthCtrl.coreMap.scene.postProcessStages.add(this._pps)):Geoworld.defined(this._pps)&&(this.mEarthCtrl.coreMap.scene.postProcessStages.remove(this._pps),this._pps=null,this.mEarthCtrl.coreMap.scene.skyAtmosphere.hueShift=this._restoreParam.hueShift,this.mEarthCtrl.coreMap.scene.skyAtmosphere.saturationShift=this._restoreParam.saturationShift,this.mEarthCtrl.coreMap.scene.skyAtmosphere.brightnessShift=this._restoreParam.brightnessShift,this.mEarthCtrl.coreMap.scene.fog.density=this._restoreParam.density,
this.mEarthCtrl.coreMap.scene.fog.minimumBrightness=this._restoreParam.minimumBrightness)}}});return v});
define("../Interface/Effects/GwSnow.js",[],function(){function v(k){this.mEarthCtrl=k;this.coreMap=k.coreMap;this._parameter={};this._pps=null}Object.defineProperties(v.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==this._pps?!0:!1},set:function(k){!0==k?Geoworld.defined(this._pps)||(this._pps=new Geoworld.PostProcessStage({name:"czm_snow",fragmentShader:"uniform sampler2D colorTexture;\n                    varying vec2 v_textureCoordinates;\n                    float snow(vec2 uv,float scale)\n                    {\n                        float time = czm_frameNumber / 60.0;\n                        float w=smoothstep(1.,0.,-uv.y*(scale/10.));if(w<.1)return 0.;\n                        uv+=time/scale;uv.y+=time*2./scale;uv.x+=sin(uv.y+time*.5)/scale;\n                        uv*=scale;vec2 s=floor(uv),f=fract(uv),p;float k=3.,d;\n                        p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7,3,6,5))*5.))-f;d=length(p);k=min(d,k);\n                        k=smoothstep(0.,k,sin(f.x+f.y)*0.01);\n                        return k*w;\n                    }\n                    \n                    void main(void) \n                    {\n                        vec2 resolution = czm_viewport.zw;\n                        vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x,resolution.y);\n                        vec3 finalColor=vec3(0);\n                        float c = 0.0;\n                        c+=snow(uv,30.)*.0;\n                        c+=snow(uv,20.)*.0;\n                        c+=snow(uv,15.)*.0;\n                        c+=snow(uv,10.);\n                        c+=snow(uv,8.);\n                        c+=snow(uv,6.);\n                        c+=snow(uv,5.);\n                        finalColor=(vec3(c)); \n                        gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.5); \n                    }\n                    "}),this.mEarthCtrl.coreMap.scene.postProcessStages.add(this._pps)):
Geoworld.defined(this._pps)&&(this.mEarthCtrl.coreMap.scene.postProcessStages.remove(this._pps),this._pps=null)}}});return v});
define("../Interface/Effects/GwColorAdjustment.js",[],function(){function v(k){this.mEarthCtrl=k;this.coreMap=k.coreMap;this._parameter={};this._pps=null;this._csbScale=new Geoworld.Cartesian4(0.5,1,1,1)}function k(k){Geoworld.defined(k._pps)||(k._pps=new Geoworld.PostProcessStage({name:"czm_hsl",fragmentShader:" uniform vec4 u_colorCSBScale;    \n                        uniform sampler2D colorTexture; \n                        varying vec2 v_textureCoordinates; \n                        void main( void )  \n                        {   \n                            vec4 renderTex = texture2D(colorTexture, v_textureCoordinates);    \n                            vec3 finalColor = renderTex.rgb * u_colorCSBScale.z;    \n                            float gray = 0.2125 * renderTex.r + 0.7154 * renderTex.g + 0.0721 * renderTex.b;   \n                            vec3 grayColor = vec3(gray, gray, gray);    \n                            finalColor = mix(grayColor, finalColor, u_colorCSBScale.y);   \n                            vec3 avgColor = vec3(0.5, 0.5, 0.5);   \n                            finalColor = mix(avgColor, finalColor, u_colorCSBScale.x);    \n                            gl_FragColor = vec4(finalColor.rgb, renderTex.a);   \n                        }   \n                        ",uniforms:{u_colorCSBScale:function(){return k._csbScale}}}),
k.mEarthCtrl.coreMap.scene.postProcessStages.add(k._pps))}Object.defineProperties(v.prototype,{contrast:{get:function(){return this._csbScale.x},set:function(k){this._csbScale.x=k}},saturation:{get:function(){return this._csbScale.y},set:function(k){this._csbScale.y=k}},brightness:{get:function(){return this._csbScale.z},set:function(k){this._csbScale.z=k}},show:{get:function(){return null!==this._pps?!0:!1},set:function(q){!0==q?k(this):Geoworld.defined(this._pps)&&(this.mEarthCtrl.coreMap.scene.postProcessStages.remove(this._pps),
this._pps=null)}}});return v});
define("../Interface/Effects/GwBwMode.js",[],function(){function v(k){this.mEarthCtrl=k;this.coreMap=k.coreMap;this._parameter={};this._pps=null}Object.defineProperties(v.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==this._pps?!0:!1},set:function(k){!0==k?Geoworld.defined(this._pps)||(this._pps=new Geoworld.PostProcessStage({name:"czm_bwmode",fragmentShader:"uniform sampler2D colorTexture; \n                    varying vec2 v_textureCoordinates; \n                    \n                    void main(void)\n                    {\n                        vec4 c = texture2D( colorTexture, v_textureCoordinates ); \n                        float grey = 0.2125*c.r+0.7154*c.g+0.0721*c.b;             \n                        c.r=grey*grey;   \n                        c.g=grey*grey;   \n                        c.b=grey*grey;  \n                        gl_FragColor=c; \n                    }\n                    "}),this.mEarthCtrl.coreMap.scene.postProcessStages.add(this._pps)):
Geoworld.defined(this._pps)&&(this.mEarthCtrl.coreMap.scene.postProcessStages.remove(this._pps),this._pps=null)}}});return v});
define("../Interface/Effects/GwNightMode.js",[],function(){function v(k){this.mEarthCtrl=k;this.coreMap=k.coreMap;this._parameter={};this._pps=null;this._restoreParam={hueShift:k.coreMap.scene.skyAtmosphere.hueShift,saturationShift:k.coreMap.scene.skyAtmosphere.saturationShift,brightnessShift:k.coreMap.scene.skyAtmosphere.brightnessShift,density:k.coreMap.scene.fog.density,minimumBrightness:k.coreMap.scene.fog.minimumBrightness}}Object.defineProperties(v.prototype,{parameter:{get:function(){return this._parameter}},
show:{get:function(){return null!==this._pps?!0:!1},set:function(k){!0===k?Geoworld.defined(this._pps)||(k=this.mEarthCtrl,this._restoreParam={hueShift:k.coreMap.scene.skyAtmosphere.hueShift,saturationShift:k.coreMap.scene.skyAtmosphere.saturationShift,brightnessShift:k.coreMap.scene.skyAtmosphere.brightnessShift,density:k.coreMap.scene.fog.density,minimumBrightness:k.coreMap.scene.fog.minimumBrightness},k.coreMap.scene.skyAtmosphere.hueShift=-0.8,k.coreMap.scene.skyAtmosphere.saturationShift=-0.7,
k.coreMap.scene.skyAtmosphere.brightnessShift=-0.33,k.coreMap.scene.fog.density=0.001,k.coreMap.scene.fog.minimumBrightness=0.8,this._pps=new Geoworld.PostProcessStage({name:"czm_night_mode",fragmentShader:"uniform sampler2D colorTexture; \n                    varying vec2 v_textureCoordinates; \n                    \n                    void main(void)\n                    {\n                        gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), vec4(0.1, 0.1, 0.1,1), 0.7); \n                    }\n                    "}),
this.mEarthCtrl.coreMap.scene.postProcessStages.add(this._pps)):Geoworld.defined(this._pps)&&(this.mEarthCtrl.coreMap.scene.postProcessStages.remove(this._pps),this._pps=null,this.mEarthCtrl.coreMap.scene.skyAtmosphere.hueShift=this._restoreParam.hueShift,this.mEarthCtrl.coreMap.scene.skyAtmosphere.saturationShift=this._restoreParam.saturationShift,this.mEarthCtrl.coreMap.scene.skyAtmosphere.brightnessShift=this._restoreParam.brightnessShift,this.mEarthCtrl.coreMap.scene.fog.density=this._restoreParam.density,
this.mEarthCtrl.coreMap.scene.fog.minimumBrightness=this._restoreParam.minimumBrightness)}}});return v});
define("GwEnvironment.js","../Interface/Effects/GwFog.js ../Interface/Effects/GwRain.js ../Interface/Effects/GwSnow.js ../Interface/Effects/GwColorAdjustment.js ../Interface/Effects/GwBwMode.js ../Interface/Effects/GwNightMode.js".split(" "),function(v,k,q,f,p,t){function w(w){this.mEarthCtrl=w;this.coreMap=w.coreMap;this._fog=new v(w);this._rain=new k(w);this._snow=new q(w);this._colorAdjustment=new f(w);this._bwMode=new p(w);this._nightMode=new t(w)}w.prototype.disableAllEffect=function(){this._fog.show=
!1;this._rain.show=!1;this._snow.show=!1;this._colorAdjustment.show=!1;this._bwMode.show=!1;this._nightMode.show=!1};w.prototype.showEffect=function(f){this.disableAllEffect();"fog"===f?this._fog.show=!0:"rain"===f?this._rain.show=!0:"snow"===f?this._snow.show=!0:"colorAdjustment"===f?this._colorAdjustment.show=!0:"bwMode"===f?this._bwMode.show=!0:"nightMode"===f&&(this._nightMode.show=!0)};w.prototype.disableEffect=function(f){"fog"===f?this._fog.show=!1:"rain"===f?this._rain.show=!1:"snow"===f?
this._snow.show=!1:"colorAdjustment"===f?this._colorAdjustment.show=!1:"bwMode"===f?this._bwMode.show=!1:"nightMode"===f&&(this._nightMode.show=!1)};Object.defineProperties(w.prototype,{SkyBoxSource:{get:function(){return this.coreMap.scene.skyBox?this.coreMap.scene.skyBox.sources:{}},set:function(f){Geoworld.defined(f)&&(this.coreMap.scene.skyBox&&this.coreMap.scene.skyBox.destroy(),this.coreMap.scene.skyBox=new Geoworld.SkyBox({sources:f}))}},fog:{get:function(){return this._fog}},rain:{get:function(){return this._rain}},
snow:{get:function(){return this._snow}},colorAdjustment:{get:function(){return this._colorAdjustment}},bwMode:{get:function(){return this._bwMode}},nightMode:{get:function(){return this._nightMode}}});return w});
define("Scene/GwObject.js",[],function(){var v=Class.extend({__init__:function(){this._coreMap=this._earthCtrl=null;this._userId=this._id=this._name="";this._rtti="GwObject"},initialize:function(k){this._earthCtrl=k;this._coreMap=k.coreMap},finalize:function(){},addToMap:function(){},removeFromMap:function(){}});Object.defineProperties(v.prototype,{id:{get:function(){return this._id},set:function(k){this._id=k}},name:{get:function(){return this._name},set:function(k){this._name=k}},userId:{get:function(){return this._userId},
set:function(k){this._userId=k}},rtti:{get:function(){return this._rtti}}});return v});
define("Scene/GwNode.js",["../Scene/GwObject.js"],function(v){v=v.extend({__init__:function(){this._super();this._rtti="GwNode";this._childNodes=[];this._childNodeMap={};this._show=!0;this._parentNode=null},initialize:function(k){this._super(k);this.mCoreMap=k.coreMap},finalize:function(){this._super();this._parentNode=null;this._childNodes=[];this._childNodeMap={}},getChildCount:function(){return this._childNodes.length},getChildById:function(k){return this._childNodeMap.hasOwnProperty(k)?this._childNodeMap[k]:
null},getChildByName:function(k){for(var q in this._childNodeMap)if(this._childNodeMap[q].name===k)return this._childNodeMap[q];return null},getChildByIndex:function(k){return this._childNodes[k]},addChild:function(k){if(this._childNodeMap.hasOwnProperty(k.id))return!1;k.parentNode=this;this._childNodes.push(k);this._childNodeMap[k.id]=k;return!0},removeChildById:function(k){if(!this._childNodeMap.hasOwnProperty(k))return!1;this._childNodeMap[k].parentNode=null;delete this._childNodeMap[k];for(var q=
0;q<this._childNodes.length;q++)if(this._childNodes[q].id===k){this.childNodes.splice(q,1);break}return!0},removeChild:function(k){return this.removeChildById(k.id)},removeChildByIndex:function(k){return this.removeChild(this._childNodes[k])},removeAll:function(){this._childNodes=[];this._childNodeMap={}}});Object.defineProperties(v.prototype,{parentNode:{get:function(){return this._parentNode},set:function(k){this._parentNode=k}},childNodes:{get:function(){return this._childNodes}},show:{get:function(){return this._show},
set:function(k){this._show=k}}});return v});
define("Core/GwEventHandler.js",[],function(){var v=function(k){var q=[];q.remove=function(f){if(isNaN(f)||f>this.length)return!1;this.splice(f,1)};q.clear=function(f){for(var p=0;p<q.length;p++)(!f||q[p].o==f&&q[p].f)&&q.remove(p)};this._addEventHandler=function(f,p){for(var t=0;t<q.length;t++){if(q[t].o==f&&q[t].f==p)return;q.push({o:f,f:p})}0==q.length&&q.push({o:f,f:p})};this._removeEventHandler=function(f,p){for(var t=0;t<q.length;t++)q[t].o==f&&q[t].f==p&&q.remove(t)};this._clearEventHandler=
function(f){q.clear(f)};this._notifyEvent=function(f,p,t){for(var k=0;k<q.length;k++)q[k].f(f,q[k].o,p,t)};this.addEventHandler=this._addEventHandler;this.removeEventHandler=this._removeEventHandler;this.clearEventHandler=this._clearEventHandler;this.notifyEvent=this._notifyEvent};return Geoworld.GwEventHandler=v});
define("Scene/GwSelectSet.js",["../Scene/GwObject.js","../Core/GwEventHandler.js"],function(v,k){Array.prototype.indexOf=function(f){for(var p=0;p<this.length;p++)if(this[p]==f)return p;return-1};var q=v.extend({__init__:function(){this._super();this._type="GwSelectSet";this._objectMap=[];this._isBenchUpdate=!1;this._EventSelectSetChanged=new k("EventSelectSetChanged")},initialize:function(f){this._super(f)},finalize:function(){this._super();this._objectArray=[]},addObject:function(f){var p;a:{p=
this._objectArray;for(var t=p.length;t--;)if(p[t]===f){p=!0;break a}p=!1}if(p)return!1;this._objectArray.push(f);this._isBenchUpdate||this.commitChanged()},removeObject:function(f){var p=this._objectArray;f=p.indexOf(f);-1<f&&p.splice(f,1);this._isBenchUpdate||this.commitChanged()},getObject:function(f){return 0>f||f>=this._objectArray.length?null:this._objectArray[f]},removeAll:function(f){this._objectArray=[];this._isBenchUpdate||this.commitChanged()},beginUpdate:function(){this._isBenchUpdate=
!0},endUpdate:function(){this._isBenchUpdate&&(this.commitChanged(),this._isBenchUpdate=!1)},commitChanged:function(){this._EventSelectSetChanged._notifyEvent(this)}});Object.defineProperties(q.prototype,{count:{get:function(){return this._objectArray.length}},EventSelectSetChanged:{get:function(){return this._EventSelectSetChanged}}});return q});
define("Core/GwWgs84SpatialTransform.js",[],function(){function v(k){var f=Geoworld.Cartesian3.fromDegrees(k._longitude,k._latitude,k._altitude),p=new Geoworld.HeadingPitchRoll(k._heading*Math.PI/180,k._pitch*Math.PI/180,k._roll*Math.PI/180),t=Geoworld.Transforms.localFrameToFixedFrameGenerator("north","west");k._modelMatrix=Geoworld.Transforms.headingPitchRollToFixedFrame(f,p,Geoworld.Ellipsoid.WGS84,t,k._modelMatrix)}var k=Class.extend({__init__:function(){this._roll=this._pitch=this._heading=this._altitude=
this._latitude=this._longitude=0;this._batchUpdate=!1;this._modelMatrix=new Geoworld.Matrix4},createFromWgs84:function(k,f,p,t,w,x){this._longitude=Geoworld.defaultValue(k,0);this._latitude=Geoworld.defaultValue(f,0);this._altitude=Geoworld.defaultValue(p,0);this._heading=Geoworld.defaultValue(t,0);this._pitch=Geoworld.defaultValue(w,0);this._roll=Geoworld.defaultValue(x,0);v(this);this._batchUpdate=!1},beginUpdate:function(){this._batchUpdate=!0},endUpdate:function(){!0==this._batchUpdate&&(v(this),
this._batchUpdate=!1)}});Object.defineProperties(k.prototype,{modelMatrix:{get:function(){return this._modelMatrix},set:function(k){this._modelMatrix=k}},longitude:{get:function(){return this._longitude},set:function(k){this._longitude=k;this._batchUpdate||v(this)}},latitude:{get:function(){return this._latitude},set:function(k){this._latitude=k;this._batchUpdate||v(this)}},altitude:{get:function(){return this._altitude},set:function(k){this._altitude=k;this._batchUpdate||v(this)}},heading:{get:function(){return this._heading},
set:function(k){this._heading=k;this._batchUpdate||v(this)}},pitch:{get:function(){return this._pitch},set:function(k){this._pitch=k;this._batchUpdate||v(this)}},roll:{get:function(){return this._roll},set:function(k){this._roll=k;this._batchUpdate||v(this)}}});return k});
define("Scene/GwSpatialObject.js",["../Scene/GwObject.js","../Core/GwWgs84SpatialTransform.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwSpatialObject";this._spatialTransform=null},initialize:function(f){this._super(f);this._spatialTransform=new k}});Object.defineProperties(q.prototype,{spatialTransform:{get:function(){return this._spatialTransform},set:function(f){this._spatialTransform=f}}});return q});
define("Parser/GwExportObjectConfig.js",[],function(){return Object.freeze({GWIMAGERYLAYER:"GwImageryLayer",GWTERRAINLAYER:"GwTerrainLayer",GWMODELLAYER:"GwModelLayer",GWFEATURELAYER:"GwFeatureLayer",GWMODEL:"GwModel",GWWATERS:"GwWaters",GWEXPLOSION:"GwExplosion",GWFIREWORK:"GwFireworks",GWFIRE:"GwFire",GWSMOKE:"GwSmoke",GWRADARSCAN:"GwRadarScan",GWCIRCLESCAN:"GwCircleScan",GWPOINT:"GwPoint",GWLABEL:"GwLabel",GWBILLBOARD:"GwBillboard",GWPOLYLINE:"GwPolyline",GWPOLYGON:"GwPolygon",GWRECTANGLE:"GwRectangle",
GWBOX:"GwBox",GWCYLINDER:"GwCylinder",GWELLIPSOID:"GwEllipsoid",GWVIDEOPROJECTION:"GwVideoProjection"})});
define("Parser/GwSceneConfigNode.js",[],function(){return Object.freeze({NODE:"NODE",IMAGERY_LAYER:"IMAGERY_LAYER",TERRAIN_LAYER:"TERRAIN_LAYER",MODEL_LAYER:"MODEL_LAYER",FEATURE_LAYER:"FEATURE_LAYER",SKYBOX:"SKYBOX",ENVIRONMENT:"ENVIRONMENT",VIEWPOINT:"VIEWPOINT",MODEL:"MODEL",WATERS:"WATERS",EXPLOSION:"EXPLOSION",FIREWORK:"FIREWORK",SMOKE:"SMOKE",FIRE:"FIRE",RADARSCAN:"RADARSCAN",CIRCLESCAN:"CIRCLESCAN",POINT:"POINT",LABEL:"LABEL",BILLBOARD:"BILLBOARD",POLYLINE:"POLYLINE",POLYGON:"POLYGON",RECTANGLE:"RECTANGLE",
ELLIPSE:"ELLIPSE",BOX:"BOX",ELLIPSOID:"ELLIPSOID",CYLINDER:"CYLINDER",POLYLINEVOLUME:"POLYLINEVOLUME",PERSPECTIVE_VIDEO_PROJECTION:"PERSPECTIVE_VIDEO_PROJECTION",FISHEYE_VIDEO_PROJECTION:"FISHEYE_VIDEO_PROJECTION",TRACK:"TRACK",HEATMAP:"HEATMAP",ECHARTLAYER:"ECHARTLAYER"})});define("Parser/GwDefinedValue.js",[],function(){return function(v){return void 0!==v&&null!==v?v._value:v}});
define("Parser/GwExportObject.js",["./GwExportObjectConfig.js","./GwSceneConfigNode.js","./GwDefinedValue.js"],function(v,k,q){function f(){}f.export=function(p){var t=null,k=f.ExportObjectMap[p._rtti];void 0!==k&&(t=k(p));return t};f.ExportObjectMap={};f.ExportObjectMap[v.GWEXPLOSION]=function(f){var t=null;return t={class:Geoworld.defaultValue(f._parameter.class,k.EXPLOSION),name:f.name,id:f.id,show:f.show,lon:f.parameter.lon,lat:f.parameter.lat,alt:f.parameter.alt}};f.ExportObjectMap[v.GWWATERS]=
function(f){var t=null;return t={class:Geoworld.defaultValue(f._parameter.class,k.WATERS),name:f.name,id:f.id,show:f.show,params:f.params,url:f.url,color:f.color,waterFrequency:f.waterFrequency,animationSpeed:f.animationSpeed,amplitude:f.amplitude}};f.ExportObjectMap[v.GWFIREWORK]=function(f){var t=null;return t={class:Geoworld.defaultValue(f._parameter.class,k.FIREWORK),name:f.name,id:f.id,show:f.show,lon:f.parameter.lon,lat:f.parameter.lat,alt:f.parameter.alt,emitHeight:f.parameter.emitHeight}};
f.ExportObjectMap[v.GWSMOKE]=function(f){var t=null;return t={class:Geoworld.defaultValue(f._parameter.class,k.SMOKE),name:f.name,id:f.id,show:f.show,lon:f.parameter.lon,lat:f.parameter.lat,alt:f.parameter.alt,particleSize:f.parameter.particleSize}};f.ExportObjectMap[v.GWFIRE]=function(f){var t=null;return t={class:Geoworld.defaultValue(f._parameter.class,k.FIRE),name:f.name,id:f.id,show:f.show,lon:f.parameter.lon,lat:f.parameter.lat,alt:f.parameter.alt,particleSize:f.parameter.particleSize}};f.ExportObjectMap[v.GWRADARSCAN]=
function(f){var t=null;return t={class:k.RADARSCAN,name:f.name,id:f.id,show:f.show,lon:f._lon,lat:f._lat,height:f._height,maxRadius:f._maxRadius,duration:f._duration,color:f._color}};f.ExportObjectMap[v.GWCIRCLESCAN]=function(f){var t=null;return t={class:k.CIRCLESCAN,name:f.name,id:f.id,show:f.show,lon:f._lon,lat:f._lat,height:f._height,maxRadius:f._maxRadius,duration:f._duration,color:f._color}};f.ExportObjectMap[v.GWPOINT]=function(f){var t=null,t=f._coreMap.scene.globe.ellipsoid.cartesianToCartographic(f._primitive.position._value);
return t={class:Geoworld.defaultValue(f._parameter.class,k.POINT),name:f.name,id:f.id,show:f.show,lon:Geoworld.Math.toDegrees(t.longitude),lat:Geoworld.Math.toDegrees(t.latitude),alt:parseInt(t.height.toFixed(2)),pixelSize:q(f._primitive.point.pixelSize),color:q(f._primitive.point.color),outlineColor:q(f._primitive.point.outlineColor),outlineWidth:q(f._primitive.point.outlineWidth)}};f.ExportObjectMap[v.GWLABEL]=function(f){var t=null,t=f._coreMap.scene.globe.ellipsoid.cartesianToCartographic(f._primitive.position._value);
return t={class:Geoworld.defaultValue(f._parameter.class,k.LABEL),id:f.id,show:f.show,name:f.name,lon:Geoworld.Math.toDegrees(t.longitude),lat:Geoworld.Math.toDegrees(t.latitude),alt:parseInt(t.height.toFixed(2)),text:q(f._primitive.label.text),font:q(f._primitive.label.font),fillColor:q(f._primitive.label.fillColor),outlineWidth:q(f._primitive.label.outlineWidth),verticalOrigin:q(f._primitive.label.verticalOrigin)}};f.ExportObjectMap[v.GWBILLBOARD]=function(f){var t=null,t=f._coreMap.scene.globe.ellipsoid.cartesianToCartographic(f._primitive.position._value);
return t={class:Geoworld.defaultValue(f._parameter.class,k.BILLBOARD),name:f.name,id:f.id,show:f.show,lon:Geoworld.Math.toDegrees(t.longitude),lat:Geoworld.Math.toDegrees(t.latitude),alt:parseInt(t.height.toFixed(2)),image:q(f._primitive.billboard.image),scale:q(f._primitive.billboard.scale)}};f.ExportObjectMap[v.GWPOLYLINE]=function(f){var t=null,w=[];f._primitive.polyline.positions._value.forEach(function(t){var k=[];t=f._coreMap.scene.globe.ellipsoid.cartesianToCartographic(t);k.push(Geoworld.Math.toDegrees(t.longitude));
k.push(Geoworld.Math.toDegrees(t.latitude));k.push(t.height);w.push(k)});return t={class:Geoworld.defaultValue(f._parameter.class,k.POLYLINE),name:f.name,id:f.id,show:f.show,positions:w,lineColor:f._parameter.lineColor,lineWidth:q(f._primitive.polyline.width),clampToGround:q(f._primitive.polyline.clampToGround),outlineColor:f._parameter.outlineColor}};f.ExportObjectMap[v.GWPOLYGON]=function(f){var t=null,w=[];f.positions.positions.forEach(function(t){var k=[];t=f._coreMap.scene.globe.ellipsoid.cartesianToCartographic(t);
k.push(Geoworld.Math.toDegrees(t.longitude));k.push(Geoworld.Math.toDegrees(t.latitude));k.push(t.height);w.push(k)});return t={class:Geoworld.defaultValue(f._parameter.class,k.POLYGON),name:f.name,id:f.id,show:f.show,positions:w,material:f.material?q(f._primitive.polygon.material.color):void 0,outline:q(f.outline),outlineColor:q(f.outlineColor)}};f.ExportObjectMap[v.GWRECTANGLE]=function(f){var t=null,t=f.coordinates,w=Geoworld.Math.toDegrees(t.east),x=Geoworld.Math.toDegrees(t.north),A=Geoworld.Math.toDegrees(t.south),
t=[Geoworld.Math.toDegrees(t.west),A,w,x];return t={class:Geoworld.defaultValue(f._parameter.class,k.RECTANGLE),name:f.name,id:f.id,show:f.show,coordinates:t,height:q(f.height),fillColor:f.fillColor?q(f.fillColor.color):void 0,outline:q(f.outline),outlineColor:q(f.outlineColor)}};f.ExportObjectMap[v.GWBOX]=function(f){var t=null,t=[],w=q(f.position),w=f._coreMap.scene.globe.ellipsoid.cartesianToCartographic(w);t.push(Geoworld.Math.toDegrees(w.longitude));t.push(Geoworld.Math.toDegrees(w.latitude));
t.push(w.height);return t={class:Geoworld.defaultValue(f._parameter.class,k.BOX),name:f.name,id:f.id,show:f.show,position:t,dimensions:f.dimensions._value,material:f.material?q(f._primitive.box.material.color):void 0,fill:q(f.fill),outline:q(f.outline),outlineColor:q(f.outlineColor)}};f.ExportObjectMap[v.GWCYLINDER]=function(f){var t=null,t=[],w=q(f.position),w=f._coreMap.scene.globe.ellipsoid.cartesianToCartographic(w);t.push(Geoworld.Math.toDegrees(w.longitude));t.push(Geoworld.Math.toDegrees(w.latitude));
t.push(w.height);return t={class:Geoworld.defaultValue(f._parameter.class,k.CYLINDER),name:f.name,id:f.id,show:f.show,position:t,topRadius:q(f.topRadius),bottomRadius:q(f.bottomRadius),length:q(f.length),fill:q(f.fill),material:f.material?q(f._primitive.cylinder.material.color):void 0,outline:q(f.outline),outlineColor:q(f.outlineColor)}};f.ExportObjectMap[v.GWELLIPSOID]=function(f){var t=null,t=[],w=q(f.position),w=f._coreMap.scene.globe.ellipsoid.cartesianToCartographic(w);t.push(Geoworld.Math.toDegrees(w.longitude));
t.push(Geoworld.Math.toDegrees(w.latitude));t.push(w.height);var w=[],x=q(f.radii);w.push(x.x);w.push(x.y);w.push(x.z);return t={class:Geoworld.defaultValue(f._parameter.class,k.ELLIPSOID),name:f.name,id:f.id,show:f.show,position:t,radii:w,fill:q(f.fill),material:f.material?q(f._primitive.ellipsoid.material.color):void 0,outline:q(f.outline),outlineColor:q(f.outlineColor)}};f.ExportObjectMap[v.GWVIDEOPROJECTION]=function(f){var t=null,q=Geoworld.defaultValue(f._parameter.sourceType,"perspective");
if("perspective"===q||"panorama"===q)t={class:Geoworld.defaultValue(f._parameter.class,k.PERSPECTIVE_VIDEO_PROJECTION),name:f.name,id:f.id,sourceType:f._parameter.sourceType,matchMaterials:f._parameter.matchMaterials,lon:f._parameter.lon,lat:f._parameter.lat,height:f._parameter.height,heading:f._parameter.heading,pitch:f._parameter.pitch,roll:f._parameter.roll,fov:f._parameter.fov,far:f._parameter.far,near:f._parameter.near,opacity:f._parameter.opacity,maxDiffAngle:f._parameter.maxDiffAngle,videoLink:f._parameter.videoLink,
aspect:f._parameter.aspect,addToMap:f._parameter.addToMap,preview:f._parameter.preview,playVideo:f._parameter.playVideo,showMesh:f.showMesh,show:f.show,enable:f._parameter.enable,videoFrameInterval:f._parameter.videoFrameInterval,useDepth:f._parameter.useDepth};"fisheye"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.FISHEYE_VIDEO_PROJECTION),name:f.name,id:f.id,sourceType:f._parameter.sourceType,matchMaterials:f._parameter.matchMaterials,lon:f._parameter.lon,lat:f._parameter.lat,height:f._parameter.height,
heading:f._parameter.heading,pitch:f._parameter.pitch,roll:f._parameter.roll,fov:f._parameter.fov,far:f._parameter.far,near:f._parameter.near,opacity:f._parameter.opacity,maxDiffAngle:f._parameter.maxDiffAngle,videoLink:f._parameter.videoLink,aspect:f._parameter.aspect,addToMap:f._parameter.addToMap,preview:f._parameter.preview,playVideo:f._parameter.playVideo,showMesh:f.showMesh,show:f.show,enable:f._parameter.enable,videoFrameInterval:f._parameter.videoFrameInterval,useDepth:f._parameter.useDepth});
return t};f.ExportObjectMap[v.GWIMAGERYLAYER]=function(f){var t=null,q=Geoworld.defaultValue(f.sourceType,"wmts");"tms"===q&&(t=f._primitive.imageryProvider._rectangle,t=Geoworld.defined(t)?{west:Geoworld.Math.toDegrees(t.west),south:Geoworld.Math.toDegrees(t.south),east:Geoworld.Math.toDegrees(t.east),north:Geoworld.Math.toDegrees(t.north)}:{west:"",south:"",east:"",north:""},t={class:Geoworld.defaultValue(f._parameter.class,k.IMAGERY_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,zIndex:f._primitive._layerIndex,
url:f.dataUrl,show:f.show,maximumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.maximumLevel,""),minimumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.minimumLevel,""),west:t.west,south:t.south,east:t.east,north:t.north});"wms"===q&&(t=f._primitive.imageryProvider._resource._queryParameters,t={class:Geoworld.defaultValue(f._parameter.class,k.IMAGERY_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,zIndex:f._primitive._layerIndex,url:f.dataUrl,show:f.show,layers:Geoworld.defaultValue(f._primitive.imageryProvider._layers,
""),maximumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.maximumLevel,""),minimumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.minimumLevel,""),parameters:{transparent:t.transparent,format:t.format,crs:t.crs,version:t.version,layers:t.layers}});"wmts"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.IMAGERY_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,zIndex:f._primitive._layerIndex,url:f.dataUrl,show:f.show,layer:Geoworld.defaultValue(f._primitive.imageryProvider._layer,
""),format:Geoworld.defaultValue(f._primitive.imageryProvider._format,""),tileMatrixSetID:Geoworld.defaultValue(f._primitive.imageryProvider._tileMatrixSetID,""),maximumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.maximumLevel,""),minimumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.minimumLevel,"")});"mapbox"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.IMAGERY_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,zIndex:f._primitive._layerIndex,mapId:"",show:f.show,
maximumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.maximumLevel,""),minimumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.minimumLevel,"")});"arcgis"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.IMAGERY_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,zIndex:f._primitive._layerIndex,url:f.dataUrl,show:f.show,maximumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.maximumLevel,""),minimumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.minimumLevel,
"")});"multi"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.IMAGERY_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,zIndex:f._primitive._layerIndex,url:f.dataUrl,show:f.show,maximumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.maximumLevel,""),minimumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.minimumLevel,"")});"single"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.IMAGERY_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,zIndex:f._primitive._layerIndex,
url:f.dataUrl,show:f.show,maximumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.maximumLevel,""),minimumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.minimumLevel,"")});"baidu"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.IMAGERY_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,zIndex:f._primitive._layerIndex,url:f.dataUrl,show:f.show,maximumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.maximumLevel,""),minimumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.minimumLevel,
"")});"gaode"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.IMAGERY_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,zIndex:f._primitive._layerIndex,url:f.dataUrl,show:f.show,maximumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.maximumLevel,""),minimumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.minimumLevel,"")});"mapworld"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.IMAGERY_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,zIndex:f._primitive._layerIndex,
url:f.dataUrl,show:f.show,maximumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.maximumLevel,""),minimumLevel:Geoworld.defaultValue(f._primitive.imageryProvider.minimumLevel,"")});return t};f.ExportObjectMap[v.GWTERRAINLAYER]=function(f){var t=null,q=Geoworld.defaultValue(f.sourceType,"ctb");"ude"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.TERRAIN_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,zIndex:f._parameter.zIndex,url:f.dataUrl,show:f.show});"ctb"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,
k.TERRAIN_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,zIndex:f._parameter.zIndex,url:f.dataUrl,show:f.show});"multi"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.TERRAIN_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,zIndex:f._parameter.zIndex,url:f.dataUrl,show:f.show});return t};f.ExportObjectMap[v.GWMODELLAYER]=function(f){var t=null,q=Geoworld.defaultValue(f.sourceType,"b3dm");if("b3dm"===q||"3DTiles"===q)t={class:Geoworld.defaultValue(f._parameter.class,k.MODEL_LAYER),
name:f.name,id:f.id,sourceType:f.sourceType,show:f.show,zIndex:f._parameter.zIndex,url:f.dataUrl,options:f._parameter.options,transform:f._parameter.transform};"osgb"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.MODEL_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,show:f.show,url:f.dataUrl});"s3m"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.MODEL_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,show:f.show,url:f.dataUrl});if("ude_block"===q||"ude_model"===q)t={class:Geoworld.defaultValue(f._parameter.class,
k.MODEL_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,show:f.show,url:f.dataUrl};return t};f.ExportObjectMap[v.GWFEATURELAYER]=function(f){console.log("\u5f53\u524d\u64cd\u4f5c\u8282\u70b9>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>",f);var t=null,q=Geoworld.defaultValue(f.sourceType,"geojson");"geojson"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.FEATURE_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,show:f.show,url:f.dataUrl});"feature"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,
k.FEATURE_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,show:f.show,url:f.dataUrl});"custom"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.FEATURE_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,show:f.show,url:f.dataUrl});"kml"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.FEATURE_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,show:f.show,url:f.dataUrl});"arcgis_json"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.FEATURE_LAYER),name:f.name,id:f.id,
sourceType:f.sourceType,show:f.show,url:f.dataUrl});"raster"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.FEATURE_LAYER),name:f.name,id:f.id,sourceType:f.sourceType,show:f.show,url:f.dataUrl});return t};f.ExportObjectMap[v.GWMODEL]=function(f){var t=null,q=Geoworld.defaultValue(f.sourceType,"gltf");"gltf"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.MODEL),name:f.name,id:f.id,sourceType:q,show:f.show,url:f.dataUrl,lon:f.lon,lat:f.lat,alt:f.alt,heading:f.heading,pitch:f.pitch,
roll:f.roll,scale:f._primitive.scale,minimumPixelSize:f._primitive.minimumPixelSize});"glb"===q&&(t={class:Geoworld.defaultValue(f._parameter.class,k.MODEL),name:f.name,id:f.id,sourceType:q,show:f.show,url:f.dataUrl,lon:f.lon,lat:f.lat,alt:f.alt,heading:f.heading,pitch:f.pitch,roll:f.roll,scale:f._primitive.scale,minimumPixelSize:f._primitive.minimumPixelSize});return t};return f});
define("Scene/entity/GwModel.js",["../GwSpatialObject.js","../../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwModel";this._parameter=this._primitive=null},initialize:function(f,p){this._super(f);this._parameter=p;this._spatialTransform.createFromWgs84(p.lon,p.lat,p.alt,p.heading,p.pitch,p.roll);p.scale=Geoworld.defaultValue(p.scale,1);p.minimumPixelSize=Geoworld.defaultValue(p.minimumPixelSize,10)},finalize:function(){this._super()},addToMap:function(){this._super();
var f=this._parameter,p=null,t=Geoworld.defaultValue(f.sourceType,"gltf");if("gltf"===t||"glb"===t)p=Geoworld.Model.fromGltf(f),p.modelMatrix=this._spatialTransform.modelMatrix;this._primitive=this._coreMap.scene.primitives.add(p)},removeFromMap:function(){this._super();null!==this._primitive&&this._coreMap.scene.primitives.remove(this._primitive)},toJSON:function(){var f=this;return new Promise(function(p,t){Geoworld.when.all([f._primitive.readyPromise]).then(function(t){t=k.export(f);console.log("modelObj",
t);p(t)})})}});Object.defineProperties(q.prototype,{entity:{get:function(){return this._primitive},set:function(f){this._primitive=f}},lon:{get:function(){return this._spatialTransform.longitude},set:function(f){this._spatialTransform.longitude=f}},lat:{get:function(){return this._spatialTransform.latitude},set:function(f){this._spatialTransform.latitude=f}},alt:{get:function(){return this._spatialTransform.altitude},set:function(f){this._spatialTransform.altitude=f}},heading:{get:function(){return this._spatialTransform.heading},
set:function(f){this._spatialTransform.heading=f}},pitch:{get:function(){return this._spatialTransform.pitch},set:function(f){this._spatialTransform.pitch=f}},roll:{get:function(){return this._spatialTransform.roll},set:function(f){this._spatialTransform.roll=f}},parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==this._primitive?this._primitive.show:!1},set:function(f){null!==this._primitive&&(this._primitive.show=f)}},sourceType:{get:function(){return null!==this._parameter?
this._parameter.sourceType:!1}},dataUrl:{get:function(){return null!==this._parameter?this._parameter.url:!1}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}}});return q});
define("VideoProjection/GwPerspectiveVideoProjection.js",["../Parser/GwExportObject.js"],function(v){function k(k){this.mEarthCtrl=k;this.coreMap=k.coreMap;this._parameter=this.videoProjection=null;this._showMesh=!1;this._auxMeshArray=[];this._highlightState=0;this._colorStyle=[new Geoworld.Color(0.3,1,0.3),Geoworld.Color.YELLOW];this._rtti="GwVideoProjection"}Object.defineProperties(k.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==this.videoProjection?
this.videoProjection.enabled:!1},set:function(k){null!==this.videoProjection&&(this.videoProjection.enabled=k)}},showMesh:{get:function(){return this._showMesh},set:function(k){this._showMesh=k;this.updateAuxMesh()}},highlightState:{get:function(){return this._highlightState},set:function(k){this._highlightState=k;this.updateAuxMesh()}}});k.prototype.setParameter=function(k){if(Geoworld.defined(k)&&(Geoworld.defined(k.lon)||Geoworld.defined(k.lat)||Geoworld.defined(k.height)||Geoworld.defined(k.heading)||
Geoworld.defined(k.pitch)||Geoworld.defined(k.roll)||Geoworld.defined(k.near)||Geoworld.defined(k.far)||Geoworld.defined(k.aspect))){var f=this._parameter,p;for(p in k)k.hasOwnProperty(p)&&Geoworld.defined(f[p])&&(f[p]=k[p]);k=this.videoProjection._lightCamera;k.setView({destination:Geoworld.Cartesian3.fromDegrees(f.lon,f.lat,f.height),orientation:{heading:Geoworld.Math.toRadians(f.heading),pitch:Geoworld.Math.toRadians(f.pitch),roll:Geoworld.Math.toRadians(f.roll)}});k.frustum.fov=f.fov/180*Math.PI;
k.frustum.near=f.near||1;k.frustum.far=f.far||1E5;k.frustum.aspectRatio=f.aspect||1;this.updateAuxMesh()}};k.prototype.initialize=function(k){k=this._parameter=k;var f=new Geoworld.Camera(this.coreMap.scene);k.fov=k.fov||60;f.setView({destination:Geoworld.Cartesian3.fromDegrees(k.lon,k.lat,k.height),orientation:{heading:Geoworld.Math.toRadians(k.heading),pitch:Geoworld.Math.toRadians(k.pitch),roll:Geoworld.Math.toRadians(k.roll)}});f.frustum.fov=k.fov/180*Math.PI;f.frustum.near=k.near||1;f.frustum.far=
k.far||1E5;f.frustum.aspectRatio=k.aspect||1;f=k.useDepth?new Geoworld.PerspectiveProjectionMapWithDepth({name:k.name,matchMaterials:k.matchMaterials,context:this.coreMap.scene.context,lightCamera:f,enabled:!0===k.show,isPointLight:!1,cascadesEnabled:!1,numberOfCascades:1,frustum:{fov:k.fov/180*Math.PI,near:k.near||1,far:k.far||1E5,aspectRatio:k.aspect||1},depthBias:k.depthBias,videoFrameInterval:k.videoFrameInterval,playVideo:k.playVideo,opacity:k.opacity,calibrateParam:k.calibrateParam,maxDiffAngle:k.maxDiffAngle/
180*Math.PI,useDepth:k.useDepth}):new Geoworld.PerspectiveProjectionMap({name:k.name,matchMaterials:k.matchMaterials,context:this.coreMap.scene.context,lightCamera:f,enabled:!0===k.show,isPointLight:!1,cascadesEnabled:!1,numberOfCascades:1,frustum:{fov:k.fov/180*Math.PI,near:k.near||1,far:k.far||1E5,aspectRatio:k.aspect||1},depthBias:k.depthBias,videoFrameInterval:k.videoFrameInterval,playVideo:k.playVideo,opacity:k.opacity,calibrateParam:k.calibrateParam,maxDiffAngle:k.maxDiffAngle/180*Math.PI,useDepth:!1});
f.castTexture=k.castTexture;this.videoProjection=f;this._showMesh=k.showMesh;!0===k.addToMap&&this.addToMap()};new Geoworld.Quaternion;k.prototype.updateAuxMesh=function(){if(0<this._auxMeshArray.length){for(var k=0;k<this._auxMeshArray.length;k++)this.mEarthCtrl.coreMap.scene.primitives.remove(this._auxMeshArray[k]);this._auxMeshArray=[]}k=Geoworld.ShadowMode;if(!0===this._showMesh){var f=this._colorStyle[this._highlightState],p=this.parameter,t=Geoworld.Cartesian3.fromDegrees(p.lon,p.lat,p.height),
w={heading:Geoworld.Math.toRadians(p.heading+90),pitch:Geoworld.Math.toRadians(90-p.pitch),roll:Geoworld.Math.toRadians(p.roll)},w=Geoworld.Transforms.headingPitchRollQuaternion(t,w),x=Geoworld.Quaternion.fromAxisAngle(this.videoProjection._lightCamera.direction,Geoworld.Math.toRadians(90),x);Geoworld.Quaternion.multiply(x,w,w);x=new Geoworld.GeometryInstance({geometry:new Geoworld.FrustumGeometry({frustum:this.videoProjection._lightCamera.frustum,origin:t,orientation:w,vertexFormat:Geoworld.VertexFormat.ALL}),
id:"ellipsoid",attributes:{color:Geoworld.ColorGeometryInstanceAttribute.fromColor(f.withAlpha(0.1))}});x=new Geoworld.Primitive({shadows:k.DISABLED,geometryInstances:x,appearance:new Geoworld.PerInstanceColorAppearance});x._receiveShadow;this.mEarthCtrl.coreMap.scene.primitives.add(x);this._auxMeshArray.push(x);t=new Geoworld.GeometryInstance({geometry:new Geoworld.FrustumOutlineGeometry({frustum:this.videoProjection._lightCamera.frustum,origin:t,orientation:w,vertexFormat:Geoworld.VertexFormat.ALL}),
id:"outlines",shadows:k.DISABLED,attributes:{color:Geoworld.ColorGeometryInstanceAttribute.fromColor(f.withAlpha(0.8))}});t=new Geoworld.Primitive({geometryInstances:t,appearance:new Geoworld.PerInstanceColorAppearance({translucent:!0,flat:!0}),shadows:k.DISABLED,asynchronous:!1});this.mEarthCtrl.coreMap.scene.primitives.add(t);this._auxMeshArray.push(t);k=new Geoworld.GeometryInstance({geometry:new Geoworld.EllipsoidGeometry({radii:new Geoworld.Cartesian3(0.1,0.1,0.1),vertexFormat:Geoworld.VertexFormat.POSITION_AND_NORMAL}),
modelMatrix:Geoworld.Matrix4.multiplyByTranslation(Geoworld.Transforms.eastNorthUpToFixedFrame(Geoworld.Cartesian3.fromDegrees(p.lon,p.lat,p.height)),new Geoworld.Cartesian3(0,0,0),new Geoworld.Matrix4),id:"ellipsoid",shadows:k.DISABLED,attributes:{color:Geoworld.ColorGeometryInstanceAttribute.fromColor(f.withAlpha(0.5))}});k=new Geoworld.Primitive({geometryInstances:k,appearance:new Geoworld.PerInstanceColorAppearance});this.mEarthCtrl.coreMap.scene.primitives.add(k);this._auxMeshArray.push(k)}};
k.prototype.addToMap=function(){null!==this.videoProjection&&(this.mEarthCtrl.textureProjectionMapList.push(this.videoProjection),this.updateAuxMesh())};k.prototype.setEnable=function(k){null!==this.videoProjection&&(this.videoProjection.enabled=k)};k.prototype.remove=function(){if(null!==this.videoProjection)for(var k=this.mEarthCtrl.textureProjectionMapList,f=0;f<k.length;f++)this.videoProjection===k[f]&&k.splice(f,1);if(0<this._auxMeshArray.length){for(f=0;f<this._auxMeshArray.length;f++)this.mEarthCtrl.coreMap.scene.primitives.remove(this._auxMeshArray[f]);
this._auxMeshArray=[]}};k.prototype.toJSON=function(){return v.export(this)};return k});
define("VideoProjection/GwPanoramaVideoProjection.js",["../Parser/GwExportObject.js"],function(v){function k(k){this.mEarthCtrl=k;this.coreMap=k.coreMap;this.shadowMap=null;this._rtti="GwVideoProjection"}k.prototype.initialize=function(k){var f=new Geoworld.Camera(this.coreMap.scene);f.setView({destination:k.destination,orientation:k.orientation});f.frustum.fov=k.fov||Math.PI/3;f.frustum.near=k.near||1;f.frustum.far=k.far||1E5;f.frustum.aspectRatio=k.aspect||1;f=new Geoworld.ShadowMap({name:k.name,
context:this.coreMap.scene.context,lightCamera:f,enabled:k.enabled||!0,isPointLight:!1,cascadesEnabled:!1,numberOfCascades:1,frustum:{fov:k.fov||Math.PI/3,near:k.near||1,far:k.far||1E5,aspectRatio:k.aspect||1},depthBias:k.depthBias,playVideo:k.playVideo});f.castTexture=k.castTexture;this.shadowMap=f;!0===k.addToMap&&this.addToMap()};k.prototype.addToMap=function(){null!==this.shadowMap&&this.mEarthCtrl.shadowMapList.push(this.shadowMap)};k.prototype.setEnable=function(k){null!==this.shadowMap&&(this.shadowMap.enabled=
k)};k.prototype.remove=function(){if(null!==this.shadowMap)for(var k=this.mEarthCtrl.shadowMapList,f=0;f<k.length;f++)this.shadowMap===k[f]&&k.splice(f,1)};k.prototype.toJSON=function(){return v.export(this)};return k});
define("VideoProjection/GwFisheyeVideoProjection.js",["../Parser/GwExportObject.js"],function(v){function k(k){this.mEarthCtrl=k;this.coreMap=k.coreMap;this._parameter=this.videoProjection=null;this._showMesh=!1;this._auxMesh=null;this._rtti="GwVideoProjection"}Object.defineProperties(k.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==this.videoProjection?this.videoProjection.enabled:!1},set:function(k){null!==this.videoProjection&&(this.videoProjection.enabled=
k)}},showMesh:{get:function(){return this._showMesh},set:function(k){this._showMesh=k;this.updateAuxMesh()}}});k.prototype.setParameter=function(k){if(Geoworld.defined(k)){if(Geoworld.defined(k.lon)||Geoworld.defined(k.lat)||Geoworld.defined(k.height)||Geoworld.defined(k.heading)||Geoworld.defined(k.pitch)||Geoworld.defined(k.roll)||Geoworld.defined(k.near)||Geoworld.defined(k.far)||Geoworld.defined(k.aspect)){var f=this._parameter,p;for(p in k)k.hasOwnProperty(p)&&Geoworld.defined(f[p])&&(f[p]=k[p]);
k=this.videoProjection._lightCamera;k.setView({destination:Geoworld.Cartesian3.fromDegrees(f.lon,f.lat,f.height),orientation:{heading:Geoworld.Math.toRadians(f.heading),pitch:Geoworld.Math.toRadians(f.pitch),roll:Geoworld.Math.toRadians(f.roll)}});k.frustum.fov=170/180*Math.PI;k.frustum.near=f.near||1;k.frustum.far=f.far||1E5;k.frustum.aspectRatio=f.aspect||1}this.updateAuxMesh()}};k.prototype.initialize=function(k){k=this._parameter=k;var f=new Geoworld.Camera(this.coreMap.scene);f.setView({destination:Geoworld.Cartesian3.fromDegrees(k.lon,
k.lat,k.height),orientation:{heading:Geoworld.Math.toRadians(k.heading),pitch:Geoworld.Math.toRadians(k.pitch),roll:Geoworld.Math.toRadians(k.roll)}});f.frustum.fov=170/180*Math.PI;f.frustum.near=k.near||1;f.frustum.far=k.far||1E5;f.frustum.aspectRatio=k.aspect||1;f=new Geoworld.FisheyeProjectionMap({name:k.name,matchMaterials:k.matchMaterials,context:this.coreMap.scene.context,lightCamera:f,enabled:k.enabled||!0,isPointLight:!1,cascadesEnabled:!1,numberOfCascades:1,frustum:{fov:170/180*Math.PI,near:k.near||
1,far:k.far||1E5,aspectRatio:k.aspect||1},depthBias:k.depthBias,videoFrameInterval:k.videoFrameInterval,playVideo:k.playVideo,opacity:k.opacity,maxDiffAngle:k.maxDiffAngle});f.castTexture=k.castTexture;this.videoProjection=f;this._showMesh=k.showMesh;!0===k.addToMap&&this.addToMap()};k.prototype.updateAuxMesh=function(){this._auxMesh&&(this.mEarthCtrl.factory.removeElement(this._auxMesh),this._auxMesh=null);if(!0===this._showMesh){var k=this.parameter,f=k.far||2;this._auxMesh=this.mEarthCtrl.factory.createElement({name:"sphere1",
type:"ellipsoid",position:Geoworld.Cartesian3.fromDegrees(k.lon,k.lat,k.height),parameters:{radii:new Geoworld.Cartesian3(f,f,f),material:Geoworld.Color.RED.withAlpha(0.1),outline:!0,outlineColor:Geoworld.Color.GREEN}})}};k.prototype.addToMap=function(){null!==this.videoProjection&&(this.mEarthCtrl.textureProjectionMapList.push(this.videoProjection),this.updateAuxMesh())};k.prototype.setEnable=function(k){null!==this.videoProjection&&(this.videoProjection.enabled=k)};k.prototype.remove=function(){if(null!==
this.videoProjection)for(var k=this.mEarthCtrl.textureProjectionMapList,f=0;f<k.length;f++)this.videoProjection===k[f]&&k.splice(f,1)};k.prototype.toJSON=function(){return v.export(this)};return k});
define("GwAnimationController.js",["./Core/GwEventHandler.js"],function(v){var k=function(){this.timer=null;this.interval=0.05;this.isPause=!1;this.callbackList=new v("callback")};k.prototype.init=function(k){this.interval=k};k.prototype.fini=function(){this.stop()};k.prototype.start=function(){var k=this;k.timer=window.setInterval(function(){!1===k.isPause&&k.callbackList._notifyEvent(this,0)},1E3*this.interval)};k.prototype.stop=function(){this.timer&&(window.clearInterval(this.timer),null==this.timer)};
k.prototype.setPause=function(k){this.isPause=k};k.prototype.addListener=function(k){this.callbackList._addEventHandler(this,k)};k.prototype.clearListeners=function(){this.callbackList._clearEventHandler()};return k});
define("GwTrack.js",["./GwAnimationController.js"],function(v){function k(k){this.mEarthCtrl=k;this.coreMap=k.coreMap;this.trackInfos=[];this.timer=null;this.animationController=new v;this.currIndex=-1;this.startTime=0;this.currentTrackInfo=null}k.prototype.initialize=function(k){for(var f=0,p=this,t=0;t<k.stations.length;t++){var w=k.stations[t];"LOOKAT"===w.class&&(w.timeStamp=f,f+=w.stopTime,p.trackInfos.push(w))}p.animationController.addListener(function(f){f=(new Date).getTime()-p.startTime;
var k=p.trackInfos;if(0===k.length)f=null;else{for(var t=null,q=0;q<k.length;q++)if(k[q].timeStamp<f)t=k[q];else break;f=t}f!==p.currentTrackInfo&&(k=p.mEarthCtrl,t=f,"LOOKAT"===t.class&&(void 0===t.duration&&(t.duration=4E3),Geoworld.defined(t.position)||(t.position=Geoworld.Cartesian3.fromDegrees(t.lon,t.lat,t.alt)),Geoworld.defined(t.orientation)||(t.orientation={heading:Geoworld.Math.toRadians(t.heading),pitch:Geoworld.Math.toRadians(t.pitch),roll:Geoworld.Math.toRadians(t.roll)}),k.coreMap.camera.flyTo({destination:t.position,
orientation:t.orientation,duration:t.duration/1E3})),p.currentTrackInfo=f)})};k.prototype.finalize=function(){this.animationController.finalize();this.currentTrackInfo=null};k.prototype.play=function(){this.currentTrackInfo=null;this.startTime=(new Date).getTime();this.animationController.start()};k.prototype.stop=function(){this.animationController.stop();this.currentTrackInfo=null};return k});
define("Effects/GwFire.js",["../Scene/GwSpatialObject.js","../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwFire";this._primitive=this._parameter=null},initialize:function(f,p){this._super(f);this._parameter=p;this._spatialTransform.createFromWgs84(p.lon,p.lat,p.alt,p.heading,p.pitch,p.roll)},finalize:function(){this._super()},addToMap:function(){this._super();var f=this._parameter,p=this._coreMap,k=Geoworld.defaultValue(f.particleSize,30);
this._primitive=p.scene.primitives.add(new Geoworld.ParticleSystem({image:Geoworld.defaultValue(f.image,GEOWORLD_BASE_URL+"./Assets/Images/fire.png"),startColor:Geoworld.defaultValue(f.startColor,Geoworld.Color.RED.withAlpha(0.7)),endColor:Geoworld.defaultValue(f.endColor,Geoworld.Color.YELLOW.withAlpha(0.3)),startScale:Geoworld.defaultValue(f.startScale,1),endScale:Geoworld.defaultValue(f.endScale,4),minimumParticleLife:Geoworld.defaultValue(f.minimumParticleLife,1),maximumParticleLife:Geoworld.defaultValue(f.maximumParticleLife,
6),minimumSpeed:Geoworld.defaultValue(f.minimumSpeed,5),maximumSpeed:Geoworld.defaultValue(f.maximumSpeed,10),imageSize:new Geoworld.Cartesian2(k,k),emissionRate:Geoworld.defaultValue(f.emissionRate,5),bursts:[],lifetime:Geoworld.defaultValue(f.lifeTime,16),emitter:new Geoworld.ConeEmitter(Geoworld.Math.toRadians(30)),modelMatrix:this._spatialTransform.modelMatrix,emitterModelMatrix:function(){var f=Geoworld.HeadingPitchRoll.fromDegrees(0,0,0),p=new Geoworld.TranslationRotationScale;p.translation=
Geoworld.Cartesian3.fromElements(2.5,4,1);p.rotation=Geoworld.Quaternion.fromHeadingPitchRoll(f);return Geoworld.Matrix4.fromTranslationRotationScale(p)}()}))},removeFromMap:function(){this._super();null!==this._primitive&&this._coreMap.scene.primitives.remove(this._primitive)},toJSON:function(){return k.export(this)}});Object.defineProperties(q.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==this._primitive?this._primitive.show:!1},set:function(f){null!==
this._primitive&&(this._primitive.show=f)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}}});return q});
define("Effects/GwSmoke.js",["../Scene/GwSpatialObject.js","../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwSmoke";this._primitive=this._parameter=null},initialize:function(f,p){this._super(f);this._parameter=p;this._spatialTransform.createFromWgs84(p.lon,p.lat,p.alt,p.heading,p.pitch,p.roll)},finalize:function(){this._super()},addToMap:function(){this._super();var f=this._parameter,p=this._coreMap,k=Geoworld.defaultValue(f.particleSize,
30);this._primitive=p.scene.primitives.add(new Geoworld.ParticleSystem({image:Geoworld.defaultValue(f.image,GEOWORLD_BASE_URL+"./Assets/Images/smoke.png"),startColor:Geoworld.defaultValue(f.startColor,Geoworld.Color.fromRgba(3425907507)),endColor:Geoworld.defaultValue(f.endColor,Geoworld.Color.fromRgba(1154272460)),startScale:Geoworld.defaultValue(f.startScale,1),endScale:Geoworld.defaultValue(f.endScale,4),minimumParticleLife:Geoworld.defaultValue(f.minimumParticleLife,1),maximumParticleLife:Geoworld.defaultValue(f.maximumParticleLife,
6),minimumSpeed:Geoworld.defaultValue(f.minimumSpeed,5),maximumSpeed:Geoworld.defaultValue(f.maximumSpeed,20),imageSize:new Geoworld.Cartesian2(k,k),emissionRate:Geoworld.defaultValue(f.emissionRate,10),bursts:[],lifetime:Geoworld.defaultValue(f.lifeTime,16),emitter:new Geoworld.ConeEmitter(Geoworld.Math.toRadians(30)),modelMatrix:this._spatialTransform.modelMatrix,emitterModelMatrix:function(){var f=Geoworld.HeadingPitchRoll.fromDegrees(0,0,0),p=new Geoworld.TranslationRotationScale;p.translation=
Geoworld.Cartesian3.fromElements(2.5,4,1);p.rotation=Geoworld.Quaternion.fromHeadingPitchRoll(f);return Geoworld.Matrix4.fromTranslationRotationScale(p)}()}))},removeFromMap:function(){this._super();null!==this._primitive&&this._coreMap.scene.primitives.remove(this._primitive)},toJSON:function(){return k.export(this)}});Object.defineProperties(q.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==this._primitive?this._primitive.show:!1},set:function(f){null!==
this._primitive&&(this._primitive.show=f)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}}});return q});
define("Effects/GwExplosion.js",["../Scene/GwSpatialObject.js","../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwExplosion";this._primitive=this._parameter=null},initialize:function(f,p){this._super(f);this._parameter=p;this._spatialTransform.createFromWgs84(p.lon,p.lat,p.alt,p.heading,p.pitch,p.roll)},finalize:function(){this._super()},addToMap:function(){this._super();for(var f=this._parameter,p=this._coreMap,k=this._spatialTransform.modelMatrix,
q=new Geoworld.Cartesian3(0,0,0),x=new Geoworld.Cartesian2(30,30),A=new Geoworld.Matrix4,p=this._coreMap,v=[],z=0;3>z;++z)v.push(new Geoworld.ParticleBurst({time:10*Geoworld.Math.nextRandomNumber(),minimum:400,maximum:400}));var z=new Geoworld.Cartesian3(0,0,0),C=Geoworld.Color.WHITE.withAlpha(0.7);this._primitive=function(v,D,z){v=Geoworld.Cartesian3.add(q,v,new Geoworld.Cartesian3);v=Geoworld.Matrix4.fromTranslation(v,A);var C=Geoworld.Matrix4.multiply(k,v,new Geoworld.Matrix4),H=Geoworld.Matrix4.inverseTransformation(C,
C),J=Geoworld.Math.randomBetween(30,100),L=new Geoworld.Cartesian3,C=(J-30)/70*0.7+0.3;return p.scene.primitives.add(new Geoworld.ParticleSystem({image:Geoworld.defaultValue(f.image,GEOWORLD_BASE_URL+"./Assets/Images/fire.png"),startColor:D,endColor:D.withAlpha(0),particleLife:C,speed:100,imageSize:x,emissionRate:0,emitter:new Geoworld.SphereEmitter(0.1),bursts:z,lifetime:10,updateCallback:function(f){var p=Geoworld.Matrix4.multiplyByPoint(H,f.position,L);Geoworld.Cartesian3.magnitudeSquared(p)>=
J*J&&Geoworld.Cartesian3.clone(Geoworld.Cartesian3.ZERO,f.velocity)},modelMatrix:k,emitterModelMatrix:v}))}(z,C,v)},removeFromMap:function(){this._super();null!==this._primitive&&this._coreMap.scene.primitives.remove(this._primitive)},toJSON:function(){return k.export(this)}});Object.defineProperties(q.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==this._primitive?this._primitive.show:!1},set:function(f){null!==this._primitive&&(this._primitive.show=
f)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}}});return q});
define("Effects/GwFireworks.js",["../Scene/GwSpatialObject.js","../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwFireworks";this._parameter=null;this._primitives=[]},initialize:function(f,p){this._super(f);this._parameter=p;this._spatialTransform.createFromWgs84(p.lon,p.lat,p.alt,p.heading,p.pitch,p.roll)},finalize:function(){this._super()},addToMap:function(){function f(){if(!Geoworld.defined(v)){v=document.createElement("canvas");v.width=
20;v.height=20;var f=v.getContext("2d");f.beginPath();f.arc(8,8,8,0,Geoworld.Math.TWO_PI,!0);f.closePath();f.fillStyle="rgb(255, 255, 255)";f.fill()}return v}function p(p,q,w){p=Geoworld.Cartesian3.add(A,p,new Geoworld.Cartesian3);p=Geoworld.Matrix4.fromTranslation(p,G);var v=Geoworld.Matrix4.multiply(x,p,new Geoworld.Matrix4),D=Geoworld.Matrix4.inverseTransformation(v,v),J=Geoworld.Math.randomBetween(z,C),H=new Geoworld.Cartesian3,v=(J-z)/(C-z)*0.7+0.3;q=k.scene.primitives.add(new Geoworld.ParticleSystem({image:f(),
startColor:q,endColor:q.withAlpha(0),particleLife:v,speed:100,imageSize:B,emissionRate:0,emitter:new Geoworld.SphereEmitter(0.1),bursts:w,lifetime:E,updateCallback:function(f){var p=Geoworld.Matrix4.multiplyByPoint(D,f.position,H);Geoworld.Cartesian3.magnitudeSquared(p)>=J*J&&Geoworld.Cartesian3.clone(Geoworld.Cartesian3.ZERO,f.velocity)},modelMatrix:x,emitterModelMatrix:p}));F._primitives.push(q)}this._super();var k=this._coreMap,q=Geoworld.defaultValue(this._parameter.emitHeight,100);Geoworld.Math.setRandomNumberSeed(315);
for(var x=this._spatialTransform.modelMatrix,A=new Geoworld.Cartesian3(0,0,q),v,z=30,C=100,B=new Geoworld.Cartesian2(7,7),E=10,G=new Geoworld.Matrix4,k=this._coreMap,F=this,q=[{minimumRed:0.75,green:0,minimumBlue:0.8,alpha:1},{red:0,minimumGreen:0.75,minimumBlue:0.8,alpha:1},{red:0,green:0,minimumBlue:0.8,alpha:1},{minimumRed:0.75,minimumGreen:0.75,blue:0,alpha:1}],H=0;20>H;++H){for(var J=Geoworld.Math.randomBetween(-100,100),L=Geoworld.Math.randomBetween(-80,100),N=Geoworld.Math.randomBetween(-50,
50),J=new Geoworld.Cartesian3(J,L,N),L=Geoworld.Color.fromRandom(q[H%q.length]),N=[],Q=0;3>Q;++Q)N.push(new Geoworld.ParticleBurst({time:Geoworld.Math.nextRandomNumber()*E,minimum:400,maximum:400}));p(J,L,N)}},removeFromMap:function(){this._super();for(var f in this._primitives)this._coreMap.scene.primitives.remove(this._primitives[f]);this._primitives=[]},toJSON:function(){console.log("\u70df\u82b1=========================>>>>>",this);return k.export(this)}});Object.defineProperties(q.prototype,
{parameter:{get:function(){return this._parameter}},emitHeight:{get:function(){return null!==this._parameter?this._parameter.emitHeight:0},set:function(f){null!==this._parameter&&(this._parameter.emitHeight=f)}},show:{get:function(){return 0<this._primitives.length?this._primitives[0].show:!1},set:function(f){for(var p in this._primitives)this._primitives[p].show=f}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=
f)}}});return q});
define("Effects/GwHeatMap.js",[],function(){function v(f,p,t){if(!p)return null;t||(t={});this._earthCtrl=f;this._options=t;this._id=k._getID();this._options.gradient=this._options.gradient?this._options.gradient:k.defaults.gradient;this._options.maxOpacity=this._options.maxOpacity?this._options.maxOpacity:k.defaults.maxOpacity;this._options.minOpacity=this._options.minOpacity?this._options.minOpacity:k.defaults.minOpacity;this._options.blur=this._options.blur?this._options.blur:k.defaults.blur;this._mbounds=
k.wgs84ToMercatorBB(p);this._setWidthAndHeight(this._mbounds);this._options.radius=Math.round(this._options.radius?this._options.radius:this.width>this.height?this.width/k.defaults.radiusFactor:this.height/k.defaults.radiusFactor);this._spacing=this._options.radius*k.defaults.spacingFactor;this._xoffset=this._mbounds.west;this._yoffset=this._mbounds.south;this.width=Math.round(this.width+2*this._spacing);this.height=Math.round(this.height+2*this._spacing);this._mbounds.west-=this._spacing*this._factor;
this._mbounds.east+=this._spacing*this._factor;this._mbounds.south-=this._spacing*this._factor;this._mbounds.north+=this._spacing*this._factor;this.bounds=k.mercatorToWgs84BB(this._mbounds);this._rectangle=Geoworld.Rectangle.fromDegrees(this.bounds.west,this.bounds.south,this.bounds.east,this.bounds.north);this._container=k._getContainer(this.width,this.height,this._id);this._options.container=this._container;this._heatmap=h337.create(this._options);this._container.children[0].setAttribute("id",this._id+
"-hm");this._mode3D=this._options.mode3D?this._options.mode3D:k.defaults.mode3D;this._scaleHeight=this._options.scaleHeight?this._options.scaleHeight:k.defaults.scaleHeight;0>=this._scaleHeight&&(this._scaleHeight=1);this._granularity=this._options.granularity?this._options.granularity:Geoworld.Math.RADIANS_PER_DEGREE;this._useEntitiesIfAvailable=void 0!==this._options.useEntitiesIfAvailable?this._options.useEntitiesIfAvailable:k.defaults.useEntitiesIfAvailable;this._lineCount=Geoworld.defaultValue(this._options.lineCount,
new Geoworld.Cartesian2(1E3,1E3));this._lineWidth=Geoworld.defaultValue(this._options.lineWidth,1);console.info(this._lineCount)}var k={defaults:{useEntitiesIfAvailable:!0,minCanvasSize:700,maxCanvasSize:2E3,radiusFactor:60,spacingFactor:1.5,maxOpacity:0.8,minOpacity:0.1,blur:0.85,gradient:{0:"#00AEFF",".58":"#A8FF00",".70":"#FFF000",".85":"#FE9B1A",1:"#FE411B"},mode3D:!1,scaleHeight:1},create:function(f,p,k){return new v(f,p,k)},_getContainer:function(f,p,k){var q=document.createElement("div");k&&
q.setAttribute("id",k);q.setAttribute("style","width: "+f+"px; height: "+p+"px; margin: 0px; display: none;");document.body.appendChild(q);return q},_getImageryProvider:function(f){var p=f._heatmap.getDataURL(),p=new Geoworld.SingleTileImageryProvider({url:p,rectangle:f._rectangle});p._tilingScheme=new Geoworld.WebMercatorTilingScheme({rectangleSouthwestInMeters:new Geoworld.Cartesian2(f._mbounds.west,f._mbounds.south),rectangleNortheastInMeters:new Geoworld.Cartesian2(f._mbounds.east,f._mbounds.north)});
return p},_getID:function(f){for(var p="",k=0;k<(f?f:8);k++)p+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Geoworld.Math.nextRandomNumber()));return p}},q=new Geoworld.WebMercatorProjection;k.wgs84ToMercator=function(f){f=q.project(Geoworld.Cartographic.fromDegrees(f.x,f.y));return{x:f.x,y:f.y}};k.wgs84ToMercatorBB=function(f){var p=q.project(Geoworld.Cartographic.fromDegrees(f.west,f.south));f=q.project(Geoworld.Cartographic.fromDegrees(f.east,f.north));
return{north:f.y,east:f.x,south:p.y,west:p.x}};k.mercatorToWgs84=function(f){f=q.unproject(new Geoworld.Cartesian3(f.x,f.y));return{x:f.longitude,y:f.latitude}};k.mercatorToWgs84BB=function(f){var p=q.unproject(new Geoworld.Cartesian3(f.west,f.south));f=q.unproject(new Geoworld.Cartesian3(f.east,f.north));return{north:this.rad2deg(f.latitude),east:this.rad2deg(f.longitude),south:this.rad2deg(p.latitude),west:this.rad2deg(p.longitude)}};k.deg2rad=function(f){return Math.PI/180*f};k.rad2deg=function(f){return f/
(Math.PI/180)};v.prototype.wgs84PointToHeatmapPoint=function(f){return this.mercatorPointToHeatmapPoint(k.wgs84ToMercator(f))};v.prototype.mercatorPointToHeatmapPoint=function(f){var p={};p.x=Math.round((f.x-this._xoffset)/this._factor+this._spacing);p.y=Math.round((f.y-this._yoffset)/this._factor+this._spacing);p.y=this.height-p.y;return p};v.prototype.getValueAt=function(f,p){var k=this.wgs84PointToHeatmapPoint({x:f,y:p});return this._heatmap.getValueAt({x:k.x,y:k.y})};v.prototype.setMode3D=function(f){f!==
this._mode3D&&(this._mode3D=f,this.updateLayer())};v.prototype._setWidthAndHeight=function(f){this.width=0<f.east&&0>f.west?f.east+Math.abs(f.west):Math.abs(f.east-f.west);this.height=0<f.north&&0>f.south?f.north+Math.abs(f.south):Math.abs(f.north-f.south);this._factor=1;this.width>this.height&&this.width>k.defaults.maxCanvasSize?(this._factor=this.width/k.defaults.maxCanvasSize,this.height/this._factor<k.defaults.minCanvasSize&&(this._factor=this.height/k.defaults.minCanvasSize)):this.height>this.width&&
this.height>k.defaults.maxCanvasSize?(this._factor=this.height/k.defaults.maxCanvasSize,this.width/this._factor<k.defaults.minCanvasSize&&(this._factor=this.width/k.defaults.minCanvasSize)):this.width<this.height&&this.width<k.defaults.minCanvasSize?(this._factor=this.width/k.defaults.minCanvasSize,this.height/this._factor>k.defaults.maxCanvasSize&&(this._factor=this.height/k.defaults.maxCanvasSize)):this.height<this.width&&this.height<k.defaults.minCanvasSize&&(this._factor=this.height/k.defaults.minCanvasSize,
this.width/this._factor>k.defaults.maxCanvasSize&&(this._factor=this.width/k.defaults.maxCanvasSize));this.width/=this._factor;this.height/=this._factor};v.prototype.setData=function(f,p,k){return k&&0<k.length&&null!==f&&!1!==f&&null!==p&&!1!==p?(this._heatmap.setData({min:f,max:p,data:k}),this.updateLayer(),!0):!1};v.prototype.addWGS84Data=function(f){if(f){f=Array.isArray(f)?f:[f];for(var p=[],k=0;k<f.length;k++){var q=f[k],x=this.wgs84PointToHeatmapPoint(q);if(q.value||0===q.value)x.value=q.value;
p.push(x)}this._heatmap.addData(p);this.updateLayer();return!0}return!1};v.prototype.setWGS84Data=function(f,p,k){if(k&&0<k.length&&null!==f&&!1!==f&&null!==p&&!1!==p){for(var q=[],x=0;x<k.length;x++){var A=k[x],v=this.wgs84PointToHeatmapPoint(A);if(A.value||0===A.value)v.value=A.value;q.push(v)}return this.setData(f,p,q)}return!1};v.prototype.show=function(f){this._layer&&(this._layer.show=f)};v.prototype.remove=function(){k.defaults.useEntitiesIfAvailable&&this._earthCtrl.entities?this._layer&&
this._earthCtrl.primitives.remove(this._layer):this._layer&&this._earthCtrl.coreMap.scene.imageryLayers.remove(this._layer)};Object.defineProperties(v.prototype,{readyPromise:{get:function(){return this._layer.readyPromise}}});v.prototype.updateLayer=function(){if(this._useEntitiesIfAvailable&&this._earthCtrl.entities){this._layer&&this._earthCtrl.primitives.remove(this._layer);var f=this._rectangle,f=Geoworld.Cartesian3.fromRadiansArray([f.west,f.north,f.east,f.north,f.east,f.south,f.west,f.south]),
p=new Geoworld.Material({fabric:{type:"HeatMapMaterial",materials:{imageMaterial:{type:"Image",uniforms:{image:this._heatmap._renderer.canvas}},gridMaterial:{type:"Grid"}},components:{emission:" imageMaterial.diffuse * gridMaterial.diffuse",diffuse:" imageMaterial.diffuse * gridMaterial.diffuse",alpha:"imageMaterial.alpha * gridMaterial.alpha*2.0"}},translucent:!1});p.materials.gridMaterial.uniforms.color=Geoworld.Color.WHITE;p.materials.gridMaterial.uniforms.cellAlpha=0.1;p.materials.gridMaterial.uniforms.lineCount=
this._lineCount;p.materials.gridMaterial.uniforms.lineThickness=new Geoworld.Cartesian2(this._lineWidth,this._lineWidth);p.update(this._earthCtrl.coreMap.scene.context);this._layer=this._earthCtrl.primitives.add(new Geoworld.Primitive({geometryInstances:new Geoworld.GeometryInstance({geometry:new Geoworld.PolygonGeometry({polygonHierarchy:new Geoworld.PolygonHierarchy(f),granularity:this._granularity})}),appearance:new Geoworld.MaterialAppearance({material:p}),heatMap:this._mode3D?this:void 0,scaleHeight:this._scaleHeight}))}else this._layer&&
this._earthCtrl.coreMap.scene.imageryLayers.remove(this._layer),this._layer=this._earthCtrl.coreMap.scene.imageryLayers.addImageryProvider(k._getImageryProvider(this))};return k});
define("Effects/GwRadarScan.js",["../Parser/GwExportObject.js"],function(v){function k(p,k){this.mEarthCtrl=p;this.coreMap=p.coreMap;this._color=Geoworld.defaultValue(k.color,Geoworld.Color(1,0,0,1));this._maxRadius=Geoworld.defaultValue(k.maxRadius,1500);this._duration=Geoworld.defaultValue(k.duration,4E3);this._lon=Geoworld.defaultValue(k.lon,121);this._lat=Geoworld.defaultValue(k.lat,31);this._height=Geoworld.defaultValue(k.height,500);this._cartoCenter=Geoworld.Cartographic.fromDegrees(this._lon,
this._lat);this._pps=null;this._rtti="GwRadarScan";this._parameter=k;this.toJSON=function(){return v.export(this)};this.removeFromMap=function(){f(this)}}function q(f){if(!Geoworld.defined(f._pps)){var k=f._cartoCenter,q=Geoworld.Cartographic.toCartesian(k),x=new Geoworld.Cartesian4(q.x,q.y,q.z,1),q=new Geoworld.Cartographic(k.longitude,k.latitude,k.height+f._height),q=Geoworld.Cartographic.toCartesian(q),A=new Geoworld.Cartesian4(q.x,q.y,q.z,1),k=new Geoworld.Cartographic(k.longitude+Geoworld.Math.toRadians(0.001),
k.latitude,k.height),k=Geoworld.Cartographic.toCartesian(k),v=new Geoworld.Cartesian4(k.x,k.y,k.z,1),z=new Geoworld.Quaternion,C=new Geoworld.Matrix3,B=(new Date).getTime(),E=new Geoworld.Cartesian4,G=new Geoworld.Cartesian4,F=new Geoworld.Cartesian4,H=new Geoworld.Cartesian3,J=new Geoworld.Cartesian3,L=f.mEarthCtrl.coreMap.scene.camera;f._pps=new Geoworld.PostProcessStage({fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nvarying vec2 v_textureCoordinates;\nuniform vec4 u_scanCenterEC;\nuniform vec3 u_scanPlaneNormalEC;\nuniform vec3 u_scanLineNormalEC;\nuniform float u_radius;\nuniform vec4 u_scanColor;\nvec4 toEye(in vec2 uv, in float depth)\n {\n vec2 xy = vec2((uv.x * 2.0 - 1.0),(uv.y * 2.0 - 1.0));\n vec4 posInCamera =czm_inverseProjection * vec4(xy, depth, 1.0);\n posInCamera =posInCamera / posInCamera.w;\n return posInCamera;\n }\nbool isPointOnLineRight(in vec3 ptOnLine, in vec3 lineNormal, in vec3 testPt)\n{\nvec3 v01 = testPt - ptOnLine;\nnormalize(v01);\nvec3 temp = cross(v01, lineNormal);\nfloat d = dot(temp, u_scanPlaneNormalEC);\nreturn d > 0.5;\n}\nvec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point)\n{\nvec3 v01 = point -planeOrigin;\nfloat d = dot(planeNormal, v01) ;\nreturn (point - planeNormal * d);\n}\nfloat distancePointToLine(in vec3 ptOnLine, in vec3 lineNormal, in vec3 testPt)\n{\nvec3 tempPt = pointProjectOnPlane(lineNormal, ptOnLine, testPt);\nreturn length(tempPt - ptOnLine);\n}\nfloat getDepth(in vec4 depth)\n{\nfloat z_window = czm_unpackDepth(depth);\nz_window = czm_reverseLogDepth(z_window);\nfloat n_range = czm_depthRange.near;\nfloat f_range = czm_depthRange.far;\nreturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n}\nvoid main()\n{\ngl_FragColor = texture2D(colorTexture, v_textureCoordinates);\nfloat depth = getDepth( texture2D(depthTexture, v_textureCoordinates));\nvec4 viewPos = toEye(v_textureCoordinates, depth);\nvec3 prjOnPlane = pointProjectOnPlane(u_scanPlaneNormalEC.xyz, u_scanCenterEC.xyz, viewPos.xyz);\nfloat dis = length(prjOnPlane.xyz - u_scanCenterEC.xyz);\nfloat twou_radius = u_radius * 2.0;\nif(dis < u_radius)\n{\nvec3 lineEndPt = vec3(u_scanCenterEC.xyz) + u_scanLineNormalEC * u_radius;\nfloat f = 0.0;\nif(isPointOnLineRight(u_scanCenterEC.xyz, u_scanLineNormalEC.xyz, prjOnPlane.xyz))\n{\nfloat dis1= length(prjOnPlane.xyz - lineEndPt);\nf = abs(twou_radius -dis1) / twou_radius;\nf = pow(f, 3.0);\n}\ngl_FragColor = mix(gl_FragColor, u_scanColor, f);\n}\n}\n",
uniforms:{u_scanCenterEC:function(){return Geoworld.Matrix4.multiplyByVector(L._viewMatrix,x,E)},u_scanPlaneNormalEC:function(){var f=Geoworld.Matrix4.multiplyByVector(L._viewMatrix,x,E),p=Geoworld.Matrix4.multiplyByVector(L._viewMatrix,A,G);H.x=p.x-f.x;H.y=p.y-f.y;H.z=p.z-f.z;Geoworld.Cartesian3.normalize(H,H);return H},u_radius:f._maxRadius,u_scanLineNormalEC:function(){var k=Geoworld.Matrix4.multiplyByVector(L._viewMatrix,x,E),t=Geoworld.Matrix4.multiplyByVector(L._viewMatrix,A,G),q=Geoworld.Matrix4.multiplyByVector(L._viewMatrix,
v,F);H.x=t.x-k.x;H.y=t.y-k.y;H.z=t.z-k.z;Geoworld.Cartesian3.normalize(H,H);J.x=q.x-k.x;J.y=q.y-k.y;J.z=q.z-k.z;k=((new Date).getTime()-B)%f._duration/f._duration;Geoworld.Quaternion.fromAxisAngle(H,k*Geoworld.Math.PI*2,z);Geoworld.Matrix3.fromQuaternion(z,C);Geoworld.Matrix3.multiplyByVector(C,J,J);Geoworld.Cartesian3.normalize(J,J);return J},u_scanColor:f._color}});f.mEarthCtrl.coreMap.scene.postProcessStages.add(f._pps)}}function f(f){Geoworld.defined(f._pps)&&(f.mEarthCtrl.coreMap.scene.postProcessStages.remove(f._pps),
f._pps=null)}Object.defineProperties(k.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==this._pps},set:function(p){this.show!==p&&((this._show=this._parameter.show=p)?q(this):f(this))}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}}});return k});
define("Effects/GwCircleScan.js",["../Parser/GwExportObject.js"],function(v){function k(p,k){this.mEarthCtrl=p;this.coreMap=p.coreMap;this._color=Geoworld.defaultValue(k.color,Geoworld.Color(1,0,0,1));this._maxRadius=Geoworld.defaultValue(k.maxRadius,1500);this._duration=Geoworld.defaultValue(k.duration,4E3);this._lon=Geoworld.defaultValue(k.lon,121);this._lat=Geoworld.defaultValue(k.lat,31);this._height=Geoworld.defaultValue(k.height,500);this._cartoCenter=Geoworld.Cartographic.fromDegrees(this._lon,
this._lat);this._pps=null;this._rtti="GwCircleScan";this._parameter=k;this.toJSON=function(){return v.export(this)};this.removeFromMap=function(){f(this)}}function q(f){if(!Geoworld.defined(f._pps)){var k=f._cartoCenter,q=Geoworld.Cartographic.toCartesian(k),x=new Geoworld.Cartesian4(q.x,q.y,q.z,1),k=new Geoworld.Cartographic(k.longitude,k.latitude,k.height+f._height),k=Geoworld.Cartographic.toCartesian(k),A=new Geoworld.Cartesian4(k.x,k.y,k.z,1),v=(new Date).getTime(),z=new Geoworld.Cartesian4,C=
new Geoworld.Cartesian4,B=new Geoworld.Cartesian3,E=f.mEarthCtrl.coreMap.scene.camera;f._pps=new Geoworld.PostProcessStage({fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nvarying vec2 v_textureCoordinates;\nuniform vec4 u_scanCenterEC;\nuniform vec3 u_scanPlaneNormalEC;\nuniform float u_radius;\nuniform vec4 u_scanColor;\nvec4 toEye(in vec2 uv, in float depth)\n {\n vec2 xy = vec2((uv.x * 2.0 - 1.0),(uv.y * 2.0 - 1.0));\n vec4 posInCamera =czm_inverseProjection * vec4(xy, depth, 1.0);\n posInCamera =posInCamera / posInCamera.w;\n return posInCamera;\n }\nvec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point)\n{\nvec3 v01 = point -planeOrigin;\nfloat d = dot(planeNormal, v01) ;\nreturn (point - planeNormal * d);\n}\nfloat getDepth(in vec4 depth)\n{\nfloat z_window = czm_unpackDepth(depth);\nz_window = czm_reverseLogDepth(z_window);\nfloat n_range = czm_depthRange.near;\nfloat f_range = czm_depthRange.far;\nreturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n}\nvoid main()\n{\ngl_FragColor = texture2D(colorTexture, v_textureCoordinates);\nfloat depth = getDepth( texture2D(depthTexture, v_textureCoordinates));\nvec4 viewPos = toEye(v_textureCoordinates, depth);\nvec3 prjOnPlane = pointProjectOnPlane(u_scanPlaneNormalEC.xyz, u_scanCenterEC.xyz, viewPos.xyz);\nfloat dis = length(prjOnPlane.xyz - u_scanCenterEC.xyz);\nif(dis < u_radius)\n{\nfloat f =  dis/ u_radius;\nf = pow(f, 2.0);\ngl_FragColor = mix(gl_FragColor, u_scanColor, f);\n}\n}\n",
uniforms:{u_scanCenterEC:function(){return Geoworld.Matrix4.multiplyByVector(E._viewMatrix,x,z)},u_scanPlaneNormalEC:function(){var f=Geoworld.Matrix4.multiplyByVector(E._viewMatrix,x,z),p=Geoworld.Matrix4.multiplyByVector(E._viewMatrix,A,C);B.x=p.x-f.x;B.y=p.y-f.y;B.z=p.z-f.z;Geoworld.Cartesian3.normalize(B,B);return B},u_radius:function(){return f._maxRadius*(((new Date).getTime()-v)%f._duration)/f._duration},u_scanColor:f._color}});f.mEarthCtrl.coreMap.scene.postProcessStages.add(f._pps)}}function f(f){Geoworld.defined(f._pps)&&
(f.mEarthCtrl.coreMap.scene.postProcessStages.remove(f._pps),f._pps=null)}Object.defineProperties(k.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==this._pps},set:function(p){if(this.show===p)return!1;(this._parameter.show=p)?q(this):f(this)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}}});return k});
define("Effects/GwUpDownScan.js",[],function(){function v(k,f){this.mEarthCtrl=k;this.coreMap=k.coreMap;this._color=Geoworld.defaultValue(f.color,new Geoworld.Color(1,0,0,1));this._maxRadius=Geoworld.defaultValue(f.maxRadius,15E3);this._duration=Geoworld.defaultValue(f.duration,4E3);this._lon=Geoworld.defaultValue(f.lon,121);this._lat=Geoworld.defaultValue(f.lat,31);this._height=Geoworld.defaultValue(f.height,500);this._cartoCenter=Geoworld.Cartographic.fromDegrees(this._lon,this._lat);this._minHeight=
Geoworld.defaultValue(f.minHeight,10);this._maxHeight=Geoworld.defaultValue(f.maxHeight,200);this._currentHeight=this._minHeight;this._pps=null}function k(k){if(!Geoworld.defined(k._pps)){var f=k._cartoCenter,p=Geoworld.Cartographic.toCartesian(f),t=new Geoworld.Cartesian4(p.x,p.y,p.z,1),f=new Geoworld.Cartographic(f.longitude,f.latitude,f.height+k._height),f=Geoworld.Cartographic.toCartesian(f),w=new Geoworld.Cartesian4(f.x,f.y,f.z,1),x=(new Date).getTime(),A=new Geoworld.Cartesian4,v=new Geoworld.Cartesian4,
z=new Geoworld.Cartesian3,C=k.mEarthCtrl.coreMap.scene.camera;k._pps=new Geoworld.PostProcessStage({fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nvarying vec2 v_textureCoordinates;\nuniform vec4 u_scanCenterEC;\nuniform vec3 u_scanPlaneNormalEC;\nuniform float u_radius;\nuniform vec4 u_scanColor;\nuniform float u_currentHeight;\nvec4 toEye(in vec2 uv, in float depth)\n {\n vec2 xy = vec2((uv.x * 2.0 - 1.0),(uv.y * 2.0 - 1.0));\n vec4 posInCamera =czm_inverseProjection * vec4(xy, depth, 1.0);\n posInCamera =posInCamera / posInCamera.w;\n return posInCamera;\n }\nvec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point)\n{\nvec3 v01 = point -planeOrigin;\nfloat d = dot(planeNormal, v01) ;\nreturn (point - planeNormal * d);\n}\nfloat getDepth(in vec4 depth)\n{\nfloat z_window = czm_unpackDepth(depth);\nz_window = czm_reverseLogDepth(z_window);\nfloat n_range = czm_depthRange.near;\nfloat f_range = czm_depthRange.far;\nreturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n}\nvoid main()\n{\ngl_FragColor = texture2D(colorTexture, v_textureCoordinates);\nfloat depth = getDepth( texture2D(depthTexture, v_textureCoordinates));\nvec4 viewPos = toEye(v_textureCoordinates, depth);\nvec3 prjOnPlane = pointProjectOnPlane(u_scanPlaneNormalEC.xyz, u_scanCenterEC.xyz, viewPos.xyz);\nfloat height_dis = length(prjOnPlane.xyz-viewPos.xyz);\nif(height_dis >= u_currentHeight && height_dis <= (u_currentHeight+1.0))\n{\ngl_FragColor = mix(gl_FragColor, u_scanColor, u_scanColor.a);\n}\n}\n",
uniforms:{u_scanCenterEC:function(){return Geoworld.Matrix4.multiplyByVector(C._viewMatrix,t,A)},u_scanPlaneNormalEC:function(){var f=Geoworld.Matrix4.multiplyByVector(C._viewMatrix,t,A),p=Geoworld.Matrix4.multiplyByVector(C._viewMatrix,w,v);z.x=p.x-f.x;z.y=p.y-f.y;z.z=p.z-f.z;Geoworld.Cartesian3.normalize(z,z);return z},u_radius:function(){return k._maxRadius},u_currentHeight:function(){if(k._currentHeight>=k._maxHeight)k._currentHeight=k._minHeight;else{var f=k._maxHeight-k._minHeight,f=f*(((new Date).getTime()-
x)%k._duration)/k._duration;k._currentHeight=k._minHeight+f}return k._currentHeight},u_scanColor:k._color}});k.mEarthCtrl.coreMap.scene.postProcessStages.add(k._pps)}}Object.defineProperties(v.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==this._pps},set:function(q){!0===q?k(this):Geoworld.defined(this._pps)&&(this.mEarthCtrl.coreMap.scene.postProcessStages.remove(this._pps),this._pps=null)}}});return v});
define("Effects/GwPointLight.js",[],function(){function v(k,f){this.mEarthCtrl=k;this._maxRadius=Geoworld.defaultValue(f.radius,10);this._shininess=Geoworld.defaultValue(f.shininess,5);this._lightColor=Geoworld.defaultValue(f.lightColor,Geoworld.Color.YELLOW);this._lon=Geoworld.defaultValue(f.lon,121);this._lat=Geoworld.defaultValue(f.lat,31);this._height=Geoworld.defaultValue(f.height,500);this._cartoCenter=Geoworld.Cartographic.fromDegrees(this._lon,this._lat);this._lightPosition=Geoworld.Cartographic.fromDegrees(this._lon,
this._lat,this._height);this._pps=null}function k(k){if(!Geoworld.defined(k._pps)){var f=k._cartoCenter,p=Geoworld.Cartographic.toCartesian(f),t=new Geoworld.Cartesian4(p.x,p.y,p.z,1),f=new Geoworld.Cartographic(f.longitude,f.latitude,f.height+k._height),f=Geoworld.Cartographic.toCartesian(f),w=new Geoworld.Cartesian4(f.x,f.y,f.z,1);(new Date).getTime();var x=new Geoworld.Cartesian4,A=new Geoworld.Cartesian4,v=new Geoworld.Cartesian3,z=k.mEarthCtrl.coreMap.scene.camera;k._pps=new Geoworld.PostProcessStage({fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nvarying vec2 v_textureCoordinates;\nuniform vec4 u_scanCenterEC;\nuniform vec3 u_scanPlaneNormalEC;\nuniform float u_radius;\nuniform vec4 u_lightColor;\nuniform float u_shininess;\nuniform mat4 u_cameraMatrix;\nuniform vec3 u_lightWorldPosition;\nuniform vec3 u_viewWorldPosition;\nvec4 toEye(in vec2 uv, in float depth)\n {\n vec2 xy = vec2((uv.x * 2.0 - 1.0),(uv.y * 2.0 - 1.0));\n vec4 posInCamera =czm_inverseProjection * vec4(xy, depth, 1.0);\n posInCamera =posInCamera / posInCamera.w;\n return posInCamera;\n }\nvec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point)\n{\nvec3 v01 = point -planeOrigin;\nfloat d = dot(planeNormal, v01) ;\nreturn (point - planeNormal * d);\n}\nfloat getDepth(in vec4 depth)\n{\nfloat z_window = czm_unpackDepth(depth);\nz_window = czm_reverseLogDepth(z_window);\nfloat n_range = czm_depthRange.near;\nfloat f_range = czm_depthRange.far;\nreturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n}\nvoid main()\n{\ngl_FragColor = texture2D(colorTexture, v_textureCoordinates);\nfloat depth = getDepth( texture2D(depthTexture, v_textureCoordinates));\nvec4 viewPos = toEye(v_textureCoordinates, depth);\nvec3 prjOnPlane = pointProjectOnPlane(u_scanPlaneNormalEC.xyz, u_scanCenterEC.xyz, viewPos.xyz);\nfloat dis = length(prjOnPlane.xyz - u_scanCenterEC.xyz);\nif(dis < u_radius)\n{\nvec3 surfaceWorldPosition = czm_eyeToWindowCoordinates(viewPos);\nvec3 v_surfaceToLight = u_lightWorldPosition - surfaceWorldPosition;\nvec3 v_surfaceToView = normalize( u_viewWorldPosition - surfaceWorldPosition);\nvec3 surfaceToLightDirection = normalize(v_surfaceToLight);\nvec3 surfaceToViewDirection = normalize(v_surfaceToView);\nvec3 halfVector = normalize(surfaceToLightDirection + surfaceToViewDirection);\nfloat light = dot(normal, surfaceToLightDirection);\nfloat specular = 0.0;\nif(light > 0.0) {\nspecular = pow(dot(normal, halfVector), u_shininess);\n}\ngl_FragColor.rgb *=light*u_lightColor;\ngl_FragColor.rgb += specular*u_specularColor;\n\n\n}\n}\n",
uniforms:{u_viewWorldPosition:function(){return z.position},u_lightWorldPosition:function(){return k._lightPosition},u_scanCenterEC:function(){return Geoworld.Matrix4.multiplyByVector(z._viewMatrix,t,x)},u_scanPlaneNormalEC:function(){var f=Geoworld.Matrix4.multiplyByVector(z._viewMatrix,t,x),p=Geoworld.Matrix4.multiplyByVector(z._viewMatrix,w,A);v.x=p.x-f.x;v.y=p.y-f.y;v.z=p.z-f.z;Geoworld.Cartesian3.normalize(v,v);return v},u_radius:function(){return k._maxRadius},u_lightColor:function(){return k._lightColor}}});
k.mEarthCtrl.coreMap.scene.postProcessStages.add(k._pps)}}Object.defineProperties(v.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==this._pps},set:function(q){q?k(this):Geoworld.defined(this._pps)&&(this.mEarthCtrl.coreMap.scene.postProcessStages.remove(this._pps),this._pps=null)}}});return v});
define("Scene/entity/GwBillboard.js",["../GwSpatialObject.js","../../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwBillboard";this._primitive=this._parameter=null},initialize:function(f,p){this._super(f);this._parameter=p;this._spatialTransform.createFromWgs84(p.lon,p.lat,p.alt,p.heading,p.pitch,p.roll)},finalize:function(){this._super()},addToMap:function(){this._super();var f=this._parameter,p={position:Geoworld.Cartesian3.fromDegrees(f.lon,
f.lat,f.alt),name:f.name};f.image=Geoworld.defaultValue(f.image,"");f.width=Geoworld.defaultValue(f.iconWidth,16);f.height=Geoworld.defaultValue(f.iconHeight,16);p.billboard=f;this._primitive=this._earthCtrl.entities.add(p)},removeFromMap:function(){this._super();null!==this._primitive&&this._earthCtrl.entities.remove(this._primitive)},toJSON:function(){return k.export(this)}});Object.defineProperties(q.prototype,{entity:{get:function(){return this._primitive},set:function(f){this._primitive=f}},
parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==this._primitive?this._primitive.show:!1},set:function(f){null!==this._primitive&&(this._primitive.show=f,this._parameter.show=f)}},lon:{get:function(){return null!==this._parameter?this._parameter.lon:!1},set:function(f){null!==this._parameter&&(this._primitive.position=Geoworld.Cartesian3.fromDegrees(f,this._parameter.lat,this._parameter.alt),this._parameter.lon=f)}},lat:{get:function(){return null!==this._parameter?
this._parameter.lat:!1},set:function(f){null!==this._parameter&&(this._primitive.position=Geoworld.Cartesian3.fromDegrees(this._parameter.lon,f,this._parameter.alt),this._parameter.lat=f)}},alt:{get:function(){return null!==this._parameter?this._parameter.alt:!1},set:function(f){null!==this._primitive&&(this._primitive.position=Geoworld.Cartesian3.fromDegrees(this._parameter.lon,this._parameter.lat,f),this._parameter.alt=f)}},image:{get:function(){return null!==this._parameter?this._parameter.image:
!1},set:function(f){null!==this._primitive&&(this._primitive.billboard.image=f,this._parameter.image=f)}},scale:{get:function(){return null!==this._parameter?this._parameter.scale:!1},set:function(f){null!==this._primitive&&(this._primitive.billboard.scale=f,this._parameter.scale=f)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}}});return q});
define("Scene/entity/GwLabel.js",["../GwSpatialObject.js","../../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwLabel";this._primitive=this._parameter=null},initialize:function(f,p){this._super(f);this._parameter=p;this._spatialTransform.createFromWgs84(p.lon,p.lat,p.alt,p.heading,p.pitch,p.roll)},finalize:function(){this._super()},addToMap:function(){this._super();var f=this._parameter,p={position:Geoworld.Cartesian3.fromDegrees(f.lon,f.lat,
f.alt),name:f.name};f.text=Geoworld.defaultValue(f.text,"");f.font=Geoworld.defaultValue(f.font,"12pt monospace");f.style=Geoworld.defaultValue(f.style,Geoworld.LabelStyle.FILL_AND_OUTLINE);f.outlineWidth=Geoworld.defaultValue(f.outlineWidth,2);f.verticalOrigin=Geoworld.defaultValue(f.verticalOrigin,Geoworld.VerticalOrigin.BOTTOM);f.pixelOffset=new Geoworld.Cartesian2(0,-9);p.label=f;this._primitive=this._earthCtrl.entities.add(p)},removeFromMap:function(){this._super();null!==this._primitive&&this._earthCtrl.entities.remove(this._primitive)},
toJSON:function(){return k.export(this)}});Object.defineProperties(q.prototype,{entity:{get:function(){return this._primitive},set:function(f){this._primitive=f}},parameter:{get:function(){return this._parameter}},text:{get:function(){return null!==this._primitive?this._primitive.label.text:!1},set:function(f){null!==this._parameter&&(this._primitive.label.text=f,this._parameter.text=f)}},icon:{get:function(){return null!==this._parameter?this._parameter.icon:""}},font:{get:function(){return null!==
this._parameter?this._parameter.font:!1},set:function(f){null!==this._parameter&&(this._parameter.font=f)}},outlineWidth:{get:function(){return null!==this._parameter?this._parameter.outlineWidth:!1},set:function(f){null!==this._parameter&&(this._parameter.outlineWidth=f)}},verticalOrigin:{get:function(){return null!==this._parameter?this._parameter.verticalOrigin:!1},set:function(f){null!==this._parameter&&(this._parameter.verticalOrigin=f)}},show:{get:function(){return null!==this._primitive?this._primitive.show:
!1},set:function(f){null!==this._primitive&&(this._primitive.show=f,this._parameter.show=f)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}},fillColor:{get:function(){return null!==this._primitive?this._primitive.label.fillColor:!1},set:function(f){null!==this._parameter&&(this._primitive.label.fillColor=f,this._parameter.fillColor=f)}},lon:{get:function(){return null!==this._parameter?this._parameter.lon:
!1},set:function(f){null!==this._primitive&&(this._primitive.position=Geoworld.Cartesian3.fromDegrees(f,this._parameter.lat,this._parameter.alt),this._parameter.lon=f)}},lat:{get:function(){return null!==this._parameter?this._parameter.lat:!1},set:function(f){null!==this._primitive&&(this._primitive.position=Geoworld.Cartesian3.fromDegrees(this._parameter.lon,f,this._parameter.alt),this._parameter.lat=f)}},alt:{get:function(){return null!==this._parameter?this._parameter.alt:!1},set:function(f){null!==
this._primitive&&(this._primitive.position=Geoworld.Cartesian3.fromDegrees(this._parameter.lon,this._parameter.lat,f),this._parameter.alt=f)}}});return q});
define("Scene/entity/GwPolyline.js",["../GwSpatialObject.js","../../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwPolyline";this._primitive=this._parameter=null},initialize:function(f,p){this._super(f);this._parameter=p;this._parameter.lineWidth=Geoworld.defaultValue(p.lineWidth,1)},finalize:function(){this._super()},addToMap:function(){this._super();var f=this._parameter;this._primitive=this._earthCtrl.entities.add({name:f.name,polyline:{positions:f.positions,
width:f.lineWidth,material:f.lineColor,clampToGround:f.clampToGround,shadows:f.shadows,distanceDisplayCondition:f.distanceDisplayCondition}})},updateMaterial:function(){var f=this._parameter;return Geoworld.defined(f.outlineColor)?new Geoworld.PolylineOutlineMaterialProperty({color:f.lineColor,outlineColor:f.outlineColor}):f.lineColor},removeFromMap:function(){this._super();null!==this._primitive&&this._earthCtrl.entities.remove(this._primitive)},toJSON:function(){return k.export(this)}});Object.defineProperties(q.prototype,
{entity:{get:function(){return this._primitive},set:function(f){this._primitive=f}},positions:{get:function(){return this._primitive.polyline.positions},set:function(f){this._primitive.polyline.positions=f;this._parameter.positions=f}},lineColor:{get:function(){return this._parameter.lineColor},set:function(f){this._parameter.lineColor=f;this.updateMaterial()}},outlineColor:{get:function(){return this._parameter.outlineColor},set:function(f){this._parameter.outlineColor=f;this.updateMaterial()}},
lineWidth:{get:function(){return this._primitive.polyline.width},set:function(f){this._primitive.polyline.width=f;this._parameter.lineWidth=f}},show:{get:function(){return null!==this._primitive?this._primitive.show:!1},set:function(f){null!==this._primitive&&(this._primitive.show=f,this._parameter.show=f)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}},clampToGround:{get:function(){return null!==this._primitive?
this._primitive.polyline.clampToGround:!1},set:function(f){null!==this._primitive&&(this._primitive.polyline.clampToGround=f,this._parameter.clampToGround=f)}}});return q});
define("Scene/entity/GwPolygon.js",["../GwSpatialObject.js","../../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwPolygon";this._primitive=this._parameter=null},initialize:function(f,p){this._super(f);this._parameter=p;this._parameter.lineWidth=Geoworld.defaultValue(p.lineWidth,2)},finalize:function(){this._super()},addToMap:function(){this._super();var f=this._parameter,p=Geoworld.defaultValue(f.outline,!0),k=f.material,q=Geoworld.defaultValue(f.outlineColor,
k);Geoworld.defined(f.hierarchy);this._primitive=this._earthCtrl.entities.add({name:f.name,polygon:{hierarchy:{positions:f.positions},height:f.height,heightReference:f.heightReference,extrudedHeight:f.extrudedHeight,extrudedHeightReference:f.extrudedHeightReference,stRotation:f.stRotation,fill:f.fill,outlineWidth:f.lineWidth,material:k,outline:p,outlineColor:q,perPositionHeight:f.perPositionHeight,closeTop:f.closeTop,closeBottom:f.closeBottom,shadows:f.shadows,distanceDisplayCondition:f.distanceDisplayCondition}})},
removeFromMap:function(){this._super();null!==this._primitive&&this._earthCtrl.entities.remove(this._primitive)},toJSON:function(){return k.export(this)}});Object.defineProperties(q.prototype,{entity:{get:function(){return this._primitive},set:function(f){this._primitive=f}},positions:{get:function(){return this._primitive.polygon.hierarchy._value},set:function(f){this._primitive.polygon.hierarchy._value=f}},fillColor:{get:function(){return this._primitive.polygon.material},set:function(f){this._primitive.polygon.material=
f}},outline:{get:function(){return this._primitive.polygon.outline},set:function(f){this._primitive.polygon.outline=f}},outlineColor:{get:function(){return this._primitive.polygon.outlineColor},set:function(f){this._primitive.polygon.outlineColor=f}},lineWidth:{get:function(){return this._primitive.polygon.outlineWidth},set:function(f){this._primitive.polygon.outlineWidth=f}},show:{get:function(){return null!==this._primitive?this._primitive.show:!1},set:function(f){null!==this._primitive&&(this._primitive.show=
f)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}}});return q});
define("Scene/entity/GwPoint.js",["../GwSpatialObject.js","../../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwPoint";this._primitive=this._parameter=null},initialize:function(f,p){this._super(f);this._parameter=p},finalize:function(){this._super()},addToMap:function(){this._super();var f=this._parameter,p=Geoworld.Cartesian3.fromDegrees(f.lon,f.lat,f.alt);this._primitive=this._earthCtrl.entities.add({position:p,name:f.name,show:Geoworld.defaultValue(f.show,
!0),point:{pixelSize:Geoworld.defaultValue(f.pixelSize,1),color:f.color,outlineColor:f.outlineColor,outlineWidth:f.outlineWidth,distanceDisplayCondition:f.distanceDisplayCondition,heightReference:f.heightReference}})},removeFromMap:function(){this._super();null!==this._primitive&&this._earthCtrl.entities.remove(this._primitive)},toJSON:function(){return k.export(this)}});Object.defineProperties(q.prototype,{entity:{get:function(){return this._primitive},set:function(f){this._primitive=f}},point:{get:function(){return this._primitive.position},
set:function(f){this._primitive.position=f}},pixelSize:{get:function(){return this._primitive.point.pixelSize},set:function(f){this._primitive.point.pixelSize=f;this._parameter.pixelSize=f}},color:{get:function(){return this._primitive.point.color},set:function(f){null!==this._primitive&&(this._primitive.point.color=f,this._parameter.color=f)}},outlineColor:{get:function(){return this._primitive.point.outlineColor},set:function(f){this._primitive.point.outlineColor=f}},outlineWidth:{get:function(){return this._primitive.point.lineWidth},
set:function(f){this._primitive.point.lineWidth=f}},show:{get:function(){return null!==this._primitive?this._primitive.show:!1},set:function(f){null!==this._primitive&&(this._primitive.show=f,this._parameter.show=f)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}},lon:{get:function(){return null!==this._parameter?this._parameter.lon:!1},set:function(f){null!==this._parameter&&(this._primitive.position=
Geoworld.Cartesian3.fromDegrees(f,this._parameter.lat,this._parameter.alt),this._parameter.lon=f)}},lat:{get:function(){return null!==this._parameter?this._parameter.lat:!1},set:function(f){null!==this._parameter&&(this._primitive.position=Geoworld.Cartesian3.fromDegrees(this._parameter.lon,f,this._parameter.alt),this._parameter.lat=f)}},alt:{get:function(){return null!==this._parameter?this._parameter.alt:!1},set:function(f){null!==this._parameter&&(this._primitive.position=Geoworld.Cartesian3.fromDegrees(this._parameter.lon,
this._parameter.lat,f),this._parameter.alt=f)}}});return q});
define("Scene/entity/GwBox.js",["../GwSpatialObject.js","../../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwBox";this._primitive=this._parameter=null},initialize:function(f,p){this._super(f);this._parameter=p;this._parameter.lineWidth=Geoworld.defaultValue(p.lineWidth,2);this._spatialTransform.createFromWgs84(p.lon,p.lat,p.alt,p.heading,p.pitch,p.roll)},finalize:function(){this._super()},addToMap:function(){this._super();var f=this._parameter,
p=f.material,k=Geoworld.defaultValue(f.outline,!0),q=Geoworld.defaultValue(f.outlineColor,f.fillColor);this._primitive=this._earthCtrl.entities.add({position:f.position,name:f.name,box:{outlineWidth:f.lineWidth,material:p,fill:f.fill,outline:k,dimensions:f.dimensions,outlineColor:q,shadows:f.shadows,distanceDisplayCondition:f.distanceDisplayCondition,depthFailMaterial:void 0}})},removeFromMap:function(){this._super();null!==this._primitive&&this._earthCtrl.entities.remove(this._primitive)},toJSON:function(){return k.export(this)}});
Object.defineProperties(q.prototype,{entity:{get:function(){return this._primitive},set:function(f){this._primitive=f}},position:{get:function(){return this._primitive.position},set:function(f){this._primitive.position=f;this._parameter.position=f}},fill:{get:function(){return this._primitive.box.fill},set:function(f){this._primitive.box.fill=f;this._parameter.fill=f}},material:{get:function(){return this._primitive.box.material},set:function(f){this._primitive.box.material=f;this._parameter.material=
f}},outline:{get:function(){return this._primitive.box.outline},set:function(f){this._primitive.box.outline=f;this._parameter.outline=f}},outlineColor:{get:function(){return this._primitive.box.outlineColor},set:function(f){this._primitive.box.outlineColor=f;this._parameter.outlineColor=f}},dimensions:{get:function(){return this._primitive.box.dimensions},set:function(f){this._primitive.box.dimensions=f;this._parameter.dimensions=f}},show:{get:function(){return null!==this._primitive?this._primitive.show:
!1},set:function(f){null!==this._primitive&&(this._primitive.show=f,this._parameter.show=f)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}}});return q});
define("Scene/entity/GwCylinder.js",["../GwSpatialObject.js","../../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwCylinder";this._primitive=this._parameter=null},initialize:function(f,p){this._super(f);this._parameter=p;this._parameter.lineWidth=Geoworld.defaultValue(p.lineWidth,2)},finalize:function(){this._super()},addToMap:function(){this._super();var f=this._parameter;this._primitive=this._earthCtrl.entities.add({position:f.position,name:f.name,
cylinder:{length:f.length,topRadius:f.topRadius,bottomRadius:f.bottomRadius,fill:f.fill,material:f.material,outline:f.outline,outlineColor:f.outlineColor,outlineWidth:f.outlineWidth,numberOfVerticalLines:f.numberOfVerticalLines,slices:f.slices,shadows:f.shadows,distanceDisplayCondition:f.distanceDisplayCondition}})},removeFromMap:function(){this._super();null!==this._primitive&&this._earthCtrl.entities.remove(this._primitive)},toJSON:function(){return k.export(this)}});Object.defineProperties(q.prototype,
{entity:{get:function(){return this._primitive},set:function(f){this._primitive=f}},position:{get:function(){return this._primitive.position},set:function(f){this._primitive.position=f;this._parameter.position=f}},length:{get:function(){return this._primitive.cylinder.length},set:function(f){this._primitive.cylinder.length=f;this._parameter.length=f}},topRadius:{get:function(){return this._primitive.cylinder.topRadius},set:function(f){this._primitive.cylinder.topRadius=f;this._parameter.topRadius=
f}},bottomRadius:{get:function(){return this._primitive.cylinder.bottomRadius},set:function(f){this._primitive.cylinder.bottomRadius=f;this._parameter.bottomRadius=f}},fill:{get:function(){return this._primitive.cylinder.fill},set:function(f){this._primitive.cylinder.fill=f;this._parameter.fill=f}},material:{get:function(){return this._primitive.cylinder.material},set:function(f){this._primitive.cylinder.material=f;this._parameter.material=f}},outline:{get:function(){return this._primitive.cylinder.outline},
set:function(f){this._primitive.cylinder.outline=f}},outlineColor:{get:function(){return this._primitive.cylinder.outlineColor},set:function(f){this._primitive.cylinder.outlineColor=f;this._parameter.outlineColor=f}},outlineWidth:{get:function(){return this._primitive.cylinder.outlineWidth},set:function(f){this._primitive.cylinder.outlineWidth=f;this._parameter.outlineWidth=f}},numberOfVerticalLines:{get:function(){return this._primitive.cylinder.numberOfVerticalLines},set:function(f){this._primitive.cylinder.numberOfVerticalLines=
f;this._parameter.numberOfVerticalLines=f}},slices:{get:function(){return this._primitive.cylinder.slices},set:function(f){this._primitive.cylinder.slices=f;this._parameter.slices=f}},shadows:{get:function(){return this._primitive.cylinder.shadows},set:function(f){this._primitive.cylinder.shadows=f;this._parameter.shadows=f}},distanceDisplayCondition:{get:function(){return this._primitive.cylinder.distanceDisplayCondition},set:function(f){this._primitive.cylinder.distanceDisplayCondition=f;this._parameter.distanceDisplayCondition=
f}},show:{get:function(){return null!==this._primitive?this._primitive.show:!1},set:function(f){null!==this._primitive&&(this._primitive.show=f,this._parameter.show=f)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}}});return q});
define("Scene/entity/GwEllipsoid.js",["../GwSpatialObject.js","../../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwEllipsoid";this._primitive=this._parameter=null},initialize:function(f,p){this._super(f);this._parameter=p;this._parameter.lineWidth=Geoworld.defaultValue(p.lineWidth,2)},finalize:function(){this._super()},addToMap:function(){this._super();var f=this._parameter;this._primitive=this._earthCtrl.entities.add({position:f.position,
name:f.name,ellipsoid:{radii:f.radii,fill:f.fill,outlineWidth:f.lineWidth,material:f.material,outline:f.outline,outlineColor:f.outlineColor,stackPartitions:f.stackPartitions,slicePartitions:f.slicePartitions,subdivisions:f.subdivisions,shadows:f.shadows,distanceDisplayCondition:f.distanceDisplayCondition}})},removeFromMap:function(){this._super();null!==this._primitive&&this._earthCtrl.entities.remove(this._primitive)},toJSON:function(){return k.export(this)}});Object.defineProperties(q.prototype,
{entity:{get:function(){return this._primitive},set:function(f){this._primitive=f}},position:{get:function(){return this._primitive.position},set:function(f){this._primitive.position=f;this._parameter.position=f}},radii:{get:function(){return this._primitive.ellipsoid.radii},set:function(f){this._primitive.ellipsoid.radii=f;this._parameter.radii=f}},material:{get:function(){return this._primitive.ellipsoid.material},set:function(f){this._primitive.ellipsoid.material=f;this._parameter.material=f}},
fill:{get:function(){return this._primitive.ellipsoid.fill},set:function(f){this._primitive.ellipsoid.fill=f;this._parameter.fill=f}},outline:{get:function(){return this._primitive.ellipsoid.outline},set:function(f){this._primitive.ellipsoid.outline=f;this._parameter.outline=f}},outlineColor:{get:function(){return this._primitive.ellipsoid.outlineColor},set:function(f){this._primitive.ellipsoid.outlineColor=f;this._parameter.outlineColor=f}},outlineWidth:{get:function(){return this._primitive.ellipsoid.outlineWidth},
set:function(f){this._primitive.ellipsoid.outlineWidth=f;this._parameter.outlineWidth=f}},stackPartitions:{get:function(){return this._primitive.ellipsoid.stackPartitions},set:function(f){this._primitive.ellipsoid.stackPartitions=f;this._parameter.stackPartitions=f}},slicePartitions:{get:function(){return this._primitive.ellipsoid.slicePartitions},set:function(f){this._primitive.ellipsoid.slicePartitions=f;this._parameter.slicePartitions=f}},subdivisions:{get:function(){return this._primitive.ellipsoid.subdivisions},
set:function(f){this._primitive.ellipsoid.subdivisions=f;this._parameter.subdivisions=f}},show:{get:function(){return null!==this._primitive?this._primitive.show:!1},set:function(f){null!==this._primitive&&(this._primitive.show=f,this._parameter.show=f)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}}});return q});
define("Scene/entity/GwRectangle.js",["../GwSpatialObject.js","../../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwRectangle";this._primitive=this._parameter=null},initialize:function(f,p){this._super(f);this._parameter=p;this._parameter.lineWidth=Geoworld.defaultValue(p.lineWidth,2)},finalize:function(){this._super()},addToMap:function(){this._super();var f=this._parameter,p=Geoworld.defaultValue(f.outline,!0),k=f.fillColor,q=Geoworld.defaultValue(f.outlineColor,
k);this._primitive=this._earthCtrl.entities.add({name:f.name,rectangle:{show:!0,coordinates:f.coordinates,height:f.height,heightReference:f.heightReference,extrudedHeight:f.extrudedHeight,extrudedHeightReference:f.extrudedHeightReference,rotation:f.rotation,stRotation:f.stRotation,fill:f.fill,material:k,outline:p,outlineColor:q,outlineWidth:f.lineWidth,shadows:f.shadows,distanceDisplayCondition:f.distanceDisplayCondition}})},removeFromMap:function(){this._super();null!==this._primitive&&this._earthCtrl.entities.remove(this._primitive)},
toJSON:function(){return k.export(this)}});Object.defineProperties(q.prototype,{entity:{get:function(){return this._primitive},set:function(f){this._primitive=f}},positions:{get:function(){return null!==this._parameter?this._primitive.rectangle.hierarchy._value:!1},set:function(f){null!==this._primitive&&(this._primitive.rectangle.hierarchy._value=f)}},fillColor:{get:function(){return null!==this._primitive?this._primitive.rectangle.material:!1},set:function(f){null!==this._primitive&&(this._primitive.rectangle.material=
f,this._parameter.fillColor=f)}},outline:{get:function(){return null!==this._primitive?this._primitive.rectangle.outline:!1},set:function(f){null!==this._primitive&&(this._primitive.rectangle.outline=f,this._parameter.outline=f)}},outlineColor:{get:function(){return null!==this._primitive?this._primitive.rectangle.outlineColor:!1},set:function(f){null!==this._primitive&&(this._primitive.rectangle.outlineColor=f,this._parameter.outlineColor=f)}},lineWidth:{get:function(){return null!==this._primitive?
this._primitive.rectangle.outlineWidth:!1},set:function(f){null!==this._primitive&&(this._primitive.rectangle.outlineWidth=f,this._parameter.outlineWidth=f)}},show:{get:function(){return null!==this._primitive?this._primitive.show:!1},set:function(f){null!==this._primitive&&(this._primitive.show=f,this._parameter.show=f)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}},height:{get:function(){return null!==
this._primitive?this._primitive.rectangle.height:!1},set:function(f){null!==this._primitive&&(this._primitive.rectangle.height=f,this._parameter.height=f)}},coordinates:{get:function(){return null!==this._primitive?this._parameter.coordinates:!1},set:function(f){null!==this._primitive&&(this._primitive.rectangle.coordinates=f,this._parameter.coordinates=f)}}});return q});
define("Scene/entity/GwEllipse.js",["../GwSpatialObject.js"],function(v){v=v.extend({__init__:function(){this._super();this._rtti="GwEllipse";this._primitive=this._parameter=null},initialize:function(k,q){this._super(k);this._parameter=q;this._parameter.lineWidth=Geoworld.defaultValue(q.lineWidth,2)},finalize:function(){this._super()},addToMap:function(){this._super();var k=this._parameter;this._primitive=this._earthCtrl.entities.add({position:k.position,name:k.name,ellipse:{show:k.show,semiMajorAxis:k.semiMajorAxis,
semiMinorAxis:k.semiMinorAxis,height:k.height,rotation:k.rotation,stRotation:k.stRotation,fill:k.fill,outlineWidth:k.lineWidth,material:k.material,outline:k.outline,outlineColor:k.outlineColor,shadows:k.shadows,numberOfVerticalLines:k.numberOfVerticalLines,distanceDisplayCondition:k.distanceDisplayCondition}})},removeFromMap:function(){this._super();null!==this._primitive&&this._earthCtrl.entities.remove(this._primitive)}});Object.defineProperties(v.prototype,{entity:{get:function(){return this._primitive},
set:function(k){this._primitive=k}},position:{get:function(){return this._primitive.position},set:function(k){this._primitive.position=k}},radii:{get:function(){return this._primitive.ellipsoid.radii},set:function(k){this._primitive.ellipsoid.radii=k}},material:{get:function(){return this._primitive.ellipsoid.material},set:function(k){this._primitive.ellipsoid.material=k}},fill:{get:function(){return this._primitive.ellipsoid.fill},set:function(k){this._primitive.ellipsoid.fill=k}},outline:{get:function(){return this._primitive.ellipsoid.outline},
set:function(k){this._primitive.ellipsoid.outline=k}},outlineColor:{get:function(){return this._primitive.ellipsoid.outlineColor},set:function(k){this._primitive.ellipsoid.outlineColor=k}},outlineWidth:{get:function(){return this._primitive.ellipsoid.outlineWidth},set:function(k){this._primitive.ellipsoid.outlineWidth=k}},stackPartitions:{get:function(){return this._primitive.ellipsoid.stackPartitions},set:function(k){this._primitive.ellipsoid.stackPartitions=k}},slicePartitions:{get:function(){return this._primitive.ellipsoid.slicePartitions},
set:function(k){this._primitive.ellipsoid.slicePartitions=k}},subdivisions:{get:function(){return this._primitive.ellipsoid.subdivisions},set:function(k){this._primitive.ellipsoid.subdivisions=k}},show:{get:function(){return null!==this._primitive?this._primitive.show:!1},set:function(k){null!==this._primitive&&(this._primitive.show=k)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(k){null!==this._parameter&&(this._parameter.name=k)}}});return v});
define("Scene/entity/GwPolylineVolume.js",["../GwSpatialObject.js"],function(v){v=v.extend({__init__:function(){this._super();this._rtti="GwPolylineVolume";this._primitive=this._parameter=null},initialize:function(k,q){this._super(k);this._parameter=q;this._parameter.lineWidth=Geoworld.defaultValue(q.lineWidth,1)},finalize:function(){this._super()},addToMap:function(){this._super();var k=this._parameter;Geoworld.defaultValue(k.isDepthTest,!1);this._primitive=this._earthCtrl.entities.add({name:k.name,
polylineVolume:k})},updateMaterial:function(){var k=this._parameter;return Geoworld.defined(k.outlineColor)?new Geoworld.PolylineOutlineMaterialProperty({color:k.lineColor,outlineColor:k.outlineColor}):k.lineColor},removeFromMap:function(){this._super();null!==this._primitive&&this._earthCtrl.entities.remove(this._primitive)}});Object.defineProperties(v.prototype,{entity:{get:function(){return this._primitive},set:function(k){this._primitive=k}},positions:{get:function(){return this._primitive.polyline.positions},
set:function(k){this._primitive.polyline.positions=k;this._parameter.positions=k}},lineColor:{get:function(){return this._parameter.lineColor},set:function(k){this._parameter.lineColor=k;this.updateMaterial()}},outlineColor:{get:function(){return this._parameter.outlineColor},set:function(k){this._parameter.outlineColor=k;this.updateMaterial()}},lineWidth:{get:function(){return this._primitive.polyline.width},set:function(k){this._primitive.polyline.eidth=k;this._parameter.lineWidth=k}},show:{get:function(){return null!==
this._primitive?this._primitive.show:!1},set:function(k){null!==this._primitive&&(this._primitive.show=k,this._parameter.show=k)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(k){null!==this._parameter&&(this._parameter.name=k)}},shape:{get:function(){return null!==this._parameter?this._parameter.shape:!1},set:function(k){null!==this._parameter&&(this._parameter.shape=k)}}});return v});
define("Scene/GwImageryLayer.js",["../Scene/GwObject.js","../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwImageryLayer";this._parameter=this._primitive=null;this._wModels=[];this._instance=[];this.instanceId=new Map},initialize:function(f,p){this._super(f);this._parameter=p},finalize:function(){this._super()},addToMap:function(){this._super();var f=this._parameter,p=Geoworld.defaultValue(f.sourceType,"wmts"),k=null;if("wmts"===p)k=new Geoworld.WebMapTileServiceImageryProvider(f);
else if("mapbox"===p)k=new Geoworld.MapboxImageryProvider(f);else if("arcgis"===p)k=new Geoworld.ArcGisMapServerImageryProvider(f);else if("wms"===p)k=new Geoworld.WebMapServiceImageryProvider(f);else if("multi"===p)k=new Geoworld.MultiResourceImageryProvider(f);else if("single"===p)k=new Geoworld.SingleTileImageryProvider(f);else if("tms"===p){var p=Geoworld.defaultValue(f.west,void 0),k=Geoworld.defaultValue(f.south,void 0),q=Geoworld.defaultValue(f.east,void 0),x=Geoworld.defaultValue(f.north,
void 0);Geoworld.defined(p)&&Geoworld.defined(k)&&Geoworld.defined(q)&&Geoworld.defined(x)&&(f.rectangle=new Geoworld.Rectangle(Geoworld.Math.toRadians(p),Geoworld.Math.toRadians(k),Geoworld.Math.toRadians(q),Geoworld.Math.toRadians(x)));Geoworld.defined(f.fileExtension)&&"json"===f.fileExtension&&(f.callback=this.processGeoJson());k=new Geoworld.TileMapServiceImageryProvider(f)}else"baidu"===p?k=new Geoworld.GWBaiduImageryProvider(f):"gaode"===p?k=new Geoworld.UrlTemplateImageryProvider(f):"mapworld"===
p?k=new Geoworld.WebMapTileServiceImageryProvider(f):"mvt"===p&&(Geoworld.defined(f.coreMap)||(f.coreMap=this._earthCtrl.coreMap),k=new Geoworld.MVTImageryProvider(f));null!==k&&(this._primitive=this._earthCtrl.imageryLayers.addImageryProvider(k),this._primitive._layerIndex=f.zIndex)},checkWModels:function(f){return Geoworld.defined(this._wModels[f])},removeInstance:function(f,p){var k=this._wModels[f];if(Geoworld.defined(k)&&(k=k.geometryInstances,Geoworld.defined(k)))for(var q=0;q<k.length;q++);
},removeWModels:function(f){if(!Geoworld.defined(this._parameter.retain)||!this._parameter.retain){var p=this._wModels[f];if(Geoworld.defined(p)){this._earthCtrl.primitives.remove(p);for(p=0;p<this._instance[f].length;p++)this.instanceId.has(this._instance[f][p])&&this.instanceId.delete(this._instance[f][p]);this._instance[f]=[];this._wModels[f]=void 0}}},convertCoordinates:function(f){for(var p=[],k=0;k<f.length;k++)for(var q=f[k],x=0;x<q.length;x++)Array.prototype.push.apply(p,q[x]);return p},processGeoJson:function(){var f=
this,p=Geoworld.defaultValue(f._parameter.modelHeightKey,"\u5c42\u9ad8"),k=Geoworld.defaultValue(f._parameter.modelColor,Geoworld.Color.BLUE);return{callback:function(q,x){if(Geoworld.defined(x)&&!f.checkWModels(x)){var A=[],v=Geoworld.ColorGeometryInstanceAttribute.fromColor(k);f._instance[x]||(f._instance[x]=[]);for(var z,C=0;C<q.features.length;C++){var B=q.features[C];if("Polygon"===B.geometry.type){var E=B.id;if(!f.instanceId.has(E)){z=f.convertCoordinates(B.geometry.coordinates);var G=Geoworld.Cartesian3.fromDegreesArray(z);
z=B.properties[p];Geoworld.defined(z)||(z=0);A.push(new Geoworld.GeometryInstance({geometry:new Geoworld.PolygonGeometry({polygonHierarchy:new Geoworld.PolygonHierarchy(G),extrudedHeight:z}),id:E,releaseGeometryInstances:!1,attributes:{color:v}}));f.instanceId.set(E,x);f._instance[x].push(E)}}else if("MultiPolygon"===B.geometry.type)for(E=B.geometry.coordinates,G=0;G<E.length;G++){var F=B.id+C;if(!f.instanceId.has(F)){z=f.convertCoordinates(E[G]);var H=Geoworld.Cartesian3.fromDegreesArray(z);z=B.properties[p];
Geoworld.defined(z)||(z=0);A.push(new Geoworld.GeometryInstance({geometry:new Geoworld.PolygonGeometry({polygonHierarchy:new Geoworld.PolygonHierarchy(H),extrudedHeight:z}),id:F,releaseGeometryInstances:!1,attributes:{color:v}}));f.instanceId.set(F,x);f._instance[x].push(F)}}else console.info(B.geometry.type)}0<A.length&&(A=f._earthCtrl.primitives.add(new Geoworld.Primitive({geometryInstances:A,allowPicking:!1,appearance:new Geoworld.PerInstanceColorAppearance({flat:!1,faceForward:!1,translucent:!1})})),
f._wModels[x]=A)}},removePrimitive:function(p){f.removeWModels(p)}}},removeFromMap:function(){this._super();null!==this._primitive&&this._earthCtrl.imageryLayers.remove(this._primitive)},toJSON:function(){var f=this;return new Promise(function(p,t){Geoworld.when.all([f._primitive.imageryProvider.readyPromise]).then(function(t){t=k.export(f);console.log("imageobj",t);p(t)})})}});Object.defineProperties(q.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==
this._primitive?this._primitive.show:!1},set:function(f){null!==this._primitive&&(this._primitive.show=f);console.info(f);for(var p=0;p<this._wModels.length;p++)this.mEarthCtrl.entities.getById(this._wModels[p]).show=f}},sourceType:{get:function(){return null!==this._parameter?this._parameter.sourceType:!1}},dataUrl:{get:function(){return null!==this._parameter?this._parameter.url:!1}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&
(this._parameter.name=f)}}});return q});
define("Scene/GwTerrainLayer.js",["../Scene/GwObject.js","../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwTerrainLayer";this._parameter=this._primitive=null},initialize:function(f,p){this._super(f);this._parameter=p},finalize:function(){this._super()},addToMap:function(){this._super();var f=this._parameter,p=null,k=Geoworld.defaultValue(f.sourceType,"ude");"ude"===k?p=new Geoworld.UniscopeTerrainProvider({url:f.url}):"ctb"===k?p=new Geoworld.CesiumTerrainProvider({url:f.url}):
"multi"===k&&(p=new Geoworld.MultiResourceTerrainProvider(this._earthCtrl));null!==p&&(this._primitive=p,this._coreMap.terrainProvider=p)},removeFromMap:function(){this._super();null!==this._primitive&&(this._coreMap.terrainProvider=new Geoworld.EllipsoidTerrainProvider)},toJSON:function(){var f=this;return new Promise(function(p,t){Geoworld.when.all([this._primitive.readyPromise]).then(function(t){t=k.export(f);console.log("terraobj",t);p(t)})})}});Object.defineProperties(q.prototype,{parameter:{get:function(){return this._parameter}},
show:{get:function(){return null!==this._primitive?this._primitive.show:!1},set:function(f){null!==this._primitive&&(this._primitive.show=f)}},sourceType:{get:function(){return null!==this._parameter?this._parameter.sourceType:!1}},dataUrl:{get:function(){return null!==this._parameter?this._parameter.url:!1}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}}});return q});
define("Scene/GwModelLayer.js",["../Scene/GwObject.js","../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwModelLayer";this._parameter=this._primitive=null},initialize:function(f,p){this._super(f);this._parameter=p},finalize:function(){this._super()},addToMap:function(){this._super();var f=this._parameter,p=null;if("b3dm"===f.sourceType||"3DTiles"===f.sourceType)p=new Geoworld.Cesium3DTileset(f),Geoworld.defined(f.transform)&&this.transform(f.transform,
p);else if("osgb"===f.sourceType)p=new Geoworld.Cesium3DTileset(f);else if("s3m"===f.sourceType)p=new Geoworld.S3MTilesLayer(f);else if("ude_block"===f.sourceType||"ude_model"===f.sourceType)f.skipLevelOfDetail=!0,p=new Geoworld.Cesium3DTileset(f);this._primitive=this._coreMap.scene.primitives.add(p)},removeFromMap:function(){this._super();null!==this._primitive&&this._coreMap.scene.primitives.remove(this._primitive)},toJSON:function(){var f=this;return new Promise(function(p,t){Geoworld.when.all([f._primitive.readyPromise]).then(function(t){t=
k.export(f);console.log("modellayerobj",t);p(t)})})},transform:function(f,p){p.readyPromise.then(function(p){var k=Geoworld.Matrix3.fromRotationX(Geoworld.Math.toRadians(f.heading)),q=Geoworld.Matrix3.fromRotationY(Geoworld.Math.toRadians(f.pitch)),A=Geoworld.Matrix3.fromRotationZ(Geoworld.Math.toRadians(f.roll)),k=Geoworld.Matrix4.fromRotationTranslation(k),q=Geoworld.Matrix4.fromRotationTranslation(q),A=Geoworld.Matrix4.fromRotationTranslation(A),v=Geoworld.Cartesian3.fromDegrees(f.lon,f.lat,f.alt),
v=Geoworld.Transforms.eastNorthUpToFixedFrame(v);Geoworld.Matrix4.multiply(v,k,v);Geoworld.Matrix4.multiply(v,q,v);Geoworld.Matrix4.multiply(v,A,v);p._root.transform=v})}});Object.defineProperties(q.prototype,{parameter:{get:function(){return this._parameter}},readyPromise:{get:function(){return this._primitive.readyPromise}},show:{get:function(){return null!==this._primitive?this._primitive.show:!1},set:function(f){null!==this._primitive&&(this._primitive.show=f)}},sourceType:{get:function(){return null!==
this._parameter?this._parameter.sourceType:!1}},dataUrl:{get:function(){return null!==this._parameter?this._parameter.url:!1}},boundingSphere:{get:function(){return null!==this._primitive&&this._primitive.boundingSphere?this._primitive.boundingSphere:null}},modelMatrix:{get:function(){return null!==this._primitive?this._primitive.modelMatrix:!1},set:function(f){null!==this._primitive&&(this._primitive.modelMatrix=f)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==
this._parameter&&(this._parameter.name=f)}}});return q});
define("Scene/GwFeatureLayer.js",["../Scene/GwObject.js","../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwFeatureLayer";this._parameter=this._primitive=null},initialize:function(f,p){this._super(f);this._parameter=p},finalize:function(){this._super()},addToMap:function(){this._super();this._primitive=new Geoworld.FeatureDataProvider(this._earthCtrl,this._parameter)},removeFromMap:function(){this._super();null!==this._primitive&&this._primitive.destory()},
toJSON:function(){var f=this;return new Promise(function(p,t){Geoworld.when.all([f._primitive]).then(function(t){t=k.export(f);console.log("fireObj",t);p(t)})})}});Object.defineProperties(q.prototype,{entities:{get:function(){return this._primitive.entities}},dataSource:{get:function(){return this._primitive.dataSource}},parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==this._primitive?this._primitive.show:!1},set:function(f){null!==this._primitive&&(this._primitive.show=
f)}},sourceType:{get:function(){return null!==this._parameter?this._parameter.sourceType:!1}},dataUrl:{get:function(){return null!==this._parameter?this._parameter.url:!1}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}}});return q});
define("GwWorkChart.js",[],function(){function v(k){this._earthCtrl=k;this._path="";this._layerWork=null}Object.defineProperties(v.prototype,{});v.prototype.addToMap=function(k){Geoworld.defined(this._layerWork)?this._layerWork.updateOverlay(k):this._layerWork=new Geoworld.FlowEcharts(this._earthCtrl.coreMap,k)};v.prototype.disable=function(){this._layerWork.dispose()};return v});
define("Parser/GwSceneConfigRootNodes.js",[],function(){return Object.freeze({IMAGERYPROVIDERS:"imageryProviders",TERRAINPROVIDERS:"terrainProviders",MODELLAYERS:"modelLayers",FEATURELAYERS:"featureLayers",USERSCENE:"userScene"})});
define("Scene/GwWaters.js",["./GwObject.js","../Parser/GwExportObject.js"],function(v,k){var q=v.extend({__init__:function(){this._super();this._rtti="GwWaters";this._parameter=this._primitive=null},initialize:function(f,p){this._super(f);this._parameter=p;this._parameter.type=Geoworld.defaultValue(p.type,"water");this._parameter.version=Geoworld.defaultValue(p.version,"1.3.0");this._parameter.baseWaterColor=Geoworld.defaultValue(p.color,Geoworld.Color.fromCssColorString("#0374ff"));this._parameter.waterFrequency=
Geoworld.defaultValue(p.waterFrequency,3E3);this._parameter.animationSpeed=Geoworld.defaultValue(p.animationSpeed,0.01);this._parameter.amplitude=Geoworld.defaultValue(p.amplitude,5E3)},finalize:function(){this._super()},addToMap:function(){this._super();if(this._primitive=new Geoworld.FeatureJsonData(this._earthCtrl,this._parameter))this._parameter.color=this._primitive.baseWaterColor,this._parameter.params=this._primitive._params},removeFromMap:function(){this._super();null!==this._primitive&&this._primitive.destory()},
toJSON:function(){var f=this;return new Promise(function(p,t){Geoworld.when.all([f._primitive]).then(function(t){t=k.export(f);console.log("waterObj",t);p(t)})})}});Object.defineProperties(q.prototype,{type:{get:function(){return this._primitive.type}},version:{get:function(){return this._primitive._version}},params:{get:function(){return this._primitive._params},set:function(f){null!==this._primitive&&(this._primitive._params=f)}},show:{get:function(){return null!==this._parameter?this._parameter.show:
!1},set:function(f){if(null!==this._primitive)if(this._primitive._primitive){if(0===this._primitive._primitive.length)return!1;for(var p=0;p<this._primitive._primitive.length;p++)this._primitive._primitive[p].show=f;this._parameter.show=f}else return!1;else return!1}},url:{get:function(){return null!==this._primitive?this._primitive.url:!1},set:function(f){null!==this._primitive&&(this._primitive.url=f)}},color:{get:function(){return null!==this._primitive?this._primitive.baseWaterColor:!1},set:function(f){null!==
this._primitive&&(this._primitive.baseWaterColor=f)}},waterFrequency:{get:function(){return null!==this._primitive?this._primitive.waterFrequency:!1},set:function(f){null!==this._primitive&&(this._primitive.waterFrequency=f)}},animationSpeed:{get:function(){return null!==this._primitive?this._primitive.animationSpeed:!1},set:function(f){null!==this._primitive&&(this._primitive.animationSpeed=f)}},amplitude:{get:function(){return null!==this._primitive?this._primitive.amplitude:!1},set:function(f){null!==
this._primitive&&(this._primitive.amplitude=f)}},name:{get:function(){return null!==this._parameter?this._parameter.name:!1},set:function(f){null!==this._parameter&&(this._parameter.name=f)}}});return q});
define("GwObjectFactory.js","./VideoProjection/GwPerspectiveVideoProjection.js ./VideoProjection/GwPanoramaVideoProjection.js ./VideoProjection/GwFisheyeVideoProjection.js ./GwTrack.js ./Effects/GwFire.js ./Effects/GwSmoke.js ./Effects/GwExplosion.js ./Effects/GwFireworks.js ./Effects/GwHeatMap.js ./Effects/GwRadarScan.js ./Effects/GwCircleScan.js ./Effects/GwUpDownScan.js ./Effects/GwPointLight.js ./Scene/entity/GwBillboard.js ./Scene/entity/GwModel.js ./Scene/entity/GwLabel.js ./Scene/entity/GwPolyline.js ./Scene/entity/GwPolygon.js ./Scene/entity/GwPoint.js ./Scene/entity/GwBox.js ./Scene/entity/GwCylinder.js ./Scene/entity/GwEllipsoid.js ./Scene/entity/GwRectangle.js ./Scene/entity/GwEllipse.js ./Scene/entity/GwPolylineVolume.js ./Scene/GwImageryLayer.js ./Scene/GwTerrainLayer.js ./Scene/GwModelLayer.js ./Scene/GwFeatureLayer.js ./Scene/GwNode.js ./GwWorkChart.js ./Parser/GwSceneConfigRootNodes.js ./Scene/GwWaters.js".split(" "),function(v,
k,q,f,p,t,w,x,A,D,z,C,B,E,G,F,H,J,L,N,Q,X,U,I,Y,da,ea,Z,ra,aa,fa,M,ja){function K(f){this._earthCtrl=f;this._coreMap=f.coreMap}function S(){return(65536*(1+Geoworld.Math.nextRandomNumber())|0).toString(16).substring(1)}K.createUUID=function(){return S()+S()+"-"+S()+"-"+S()+"-"+S()+"-"+S()+S()+S()};K.createUUIDWithoutDash=function(){return S()+S()+S()+S()+S()+S()+S()+S()};K.prototype.createUUID=function(){return K.createUUID()};K.prototype.createGroup=function(f){var p=new aa;p.id=f.id||K.createUUID();
p.name=f.name||"\u672a\u547d\u540d\u7ec4";return p};K.prototype.createImageryLayer=function(f,p){var k=new da(f);k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.IMAGERYPROVIDERS),k);return k};K.createTerrainLayer=function(f){var p=Geoworld.defaultValue(f.sourceType,
"ude");if("ude"===p)var k=new Geoworld.UniscopeTerrainProvider({url:f.url});else"ctb"===p?k=new Geoworld.CesiumTerrainProvider({url:f.url}):"multi"===p&&(k=new Geoworld.MultiResourceTerrainProvider(this._earthCtrl));return k};K.prototype.createTerrainLayer=function(f,p){var k=new ea(f);k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.TERRAINPROVIDERS),
k);return k};K.prototype.removeTerrainLayer=function(f){this._coreMap.terrainProvider=new Geoworld.EllipsoidTerrainProvider({})};K.prototype.createFeatureLayer=function(f,p){var k=new ra(f);k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.FEATURELAYERS),
k);return k};K.prototype.createModelLayer=function(f,p){var k=new Z;k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.MODELLAYERS),k);return k};K.prototype.createWfsModel=function(f,p){var k=new Geoworld.FeatureJsonData(this._earthCtrl,f);k.name=f.name;k.id=
Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.MODELLAYERS),k);return k};K.prototype.createModel=function(f,p){var k=new G;k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,
k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),k);return k};K.prototype.removeModel=function(f){Geoworld.defined(f)&&f.removeFromMap()};K.prototype.createCZMLObject=function(f,p){var k=Geoworld.defaultValue(f.addToMap,!0),t=new Geoworld.CzmlDataSource;t.load(f.url);k&&this._earthCtrl.dataSources.add(t);t.name=f.name;t.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());p?this._earthCtrl.userScene.addChild(p,t):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),
t);return t};K.prototype.createElement=function(f){var p={};p[f.type]=f.parameters;Geoworld.defined(f.name)&&(p.name=f.name);Geoworld.defined(f.position)&&(p.position=f.position);return this._earthCtrl.entities.add(p)};K.prototype.removeElement=function(f){Geoworld.defined(f)?this._earthCtrl.entities.remove(f):this._earthCtrl.entities.removeAll()};K.prototype.createVideoProjection=function(f,p){f.addToMap=Geoworld.defaultValue(f.addToMap,!0);var t=Geoworld.defaultValue(f.sourceType,"perspective"),
w=null;"perspective"===t?(w=new v(this._earthCtrl),w.initialize(f),w.name=f.name,w.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID()),p?this._earthCtrl.userScene.addChild(p,w):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),w)):"panorama"===t?(w=new k(this._earthCtrl),w.initialize(f),w.name=f.name,w.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID()),p?this._earthCtrl.userScene.addChild(p,w):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),
w)):"fisheye"===t&&(w=new q(this._earthCtrl),w.initialize(f),w.name=f.name,w.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID()),p?this._earthCtrl.userScene.addChild(p,w):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),w));return w};K.prototype.createTrack=function(p,k){var t=new f(this._earthCtrl);t.name=p.name;t.id=Geoworld.defaultValue(p.id,this._earthCtrl.factory.createUUID());t.initialize(p);k?this._earthCtrl.userScene.addChild(k,
t):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),t);return t};K.prototype.createSceneNode=function(f,p,k){var t=new aa;t.id=f;t.name=p;t.label=k;return t};K.prototype.createOcclusionService=function(f){var p=new GwOcclusionService(this._earthCtrl);p.name=f;return p};K.prototype.createFire=function(f,k){var t=new p;t.initialize(this._earthCtrl,f);t.name=f.name;t.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,
!0)&&t.addToMap();k?this._earthCtrl.userScene.addChild(k,t):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),t);return t};K.prototype.createSmoke=function(f,p){var k=new t;k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),
k);return k};K.prototype.createExplosion=function(f,p){var k=new w;k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),k);return k};K.prototype.createFireworks=function(f,p){var k=new x;k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,
this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),k);return k};K.prototype.createRadarScan=function(f,p){var k=new D(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());k.show=!0;p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),
k);return k};K.prototype.createCircleScan=function(f,p){var k=new z(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());k.show=!0;p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),k);return k};K.prototype.createUpDownScan=function(f){f=new C(this._earthCtrl,f);f.show=!0;return f};K.prototype.createWaters=function(f,p){var k=new ja(this._earthCtrl,f);k.initialize(this._earthCtrl,
f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();k.show=!0;p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),k);return k};K.prototype.createHeatmap=function(f,p){var k=A.create(this._earthCtrl,f.bbox,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());p?this._earthCtrl.userScene.addChild(p,
k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),k);return k};K.prototype.createLabel=function(f,p){var k=new F;k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),k);return k};K.prototype.createBillboard=
function(f,p){var k=new E;k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),k);return k};K.prototype.createPolyline=function(f,p){var k=new H;k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());
Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),k);return k};K.prototype.createPolygon=function(f,p){var k=new J;k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),
k);return k};K.prototype.createPoint=function(f,p){var k=new L;k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),k);return k};K.prototype.createBox=function(f,p){var k=new N;k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,
this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),k);return k};K.prototype.createEllipsoid=function(f,p){var k=new X;k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,
k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),k);return k};K.prototype.createCylinder=function(f,p){var k=new Q;k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),k);return k};K.prototype.createRectangle=
function(f,k){var p=new U;p.initialize(this._earthCtrl,f);p.name=f.name;p.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&p.addToMap();k?this._earthCtrl.userScene.addChild(k,p):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),p);return p};K.prototype.createEllipse=function(f,p){var k=new I;k.initialize(this._earthCtrl,f);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());
Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap();p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),k);return k};K.prototype.createPolylineVolume=function(f,k){var p=new Y;p.initialize(this._earthCtrl,f);p.name=f.name;p.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&p.addToMap();k?this._earthCtrl.userScene.addChild(k,p):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),
p);return p};K.prototype.createEChartLayer=function(f,p){var k=new fa(this._earthCtrl);k.name=f.name;k.id=Geoworld.defaultValue(f.id,this._earthCtrl.factory.createUUID());Geoworld.defaultValue(f.addToMap,!0)&&k.addToMap(f);p?this._earthCtrl.userScene.addChild(p,k):this._earthCtrl.userScene.addChild(this._earthCtrl.userScene.rootNode.getChildByName(M.USERSCENE),k);return k};K.prototype.createPointLight=function(f){return new B(this._earthCtrl,f)};return Geoworld.ObjectFactory=K});
define("Scene/GwScene.js","../Scene/GwObject.js ../Scene/GwNode.js ../Scene/GwSelectSet.js ../Core/GwEventHandler.js ./entity/GwModel.js ../GwObjectFactory.js ../Parser/GwSceneConfigRootNodes.js".split(" "),function(v,k,q,f,p,t,w){v=v.extend({__init__:function(){this._super();this._type="GwScene";this._objectMap={};this._rootNode=null;this._isBenchUpdate=!1},initialize:function(p,w){this._super(p);this._selectSet=new q;this._selectSet.initialize(p);var v=new k;v.id=t.createUUID();v.name=Geoworld.defaultValue(w.ProjectName,
"root");v.version=Geoworld.defaultValue(w.version,null);v.desc=Geoworld.defaultValue(w.desc,null);v.createTime=Geoworld.defaultValue(w.createTime,(new Date).toISOString());v.lastUpdate=Geoworld.defaultValue(w.lastUpdate,null);v.show=!0;this._editNode=this._rootNode=v;this._objectMap[v.id]=v;this._EventDocumentChanged=new f("EventDocumentChanged")},finalize:function(){this._super();this._rootNode=null;this._objectMap={}},getChildById:function(f){return this._objectMap.hasOwnProperty(f)?this._objectMap[f]:
null},addChild:function(f,p){f.addChild(p);this._objectMap[p.id]=p;this._isBenchUpdate||this.commitChanged()},removeChildById:function(f){f=this._objectMap[f];Geoworld.defined(f)&&this.removeChild(f)},removeChild:function(f){Geoworld.defined(f)&&Geoworld.defined(f.parentNode)&&(f.removeFromMap(),f.parentNode.removeChild(f));delete this._objectMap[f.id];this._isBenchUpdate||this.commitChanged()},removeAll:function(){},beginUpdate:function(){this._isBenchUpdate=!0},endUpdate:function(){this._isBenchUpdate&&
(this.commitChanged(),this._isBenchUpdate=!1)},commitChanged:function(){this._EventDocumentChanged._notifyEvent(this)},flyTo:function(f,p){Geoworld.defined(f)&&Geoworld.defined(f._primitive)&&(f=f._primitive);this._earthCtrl.coreMap.flyTo(f,p)},findLocationByID:function(f,p){if(f){var k=this.getChildById(f);Geoworld.defined(k)&&Geoworld.defined(k._primitive)&&(k=k._primitive);this._earthCtrl.coreMap.flyTo(k,p)}},moveLayer:function(f,p){for(var k=this.getChildById(f),t=null,q=0;q<k.parentNode.childNodes.length;q++)k.parentNode.childNodes[q].id===
k.id&&(t=q);"up"===p?(this._earthCtrl.coreMap.scene.imageryLayers.raise(k._primitive),this.changeLayer(k.parentNode.childNodes,t,t+1)):"down"===p&&(this._earthCtrl.coreMap.scene.imageryLayers.lower(k._primitive),this.changeLayer(k.parentNode.childNodes,t,t-1))},changeLayer:function(f,k,p){k=Geoworld.Math.clamp(k,0,f.length-1);p=Geoworld.Math.clamp(p,0,f.length-1);if(k!==p){var t=f[k];f[k]=f[p];f[p]=t}},outputJson:function(f){var k=this;(new Promise(function(f,p){var t={IMAGERYPROVIDERS:"imageryProviders",
TERRAINPROVIDERS:"terrainProviders",MODELLAYERS:"modelLayers",FEATURELAYERS:"featureLayers",USERSCENE:"userScene"},q=0,w=[],x;for(x in t){var v=k.rootNode.getChildByName(t[x]);if(v){var H=[];if(0===v.childNodes.length)H=[];else for(var J=0;J<v.childNodes.length;J++){var L=v.childNodes[J].toJSON();H.push(L)}Promise.all(H).then(function(k){var p=[];if(0!==k.length){for(var t=0;t<k.length;t++)p.push(k[t]);k=p[0].class;"IMAGERY_LAYER"!==k&&"TERRAIN_LAYER"!==k&&"MODEL_LAYER"!==k&&"FEATURE_LAYER"!==k&&
(k="USER_SCENE");w.push({item:k,objJson:p})}q++;5===q&&(f(w),q=0)})}}})).then(function(p){for(var t={version:k.rootNode.version,projectName:k.rootNode.name,desc:k.rootNode.desc,createTime:k.rootNode.createTime,lastUpdate:(new Date).toISOString(),imageryProviders:[],terrainProviders:[],modelLayers:[],featureLayers:[],userScene:[]},q=0;q<p.length;q++)"IMAGERY_LAYER"===p[q].item&&(t.imageryProviders=p[q].objJson),"TERRAIN_LAYER"===p[q].item&&(t.terrainProviders=p[q].objJson),"MODEL_LAYER"===p[q].item&&
(t.modelLayers=p[q].objJson),"FEATURE_LAYER"===p[q].item&&(t.featureLayers=p[q].objJson),"USER_SCENE"===p[q].item&&(t.userScene=p[q].objJson);p={class:"ENVIRONMENT",underGround:Geoworld.defaultValue(k._earthCtrl.camera.undergroundMode,null),shadow:Geoworld.defaultValue(k._earthCtrl.shadows,null),depthTest:Geoworld.defaultValue(k._earthCtrl.coreMap.scene.globe.depthTestAgainstTerrain,null),rain:Geoworld.defaultValue(k._earthCtrl.environment.rain.show,null),snow:Geoworld.defaultValue(k._earthCtrl.environment.snow.show,
null),fog:Geoworld.defaultValue(k._earthCtrl.environment.fog.show,null),bwMode:Geoworld.defaultValue(k._earthCtrl.environment.bwMode.show,null),nightMode:Geoworld.defaultValue(k._earthCtrl.environment.nightMode.show,null),colorAdjustment:{show:Geoworld.defaultValue(k._earthCtrl.environment.colorAdjustment.show,null),contrast:Geoworld.defaultValue(k._earthCtrl.environment.colorAdjustment.contrast,null),saturation:Geoworld.defaultValue(k._earthCtrl.environment.colorAdjustment.saturation,null),brightness:Geoworld.defaultValue(k._earthCtrl.environment.colorAdjustment.brightness,
null)}};var q={class:"SKYBOX",positiveX:Geoworld.defaultValue(k._earthCtrl.environment.SkyBoxSource.positiveX,null),negativeX:Geoworld.defaultValue(k._earthCtrl.environment.SkyBoxSource.negativeX,null),positiveY:Geoworld.defaultValue(k._earthCtrl.environment.SkyBoxSource.positiveY,null),negativeY:Geoworld.defaultValue(k._earthCtrl.environment.SkyBoxSource.negativeY,null),positiveZ:Geoworld.defaultValue(k._earthCtrl.environment.SkyBoxSource.positiveZ,null),negativeZ:Geoworld.defaultValue(k._earthCtrl.environment.SkyBoxSource.negativeZ,
null)},w={class:"VIEWPOINT",lon:k._earthCtrl.camera.viewPoint.lon,lat:k._earthCtrl.camera.viewPoint.lat,alt:k._earthCtrl.camera.viewPoint.alt,heading:k._earthCtrl.camera.viewPoint.heading,pitch:k._earthCtrl.camera.viewPoint.pitch,roll:k._earthCtrl.camera.viewPoint.roll,duration:k._earthCtrl.camera.viewPoint.duration};t.userScene.push(p);t.userScene.push(q);t.userScene.push(w);t=JSON.stringify(t);f&&f(t)})}});Object.defineProperties(v.prototype,{rootNode:{get:function(){return this._rootNode},set:function(f){this._rootNode=
f}},editNode:{get:function(){return this._editNode},set:function(f){this._editNode=f}},selectSet:{get:function(){return this._selectSet}},EventDocumentChanged:{get:function(){return this._EventDocumentChanged}},EventObjectPropertyChanged:{get:function(){return this._EventObjectPropertyChanged}}});return v});
define("GwInformationBar.js",[],function(){function v(k){this._earthCtrl=k;this._coreMap=k.coreMap;this.initialize()}new Geoworld.Ray;new Geoworld.Cartesian3;new Geoworld.Cartesian3;v.prototype.initialize=function(){var k=document.createElement("div");k.className="map-info-bar";k.style="position: absolute;left: 0px;bottom:0px;width: 100%;background:rgba(0,0,0,0.4); color:#e9e9e9; text-shadow:2px 2px 2px #000";var q=this._coreMap;q.container.appendChild(k);var f=document.createElement("div");f.style=
"float: right; min-width: 100px;margin-right: 20px;";k.appendChild(f);var p=document.createElement("div");p.style="float: right; min-width: 100px;margin-right: 20px;";k.appendChild(p);var t=document.createElement("div");t.style="float: right; min-width: 100px;margin-right: 20px;";k.appendChild(t);var w=q.scene.globe.ellipsoid;(new Geoworld.ScreenSpaceEventHandler(q.scene.canvas)).setInputAction(function(k){if(k=q.camera.pickEllipsoid(k.endPosition,w)){var v=q.scene.globe.ellipsoid.cartesianToCartographic(k);
k=Geoworld.Math.toDegrees(v.latitude).toFixed(6);var v=Geoworld.Math.toDegrees(v.longitude).toFixed(6),D=q.camera.positionCartographic.height.toFixed(1);t.innerHTML="\u7ecf\u5ea6\uff1a"+v;p.innerHTML="\u7eac\u5ea6\uff1a"+k;f.innerHTML="\u89c6\u70b9\u9ad8\uff1a"+D+"\u7c73"}},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)};return v});
define("Tools/GwToolManager.js",[],function(){function v(k){this.mEarthCtrl=k;this.mCoreMap=k.coreMap;this.tools={};this.canContinue=!0;this.initialize()}v.prototype.initialize=function(){function k(f){for(var k in q.tools)if(q.tools.hasOwnProperty(k)){var w=q.tools[k];if(w.mEnable&&(q.canContinue=!0,w.onInputMessage(f),!1===q.canContinue))break}}var q=this,f=document.getElementById("mapRenderCanvas");Geoworld.FeatureDetection.supportsPointerEvents()?(f.addEventListener("pointerdown",k,!0),f.addEventListener("pointerup",
k,!0),f.addEventListener("pointermove",k,!0),f.addEventListener("pointercancel",k,!0)):(f.addEventListener("mousedown",k,!0),f.addEventListener("mouseup",k,!0),f.addEventListener("touchstart",k,!0),f.addEventListener("touchend",k,!0),f.addEventListener("touchcancel",k,!0))};v.prototype.destory=function(){};v.prototype.setCanContinue=function(k){this.canContinue=k};v.prototype.registerTool=function(k,q){this.tools[k]=q;q.onActive()};v.prototype.unregisterTool=function(k){var q=this.tools[k];delete this.tools[k];
return q};v.prototype.browse=function(){this.clearTool()};v.prototype.selectObject=function(){this.clearTool()};v.prototype.activeTool=function(k){if(this.tools.hasOwnProperty(k))this.tools[k].onActive()};v.prototype.deactiveTool=function(k){if(this.tools.hasOwnProperty(k))this.tools[k].onDeactive()};v.prototype.deactiveAllTool=function(){for(var k in this.tools)if(this.tools.hasOwnProperty(key))k.onDeactive()};v.prototype.clearResult=function(){for(var k in this.tools)this.tools.hasOwnProperty(k)&&
this.tools[k].clearResult()};v.prototype.clearTool=function(){for(var k in this.tools)if(this.tools.hasOwnProperty(k)){var q=this.tools[k];q.onDeactive();q.destory()}this.tools={}};return v});
define("Parser/GwSceneConfigParser.js",["../GwObjectFactory.js","./GwSceneConfigNode.js","./GwSceneConfigRootNodes.js"],function(v,k,q){function f(){}function p(p,q,x,v){for(var D=0;D<q.length;D++){var z=q[D],C=null;!1!=z.enable&&(Geoworld.defined(z["class"])?("IMAGERY"===z["class"]&&(z["class"]=k.IMAGERY_LAYER),"TERRAIN"===z["class"]&&(z["class"]=k.TERRAIN_LAYER),C=z["class"]):(0===v?z.class=k.IMAGERY_LAYER:1===v&&(z.class=k.TERRAIN_LAYER),C=z.class),C=f.parserMap[C],void 0!==C&&C(p,z,x))}}f.parseBaseData=
function(f,k){var p=[];if(Geoworld.defined(k)&&Geoworld.defined(k.imageryProviders))for(var q=0;q<k.imageryProviders.length;q++){var D=k.imageryProviders[q];if(!1!==D.enable&&!1!==D.show){if(Geoworld.defined(D.tilingScheme)){var z=D.tilingScheme;"GeographicTilingScheme"===z.type&&(D.tilingScheme=new Geoworld.GeographicTilingScheme(z))}D=v.createImageryLayer(D);p.push(D)}}D=[];if(Geoworld.defined(k)&&Geoworld.defined(k.terrainProviders))for(q=0;q<k.terrainProviders.length;q++)z=k.terrainProviders[q],
!1!=z.enable&&!1!==z.show&&(z=v.createTerrainLayer(z),D.push(z));return{imageryProvider:p,terrainProvider:D}};f.parse=function(f,k){if(Geoworld.defined(k)){for(var x=[q.IMAGERYPROVIDERS,q.TERRAINPROVIDERS,q.MODELLAYERS,q.FEATURELAYERS,q.USERSCENE],A=0;A<x.length;A++){var D=f.factory.createSceneNode(v.createUUID(),x[A]);D.show=!0;f.userScene.addChild(f.userScene.rootNode,D)}Geoworld.defined(k[q.IMAGERYPROVIDERS])&&p(f,k[q.IMAGERYPROVIDERS],f.userScene.rootNode.getChildByIndex(0),0);Geoworld.defined(k[q.TERRAINPROVIDERS])&&
p(f,k[q.TERRAINPROVIDERS],f.userScene.rootNode.getChildByIndex(1),1);Geoworld.defined(k[q.MODELLAYERS])&&p(f,k[q.MODELLAYERS],f.userScene.rootNode.getChildByIndex(2));Geoworld.defined(k[q.FEATURELAYERS])&&p(f,k[q.FEATURELAYERS],f.userScene.rootNode.getChildByIndex(3));Geoworld.defined(k[q.USERSCENE])&&p(f,k[q.USERSCENE],f.userScene.rootNode.getChildByIndex(4))}};f.array2DtoMercator=function(f){var k=[];f.forEach(function(f){f=Geoworld.Cartesian3.fromDegrees(f[0],f[1],f[2]);k.push(f)});return k};f.parserMap=
{};f.parserMap[k.NODE]=function(f,k,q){var v=f.factory.createSceneNode(k.id,k.name);v.show=Geoworld.defaultValue(k.show,!0);f.userScene.addChild(q,v);Geoworld.defined(k.childNodes)&&p(f,k.childNodes,v)};f.parserMap[k.IMAGERY_LAYER]=function(f,k,p){if(Geoworld.defined(k.tilingScheme)){var q=k.tilingScheme;"GeographicTilingScheme"===q.type&&(k.tilingScheme=new Geoworld.GeographicTilingScheme(q))}f.factory.createImageryLayer(k,p)};f.parserMap[k.TERRAIN_LAYER]=function(f,k,p){f.factory.createTerrainLayer(k,
p)};f.parserMap[k.MODEL_LAYER]=function(f,k,p){k.addToMap=!0;var q=k.sourceType;"3DTiles"===q||"b3dm"===q||"osgb"===q||"s3m"===q||"ude_block"===q||"ude_model"===q?f.factory.createModelLayer(k,p):"czml"===q?f.factory.createCZMLObject(k,p):"wfsModel"===q&&f.factory.createWfsModel(k,p)};f.parserMap[k.FEATURE_LAYER]=function(f,k,p){f.factory.createFeatureLayer(k,p)};f.parserMap[k.SKYBOX]=function(f,k,p){f.coreMap.scene.skyBox=new Geoworld.SkyBox({sources:{positiveX:k.positiveX,negativeX:k.negativeX,positiveY:k.positiveY,
negativeY:k.negativeY,positiveZ:k.positiveZ,negativeZ:k.negativeZ}})};f.parserMap[k.ENVIRONMENT]=function(f,k,p){f.camera.undergroundMode=Geoworld.defaultValue(k.underGround,!1);f.shadows=Geoworld.defaultValue(k.shadow,!1);!0===k.rain&&f.environment.showEffect("rain");!0===k.snow&&f.environment.showEffect("snow");!0===k.fog&&f.environment.showEffect("fog");f.coreMap.scene.globe.depthTestAgainstTerrain=Geoworld.defaultValue(k.depthTest,!1);!0===k.bwMode&&f.environment.showEffect("bwMode");!0===k.nightMode&&
f.environment.showEffect("nightMode");!0===k.colorAdjustment.show&&(f.environment.showEffect("colorAdjustment"),f.environment.colorAdjustment.contrast=k.colorAdjustment.contrast,f.environment.colorAdjustment.saturation=k.colorAdjustment.saturation,f.environment.colorAdjustment.brightness=k.colorAdjustment.brightness)};f.parserMap[k.VIEWPOINT]=function(f,k,p){f.camera.viewPoint=k;f.camera.flyTo(k.lon,k.lat,k.alt,k.heading,k.pitch,k.roll,k.duration)};f.parserMap[k.MODEL]=function(f,k,p){f.factory.createModel(k,
p)};f.parserMap[k.WATERS]=function(f,k,p){f.factory.createWaters(k,p)};f.parserMap[k.EXPLOSION]=function(f,k,p){f.factory.createExplosion(k,p)};f.parserMap[k.FIREWORK]=function(f,k,p){f.factory.createFireworks(k,p)};f.parserMap[k.SMOKE]=function(f,k,p){f.factory.createSmoke(k,p)};f.parserMap[k.FIRE]=function(f,k,p){f.factory.createFire(k,p)};f.parserMap[k.RADARSCAN]=function(f,k,p){k.color&&(k.color=new Geoworld.Color(k.color.red,k.color.green,k.color.blue,k.color.alpha));f.factory.createRadarScan(k,
p)};f.parserMap[k.CIRCLESCAN]=function(f,k,p){k.color&&(k.color=new Geoworld.Color(k.color.red,k.color.green,k.color.blue,k.color.alpha));f.factory.createCircleScan(k,p)};f.parserMap[k.POINT]=function(f,k,p){k.color&&(k.color=new Geoworld.Color(k.color.red,k.color.green,k.color.blue,k.color.alpha));k.outlineColor&&(k.outlineColor=new Geoworld.Color(k.color.red,k.color.green,k.color.blue,k.color.alpha));f.factory.createPoint(k,p)};f.parserMap[k.LABEL]=function(f,k,p){k.fillColor&&(k.fillColor=new Geoworld.Color(k.fillColor.red,
k.fillColor.green,k.fillColor.blue,k.fillColor.alpha));f.factory.createLabel(k,p)};f.parserMap[k.BILLBOARD]=function(f,k,p){f.factory.createBillboard(k,p)};f.parserMap[k.POLYLINE]=function(k,p,q){p.positions&&(p.positions=f.array2DtoMercator(p.positions));p.lineColor&&(p.lineColor=new Geoworld.Color(p.lineColor.red,p.lineColor.green,p.lineColor.blue,p.lineColor.alpha));p.outlineColor&&(p.outlineColor=new Geoworld.Color(p.outlineColor.red,p.outlineColor.green,p.outlineColor.blue,p.outlineColor.alpha));
k.factory.createPolyline(p,q)};f.parserMap[k.POLYGON]=function(k,p,q){p.material&&(p.material=new Geoworld.Color(p.material.red,p.material.green,p.material.blue,p.material.alpha));p.outlineColor&&(p.outlineColor=new Geoworld.Color(p.outlineColor.red,p.outlineColor.green,p.outlineColor.blue,p.outlineColor.alpha));p.positions&&(p.positions=f.array2DtoMercator(p.positions));k.factory.createPolygon(p,q)};f.parserMap[k.RECTANGLE]=function(f,k,p){k.coordinates&&(k.coordinates=Geoworld.Rectangle.fromDegrees(k.coordinates[0],
k.coordinates[1],k.coordinates[2],k.coordinates[3]));k.fillColor&&(k.fillColor=new Geoworld.Color(k.fillColor.red,k.fillColor.green,k.fillColor.blue,k.fillColor.alpha));k.outlineColor&&(k.outlineColor=new Geoworld.Color(k.outlineColor.red,k.outlineColor.green,k.outlineColor.blue,k.outlineColor.alpha));f.factory.createRectangle(k,p)};f.parserMap[k.ELLIPSE]=function(f,k,p){f.factory.createEllipse(k,p)};f.parserMap[k.BOX]=function(f,k,p){k.material&&(k.material=new Geoworld.Color(k.material.red,k.material.green,
k.material.blue,k.material.alpha));k.outlineColor&&(k.outlineColor=new Geoworld.Color(k.outlineColor.red,k.outlineColor.green,k.outlineColor.blue,k.outlineColor.alpha));k.position&&(k.position=Geoworld.Cartesian3.fromDegrees(k.position[0],k.position[1],k.position[2]));k.dimensions&&(k.dimensions=new Geoworld.Cartesian3(k.dimensions.x,k.dimensions.y,k.dimensions.z));f.factory.createBox(k,p)};f.parserMap[k.ELLIPSOID]=function(f,k,p){k.material&&(k.material=new Geoworld.Color(k.material.red,k.material.green,
k.material.blue,k.material.alpha));k.outlineColor&&(k.outlineColor=new Geoworld.Color(k.outlineColor.red,k.outlineColor.green,k.outlineColor.blue,k.outlineColor.alpha));k.position&&(k.position=Geoworld.Cartesian3.fromDegrees(k.position[0],k.position[1],k.position[2]));k.radii&&(k.radii=new Geoworld.Cartesian3(k.radii[0],k.radii[1],k.radii[2]));f.factory.createEllipsoid(k,p)};f.parserMap[k.CYLINDER]=function(f,k,p){k.material&&(k.material=new Geoworld.Color(k.material.red,k.material.green,k.material.blue,
k.material.alpha));k.outlineColor&&(k.outlineColor=new Geoworld.Color(k.outlineColor.red,k.outlineColor.green,k.outlineColor.blue,k.outlineColor.alpha));k.position&&(k.position=Geoworld.Cartesian3.fromDegrees(k.position[0],k.position[1],k.position[2]));f.factory.createCylinder(k,p)};f.parserMap[k.POLYLINEVOLUME]=function(f,k,p){f.factory.createPolylineVolume(k,p)};f.parserMap[k.PERSPECTIVE_VIDEO_PROJECTION]=function(f,k,p){f.factory.createVideoProjection(k,p)};f.parserMap[k.FISHEYE_VIDEO_PROJECTION]=
function(f,k,p){f.factory.createVideoProjection(k,p)};f.parserMap[k.TRACK]=function(f,k,p){f.factory.createTrack(k,p)};f.parserMap[k.HEATMAP]=function(f,k,p){f.factory.createHeatmap(k,p)};f.parserMap[k.ECHARTLAYER]=function(f,k,p){f.factory.createEChartLayer(k,p)};f.parserMap.ELEMENT=function(f,k,p){k=f.factory.createElement(k);f.userScene.addChild(p,k)};return f});
define("Tools/Edit/GwBillboardEdit.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="BillboardEditTool";this.pickedEntity=this.editBillboard=void 0;this.isEditing=!1},initialize:function(k,q,f,p){this._super(k,f,p);this.editBillboard=q;Geoworld.defined(this.editBillboard)&&Geoworld.defined(this.editBillboard.entity.billboard)?console.info(this.editBillboard.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Billboard entity is need!"}))},destory:function(){},
onLButtonDown:function(k){this._super(k);this.pickedEntity={};this.pickObject(k,this.pickedEntity)&&(k=this.pickedEntity.pickedObject.id,k.id===this.editBillboard.entity.id&&(this.isEditing=!0,this.currentPoint=k),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1)},onLButtonUp:function(k){if(!1===this._super(k)||!this.isEditing)return!1;(Geoworld.defined(this.editBillboard.entity)||this.pickObject(k,this.editBillboard.entity))&&
this.mCallback&&this.mCallback(this.editBillboard);this.currentPoint=void 0;this.isEditing=!1;return!0},onLButtonDrag:function(k){if(!this.isEditing)return!1;if(Geoworld.defined(this.currentPoint)){k=this.mEarthCtrl.coreMap.camera.pickEllipsoid(k,this.mEarthCtrl.coreMap.scene.globe.ellipsoid);if(!k)return;this.currentPoint.position=k;this.editBillboard.entity.position=k}this.mCallback&&this.mCallback(this.editBillboard);return!0},updateBillboard:function(k){if(Geoworld.defined(k)&&Geoworld.defined(this.editBillboard))for(var q=
Object.keys(k),f=0;f<q.length;f++){var p=q[f];"position"===p?this.editBillboard.entity.position=k[p]:Geoworld.defined(k[p])&&(this.editBillboard.entity.billboard[p]=k[p])}},endEditEntity:function(){}})});
define("Tools/Edit/GwPointEdit.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="PointEditTool";this.pickedEntity=this.editPoint=void 0;this.isEditing=!1},initialize:function(k,q,f,p){this._super(k,f,p);this.editPoint=q;Geoworld.defined(this.editPoint)&&Geoworld.defined(this.editPoint.entity.point)?console.info(this.editPoint.entity.point):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Point entity is need!"}))},destory:function(){},onLButtonDown:function(k){this._super(k);
this.pickedEntity={};this.pickObject(k,this.pickedEntity)&&(k=this.pickedEntity.pickedObject.id,k.id===this.editPoint.entity.id&&(this.isEditing=!0,this.currentPoint=k),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1)},onLButtonUp:function(k){if(!1===this._super(k)||!this.isEditing)return!1;(Geoworld.defined(this.editPoint.entity)||this.pickObject(k,this.editPoint.entity))&&this.mCallback&&this.mCallback(this.editPoint);
this.currentPoint=void 0;this.isEditing=!1;return!0},onLButtonDrag:function(k){if(!this.isEditing)return!1;if(Geoworld.defined(this.currentPoint)){k=this.mEarthCtrl.coreMap.camera.pickEllipsoid(k,this.mEarthCtrl.coreMap.scene.globe.ellipsoid);if(!k)return;this.currentPoint.position=k;this.editPoint.entity.position=k}this.mCallback&&this.mCallback(this.editPoint);return!0},updatePoint:function(k){if(Geoworld.defined(k)&&Geoworld.defined(this.editPoint))for(var q=Object.keys(k),f=0;f<q.length;f++){var p=
q[f];"position"===p?this.editPoint.entity.position=k[p]:Geoworld.defined(k[p])&&(this.editPoint.entity.point[p]=k[p])}},endEditEntity:function(){}})});
define("Tools/Edit/GwBoxEdit.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="BoxEditTool";this.pickEditWHPoint=this.pickEditHeightPoint=this.editWHPoint=this.editHeightPoint=this.pickedEntity=this.editBox=void 0;this.isEditing=!1;this.pointsId=[];this.height=0;this.dragPosition=void 0},initialize:function(k,q,f,p){this._super(k,f,p);this.editBox=q;Geoworld.defined(this.editBox)&&Geoworld.defined(this.editBox.entity.box)?(this.height=Geoworld.Cartographic.fromCartesian(this.editBox.entity.position._value).height,
k=new Geoworld.Cartesian3,q=new Geoworld.Cartesian3,this.getNorthPointByDistance(k,q),this.editHeightPoint=this.mEarthCtrl.entities.add({name:"box_edit_height_point",position:k,point:{heightReference:this.editBox.entity.box.heightReference,color:Geoworld.Color.WHITE,pixelSize:12,outlineColor:Geoworld.Color.BLACK,outlineWidth:1}}),this.pointsId.push(this.editHeightPoint.id),this.editWHPoint=this.mEarthCtrl.entities.add({name:"box_edit_long_width_point",position:q,point:{heightReference:this.editBox.entity.box.heightReference,
color:Geoworld.Color.RED,pixelSize:12,outlineColor:Geoworld.Color.BLACK,outlineWidth:1}}),this.pointsId.push(this.editWHPoint.id)):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Box entity is need!"}))},addHeight:function(k){var q=Geoworld.Cartographic.fromCartesian(this.editBox.entity.position._value);this.height=q.height+k;return Geoworld.Cartesian3.fromRadians(q.longitude,q.latitude,this.height)},getNorthPointByDistance:function(k,q,f){var p=void 0;console.info(this.editBox.entity.position);
p=Geoworld.defined(f)?this.editBox.entity.position.getValue(f):this.editBox.entity.position._value;f=Geoworld.Transforms.eastNorthUpToFixedFrame(p);p=new Geoworld.Cartesian3;Geoworld.Cartesian3.divideByScalar(this.editBox.entity.box.dimensions._value,2,p);Geoworld.Cartesian3.clone(p,k);Geoworld.Cartesian3.clone(p,q);k.y*=-1;Geoworld.Matrix4.multiplyByPoint(f,k,k);q.y*=-1;q.z*=-1;Geoworld.Matrix4.multiplyByPoint(f,q,q)},destory:function(){},onLButtonDown:function(k){this._super(k);this.pickedEntity=
{};this.pickObject(k,this.pickedEntity)&&(k=this.pickedEntity.pickedObject.id,k.id===this.editBox.entity.id?(this.isEditing=!0,this.currentPoint=k,this.pickEditWHPoint=this.pickEditHeightPoint=void 0):"box_edit_height_point"===k.name?(this.isEditing=!0,this.currentPoint=void 0,this.pickEditHeightPoint=k,this.pickEditWHPoint=void 0):"box_edit_long_width_point"===k.name&&(this.isEditing=!0,this.pickEditHeightPoint=this.currentPoint=void 0,this.pickEditWHPoint=k),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=
!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1)},onLButtonUp:function(k){if(!1===this._super(k)||!this.isEditing)return!1;(Geoworld.defined(this.editBox)||this.pickObject(k,this.editBox.entity))&&this.mCallback&&this.mCallback(this.editBox);this.currentPoint=void 0;this.isEditing=!1;this.dragPosition=void 0;return!0},onLButtonDrag:function(k){if(!this.isEditing)return!1;var q=Geoworld.JulianDate.fromDate(new Date);if(Geoworld.defined(this.currentPoint)||Geoworld.defined(this.pickEditHeightPoint)||
Geoworld.defined(this.pickEditWHPoint)){k=this.mEarthCtrl.coreMap.camera.pickEllipsoid(k,this.mEarthCtrl.coreMap.scene.globe.ellipsoid);if(!k)return;var f=Geoworld.Cartographic.fromCartesian(k),p=Geoworld.Cartesian3.fromRadians(f.longitude,f.latitude,f.height+this.height);if(Geoworld.defined(this.currentPoint))this.currentPoint.position=p,this.editBox.entity.position=new Geoworld.CallbackProperty(function(){return p},!1);else if(Geoworld.defined(this.dragPosition))if(Geoworld.defined(this.pickEditWHPoint)){var f=
Geoworld.Cartesian3.subtract(k,this.dragPosition,new Geoworld.Cartesian3),t=Geoworld.Cartesian3.normalize(f,new Geoworld.Cartesian3);Geoworld.Cartesian3.dot(f,t,f);var w=Geoworld.Cartesian3.clone(this.editBox.entity.box.dimensions._value);w.x-=f.x;w.y+=f.y;Geoworld.Cartesian3.abs(w,w);this.editBox.entity.box.dimensions=new Geoworld.CallbackProperty(function(){return w},!1)}else Geoworld.defined(this.pickEditHeightPoint)&&(f=Geoworld.Cartesian3.subtract(k,this.dragPosition,new Geoworld.Cartesian3),
t=Geoworld.Cartesian3.clone(this.editBox.entity.box.dimensions._value),t.z+=f.z,Geoworld.Cartesian3.abs(t,t),this.editBox.entity.box.dimensions=t,this.editBox.entity.position=this.addHeight(f.z/2));this.dragPosition=k;k=new Geoworld.Cartesian3;f=new Geoworld.Cartesian3;this.getNorthPointByDistance(k,f,q);this.editHeightPoint.position=k;this.editWHPoint.position=f}this.mCallback&&this.mCallback(this.editBox);return!0},updateBox:function(k){if(Geoworld.defined(k)&&Geoworld.defined(this.editBox))for(var q=
Object.keys(k),f=0;f<q.length;f++){var p=q[f];"position"===p?this.editBox.entity.position=k[p]:Geoworld.defined(k[p])&&(this.editBox.entity.box[p]=k[p])}},endEditEntity:function(){for(var k=0;k<this.pointsId.length;k++)this.mEarthCtrl.entities.removeById(this.pointsId[k]);this.pointsId=[]}})});
define("Tools/Edit/GwCylinderEdit.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="CylinderEditTool";this.pickedEntity=this.editCylinder=void 0;this.isEditing=!1;this.pointsId=[];this.height=0;this.dragPosition=this.pickHeightPoint=this.heightPoint=this.pickBottomRadiusPoint=this.bottomRadiusPoint=this.pickTopRadiusPoint=this.topRadiusPoint=void 0},initialize:function(k,q,f,p){this._super(k,f,p);this.editCylinder=q;if(Geoworld.defined(this.editCylinder)&&
Geoworld.defined(this.editCylinder.entity.cylinder)){this.height=Geoworld.Cartographic.fromCartesian(this.editCylinder.entity.position._value).height;k=this.editCylinder.entity.cylinder.topRadius._value;q=this.editCylinder.entity.cylinder.bottomRadius._value;f=new Geoworld.Cartesian3;p=new Geoworld.Cartesian3;var t=new Geoworld.Cartesian3;this.getNorthPointByDistance(f,p,t);this.heightPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_height_point",position:t,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,
color:Geoworld.Color.WHITE,pixelSize:12,outlineColor:Geoworld.Color.BLACK,outlineWidth:1}});this.pointsId.push(this.heightPoint.id);0<k&&(this.topRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_top_radius_point",position:f,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:Geoworld.Color.RED,pixelSize:12,outlineColor:Geoworld.Color.BLACK,outlineWidth:1}}),this.pointsId.push(this.topRadiusPoint.id));0<q&&(this.bottomRadiusPoint=this.mEarthCtrl.entities.add({name:"cylinder_edit_bottom_radius_point",
position:p,point:{heightReference:this.editCylinder.entity.cylinder.heightReference,color:Geoworld.Color.RED,pixelSize:12,outlineColor:Geoworld.Color.BLACK,outlineWidth:1}}),this.pointsId.push(this.bottomRadiusPoint.id))}else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Cylinder entity is need!"})},addHeight:function(k){var q=Geoworld.Cartographic.fromCartesian(this.editCylinder.entity.position._value);this.height=q.height+k;return Geoworld.Cartesian3.fromRadians(q.longitude,q.latitude,this.height)},
getNorthPointByDistance:function(k,q,f){var p=Geoworld.Transforms.eastNorthUpToFixedFrame(this.editCylinder.entity.position._value),t=this.editCylinder.entity.cylinder.length._value,w=this.editCylinder.entity.cylinder.topRadius._value,x=this.editCylinder.entity.cylinder.bottomRadius._value;0<w&&(k.z+=t/2,k.x+=w,Geoworld.Matrix4.multiplyByPoint(p,k,k));0<x&&(q.x+=x,q.z-=t/2,Geoworld.Matrix4.multiplyByPoint(p,q,q));f.z+=t/2;Geoworld.Matrix4.multiplyByPoint(p,f,f)},destory:function(){},onLButtonDown:function(k){this._super(k);
this.pickedEntity={};this.pickObject(k,this.pickedEntity)&&(k=this.pickedEntity.pickedObject.id,k.id===this.editCylinder.entity.id?(this.isEditing=!0,this.currentPoint=k,this.pickBottomRadiusPoint=this.pickTopRadiusPoint=this.pickHeightPoint=void 0):"cylinder_edit_height_point"===k.name?(this.isEditing=!0,this.currentPoint=void 0,this.pickHeightPoint=k,this.pickBottomRadiusPoint=this.pickTopRadiusPoint=void 0):"cylinder_edit_top_radius_point"===k.name?(this.isEditing=!0,this.pickHeightPoint=this.currentPoint=
void 0,this.pickTopRadiusPoint=k,this.pickBottomRadiusPoint=void 0):"cylinder_edit_bottom_radius_point"===k.name&&(this.isEditing=!0,this.pickTopRadiusPoint=this.pickHeightPoint=this.currentPoint=void 0,this.pickBottomRadiusPoint=k),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1)},onLButtonUp:function(k){if(!1===this._super(k)||!this.isEditing)return!1;(Geoworld.defined(this.editCylinder)||this.pickObject(k,
this.editCylinder.entity))&&this.mCallback&&this.mCallback(this.editCylinder);this.dragPosition=this.currentPoint=void 0;this.isEditing=!1;return!0},onLButtonDrag:function(k){if(!this.isEditing)return!1;if(Geoworld.defined(this.currentPoint)||Geoworld.defined(this.heightPoint)||Geoworld.defined(this.topRadiusPoint)||Geoworld.defined(this.bottomRadiusPoint)){k=this.mEarthCtrl.coreMap.camera.pickEllipsoid(k,this.mEarthCtrl.coreMap.scene.globe.ellipsoid);if(!k)return;var q=Geoworld.Cartographic.fromCartesian(k),
q=Geoworld.Cartesian3.fromRadians(q.longitude,q.latitude,q.height+this.height);if(Geoworld.defined(this.currentPoint))this.currentPoint.position=q,this.editCylinder.entity.position=q;else if(Geoworld.defined(this.dragPosition))if(Geoworld.defined(this.pickHeightPoint)){var q=Geoworld.Cartesian3.subtract(k,this.dragPosition,new Geoworld.Cartesian3),f=this.editCylinder.entity.cylinder.length._value,f=f+q.z,f=Math.abs(f);this.editCylinder.entity.position=this.addHeight(q.z/2);this.editCylinder.entity.cylinder.length=
f}else Geoworld.defined(this.pickTopRadiusPoint)?(q=Geoworld.Cartesian3.subtract(k,this.dragPosition,new Geoworld.Cartesian3),f=this.editCylinder.entity.cylinder.topRadius._value,f-=q.x,f=Math.abs(f),this.editCylinder.entity.cylinder.topRadius=f):Geoworld.defined(this.pickBottomRadiusPoint)&&(q=Geoworld.Cartesian3.subtract(k,this.dragPosition,new Geoworld.Cartesian3),f=this.editCylinder.entity.cylinder.bottomRadius._value,f-=q.x,f=Math.abs(f),this.editCylinder.entity.cylinder.bottomRadius=f);this.dragPosition=
k;k=this.editCylinder.entity.cylinder.topRadius._value;var q=this.editCylinder.entity.cylinder.bottomRadius._value,f=new Geoworld.Cartesian3,p=new Geoworld.Cartesian3,t=new Geoworld.Cartesian3;this.getNorthPointByDistance(f,p,t);0<k&&(this.topRadiusPoint.position=f);0<q&&(this.bottomRadiusPoint.position=p);this.heightPoint.position=t}this.mCallback&&this.mCallback(this.editCylinder);return!0},updateCylinder:function(k){if(Geoworld.defined(k)&&Geoworld.defined(this.editCylinder))for(var q=Object.keys(k),
f=0;f<q.length;f++){var p=q[f];"position"===p?this.editCylinder.entity.position=k[p]:Geoworld.defined(k[p])&&(this.editCylinder.entity.cylinder[p]=k[p])}},endEditEntity:function(){for(var k=0;k<this.pointsId.length;k++)this.mEarthCtrl.entities.removeById(this.pointsId[k]);this.pointsId=[]}})});
define("Tools/Edit/GwEllipseEdit.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="EllipseEditTool";this.pickSemiMinorAxisPoint=this.pickSemiMajorAxisPoint=this.semiMinorAxisPoint=this.semiMajorAxisPoint=this.pickedEntity=this.editEllipse=void 0;this.pointsId=[];this.circle=this.isEditing=!1},initialize:function(k,q,f,p){this._super(k,f,p);this.editEllipse=q;Geoworld.defined(this.editEllipse)&&Geoworld.defined(this.editEllipse.entity.ellipse)?(k=this.updatePoint(Geoworld.Math.PI_OVER_TWO),
this.semiMajorAxisPoint=this.mEarthCtrl.entities.add({name:"semi_major_axis_point",position:k,point:{heightReference:this.editEllipse.entity.ellipse.heightReference,color:Geoworld.Color.WHITE,pixelSize:12,outlineColor:Geoworld.Color.BLACK,outlineWidth:1}}),this.pointsId.push(this.semiMajorAxisPoint.id)):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipse entity is need!"}))},updatePoint:function(k){var q=new Geoworld.Cartesian3,f=new Geoworld.Cartesian3,p=new Geoworld.Cartesian3,t=this.editEllipse.entity.ellipse;
this.semiMinorAxis=t.semiMinorAxis._value;this.semiMajorAxis=t.semiMajorAxis._value;this.circle=this.semiMajorAxis===this.semiMinorAxis;t=Geoworld.defaultValue(t.rotation,0);this.center=this.editEllipse.entity.position._value;var w=this.semiMinorAxis*this.semiMinorAxis,x=this.semiMajorAxis*this.semiMajorAxis,v=this.semiMajorAxis*this.semiMinorAxis,D=Geoworld.Cartesian3.magnitude(this.center),q=Geoworld.Cartesian3.normalize(this.center,q),f=Geoworld.Cartesian3.cross(Geoworld.Cartesian3.UNIT_Z,this.center,
f),f=Geoworld.Cartesian3.normalize(f,f),p=Geoworld.Cartesian3.cross(q,f,p),z=new Geoworld.Cartesian3;return Geoworld.EllipseGeometryLibrary.pointOnEllipsoid(k,t,p,f,w,v,x,D,q,z)},destory:function(){},onLButtonDown:function(k){this._super(k);this.pickedEntity={};this.pickObject(k,this.pickedEntity)&&(k=this.pickedEntity.pickedObject.id,k.id===this.editEllipse.entity.id?(this.isEditing=!0,this.currentPoint=k,this.pickSemiMinorAxisPoint=this.pickSemiMajorAxisPoint=void 0):"semi_minor_axis_point"===k.name?
(this.isEditing=!0,this.pickSemiMajorAxisPoint=this.currentPoint=void 0,this.pickSemiMinorAxisPoint=k):"semi_major_axis_point"===k.name&&(this.isEditing=!0,this.currentPoint=void 0,this.pickSemiMajorAxisPoint=k,this.pickSemiMinorAxisPoint=void 0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1)},onLButtonUp:function(k){if(!1===this._super(k)||!this.isEditing)return!1;(Geoworld.defined(this.editEllipse)||
this.pickObject(k,this.editEllipse.entity))&&this.mCallback&&this.mCallback(this.editEllipse);this.currentPoint=void 0;this.isEditing=!1;return!0},onLButtonDrag:function(k){if(!this.isEditing)return!1;if(Geoworld.defined(this.currentPoint)||Geoworld.defined(this.pickSemiMajorAxisPoint)||Geoworld.defined(this.pickSemiMinorAxisPoint)){k=this.mEarthCtrl.coreMap.camera.pickEllipsoid(k,this.mEarthCtrl.coreMap.scene.globe.ellipsoid);if(!k)return;if(Geoworld.defined(this.currentPoint))this.currentPoint.position=
k,this.editEllipse.entity.position=k;else if(Geoworld.defined(this.pickSemiMajorAxisPoint)){k=Geoworld.Cartesian3.distance(this.center,k);this.editEllipse.entity.ellipse.semiMajorAxis=k;var q=k*this.semiMinorAxis/this.semiMajorAxis;q>k&&(q=k);this.editEllipse.entity.ellipse.semiMinorAxis=q}else Geoworld.defined(this.pickSemiMinorAxisPoint)&&(k=Geoworld.Cartesian3.distance(this.center,k),this.editEllipse.entity.ellipse.semiMinorAxis=k);this.semiMajorAxisPoint.position=this.updatePoint(Geoworld.Math.PI_OVER_TWO)}this.mCallback&&
this.mCallback(this.editEllipse);return!0},updateEllipse:function(k){if(Geoworld.defined(k)&&Geoworld.defined(this.editEllipse))for(var q=Object.keys(k),f=0;f<q.length;f++){var p=q[f];"position"===p?this.editEllipse.entity.position=k[p]:Geoworld.defined(k[p])&&(this.editEllipse.entity.ellipse[p]=k[p])}},endEditEntity:function(){for(var k=0;k<this.pointsId.length;k++)this.mEarthCtrl.entities.removeById(this.pointsId[k]);this.pointsId=[]}})});
define("Tools/Edit/GwEllipsoidEdit.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="EllipsoidEditTool";this.pickedEntity=this.editEllipsoid=void 0;this.height=0;this.isEditing=!1;this.pointsId=[];this.dragPosition=this.pickRadiiZPoint=this.radiiZPoint=this.pickRadiiYPoint=this.radiiYPoint=this.pickRadiiXPoint=this.radiiXPoint=void 0},initialize:function(k,q,f,p){this._super(k,f,p);this.editEllipsoid=q;Geoworld.defined(this.editEllipsoid)&&Geoworld.defined(this.editEllipsoid.entity.ellipsoid)?
(console.info(this.editEllipsoid.ellipsoid),this.height=Geoworld.Cartographic.fromCartesian(this.editEllipsoid.entity.position._value).height,k=new Geoworld.Cartesian3,q=new Geoworld.Cartesian3,f=new Geoworld.Cartesian3,this.getNorthPointByDistance(k,q,f),this.radiiXPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_x_point",position:k,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:Geoworld.Color.WHITE,pixelSize:12,outlineColor:Geoworld.Color.BLACK,outlineWidth:1}}),
this.pointsId.push(this.radiiXPoint.id),this.radiiYPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_y_point",position:q,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:Geoworld.Color.WHITE,pixelSize:12,outlineColor:Geoworld.Color.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiYPoint.id),this.radiiZPoint=this.mEarthCtrl.entities.add({name:"ellipse_edit_z_point",position:f,point:{heightReference:this.editEllipsoid.entity.ellipsoid.heightReference,color:Geoworld.Color.WHITE,
pixelSize:12,outlineColor:Geoworld.Color.BLACK,outlineWidth:1}}),this.pointsId.push(this.radiiZPoint.id)):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Ellipsoid entity is need!"}))},addHeight:function(k){var q=Geoworld.Cartographic.fromCartesian(this.editEllipsoid.entity.position._value);this.height=q.height+k;return Geoworld.Cartesian3.fromRadians(q.longitude,q.latitude,this.height)},getNorthPointByDistance:function(k,q,f){var p=Geoworld.Transforms.eastNorthUpToFixedFrame(this.editEllipsoid.entity.position._value),
t=this.editEllipsoid.entity.ellipsoid.radii._value;k.x=t.x;Geoworld.Matrix4.multiplyByPoint(p,k,k);q.y=-t.y;Geoworld.Matrix4.multiplyByPoint(p,q,q);f.z=t.z;Geoworld.Matrix4.multiplyByPoint(p,f,f)},destory:function(){},onLButtonDown:function(k){this._super(k);this.pickedEntity={};this.pickObject(k,this.pickedEntity)&&(k=this.pickedEntity.pickedObject.id,k.id===this.editEllipsoid.entity.id?(this.isEditing=!0,this.currentPoint=k,this.pickRadiiZPoint=this.pickRadiiYPoint=this.pickRadiiXPoint=void 0):
"ellipse_edit_x_point"===k.name?(this.isEditing=!0,this.currentPoint=void 0,this.pickRadiiXPoint=k,this.pickRadiiZPoint=this.pickRadiiYPoint=void 0):"ellipse_edit_y_point"===k.name?(this.isEditing=!0,this.pickRadiiXPoint=this.currentPoint=void 0,this.pickRadiiYPoint=k,this.pickRadiiZPoint=void 0):"ellipse_edit_z_point"===k.name&&(this.isEditing=!0,this.pickRadiiYPoint=this.pickRadiiXPoint=this.currentPoint=void 0,this.pickRadiiZPoint=k),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=
!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1)},onLButtonUp:function(k){if(!1===this._super(k)||!this.isEditing)return!1;(Geoworld.defined(this.editEllipsoid)||this.pickObject(k,this.editEllipsoid.entity))&&this.mCallback&&this.mCallback(this.editEllipsoid);this.dragPosition=this.currentPoint=void 0;this.isEditing=!1;return!0},onLButtonDrag:function(k){if(!this.isEditing)return!1;if(Geoworld.defined(this.currentPoint)||Geoworld.defined(this.pickRadiiXPoint)||Geoworld.defined(this.pickRadiiYPoint)||
Geoworld.defined(this.pickRadiiZPoint)){k=this.mEarthCtrl.coreMap.camera.pickEllipsoid(k,this.mEarthCtrl.coreMap.scene.globe.ellipsoid);if(!k)return;var q=Geoworld.Cartographic.fromCartesian(k),q=Geoworld.Cartesian3.fromRadians(q.longitude,q.latitude,q.height+this.height);if(Geoworld.defined(this.currentPoint))this.currentPoint.position=q,this.editEllipsoid.entity.position=q;else{if(Geoworld.defined(this.dragPosition)){var q=Geoworld.Cartesian3.subtract(k,this.dragPosition,new Geoworld.Cartesian3),
f=Geoworld.Cartesian3.normalize(q,new Geoworld.Cartesian3);Geoworld.Cartesian3.dot(q,f,q);f=Geoworld.Cartesian3.clone(this.editEllipsoid.entity.ellipsoid.radii._value);Geoworld.defined(this.pickRadiiXPoint)?f.x-=q.x:Geoworld.defined(this.pickRadiiYPoint)?f.y+=q.y:Geoworld.defined(this.pickRadiiZPoint)&&(f.z+=q.z,this.editEllipsoid.entity.position=this.addHeight(q.z));Geoworld.Cartesian3.abs(f,f);this.editEllipsoid.entity.ellipsoid.radii=f}this.dragPosition=k}k=new Geoworld.Cartesian3;q=new Geoworld.Cartesian3;
f=new Geoworld.Cartesian3;this.getNorthPointByDistance(k,q,f);this.radiiXPoint.position=k;this.radiiYPoint.position=q;this.radiiZPoint.position=f}this.mCallback&&this.mCallback(this.editEllipsoid);return!0},updateEllipsoid:function(k){if(Geoworld.defined(k)&&Geoworld.defined(this.editEllipsoid))for(var q=Object.keys(k),f=0;f<q.length;f++){var p=q[f];"position"===p?this.editEllipsoid.entity.position=k[p]:Geoworld.defined(k[p])&&(this.editEllipsoid.entity.ellipsoid[p]=k[p])}},endEditEntity:function(){for(var k=
0;k<this.pointsId.length;k++)this.mEarthCtrl.entities.removeById(this.pointsId[k]);this.pointsId=[]}})});
define("Tools/Edit/GwPolygonEdit.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="PolygonEditTool";this.currentPoint=this.pickedEntity=this.editPolygon=void 0;this.pointsId=[];this.isEditing=!1},initialize:function(k,q,f,p){this._super(k,f,p);this.editPolygon=q;if(Geoworld.defined(this.editPolygon)&&Geoworld.defined(this.editPolygon.entity.polygon))for(k=0;k<this.editPolygon.entity.polygon.hierarchy._value.positions.length;k++)q=this.mEarthCtrl.entities.add({name:"polygon_point",
position:this.editPolygon.entity.polygon.hierarchy._value.positions[k],point:{color:Geoworld.Color.WHITE,pixelSize:8,outlineColor:Geoworld.Color.BLACK,outlineWidth:1}}),this.pointsId.push(q.id);else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polygon entity is need!"})},destory:function(){},onLButtonDown:function(k){this._super(k);this.pickedEntity={};this.pickObject(k,this.pickedEntity)&&(k=this.pickedEntity.pickedObject.id,k.id===this.editPolygon.entity.id?(this.isEditing=!0,this.currentPoint=
void 0):"polygon_point"===k.name&&(this.currentPoint=k,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1)},onLButtonUp:function(k){if(!1===this._super(k)||!this.isEditing)return!1;(Geoworld.defined(this.editPolygon)||this.pickObject(k,this.editPolygon.entity))&&this.mCallback&&this.mCallback(this.editPolygon);this.currentPoint=void 0;this.isEditing=!1;return!0},onLButtonDrag:function(k){if(!this.isEditing)return!1;
if(Geoworld.defined(this.currentPoint)){k=this.mEarthCtrl.coreMap.camera.pickEllipsoid(k,this.mEarthCtrl.coreMap.scene.globe.ellipsoid);if(!k)return;this.currentPoint.position=k;k=[];for(var q=0;q<this.pointsId.length;q++)k.push(this.mEarthCtrl.entities.getById(this.pointsId[q]).position._value);this.editPolygon.entity.polygon.hierarchy=k}this.mCallback&&this.mCallback(this.editPolygon);return!0},updatePolygon:function(k){if(Geoworld.defined(k)&&Geoworld.defined(this.editPolygon))for(var q=Object.keys(k),
f=0;f<q.length;f++){var p=q[f];Geoworld.defined(k[p])&&(this.editPolygon.entity.polygon[p]=k[p])}},endEditEntity:function(){for(var k=0;k<this.pointsId.length;k++)this.mEarthCtrl.entities.removeById(this.pointsId[k]);this.pointsId=[]}})});
define("Tools/Edit/GwModelEdit.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="ModelEditTool";this.pickedEntity=this.editModel=void 0;this.editColor=Geoworld.Color.RED.withAlpha(0.8);this.isEditing=!1},initialize:function(k,q,f,p){this._super(k,f,p);this.editModel=q;this.oldColor=this.editModel.entity.color;this.editModel.entity.color=this.editColor;Geoworld.defined(this.editModel)&&Geoworld.defined(this.editModel.entity)?console.info(this.editModel.entity):
(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"gltf Model is need!"}))},destory:function(){},onLButtonDown:function(k){this._super(k);this.pickedEntity={};this.pickObject(k,this.pickedEntity)&&(k=this.pickedEntity.pickedObject.id,k===this.editModel.parameter.id&&(this.isEditing=!0,this.currentPoint=k),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1)},onLButtonUp:function(k){if(!1===this._super(k)||
!this.isEditing)return!1;(Geoworld.defined(this.editModel)||this.pickObject(k,this.editModel.entity))&&this.mCallback&&this.mCallback(this.editModel);this.currentPoint=void 0;this.isEditing=!1;return!0},onLButtonDrag:function(k){if(!this.isEditing)return!1;if(Geoworld.defined(this.currentPoint)){k=this.mEarthCtrl.coreMap.camera.pickEllipsoid(k,this.mEarthCtrl.coreMap.scene.globe.ellipsoid);if(!k)return;k=Geoworld.Cartographic.fromCartesian(k);k=Geoworld.Cartographic.clone(k);k.longitude=Geoworld.Math.toDegrees(k.longitude);
k.latitude=Geoworld.Math.toDegrees(k.latitude);this.editModel.lon=k.longitude;this.editModel.lat=k.latitude}this.mCallback&&this.mCallback(this.editModel);return!0},updateModel:function(k){if(Geoworld.defined(k)&&Geoworld.defined(this.editModel))for(var q=Object.keys(k),f=0;f<q.length;f++){var p=q[f];if(Geoworld.defined(k[p]))switch(p){case "lon":case "lat":case "alt":case "heading":case "pitch":case "roll":this.editModel[p]=k[p];break;default:this.editModel.entity[p]=k[p]}}},endEditEntity:function(){this.editModel.entity.color=
this.oldColor}})});
define("Tools/Edit/GwLabelEdit.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="LabelEditTool";this.pickedEntity=this.editLabel=void 0;this.isEditing=!1},initialize:function(k,q,f,p){this._super(k,f,p);this.editLabel=q;Geoworld.defined(this.editLabel)&&Geoworld.defined(this.editLabel.entity.label)?console.info(this.editLabel.entity):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Label entity is need!"}))},destory:function(){},onLButtonDown:function(k){this._super(k);
this.pickedEntity={};this.pickObject(k,this.pickedEntity)&&(k=this.pickedEntity.pickedObject.id,k.id===this.editLabel.entity.id&&(this.isEditing=!0,this.currentPoint=k),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1)},onLButtonUp:function(k){if(!1===this._super(k)||!this.isEditing)return!1;(Geoworld.defined(this.editLabel.entity)||this.pickObject(k,this.editLabel.entity))&&this.mCallback&&this.mCallback(this.editLabel);
this.currentPoint=void 0;this.isEditing=!1;return!0},onLButtonDrag:function(k){if(!this.isEditing)return!1;if(Geoworld.defined(this.currentPoint)){k=this.mEarthCtrl.coreMap.camera.pickEllipsoid(k,this.mEarthCtrl.coreMap.scene.globe.ellipsoid);if(!k)return;this.currentPoint.position=k;this.editLabel.entity.position=k}this.mCallback&&this.mCallback(this.editLabel);return!0},updateLabel:function(k){if(Geoworld.defined(k)&&Geoworld.defined(this.editLabel))for(var q=Object.keys(k),f=0;f<q.length;f++){var p=
q[f];"position"===p?this.editLabel.entity.position=k[p]:Geoworld.defined(k[p])&&(this.editLabel.entity.label[p]=k[p])}},endEditEntity:function(){}})});
define("Tools/Edit/GwPolylineEdit.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="PolylineEditTool";this.currentPoint=this.pickedEntity=this.editPolyline=void 0;this.pointsId=[];this.isEditing=!1},initialize:function(k,q,f,p){this._super(k,f,p);this.editPolyline=q;if(Geoworld.defined(this.editPolyline)&&Geoworld.defined(this.editPolyline.entity.polyline))for(k=0;k<this.editPolyline.entity.polyline.positions._value.length;k++)q=this.mEarthCtrl.entities.add({name:"polyline_point",
position:this.editPolyline.entity.polyline.positions._value[k],point:{color:Geoworld.Color.WHITE,pixelSize:8,outlineColor:Geoworld.Color.BLACK,outlineWidth:1}}),this.pointsId.push(q.id);else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Polyline entity is need!"})},destory:function(){},onLButtonDown:function(k){this._super(k);this.pickedEntity={};this.pickObject(k,this.pickedEntity)&&(k=this.pickedEntity.pickedObject.id,k.id===this.editPolyline.entity.id?(this.isEditing=!0,this.currentPoint=
void 0):"polyline_point"===k.name&&(this.currentPoint=k,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1)},onLButtonUp:function(k){if(!1===this._super(k)||!this.isEditing)return!1;(Geoworld.defined(this.editPolyline)||this.pickObject(k,this.editPolyline.entity))&&this.mCallback&&this.mCallback(this.editPolyline);this.currentPoint=void 0;this.isEditing=!1;return!0},onLButtonDrag:function(k){if(!this.isEditing)return!1;
if(Geoworld.defined(this.currentPoint)){k=this.mEarthCtrl.coreMap.camera.pickEllipsoid(k,this.mEarthCtrl.coreMap.scene.globe.ellipsoid);if(!k)return;this.currentPoint.position=k;k=[];for(var q=0;q<this.pointsId.length;q++)k.push(this.mEarthCtrl.entities.getById(this.pointsId[q]).position._value);this.editPolyline.entity.polyline.positions=k}this.mCallback&&this.mCallback(this.editPolyline);return!0},updatePolyline:function(k){if(Geoworld.defined(k)&&Geoworld.defined(this.editPolyline))for(var q=Object.keys(k),
f=0;f<q.length;f++){var p=q[f];Geoworld.defined(k[p])&&(this.editPolyline.entity.polyline[p]=k[p])}},endEditEntity:function(){for(var k=0;k<this.pointsId.length;k++)this.mEarthCtrl.entities.removeById(this.pointsId[k]);this.pointsId=[]}})});
define("Tools/Edit/GwPolylineVolumeEdit.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="PolylineVolumeEditTool";this.currentPoint=this.pickedEntity=this.editPolylineVolume=void 0;this.pointsId=[];this.isEditing=!1},initialize:function(k,q,f,p){this._super(k,f,p);this.editPolylineVolume=q;if(Geoworld.defined(this.editPolylineVolume)&&Geoworld.defined(this.editPolylineVolume.entity.polylineVolume))for(k=0;k<this.editPolylineVolume.entity.polylineVolume.positions._value.length;k++)q=
this.mEarthCtrl.entities.add({name:"edit_polylineVolume_point",position:this.editPolylineVolume.entity.polylineVolume.positions._value[k],point:{color:Geoworld.Color.WHITE,pixelSize:12,outlineColor:Geoworld.Color.BLACK,outlineWidth:1}}),this.pointsId.push(q.id);else this.mEnable=!1,this.mCallback&&this.mCallback({msg:"PolylineVolume entity is need!"})},destory:function(){},onLButtonDown:function(k){this._super(k);this.pickedEntity={};this.pickObject(k,this.pickedEntity)&&(k=this.pickedEntity.pickedObject.id,
k.id===this.editPolylineVolume.entity.id?(this.isEditing=!0,this.currentPoint=void 0):"edit_polylineVolume_point"===k.name&&(this.isEditing=!0,this.currentPoint=k),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1)},onLButtonUp:function(k){if(!1===this._super(k)||!this.isEditing)return!1;(Geoworld.defined(this.editPolylineVolume)||this.pickObject(k,this.editPolylineVolume.entity))&&this.mCallback&&this.mCallback(this.editPolylineVolume);
this.currentPoint=void 0;this.isEditing=!1;return!0},onLButtonDrag:function(k){if(!this.isEditing)return!1;if(Geoworld.defined(this.currentPoint)){k=this.mEarthCtrl.coreMap.camera.pickEllipsoid(k,this.mEarthCtrl.coreMap.scene.globe.ellipsoid);if(!k)return;this.currentPoint.position=k;k=[];for(var q=0;q<this.pointsId.length;q++)k.push(this.mEarthCtrl.entities.getById(this.pointsId[q]).position._value);this.editPolylineVolume.entity.polylineVolume.positions=k}this.mCallback&&this.mCallback(this.editPolylineVolume);
return!0},updatePolylineVolume:function(k){if(Geoworld.defined(k)&&Geoworld.defined(this.editPolylineVolume))for(var q=Object.keys(k),f=0;f<q.length;f++){var p=q[f];"position"===p?this.editPolylineVolume.entity.position=k[p]:Geoworld.defined(k[p])&&(this.editPolylineVolume.entity.polylineVolume[p]=k[p])}},endEditEntity:function(){for(var k=0;k<this.pointsId.length;k++)this.mEarthCtrl.entities.removeById(this.pointsId[k]);this.pointsId=[]}})});
define("Tools/Edit/GwRectangleEdit.js",["../GwTool.js"],function(v){return v.extend({__init__:function(){this._super();this.name="RectangleEditTool";this.rightBottomPoint=this.leftTopPoint=this.pickedEntity=this.editRectangle=void 0;this.pointsId=[];this.isEditing=!1},initialize:function(k,q,f,p){this._super(k,f,p);this.editRectangle=q;Geoworld.defined(this.editRectangle)&&Geoworld.defined(this.editRectangle.entity.rectangle)?(k=this.editRectangle.entity.rectangle.coordinates._value,q=this.editRectangle.entity.rectangle.height._value,
f=Geoworld.Rectangle.northwest(k),f=Geoworld.Cartesian3.fromRadians(f.longitude,f.latitude,q),f=this.mEarthCtrl.entities.add({name:"rect_left_top_point",position:f,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:Geoworld.Color.WHITE,pixelSize:8,outlineColor:Geoworld.Color.BLACK,outlineWidth:1}}),this.pointsId.push(f.id),f=Geoworld.Rectangle.southeast(k),k=Geoworld.Cartesian3.fromRadians(f.longitude,f.latitude,q),k=this.mEarthCtrl.entities.add({name:"rect_right_bottom_point",
position:k,point:{heightReference:this.editRectangle.entity.rectangle.heightReference,color:Geoworld.Color.WHITE,pixelSize:8,outlineColor:Geoworld.Color.BLACK,outlineWidth:1}}),this.pointsId.push(k.id)):(this.mEnable=!1,this.mCallback&&this.mCallback({msg:"Rectangle entity is need!"}))},destory:function(){},onLButtonDown:function(k){this._super(k);this.pickedEntity={};this.pickObject(k,this.pickedEntity)&&(k=this.pickedEntity.pickedObject.id,k.id===this.editRectangle.entity.id?(this.isEditing=!0,
this.rightBottomPoint=this.leftTopPoint=void 0):"rect_left_top_point"===k.name?(this.leftTopPoint=k,this.rightBottomPoint=void 0,this.isEditing=!0):"rect_right_bottom_point"===k.name&&(this.rightBottomPoint=k,this.leftTopPoint=void 0,this.isEditing=!0),this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!1,this.mEarthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!1)},onLButtonUp:function(k){if(!1===this._super(k)||!this.isEditing)return!1;(Geoworld.defined(this.editRectangle)||
this.pickObject(k,this.editRectangle.entity))&&this.mCallback&&this.mCallback(this.editRectangle);this.rightBottomPoint=this.leftTopPoint=void 0;this.isEditing=!1;return!0},onLButtonDrag:function(k){if(!this.isEditing)return!1;if(Geoworld.defined(this.leftTopPoint)||Geoworld.defined(this.rightBottomPoint)){k=this.mEarthCtrl.coreMap.camera.pickEllipsoid(k,this.mEarthCtrl.coreMap.scene.globe.ellipsoid);if(!k)return;var q=Geoworld.Cartographic.fromCartesian(k),f=this.editRectangle.entity.rectangle.coordinates._value;
Geoworld.defined(this.leftTopPoint)?(this.leftTopPoint.position=k,f.west=q.longitude,f.north=q.latitude):Geoworld.defined(this.rightBottomPoint)&&(this.rightBottomPoint.position=k,f.south=q.latitude,f.east=q.longitude);this.editRectangle.entity.rectangle.coordinates=f}this.mCallback&&this.mCallback(this.editRectangle);return!0},updateRectangle:function(k){if(Geoworld.defined(k)&&Geoworld.defined(this.editRectangle))for(var q=Object.keys(k),f=0;f<q.length;f++){var p=q[f];"position"===p?this.editRectangle.entity.position=
k[p]:Geoworld.defined(k[p])&&(this.editRectangle.entity.rectangle[p]=k[p])}},endEditEntity:function(){for(var k=0;k<this.pointsId.length;k++)this.mEarthCtrl.entities.removeById(this.pointsId[k]);this.pointsId=[]}})});
define("GwEdit.js","./Tools/Edit/GwBillboardEdit.js ./Tools/Edit/GwPointEdit.js ./Tools/Edit/GwBoxEdit.js ./Tools/Edit/GwCylinderEdit.js ./Tools/Edit/GwEllipseEdit.js ./Tools/Edit/GwEllipsoidEdit.js ./Tools/Edit/GwPolygonEdit.js ./Tools/Edit/GwModelEdit.js ./Tools/Edit/GwLabelEdit.js ./Tools/Edit/GwPolylineEdit.js ./Tools/Edit/GwPolylineVolumeEdit.js ./Tools/Edit/GwRectangleEdit.js".split(" "),function(v,k,q,f,p,t,w,x,A,D,z,C){function B(f){this._earthCtrl=f;this._coreMap=f.coreMap}B.prototype.editPoint=
function(f,p){this._earthCtrl.tools.clearTool();var t=new k;t.initialize(this._earthCtrl,f,function(f){p&&p(f)});this._earthCtrl.tools.registerTool("point_edit_tool",t);return t};B.prototype.updatePoint=function(f,k){f.updatePoint(k)};B.prototype.editPolyline=function(f,k){this._earthCtrl.tools.clearTool();var p=new D;p.initialize(this._earthCtrl,f,function(f){k&&k(f)});this._earthCtrl.tools.registerTool("polyline_edit_tool",p);return p};B.prototype.updatePolyline=function(f,k){f.updatePolyline(k)};
B.prototype.editPolygon=function(f,k){this._earthCtrl.tools.clearTool();var p=new w;p.initialize(this._earthCtrl,f,function(f){k&&k(f)});this._earthCtrl.tools.registerTool("polygon_edit_tool",p);return p};B.prototype.updatePolygon=function(f,k){f.updatePolygon(k)};B.prototype.editBox=function(f,k){this._earthCtrl.tools.clearTool();var p=new q;p.initialize(this._earthCtrl,f,function(f){k&&k(f)});this._earthCtrl.tools.registerTool("box_edit_tool",p);return p};B.prototype.updateBox=function(f,k){f.updateBox(k)};
B.prototype.editEllipsoid=function(f,k){this._earthCtrl.tools.clearTool();var p=new t;p.initialize(this._earthCtrl,f,function(f){k&&k(f)});this._earthCtrl.tools.registerTool("ellipsoid_edit_tool",p);return p};B.prototype.updateEllipsoid=function(f,k){f.updateEllipsoid(k)};B.prototype.editCylinder=function(k,p){this._earthCtrl.tools.clearTool();var t=new f;t.initialize(this._earthCtrl,k,function(f){p&&p(f)});this._earthCtrl.tools.registerTool("cylinder_edit_tool",t);return t};B.prototype.updateCylinder=
function(f,k){f.updateCylinder(k)};B.prototype.editModel=function(f,k){this._earthCtrl.tools.clearTool();var p=new x;p.initialize(this._earthCtrl,f,function(f){k&&k(f)});this._earthCtrl.tools.registerTool("model_edit_tool",p);return p};B.prototype.updateModel=function(f,k){f.updateModel(k)};B.prototype.editBillboard=function(f,k){this._earthCtrl.tools.clearTool();var p=new v;p.initialize(this._earthCtrl,f,function(f){k&&k(f)});this._earthCtrl.tools.registerTool("billboard_edit_tool",p);return p};
B.prototype.updateBillboard=function(f,k){f.updateBillboard(k)};B.prototype.editLabel=function(f,k){this._earthCtrl.tools.clearTool();var p=new A;p.initialize(this._earthCtrl,f,function(f){k&&k(f)});this._earthCtrl.tools.registerTool("label_edit_tool",p);return p};B.prototype.updateLabel=function(f,k){f.updateLabel(k)};B.prototype.editRectangle=function(f,k){this._earthCtrl.tools.clearTool();var p=new C;p.initialize(this._earthCtrl,f,function(f){k&&k(f)});this._earthCtrl.tools.registerTool("rectangle_edit_tool",
p);return p};B.prototype.updateRectangle=function(f,k){f.updateRectangle(k)};B.prototype.editEllipse=function(f,k){this._earthCtrl.tools.clearTool();var t=new p;t.initialize(this._earthCtrl,f,function(f){k&&k(f)});this._earthCtrl.tools.registerTool("ellipse_edit_tool",t);return t};B.prototype.updateEllipse=function(f,k){f.updateEllipse(k)};B.prototype.editPolylineVolume=function(f,k){this._earthCtrl.tools.clearTool();var p=new z;p.initialize(this._earthCtrl,f,function(f){k&&k(f)});this._earthCtrl.tools.registerTool("polylinevolume_edit_tool",
p);return p};B.prototype.updatePolylineVolume=function(f,k){f.updatePolylineVolume(k)};B.prototype.endEditEntity=function(f){this._earthCtrl.tools.clearTool();f.endEditEntity();this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableRotate=!0;this._earthCtrl.coreMap.scene.screenSpaceCameraController.enableZoom=!0};return B});
define("Tools/Analysis/GwAnalysisTool.js",[],function(){function v(k){this.mEarthCtrl=k;this.scene=this.mEarthCtrl.coreMap.scene;this.entities=this.mEarthCtrl.entities;this.camera=this.mEarthCtrl.coreMap.camera;this._points=[];this.item=void 0}v.prototype.horizontalDistance=function(k,q){var f,p,t=this,w=!1,x=[],v="",D=[],z,C=this.scene.globe.ellipsoid,B={spot:[],distance:[],label:[],polyline:[]};f=Geoworld.Color.RED;p=Geoworld.Color.fromRgba(4286644096);Geoworld.defined(q)&&(Geoworld.defined(q.point)&&
(f=q.point),Geoworld.defined(q.polyline)&&(p=q.polyline));var E=new Geoworld.BillboardCollection;this.scene.primitives.add(E);var G=new Geoworld.WebMercatorProjection,F=new Geoworld.ScreenSpaceEventHandler(t.scene.canvas),E=document.createElement("div");$(".map-widget").append(E);$(".map-widget").append('<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>');
var H=document.getElementById("toolTip");H.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>';var J,w=!0;F.setInputAction(function(f){var k;H.style.left=f.endPosition.x+10+"px";H.style.top=f.endPosition.y+20+"px";H.style.display="block";H.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>';
var p=t.camera.getPickRay(f.endPosition);p&&(k=t.scene.globe.pick(p,t.scene));p=!1;t.scene.pick(f.endPosition)&&((f=t.scene.pickPosition(f.endPosition))&&(k=f),p=!0);k&&(k=Geoworld.Ellipsoid.WGS84.cartesianToCartographic(k))&&(f=p?t.scene.sampleHeight(k):t.scene.globe.getHeight(k),k=Geoworld.Cartesian3.fromDegrees(k.longitude/Math.PI*180,k.latitude/Math.PI*180,f),!w||1>x.length||(Geoworld.defined(z)?(z.path.pop(),z.path.push(k)):(x.push(k),z=new N(x)),k=L(z.path),t.entities.remove(J),J=t.entities.add({name:"\u7a7a\u95f4\u76f4\u7ebf\u8ddd\u79bb",
position:z.path[z.path.length-1],label:{text:"\u603b\u957f\uff1a"+k,show:!0,font:"26px \u6977\u4f53",fillColor:Geoworld.Color.WHITE,style:Geoworld.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,pixelOffset:new Geoworld.Cartesian2(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}})))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE);F.setInputAction(function(k){var p,q,C=t.camera.getPickRay(k.position);C&&(p=t.scene.globe.pick(C,t.scene));C=!1;t.scene.pick(k.position)&&
((k=t.scene.pickPosition(k.position))&&(p=k),C=!0);p&&(q=Geoworld.Ellipsoid.WGS84.cartesianToCartographic(p));if(q&&(p=C?t.scene.sampleHeight(q):t.scene.globe.getHeight(q),p=Geoworld.Cartesian3.fromDegrees(q.longitude/Math.PI*180,q.latitude/Math.PI*180,p),w)){z&&z.path.pop();D.push(q);q=[];if(1<D.length){k=D[D.length-2];var C=D[D.length-1],J=1E7*Math.abs(k.longitude-C.longitude),E=1E7*Math.abs(k.latitude-C.latitude);J>E&&(E=J);J=parseInt(E/10);1E3<J&&(J=1E3);2>J&&(J=2);for(E=0;E<J;++E)q.push(new Geoworld.Cartographic(Geoworld.Math.lerp(k.longitude,
C.longitude,E/(J-1)),Geoworld.Math.lerp(k.latitude,C.latitude,E/(J-1))));q.push(C.clone())}else q=D;if(0<q.length)for(k=0;k<q.length;k++)C=q[k],J=t.scene.globe.getHeight(C),C=Geoworld.Cartesian3.fromDegrees(C.longitude/Math.PI*180,C.latitude/Math.PI*180,J),x.push(C);q="0\u7c73";z&&(q=L(z.path),p=z.path[z.path.length-1]);v=q;B.spot.push(p);B.distance.push(q);p=t.entities.add({position:p,point:{pixelSize:5,color:f,outlineColor:Geoworld.Color.WHITE,outlineWidth:1,clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},
label:{text:q,show:!0,font:"26px \u6977\u4f53",fillColor:Geoworld.Color.WHITE,style:Geoworld.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,pixelOffset:new Geoworld.Cartesian2(20,-20),clampToGround:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}});B.label.push(p);t._points.push(p)}},Geoworld.ScreenSpaceEventType.LEFT_CLICK);F.setInputAction(function(){t.entities.remove(J);t._points[t._points.length-1].label.text=v;F.destroy();x.pop();Geoworld.defined(k)&&
"function"===typeof k&&k(B);H.style.display="none"},Geoworld.ScreenSpaceEventType.RIGHT_CLICK);var L=function(f){for(var k=0,p="0\u7c73",t,q,w,x,v=0;v<f.length-1;v+=1)t=C.cartesianToCartographic(f[v]),q=G.project(t),w=q.x,x=q.y,t=C.cartesianToCartographic(f[v+1]),q=G.project(t),t=q.x,q=q.y,k+=Math.sqrt((w-t)*(w-t)+(x-q)*(x-q));0<k&&(p=k.toFixed(2)+"\u7c73");1<=k/1E3&&(p=(k/1E3).toFixed(2)+"\u5343\u7c73");return p},N=function(){function f(k){if(!Geoworld.defined(k))throw new Geoworld.DeveloperError("positions is required!");
if(2>k.length)throw new Geoworld.DeveloperError("positions \u7684\u957f\u5ea6\u5fc5\u987b\u5927\u4e8e\u7b49\u4e8e2");Geoworld.Material.fromType(Geoworld.Material.ColorType).uniforms.color=new Geoworld.Color(1,1,0,0.5);this.options={name:"\u76f4\u7ebf",polyline:{show:!0,positions:[],material:p,width:3,clampToGround:!1}};this.path=k;this._init()}f.prototype._init=function(){var f=this;this.options.polyline.positions=new Geoworld.CallbackProperty(function(){return f.path},!1);this.lineEntity=t.entities.add(this.options);
t.item=this.lineEntity;B.polyline.push(this.lineEntity)};return f}();return this};v.prototype.spaceDistance=function(k,q){var f,p,t=this;t.scene.globe.depthTestAgainstTerrain=!0;var w=new Geoworld.ScreenSpaceEventHandler(t.scene.canvas),x=[],v=null,D="0\u7c73",z=null,C,B="",E,G=document.createElement("div");$(".map-widget").append(G);$(".map-widget").append('<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>');
var 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>';var H={name:"",spot:[],distance:[],label:[],ployline:[]};f=Geoworld.Color.RED;p=Geoworld.Color.fromRgba(4286644096);Geoworld.defined(q)&&(Geoworld.defined(q.point)&&(f=q.point),Geoworld.defined(q.polyline)&&(p=q.polyline));w.setInputAction(function(f){if(z=t.scene.pickPosition(f.endPosition))F.style.left=
f.endPosition.x+10+"px",F.style.top=f.endPosition.y+20+"px",F.style.display="block",2<=x.length&&(Geoworld.defined(v)?(x.pop(),x.push(z)):v=new J(x),F.innerHTML='<span style="font-family:\u9ed1\u4f53;color:white;font-weight: bolder;font-size: 14px">\u53f3\u952e\u7ed3\u675f\uff01</span>',D=t.getSpaceDistance(x)),t.entities.remove(E),E=t.entities.add({name:"\u7a7a\u95f4\u76f4\u7ebf\u8ddd\u79bb",position:x[x.length-1],label:{text:"\u603b\u957f\uff1a"+D,show:!0,font:"26px \u6977\u4f53",fillColor:Geoworld.Color.WHITE,
style:Geoworld.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,pixelOffset:new Geoworld.Cartesian2(20,-20),disableDepthTestDistance:Number.POSITIVE_INFINITY}})},Geoworld.ScreenSpaceEventType.MOUSE_MOVE);w.setInputAction(function(k){if(z=t.scene.pickPosition(k.position))0===x.length&&x.push(z.clone()),x.push(z),k=D,B="\u603b\u957f\uff1a"+D,C=t.entities.add({name:"\u7a7a\u95f4\u76f4\u7ebf\u8ddd\u79bb",position:x[x.length-1],point:{pixelSize:5,color:f,outlineColor:Geoworld.Color.WHITE,
outlineWidth:2,clampToGround:!1,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:k,show:!0,font:"26px \u6977\u4f53",fillColor:Geoworld.Color.WHITE,style:Geoworld.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,pixelOffset:new Geoworld.Cartesian2(20,-20),heightReference:Geoworld.HeightReference.NONE,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),t._points.push(C),H.spot.push(z),H.distance.push(D),H.label.push(C)},Geoworld.ScreenSpaceEventType.LEFT_CLICK);
w.setInputAction(function(f){F.style.display="none";t.entities.remove(E);0<t._points.length&&(t._points[t._points.length-1].label.text=B);w.destroy();x.pop();Geoworld.defined(k)&&"function"===typeof k&&k(H)},Geoworld.ScreenSpaceEventType.RIGHT_CLICK);var J=function(){function f(k){this.options={name:"\u76f4\u7ebf",polyline:{show:!0,positions:[],material:p,width:3,clampToGround:!1}};this.positions=k;this._init()}f.prototype._init=function(){var f=this;this.options.polyline.positions=new Geoworld.CallbackProperty(function(){return f.positions},
!1);var k=t.entities.add(this.options);t.item=k;H.ployline.push(k);k=t.getuid();H.name="\u65b0\u5efa\u7a7a\u95f4\u8ddd\u79bb"+k};return f}();return this};v.prototype.getSpaceDistance=function(k){for(var q=0,f="",f=0;f<k.length-1;f++){var p=Geoworld.Cartographic.fromCartesian(k[f]),t=Geoworld.Cartographic.fromCartesian(k[f+1]),w=new Geoworld.EllipsoidGeodesic;w.setEndPoints(p,t);w=w.surfaceDistance;w=Math.sqrt(Math.pow(w,2)+Math.pow(t.height-p.height,2));q+=w}return f=1E3<=q?(q/1E3).toFixed(2)+"\u5343\u7c73":
q.toFixed(2)+"\u7c73"};v.prototype.getPlaneArea=function(k,q){var f,p=this;p.scene.globe.depthTestAgainstTerrain=!0;var t=0,w=new Geoworld.ScreenSpaceEventHandler(p.scene._imageryLayerCollection),x=document.getElementById("toolTip");x||($(".map-widget").append('<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>'),
x=document.getElementById("toolTip"));x.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>';var v=[],D={},z=[],C=[],B=null,E=null,G;Geoworld.Color.fromRgba(4286644096);f=Geoworld.Color.fromRgba(4286644096).withAlpha(0.5);Geoworld.defined(q)&&(Geoworld.defined(q.point),Geoworld.defined(q.polyline),Geoworld.defined(q.polygon)&&(f=q.polygon));var F={mj:0,label:[],polygon:[]};x.style.display=
"block";w.setInputAction(function(f){x.style.left=f.endPosition.x+10+"px";x.style.top=f.endPosition.y+20+"px";if(E=p.scene.pickPosition(f.endPosition)){var k=Geoworld.Cartographic.fromCartesian(E);f=Geoworld.Math.toDegrees(k.longitude);var t=Geoworld.Math.toDegrees(k.latitude),k=k.height;2<=v.length&&(Geoworld.defined(B)?(v.pop(),v.push(E),D=new Geoworld.PolygonHierarchy(v),C.pop(),C.push({lon:f,lat:t,hei:k})):(D=new Geoworld.PolygonHierarchy(v),B=new H(D)),f=p.getArea(C,v),p.entities.remove(G),G=
p.entities.add({name:"\u591a\u8fb9\u5f62\u9762\u79ef",position:v[v.length-1],label:{text:f,font:"26px \u6977\u4f53",show:!0,fillColor:Geoworld.Color.WHITE,style:Geoworld.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,pixelOffset:new Geoworld.Cartesian2(20,-40),heightReference:Geoworld.HeightReference.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),F.label=G)}},Geoworld.ScreenSpaceEventType.MOUSE_MOVE);w.setInputAction(function(f){if(E=
p.scene.pickPosition(f.position)){var k=Geoworld.Cartographic.fromCartesian(E);f=Geoworld.Math.toDegrees(k.longitude);var t=Geoworld.Math.toDegrees(k.latitude),k=k.height;0===v.length&&(v.push(E.clone()),D=new Geoworld.PolygonHierarchy(v),C.push({lon:f,lat:t,hei:k}),v.push(E.clone()),D=new Geoworld.PolygonHierarchy(v),C.push({lon:f,lat:t,hei:k}));v.push(E);D=new Geoworld.PolygonHierarchy(v);z.push({lon:f,lat:t,hei:k});C.push({lon:f,lat:t,hei:k})}},Geoworld.ScreenSpaceEventType.LEFT_CLICK);w.setInputAction(function(f){x.style.display=
"none";p.entities.remove(G);w.destroy();t=f=p.getArea(C,v);f=p.entities.add({name:"\u591a\u8fb9\u5f62\u9762\u79ef",position:v[v.length-1],label:{text:f,font:"26px \u6977\u4f53",show:!0,fillColor:Geoworld.Color.WHITE,style:Geoworld.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,pixelOffset:new Geoworld.Cartesian2(20,-40),heightReference:Geoworld.HeightReference.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}});p._points.push(f);p._lable=
f;F.mj=t;F.label=f;Geoworld.defined(k)&&"function"===typeof k&&k(F)},Geoworld.ScreenSpaceEventType.RIGHT_CLICK);var H=function(){function k(p){this.options={name:"\u591a\u8fb9\u5f62",polygon:{hierarchy:[],perPositionHeight:!0,material:f,clampToGround:!1}};this.hierarchy=p;this._init()}k.prototype._init=function(){var f=this;this.options.polygon.hierarchy=new Geoworld.CallbackProperty(function(){return f.hierarchy},!1);this.polygon=p.entities.add(this.options);p.item=this.polygon;p._entity=this.polygon;
F.polygon=this.polygon};return k}();return this};v.prototype.getSurfaceArea3d=function(k,q){var f,p=this;p.scene.globe.depthTestAgainstTerrain=!0;var t={mj:0,label:[],polygon:[]},w=!0,x=[],v={},D=void 0,z=p.scene,C=z.globe.ellipsoid,B=new Geoworld.BillboardCollection;z.primitives.add(B);var E;Geoworld.Color.fromRgba(4286644096);f=Geoworld.Color.fromRgba(4286644096).withAlpha(0.5);Geoworld.defined(q)&&(Geoworld.defined(q.point),Geoworld.defined(q.polyline),Geoworld.defined(q.polygon)&&(f=q.polygon));
var G=document.createElement("div");$(".map-widget").append(G);$(".map-widget").append('<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>');var 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>';
var H=new Geoworld.ScreenSpaceEventHandler(z.canvas);H.setInputAction(function(f){var k=0;p.entities.remove(E);var q,z;(z=p.scene.camera.getPickRay(f.endPosition))&&(q=p.scene.globe.pick(z,p.scene));p.scene.pick(f.endPosition)&&(z=p.scene.pickPosition(f.endPosition))&&(q=z);if(q&&(z=Geoworld.Ellipsoid.WGS84.cartesianToCartographic(q))&&w)if(F.style.left=f.endPosition.x+10+"px",F.style.top=f.endPosition.y+20+"px",F.style.display="block",2>x.length)1===J&&(E=p.entities.add({name:"\u591a\u8fb9\u5f62\u9762\u79ef",
position:q,label:{text:k+"\u5e73\u65b9\u5343\u7c73",font:"26px \u6977\u4f53",show:!0,fillColor:Geoworld.Color.WHITE,style:Geoworld.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,pixelOffset:new Geoworld.Cartesian2(20,-40),heightReference:Geoworld.HeightReference.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY}}),p._points.push(E),t.label=E);else if(Geoworld.defined(D)?(D.path.positions.pop(),D.path.positions.push(q)):(x.push(q),v=new Geoworld.PolygonHierarchy(x),
D=new N(v)),2<=x.length){F.innerHTML='<span style="font-family:\u9ed1\u4f53;color:white;font-weight: bolder;font-size: 14px">\u53f3\u952e\u7ed3\u675f\uff01</span>';f=String;var B=D.path.positions,k=Array(B.length);for(z=0;z<B.length;z++){var H=k,G=z,Z=C.cartesianToCartographic(B[z]);Z.longitude=Z.longitude/Math.PI*180;Z.latitude=Z.latitude/Math.PI*180;H[G]=Z}for(z=B=0;z<k.length;z++)B+=k[z].longitude;B/=k.length;for(z=0;z<k.length;z++)k[z]=p.Gauss_to_XY(k[z].longitude,k[z].latitude,B);k=Math.abs(L(k));
f=f(k);f=f.substr(0,f.indexOf(".",0));6>f.length?k=f+"\u5e73\u65b9\u7c73":(f=String(f/1E6),f=f.substr(0,f.indexOf(".",0)+3),k=f+"\u5e73\u65b9\u5343\u7c73");t.mj=k;E=p.entities.add({name:"\u591a\u8fb9\u5f62\u9762\u79ef",position:q,label:{text:k,font:"26px \u6977\u4f53",show:!0,fillColor:Geoworld.Color.WHITE,style:Geoworld.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,pixelOffset:new Geoworld.Cartesian2(20,-40),heightReference:Geoworld.HeightReference.CLAMP_TO_GROUND,
disableDepthTestDistance:Number.POSITIVE_INFINITY}});p._points.push(E);t.label=E}},Geoworld.ScreenSpaceEventType.MOUSE_MOVE);var J=0;H.setInputAction(function(f){var k;J=1;var t=p.scene.camera.getPickRay(f.position);t&&(k=p.scene.globe.pick(t,p.scene));p.scene.pick(f.position)&&(f=p.scene.pickPosition(f.position))&&(k=f);k&&w&&(x.push(k),v=new Geoworld.PolygonHierarchy(x))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);H.setInputAction(function(){H.removeInputAction(Geoworld.ScreenSpaceEventType.LEFT_CLICK);
H.removeInputAction(Geoworld.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);p.trackedEntity=void 0;w=!1;B.add({show:!0,id:"measureTool",position:x[x.length-1],pixelOffset:new Geoworld.Cartesian2(0,20),eyeOffset:new Geoworld.Cartesian3(0,0,0),horizontalOrigin:Geoworld.HorizontalOrigin.CENTER,verticalOrigin:Geoworld.VerticalOrigin.CENTER,scale:1,color:new Geoworld.Color(1,1,1,1)});F.style.display="none";H.destroy();Geoworld.defined(k)&&"function"===typeof k&&k(t)},Geoworld.ScreenSpaceEventType.RIGHT_CLICK);
var L=function(f){for(var k=0,p=0;p<f.length;p++){var t=f[p],q;q=p<f.length-1?f[p+1]:f[0];k+=t.x*q.y-q.x*t.y}return k/2},N=function(){function k(p){if(!Geoworld.defined(p))throw new Geoworld.DeveloperError("positions is required!");if(3>p.length)throw new Geoworld.DeveloperError("positions \u7684\u957f\u5ea6\u5fc5\u987b\u5927\u4e8e\u7b49\u4e8e3");this.options={polygon:{show:!0,hierarchy:void 0,material:f,clampToGround:!1}};this.path=p;this._init()}k.prototype._init=function(){var f=this;this.options.polygon.hierarchy=
new Geoworld.CallbackProperty(function(){return f.path},!1);this.polygonEntity=p.entities.add(this.options);p.item=this.polygonEntity;t.polygon=this.polygonEntity;p._entity=this.polygonEntity};return k}();return this};v.prototype.to_N=function(k){var q=Math.sqrt(2.723316066819453E11)/6378137;Math.sqrt(2.723316066819453E11);return 6378137/Math.sqrt(1-q*q*Math.sin(k)*Math.sin(k))};v.prototype.to_Sm=function(k){var q=Math.sqrt(2.723316066819453E11)/6378137;Math.sqrt(2.723316066819453E11);var f,p,t,w,
x;f=1+q*q*3/4+45*Math.pow(q,4)/64+175*Math.pow(q,6)/256+11025*Math.pow(q,8)/16384;p=3*Math.pow(q,2)/4+15*Math.pow(q,4)/16+525*Math.pow(q,6)/512+2205*Math.pow(q,8)/2048;t=15*Math.pow(q,4)/64+105*Math.pow(q,6)/256+2205*Math.pow(q,8)/4096;w=35*Math.pow(q,6)/512+315*Math.pow(q,8)/2048;x=315*Math.pow(q,8)/16384;return 6378137*(1-q*q)*(f*k-p/2*Math.sin(2*k)+t/4*Math.sin(4*k)-w/6*Math.sin(6*k)+x/8*Math.sin(8*k))};v.prototype.to_Radian=function(k){return k*Math.PI/180};v.prototype.Gauss_to_XY=function(k,
q,f,p){Math.sqrt(2.723316066819453E11);var t=Math.sqrt(2.723316066819453E11)/6356752.3142,w=p=0,x=0,v=0;p=this.to_Radian(f);q=this.to_Radian(q);k=this.to_Radian(k);k-=p;f=Math.cos(q);v=this.to_N(q);x=v*Math.cos(q);p=Math.tan(q);var w=t*f,t=Math.pow(p,2),D=Math.pow(p,4),z=Math.pow(w,2),C=Math.pow(w,4),B=Math.pow(f,3),E=Math.pow(f,5);q=this.to_Sm(q)+Math.pow(k,2)/2*x*f*p+Math.pow(k,4)/24*p*x*B*(5-t+9*z+4*C)+Math.pow(k,6)/720*p*x*E*(61-58*p*p+D+270*z-330*p*p*z);p=k*v*f+Math.pow(k,3)/6*v*B*(1-p*p+w*w)+
Math.pow(k,5)/120*v*E*(5-18*p*p+D+14*z-58*z*t);return new Geoworld.Cartesian2(p,q)};v.prototype.getArea=function(k,q){for(var f=0,p=0;p<k.length-2;p++)var t=(p+1)%k.length,w=(p+2)%k.length,x=this.Angle(k[p],k[t],k[w]),v=this.getdistance(q[p],q[t]),t=this.getdistance(q[t],q[w]),f=f+v*t*Math.abs(Math.sin(x));return f=1E6>f?f.toFixed(4)+"\u5e73\u65b9\u7c73":(f/1E6).toFixed(4)+"\u5e73\u65b9\u5343\u7c73"};v.prototype.getdistance=function(k,q){var f=Geoworld.Cartographic.fromCartesian(k),p=Geoworld.Cartographic.fromCartesian(q),
t=new Geoworld.EllipsoidGeodesic;t.setEndPoints(f,p);t=t.surfaceDistance;return t=Math.sqrt(Math.pow(t,2)+Math.pow(p.height-f.height,2))};v.prototype.Bearing=function(k,q){var f=Math.PI/180,p=180/Math.PI,t=k.lat*f,w=k.lon*f,x=q.lat*f,f=q.lon*f,t=-Math.atan2(Math.sin(w-f)*Math.cos(x),Math.cos(t)*Math.sin(x)-Math.sin(t)*Math.cos(x)*Math.cos(w-f));0>t&&(t+=2*Math.PI);return t*p};v.prototype.Angle=function(k,q,f){k=this.Bearing(q,k);q=this.Bearing(q,f);q=k-q;0>q&&(q+=360);return q};v.prototype.getuid=
function(){return this.uuid(8,16)};v.prototype.uuid=function(k,q){var f="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),p=[],t;q=q||f.length;if(k)for(t=0;t<k;t++)p[t]=f[0|Geoworld.Math.nextRandomNumber()*q];else{var w;p[8]=p[13]=p[18]=p[23]="-";p[14]="4";for(t=0;36>t;t++)p[t]||(w=0|16*Geoworld.Math.nextRandomNumber(),p[t]=f[19===t?w&3|8:w])}return p.join("")};v.prototype.deleteObject=function(){this.entities.remove(this.item);if(0<this._points.length){for(var k=0;k<this._points.length;k++)this.entities.remove(this._points[k]);
this._points=[]}try{this.scene.primitives.remove(this.item)}catch(q){console.log(q)}this.item=void 0};return v});
define("Tools/Analysis/GwViewShed.js",[],function(){function v(k,f){this._earthCtrl=k;this._coreMap=this._earthCtrl.coreMap;this._show=Geoworld.defaultValue(f.show,!0);this._lon=Geoworld.defaultValue(f.lon,121);this._lat=Geoworld.defaultValue(f.lat,31);this._height=Geoworld.defaultValue(f.height,10);this._heading=Geoworld.defaultValue(f.heading,0);this._pitch=Geoworld.defaultValue(f.pitch,0);this._distance=Geoworld.defaultValue(f.distance,300);this._position=Geoworld.Cartesian3.fromDegrees(f.lon,
f.lat,f.height);this._horizontalViewAngle=Geoworld.defaultValue(f.horizontalViewAngle,90);this._verticalViewAngle=Geoworld.defaultValue(f.verticalViewAngle,60);this._horizontalViewAngle=this.adjustViewRange(this._horizontalViewAngle);this._verticalViewAngle=this.adjustViewRange(this._verticalViewAngle);this._visibleAreaColor=Geoworld.defaultValue(f.visibleAreaColor,Geoworld.Color.GREEN.withAlpha(0.4));this._invisibleAreaColor=Geoworld.defaultValue(f.invisibleAreaColor,Geoworld.Color.RED.withAlpha(0.4));
this._size=Geoworld.defaultValue(f.size,10240);this._softShadows=Geoworld.defaultValue(f.softShadows,!0);this._colorStyle=Geoworld.defaultValue(f.colorStyle,Geoworld.Color.YELLOW);this._parameter=f;this._lineArray=[];this.pyramid=void 0;this.updateViewShed()}Object.defineProperties(v.prototype,{show:{get:function(){return this._show},set:function(k){k!==this._show&&(this._show=k,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(k){this._colorStyle=k}},invisibleAreaColor:{get:function(){return this._invisibleAreaColor},set:function(k){this._invisibleAreaColor=k}},visibleAreaColor:{get:function(){return this._visibleAreaColor},set:function(k){this._visibleAreaColor=k}}});v.prototype.adjustViewRange=
function(k){0>=k?k=1:180<=k&&(k=179);return k};v.prototype.removeFromMap=function(){Geoworld.defined(this.viewShedMap)&&(this.viewShedMap.enabled=!1);Geoworld.defined(this.pyramid)&&(this._earthCtrl.entities.removeById(this.pyramid.id),this.pyramid=null);for(var k=0;k<this._lineArray.length;k++)this._earthCtrl.entities.remove(this._lineArray[k]);this._lineArray=[]};v.prototype.addVisualPyramid=function(){var k=this,f=new Geoworld.EllipsoidGraphics({radii:new Geoworld.CallbackProperty(function(){return new Geoworld.Cartesian3(k._distance,
k._distance,k._distance)},!1),minimumClock:new Geoworld.CallbackProperty(function(){return Geoworld.Math.toRadians(90-k._heading-k._horizontalViewAngle/2)},!1),maximumClock:new Geoworld.CallbackProperty(function(){return Geoworld.Math.toRadians(90-k._heading+k._horizontalViewAngle/2)},!1),minimumCone:new Geoworld.CallbackProperty(function(){return Geoworld.Math.toRadians(90-k._verticalViewAngle/2)},!1),maximumCone:new Geoworld.CallbackProperty(function(){return Geoworld.Math.toRadians(90+k._verticalViewAngle/
2)},!1),fill:!1,outline:!0,subdivisions:128,slicePartitions:32,stackPartitions:16,outlineColor:new Geoworld.CallbackProperty(function(){return k._colorStyle},!1)}),f=new Geoworld.Entity({position:new Geoworld.CallbackProperty(function(){return k._position},!1),ellipsoid:f});this.pyramid=k._earthCtrl.entities.add(f)};v.prototype.createLightCamera=function(){Geoworld.defined(this.viewShedMap)?this._lightCamera=this.viewShedMap._lightCamera:this._lightCamera=new Geoworld.Camera(this._coreMap.scene);
this._lightCamera.position=this._position};v.prototype.updateParameters=function(k){var f=this._lightCamera;if(Geoworld.defined(k)&&(Geoworld.defined(k.lon)||Geoworld.defined(k.lat)||Geoworld.defined(k.height)||Geoworld.defined(k.heading)||Geoworld.defined(k.pitch)||Geoworld.defined(k.roll)||Geoworld.defined(k.far)||Geoworld.defined(k.distance)||Geoworld.defined(k.verticalViewAngle)||Geoworld.defined(k.horizontalViewAngle))){var p=this._parameter,t;for(t in k)k.hasOwnProperty(t)&&Geoworld.defined(p[t])&&
(p[t]=k[t]);p.distance>=this.viewShedMap.maximumDistance&&(p.distance=this.viewShedMap.maximumDistance);this._heading=p.heading;this._pitch=p.pitch;this._distance=p.distance;this.viewShedMap._pointLightRadius=p.distance;p.verticalViewAngle=this.adjustViewRange(p.verticalViewAngle);this._verticalViewAngle=p.verticalViewAngle;p.horizontalViewAngle=this.adjustViewRange(p.horizontalViewAngle);this._horizontalViewAngle=p.horizontalViewAngle;this._position=Geoworld.Cartesian3.fromDegrees(p.lon,p.lat,p.height);
k=Geoworld.Math.toRadians(p.heading);f.setView({destination:this._position,orientation:{heading:k,pitch:0,roll:0}});f.frustum.far=p.far||1E5;p=Geoworld.Math.toRadians(this._horizontalViewAngle);k=Geoworld.Math.toRadians(this._verticalViewAngle);f.frustum.aspectRatio=Math.tan(p/2)/Math.tan(k/2);f.frustum.fov=p>k?p:k}};v.prototype.createShadowMap=function(){Geoworld.defined(this.viewShedMap)?this.viewShedMap.enabled=!0:(this.viewShedMap=new Geoworld.ViewShedMap({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 k=new Geoworld.Cartesian3;v.prototype.drawViewCentrum=function(){var q=this,f=this._earthCtrl.entities.add({polyline:{positions:new Geoworld.CallbackProperty(function(){var f=q.pyramid._ellipsoid._minimumClock.getValue(),
t=q.pyramid._ellipsoid._minimumCone.getValue(),w=q.pyramid._ellipsoid.radii.getValue(),x=Math.sin,v=Math.cos,D=x(t),t=v(t),x=x(f),f=v(f);k.x=w.x*D*f;k.y=w.y*D*x;k.z=w.z*t;w=new Geoworld.Utils.changeCartesian3ByScalar(q._position,k);return[q._position,w]},!1),material:this._colorStyle}});this._lineArray.push(f);f=this._earthCtrl.entities.add({polyline:{positions:new Geoworld.CallbackProperty(function(){var f=q.pyramid._ellipsoid._maximumClock.getValue(),t=q.pyramid._ellipsoid._minimumCone.getValue(),
w=q.pyramid._ellipsoid.radii.getValue(),x=Math.sin,v=Math.cos,D=x(t),t=v(t),x=x(f),f=v(f);k.x=w.x*D*f;k.y=w.y*D*x;k.z=w.z*t;w=new Geoworld.Utils.changeCartesian3ByScalar(q._position,k);return[q._position,w]},!1),material:this._colorStyle}});this._lineArray.push(f);f=this._earthCtrl.entities.add({polyline:{positions:new Geoworld.CallbackProperty(function(){var f=q.pyramid._ellipsoid._minimumClock.getValue(),t=q.pyramid._ellipsoid._maximumCone.getValue(),w=q.pyramid._ellipsoid.radii.getValue(),x=Math.sin,
v=Math.cos,D=x(t),t=v(t),x=x(f),f=v(f);k.x=w.x*D*f;k.y=w.y*D*x;k.z=w.z*t;w=new Geoworld.Utils.changeCartesian3ByScalar(q._position,k);return[q._position,w]},!1),material:this._colorStyle}});this._lineArray.push(f);f=this._earthCtrl.entities.add({polyline:{positions:new Geoworld.CallbackProperty(function(){var f=q.pyramid._ellipsoid._maximumClock.getValue(),t=q.pyramid._ellipsoid._maximumCone.getValue(),w=q.pyramid._ellipsoid.radii.getValue(),x=Math.sin,v=Math.cos,D=x(t),t=v(t),x=x(f),f=v(f);k.x=w.x*
D*f;k.y=w.y*D*x;k.z=w.z*t;w=Geoworld.Utils.changeCartesian3ByScalar(q._position,k);return[q._position,w]},!1),material:this._colorStyle}});this._lineArray.push(f)};v.prototype.updateViewShed=function(){this.show?(this.createLightCamera(),this.setCameraParams(),this.createShadowMap(),this.addVisualPyramid(),this.drawViewCentrum()):this.removeFromMap()};v.prototype.setCameraParams=function(){this._lightCamera.frustum.near=0.1;this._lightCamera.frustum.far=this._distance;var k=Geoworld.Math.toRadians(this._horizontalViewAngle),
f=Geoworld.Math.toRadians(this._verticalViewAngle);this._lightCamera.frustum.aspectRatio=Math.tan(k/2)/Math.tan(f/2);this._lightCamera.frustum.fov=k>f?k:f;this._lightCamera.setView({destination:this._position,orientation:{heading:Geoworld.Math.toRadians(this._heading),pitch:Geoworld.Math.toRadians(this._pitch),roll:0}})};return v});
define("Tools/Analysis/GwVolumetricTool.js",[],function(){function v(k){this._cesiumViewer=k;this.coreMap=k.coreMap;this._scene=this.coreMap.scene;this._tooltip=f(this.coreMap.container)}function k(f,p){if(null===f||"object"!==typeof f||f.constructor!==Object&&f.constructor!==Array)return f;if(f.constructor===Date||f.constructor===RegExp||f.constructor===Function||f.constructor===String||f.constructor===Number||f.constructor===Boolean)return new f.constructor(f);p=p||new f.constructor;for(var t in f)p[t]=
"undefined"===typeof p[t]?k(f[t],null):p[t];return p}function q(f,p){var t=k(f),q;for(q in p)void 0===t[q]&&(t[q]=k(p[q]));return t}function f(f){var k=function(f){var k=document.createElement("DIV");k.className="twipsy right";var p=document.createElement("DIV");p.className="twipsy-arrow";k.appendChild(p);p=document.createElement("DIV");p.className="twipsy-inner";k.appendChild(p);this._div=k;this._title=p;f.appendChild(k)};k.prototype.setVisible=function(f){this._div.style.display=f?"block":"none"};
k.prototype.showAt=function(f,k){f&&k&&(this.setVisible(!0),this._title.innerHTML=k,this._div.style.left=f.x+30+"px",this._div.style.top=f.y-this._div.clientHeight/2-15+"px")};return new k(f)}var p=Geoworld.Ellipsoid.WGS84;v.prototype.addToolbar=function(f,k){k=q(k,{container:f});return new v.Toolbar(this,k)};var t={iconUrl:GEOWORLD_BASE_URL+"./Assets/Images/point.png",shiftX:0,shiftY:0};v.prototype.createBillboardGroup=function(f,k,p){k=new v.BillboardGroup(this,k);k.addBillboards(f,p);return k};
v.BillboardGroup=function(f,k){this._drawHelper=f;this._scene=f._scene;this._options=q(k,t);var p=new Geoworld.BillboardCollection;this._scene.primitives.add(p);this._billboards=p;this._orderedBillboards=[]};v.BillboardGroup.prototype.createBillboard=function(f,k){var t=this._billboards.add({show:!0,position:f,pixelOffset:new Geoworld.Cartesian2(this._options.shiftX,this._options.shiftY),eyeOffset:new Geoworld.Cartesian3(0,0,-1E3),horizontalOrigin:Geoworld.HorizontalOrigin.CENTER,verticalOrigin:Geoworld.VerticalOrigin.CENTER,
scale:0.3,image:this._options.iconUrl,color:new Geoworld.Color(1,1,1,1)});if(k){var q=this,v=this._scene.screenSpaceCameraController,C=function(){for(var f=0,k=q._orderedBillboards.length;f<k&&q._orderedBillboards[f]!==t;++f);return f};k.dragHandlers&&(q=this,setListener(t,"leftDown",function(f){function w(f){G.destroy();v.enableRotate=!0;k.dragHandlers.onDragEnd&&k.dragHandlers.onDragEnd(C(),f)}var G=new Geoworld.ScreenSpaceEventHandler(q._scene.canvas);G.setInputAction(function(f){if(f=q._scene.camera.pickEllipsoid(f.endPosition,
p)){t.position=f;for(var v=0,z=q._orderedBillboards.length;v<z&&q._orderedBillboards[v]!==t;++v);k.dragHandlers.onDrag&&k.dragHandlers.onDrag(C(),f)}else w(f)},Geoworld.ScreenSpaceEventType.MOUSE_MOVE);G.setInputAction(function(f){w(q._scene.camera.pickEllipsoid(f.position,p))},Geoworld.ScreenSpaceEventType.LEFT_UP);v.enableRotate=!1;k.dragHandlers.onDragStart&&k.dragHandlers.onDragStart(C(),q._scene.camera.pickEllipsoid(f,p))}));k.onDoubleClick&&setListener(t,"leftDoubleClick",function(f){k.onDoubleClick(C())});
k.onClick&&setListener(t,"leftClick",function(f){k.onClick(C())});k.tooltip&&(setListener(t,"mouseMove",function(f){q._drawHelper._tooltip.showAt(f,k.tooltip())}),setListener(t,"mouseOut",function(f){q._drawHelper._tooltip.setVisible(!1)}))}return t};v.BillboardGroup.prototype.insertBillboard=function(f,k,p){this._orderedBillboards.splice(f,0,this.createBillboard(k,p))};v.BillboardGroup.prototype.addBillboard=function(f,k){this._orderedBillboards.push(this.createBillboard(f,k))};v.BillboardGroup.prototype.addBillboards=
function(f,k){for(var p=0;p<f.length;p++)this.addBillboard(f[p],k)};v.BillboardGroup.prototype.updateBillboardsPositions=function(f){for(var k=0;k<f.length;k++)this.getBillboard(k).position=f[k]};v.BillboardGroup.prototype.countBillboards=function(){return this._orderedBillboards.length};v.BillboardGroup.prototype.getBillboard=function(f){return this._orderedBillboards[f]};v.BillboardGroup.prototype.removeBillboard=function(f){this._billboards.remove(this.getBillboard(f));this._orderedBillboards.splice(f,
1)};v.BillboardGroup.prototype.remove=function(){this._billboards=this._billboards&&this._billboards.removeAll()&&this._billboards.destroy()};v.BillboardGroup.prototype.setOnTop=function(){this._scene.primitives.raiseToTop(this._billboards)};v.prototype.cleanUp=function(){void 0!==this._prevEntity&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=void 0);void 0!==this._markers&&(this._markers.remove(),this._markers=void 0);void 0!==this._volumeLabel&&(this._cesiumViewer.entities.remove(this._volumeLabel),
this._volumeLabel=void 0);this._tooltip.setVisible(!1)};v.prototype.startDrawing=function(f){var k=this,p=this._scene;p.globe.depthTestAgainstTerrain=!0;var q=this._tooltip,z=[],C=[],B;this._positions=C;var E=new Geoworld.ScreenSpaceEventHandler(p.canvas);this._mouseHandler=E;var G=new v.BillboardGroup(this,t);this._markers=G;void 0!==this._prevEntity&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null);void 0!==this._volumeLabel&&(this._cesiumViewer.entities.remove(this._volumeLabel),
this._volumeLabel=void 0);E.setInputAction(function(t){if(null!==t.position){var q=p.camera.getPickRay(t.position),q=p.globe.pick(q,p),v=Geoworld.Cartographic.fromCartesian(q),D=Geoworld.Math.toDegrees(v.longitude),v=Geoworld.Math.toDegrees(v.latitude);if(q){0===z.length&&(z.push(D,v),C.push(q),B=q,G.addBillboard(B));if(4<=C.length){var E=Geoworld.SceneTransforms.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,B);if(void 0!==E){var Q=E.x-t.position.x;t=E.y-t.position.y;if(16>Q*Q+t*t){z.splice(z.length-
2,2);C.pop();this.stopDrawing(f);return}}}z.push(D,v);C.push(q);G.addBillboard(q);3===C.length&&(k._prevEntity=k._cesiumViewer.factory.createElement({type:"polygon",parameters:{hierarchy:Geoworld.Cartesian3.fromDegreesArray(z),material:Geoworld.Color.RED.withAlpha(0.6),fill:!0}}),k._prevEntity.polygon.hierarchy=Geoworld.Cartesian3.fromDegreesArray(z))}}}.bind(this),Geoworld.ScreenSpaceEventType.LEFT_CLICK);E.setInputAction(function(f){f=f.endPosition;if(null!==f)if(0===C.length)q.showAt(f,"\u70b9\u51fb\u5f00\u59cb\u7ed8\u5236\u7b2c\u4e00\u4e2a\u70b9");
else{var k=p.camera.getPickRay(f),k=p.globe.pick(k,p),t=Geoworld.Cartographic.fromCartesian(k),w=Geoworld.Math.toDegrees(t.longitude),t=Geoworld.Math.toDegrees(t.latitude);k&&(z.splice(z.length-2,2),C.pop(),z.push(w,t),C.push(k),G.getBillboard(C.length-1).position=k,q.showAt(f,"\u53cc\u51fb\u7ed3\u675f\u7ed8\u5236"),3<=C.length&&4<=C.length&&(w=Geoworld.SceneTransforms.wgs84ToWindowCoordinates(this._cesiumViewer.coreMap.scene,B),void 0!==w&&(k=w.x-f.x,f=w.y-f.y,document.body.style.cursor=16>k*k+f*
f?"pointer":"default")))}}.bind(this),Geoworld.ScreenSpaceEventType.MOUSE_MOVE);E.setInputAction(function(k){5>C.length||this.stopDrawing(f)}.bind(this),Geoworld.ScreenSpaceEventType.LEFT_DOUBLE_CLICK)};v.prototype.stopDrawing=function(f){void 0!==this._mouseHandler&&(this._mouseHandler.destroy(),this._mouseHandler=void 0);void 0!==this._markers&&(this._markers.remove(),this._markers=void 0);void 0!==this._prevEntity&&(this._cesiumViewer.entities.remove(this._prevEntity),this._prevEntity=null);void 0!==
this._volumeLabel&&(this._cesiumViewer.entities.remove(this._volumeLabel),this._volumeLabel=void 0);this._tooltip.setVisible(!1);document.body.style.cursor="wait";var k=this.computeCutVolume(),p=k.maxHeight;document.body.style.cursor="default";"function"===typeof f&&f(k.volume);f={polygon:{hierarchy:{positions:this._positions},extrudedHeight:p,closeTop:!1,closeBottom:!1,material:Geoworld.Color.RED.withAlpha(0.5),outline:!0,outlineColor:Geoworld.Color.WHITE,outlineWidth:2}};this._prevEntity=this._cesiumViewer.entities.add(f)};
v.prototype.computeCutVolume=function(){for(var f=15E3,k=0;k<this._positions.length;k++){var p=Geoworld.Cartographic.fromCartesian(this._positions[k]),t=this._scene.globe.getHeight(p);f>t&&(f=t)}for(var t=Math.PI/Math.pow(2,11),t=new Geoworld.PolygonGeometry.fromPositions({positions:this._positions,vertexFormat:Geoworld.PerInstanceColorAppearance.FLAT_VERTEX_FORMAT,granularity:t/64}),q=new Geoworld.PolygonGeometry.createGeometry(t),v=t=0,B,E,G,F,H,k=0;k<q.indices.length;k+=3){B=q.indices[k];E=q.indices[k+
1];G=q.indices[k+2];p=new Geoworld.Cartesian3(q.attributes.position.values[3*B],q.attributes.position.values[3*B+1],q.attributes.position.values[3*B+2]);p=Geoworld.Cartographic.fromCartesian(p);B=this._scene.globe.getHeight(p);F=Geoworld.Cartesian3.fromRadians(p.longitude,p.latitude,0);v<B&&(v=B);p=new Geoworld.Cartesian3(q.attributes.position.values[3*E],q.attributes.position.values[3*E+1],q.attributes.position.values[3*E+2]);p=Geoworld.Cartographic.fromCartesian(p);E=this._scene.globe.getHeight(p);
H=Geoworld.Cartesian3.fromRadians(p.longitude,p.latitude,0);v<E&&(v=E);p=new Geoworld.Cartesian3(q.attributes.position.values[3*G],q.attributes.position.values[3*G+1],q.attributes.position.values[3*G+2]);p=Geoworld.Cartographic.fromCartesian(p);G=this._scene.globe.getHeight(p);p=Geoworld.Cartesian3.fromRadians(p.longitude,p.latitude,0);v<G&&(v=G);var J=H,L=p;H=Geoworld.Cartesian3.distance(F,J);p=Geoworld.Cartesian3.distance(J,L);F=Geoworld.Cartesian3.distance(L,F);J=(H+p+F)/2;F=Math.sqrt(J*(J-H)*
(J-p)*(J-F));t+=F*(B-f+E-f+G-f)/3}f=this._positions;k=[];q=[];for(B=0;B<f.length;B++)E=Geoworld.Cartographic.fromCartesian(f[B]),k.push(E.longitude),q.push(E.latitude);var N=L=J=p=H=F=G=E=0;for(B=0;B<f.length;B++)E=k[B],G=q[B],B===f.length-1?(F=k[0],H=q[0]):(F=k[B+1],H=q[B+1]),J=E*H-F*G,p+=J,L+=(E+F)*J,N+=(G+H)*J;p*=0.5;f=new Geoworld.Cartographic(L/(6*p),N/(6*p));this._volumeLabel=this._cesiumViewer.entities.add({position:Geoworld.Cartesian3.fromRadians(f.longitude,f.latitude,v+1E3),label:{text:t.toFixed(4)+
"\u7acb\u65b9\u7c73"}});return{maxHeight:v,volume:t}};return v});
define("Tools/Analysis/GwLineOfSightToolHF.js",[],function(){function v(k){this.mEarthCtrl=k;this._polylines=[];this._points=[];this.entities=this.mEarthCtrl.entities;this.camera=this.mEarthCtrl.coreMap.camera;this.scene=this.mEarthCtrl.coreMap.scene;this._interval=20}var k=1E-5*Math.PI/180;v.prototype.createlineOfSight=function(k){var f=[],p=this,t=[],w=[],x={polyline:[]};p.objectsToExclude=null;var v=void 0,D=function(){function f(k){this.options={polyline:{show:!0,positions:[],material:Geoworld.Color.YELLOW,
width:3,clampToGround:!1}};this.positionsp=k;this._init()}f.prototype._init=function(){var f=this;this.options.polyline.positions=new Geoworld.CallbackProperty(function(){return f.positionsp},!1);this.polyline=p.entities.add(this.options);p.item=this.polyline;w.push(this.polyline)};return f}(),z=new Geoworld.ScreenSpaceEventHandler(p.scene.canvas),C=[],B=void 0;if(0<this._points.length)for(var E=0;E<this._points.length;E++)this.entities.remove(this._points[E]);var G=[];z.setInputAction(function(k){var q;
q=p.camera.getPickRay(k.position);q=p.scene.globe.pick(q,p.scene);if(p.scene.pick(k.position)){var x=p.scene.pickPosition(k.position);x&&(q=x)}q&&(0===C.length?(C.push(q.clone(),q.clone()),k={leftX:k.position.x,leftY:k.position.y},G.push(k),v=q.clone()):(k={rightX:k.position.x,rightY:k.position.y},G.push(k),t.push({postion:C,entity:w,cartesian:G}),G=[],B=void 0,C=[],C.push(v.clone()),C.push(v.clone()),B=new D(C),f.push(B)))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);z.setInputAction(function(k){var t;
t=p.camera.getPickRay(k.endPosition);t=p.scene.globe.pick(t,p.scene);p.scene.pick(k.endPosition)&&(k=p.scene.pickPosition(k.endPosition))&&(t=k);t&&2<=C.length&&(Geoworld.defined(B)?void 0!==t&&(C.pop(),C.push(t)):(B=new D(C),f.push(B)))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE);var F=0,H=0;z.setInputAction(function(f){f=p.entities.add(new Geoworld.Entity);p.objectsToExclude=[f];var v=!0;for(f=0;f<t.length;f++)0===f?(F=t[f].cartesian[0].leftX,H=t[f].cartesian[0].leftY,v=p.tsjx(t[f].postion,F,H,t[f].cartesian[1].rightX,
t[f].cartesian[1].rightY,50,w)):v=p.tsjx(t[f].postion,F,H,t[f].cartesian[0].rightX,t[f].cartesian[0].rightY,50,w),v=v?p.entities.add({name:"polyline1",polyline:{positions:t[f].postion,width:3,material:Geoworld.Color.BLUE}}):p.entities.add({name:"polyline1",polyline:{positions:t[f].postion,width:3,material:Geoworld.Color.RED}}),x.polyline.push(v);C.pop();p._polylines=x.polyline;z.destroy();for(f=0;f<w.length;f++)p.entities.remove(w[f]);Geoworld.defined(k)&&"function"===typeof k&&k(x)},Geoworld.ScreenSpaceEventType.RIGHT_CLICK);
return this};v.prototype.tsjx=function(k,f,p,t,w,x,v){var D=this.getSpaceDistancem(k);100>=D&&10<=D?x=parseInt(D/2):10>D&&0<D?x=parseInt(D/1):100<D&&(x=parseInt(D/10));var z=k[k.length-1],C=Geoworld.Cartographic.fromCartesian(k[0]);k=Geoworld.Math.toDegrees(C.longitude);var D=Geoworld.Math.toDegrees(C.latitude),C=C.height,B=Geoworld.Cartographic.fromCartesian(z),z=Geoworld.Math.toDegrees(B.longitude),E=Geoworld.Math.toDegrees(B.latitude),B=B.height,z=Geoworld.Math.lerp(k,z,1/x)-k,E=Geoworld.Math.lerp(D,
E,1/x)-D,B=Geoworld.Math.lerp(C,B,1/x)-C;Geoworld.Math.lerp(f,t,1/x);Geoworld.Math.lerp(p,w,1/x);f=!0;var G;for(p=0;p<x-2;p++)if(t=C+(p+1)*B,w=Geoworld.Cartesian3.fromDegrees(k+(p+1)*z,D+(p+1)*E,t),G=Geoworld.Cartographic.fromCartesian(w),w=this.scene.globe.getHeight(G),(G=this.scene.sampleHeight(G,v))&&(w=G),w=parseFloat(w.toFixed(1)),t=parseFloat(t.toFixed(1)),w>t){f=!1;break}return f};v.prototype.getSpaceDistancem=function(k){for(var f=0,p=0;p<k.length-1;p++){var t=Geoworld.Cartographic.fromCartesian(k[p]),
w=Geoworld.Cartographic.fromCartesian(k[p+1]),x=new Geoworld.EllipsoidGeodesic;x.setEndPoints(t,w);x=x.surfaceDistance;x=Math.sqrt(Math.pow(x,2)+Math.pow(w.height-t.height,2));f+=x}return f.toFixed(2)};v.prototype.deleteObject=function(){if(0<this._points.length){this.objectsToExclude=null;for(var k=0;k<this._points.length;k++)this.entities.remove(this._points[k])}};v.prototype.InterpolateLineCartographic=function(q,f,p){if(!(q&&f&&q.longitude&&q.latitude&&f.longitude&&f.latitude))return null;var t=
[];t.push(new Geoworld.Cartographic(q.longitude,q.latitude));var w=Math.sqrt(Math.pow(f.longitude-q.longitude,2)+Math.pow(f.latitude-q.latitude,2));p=p&&"number"===typeof p?p:k;if(w<=p)t.push(new Geoworld.Cartographic(f.longitude,f.latitude));else{w/=p;p=(f.longitude-q.longitude)/w;for(var x=(f.latitude-q.latitude)/w,v=0;v<w;v++)t.push(new Geoworld.Cartographic(q.longitude+(v+1)*p,q.latitude+(v+1)*x));t.push(new Geoworld.Cartographic(f.longitude,f.latitude,f.height))}return t};v.prototype.InterpolateLineCartographicxp=
function(q,f,p){if(!(q&&f&&q.longitude&&q.latitude&&f.longitude&&f.latitude))return null;var t=[];t.push(new Geoworld.Cartographic(q.longitude,q.latitude));var w=Math.sqrt(Math.pow(f.longitude-q.longitude,2)+Math.pow(f.latitude-q.latitude,2));p=p&&"number"===typeof p?p:k;if(w<=p)t.push(new Geoworld.Cartographic(f.longitude,f.latitude));else{w/=p;p=(f.longitude-q.longitude)/w;for(var x=(f.latitude-q.latitude)/w,v=(f.height-q.height)/w,D=0;D<w;D++)t.push(new Geoworld.Cartographic(q.longitude+(D+1)*
p,q.latitude+(D+1)*x,q.height+v*(D+1)));t.push(new Geoworld.Cartographic(f.longitude,f.latitude,f.height))}return t};v.prototype.InterpolateLineHeightCartographic=function(q,f){if(!(q&&f&&q.longitude&&q.latitude&&f.longitude&&f.latitude))return null;var p=[];p.push(new Geoworld.Cartographic(q.longitude,q.latitude,q.height));var t=Math.sqrt(Math.pow(f.longitude-q.longitude,2)+Math.pow(f.latitude-q.latitude,2));if(!(t<=k))for(var t=t/k,w=(f.longitude-q.longitude)/t,v=(f.latitude-q.latitude)/t,A=(f.height-
q.height)/t,D=0;D<t;D++)p.push(new Geoworld.Cartographic(q.longitude+(D+1)*w,q.latitude+(D+1)*v,q.height+(D+1)*A));p.push(new Geoworld.Cartographic(f.longitude,f.latitude,f.height));return p};v.prototype.InterpolateIndexLineHeightCartographic=function(k,f,p,t){return k&&f&&k.longitude&&k.latitude&&f.longitude&&f.latitude?new Geoworld.Cartographic(k.longitude+(f.longitude-k.longitude)/p*t,k.latitude+(f.latitude-k.latitude)/p*t,k.height+(f.height-k.height)/p*t):null};v.prototype.InterpolateIndexLineHeightCartographicxp=
function(k,f,p,t){return k&&f&&k.longitude&&k.latitude&&f.longitude&&f.latitude?new Geoworld.Cartographic(k.longitude+(f.longitude-k.longitude)/p*t,k.latitude+(f.latitude-k.latitude)/p*t,k.height+(f.height-k.height)/p*t):null};v.prototype.Interpolate2IndexLineHeightCartographic=function(k,f,p,t){if(!(k&&f&&k.longitude&&k.latitude&&f.longitude&&f.latitude))return null;var w=[];w.push(new Geoworld.Cartographic(k.longitude,k.latitude,k.height));var v=(f.longitude-k.longitude)/p,A=(f.latitude-k.latitude)/
p;f=(f.height-k.height)/p;for(p=0;p<t;p++)w.push(new Geoworld.Cartographic(k.longitude+(p+1)*v,k.latitude+(p+1)*A,k.height+(p+1)*f));return w};v.prototype.CartographicPointsTerrainData=function(k,f){if(k.length&&0<k.length){var p=Geoworld.sampleTerrain(this.scene.terrainProvider,11,k);Geoworld.when(p,function(k){f(k)})}};v.prototype.setVisibility=function(k){if(0<this._polylines.length)for(var f=0;f<this._polylines.length;f++)this._polylines[f].show=k};v.prototype.deleteObject=function(){if(0<this._polylines.length)for(var k=
0;k<this._polylines.length;k++)this.entities.remove(this._polylines[k])};Object.defineProperties(v.prototype,{sight:{get:function(){return this.item.sight},set:function(k){this.item.sight=sight}}});return v});
define("Effects/GwFlood.js",[],function(){function v(f,k){this.mEarthCtrl=f;this._parameter=k;this.coreMap=f.coreMap;this._color=Geoworld.defaultValue(k.color,new Geoworld.Color(1,0,0,0.7));this._positions=k.positions;if(3>this._positions.length)throw new Geoworld.DeveloperError("invalid positions length!");this._duration=Geoworld.defaultValue(k.duration,4E3);this._minHeight=Geoworld.defaultValue(k.minHeight,0);this._maxHeight=Geoworld.defaultValue(k.maxHeight,100);this._image=k.image;this._pps=null}
function k(f,k){for(var t=Geoworld.Cartographic.fromCartesian(f[0]),q=t.longitude,t=t.latitude,v=q,A=t,D=1;D<f.length;D++){var z=Geoworld.Cartographic.fromCartesian(f[D]);q>z.longitude?q=z.longitude:v<z.longitude&&(v=z.longitude);t>z.latitude?t=z.latitude:A<z.latitude&&(A=z.latitude)}return new Geoworld.Cartesian3.fromRadians((q+v)/2,(t+A)/2,k)}function q(f){if(!Geoworld.defined(f._pps)){var p=k(f._positions,f._minHeight),t=Geoworld.Cartographic.fromCartesian(p),q=new Geoworld.Cartesian4(p.x,p.y,
p.z,1),p=new Geoworld.Cartographic(t.longitude,t.latitude,f.maxHeight+100),p=Geoworld.Cartographic.toCartesian(p),v=new Geoworld.Cartesian4(p.x,p.y,p.z,1);(new Date).getTime();var A=new Geoworld.Cartesian4,D=new Geoworld.Cartesian4,z=new Geoworld.Cartesian3,C=f.mEarthCtrl.coreMap.scene.camera;f._pps=new Geoworld.PostProcessStage({fragmentShader:"uniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nvarying vec2 v_textureCoordinates;\nuniform vec4 u_floodCenterEC;\nuniform vec3 u_floodPlaneNormalEC;\nuniform float u_minHeight;\nuniform float u_maxHeight;\nuniform vec4 u_floodColor;\nuniform sampler2D u_image;\nuniform int u_positionsLength;\nuniform vec3 u_floodRange["+
f._positions.length+"];\nconst int MAX_ITERATION = 100;\nvec4 toEye(in vec2 uv, in float depth)\n {\n vec2 xy = vec2((uv.x * 2.0 - 1.0),(uv.y * 2.0 - 1.0));\n vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);\n posInCamera =posInCamera / posInCamera.w;\n return posInCamera;\n }\nvec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point)\n{\nvec3 v01 = point -planeOrigin;\nfloat d = dot(planeNormal, v01) ;\nreturn (point - planeNormal * d);\n}\nfloat getDepth(in vec4 depth)\n{\nfloat z_window = czm_unpackDepth(depth);\nz_window = czm_reverseLogDepth(z_window);\nfloat n_range = czm_depthRange.near;\nfloat f_range = czm_depthRange.far;\nreturn (2.0 * z_window - n_range - f_range) / (f_range - n_range);\n}\nbool isPointInRange(in vec3 testPt)\n{\nint c=0;\nvec3 pos0=u_floodRange[0];\nvec3 prePos=pos0;\nfor(int i=1; i < MAX_ITERATION; i++) \n{\nif(i >= u_positionsLength) {\nbreak;\n}\nif(i == u_positionsLength-1) {\nprePos = pos0;\n}\nint temp = 0;\nvec3 pos1=u_floodRange[i];\nvec3 prj1OnPlane = pointProjectOnPlane(u_floodPlaneNormalEC.xyz, u_floodCenterEC.xyz, pos1);\nvec3 prj2OnPlane = pointProjectOnPlane(u_floodPlaneNormalEC.xyz, u_floodCenterEC.xyz, prePos);\nif (((prj1OnPlane.y>testPt.y) != (prj2OnPlane.y>testPt.y)) &&\n(testPt.x < (prj2OnPlane.x-prj1OnPlane.x) * (testPt.y-prj1OnPlane.y) / (prj2OnPlane.y-prj1OnPlane.y) + prj1OnPlane.x))\nc = (c==0?1:0);\nprePos = pos1;\n}\nreturn c!=0;\n}\nvoid main()\n{\ngl_FragColor = texture2D(colorTexture, v_textureCoordinates);\nfloat depth = getDepth( texture2D(depthTexture, v_textureCoordinates));\nvec4 viewPos = toEye(v_textureCoordinates, depth);\nvec3 prjOnPlane = pointProjectOnPlane(u_floodPlaneNormalEC.xyz, u_floodCenterEC.xyz, viewPos.xyz);\nfloat dis = length(prjOnPlane.xyz-viewPos.xyz);\nvec3 pos0=u_floodRange[0];\nfloat radius_dis = length(prjOnPlane.xyz-u_floodCenterEC.xyz);\nif(dis >= 0.0 && dis <= (u_maxHeight-u_minHeight))\n{\ngl_FragColor = mix(gl_FragColor, u_floodColor, 0.3);\n}\n}\n",
uniforms:{u_floodCenterEC:function(){return Geoworld.Matrix4.multiplyByVector(C._viewMatrix,q,A)},u_floodPlaneNormalEC:function(){var f=Geoworld.Matrix4.multiplyByVector(C._viewMatrix,q,A),k=Geoworld.Matrix4.multiplyByVector(C._viewMatrix,v,D);z.x=k.x-f.x;z.y=k.y-f.y;z.z=k.z-f.z;Geoworld.Cartesian3.normalize(z,z);return z},u_floodRange:function(){return f._positions},u_minHeight:function(){return f._minHeight},u_maxHeight:function(){return f._maxHeight},u_image:function(){return f.image},u_floodColor:function(){return f._color},
u_positionsLength:function(){return f._positions.length}}});f.mEarthCtrl.coreMap.scene.postProcessStages.add(f._pps)}}Object.defineProperties(v.prototype,{parameter:{get:function(){return this._parameter}},show:{get:function(){return null!==this._pps},set:function(f){f?q(this):Geoworld.defined(this._pps)&&(this.mEarthCtrl.coreMap.scene.postProcessStages.remove(this._pps),this._pps=null)}},maxHeight:{get:function(){return this._maxHeight},set:function(f){this._maxHeight=f}},minHeight:{get:function(){return this._minHeight},
set:function(f){this._minHeight=f}}});return v});
define("Tools/Analysis/GwSubmergence.js",["../../Effects/GwFlood.js"],function(v){function k(k,f){this._earthCtrl=k;this._coreMap=k.coreMap;this.extrudedHeight=this._maxHeight=this._minHeight=0;this.shapeTool=void 0;this._speed=Geoworld.defaultValue(f.speed,1);this._baseWaterColor=Geoworld.defaultValue(f.baseWaterColor,new Geoworld.Color(0.2,0.3,0.6,0.5));this._waterFrequency=Geoworld.defaultValue(f.waterFrequency,1E3);this._animationSpeed=Geoworld.defaultValue(f.animationSpeed,0.01);this._amplitude=
Geoworld.defaultValue(f.amplitude,10);this._isPolygon=Geoworld.defaultValue(f.isPolygon,!0);this.eventHelper=new Geoworld.EventHelper}k.prototype.drawPolygon=function(){var k=this;this.shapeTool=k._earthCtrl.shapeTool.createDrawShapeTool(function(f){k.setPolygon({positions:f.result})})};k.prototype.setPolygon=function(k){this.positions=k.positions;k=this.computePolygonHeightRange(this.positions);this._minHeight=k.minHeight;this._maxHeight=k.maxHeight;this.extrudedHeight=this._minHeight};k.prototype.computePolygonHeightRange=
function(k){for(var f=[],p=this._earthCtrl.coreMap,t=0;t<k.length;t++)f.push(k[t].clone());var w,v,A,D,z;k=0;for(var C=9999,t=Math.PI/Math.pow(2,11)/64,t=new Geoworld.PolygonGeometry.fromPositions({positions:f,vertexFormat:Geoworld.PerInstanceColorAppearance.FLAT_VERTEX_FORMAT,granularity:t}),B=new Geoworld.PolygonGeometry.createGeometry(t),t=0;t<B.indices.length;t+=3)w=B.indices[t],f=B.indices[t+1],v=B.indices[t+2],w=new Geoworld.Cartesian3(B.attributes.position.values[3*w],B.attributes.position.values[3*
w+1],B.attributes.position.values[3*w+2]),(A=p.scene.globe.getHeight(Geoworld.Cartographic.fromCartesian(w)))<C&&(C=A),k<A&&(k=A),w=new Geoworld.Cartesian3(B.attributes.position.values[3*f],B.attributes.position.values[3*f+1],B.attributes.position.values[3*f+2]),(D=p.scene.globe.getHeight(Geoworld.Cartographic.fromCartesian(w)))<C&&(C=D),k<D&&(k=D),w=new Geoworld.Cartesian3(B.attributes.position.values[3*v],B.attributes.position.values[3*v+1],B.attributes.position.values[3*v+2]),(z=p.scene.globe.getHeight(Geoworld.Cartographic.fromCartesian(w)))<
C&&(C=z),k<z&&(k=z);return{maxHeight:k,minHeight:C}};k.prototype.removeFromMap=function(){this._isPolygon?Geoworld.defined(this.primitive)&&(this.removePrimitive(),this.extrudedHeight=this.minHeight,this.primitive=null):Geoworld.defined(this.flood)&&(this.flood.show=!1)};k.prototype._onTick=function(){this.extrudedHeight>=this._maxHeight?(this.extrudedHeight=this._maxHeight,this.eventHelper.removeAll()):(this._isPolygon?this.removePrimitive():Geoworld.defined(this.flood)||(this.flood=new v(this._earthCtrl,
{minHeight:this.minHeight,maxHeight:this.extrudedHeight,positions:this.positions}),this.flood.show=!0),this.extrudedHeight+=this._speed,this._isPolygon?this.addPrimitive():this.flood.maxHeight=this.extrudedHeight)};k.prototype.removePrimitive=function(){Geoworld.defined(this.primitive)&&this._earthCtrl.primitives.remove(this.primitive)};k.prototype.polygonAnalysis=function(){Geoworld.defined(this.shapeTool)&&(this.shapeTool.removeFromMap(),this.shapeTool=void 0);this.eventHelper.add(this._earthCtrl.coreMap.clock.onTick,
k.prototype._onTick,this);var q={};q.normalMap=GEOWORLD_BASE_URL+"./Assets/Images/waterNormals.jpg";q.baseWaterColor=this.baseWaterColor;q.frequency=this.waterFrequency;q.animationSpeed=this.animationSpeed;q.amplitude=this.amplitude;q=new Geoworld.Material({fabric:{type:"Water",uniforms:q}});q.update(this._earthCtrl.coreMap.scene.context);this.primitiveAppearance=new Geoworld.EllipsoidSurfaceAppearance({material:q,fragmentShaderSource:Geoworld.WaterFS})};k.prototype.postAnalysis=function(){Geoworld.defined(this.shapeTool)&&
(this.shapeTool.removeFromMap(),this.shapeTool=void 0);this.eventHelper.add(this._earthCtrl.coreMap.clock.onTick,k.prototype._onTick,this)};k.prototype.addPrimitive=function(){this.primitive=this._earthCtrl.primitives.add(new Geoworld.Primitive({geometryInstances:new Geoworld.GeometryInstance({geometry:Geoworld.PolygonGeometry.fromPositions({positions:this.positions,extrudedHeight:this.extrudedHeight})}),asynchronous:!1,appearance:this.primitiveAppearance}))};k.prototype.startAnalysis=function(){this._isPolygon?
this.polygonAnalysis():this.postAnalysis()};Object.defineProperties(k.prototype,{isPolygon:{get:function(){return this._isPolygon}},minHeight:{set:function(k){this._minHeight=k},get:function(){return this._minHeight}},maxHeight:{set:function(k){this._maxHeight=k},get:function(){return this._maxHeight}},speed:{set:function(k){this._speed=k},get:function(){return this._speed}},baseWaterColor:{set:function(k){this._baseWaterColor=k},get:function(){return this._baseWaterColor}},waterFrequency:{set:function(k){this._waterFrequency=
k},get:function(){return this._waterFrequency}},animationSpeed:{set:function(k){this._animationSpeed=k},get:function(){return this._animationSpeed}},amplitude:{set:function(k){this._amplitude=k},get:function(){return this._amplitude}}});return k});
define("Tools/Analysis/GwProfile.js",[],function(){function v(f,k){this._earthCtrl=f;this._coreMap=f.coreMap;this.echarts=this.positions=this.shapeTool=void 0;this.mCallback=Geoworld.defaultValue(k.callback,void 0);this.defaultChart=Geoworld.defaultValue(k.defaultChart,!0);this.step=Geoworld.defaultValue(k.step,20);this.image=k.image;this.echarstView=k.echartsView;this.echartsParentView=k.echartsParentView;this.billboard=void 0;this.maxHeight=this.minHeight=0;this.profile={arrHB:[],arrPoint:[],arrLX:[],
points:[],distance:0}}function k(k,p){if(null!==p&&null!==p.arrPoint){document.getElementById(k.echartsParentView).style.display="block";Geoworld.defined(k.echarts)||(k.echarts=Geoworld.echarts.init(document.getElementById(k.echarstView),"dark"));var t=p.arrPoint,w={grid:{left:10,right:10,bottom:10,containLabel:!0},dataZoom:[{type:"inside",throttle:50}],tooltip:{trigger:"axis",formatter:function(p){var w="";if(0===p.length)return w;var v=t[p[0].dataIndex],D=p[0].value+k.minHeight;x=new Geoworld.Cartesian3.fromDegrees(v.x,
v.y,D);Geoworld.defined(k.billboard)||(k.billboard=k._earthCtrl.entities.add({name:"profile_billboard",position:new Geoworld.CallbackProperty(function(){return x},!1),billboard:{verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,image:k.image,iconWidth:8,iconHeight:8,scale:0.5}}));k.billboard.show||(k.billboard.show=!0);return w+="\u6240\u5728\u4f4d\u7f6e&nbsp;"+f(v.x)+","+f(v.y)+"<br />\u8ddd\u8d77\u70b9&nbsp;<label>"+q(p[0].axisValue)+"</label><br />"+p[0].seriesName+"&nbsp;<label style='color:"+p[0].color+
";'>"+q(D)+"</label><br />"}},xAxis:[{name:"\u884c\u7a0b",type:"category",boundaryGap:!1,axisLine:{show:!1},axisLabel:{show:!1},data:p.arrLX}],yAxis:[{type:"value",axisLabel:{formatter:function(f){return f+k.minHeight+"\u7c73"}}}],series:[{name:"\u9ad8\u7a0b\u503c",type:"line",smooth:!0,symbol:"none",sampling:"average",itemStyle:{normal:{color:"rgb(255, 70, 131)"}},areaStyle:{normal:{color:new Geoworld.echarts.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"rgb(255, 158, 68)"},{offset:1,color:"rgb(255, 70, 131)"}])}},
data:p.arrHB}]};k.echarts.setOption(w)}}function q(f,k){if(null===f)return"";f=Number(f);if(null===k||"auto"===k)k=1E3>f?"m":"km";var p="";switch(k){default:case "m":p=f.toFixed(2)+"\u7c73";break;case "km":p=(0.001*f).toFixed(2)+"\u516c\u91cc";break;case "mile":p=(5.4E-4*f).toFixed(2)+"\u6d77\u91cc";break;case "zhang":p=(0.3*f).toFixed(2)+"\u4e08"}return p}function f(f){f=f.toString();return f.slice(0,f.indexOf(".")+3)}function p(f){f=Geoworld.Cartographic.fromCartesian(f);var k=Geoworld.Math.toDegrees(f.longitude),
p=Geoworld.Math.toDegrees(f.latitude);return{x:k,y:p,z:f.height}}function t(f,k){var p=new Geoworld.EllipsoidGeodesic;p.setEndPoints(f,k);p=p.surfaceDistance;return p=Math.sqrt(Math.pow(p,2)+Math.pow(k.height-f.height,2))}v.prototype.drawPolyLine=function(){var f=this;this.shapeTool=f._earthCtrl.shapeTool.createDrawShapeTool(function(k){f.setPolyline({positions:k.result})},"polyline")};v.prototype.setPolyline=function(f){this.positions=f.positions};v.prototype.startAnalysis=function(){if(1<this.positions.length){this.profile.arrLX.push(0);
for(var f=0;f<this.positions.length-1;f++)this.profile2PointAnalysis(this.positions[f],this.positions[f+1]);this.processHeight();f=this.profile;this.defaultChart&&k(this,f);Geoworld.defined(this.mCallback)&&this.mCallback(f)}};v.prototype.processHeight=function(){if(!(0>=this.profile.arrHB.length)){this.minHeight=this.maxHeight=this.profile.arrHB[0];for(var f=1;f<this.profile.arrHB.length;f++){var k=this.profile.arrHB[f];k>this.maxHeight?this.maxHeight=k:k<this.minHeight&&(this.minHeight=k)}this.minHeight=
100*parseInt(this.minHeight/100);for(f=0;f<this.profile.arrHB.length;f++)k=this.profile.arrHB[f],this.profile.arrHB[f]=k-this.minHeight}};var w=new Geoworld.Cartesian3;v.prototype.profile2PointAnalysis=function(f,k){var q=Geoworld.Cartesian3.distance(f,k),q=parseInt(q/this.step),v=Geoworld.Cartographic.fromCartesian(f),x=Geoworld.Cartographic.fromCartesian(k);this.profile.points.push(v);this.profile.arrPoint.push(p(f));this.profile.arrHB.push(v.height);v=this.profile.arrLX.length-1;console.info(v);
for(var E=1;E<q;E++){var G=Geoworld.Cartesian3.lerp(f,k,E/q,w),F=Geoworld.Cartographic.fromCartesian(G),H=this._coreMap.scene.globe.getHeight(F);F.height=H;var J=t(this.profile.points[v+E-1],F);this.profile.distance+=J;this.profile.points.push(F);this.profile.arrLX.push(this.profile.arrLX[v+E-1]+J);this.profile.arrPoint.push(p(G));this.profile.arrHB.push(H)}this.profile.points.push(x);this.profile.arrLX.push(this.profile.arrLX[this.profile.arrLX.length-1]+t(this.profile.points[this.profile.points.length-
1],x));this.profile.arrPoint.push(p(k));this.profile.arrHB.push(x.height);return this.profile};var x;v.prototype.removeFromMap=function(){Geoworld.defined(this.shapeTool)&&(this.shapeTool.removeFromMap(),this.shapeTool=void 0);Geoworld.defined(this.billboard)&&(this._earthCtrl.entities.remove(this.billboard),this.billboard=void 0);document.getElementById(this.echartsParentView).style.display="none"};Object.defineProperties(v.prototype,{baseWaterColor:{set:function(f){this._baseWaterColor=f},get:function(){return this._baseWaterColor}}});
return v});
define("GwAnalysis.js","./Tools/Analysis/GwAnalysisTool.js ./Tools/Analysis/GwViewShed.js ./Tools/Analysis/GwVolumetricTool.js ./Tools/Analysis/GwLineOfSightToolHF.js ./Tools/Analysis/GwSubmergence.js ./Tools/Analysis/GwProfile.js".split(" "),function(v,k,q,f,p,t){function w(f){this._earthCtrl=f;this._coreMap=f.coreMap;this.tools=[];this.vols=[];this.saveResult=!1}w.prototype.getDistanceSpace=function(f){!1===this.saveResult&&this.deleteObject();this._tool=new v(this._earthCtrl);this._tool.spaceDistance(f);this.tools.push(this._tool)};
w.prototype.getDistanceHorizontal=function(f){!1===this.saveResult&&this.deleteObject();this._tool=new v(this._earthCtrl);this._tool.horizontalDistance(f);this.tools.push(this._tool)};w.prototype.deleteObject=function(){Geoworld.defined(this._tool)&&this._tool.deleteObject();!1===this.saveResult&&this.tools.pop()};w.prototype.deleteAll=function(){this.tools.forEach(function(f){f.deleteObject()});this.vols.forEach(function(f){f.cleanUp()});this._earthCtrl.measure.tools.forEach(function(f){f.clearResult()});
this.tools=[];this.vols=[];this._earthCtrl.measure.tools=[]};w.prototype.saveResults=function(f){this.saveResult=f};w.prototype.getPlaneArea=function(f){!1===this.saveResult&&this.deleteObject();this._tool=new v(this._earthCtrl);this._tool.getPlaneArea(f);this.tools.push(this._tool)};w.prototype.getSurfaceArea3d=function(f){!1===this.saveResult&&this.deleteObject();this._tool=new v(this._earthCtrl);this._tool.getSurfaceArea3d(f);this.tools.push(this._tool)};w.prototype.volumetric=function(f){!1===
this.saveResult&&this.removeVolumetric();this._vol=new q(this._earthCtrl);this._vol.startDrawing(f);this.vols.push(this._vol)};w.prototype.removeVolumetric=function(f){Geoworld.defined(this._vol)&&this.vols.forEach(function(f){f.cleanUp()})};w.prototype.lineOfSight=function(k){this._tool=new f(this._earthCtrl);this._tool.createlineOfSight(k)};w.prototype.createViewShed=function(f){return new k(this._earthCtrl,f)};w.prototype.createSubmergence=function(f){return new p(this._earthCtrl,f)};w.prototype.createProfile=
function(f){return new t(this._earthCtrl,f)};w.prototype.createBufferAnalysis=function(f){return new Geoworld.GwBufferAnalysis(this._earthCtrl,f)};return w});
define("ViewComponent/GwStatisticFlag.js",[],function(){function v(k,q){this._earthCtrl=k;if(!Geoworld.defined(q.flagHtml))throw new Geoworld.DeveloperError("flagDiv is required.");this._flagHtml=q.flagHtml;this._options=Geoworld.defaultValue(q,Geoworld.defaultValue.EMAIL);this._circleRadius=Geoworld.defaultValue(q.circleRadius,10);this._lon=Geoworld.defaultValue(q.lon,121);this._lat=Geoworld.defaultValue(q.lat,31);this._height=Geoworld.defaultValue(q.height,0);this._show=Geoworld.defaultValue(q.show,
!0);this._flagScale=Geoworld.defaultValue(q.flagScale,4);this._circleColor=Geoworld.defaultValue(q.circleColor,Geoworld.Color.RED);this._cylinderColor=Geoworld.defaultValue(q.cylinderColor,Geoworld.Color.YELLOWGREEN);this._duration=Geoworld.defaultValue(q.duration,2E3);this._gradient=Geoworld.defaultValue(q.gradient,2);this._count=Geoworld.defaultValue(q.count,2);this._canvasZoom=Geoworld.defaultValue(q.canvasZoom,10);this._linePlaneEntity=this._htmlPlaneEntity=this._lineEntity=this._cylinderEntity=
this._circleEntity=void 0;this._flagDiv=document.createElement("div");this._flagDiv.style.opacity="0.7";this._flagDiv.style.margin="0";this._flagDiv.style.padding="0";this._flagDiv.id=Geoworld.defaultValue(q.id,Geoworld.createGuid());this._flagDiv.innerHTML=this._flagHtml;this._show&&this.addToMap()}v.prototype.removeFromMap=function(){Geoworld.defined(this._circleEntity)&&(this._earthCtrl.entities.remove(this._circleEntity),this._circleEntity=void 0);Geoworld.defined(this._cylinderEntity)&&(this._earthCtrl.entities.remove(this._cylinderEntity),
this._cylinderEntity=void 0);Geoworld.defined(this._lineEntity)&&(this._earthCtrl.entities.remove(this._lineEntity),this._lineEntity=void 0);Geoworld.defined(this._linePlaneEntity)&&(this._earthCtrl.entities.remove(this._linePlaneEntity),this._linePlaneEntity=void 0);Geoworld.defined(this._htmlPlaneEntity)&&(this._earthCtrl.entities.remove(this._htmlPlaneEntity),this._htmlPlaneEntity=void 0)};v.prototype.addToMap=function(){function k(){return t}function q(){var f=new Geoworld.Cartesian3,f=Geoworld.Cartesian3.negate(Geoworld.Cartesian3.UNIT_Y,
f);return new Geoworld.Plane(f,0)}var f=this,p=0,t,w=Geoworld.Cartesian3.fromDegrees(f._lon,f._lat,f._height);Geoworld.defined(f._circleEntity)||(f._circleEntity=f._earthCtrl.entities.add({position:w,ellipse:{height:f._height,semiMinorAxis:f._circleRadius,semiMajorAxis:f._circleRadius,material:new Geoworld.CircleWaveMaterialProperty({duration:f._duration,gradient:f._gradient,color:f._circleColor,count:f._count})}}));if(!Geoworld.defined(f._cylinderEntity)){var p=2*f._circleRadius/5,v=3*f._circleRadius/
4;t=Geoworld.Utils.changeCartesian3Height(w,v/2);f._cylinderEntity=f._earthCtrl.entities.add({position:t,cylinder:{length:v,topRadius:p,bottomRadius:p,fill:!0,outline:!1,material:f._cylinderColor}})}Geoworld.defined(f._lineEntity)||(p=f._circleRadius*f._flagScale+f._height,f._lineEntity=f._earthCtrl.entities.add({polyline:{width:2,positions:Geoworld.Cartesian3.fromDegreesArrayHeights([f._lon,f._lat,f._height,f._lon,f._lat,p]),material:f._cylinderColor}}));if(!Geoworld.defined(f._htmlPlaneEntity)){var p=
f._circleRadius*f._flagScale,A=p/5,D=3*A,p=p-A/2,v=new Geoworld.Cartesian3(4,0,p),v=Geoworld.Utils.changeCartesian3ByScalar(w,v);this._linePlaneEntity=f._earthCtrl.entities.add({position:v,plane:{plane:new Geoworld.Plane(Geoworld.Cartesian3.UNIT_Y,0),dimensions:new Geoworld.Cartesian2(8,A),material:f._cylinderColor}});p=new Geoworld.Cartesian3(D/2+8,0,p);t=Geoworld.Utils.changeCartesian3ByScalar(w,p);w=f._flagDiv;p=f._canvasZoom;v=document.createElement("canvas");v.width=10*A/D*p;v.height=10*p;Geoworld.RasterizeHtml.drawDocument(w,
v,{zoom:p}).then(function(p){f._htmlPlaneEntity=f._earthCtrl.entities.add({position:new Geoworld.CallbackProperty(k,!1),plane:{plane:new Geoworld.CallbackProperty(q,!0),dimensions:new Geoworld.Cartesian2(D,A),material:new Geoworld.ImageMaterialProperty({image:p.image,transparent:!0})}})},function(f){console.info(f)})}};Object.defineProperties(v.prototype,{});return v});
define("ViewComponent/GwStatisticCylinder.js",[],function(){function v(f,k){this._earthCtrl=f;this._scene=f.coreMap.scene;this._options=Geoworld.defined(k,Geoworld.defaultValue.EMPTY_OBJECT);this._color=Geoworld.defaultValue(k.color,Geoworld.Color.RED);this._lon=Geoworld.defaultValue(k.lon,121);this._lat=Geoworld.defaultValue(k.lat,31);this._height=Geoworld.defaultValue(k.height,0);this._statistics=Geoworld.defaultValue(k.statisticData,1E3);this._radius=Geoworld.defaultValue(k.radius,100);this._duration=
Geoworld.defaultValue(k.duration,2E3);this._gradient=Geoworld.defaultValue(k.gradient,2);this._count=Geoworld.defaultValue(k.count,2);this._scale=Geoworld.defaultValue(k.dataScale,1);this._show=Geoworld.defaultValue(k.show,!0);this._billboardWidthRatio=Geoworld.defaultValue(k.billboardWidthRatio,1.2);this._billboardHeightRatio=Geoworld.defaultValue(k.billboardHeightRatio,2.4);this._prefix=Geoworld.defaultValue(k.prefix,"");this._scaleByDistance=Geoworld.defaultValue(k.scaleByDistance,new Geoworld.NearFarScalar(1500,
3,15E3,0.1));this._topFillColor=Geoworld.defaultValue(k.topFillColor,Geoworld.Color.fromCssColorString("#323232"));this._billboardEntity=this._cylinderEntity=this._circleEntity=void 0;this._position=Geoworld.Cartesian3.fromDegrees(this._lon,this._lat,this._height);this._show&&this.addToMap()}function k(f,k,t,q){var v=document.createElement("canvas");v.width=q;v.height=q;var A=v.getContext("2d");A.save();A.strokeStyle="rgba(0,0,0,0)";A.scale(q/150,q/100);A.save();A.fillStyle=f.toCssColorString();A.lineWidth=
4;A.beginPath();A.moveTo(77.8,82.1);A.lineTo(64.6,69);A.lineTo(23.8,69);A.bezierCurveTo(20.8,69,18.3,66.5,18.3,63.5);A.lineTo(18.3,22.5);A.bezierCurveTo(18.3,19.5,20.8,17,23.8,17);A.lineTo(131.8,17);A.bezierCurveTo(134.8,17,137.3,19.5,137.3,22.5);A.lineTo(137.3,63.5);A.bezierCurveTo(137.3,66.5,134.8,69,131.8,69);A.lineTo(90.9,69);A.lineTo(77.8,82.1);A.closePath();A.moveTo(23.8,18);A.bezierCurveTo(21.3,18,19.3,20,19.3,22.5);A.lineTo(19.3,63.5);A.bezierCurveTo(19.3,66,21.3,68,23.8,68);A.lineTo(65,68);
A.lineTo(77.7,80.7);A.lineTo(90.5,68);A.lineTo(131.8,68);A.bezierCurveTo(134.3,68,136.3,66,136.3,63.5);A.lineTo(136.3,22.5);A.bezierCurveTo(136.3,20,134.3,18,131.8,18);A.lineTo(23.8,18);A.closePath();A.fill();A.stroke();A.restore();A.save();A.fillStyle=k.toCssColorString();A.beginPath();A.moveTo(131.8,18);A.lineTo(23.80000000000001,18);A.bezierCurveTo(21.30000000000001,18,19.30000000000001,20,19.30000000000001,22.5);A.lineTo(19.30000000000001,63.5);A.bezierCurveTo(19.30000000000001,66,21.30000000000001,
68,23.80000000000001,68);A.lineTo(65,68);A.lineTo(77.7,80.7);A.lineTo(90.5,68);A.lineTo(131.8,68);A.bezierCurveTo(134.3,68,136.3,66,136.3,63.5);A.lineTo(136.3,22.5);A.bezierCurveTo(136.3,20,134.2,18,131.8,18);A.closePath();A.fill();A.stroke();A.restore();A.restore();f=Geoworld.writeTextToCanvas(t,{font:"bold "+q+"pt Microsoft YaHei",fillColor:f});var D=q/1.4;t=k=D;f.width>f.height?t=f.height/f.width*D:f.width<f.height&&(k=f.width/f.height*D);D=Math.round((q-k+q/150*8)/2);q=Math.round((5/6*q-t)/2);
A.drawImage(f,D,q,k,t);return v}var q=new Geoworld.Cartesian3;v.prototype.addToMap=function(){Geoworld.defined(this._circleEntity)||(this._circleEntity=this._earthCtrl.entities.add({position:this._position,ellipse:{height:this._height,semiMinorAxis:this._radius,semiMajorAxis:this._radius,material:new Geoworld.CircleWaveMaterialProperty({duration:this._duration,gradient:this._gradient,color:this._color,count:this._count})}}));if(!Geoworld.defined(this._cylinderEntity)){q=Geoworld.Cartesian3.clone(this._position,
q);var f=this._statistics*this._scale,p=Geoworld.Transforms.eastNorthUpToFixedFrame(q),t=new Geoworld.Cartesian3(0,0,f/2);Geoworld.Matrix4.multiplyByPoint(p,t,q);this._cylinderEntity=this._earthCtrl.entities.add({position:q,cylinder:{length:f,topRadius:this._radius/10,bottomRadius:this._radius/10,fill:!0,outline:!1,material:this._color}})}Geoworld.defined(this._billboardEntity)||(q=Geoworld.Cartesian3.clone(this._position,q),f=this._cylinderEntity.cylinder.length._value,p=Geoworld.Cartographic.fromCartesian(q),
f=Geoworld.Cartesian3.fromRadians(p.longitude,p.latitude,p.height+f),this._billboardEntity=this._earthCtrl.entities.add({position:f,billboard:{scaleByDistance:this._scaleByDistance,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,width:this._radius/this._billboardWidthRatio,height:this._radius/this._billboardHeightRatio,image:k(this._color,this._topFillColor,this._prefix+this._statistics,this._radius).toDataURL()}}))};v.prototype.removeFromMap=function(){Geoworld.defined(this._cylinderEntity)&&(this._earthCtrl.entities.remove(this._cylinderEntity),
this._cylinderEntity=void 0);Geoworld.defined(this._circleEntity)&&(this._earthCtrl.entities.remove(this._circleEntity),this._circleEntity=void 0);Geoworld.defined(this._billboardEntity)&&(this._earthCtrl.entities.remove(this._billboardEntity),this._billboardEntity=void 0)};Object.defineProperties(v.prototype,{billboard:{get:function(){return this._billboardEntity}},cylinder:{get:function(){return this._cylinderEntity}},circle:{get:function(){return this._circleEntity}},show:{get:function(){return this._show},
set:function(f){Geoworld.defined(this._billboardEntity)&&(this._billboardEntity.show=f);Geoworld.defined(this._cylinderEntity)&&(this._cylinderEntity.show=f);Geoworld.defined(this._circleEntity)&&(this._circleEntity.show=f)}}});return v});
define("ViewComponent/GwTipsContainer.js",[],function(){function v(k,q){this._earthCtrl=k;this._scene=k.coreMap.scene;this._options=Geoworld.defaultValue(q,Geoworld.defaultValue.EMPTY_OBJECT);this._color=Geoworld.defaultValue(q.color,Geoworld.Color.RED);this._lon=Geoworld.defaultValue(q.lon,121);this._lat=Geoworld.defaultValue(q.lat,31);this._height=Geoworld.defaultValue(q.height,0);this._show=Geoworld.defaultValue(q.show,!0);this._containerWidth=Geoworld.defaultValue(q.containerWidth,200);this._containerHeight=
Geoworld.defaultValue(q.containerHeight,200);this._containerColor=Geoworld.defaultValue(q.cylinderColor,Geoworld.Color.YELLOWGREEN);this._canvasZoom=Geoworld.defaultValue(q.canvasZoom,10);this._scaleByDistance=Geoworld.defaultValue(q.scaleByDistance,new Geoworld.NearFarScalar(1500,3,15E3,0.1));this._tipsHtml=q.tipsHtml;this._tipsEntity=void 0;this._tipsDiv=document.createElement("div");this._tipsDiv.style.opacity="0.7";this._tipsDiv.style.margin="0";this._tipsDiv.style.padding="0";this._tipsDiv.id=
Geoworld.defaultValue(q.id,Geoworld.createGuid());this._tipsDiv.innerHTML=this._tipsHtml;if(!Geoworld.defined(q.tipsHtml))throw new Geoworld.DeveloperError("tipsHtml is required.");this.addToMap()}v.prototype.removeFromMap=function(){Geoworld.defined(this._tipsEntity)&&(this._earthCtrl.entities.remove(this._tipsEntity),this._tipsEntity=void 0);Geoworld.defined(this._tipsDiv)&&(this._earthCtrl.entities.remove(this._tipsDiv),this._tipsDiv=void 0)};v.prototype.addToMap=function(){function k(){return f}
var q=this,f=Geoworld.Cartesian3.fromDegrees(q._lon,q._lat,q._height);if(!Geoworld.defined(q._tipsEntity)){var p=q._containerHeight,t=q._containerWidth,w=q._canvasZoom,v=q._tipsDiv,A=document.createElement("canvas");A.width=t;A.height=p;Geoworld.RasterizeHtml.drawDocument(v,A,{zoom:w}).then(function(f){q._tipsEntity=q._earthCtrl.entities.add({position:new Geoworld.CallbackProperty(k,!1),billboard:{scaleByDistance:q._scaleByDistance,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,width:t,height:p,image:f.image.src}})},
function(f){console.info(f)})}};return v});
define("ViewComponent/GwScreenDialog.js",[],function(){function v(k,q){this._earthCtrl=k;this._scene=k.coreMap.scene;this._options=Geoworld.defaultValue(q,Geoworld.defaultValue.EMPTY_OBJECT);this.element=document.createElement("div");this._html=Geoworld.defaultValue(q.html,"");this.lon=Geoworld.defaultValue(q.lon,121);this.lat=Geoworld.defaultValue(q.lat,31);this._show=Geoworld.defaultValue(q.show,!0);this._point=this._changedC=this._c=this._position=this._pos=this._removeHandler=void 0;this._parameter=
q;this._rtti="GwScreenDialog";this.isInit=!1;!1===this.isInit&&this.addToMap()}v.prototype.setHtml=function(k){this.element.innerHTML=k};v.prototype.setShow=function(k){if(!this.isInit)return 0;this.element.style.display=k?"block":"none"};v.prototype.showAt=function(){if(!this.isInit)return 0;this._pos=Geoworld.SceneTransforms.wgs84ToWindowCoordinates(this._scene,this._position);this.element.style.left=this._pos.x+"px";this.element.style.top=this._pos.y+"px"};v.prototype.removeFromMap=function(){this.element.remove();
this.isInit=!1};v.prototype.addToMap=function(){if(this.isInit)return 0;$(".map-widget").append(this.element);this.element.innerHTML=this._html;this.element.style.position="absolute";this.isInit=!0;this._position=Geoworld.Cartesian3.fromDegrees(this.lon,this.lat,0);this.showAt();this._c=new Geoworld.Cartesian2(this._pos.x,this._pos.y);var k=this;this._scene.camera.moveStart.addEventListener(function(){k._removeHandler=k._scene.postRender.addEventListener(function(){k._c&&(!1===(new Geoworld.EllipsoidalOccluder(Geoworld.Ellipsoid.WGS84,
k._earthCtrl.camera._camera.position)).isPointVisible(k._position)?k.setShow(!1):(!0===k._show&&k.setShow(!0),k._changedC=Geoworld.SceneTransforms.wgs84ToWindowCoordinates(k._scene,k._position),k.showAt(k._changedC),k._c=k._changedC))})});this._scene.camera.moveEnd.addEventListener(function(){k._removeHandler.call()})};Object.defineProperties(v.prototype,{show:{get:function(){return null!==this._show},set:function(k){if(this._show===k)return!1;this._show=k;this.setShow(k)}},html:{get:function(){return null!==
this._html},set:function(k){if(this._html===k)return!1;this._html=k;this.setHtml(k)}}});return v});
define("GwView.js",["./ViewComponent/GwStatisticFlag.js","./ViewComponent/GwStatisticCylinder.js","./ViewComponent/GwTipsContainer.js","./ViewComponent/GwScreenDialog.js"],function(v,k,q,f){function p(f){this._earthCtrl=f;this._coreMap=f.coreMap}p.prototype.createStatisticFlag=function(f){return new v(this._earthCtrl,f)};p.prototype.createStatisticCylinder=function(f){return new k(this._earthCtrl,f)};p.prototype.createTipsContainer=function(f){return new q(this._earthCtrl,f)};p.prototype.createScreenDialog=
function(k){return new f(this._earthCtrl,k)};return p});var P={version:"1.0.0",PlotUtils:{}};P.PlotUtils.distance=function(v,k){return Math.sqrt(Math.pow(v[0]-k[0],2)+Math.pow(v[1]-k[1],2))};P.PlotUtils.wholeDistance=function(v){for(var k=0,q=0;q<v.length-1;q++)k+=P.PlotUtils.distance(v[q],v[q+1]);return k};P.PlotUtils.getBaseLength=function(v){return Math.pow(P.PlotUtils.wholeDistance(v),0.99)};P.PlotUtils.mid=function(v,k){return[(v[0]+k[0])/2,(v[1]+k[1])/2]};
P.PlotUtils.getCircleCenterOfThreePoints=function(v,k,q){var f=[(v[0]+k[0])/2,(v[1]+k[1])/2],p=[(v[0]+q[0])/2,(v[1]+q[1])/2];return P.PlotUtils.getIntersectPoint(f,[f[0]-v[1]+k[1],f[1]+v[0]-k[0]],p,[p[0]-v[1]+q[1],p[1]+v[0]-q[0]])};
P.PlotUtils.getIntersectPoint=function(v,k,q,f){if(v[1]==k[1]){var p=(f[0]-q[0])/(f[1]-q[1]),t=p*(v[1]-q[1])+q[0],w=v[1];return[t,w]}if(q[1]==f[1]){var x=(k[0]-v[0])/(k[1]-v[1]);return t=x*(q[1]-v[1])+v[0],w=q[1],[t,w]}return x=(k[0]-v[0])/(k[1]-v[1]),p=(f[0]-q[0])/(f[1]-q[1]),w=(x*v[1]-v[0]-p*q[1]+q[0])/(x-p),t=x*w-x*v[1]+v[0],[t,w]};
P.PlotUtils.getAzimuth=function(v,k){var q,f=Math.asin(Math.abs(k[1]-v[1])/P.PlotUtils.distance(v,k));return k[1]>=v[1]&&k[0]>=v[0]?q=f+Math.PI:k[1]>=v[1]&&k[0]<v[0]?q=P.Constants.TWO_PI-f:k[1]<v[1]&&k[0]<v[0]?q=f:k[1]<v[1]&&k[0]>=v[0]&&(q=Math.PI-f),q};P.PlotUtils.getAngleOfThreePoints=function(v,k,q){v=P.PlotUtils.getAzimuth(k,v)-P.PlotUtils.getAzimuth(k,q);return 0>v?v+P.Constants.TWO_PI:v};P.PlotUtils.isClockWise=function(v,k,q){return(q[1]-v[1])*(k[0]-v[0])>(k[1]-v[1])*(q[0]-v[0])};
P.PlotUtils.getPointOnLine=function(v,k,q){return[k[0]+v*(q[0]-k[0]),k[1]+v*(q[1]-k[1])]};P.PlotUtils.getCubicValue=function(v,k,q,f,p){v=Math.max(Math.min(v,1),0);var t=1-v,w=v*v,x=w*v,A=t*t,D=A*t;return[D*k[0]+3*A*v*q[0]+3*t*w*f[0]+x*p[0],D*k[1]+3*A*v*q[1]+3*t*w*f[1]+x*p[1]]};P.PlotUtils.getThirdPoint=function(v,k,q,f,p){v=P.PlotUtils.getAzimuth(v,k);p=p?v+q:v-q;q=f*Math.cos(p);f*=Math.sin(p);return[k[0]+q,k[1]+f]};
P.PlotUtils.getArcPoints=function(v,k,q,f){for(var p,t=[],w=f-q,w=0>w?w+P.Constants.TWO_PI:w,x=0;x<=P.Constants.FITTING_COUNT;x++)p=q+w*x/P.Constants.FITTING_COUNT,f=v[0]+k*Math.cos(p),p=v[1]+k*Math.sin(p),t.push([f,p]);return t};
P.PlotUtils.getBisectorNormals=function(v,k,q,f){var p=P.PlotUtils.getNormal(k,q,f),t=Math.sqrt(p[0]*p[0]+p[1]*p[1]),w=p[0]/t,p=p[1]/t,x=P.PlotUtils.distance(k,q),A=P.PlotUtils.distance(q,f);t>P.Constants.ZERO_TOLERANCE?P.PlotUtils.isClockWise(k,q,f)?(f=v*x,t=q[0]-f*p,x=q[1]+f*w,k=[t,x],f=v*A,t=q[0]+f*p,x=q[1]-f*w):(f=v*x,t=q[0]+f*p,x=q[1]-f*w,k=[t,x],f=v*A,t=q[0]-f*p,x=q[1]+f*w):(t=q[0]+v*(k[0]-q[0]),x=q[1]+v*(k[1]-q[1]),k=[t,x],t=q[0]+v*(f[0]-q[0]),x=q[1]+v*(f[1]-q[1]));v=[t,x];return[k,v]};
P.PlotUtils.getNormal=function(v,k,q){var f=v[0]-k[0];v=v[1]-k[1];var p=Math.sqrt(f*f+v*v),f=f/p;v/=p;p=q[0]-k[0];k=q[1]-k[1];q=Math.sqrt(p*p+k*k);return[f+p/q,v+k/q]};
P.PlotUtils.getCurvePoints=function(v,k){for(var q=[P.PlotUtils.getLeftMostControlPoint(k,v)],f=0;f<k.length-2;f++)var p=k[f],t=k[f+1],p=P.PlotUtils.getBisectorNormals(v,p,t,k[f+2]),q=q.concat(p);f=P.PlotUtils.getRightMostControlPoint(k,v);q.push(f);for(var w=[],f=0;f<k.length-1;f++){p=k[f];t=k[f+1];w.push(p);for(v=0;v<P.Constants.FITTING_COUNT;v++){var x=P.PlotUtils.getCubicValue(v/P.Constants.FITTING_COUNT,p,q[2*f],q[2*f+1],t);w.push(x)}w.push(t)}return w};
P.PlotUtils.getLeftMostControlPoint=function(v,k){var q=v[0],f=v[1],p=v[2],t=P.PlotUtils.getBisectorNormals(0,q,f,p)[0],p=P.PlotUtils.getNormal(q,f,p);if(Math.sqrt(p[0]*p[0]+p[1]*p[1])>P.Constants.ZERO_TOLERANCE)var p=P.PlotUtils.mid(q,f),w=q[0]-p[0],x=q[1]-p[1],f=2/P.PlotUtils.distance(q,f),q=-f*x,f=f*w,w=2*q*f,x=t[0]-p[0],A=t[1]-p[1],t=p[0]+(q*q-f*f)*x+w*A,p=p[1]+w*x+(f*f-q*q)*A;else t=q[0]+k*(f[0]-q[0]),p=q[1]+k*(f[1]-q[1]);return[t,p]};
P.PlotUtils.getRightMostControlPoint=function(v,k){var q=v.length,f=v[q-3],p=v[q-2],t=v[q-1],q=P.PlotUtils.getBisectorNormals(0,f,p,t)[1],f=P.PlotUtils.getNormal(f,p,t);if(Math.sqrt(f[0]*f[0]+f[1]*f[1])>P.Constants.ZERO_TOLERANCE)var f=P.PlotUtils.mid(p,t),w=t[0]-f[0],x=t[1]-f[1],t=2/P.PlotUtils.distance(p,t),p=-t*x,t=t*w,w=2*p*t,x=q[0]-f[0],A=q[1]-f[1],q=f[0]+(p*p-t*t)*x+w*A,f=f[1]+w*x+(t*t-p*p)*A;else q=t[0]+k*(p[0]-t[0]),f=t[1]+k*(p[1]-t[1]);return[q,f]};
P.PlotUtils.getBezierPoints=function(v){if(2>=v.length)return v;for(var k=[],q=v.length-1,f=0;1>=f;f+=0.01){for(var p=y=0,t=0;q>=t;t++){var w=P.PlotUtils.getBinomialFactor(q,t),x=Math.pow(f,t),A=Math.pow(1-f,q-t),p=p+w*x*A*v[t][0];y+=w*x*A*v[t][1]}k.push([p,y])}return k.push(v[q]),k};P.PlotUtils.getBinomialFactor=function(v,k){return P.PlotUtils.getFactorial(v)/(P.PlotUtils.getFactorial(k)*P.PlotUtils.getFactorial(v-k))};
P.PlotUtils.getFactorial=function(v){if(1>=v)return 1;if(2==v)return 2;if(3==v)return 6;if(4==v)return 24;if(5==v)return 120;for(var k=1,q=1;v>=q;q++)k*=q;return k};P.PlotUtils.getQBSplinePoints=function(v){if(2>=v.length)return v;var k=[],q=v.length-2-1;k.push(v[0]);for(var f=0;q>=f;f++)for(var p=0;1>=p;p+=0.05){for(var t=y=0,w=0;2>=w;w++){var x=P.PlotUtils.getQuadricBSplineFactor(w,p),t=t+x*v[f+w][0];y+=x*v[f+w][1]}k.push([t,y])}return k.push(v[v.length-1]),k};
P.PlotUtils.getQuadricBSplineFactor=function(v,k){return 0==v?Math.pow(k-1,2)/2:1==v?(-2*Math.pow(k,2)+2*k+1)/2:2==v?Math.pow(k,2)/2:0};P.Constants={TWO_PI:2*Math.PI,HALF_PI:Math.PI/2,FITTING_COUNT:100,ZERO_TOLERANCE:1E-4};define("MilitaryPlotting/GwPlotUtil.js",function(){});
define("MilitaryPlotting/GwAlgorithm.js",["./GwPlotUtil.js"],function(v){var k={version:"1.2.0",createTime:"2021.04.01",author:"sss"},q={headHeightFactor:0.18,headWidthFactor:0.3,neckHeightFactor:0.85,neckWidthFactor:0.15,tailWidthFactor:0.1,headTailFactor:0.8,swallowTailFactor:1},f=Math.PI/8.5,p=Math.PI/13;k.algorithm={};k.algorithm.doubleArrow=function(f){this.tempPoint4=this.connPoint=null;this.points=f;var p={controlPoint:null,polygonalPoint:null},q=f.length;if(!(2>q)){if(2==q)return f;var v=
this.points[0],D=this.points[1],z=this.points[2],q=f.length;3==q?this.tempPoint4=k.algorithm.getTempPoint4(v,D,z):this.tempPoint4=this.points[3];3==q||4==q?this.connPoint=P.PlotUtils.mid(v,D):this.connPoint=this.points[4];var C,B;P.PlotUtils.isClockWise(v,D,z)?(C=k.algorithm.getArrowPoints(v,this.connPoint,this.tempPoint4,!1),B=k.algorithm.getArrowPoints(this.connPoint,D,z,!0)):(C=k.algorithm.getArrowPoints(D,this.connPoint,z,!1),B=k.algorithm.getArrowPoints(this.connPoint,v,this.tempPoint4,!0));
var E=C.length,G=(E-5)/2,q=C.slice(0,G);f=C.slice(G,G+5);C=C.slice(G+5,E);var F=B.slice(0,G),H=B.slice(G,G+5);B=B.slice(G+5,E);F=P.PlotUtils.getBezierPoints(F);B=P.PlotUtils.getBezierPoints(B.concat(q.slice(1)));C=P.PlotUtils.getBezierPoints(C);B=F.concat(H,B,f,C);B=k.algorithm.array2Dto1D(B);p.controlPoint=[v,D,z,this.tempPoint4,this.connPoint];p.polygonalPoint=Geoworld.Cartesian3.fromDegreesArray(B)}return p};k.algorithm.threeArrow=function(f){this.tempPoint5=this.tempPoint4=this.connPoint=null;
this.points=f;var p={controlPoint:null,polygonalPoint:null},q=f.length;if(2<=q){if(2==q)return f;var v=this.points[0],D=this.points[1],z=this.points[2],q=f.length;3==q?(this.tempPoint4=k.algorithm.getTempPoint4(v,D,z),this.tempPoint5=P.PlotUtils.mid(z,this.tempPoint4)):(this.tempPoint4=this.points[3],this.tempPoint5=this.points[4]);this.connPoint=6>q?P.PlotUtils.mid(v,D):this.points[5];var C,B;P.PlotUtils.isClockWise(v,D,z)?(C=k.algorithm.getArrowPoints(v,this.connPoint,this.tempPoint4,!1),B=k.algorithm.getArrowPoints(this.connPoint,
D,z,!0)):(C=k.algorithm.getArrowPoints(D,this.connPoint,z,!1),B=k.algorithm.getArrowPoints(this.connPoint,v,this.tempPoint4,!0));var E=C.length,G=(E-5)/2,q=C.slice(0,G);f=C.slice(G,G+5);C=C.slice(G+5,E);var F=B.slice(0,G),H=B.slice(G,G+5);B=B.slice(G+5,E);F=P.PlotUtils.getBezierPoints(F);q=P.PlotUtils.getBezierPoints(B.concat(q.slice(1)));C=P.PlotUtils.getBezierPoints(C);f=F.concat(H,q,f,C);f=k.algorithm.array2Dto1D(f);p.controlPoint=[v,D,z,this.tempPoint4,this.tempPoint5,this.connPoint];p.polygonalPoint=
Geoworld.Cartesian3.fromDegreesArray(f)}return p};k.algorithm.array2Dto1D=function(f){var k=[];f.forEach(function(f){k.push(f[0]);k.push(f[1])});return k};k.algorithm.getArrowPoints=function(f,p,q,v){this.type="doublearrow";this.headHeightFactor=0.25;this.headWidthFactor=0.3;this.neckHeightFactor=0.85;this.neckWidthFactor=0.15;var D=P.PlotUtils.mid(f,p),z=P.PlotUtils.distance(D,q),C=P.PlotUtils.getThirdPoint(q,D,0,0.3*z,!0),B=P.PlotUtils.getThirdPoint(q,D,0,0.5*z,!0),C=P.PlotUtils.getThirdPoint(D,
C,P.Constants.HALF_PI,z/5,v),B=P.PlotUtils.getThirdPoint(D,B,P.Constants.HALF_PI,z/4,v),z=[D,C,B,q];q=k.algorithm.getArrowHeadPoints(z,this.headHeightFactor,this.headWidthFactor,this.neckHeightFactor,this.neckWidthFactor);v=q[0];D=q[4];C=P.PlotUtils.distance(f,p)/P.PlotUtils.getBaseLength(z)/2;C=k.algorithm.getArrowBodyPoints(z,v,D,C);B=C.length;z=C.slice(0,B/2);C=C.slice(B/2,B);return z.push(v),C.push(D),z=z.reverse(),z.push(p),C=C.reverse(),C.push(f),z.reverse().concat(q,C)};k.algorithm.getArrowHeadPoints=
function(f,k,p){this.type="doublearrow";this.headHeightFactor=0.25;this.headWidthFactor=0.3;this.neckHeightFactor=0.85;this.neckWidthFactor=0.15;var q=P.PlotUtils.getBaseLength(f)*this.headHeightFactor,v=f[f.length-1];p=(P.PlotUtils.distance(k,p),q*this.headWidthFactor);k=q*this.neckWidthFactor;var z=q*this.neckHeightFactor,q=P.PlotUtils.getThirdPoint(f[f.length-2],v,0,q,!0),z=P.PlotUtils.getThirdPoint(f[f.length-2],v,0,z,!0);f=P.PlotUtils.getThirdPoint(v,q,P.Constants.HALF_PI,p,!1);p=P.PlotUtils.getThirdPoint(v,
q,P.Constants.HALF_PI,p,!0);q=P.PlotUtils.getThirdPoint(v,z,P.Constants.HALF_PI,k,!1);k=P.PlotUtils.getThirdPoint(v,z,P.Constants.HALF_PI,k,!0);return[q,f,v,p,k]};k.algorithm.getArrowBodyPoints=function(f,k,p,q){var v=P.PlotUtils.wholeDistance(f);q*=P.PlotUtils.getBaseLength(f);k=P.PlotUtils.distance(k,p);k=(q-k)/2;p=0;for(var z=[],C=[],B=1;B<f.length-1;B++){var E=P.PlotUtils.getAngleOfThreePoints(f[B-1],f[B],f[B+1])/2;p+=P.PlotUtils.distance(f[B-1],f[B]);var G=(q/2-p/v*k)/Math.sin(E),F=P.PlotUtils.getThirdPoint(f[B-
1],f[B],Math.PI-E,G,!0),E=P.PlotUtils.getThirdPoint(f[B-1],f[B],E,G,!1);z.push(F);C.push(E)}return z.concat(C)};k.algorithm.getTempPoint4=function(f,k,p){var q,v,z,C;k=P.PlotUtils.mid(f,k);var B=P.PlotUtils.distance(k,p);p=P.PlotUtils.getAngleOfThreePoints(f,k,p);return p<P.Constants.HALF_PI?(v=B*Math.sin(p),z=B*Math.cos(p),C=P.PlotUtils.getThirdPoint(f,k,P.Constants.HALF_PI,v,!1),q=P.PlotUtils.getThirdPoint(k,C,P.Constants.HALF_PI,z,!0)):p>=P.Constants.HALF_PI&&p<Math.PI?(v=B*Math.sin(Math.PI-p),
z=B*Math.cos(Math.PI-p),C=P.PlotUtils.getThirdPoint(f,k,P.Constants.HALF_PI,v,!1),q=P.PlotUtils.getThirdPoint(k,C,P.Constants.HALF_PI,z,!1)):p>=Math.PI&&p<1.5*Math.PI?(v=B*Math.sin(p-Math.PI),z=B*Math.cos(p-Math.PI),C=P.PlotUtils.getThirdPoint(f,k,P.Constants.HALF_PI,v,!0),q=P.PlotUtils.getThirdPoint(k,C,P.Constants.HALF_PI,z,!0)):(v=B*Math.sin(2*Math.PI-p),z=B*Math.cos(2*Math.PI-p),C=P.PlotUtils.getThirdPoint(f,k,P.Constants.HALF_PI,v,!0),q=P.PlotUtils.getThirdPoint(k,C,P.Constants.HALF_PI,z,!1)),
q};k.algorithm.tailedAttackArrow=function(f){f=k.algorithm.dereplication(f);this.tailWidthFactor=q.tailWidthFactor;this.swallowTailFactor=q.swallowTailFactor;this.swallowTailPnt=q.swallowTailPnt;var p={controlPoint:null,polygonalPoint:null};p.controlPoint=f;var v=f.length;if(!(2>v)){if(2==f.length)return p.polygonalPoint=f,p;var A=f[0],D=f[1];P.PlotUtils.isClockWise(f[0],f[1],f[2])&&(A=f[1],D=f[0]);v=[P.PlotUtils.mid(A,D)].concat(f.slice(2));f=k.algorithm.getAttackArrowHeadPoints(v,A,D,q);var z=f[0],
C=f[4],B=P.PlotUtils.distance(A,D),E=P.PlotUtils.getBaseLength(v);this.swallowTailPnt=P.PlotUtils.getThirdPoint(v[1],v[0],0,E*this.tailWidthFactor*this.swallowTailFactor,!0);B=k.algorithm.getAttackArrowBodyPoints(v,z,C,B/E);v=B.length;A=[A].concat(B.slice(0,v/2));A.push(z);D=[D].concat(B.slice(v/2,v));z=[];D.push(C);A=P.PlotUtils.getQBSplinePoints(A);D=P.PlotUtils.getQBSplinePoints(D);z=k.algorithm.array2Dto1D(A.concat(f,D.reverse(),[this.swallowTailPnt,A[0]]));p.polygonalPoint=Geoworld.Cartesian3.fromDegreesArray(z)}return p};
k.algorithm.getAttackArrowHeadPoints=function(f,k,p,q){this.headHeightFactor=q.headHeightFactor;this.headTailFactor=q.headTailFactor;this.headWidthFactor=q.headWidthFactor;this.neckWidthFactor=q.neckWidthFactor;this.neckHeightFactor=q.neckHeightFactor;var v=P.PlotUtils.getBaseLength(f),z=v*this.headHeightFactor;q=f[f.length-1];v=P.PlotUtils.distance(q,f[f.length-2]);k=P.PlotUtils.distance(k,p);z>k*this.headTailFactor&&(z=k*this.headTailFactor);p=z*this.headWidthFactor;k=z*this.neckWidthFactor;z=z>
v?v:z;v=z*this.neckHeightFactor;z=P.PlotUtils.getThirdPoint(f[f.length-2],q,0,z,!0);v=P.PlotUtils.getThirdPoint(f[f.length-2],q,0,v,!0);f=P.PlotUtils.getThirdPoint(q,z,P.Constants.HALF_PI,p,!1);z=P.PlotUtils.getThirdPoint(q,z,P.Constants.HALF_PI,p,!0);p=P.PlotUtils.getThirdPoint(q,v,P.Constants.HALF_PI,k,!1);k=P.PlotUtils.getThirdPoint(q,v,P.Constants.HALF_PI,k,!0);return[p,f,q,z,k]};k.algorithm.getAttackArrowBodyPoints=function(f,k,p,q){var v=P.PlotUtils.wholeDistance(f);q*=P.PlotUtils.getBaseLength(f);
k=P.PlotUtils.distance(k,p);k=(q-k)/2;p=0;for(var z=[],C=[],B=1;B<f.length-1;B++){var E=P.PlotUtils.getAngleOfThreePoints(f[B-1],f[B],f[B+1])/2;p+=P.PlotUtils.distance(f[B-1],f[B]);var G=(q/2-p/v*k)/Math.sin(E),F=P.PlotUtils.getThirdPoint(f[B-1],f[B],Math.PI-E,G,!0),E=P.PlotUtils.getThirdPoint(f[B-1],f[B],E,G,!1);z.push(F);C.push(E)}return z.concat(C)};k.algorithm.dereplication=function(f){var k=f[f.length-1],p=!1,q=[],q=f.filter(function(f){if(f[0]!=k[0]&&f[1]!=k[1])return f;p=!0});p&&q.push(k);
return q};k.algorithm.fineArrow=function(k,q){if(!(2>k.length||2>q.length)){var x=[];x[0]=k;x[1]=q;e=x[0];r=x[1];n=P.PlotUtils.getBaseLength(x);g=0.15*n;i=0.2*n;s=0.25*n;a=P.PlotUtils.getThirdPoint(r,e,P.Constants.HALF_PI,g,!0);l=P.PlotUtils.getThirdPoint(r,e,P.Constants.HALF_PI,g,!1);u=P.PlotUtils.getThirdPoint(e,r,f,s,!1);c=P.PlotUtils.getThirdPoint(e,r,f,s,!0);v=P.PlotUtils.getThirdPoint(e,r,p,i,!1);h=P.PlotUtils.getThirdPoint(e,r,p,i,!0);d=[];j=P.PlotUtils.mid(a,l);n=P.PlotUtils.getThirdPoint(a,
j,P.Constants.HALF_PI,0.15*i,!1);d.push(a[0],a[1],v[0],v[1],u[0],u[1],r[0],r[1],c[0],c[1],h[0],h[1],l[0],l[1],n[0],n[1]);return Geoworld.Cartesian3.fromDegreesArray(d)}};k.algorithm.Arrow=function(f,k){if(!(2>f.length||2>k.length)){var p=[];p[0]=f;p[1]=k;e=p[0];r=p[1];n=P.PlotUtils.getBaseLength(p);g=0.15*n;i=0.25*n;s=0.3*n;a=P.PlotUtils.getThirdPoint(r,e,P.Constants.HALF_PI,g,!0);l=P.PlotUtils.getThirdPoint(r,e,P.Constants.HALF_PI,g,!1);u=P.PlotUtils.getThirdPoint(e,r,0,s,!1);m=P.PlotUtils.getThirdPoint(a,
u,P.Constants.HALF_PI,g,!1);b=P.PlotUtils.getThirdPoint(l,u,P.Constants.HALF_PI,g,!0);v=P.PlotUtils.getThirdPoint(a,m,P.Constants.HALF_PI,i,!1);h=P.PlotUtils.getThirdPoint(l,b,P.Constants.HALF_PI,i,!0);d=[];j=P.PlotUtils.mid(a,l);n=P.PlotUtils.getThirdPoint(a,j,P.Constants.HALF_PI,0.15*i,!1);d.push(a[0],a[1],m[0],m[1],v[0],v[1],r[0],r[1],h[0],h[1],b[0],b[1],l[0],l[1],n[0],n[1]);return Geoworld.Cartesian3.fromDegreesArray(d)}};k.algorithm.Surface=function(f){f.push(f[0]);f=P.PlotUtils.getCurvePoints(0.4,
f);f=k.algorithm.array2Dto1D(f);return Geoworld.Cartesian3.fromDegreesArray(f)};k.algorithm.Assmbly=function(f){var k,p;if(2===f.length){k=P.PlotUtils.mid(f[0],f[1]);var q=P.PlotUtils.getBaseLength([f[0],k])/0.9;p=P.PlotUtils.getThirdPoint(f[0],k,Math.PI,q,!0);f=[f[0],p,f[1]]}k=P.PlotUtils.mid(f[0],f[2]);f.push(k,f[0],f[1]);k=[];var v,z,C,q=[];for(p=0;p<f.length-2;p++)v=f[p],z=f[p+1],C=f[p+2],v=P.PlotUtils.getBisectorNormals(0.4,v,z,C),k=k.concat(v);v=k.length;k=[k[v-1]].concat(k.slice(0,v-1));for(C=
0;C<f.length-2;C++){v=f[C];z=f[C+1];for(var q=q.concat(v),B=0;100>=B;B++)p=P.PlotUtils.getCubicValue(B/100,v,k[2*C],k[2*C+1],z),q=q.concat(p);q=q.concat(z)}return Geoworld.Cartesian3.fromDegreesArray(q)};k.algorithm.Sector=function(f){var p,q,v;p=f[0];q=f[1];v=f[2];f=P.PlotUtils.getBaseLength([p,q]);q=P.PlotUtils.getAzimuth(q,p);v=P.PlotUtils.getAzimuth(v,p);var D=[];D.push(p);D=D.concat(P.PlotUtils.getArcPoints(p,f,q,v));D.push(p);D=k.algorithm.array2Dto1D(D);return Geoworld.Cartesian3.fromDegreesArray(D)};
k.algorithm.Recflag=function(f){f[1][0]=f[0][0];var k=f[0],p=f[1],q=P.PlotUtils.getBaseLength(f),v=0.02*q,q=P.PlotUtils.getThirdPoint(k,p,Math.PI,-(0.4*q),!0);f[0]=q;var z=1.3*P.PlotUtils.getBaseLength(f);f=P.PlotUtils.getThirdPoint(p,q,-Math.PI/2,z,!0);z=P.PlotUtils.getThirdPoint(q,p,Math.PI/2,z,!0);P.PlotUtils.getThirdPoint(q,p,Math.PI/2,v,!0);var C=P.PlotUtils.getThirdPoint(p,k,Math.PI/2,v,!1),v=P.PlotUtils.getThirdPoint(p,q,Math.PI/2,v,!1),q=[];q.push(k[0],k[1],p[0],p[1],z[0],z[1],f[0],f[1],v[0],
v[1],C[0],C[1],k[0],k[1]);return Geoworld.Cartesian3.fromDegreesArray(q)};k.algorithm.Pennant=function(f){f[1][0]=f[0][0];var k=f[0],p=f[1],q=P.PlotUtils.getBaseLength(f),v=0.02*q,q=P.PlotUtils.getThirdPoint(k,p,Math.PI,-(0.4*q),!0);f[0]=q;f=1.3*P.PlotUtils.getBaseLength(f);P.PlotUtils.getThirdPoint(p,q,-Math.PI/2,f,!0);f=P.PlotUtils.getThirdPoint(q,p,Math.PI/2,f,!0);P.PlotUtils.getThirdPoint(q,p,Math.PI/2,v,!0);var z=P.PlotUtils.getThirdPoint(p,k,Math.PI/2,v,!1),v=P.PlotUtils.getThirdPoint(p,q,Math.PI/
2,v,!1),q=[];q.push(k[0],k[1],p[0],p[1],f[0],f[1],v[0],v[1],z[0],z[1],k[0],k[1]);return Geoworld.Cartesian3.fromDegreesArray(q)};k.algorithm.Mflag=function(f){f[1][0]=f[0][0];var p=f[0],q=f[1],v=P.PlotUtils.getBaseLength(f),D=0.02*v,v=P.PlotUtils.getThirdPoint(p,q,Math.PI,-(0.4*v),!0);f[0]=v;var z=P.PlotUtils.getBaseLength(f);f=1.3*z;var z=0.1*z,C=P.PlotUtils.getThirdPoint(q,v,-Math.PI/2,f,!0),B=P.PlotUtils.getThirdPoint(v,q,Math.PI/2,f,!0),E=P.PlotUtils.getThirdPoint(v,q,Math.PI/2,D,!0);f=P.PlotUtils.getThirdPoint(q,
p,Math.PI/2,D,!1);var D=P.PlotUtils.getThirdPoint(q,v,Math.PI/2,D,!1),G=[];G.push(E);G.push(B);B=k.algorithm.calculatePonits(G,z);E=[];E.push(D);E.push(C);z=k.algorithm.calculatePonits(E,z,!0);C=[];C.push(p[0],p[1],v[0],v[1],q[0],q[1]);C=C.concat(B);C=C.concat(z);C.push(D[0],D[1],f[0],f[1],p[0],p[1]);return Geoworld.Cartesian3.fromDegreesArray(C)};k.algorithm.calculatePonits=function(f,p,q){var v=[];1<f.length&&(v=f[0],f=f[f.length-1],v=P.PlotUtils.getBezierPoints([v,[(f[0]-v[0])/4+v[0],(f[1]-v[1])/
4+v[1]+p],[(v[0]+f[0])/2,(f[1]+v[1])/2],[3*(f[0]-v[0])/4+v[0],3*(f[1]-v[1])/4+v[1]-p],f]));q&&(v=v.reverse(),console.log(v));return k.algorithm.array2Dto1D(v)};(function(){var f=10,k=10,p=10;return f++,k++,p++});return k});
define("MilitaryPlotting/StraightArrow.js",["./GwAlgorithm.js"],function(v){function k(f,k){this.type="StraightArrow";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=f.coreMap;this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.fillMaterial=Geoworld.Color.fromCssColorString("#0000FF").withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,
color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.arrowEntity=this.floatPoint=this.firstPoint=null;this.state=-1;this.selectPoint=null;this.clickStep=0;this.modifyHandler=null}function q(f,k){var t=k.scene.drillPick(f);k.render();for(var q=!0,v=0;v<t.length;v++)if(t[v]&&t[v].primitive||t[v]instanceof Geoworld.Cesium3DTileFeature)q=!0;if(q)t=k.scene.pickPosition(f);else{t=k.camera.getPickRay(f);if(!t)return null;t=k.scene.globe.pick(t,k.scene)}return t}k.prototype.disable=
function(){this.positions=[];this.firstPoint&&(this.earthCtrl.entities.remove(this.firstPoint),this.firstPoint=null);this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),this.selectPoint=
null);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0};k.prototype.disableHandler=function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)};k.prototype.startDraw=function(){var f=this;this.state=1;this.handler.setInputAction(function(k){if(k=q(k.position,f.viewer))0==f.positions.length&&(f.firstPoint=f.creatPoint(k),
f.firstPoint.type="firstPoint",f.floatPoint=f.creatPoint(k),f.floatPoint.type="floatPoint",f.positions.push(k)),3==f.positions.length&&(f.firstPoint.show=!1,f.floatPoint.show=!1,f.handler.destroy(),f.arrowEntity.objId=f.objId,f.state=-1),f.positions.push(k.clone())},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(k){1>f.positions.length||!(k=q(k.endPosition,f.viewer))||(f.floatPoint.position.setValue(k),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),
f.positions.push(k)):(f.positions.push(k),f.arrowEntity=f.showArrowOnMap(f.positions))))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)};k.prototype.startModify=function(){this.state=2;this.firstPoint.show=!0;this.floatPoint.show=!0;var f=this;this.clickStep=0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(k){var t=f.viewer.scene.pick(k.position);Geoworld.defined(t)&&t.id?(f.clickStep++,t.id.objId||(f.selectPoint=
t.id)):(f.modifyHandler.destroy(),f.modifyHandler=null,f.firstPoint.show=!1,f.floatPoint.show=!1,f.state=-1);2==f.clickStep&&(f.clickStep=0,(k=q(k.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(k),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(k){f.selectPoint&&(k=q(k.endPosition,f.viewer))&&(f.selectPoint.position.setValue(k),"firstPoint"==f.selectPoint.type&&(f.positions[1]=k),"floatPoint"==f.selectPoint.type&&(f.positions[2]=
k))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)};k.prototype.createByData=function(f){this.state=-1;this.positions=[];for(var k=[],t=0;t<f.length;t++){var q=Geoworld.Cartesian3.fromDegrees(f[t][0],f[t][1]);k.push(q)}this.positions=k;this.firstPoint=this.creatPoint(this.positions[1]);this.firstPoint.type="firstPoint";this.floatPoint=this.creatPoint(this.positions[2]);this.floatPoint.type="floatPoint";this.arrowEntity=this.showArrowOnMap(this.positions);this.firstPoint.show=!1;this.floatPoint.show=!1;
this.arrowEntity.objId=this.objId};k.prototype.clear=function(){this.state=0;this.firstPoint&&this.earthCtrl.entities.remove(this.firstPoint);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1};k.prototype.getLnglats=function(){for(var f=[],k=0;k<this.positions.length;k++){var t=this.cartesianToLatlng(this.positions[k]);f.push(t)}return f};k.prototype.getPositions=function(){return this.positions};k.prototype.creatPoint=
function(f){f=this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY}});f.attr="editPoint";return f};k.prototype.showArrowOnMap=function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(2>f.length)return null;var t=f[2],q=k.cartesianToLatlng(f[1]),x=k.cartesianToLatlng(t),t=[],q=v.algorithm.fineArrow([q[0],
q[1]],[x[0],x[1]]);if(-1!=JSON.stringify(q).indexOf("null"))return[];for(x=0;x<q.length;x++){var A=new Geoworld.Cartesian3(q[x].x,q[x].y,q[x].z);t.push(A)}return new Geoworld.PolygonHierarchy(t)},!1),show:!0,fill:!0,material:k.fillMaterial})})};k.prototype.cartesianToLatlng=function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]};return k});
define("MilitaryPlotting/StraightArrow3D.js",["./GwAlgorithm.js"],function(v){function k(f,k){var t=k.scene.drillPick(f);k.render();for(var q=!0,v=0;v<t.length;v++)if(t[v]&&t[v].primitive||t[v]instanceof Geoworld.Cesium3DTileFeature)q=!0;if(q)t=k.scene.pickPosition(f);else{t=k.camera.getPickRay(f);if(!t)return null;t=k.scene.globe.pick(t,k.scene)}return t}var q=function(f,k){this.type="StraightArrow";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;
this.viewer=f.coreMap;this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.fillMaterial=Geoworld.Color.fromCssColorString("#0000FF").withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.arrowEntity=this.floatPoint=this.firstPoint=null;this.state=-1;this.selectPoint=null;this.clickStep=
0;this.modifyHandler=null;this.extrudedHeight=100};q.prototype={disable:function(){this.positions=[];this.firstPoint&&(this.earthCtrl.entities.remove(this.firstPoint),this.firstPoint=null);this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.selectPoint&&
(this.earthCtrl.entities.remove(this.selectPoint),this.selectPoint=null);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))0==f.positions.length&&
(f.firstPoint=f.creatPoint(p),f.firstPoint.type="firstPoint",f.floatPoint=f.creatPoint(p),f.floatPoint.type="floatPoint",f.positions.push(p)),3==f.positions.length&&(f.firstPoint.show=!1,f.floatPoint.show=!1,f.handler.destroy(),f.arrowEntity.objId=f.objId,f.state=-1),f.positions.push(p.clone())},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){1>f.positions.length||!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?
(f.positions.pop(),f.positions.push(p)):(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions))))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},startModify:function(){this.state=2;this.firstPoint.show=!0;this.floatPoint.show=!0;var f=this;this.clickStep=0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var t=f.viewer.scene.pick(p.position);Geoworld.defined(t)&&t.id?(f.clickStep++,t.id.objId||
(f.selectPoint=t.id)):(f.modifyHandler.destroy(),f.modifyHandler=null,f.firstPoint.show=!1,f.floatPoint.show=!1,f.state=-1);2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){f.selectPoint&&(p=k(p.endPosition,f.viewer))&&(f.selectPoint.position.setValue(p),"firstPoint"==f.selectPoint.type&&(f.positions[1]=p),"floatPoint"==f.selectPoint.type&&
(f.positions[2]=p))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},createByData:function(f){this.state=-1;this.positions=[];for(var k=[],t=0;t<f.length;t++){var q=Geoworld.Cartesian3.fromDegrees(f[t][0],f[t][1]);k.push(q)}this.positions=k;this.firstPoint=this.creatPoint(this.positions[1]);this.firstPoint.type="firstPoint";this.floatPoint=this.creatPoint(this.positions[2]);this.floatPoint.type="floatPoint";this.arrowEntity=this.showArrowOnMap(this.positions);this.firstPoint.show=!1;this.floatPoint.show=
!1;this.arrowEntity.objId=this.objId},clear:function(){this.state=0;this.firstPoint&&this.earthCtrl.entities.remove(this.firstPoint);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var t=this.cartesianToLatlng(this.positions[k]);f.push(t)}return f},getPositions:function(){return this.positions},creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,
billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(2>f.length)return null;var t=f[2],q=k.cartesianToLatlng(f[1]),x=k.cartesianToLatlng(t),t=[],q=v.algorithm.fineArrow([q[0],q[1]],[x[0],x[1]]);if(-1!=JSON.stringify(q).indexOf("null"))return[];
for(x=0;x<q.length;x++){var A=new Geoworld.Cartesian3(q[x].x,q[x].y,q[x].z);t.push(A)}return new Geoworld.PolygonHierarchy(t)},!1),extrudedHeight:this.extrudedHeight,show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/AttackArrow.js",["./GwAlgorithm.js"],function(v){function k(f,k){var t=k.scene.drillPick(f);k.render();for(var q=!0,v=0;v<t.length;v++)if(t[v]&&t[v].primitive||t[v]instanceof Geoworld.Cesium3DTileFeature)q=!0;if(q)t=k.scene.pickPosition(f);else{t=k.camera.getPickRay(f);if(!t)return null;t=k.scene.globe.pick(t,k.scene)}return t}var q=function(f){this.type="AttackArrow";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=
f.coreMap;this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.fillMaterial=Geoworld.Color.RED.withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.state=-1;this.arrowEntity=this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null};q.prototype=
{disable:function(){this.positions=[];this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),this.selectPoint=null);for(var f=0;f<this.pointArr.length;f++)this.pointArr[f]&&this.earthCtrl.entities.remove(this.pointArr[f]);
this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))0==f.positions.length&&(f.floatPoint=f.creatPoint(p),f.floatPoint.wz=-1),f.positions.push(p),
p=f.creatPoint(p),p.wz=2<f.positions.length?f.positions.length-1:f.positions.length,f.pointArr.push(p)},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){2>f.positions.length||!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions),f.arrowEntity.objId=f.objId)))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE);
this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer)){for(var t=0;t<f.pointArr.length;t++)f.pointArr[t].show=!1;f.floatPoint.show=!1;f.earthCtrl.entities.remove(f.floatPoint);f.floatPoint=null;p=f.creatPoint(p);p.show=!1;p.wz=f.positions.length;f.pointArr.push(p);f.handler.destroy()}},Geoworld.ScreenSpaceEventType.RIGHT_CLICK)},createByData:function(f){this.positions=[];this.state=-1;this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null;
for(var k=[],t=0;t<f.length;t++){var q=Geoworld.Cartesian3.fromDegrees(f[t][0],f[t][1]);k.push(q)}this.positions=k;for(t=0;t<this.positions.length;t++)f=this.creatPoint(this.positions[t]),f.show=!1,f.wz=t+1,this.pointArr.push(f);this.arrowEntity=this.showArrowOnMap(this.positions);this.arrowEntity.objId=this.objId},startModify:function(){this.state=2;for(var f=this,p=0;p<f.pointArr.length;p++)f.pointArr[p].show=!0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));
this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);if(Geoworld.defined(q)&&q.id)f.clickStep++,q.id.objId||(f.selectPoint=q.id);else{for(q=0;q<f.pointArr.length;q++)f.pointArr[q].show=!1;f.floatPoint&&(f.floatPoint.show=!1);f.state=-1;f.modifyHandler.destroy();f.modifyHandler=null}2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){(p=
k(p.endPosition,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.positions[f.selectPoint.wz-1]=p)},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},clear:function(){for(var f=this.state=0;f<this.pointArr.length;f++)this.pointArr[f]&&this.earthCtrl.entities.remove(this.pointArr[f]);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var t=
this.cartesianToLatlng(this.positions[k]);f.push(t)}return f},getPositions:function(){return this.positions},creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(3>f.length)return null;for(var t=[],q=0;q<f.length;q++){var x=
k.cartesianToLatlng(f[q]);t.push(x)}t=v.algorithm.tailedAttackArrow(t);q=[];-1==JSON.stringify(t.polygonalPoint).indexOf("null")&&(q=t.polygonalPoint);return new Geoworld.PolygonHierarchy(q)},!1),show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/AttackArrow3D.js",["./GwAlgorithm.js"],function(v){function k(f,k){var t=k.scene.drillPick(f);k.render();for(var q=!0,v=0;v<t.length;v++)if(t[v]&&t[v].primitive||t[v]instanceof Geoworld.Cesium3DTileFeature)q=!0;if(q)t=k.scene.pickPosition(f);else{t=k.camera.getPickRay(f);if(!t)return null;t=k.scene.globe.pick(t,k.scene)}return t}var q=function(f){this.type="AttackArrow";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=
f.coreMap;this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.fillMaterial=Geoworld.Color.RED.withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.state=-1;this.arrowEntity=this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null;this.extrudedHeight=
100};q.prototype={disable:function(){this.positions=[];this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),this.selectPoint=null);for(var f=0;f<this.pointArr.length;f++)this.pointArr[f]&&
this.earthCtrl.entities.remove(this.pointArr[f]);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))0==f.positions.length&&(f.floatPoint=
f.creatPoint(p),f.floatPoint.wz=-1),f.positions.push(p),p=f.creatPoint(p),p.wz=2<f.positions.length?f.positions.length-1:f.positions.length,f.pointArr.push(p)},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){2>f.positions.length||!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions),f.arrowEntity.objId=
f.objId)))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE);this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer)){for(var t=0;t<f.pointArr.length;t++)f.pointArr[t].show=!1;f.floatPoint.show=!1;f.earthCtrl.entities.remove(f.floatPoint);f.floatPoint=null;p=f.creatPoint(p);p.show=!1;p.wz=f.positions.length;f.pointArr.push(p);f.handler.destroy()}},Geoworld.ScreenSpaceEventType.RIGHT_CLICK)},createByData:function(f){this.positions=[];this.state=-1;this.floatPoint=null;this.pointArr=[];this.selectPoint=
null;this.clickStep=0;this.modifyHandler=null;for(var k=[],t=0;t<f.length;t++){var q=Geoworld.Cartesian3.fromDegrees(f[t][0],f[t][1]);k.push(q)}this.positions=k;for(t=0;t<this.positions.length;t++)f=this.creatPoint(this.positions[t]),f.show=!1,f.wz=t+1,this.pointArr.push(f);this.arrowEntity=this.showArrowOnMap(this.positions);this.arrowEntity.objId=this.objId},startModify:function(){this.state=2;for(var f=this,p=0;p<f.pointArr.length;p++)f.pointArr[p].show=!0;this.modifyHandler||(this.modifyHandler=
new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);if(Geoworld.defined(q)&&q.id)f.clickStep++,q.id.objId||(f.selectPoint=q.id);else{for(q=0;q<f.pointArr.length;q++)f.pointArr[q].show=!1;f.floatPoint&&(f.floatPoint.show=!1);f.state=-1;f.modifyHandler.destroy();f.modifyHandler=null}2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=
null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){(p=k(p.endPosition,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.positions[f.selectPoint.wz-1]=p)},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},clear:function(){for(var f=this.state=0;f<this.pointArr.length;f++)this.pointArr[f]&&this.earthCtrl.entities.remove(this.pointArr[f]);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);
this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var t=this.cartesianToLatlng(this.positions[k]);f.push(t)}return f},getPositions:function(){return this.positions},creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(3>
f.length)return null;for(var t=[],q=0;q<f.length;q++){var x=k.cartesianToLatlng(f[q]);t.push(x)}t=v.algorithm.tailedAttackArrow(t);q=[];-1==JSON.stringify(t.polygonalPoint).indexOf("null")&&(q=t.polygonalPoint);return new Geoworld.PolygonHierarchy(q)},!1),extrudedHeight:this.extrudedHeight,show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),
k]}};return q});
define("MilitaryPlotting/PincerArrow.js",["./GwAlgorithm.js"],function(v){function k(f,k){var t=k.scene.drillPick(f);k.render();for(var q=!0,v=0;v<t.length;v++)if(t[v]&&t[v].primitive||t[v]instanceof Geoworld.Cesium3DTileFeature)q=!0;if(q)t=k.scene.pickPosition(f);else{t=k.camera.getPickRay(f);if(!t)return null;t=k.scene.globe.pick(t,k.scene)}return t}var q=function(f){this.type="PincerArrow";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=
f.coreMap;this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.fillMaterial=Geoworld.Color.YELLOW.withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.state=-1;this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null};q.prototype={disable:function(){this.positions=
[];this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),this.selectPoint=null);for(var f=0;f<this.pointArr.length;f++)this.pointArr[f]&&this.earthCtrl.entities.remove(this.pointArr[f]);
this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))if(0===f.positions.length&&(f.floatPoint=f.creatPoint(p)),4<=f.positions.length){p=
f.creatPoint(p);p.wz=f.positions.length;f.pointArr.push(p);for(p=0;p<f.pointArr.length;p++)f.pointArr[p].show=!1;f.floatPoint&&(f.floatPoint.show=!1,f.earthCtrl.entities.remove(f.floatPoint),f.floatPoint=null);f.handler.destroy()}else f.positions.push(p),p=f.creatPoint(p),p.wz=2<f.positions.length?f.positions.length-1:f.positions.length,f.pointArr.push(p)},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){2>f.positions.length||!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),
2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions),f.arrowEntity.objId=f.objId)))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},createByData:function(f){this.positions=[];this.state=-1;this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null;for(var k=[],t=0;t<f.length;t++){var q=Geoworld.Cartesian3.fromDegrees(f[t][0],f[t][1]);k.push(q)}this.positions=
k;for(t=0;t<this.positions.length;t++)f=this.creatPoint(this.positions[t]),f.show=!1,f.wz=t+1,this.pointArr.push(f);this.arrowEntity=this.showArrowOnMap(this.positions);this.arrowEntity.objId=this.objId},startModify:function(){this.state=2;for(var f=this,p=0;p<f.pointArr.length;p++)f.pointArr[p].show=!0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);if(Geoworld.defined(q)&&
q.id)f.clickStep++,q.id.objId||(f.selectPoint=q.id);else{for(q=0;q<f.pointArr.length;q++)f.pointArr[q].show=!1;f.state=-1;f.modifyHandler.destroy();f.modifyHandler=null}2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){(p=k(p.endPosition,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.positions[f.selectPoint.wz-1]=
p)},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},clear:function(){for(var f=this.state=0;f<this.pointArr.length;f++)this.pointArr[f]&&this.earthCtrl.entities.remove(this.pointArr[f]);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var t=this.cartesianToLatlng(this.positions[k]);f.push(t)}return f},getPositions:function(){return this.positions},
creatPoint:function(f){return this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM}})},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(3>f.length)return null;for(var t=[],q=0;q<f.length;q++){var x=k.cartesianToLatlng(f[q]);t.push(x)}t=v.algorithm.threeArrow(t);q=[];-1==JSON.stringify(t.polygonalPoint).indexOf("null")&&
(q=t.polygonalPoint);return new Geoworld.PolygonHierarchy(q)},!1),show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/PincerArrow3D.js",["./GwAlgorithm.js"],function(v){function k(f,k){var t=k.scene.drillPick(f);k.render();for(var q=!0,v=0;v<t.length;v++)if(t[v]&&t[v].primitive||t[v]instanceof Geoworld.Cesium3DTileFeature)q=!0;if(q)t=k.scene.pickPosition(f);else{t=k.camera.getPickRay(f);if(!t)return null;t=k.scene.globe.pick(t,k.scene)}return t}var q=function(f){this.type="PincerArrow";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=
f.coreMap;this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.fillMaterial=Geoworld.Color.YELLOW.withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.state=-1;this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null;this.extrudedHeight=
100};q.prototype={disable:function(){this.positions=[];this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),this.selectPoint=null);for(var f=0;f<this.pointArr.length;f++)this.pointArr[f]&&
this.earthCtrl.entities.remove(this.pointArr[f]);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))if(0===f.positions.length&&(f.floatPoint=
f.creatPoint(p)),4<=f.positions.length){p=f.creatPoint(p);p.wz=f.positions.length;f.pointArr.push(p);for(p=0;p<f.pointArr.length;p++)f.pointArr[p].show=!1;f.floatPoint&&(f.floatPoint.show=!1,f.earthCtrl.entities.remove(f.floatPoint),f.floatPoint=null);f.handler.destroy()}else f.positions.push(p),p=f.creatPoint(p),p.wz=2<f.positions.length?f.positions.length-1:f.positions.length,f.pointArr.push(p)},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){2>f.positions.length||
!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions),f.arrowEntity.objId=f.objId)))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},createByData:function(f){this.positions=[];this.state=-1;this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null;for(var k=[],t=0;t<f.length;t++){var q=Geoworld.Cartesian3.fromDegrees(f[t][0],
f[t][1]);k.push(q)}this.positions=k;for(t=0;t<this.positions.length;t++)f=this.creatPoint(this.positions[t]),f.show=!1,f.wz=t+1,this.pointArr.push(f);this.arrowEntity=this.showArrowOnMap(this.positions);this.arrowEntity.objId=this.objId},startModify:function(){this.state=2;for(var f=this,p=0;p<f.pointArr.length;p++)f.pointArr[p].show=!0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);
if(Geoworld.defined(q)&&q.id)f.clickStep++,q.id.objId||(f.selectPoint=q.id);else{for(q=0;q<f.pointArr.length;q++)f.pointArr[q].show=!1;f.state=-1;f.modifyHandler.destroy();f.modifyHandler=null}2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){(p=k(p.endPosition,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.positions[f.selectPoint.wz-
1]=p)},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},clear:function(){for(var f=this.state=0;f<this.pointArr.length;f++)this.pointArr[f]&&this.earthCtrl.entities.remove(this.pointArr[f]);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var t=this.cartesianToLatlng(this.positions[k]);f.push(t)}return f},getPositions:function(){return this.positions},
creatPoint:function(f){return this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM}})},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(3>f.length)return null;for(var t=[],q=0;q<f.length;q++){var x=k.cartesianToLatlng(f[q]);t.push(x)}t=v.algorithm.threeArrow(t);q=[];-1==JSON.stringify(t.polygonalPoint).indexOf("null")&&
(q=t.polygonalPoint);return new Geoworld.PolygonHierarchy(q)},!1),extrudedHeight:this.extrudedHeight,show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/Arrow.js",["./GwAlgorithm.js"],function(v){function k(f,k){var t=k.scene.drillPick(f);k.render();for(var q=!0,v=0;v<t.length;v++)if(t[v]&&t[v].primitive||t[v]instanceof Geoworld.Cesium3DTileFeature)q=!0;if(q)t=k.scene.pickPosition(f);else{t=k.camera.getPickRay(f);if(!t)return null;t=k.scene.globe.pick(t,k.scene)}return t}var q=function(f){this.type="Arrow";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=f.coreMap;
this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.fillMaterial=Geoworld.Color.fromCssColorString("#0000FF").withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.arrowEntity=this.floatPoint=this.firstPoint=null;this.state=-1;this.selectPoint=null;this.clickStep=0};q.prototype=
{disable:function(){this.positions=[];this.firstPoint&&(this.earthCtrl.entities.remove(this.firstPoint),this.firstPoint=null);this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),
this.selectPoint=null);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))0==f.positions.length&&(f.firstPoint=f.creatPoint(p),f.firstPoint.type=
"firstPoint",f.floatPoint=f.creatPoint(p),f.floatPoint.type="floatPoint",f.positions.push(p)),3==f.positions.length&&(f.firstPoint.show=!1,f.floatPoint.show=!1,f.handler.destroy(),f.arrowEntity.objId=f.objId,f.state=-1),f.positions.push(p.clone())},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){1>f.positions.length||!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):
(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions))))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},startModify:function(){this.state=2;this.firstPoint.show=!0;this.floatPoint.show=!0;var f=this;this.clickStep=0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);Geoworld.defined(q)&&q.id?(f.clickStep++,q.id.objId||(f.selectPoint=q.id)):(f.modifyHandler.destroy(),
f.modifyHandler=null,f.firstPoint.show=!1,f.floatPoint.show=!1,f.state=-1);2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){f.selectPoint&&(p=k(p.endPosition,f.viewer))&&(f.selectPoint.position.setValue(p),"firstPoint"==f.selectPoint.type&&(f.positions[1]=p),"floatPoint"==f.selectPoint.type&&(f.positions[2]=p))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},
createByData:function(f){this.state=-1;this.positions=[];for(var k=[],q=0;q<f.length;q++){var v=Geoworld.Cartesian3.fromDegrees(f[q][0],f[q][1]);k.push(v)}this.positions=k;this.firstPoint=this.creatPoint(this.positions[1]);this.firstPoint.type="firstPoint";this.floatPoint=this.creatPoint(this.positions[2]);this.floatPoint.type="floatPoint";this.arrowEntity=this.showArrowOnMap(this.positions);this.firstPoint.show=!1;this.floatPoint.show=!1;this.arrowEntity.objId=this.objId},clear:function(){this.state=
0;this.firstPoint&&this.earthCtrl.entities.remove(this.firstPoint);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var q=this.cartesianToLatlng(this.positions[k]);f.push(q)}return f},getPositions:function(){return this.positions},creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,
disableDepthTestDistance:Number.POSITIVE_INFINITY}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(2>f.length)return null;var q=f[2],w=k.cartesianToLatlng(f[1]),x=k.cartesianToLatlng(q),q=[],w=v.algorithm.Arrow([w[0],w[1]],[x[0],x[1]]);if(-1!=JSON.stringify(w).indexOf("null"))return[];for(x=0;x<w.length;x++){var A=new Geoworld.Cartesian3(w[x].x,w[x].y,
w[x].z);q.push(A)}return new Geoworld.PolygonHierarchy(q)},!1),show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/Arrow3D.js",["./GwAlgorithm.js"],function(v){function k(f,k){var q=k.scene.drillPick(f);k.render();for(var v=!0,x=0;x<q.length;x++)if(q[x]&&q[x].primitive||q[x]instanceof Geoworld.Cesium3DTileFeature)v=!0;if(v)q=k.scene.pickPosition(f);else{q=k.camera.getPickRay(f);if(!q)return null;q=k.scene.globe.pick(q,k.scene)}return q}var q=function(){this.type="Arrow";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=earthCtrl;this.viewer=
earthCtrl.coreMap;this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.fillMaterial=Geoworld.Color.fromCssColorString("#0000FF").withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.arrowEntity=this.floatPoint=this.firstPoint=null;this.state=-1;this.selectPoint=null;this.clickStep=
0;this.modifyHandler=null;this.extrudedHeight=100};q.prototype={disable:function(){this.positions=[];this.firstPoint&&(this.earthCtrl.entities.remove(this.firstPoint),this.firstPoint=null);this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.selectPoint&&
(this.earthCtrl.entities.remove(this.selectPoint),this.selectPoint=null);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))0==f.positions.length&&
(f.firstPoint=f.creatPoint(p),f.firstPoint.type="firstPoint",f.floatPoint=f.creatPoint(p),f.floatPoint.type="floatPoint",f.positions.push(p)),3==f.positions.length&&(f.firstPoint.show=!1,f.floatPoint.show=!1,f.handler.destroy(),f.arrowEntity.objId=f.objId,f.state=-1),f.positions.push(p.clone())},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){1>f.positions.length||!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?
(f.positions.pop(),f.positions.push(p)):(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions))))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},startModify:function(){this.state=2;this.firstPoint.show=!0;this.floatPoint.show=!0;var f=this;this.clickStep=0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);Geoworld.defined(q)&&q.id?(f.clickStep++,q.id.objId||
(f.selectPoint=q.id)):(f.modifyHandler.destroy(),f.modifyHandler=null,f.firstPoint.show=!1,f.floatPoint.show=!1,f.state=-1);2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){f.selectPoint&&(p=k(p.endPosition,f.viewer))&&(f.selectPoint.position.setValue(p),"firstPoint"==f.selectPoint.type&&(f.positions[1]=p),"floatPoint"==f.selectPoint.type&&
(f.positions[2]=p))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},createByData:function(f){this.state=-1;this.positions=[];for(var k=[],q=0;q<f.length;q++){var v=Geoworld.Cartesian3.fromDegrees(f[q][0],f[q][1]);k.push(v)}this.positions=k;this.firstPoint=this.creatPoint(this.positions[1]);this.firstPoint.type="firstPoint";this.floatPoint=this.creatPoint(this.positions[2]);this.floatPoint.type="floatPoint";this.arrowEntity=this.showArrowOnMap(this.positions);this.firstPoint.show=!1;this.floatPoint.show=
!1;this.arrowEntity.objId=this.objId},clear:function(){this.state=0;this.firstPoint&&this.earthCtrl.entities.remove(this.firstPoint);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var q=this.cartesianToLatlng(this.positions[k]);f.push(q)}return f},getPositions:function(){return this.positions},creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,
billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,disableDepthTestDistance:Number.POSITIVE_INFINITY}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(2>f.length)return null;var q=f[2],w=k.cartesianToLatlng(f[1]),x=k.cartesianToLatlng(q),q=[],w=v.algorithm.Arrow([w[0],w[1]],[x[0],x[1]]);if(-1!=JSON.stringify(w).indexOf("null"))return[];
for(x=0;x<w.length;x++){var A=new Geoworld.Cartesian3(w[x].x,w[x].y,w[x].z);q.push(A)}return new Geoworld.PolygonHierarchy(q)},!1),extrudedHeight:this.extrudedHeight,show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/Surface.js",["./GwAlgorithm.js"],function(v){function k(f,k){var q=k.scene.drillPick(f);k.render();for(var v=!0,x=0;x<q.length;x++)if(q[x]&&q[x].primitive||q[x]instanceof Geoworld.Cesium3DTileFeature)v=!0;if(v)q=k.scene.pickPosition(f);else{q=k.camera.getPickRay(f);if(!q)return null;q=k.scene.globe.pick(q,k.scene)}return q}var q=function(f){this.type="surface";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=f.coreMap;
this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.fillMaterial=Geoworld.Color.RED.withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.state=-1;this.arrowEntity=this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null};q.prototype={disable:function(){this.positions=
[];this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),this.selectPoint=null);for(var f=0;f<this.pointArr.length;f++)this.pointArr[f]&&this.earthCtrl.entities.remove(this.pointArr[f]);
this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))0==f.positions.length&&(f.floatPoint=f.creatPoint(p),f.floatPoint.wz=-1),f.positions.push(p),
p=f.creatPoint(p),p.wz=2<f.positions.length?f.positions.length-1:f.positions.length,f.pointArr.push(p)},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){2>f.positions.length||!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions),f.arrowEntity.objId=f.objId)))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE);
this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer)){for(var q=0;q<f.pointArr.length;q++)f.pointArr[q].show=!1;f.floatPoint.show=!1;f.earthCtrl.entities.remove(f.floatPoint);f.floatPoint=null;p=f.creatPoint(p);p.show=!1;p.wz=f.positions.length;f.pointArr.push(p);f.handler.destroy()}},Geoworld.ScreenSpaceEventType.RIGHT_CLICK)},createByData:function(f){this.positions=[];this.state=-1;this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null;
for(var k=[],q=0;q<f.length;q++){var v=Geoworld.Cartesian3.fromDegrees(f[q][0],f[q][1]);k.push(v)}this.positions=k;for(q=0;q<this.positions.length;q++)f=this.creatPoint(this.positions[q]),f.show=!1,f.wz=q+1,this.pointArr.push(f);this.arrowEntity=this.showArrowOnMap(this.positions);this.arrowEntity.objId=this.objId},startModify:function(){this.state=2;for(var f=this,p=0;p<f.pointArr.length;p++)f.pointArr[p].show=!0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));
this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);if(Geoworld.defined(q)&&q.id)f.clickStep++,q.id.objId||(f.selectPoint=q.id);else{for(q=0;q<f.pointArr.length;q++)f.pointArr[q].show=!1;f.floatPoint&&(f.floatPoint.show=!1);f.state=-1;f.modifyHandler.destroy();f.modifyHandler=null}2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){(p=
k(p.endPosition,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.positions[f.selectPoint.wz-1]=p)},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},clear:function(){for(var f=this.state=0;f<this.pointArr.length;f++)this.pointArr[f]&&this.earthCtrl.entities.remove(this.pointArr[f]);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var q=
this.cartesianToLatlng(this.positions[k]);f.push(q)}return f},getPositions:function(){return this.positions},creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(3>f.length)return null;for(var q=[],w=0;w<f.length;w++){var x=
k.cartesianToLatlng(f[w]);q.push(x)}q=v.algorithm.Surface(q);if(-1!=JSON.stringify(q).indexOf("null"))return[];x=[];for(w=0;w<q.length;w++){var A=new Geoworld.Cartesian3(q[w].x,q[w].y,q[w].z);x.push(A)}return new Geoworld.PolygonHierarchy(x)},!1),show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/Surface3D.js",["./GwAlgorithm.js"],function(v){function k(f,k){var q=k.scene.drillPick(f);k.render();for(var v=!0,x=0;x<q.length;x++)if(q[x]&&q[x].primitive||q[x]instanceof Geoworld.Cesium3DTileFeature)v=!0;if(v)q=k.scene.pickPosition(f);else{q=k.camera.getPickRay(f);if(!q)return null;q=k.scene.globe.pick(q,k.scene)}return q}var q=function(f){this.type="surface";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=f.coreMap;
this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.fillMaterial=Geoworld.Color.RED.withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.state=-1;this.arrowEntity=this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null;this.extrudedHeight=
100};q.prototype={disable:function(){this.positions=[];this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),this.selectPoint=null);for(var f=0;f<this.pointArr.length;f++)this.pointArr[f]&&
this.earthCtrl.entities.remove(this.pointArr[f]);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))0==f.positions.length&&(f.floatPoint=
f.creatPoint(p),f.floatPoint.wz=-1),f.positions.push(p),p=f.creatPoint(p),p.wz=2<f.positions.length?f.positions.length-1:f.positions.length,f.pointArr.push(p)},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){2>f.positions.length||!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions),f.arrowEntity.objId=
f.objId)))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE);this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer)){for(var q=0;q<f.pointArr.length;q++)f.pointArr[q].show=!1;f.floatPoint.show=!1;f.earthCtrl.entities.remove(f.floatPoint);f.floatPoint=null;p=f.creatPoint(p);p.show=!1;p.wz=f.positions.length;f.pointArr.push(p);f.handler.destroy()}},Geoworld.ScreenSpaceEventType.RIGHT_CLICK)},createByData:function(f){this.positions=[];this.state=-1;this.floatPoint=null;this.pointArr=[];this.selectPoint=
null;this.clickStep=0;this.modifyHandler=null;for(var k=[],q=0;q<f.length;q++){var v=Geoworld.Cartesian3.fromDegrees(f[q][0],f[q][1]);k.push(v)}this.positions=k;for(q=0;q<this.positions.length;q++)f=this.creatPoint(this.positions[q]),f.show=!1,f.wz=q+1,this.pointArr.push(f);this.arrowEntity=this.showArrowOnMap(this.positions);this.arrowEntity.objId=this.objId},startModify:function(){this.state=2;for(var f=this,p=0;p<f.pointArr.length;p++)f.pointArr[p].show=!0;this.modifyHandler||(this.modifyHandler=
new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);if(Geoworld.defined(q)&&q.id)f.clickStep++,q.id.objId||(f.selectPoint=q.id);else{for(q=0;q<f.pointArr.length;q++)f.pointArr[q].show=!1;f.floatPoint&&(f.floatPoint.show=!1);f.state=-1;f.modifyHandler.destroy();f.modifyHandler=null}2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=
null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){(p=k(p.endPosition,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.positions[f.selectPoint.wz-1]=p)},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},clear:function(){for(var f=this.state=0;f<this.pointArr.length;f++)this.pointArr[f]&&this.earthCtrl.entities.remove(this.pointArr[f]);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);
this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var q=this.cartesianToLatlng(this.positions[k]);f.push(q)}return f},getPositions:function(){return this.positions},creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(3>
f.length)return null;for(var q=[],w=0;w<f.length;w++){var x=k.cartesianToLatlng(f[w]);q.push(x)}q=v.algorithm.Surface(q);if(-1!=JSON.stringify(q).indexOf("null"))return[];x=[];for(w=0;w<q.length;w++){var A=new Geoworld.Cartesian3(q[w].x,q[w].y,q[w].z);x.push(A)}return new Geoworld.PolygonHierarchy(x)},!1),extrudedHeight:this.extrudedHeight,show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);
return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/Assmbly.js",["./GwAlgorithm.js"],function(v){function k(f,k){var q=k.scene.drillPick(f);k.render();for(var v=!0,x=0;x<q.length;x++)if(q[x]&&q[x].primitive||q[x]instanceof Geoworld.Cesium3DTileFeature)v=!0;if(v)q=k.scene.pickPosition(f);else{q=k.camera.getPickRay(f);if(!q)return null;q=k.scene.globe.pick(q,k.scene)}return q}var q=function(f){this.type="assmbly";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=f.coreMap;
this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.fillMaterial=Geoworld.Color.RED.withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.state=-1;this.arrowEntity=this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null};q.prototype={disable:function(){this.positions=
[];this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),this.selectPoint=null);for(var f=0;f<this.pointArr.length;f++)this.pointArr[f]&&this.earthCtrl.entities.remove(this.pointArr[f]);
this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))if(0===f.positions.length&&(f.floatPoint=f.creatPoint(p)),3<=f.positions.length){p=
f.creatPoint(p);p.wz=f.positions.length;f.pointArr.push(p);for(p=0;p<f.pointArr.length;p++)f.pointArr[p].show=!1;f.floatPoint&&(f.floatPoint.show=!1,f.earthCtrl.entities.remove(f.floatPoint),f.floatPoint=null);f.handler.destroy()}else f.positions.push(p),p=f.creatPoint(p),p.wz=2<f.positions.length?f.positions.length-1:f.positions.length,f.pointArr.push(p)},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){2>f.positions.length||!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),
2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions),f.arrowEntity.objId=f.objId)))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},createByData:function(f){this.positions=[];this.state=-1;this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null;for(var k=[],q=0;q<f.length;q++){var v=Geoworld.Cartesian3.fromDegrees(f[q][0],f[q][1]);k.push(v)}this.positions=
k;for(q=0;q<this.positions.length;q++)f=this.creatPoint(this.positions[q]),f.show=!1,f.wz=q+1,this.pointArr.push(f);this.arrowEntity=this.showArrowOnMap(this.positions);this.arrowEntity.objId=this.objId},startModify:function(){this.state=2;for(var f=this,p=0;p<f.pointArr.length;p++)f.pointArr[p].show=!0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);if(Geoworld.defined(q)&&
q.id)f.clickStep++,q.id.objId||(f.selectPoint=q.id);else{for(q=0;q<f.pointArr.length;q++)f.pointArr[q].show=!1;f.floatPoint&&(f.floatPoint.show=!1);f.state=-1;f.modifyHandler.destroy();f.modifyHandler=null}2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){(p=k(p.endPosition,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),
f.positions[f.selectPoint.wz-1]=p)},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},clear:function(){for(var f=this.state=0;f<this.pointArr.length;f++)this.pointArr[f]&&this.earthCtrl.entities.remove(this.pointArr[f]);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var q=this.cartesianToLatlng(this.positions[k]);f.push(q)}return f},getPositions:function(){return this.positions},
creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(3>f.length)return null;for(var q=[],w=0;w<f.length;w++){var x=k.cartesianToLatlng(f[w]);q.push(x)}q=v.algorithm.Assmbly(q);if(-1!=JSON.stringify(q).indexOf("null"))return[];
x=[];for(w=0;w<q.length;w++){var A=new Geoworld.Cartesian3(q[w].x,q[w].y,q[w].z);x.push(A)}return new Geoworld.PolygonHierarchy(x)},!1),show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/Assmbly3D.js",["./GwAlgorithm.js"],function(v){function k(f,k){var q=k.scene.drillPick(f);k.render();for(var v=!0,x=0;x<q.length;x++)if(q[x]&&q[x].primitive||q[x]instanceof Geoworld.Cesium3DTileFeature)v=!0;if(v)q=k.scene.pickPosition(f);else{q=k.camera.getPickRay(f);if(!q)return null;q=k.scene.globe.pick(q,k.scene)}return q}var q=function(f){this.type="assmbly";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=f.coreMap;
this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.fillMaterial=Geoworld.Color.RED.withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.state=-1;this.arrowEntity=this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null;this.extrudedHeight=
100};q.prototype={disable:function(){this.positions=[];this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),this.selectPoint=null);for(var f=0;f<this.pointArr.length;f++)this.pointArr[f]&&
this.earthCtrl.entities.remove(this.pointArr[f]);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))if(0===f.positions.length&&(f.floatPoint=
f.creatPoint(p)),3<=f.positions.length){p=f.creatPoint(p);p.wz=f.positions.length;f.pointArr.push(p);for(p=0;p<f.pointArr.length;p++)f.pointArr[p].show=!1;f.floatPoint&&(f.floatPoint.show=!1,f.earthCtrl.entities.remove(f.floatPoint),f.floatPoint=null);f.handler.destroy()}else f.positions.push(p),p=f.creatPoint(p),p.wz=2<f.positions.length?f.positions.length-1:f.positions.length,f.pointArr.push(p)},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){2>f.positions.length||
!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions),f.arrowEntity.objId=f.objId)))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},createByData:function(f){this.positions=[];this.state=-1;this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null;for(var k=[],q=0;q<f.length;q++){var v=Geoworld.Cartesian3.fromDegrees(f[q][0],
f[q][1]);k.push(v)}this.positions=k;for(q=0;q<this.positions.length;q++)f=this.creatPoint(this.positions[q]),f.show=!1,f.wz=q+1,this.pointArr.push(f);this.arrowEntity=this.showArrowOnMap(this.positions);this.arrowEntity.objId=this.objId},startModify:function(){this.state=2;for(var f=this,p=0;p<f.pointArr.length;p++)f.pointArr[p].show=!0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);
if(Geoworld.defined(q)&&q.id)f.clickStep++,q.id.objId||(f.selectPoint=q.id);else{for(q=0;q<f.pointArr.length;q++)f.pointArr[q].show=!1;f.floatPoint&&(f.floatPoint.show=!1);f.state=-1;f.modifyHandler.destroy();f.modifyHandler=null}2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){(p=k(p.endPosition,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),
f.positions[f.selectPoint.wz-1]=p)},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},clear:function(){for(var f=this.state=0;f<this.pointArr.length;f++)this.pointArr[f]&&this.earthCtrl.entities.remove(this.pointArr[f]);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var q=this.cartesianToLatlng(this.positions[k]);f.push(q)}return f},getPositions:function(){return this.positions},
creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(3>f.length)return null;for(var q=[],w=0;w<f.length;w++){var x=k.cartesianToLatlng(f[w]);q.push(x)}q=v.algorithm.Assmbly(q);if(-1!=JSON.stringify(q).indexOf("null"))return[];
x=[];for(w=0;w<q.length;w++){var A=new Geoworld.Cartesian3(q[w].x,q[w].y,q[w].z);x.push(A)}return new Geoworld.PolygonHierarchy(x)},!1),extrudedHeight:this.extrudedHeight,show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/Sector.js",["./GwAlgorithm.js"],function(v){function k(f,k){var q=k.scene.drillPick(f);k.render();for(var v=!0,x=0;x<q.length;x++)if(q[x]&&q[x].primitive||q[x]instanceof Geoworld.Cesium3DTileFeature)v=!0;if(v)q=k.scene.pickPosition(f);else{q=k.camera.getPickRay(f);if(!q)return null;q=k.scene.globe.pick(q,k.scene)}return q}var q=function(f){this.type="sector";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=f.coreMap;
this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.fillMaterial=Geoworld.Color.RED.withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.state=-1;this.arrowEntity=this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null};q.prototype={disable:function(){this.positions=
[];this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),this.selectPoint=null);for(var f=0;f<this.pointArr.length;f++)this.pointArr[f]&&this.earthCtrl.entities.remove(this.pointArr[f]);
this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))if(0===f.positions.length&&(f.floatPoint=f.creatPoint(p)),3<=f.positions.length){p=
f.creatPoint(p);p.wz=f.positions.length;f.pointArr.push(p);for(p=0;p<f.pointArr.length;p++)f.pointArr[p].show=!1;f.floatPoint&&(f.floatPoint.show=!1,f.earthCtrl.entities.remove(f.floatPoint),f.floatPoint=null);f.handler.destroy()}else f.positions.push(p),p=f.creatPoint(p),p.wz=2<f.positions.length?f.positions.length-1:f.positions.length,f.pointArr.push(p)},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){2>f.positions.length||!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),
2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions),f.arrowEntity.objId=f.objId)))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},createByData:function(f){this.positions=[];this.state=-1;this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null;for(var k=[],q=0;q<f.length;q++){var v=Geoworld.Cartesian3.fromDegrees(f[q][0],f[q][1]);k.push(v)}this.positions=
k;for(q=0;q<this.positions.length;q++)f=this.creatPoint(this.positions[q]),f.show=!1,f.wz=q+1,this.pointArr.push(f);this.arrowEntity=this.showArrowOnMap(this.positions);this.arrowEntity.objId=this.objId},startModify:function(){this.state=2;for(var f=this,p=0;p<f.pointArr.length;p++)f.pointArr[p].show=!0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);if(Geoworld.defined(q)&&
q.id)f.clickStep++,q.id.objId||(f.selectPoint=q.id);else{for(q=0;q<f.pointArr.length;q++)f.pointArr[q].show=!1;f.floatPoint&&(f.floatPoint.show=!1);f.state=-1;f.modifyHandler.destroy();f.modifyHandler=null}2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){(p=k(p.endPosition,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),
f.positions[f.selectPoint.wz-1]=p)},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},clear:function(){for(var f=this.state=0;f<this.pointArr.length;f++)this.pointArr[f]&&this.earthCtrl.entities.remove(this.pointArr[f]);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var q=this.cartesianToLatlng(this.positions[k]);f.push(q)}return f},getPositions:function(){return this.positions},
creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(3>f.length)return null;for(var q=[],w=0;w<f.length;w++){var x=k.cartesianToLatlng(f[w]);q.push(x)}q=v.algorithm.Sector(q);if(-1!=JSON.stringify(q).indexOf("null"))return[];
x=[];for(w=0;w<q.length;w++){var A=new Geoworld.Cartesian3(q[w].x,q[w].y,q[w].z);x.push(A)}return new Geoworld.PolygonHierarchy(x)},!1),show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/Sector3D.js",["./GwAlgorithm.js"],function(v){function k(f,k){var q=k.scene.drillPick(f);k.render();for(var v=!0,x=0;x<q.length;x++)if(q[x]&&q[x].primitive||q[x]instanceof Geoworld.Cesium3DTileFeature)v=!0;if(v)q=k.scene.pickPosition(f);else{q=k.camera.getPickRay(f);if(!q)return null;q=k.scene.globe.pick(q,k.scene)}return q}var q=function(f){this.type="sector";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=f.coreMap;
this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.fillMaterial=Geoworld.Color.RED.withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.state=-1;this.arrowEntity=this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null;this.extrudedHeight=
100};q.prototype={disable:function(){this.positions=[];this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),this.selectPoint=null);for(var f=0;f<this.pointArr.length;f++)this.pointArr[f]&&
this.earthCtrl.entities.remove(this.pointArr[f]);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))if(0===f.positions.length&&(f.floatPoint=
f.creatPoint(p)),3<=f.positions.length){p=f.creatPoint(p);p.wz=f.positions.length;f.pointArr.push(p);for(p=0;p<f.pointArr.length;p++)f.pointArr[p].show=!1;f.floatPoint&&(f.floatPoint.show=!1,f.earthCtrl.entities.remove(f.floatPoint),f.floatPoint=null);f.handler.destroy()}else f.positions.push(p),p=f.creatPoint(p),p.wz=2<f.positions.length?f.positions.length-1:f.positions.length,f.pointArr.push(p)},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){2>f.positions.length||
!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions),f.arrowEntity.objId=f.objId)))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},createByData:function(f){this.positions=[];this.state=-1;this.floatPoint=null;this.pointArr=[];this.selectPoint=null;this.clickStep=0;this.modifyHandler=null;for(var k=[],q=0;q<f.length;q++){var v=Geoworld.Cartesian3.fromDegrees(f[q][0],
f[q][1]);k.push(v)}this.positions=k;for(q=0;q<this.positions.length;q++)f=this.creatPoint(this.positions[q]),f.show=!1,f.wz=q+1,this.pointArr.push(f);this.arrowEntity=this.showArrowOnMap(this.positions);this.arrowEntity.objId=this.objId},startModify:function(){this.state=2;for(var f=this,p=0;p<f.pointArr.length;p++)f.pointArr[p].show=!0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);
if(Geoworld.defined(q)&&q.id)f.clickStep++,q.id.objId||(f.selectPoint=q.id);else{for(q=0;q<f.pointArr.length;q++)f.pointArr[q].show=!1;f.floatPoint&&(f.floatPoint.show=!1);f.state=-1;f.modifyHandler.destroy();f.modifyHandler=null}2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){(p=k(p.endPosition,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),
f.positions[f.selectPoint.wz-1]=p)},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},clear:function(){for(var f=this.state=0;f<this.pointArr.length;f++)this.pointArr[f]&&this.earthCtrl.entities.remove(this.pointArr[f]);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var q=this.cartesianToLatlng(this.positions[k]);f.push(q)}return f},getPositions:function(){return this.positions},
creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(3>f.length)return null;for(var q=[],w=0;w<f.length;w++){var x=k.cartesianToLatlng(f[w]);q.push(x)}q=v.algorithm.Sector(q);if(-1!=JSON.stringify(q).indexOf("null"))return[];
x=[];for(w=0;w<q.length;w++){var A=new Geoworld.Cartesian3(q[w].x,q[w].y,q[w].z);x.push(A)}return new Geoworld.PolygonHierarchy(x)},!1),extrudedHeight:this.extrudedHeight,show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/Recflag.js",["./GwAlgorithm.js"],function(v){function k(f,k){var q=k.scene.drillPick(f);k.render();for(var v=!0,x=0;x<q.length;x++)if(q[x]&&q[x].primitive||q[x]instanceof Geoworld.Cesium3DTileFeature)v=!0;if(v)q=k.scene.pickPosition(f);else{q=k.camera.getPickRay(f);if(!q)return null;q=k.scene.globe.pick(q,k.scene)}return q}var q=function(f){this.type="recflag";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=f.coreMap;
this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.fillMaterial=Geoworld.Color.fromCssColorString("#0000FF").withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.arrowEntity=this.floatPoint=this.firstPoint=null;this.state=-1;this.selectPoint=null;this.clickStep=0};q.prototype=
{disable:function(){this.positions=[];this.firstPoint&&(this.earthCtrl.entities.remove(this.firstPoint),this.firstPoint=null);this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),
this.selectPoint=null);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))0==f.positions.length&&(f.firstPoint=f.creatPoint(p),f.firstPoint.type=
"firstPoint",f.floatPoint=f.creatPoint(p),f.floatPoint.type="floatPoint",f.positions.push(p)),3==f.positions.length&&(f.firstPoint.show=!1,f.floatPoint.show=!1,f.handler.destroy(),f.arrowEntity.objId=f.objId,f.state=-1),f.positions.push(p.clone())},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){1>f.positions.length||!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):
(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions))))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},startModify:function(){this.state=2;this.firstPoint.show=!0;this.floatPoint.show=!0;var f=this;this.clickStep=0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);Geoworld.defined(q)&&q.id?(f.clickStep++,q.id.objId||(f.selectPoint=q.id)):(f.modifyHandler.destroy(),
f.modifyHandler=null,f.firstPoint.show=!1,f.floatPoint.show=!1,f.state=-1);2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){f.selectPoint&&(p=k(p.endPosition,f.viewer))&&(f.selectPoint.position.setValue(p),"firstPoint"==f.selectPoint.type&&(f.positions[1]=p),"floatPoint"==f.selectPoint.type&&(f.positions[2]=p))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},
createByData:function(f){this.state=-1;this.positions=[];for(var k=[],q=0;q<f.length;q++){var v=Geoworld.Cartesian3.fromDegrees(f[q][0],f[q][1]);k.push(v)}this.positions=k;this.firstPoint=this.creatPoint(this.positions[1]);this.firstPoint.type="firstPoint";this.floatPoint=this.creatPoint(this.positions[2]);this.floatPoint.type="floatPoint";this.arrowEntity=this.showArrowOnMap(this.positions);this.firstPoint.show=!1;this.floatPoint.show=!1;this.arrowEntity.objId=this.objId},clear:function(){this.state=
0;this.firstPoint&&this.earthCtrl.entities.remove(this.firstPoint);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var q=this.cartesianToLatlng(this.positions[k]);f.push(q)}return f},getPositions:function(){return this.positions},creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,
disableDepthTestDistance:Number.POSITIVE_INFINITY}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(2>f.length)return null;var q=f[2],w=k.cartesianToLatlng(f[1]),x=k.cartesianToLatlng(q),q=[],w=v.algorithm.Recflag([[w[0],w[1]],[x[0],x[1]]]);if(-1!=JSON.stringify(w).indexOf("null"))return[];for(x=0;x<w.length;x++){var A=new Geoworld.Cartesian3(w[x].x,w[x].y,
w[x].z);q.push(A)}return new Geoworld.PolygonHierarchy(q)},!1),show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/Recflag3D.js",["./GwAlgorithm.js"],function(v){function k(f,k){var q=k.scene.drillPick(f);k.render();for(var v=!0,x=0;x<q.length;x++)if(q[x]&&q[x].primitive||q[x]instanceof Geoworld.Cesium3DTileFeature)v=!0;if(v)q=k.scene.pickPosition(f);else{q=k.camera.getPickRay(f);if(!q)return null;q=k.scene.globe.pick(q,k.scene)}return q}var q=function(f){this.type="recflag";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=f.coreMap;
this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.fillMaterial=Geoworld.Color.fromCssColorString("#0000FF").withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.arrowEntity=this.floatPoint=this.firstPoint=null;this.state=-1;this.selectPoint=null;this.clickStep=0;this.extrudedHeight=
100};q.prototype={disable:function(){this.positions=[];this.firstPoint&&(this.earthCtrl.entities.remove(this.firstPoint),this.firstPoint=null);this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),
this.selectPoint=null);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))0==f.positions.length&&(f.firstPoint=f.creatPoint(p),f.firstPoint.type=
"firstPoint",f.floatPoint=f.creatPoint(p),f.floatPoint.type="floatPoint",f.positions.push(p)),3==f.positions.length&&(f.firstPoint.show=!1,f.floatPoint.show=!1,f.handler.destroy(),f.arrowEntity.objId=f.objId,f.state=-1),f.positions.push(p.clone())},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){1>f.positions.length||!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):
(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions))))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},startModify:function(){this.state=2;this.firstPoint.show=!0;this.floatPoint.show=!0;var f=this;this.clickStep=0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);Geoworld.defined(q)&&q.id?(f.clickStep++,q.id.objId||(f.selectPoint=q.id)):(f.modifyHandler.destroy(),
f.modifyHandler=null,f.firstPoint.show=!1,f.floatPoint.show=!1,f.state=-1);2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){f.selectPoint&&(p=k(p.endPosition,f.viewer))&&(f.selectPoint.position.setValue(p),"firstPoint"==f.selectPoint.type&&(f.positions[1]=p),"floatPoint"==f.selectPoint.type&&(f.positions[2]=p))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},
createByData:function(f){this.state=-1;this.positions=[];for(var k=[],q=0;q<f.length;q++){var v=Geoworld.Cartesian3.fromDegrees(f[q][0],f[q][1]);k.push(v)}this.positions=k;this.firstPoint=this.creatPoint(this.positions[1]);this.firstPoint.type="firstPoint";this.floatPoint=this.creatPoint(this.positions[2]);this.floatPoint.type="floatPoint";this.arrowEntity=this.showArrowOnMap(this.positions);this.firstPoint.show=!1;this.floatPoint.show=!1;this.arrowEntity.objId=this.objId},clear:function(){this.state=
0;this.firstPoint&&this.earthCtrl.entities.remove(this.firstPoint);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var q=this.cartesianToLatlng(this.positions[k]);f.push(q)}return f},getPositions:function(){return this.positions},creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,
disableDepthTestDistance:Number.POSITIVE_INFINITY}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(2>f.length)return null;var q=f[2],w=k.cartesianToLatlng(f[1]),x=k.cartesianToLatlng(q),q=[],w=v.algorithm.Recflag([[w[0],w[1]],[x[0],x[1]]]);if(-1!=JSON.stringify(w).indexOf("null"))return[];for(x=0;x<w.length;x++){var A=new Geoworld.Cartesian3(w[x].x,w[x].y,
w[x].z);q.push(A)}return new Geoworld.PolygonHierarchy(q)},!1),extrudedHeight:this.extrudedHeight,show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/Pennant.js",["./GwAlgorithm.js"],function(v){function k(f,k){var q=k.scene.drillPick(f);k.render();for(var v=!0,x=0;x<q.length;x++)if(q[x]&&q[x].primitive||q[x]instanceof Geoworld.Cesium3DTileFeature)v=!0;if(v)q=k.scene.pickPosition(f);else{q=k.camera.getPickRay(f);if(!q)return null;q=k.scene.globe.pick(q,k.scene)}return q}var q=function(f){this.type="recflag";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=f.coreMap;
this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.fillMaterial=Geoworld.Color.fromCssColorString("#0000FF").withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.arrowEntity=this.floatPoint=this.firstPoint=null;this.state=-1;this.selectPoint=null;this.clickStep=0};q.prototype=
{disable:function(){this.positions=[];this.firstPoint&&(this.earthCtrl.entities.remove(this.firstPoint),this.firstPoint=null);this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),
this.selectPoint=null);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))0==f.positions.length&&(f.firstPoint=f.creatPoint(p),f.firstPoint.type=
"firstPoint",f.floatPoint=f.creatPoint(p),f.floatPoint.type="floatPoint",f.positions.push(p)),3==f.positions.length&&(f.firstPoint.show=!1,f.floatPoint.show=!1,f.handler.destroy(),f.arrowEntity.objId=f.objId,f.state=-1),f.positions.push(p.clone())},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){1>f.positions.length||!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):
(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions))))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},startModify:function(){this.state=2;this.firstPoint.show=!0;this.floatPoint.show=!0;var f=this;this.clickStep=0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);Geoworld.defined(q)&&q.id?(f.clickStep++,q.id.objId||(f.selectPoint=q.id)):(f.modifyHandler.destroy(),
f.modifyHandler=null,f.firstPoint.show=!1,f.floatPoint.show=!1,f.state=-1);2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){f.selectPoint&&(p=k(p.endPosition,f.viewer))&&(f.selectPoint.position.setValue(p),"firstPoint"==f.selectPoint.type&&(f.positions[1]=p),"floatPoint"==f.selectPoint.type&&(f.positions[2]=p))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},
createByData:function(f){this.state=-1;this.positions=[];for(var k=[],q=0;q<f.length;q++){var v=Geoworld.Cartesian3.fromDegrees(f[q][0],f[q][1]);k.push(v)}this.positions=k;this.firstPoint=this.creatPoint(this.positions[1]);this.firstPoint.type="firstPoint";this.floatPoint=this.creatPoint(this.positions[2]);this.floatPoint.type="floatPoint";this.arrowEntity=this.showArrowOnMap(this.positions);this.firstPoint.show=!1;this.floatPoint.show=!1;this.arrowEntity.objId=this.objId},clear:function(){this.state=
0;this.firstPoint&&this.earthCtrl.entities.remove(this.firstPoint);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var q=this.cartesianToLatlng(this.positions[k]);f.push(q)}return f},getPositions:function(){return this.positions},creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,
disableDepthTestDistance:Number.POSITIVE_INFINITY}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(2>f.length)return null;var q=f[2],w=k.cartesianToLatlng(f[1]),x=k.cartesianToLatlng(q),q=[],w=v.algorithm.Pennant([[w[0],w[1]],[x[0],x[1]]]);if(-1!=JSON.stringify(w).indexOf("null"))return[];for(x=0;x<w.length;x++){var A=new Geoworld.Cartesian3(w[x].x,w[x].y,
w[x].z);q.push(A)}return new Geoworld.PolygonHierarchy(q)},!1),show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/Pennant3D.js",["./GwAlgorithm.js"],function(v){function k(f,k){var q=k.scene.drillPick(f);k.render();for(var v=!0,x=0;x<q.length;x++)if(q[x]&&q[x].primitive||q[x]instanceof Geoworld.Cesium3DTileFeature)v=!0;if(v)q=k.scene.pickPosition(f);else{q=k.camera.getPickRay(f);if(!q)return null;q=k.scene.globe.pick(q,k.scene)}return q}var q=function(f){this.type="recflag";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=f.coreMap;
this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.fillMaterial=Geoworld.Color.fromCssColorString("#0000FF").withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.arrowEntity=this.floatPoint=this.firstPoint=null;this.state=-1;this.selectPoint=null;this.clickStep=0;this.extrudedHeight=
100};q.prototype={disable:function(){this.positions=[];this.firstPoint&&(this.earthCtrl.entities.remove(this.firstPoint),this.firstPoint=null);this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),
this.selectPoint=null);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))0==f.positions.length&&(f.firstPoint=f.creatPoint(p),f.firstPoint.type=
"firstPoint",f.floatPoint=f.creatPoint(p),f.floatPoint.type="floatPoint",f.positions.push(p)),3==f.positions.length&&(f.firstPoint.show=!1,f.floatPoint.show=!1,f.handler.destroy(),f.arrowEntity.objId=f.objId,f.state=-1),f.positions.push(p.clone())},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){1>f.positions.length||!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):
(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions))))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},startModify:function(){this.state=2;this.firstPoint.show=!0;this.floatPoint.show=!0;var f=this;this.clickStep=0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);Geoworld.defined(q)&&q.id?(f.clickStep++,q.id.objId||(f.selectPoint=q.id)):(f.modifyHandler.destroy(),
f.modifyHandler=null,f.firstPoint.show=!1,f.floatPoint.show=!1,f.state=-1);2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){f.selectPoint&&(p=k(p.endPosition,f.viewer))&&(f.selectPoint.position.setValue(p),"firstPoint"==f.selectPoint.type&&(f.positions[1]=p),"floatPoint"==f.selectPoint.type&&(f.positions[2]=p))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},
createByData:function(f){this.state=-1;this.positions=[];for(var k=[],q=0;q<f.length;q++){var v=Geoworld.Cartesian3.fromDegrees(f[q][0],f[q][1]);k.push(v)}this.positions=k;this.firstPoint=this.creatPoint(this.positions[1]);this.firstPoint.type="firstPoint";this.floatPoint=this.creatPoint(this.positions[2]);this.floatPoint.type="floatPoint";this.arrowEntity=this.showArrowOnMap(this.positions);this.firstPoint.show=!1;this.floatPoint.show=!1;this.arrowEntity.objId=this.objId},clear:function(){this.state=
0;this.firstPoint&&this.earthCtrl.entities.remove(this.firstPoint);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var q=this.cartesianToLatlng(this.positions[k]);f.push(q)}return f},getPositions:function(){return this.positions},creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,
disableDepthTestDistance:Number.POSITIVE_INFINITY}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(2>f.length)return null;var q=f[2],w=k.cartesianToLatlng(f[1]),x=k.cartesianToLatlng(q),q=[],w=v.algorithm.Pennant([[w[0],w[1]],[x[0],x[1]]]);if(-1!=JSON.stringify(w).indexOf("null"))return[];for(x=0;x<w.length;x++){var A=new Geoworld.Cartesian3(w[x].x,w[x].y,
w[x].z);q.push(A)}return new Geoworld.PolygonHierarchy(q)},!1),extrudedHeight:this.extrudedHeight,show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/Mflag.js",["./GwAlgorithm.js"],function(v){function k(f,k){var q=k.scene.drillPick(f);k.render();for(var v=!0,x=0;x<q.length;x++)if(q[x]&&q[x].primitive||q[x]instanceof Geoworld.Cesium3DTileFeature)v=!0;if(v)q=k.scene.pickPosition(f);else{q=k.camera.getPickRay(f);if(!q)return null;q=k.scene.globe.pick(q,k.scene)}return q}var q=function(f){this.type="recflag";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=f.coreMap;
this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.fillMaterial=Geoworld.Color.fromCssColorString("#0000FF").withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.arrowEntity=this.floatPoint=this.firstPoint=null;this.state=-1;this.selectPoint=null;this.clickStep=0};q.prototype=
{disable:function(){this.positions=[];this.firstPoint&&(this.earthCtrl.entities.remove(this.firstPoint),this.firstPoint=null);this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),
this.selectPoint=null);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))0==f.positions.length&&(f.firstPoint=f.creatPoint(p),f.firstPoint.type=
"firstPoint",f.floatPoint=f.creatPoint(p),f.floatPoint.type="floatPoint",f.positions.push(p)),3==f.positions.length&&(f.firstPoint.show=!1,f.floatPoint.show=!1,f.handler.destroy(),f.arrowEntity.objId=f.objId,f.state=-1),f.positions.push(p.clone())},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){1>f.positions.length||!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):
(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions))))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},startModify:function(){this.state=2;this.firstPoint.show=!0;this.floatPoint.show=!0;var f=this;this.clickStep=0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);Geoworld.defined(q)&&q.id?(f.clickStep++,q.id.objId||(f.selectPoint=q.id)):(f.modifyHandler.destroy(),
f.modifyHandler=null,f.firstPoint.show=!1,f.floatPoint.show=!1,f.state=-1);2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){f.selectPoint&&(p=k(p.endPosition,f.viewer))&&(f.selectPoint.position.setValue(p),"firstPoint"==f.selectPoint.type&&(f.positions[1]=p),"floatPoint"==f.selectPoint.type&&(f.positions[2]=p))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},
createByData:function(f){this.state=-1;this.positions=[];for(var k=[],q=0;q<f.length;q++){var v=Geoworld.Cartesian3.fromDegrees(f[q][0],f[q][1]);k.push(v)}this.positions=k;this.firstPoint=this.creatPoint(this.positions[1]);this.firstPoint.type="firstPoint";this.floatPoint=this.creatPoint(this.positions[2]);this.floatPoint.type="floatPoint";this.arrowEntity=this.showArrowOnMap(this.positions);this.firstPoint.show=!1;this.floatPoint.show=!1;this.arrowEntity.objId=this.objId},clear:function(){this.state=
0;this.firstPoint&&this.earthCtrl.entities.remove(this.firstPoint);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var q=this.cartesianToLatlng(this.positions[k]);f.push(q)}return f},getPositions:function(){return this.positions},creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,
disableDepthTestDistance:Number.POSITIVE_INFINITY}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(2>f.length)return null;var q=f[2],w=k.cartesianToLatlng(f[1]),x=k.cartesianToLatlng(q),q=[],w=v.algorithm.Mflag([[w[0],w[1]],[x[0],x[1]]]);if(-1!=JSON.stringify(w).indexOf("null"))return[];for(x=0;x<w.length;x++){var A=new Geoworld.Cartesian3(w[x].x,w[x].y,
w[x].z);q.push(A)}return new Geoworld.PolygonHierarchy(q)},!1),show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/Mflag3D.js",["./GwAlgorithm.js"],function(v){function k(f,k){var q=k.scene.drillPick(f);k.render();for(var v=!0,x=0;x<q.length;x++)if(q[x]&&q[x].primitive||q[x]instanceof Geoworld.Cesium3DTileFeature)v=!0;if(v)q=k.scene.pickPosition(f);else{q=k.camera.getPickRay(f);if(!q)return null;q=k.scene.globe.pick(q,k.scene)}return q}var q=function(f){this.type="recflag";this.objId=Number((new Date).getTime()+""+Number(1E3*Math.random()).toFixed(0));this.earthCtrl=f;this.viewer=f.coreMap;
this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.pointImageUrl=GEOWORLD_BASE_URL+"./Assets/Images/point1.png";this.fillMaterial=Geoworld.Color.fromCssColorString("#0000FF").withAlpha(0.8);this.outlineMaterial=new Geoworld.PolylineDashMaterialProperty({dashLength:16,color:Geoworld.Color.fromCssColorString("#f00").withAlpha(0.7)});this.positions=[];this.arrowEntity=this.floatPoint=this.firstPoint=null;this.state=-1;this.selectPoint=null;this.clickStep=0;this.extrudedHeight=
100};q.prototype={disable:function(){this.positions=[];this.firstPoint&&(this.earthCtrl.entities.remove(this.firstPoint),this.firstPoint=null);this.floatPoint&&(this.earthCtrl.entities.remove(this.floatPoint),this.floatPoint=null);this.arrowEntity&&(this.earthCtrl.entities.remove(this.arrowEntity),this.arrowEntity=null);this.state=-1;this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.selectPoint&&(this.earthCtrl.entities.remove(this.selectPoint),
this.selectPoint=null);this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null);this.clickStep=0},disableHandler:function(){this.handler&&(this.handler.destroy(),this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler&&(this.modifyHandler.destroy(),this.modifyHandler=null)},startDraw:function(){var f=this;this.state=1;this.handler.setInputAction(function(p){if(p=k(p.position,f.viewer))0==f.positions.length&&(f.firstPoint=f.creatPoint(p),f.firstPoint.type=
"firstPoint",f.floatPoint=f.creatPoint(p),f.floatPoint.type="floatPoint",f.positions.push(p)),3==f.positions.length&&(f.firstPoint.show=!1,f.floatPoint.show=!1,f.handler.destroy(),f.arrowEntity.objId=f.objId,f.state=-1),f.positions.push(p.clone())},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.handler.setInputAction(function(p){1>f.positions.length||!(p=k(p.endPosition,f.viewer))||(f.floatPoint.position.setValue(p),2<=f.positions.length&&(Geoworld.defined(f.arrowEntity)?(f.positions.pop(),f.positions.push(p)):
(f.positions.push(p),f.arrowEntity=f.showArrowOnMap(f.positions))))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},startModify:function(){this.state=2;this.firstPoint.show=!0;this.floatPoint.show=!0;var f=this;this.clickStep=0;this.modifyHandler||(this.modifyHandler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas));this.modifyHandler.setInputAction(function(p){var q=f.viewer.scene.pick(p.position);Geoworld.defined(q)&&q.id?(f.clickStep++,q.id.objId||(f.selectPoint=q.id)):(f.modifyHandler.destroy(),
f.modifyHandler=null,f.firstPoint.show=!1,f.floatPoint.show=!1,f.state=-1);2==f.clickStep&&(f.clickStep=0,(p=k(p.position,f.viewer))&&f.selectPoint&&(f.selectPoint.position.setValue(p),f.selectPoint=null))},Geoworld.ScreenSpaceEventType.LEFT_CLICK);this.modifyHandler.setInputAction(function(p){f.selectPoint&&(p=k(p.endPosition,f.viewer))&&(f.selectPoint.position.setValue(p),"firstPoint"==f.selectPoint.type&&(f.positions[1]=p),"floatPoint"==f.selectPoint.type&&(f.positions[2]=p))},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},
createByData:function(f){this.state=-1;this.positions=[];for(var k=[],q=0;q<f.length;q++){var v=Geoworld.Cartesian3.fromDegrees(f[q][0],f[q][1]);k.push(v)}this.positions=k;this.firstPoint=this.creatPoint(this.positions[1]);this.firstPoint.type="firstPoint";this.floatPoint=this.creatPoint(this.positions[2]);this.floatPoint.type="floatPoint";this.arrowEntity=this.showArrowOnMap(this.positions);this.firstPoint.show=!1;this.floatPoint.show=!1;this.arrowEntity.objId=this.objId},clear:function(){this.state=
0;this.firstPoint&&this.earthCtrl.entities.remove(this.firstPoint);this.floatPoint&&this.earthCtrl.entities.remove(this.floatPoint);this.arrowEntity&&this.earthCtrl.entities.remove(this.arrowEntity);this.state=-1},getLnglats:function(){for(var f=[],k=0;k<this.positions.length;k++){var q=this.cartesianToLatlng(this.positions[k]);f.push(q)}return f},getPositions:function(){return this.positions},creatPoint:function(f){f=this.earthCtrl.entities.add({position:f,billboard:{image:this.pointImageUrl,verticalOrigin:Geoworld.VerticalOrigin.BOTTOM,
disableDepthTestDistance:Number.POSITIVE_INFINITY}});f.attr="editPoint";return f},showArrowOnMap:function(f){var k=this;return this.earthCtrl.entities.add({polygon:new Geoworld.PolygonGraphics({hierarchy:new Geoworld.CallbackProperty(function(){if(2>f.length)return null;var q=f[2],w=k.cartesianToLatlng(f[1]),x=k.cartesianToLatlng(q),q=[],w=v.algorithm.Mflag([[w[0],w[1]],[x[0],x[1]]]);if(-1!=JSON.stringify(w).indexOf("null"))return[];for(x=0;x<w.length;x++){var A=new Geoworld.Cartesian3(w[x].x,w[x].y,
w[x].z);q.push(A)}return new Geoworld.PolygonHierarchy(q)},!1),extrudedHeight:this.extrudedHeight,show:!0,fill:!0,material:k.fillMaterial})})},cartesianToLatlng:function(f){f=this.viewer.scene.globe.ellipsoid.cartesianToCartographic(f);var k=Geoworld.Math.toDegrees(f.latitude);return[Geoworld.Math.toDegrees(f.longitude),k]}};return q});
define("MilitaryPlotting/GwMilitaryPlotting.js","./StraightArrow.js ./StraightArrow3D.js ./AttackArrow.js ./AttackArrow3D.js ./PincerArrow.js ./PincerArrow3D.js ./Arrow.js ./Arrow3D.js ./Surface.js ./Surface3D.js ./Assmbly.js ./Assmbly3D.js ./Sector.js ./Sector3D.js ./Recflag.js ./Recflag3D.js ./Pennant.js ./Pennant3D.js ./Mflag.js ./Mflag3D.js".split(" "),function(v,k,q,f,p,t,w,x,A,D,z,C,B,E,G,F,H,J,L,N){function Q(f){this._earthCtrl=f;this._coreMap=f.coreMap;this.isActivate=!1;this.drawArr=[];this.options=
this.earthCtrl=this.viewer=this.handler=null}Q.prototype.initialize=function(f){this.isActivate||(this.isActivate=!0,this.earthCtrl=f,this.viewer=f.coreMap,this.bindEdit())};Q.prototype.disable=function(){if(this.isActivate){this.isActivate=!1;for(var f=0;f<this.drawArr.length;f++)this.drawArr[f].disable();this.drawArr=[];this.handler&&(this.handler.destroy(),this.handler=null);this.viewer=null}};Q.prototype.addToMap=function(X,U){switch(X){case "straightArrow":var I=new v(this.earthCtrl,U);I.startDraw();
this.drawArr.push(I);break;case "straightArrow3D":I=new k(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "arrow3D":I=new x(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "arrow":I=new w(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "recFlag":I=new G(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "recFlag3D":I=new F(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "mFlag":I=new L(this.earthCtrl);I.startDraw();this.drawArr.push(I);
break;case "mFlag3D":I=new N(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "pennant":I=new H(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "pennant3D":I=new J(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "sector":I=new B(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "sector3D":I=new E(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "assmbly":I=new z(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "assmbly3D":I=
new C(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "surface":I=new A(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "surface3D":I=new D(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "attackArrow":I=new q(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "attackArrow3D":I=new f(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "pincerArrow":I=new p(this.earthCtrl);I.startDraw();this.drawArr.push(I);break;case "pincerArrow3D":I=
new t(this.earthCtrl),I.startDraw(),this.drawArr.push(I)}};Q.prototype.saveData=function(){for(var f={straightArrowData:[],attackArrowData:[],pincerArrowData:[]},k=0;k<this.drawArr.length;k++){var p=this.drawArr[k],q=p.getLnglats();"StraightArrow"==p.type?f.straightArrowData.push(q):"AttackArrow"==p.type?f.attackArrowData.push(q):f.pincerArrowData.push(q)}console.log("\u4fdd\u5b58\u7684\u6570\u636e\uff1a"+JSON.stringify(f))};Q.prototype.showData=function(f){if(f){var k=f.straightArrowData,t=f.attackArrowData;
f=f.pincerArrowData;for(var w=0;w<k.length;w++){var x=k[w],z=new v(this.viewer);z.createByData(x);this.drawArr.push(z)}for(k=0;k<t.length;k++)x=t[k],w=new q(this.viewer),w.createByData(x),this.drawArr.push(w);for(t=0;t<f.length;t++)x=f[t],k=new p(this.viewer),k.createByData(x),this.drawArr.push(k)}};Q.prototype.nowArrowObj=null;Q.prototype.bindEdit=function(){var f=this;this.handler=new Geoworld.ScreenSpaceEventHandler(this.viewer.scene.canvas);this.handler.setInputAction(function(k){k=f.viewer.scene.pick(k.position);
if(Geoworld.defined(k)&&k.id)if(f.nowArrowObj&&-1!=f.nowArrowObj.state)console.log("\u4e0a\u4e00\u6b65\u64cd\u4f5c\u672a\u7ed3\u675f\uff0c\u8bf7\u7ee7\u7eed\u5b8c\u6210\u4e0a\u4e00\u6b65\uff01");else for(var p=0;p<f.drawArr.length;p++)if(k.id.objId==f.drawArr[p].objId){f.nowArrowObj=f.drawArr[p];f.drawArr[p].startModify();break}},Geoworld.ScreenSpaceEventType.LEFT_CLICK)};Q.prototype.clearOne=function(){var f=this;this.handler.setInputAction(function(k){k=f.viewer.scene.pick(k.position);if(Geoworld.defined(k)&&
k.id){for(var p=0;p<f.drawArr.length;p++)if(k.id.objId===f.drawArr[p].objId){f.drawArr[p].clear();f.drawArr.splice(p,1);break}f.handler.destroy();f.bindEdit()}},Geoworld.ScreenSpaceEventType.LEFT_CLICK)};Q.prototype.clearAll=function(){for(var f=0;f<this.drawArr.length;f++)this.drawArr[f].clear()};return Geoworld.MilitaryPlotting=Q});
define("EarthCtrl","./GwCamera.js ./GwMeasure.js ./GwShapeTool.js ./GwEditTool.js ./GwEnvironment.js ./Scene/GwScene.js ./GwObjectFactory.js ./GwInformationBar.js ./Tools/GwToolManager.js ./Parser/GwSceneConfigParser.js ./Parser/GwSceneConfigNode.js ./GwEdit.js ./GwAnalysis.js ./GwView.js ./MilitaryPlotting/GwMilitaryPlotting.js".split(" "),function(v,k,q,f,p,t,w,x,A,D,z,C,B,E,G){function F(z,L,N){var Q,X;Geoworld.defined(N.clockViewModel)?(X=N.clockViewModel,Q=X.clock):(Q=new Geoworld.Clock,X=new Geoworld.ClockViewModel(Q));
Geoworld.defined(N.shouldAnimate)&&(Q.shouldAnimate=N.shouldAnimate);Q.shouldAnimate=!0;this.coreMap=new Geoworld.MapWidget(z,{imageryProvider:[],terrainProvider:void 0,clock:Q,shadow:!1,ellipsoidCoordinates:N.ellipsoidCoordinates});z=N.dataSources;var U=!1;Geoworld.defined(z)||(z=new Geoworld.DataSourceCollection,U=!0);N=this.coreMap.scene;var I=new Geoworld.DataSourceDisplay({scene:N,dataSourceCollection:z}),Y=new Geoworld.EventHelper;Y.add(Q.onTick,F.prototype._onTick,this);this._environment=new p(this);
this._infoBar=new x(this);this._camera=new v(this);this._measure=new k(this);this._shapeTool=new q(this);this._editTool=new f(this);this._factory=new w(this);this._tools=new A(this);this._edit=new C(this);this._analysis=new B(this);this._userScene=new t;this._userScene.initialize(this,L);this._view=new E(this);this._MilitaryPlotting=new G(this);this._dataSourceDisplay=I;this._dataSourceCollection=z;this._destroyDataSourceCollection=U;Q=z.length;for(U=0;U<Q;U++)this._dataSourceAdded(z,z.get(U));this._dataSourceAdded(void 0,
I.defaultDataSource);Y.add(z.dataSourceAdded,F.prototype._dataSourceAdded,this);Y.add(z.dataSourceRemoved,F.prototype._dataSourceRemoved,this);Y.add(N.postRender,Geoworld.MapWidget.prototype._postRender,this);Y.add(this.coreMap.clock.onTick,Geoworld.MapWidget.prototype._onTick,this);H(this);N={};N.defaultResetView=Geoworld.Camera.DEFAULT_VIEW_RECTANGLE;N.enableCompass=!0;N.enableZoomControls=!0;N.enableDistanceLegend=!0;N.enableCompassOuterRing=!0;Geoworld.viewerGeoworldNavigationMixin.mixinWidget(this.coreMap,
N);this._clockViewModel=X;D.parse(this,L)}function H(f){var k=f.coreMap,p=k.scene,q=k.canvas,t=k.camera;p.screenSpaceCameraController.minimumZoomDistance=10;k.clock.onTick.addEventListener(function(){var k=f._camera.undergroundMode;0<t.pitch&&!k&&(p.screenSpaceCameraController.enableTilt=!1)});var v,w,x=new Geoworld.ScreenSpaceEventHandler(q);x.setInputAction(function(f){w=v=Geoworld.Cartesian3.clone(f.position);x.setInputAction(function(f){w=f.endPosition;0<w.y-v.y&&(p.screenSpaceCameraController.enableTilt=
!0)},Geoworld.ScreenSpaceEventType.MOUSE_MOVE)},Geoworld.ScreenSpaceEventType.MIDDLE_DOWN)}F.prototype.initialize=function(f,k){};Object.defineProperties(F.prototype,{environment:{get:function(){return this._environment}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},primitives:{get:function(){return this.coreMap.scene.primitives}},imageryLayers:{get:function(){return this.coreMap.imageryLayers}},view:{get:function(){return this._view}},terrainProvider:{get:function(){return this.coreMap.terrainProvider}},
dataSources:{get:function(){return this._dataSourceCollection}},camera:{get:function(){return this._camera}},measure:{get:function(){return this._measure}},shapeTool:{get:function(){return this._shapeTool}},editTool:{get:function(){return this._editTool}},edit:{get:function(){return this._edit}},analysis:{get:function(){return this._analysis}},factory:{get:function(){return this._factory}},userScene:{get:function(){return this._userScene}},tools:{get:function(){return this._tools}},hdr:{get:function(){return this.coreMap.scene.highDynamicRange},
set:function(f){this.coreMap.scene.highDynamicRange=f}},sunGlowFactor:{set:function(f){this.coreMap.scene.sun.glowFactor=f},get:function(){return this.coreMap.scene.sun.glowFactor}},shadows:{get:function(){return this.coreMap.scene.shadowMap.enabled},set:function(f){this.coreMap.scene.shadowMap.enabled=f}},terrainShadows:{get:function(){return this.coreMap.scene.globe.shadows},set:function(f){this.coreMap.scene.globe.shadows=f}},shadowMap:{get:function(){return this.coreMap.scene.shadowMap}},shadowMapList:{get:function(){return this.coreMap.scene.shadowMapList}},
textureProjectionMapList:{get:function(){return this.coreMap.scene.textureProjectionMapList}},viewShedMapList:{get:function(){return this.coreMap.scene.viewShedMapList}},clock:{get:function(){return this._clockViewModel.clock}},clockViewModel:{get:function(){return this._clockViewModel}},sunShaftEnabled:{get:function(){return this.coreMap.scene.sunShaftEnabled},set:function(f){this.coreMap.scene.sunShaftEnabled=f}},MilitaryPlotting:{get:function(){return this._MilitaryPlotting}}});F.prototype._onTick=
function(f){this._dataSourceDisplay.update(f.currentTime)};F.prototype.brightness=function(f){var k=Geoworld.defaultValue(f.enable,!0);f=Geoworld.defaultValue(f.brightness,1);var p=this.coreMap.scene.postProcessStages;this.coreMap.scene.brightness=this.coreMap.scene.brightness||p.add(Geoworld.PostProcessStageLibrary.createBrightnessStage());this.coreMap.scene.brightness.enabled=k;this.coreMap.scene.brightness.uniforms.brightness=Number(f)};F.prototype._dataSourceAdded=function(f,k){k.entities.collectionChanged.addEventListener(F.prototype._onEntityCollectionChanged,
this)};F.prototype._dataSourceRemoved=function(f,k){var p=k.entities;p.collectionChanged.removeEventListener(F.prototype._onEntityCollectionChanged,this);Geoworld.defined(this.coreMap.trackedEntity)&&p.getById(this.coreMap.trackedEntity.id)===this.coreMap.trackedEntity&&(this.coreMap.trackedEntity=void 0);Geoworld.defined(this.selectedEntity)&&p.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};F.prototype._onEntityCollectionChanged=function(f,k,p){f=p.length;for(k=
0;k<f;k++){var q=p[k];this.coreMap.trackedEntity===q&&(this.coreMap.trackedEntity=void 0);this.selectedEntity===q&&(this.selectedEntity=void 0)}};return F});